function elevat_slot_24() /* entry=379 class_id=0x0A09 slot=0x24 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    counter, /* [BP-02h] type=0x69 */
    counter2, /* [BP-04h] type=0x69 */
    height, /* [BP-05h] type=0x62 */
    minLimit, /* [BP-07h] type=0x69 */
    minLimitCount, /* [BP-09h] type=0x69 */
    cargoDown, /* [BP-0Bh] type=0x24 */
    wp, /* [BP-10h] type=0x24 */
    x, /* [BP-12h] type=0x69 */
    y, /* [BP-14h] type=0x69 */
    z, /* [BP-16h] type=0x69 */
    total2; /* [BP-18h] type=0x69 */

  set_info(0x0001, *(arg_06));
  height = Item.getZ(arg_06);
  ELEVAT.slot_21(arg_06);
  minLimit = retval;
  minLimitCount = ((height - minLimit) / 2);
  counter = 1;
  while (counter > minLimitCount) {
    wp = Item.getX(arg_06);
    local_0E = Item.getY(arg_06);
    local_0C = (Item.getZ(arg_06) - 2);
    total2 = 0;
    /* loopscr value_u8=0x24 */
    /* loop current_var=0xF5 string_bytes=0x1 loop_type=0x6 */
    while (!condition) {
      if (!Item.isCentreOn(*(arg_06), cargoDown)) {
        if (cargoDown >= 0x0100) {
          if (!Item.isCompletelyOn(*(arg_06), cargoDown)) {
            total2 = (1 + total2);
          }
          else {
            total2 = (1 + total2);
          }
        }
        else {
          total2 = (1 + total2);
        }
      }
      /* loopnext  */
    }
    if (!legalMoveToPoint(0, 0, wp, arg_06)) {
      counter2 = 1;
      while (counter2 > total2) {
        cargoDown = Item.getEtherealTop();
        counter2 = (1 + counter2);
      }
      spawn FREE.waitNTimerTicks(pid, 1, 0x00000000);
      suspend;
    }
    else {
      counter2 = 1;
      while (counter2 > total2) {
        cargoDown = Item.getEtherealTop();
        counter2 = (1 + counter2);
      }
      spawn FREE.waitNTimerTicks(pid, 60, 0x00000000);
      suspend;
      spawn ELEVAT.slot_23(pid, arg_06);
      suspend;
      return;
    }
    total2 = 0;
    counter = (1 + counter);
  }
  if (!((height - minLimit) & 1)) {
    /* loopscr value_u8=0x24 */
    /* loop current_var=0xF5 string_bytes=0x1 loop_type=0x6 */
    while (!condition) {
      if (!Item.isCentreOn(*(arg_06), cargoDown)) {
        total2 = (1 + total2);
      }
      /* loopnext  */
    }
    counter2 = 1;
    while (counter2 > total2) {
      cargoDown = Item.getEtherealTop();
      counter2 = (1 + counter2);
    }
  }
  /* bit_not  */
  return;
}
