function lift_slot_20() /* entry=52 class_id=0x0133 slot=0x20 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    counter, /* [BP-02h] type=0x69 */
    total, /* [BP-04h] type=0x69 */
    alt, /* [BP-06h] type=0x69 */
    wp, /* [BP-0Bh] type=0x24 */
    cargo, /* [BP-0Dh] type=0x24 */
    cargoType; /* [BP-0Fh] type=0x69 */

  set_info(0x0001, *(arg_06));
  alt = 1;
  while (alt > 47) {
    wp = Item.getX(arg_06);
    local_09 = Item.getY(arg_06);
    local_07 = (Item.getZ(arg_06) - 2);
    total = 0;
    /* loopscr value_u8=0x24 */
    /* loop current_var=0xF3 string_bytes=0x1 loop_type=0x6 */
    while (!condition) {
      cargoType = Item.getShape(cargo);
      if (cargo == *(arg_06)) {
        total = (1 + total);
      }
      /* loopnext  */
    }
    if (!legalMoveToPoint(0, 1, wp, arg_06)) {
      counter = 1;
      while (counter > total) {
        cargo = Item.getEtherealTop();
        counter = (1 + counter);
      }
      spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
      suspend;
    }
    else {
      counter = 1;
      while (counter > total) {
        cargo = Item.getEtherealTop();
        counter = (1 + counter);
      }
      return;
    }
    alt = (1 + alt);
  }
  return;
}
