function elevator_gotHit() /* entry=124 class_id=0x021E slot=0x06 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    ref, /* [BP+0Ah] type=0x69 */
    ke, /* [BP+0Ch] type=0x69 */
    item, /* [BP-02h] type=0x24 */
    lowQuality, /* [BP-04h] type=0x69 */
    direction, /* [BP-06h] type=0x69 */
    n, /* [BP-08h] type=0x24 */
    nT; /* [BP-0Ah] type=0x69 */

  entry:
    set_info(0x020C, *(arg_06));
    process_exclude();
    if ((ref != 1) || (Intrinsic0070() != 1)) goto block_010E;

  block_0108:
    goto block_04FA;

  block_010E:
    class_0A0C_slot_33(0x0220, 0);

  block_0136:
    /* global_address global_id=0x3C */
    if Intrinsic0033() goto block_016F;

  block_0146:
    spawn class_0A0C_slot_32(pid, 2, 0x00000000);
    suspend;
    goto block_0136;

  block_016F:
    /* global_address global_id=0x3C */
    if Intrinsic0035() goto block_01AF;

  block_017F:
    /* global_address global_id=0x3C */
    /* global_address global_id=0x3C */
    suspend;

  block_01AF:
    item = ref;
    lowQuality = Item.fall(arg_06);
    direction = Intrinsic009C(arg_06);
    /* loopscr value_u8=0x24 */
    /* loop current_var=0xFE string_bytes=0x1 loop_type=0x6 */

  block_01E2:
    if condition goto block_0395;

  block_01E5:
    if (item != *(arg_06)) goto block_0391;

  block_01F8:
    if Item.isNpc(item) goto block_0235;

  block_0207:
    if (item != 1) goto block_0232;

  block_0215:
    n = item;

  block_0232:
    goto block_0391;

  block_0235:
    nT = Intrinsic0016(item);
    if (((((((((((((((((((((((((nT != 0x0194) && (nT != 0x04D0)) && (nT != 17)) && (nT != 0x04B1)) && (nT != 0x0476)) && (nT != 0x01C6)) && (nT != 0x018D)) && (nT != 0x0193)) && (nT != 0x01C7)) && (nT != 0x028A)) && (nT != 0x018C)) && (nT != 0x0192)) && (nT != 0x0288)) && (nT != 0x028B)) && (nT != 0x018B)) && (nT != 0x0191)) && (nT != 0x028C)) && (nT != 0x028D)) && (nT != 0x018A)) && (nT != 0x0190)) && (nT != 0x0287)) && (nT != 0x028E)) && (nT != 0x0187)) && (nT != 0x0189)) && (nT != 0x0289)) goto block_0391;

  block_0386:

  block_0391:
    /* loopnext  */
    goto block_01E2;

  block_0395:
    set_info(0x0220, 0);
    if (direction != 0) goto block_03B1;

  block_03AE:
    goto block_03BB;

  block_03B1:
    direction = (direction - 1);

  block_03BB:
    if (lowQuality < 16) goto block_03FB;

  block_03C9:
    /* global_address global_id=0x3C */
    spawn class_021E_slot_20(Item.getType(pid, lowQuality), direction, arg_06);
    suspend;
    goto block_0499;

  block_03FB:
    if (lowQuality != 16) goto block_0435;

  block_0403:
    /* global_address global_id=0x3C */
    spawn class_021E_slot_20(Item.getType(pid, 4), direction, arg_06);
    suspend;
    goto block_0499;

  block_0435:
    if (lowQuality != 17) goto block_0467;

  block_043D:
    spawn class_021E_slot_20(pid, 17, 10, direction, arg_06);
    suspend;
    goto block_0499;

  block_0467:
    if (lowQuality != 18) goto block_0499;

  block_046F:
    spawn class_021E_slot_20(pid, 18, 24, direction, arg_06);
    suspend;
    goto block_0499;

  block_0499:
    /* global_address global_id=0x3C */
    if Intrinsic0033() goto block_04D2;

  block_04A9:
    spawn class_0A0C_slot_32(pid, 5, 0x00000000);
    suspend;
    goto block_0499;

  block_04D2:
    class_0A0C_slot_33(0x0220, 0);

  block_04FA:
    return;

}
