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 */

  entry:
    set_info(0x0001, *(arg_06));
    height = Item.getZ(arg_06);
    class_0A09_slot_21(arg_06);
    minLimit = retval;
    minLimitCount = ((height - minLimit) / 2);
    counter = 1;

  block_0590:
    if (counter <= minLimitCount) goto block_07F6;

  block_059B:
    wp = Intrinsic0013(arg_06);
    local_0E = Item.legal_create(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 */

  block_05DF:
    if condition goto block_068C;

  block_05E2:
    if Item.use(*(arg_06), cargoDown) goto block_0688;

  block_05F5:
    if (cargoDown < 0x0100) goto block_0673;

  block_0604:
    if Item.isInNpc(*(arg_06), cargoDown) goto block_062F;

  block_0617:
    total2 = (1 + total2);
    goto block_0670;

  block_062F:
    total2 = (1 + total2);

  block_0670:
    goto block_0688;

  block_0673:
    total2 = (1 + total2);

  block_0688:
    /* loopnext  */
    goto block_05DF;

  block_068C:
    if Item.pop(0, 0, wp, arg_06) goto block_071E;

  block_06A3:
    counter2 = 1;

  block_06AA:
    if (counter2 <= total2) goto block_06F5;

  block_06B5:
    cargoDown = Intrinsic0023();
    counter2 = (1 + counter2);
    goto block_06AA;

  block_06F5:
    spawn class_0A0C_slot_32(pid, 1, 0x00000000);
    suspend;
    goto block_07E2;

  block_071E:
    counter2 = 1;

  block_0725:
    if (counter2 <= total2) goto block_0770;

  block_0730:
    cargoDown = Intrinsic0023();
    counter2 = (1 + counter2);
    goto block_0725;

  block_0770:
    spawn class_0A0C_slot_32(pid, 60, 0x00000000);
    suspend;
    spawn class_0A09_slot_23(pid, arg_06);
    suspend;
    goto block_0901;

  block_07E2:
    total2 = 0;
    counter = (1 + counter);
    goto block_0590;

  block_07F6:
    if ((height - minLimit) & 1) goto block_08CB;

  block_0804:
    /* loopscr value_u8=0x24 */
    /* loop current_var=0xF5 string_bytes=0x1 loop_type=0x6 */

  block_0814:
    if condition goto block_0843;

  block_0817:
    if Item.use(*(arg_06), cargoDown) goto block_083F;

  block_082A:
    total2 = (1 + total2);

  block_083F:
    /* loopnext  */
    goto block_0814;

  block_0843:
    counter2 = 1;

  block_084C:
    if (counter2 <= total2) goto block_0897;

  block_0857:
    cargoDown = Intrinsic0023();
    counter2 = (1 + counter2);
    goto block_084C;

  block_0897:

  block_08CB:
    /* bit_not  */

  block_0901:
    return;

}
