function door2_slot_33() /* entry=377 class_id=0x0A07 slot=0x33 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    doorList, /* [BP-02h] type=0x6C */
    doorList2, /* [BP-04h] type=0x6C */
    counter, /* [BP-06h] type=0x69 */
    counter2, /* [BP-08h] type=0x69 */
    door1, /* [BP-0Ah] type=0x24 */
    door2, /* [BP-0Ch] type=0x24 */
    item, /* [BP-0Eh] type=0x24 */
    nonLegalDoor1, /* [BP-0Fh] type=0x62 */
    nonLegalDoor2, /* [BP-10h] type=0x62 */
    bool, /* [BP-11h] type=0x62 */
    maxFrame; /* [BP-13h] type=0x69 */

  entry:
    set_info(0x0207, *(arg_06));
    /* create_list element_size=0x2 count=0x5 */
    /* free_local_list bp_offset=0xFE target=[BP-02h] */
    doorList = 0x0289;
    /* create_list element_size=0x2 count=0x5 */
    /* free_local_list bp_offset=0xFC target=[BP-04h] */
    doorList2 = 0x028E;
    class_0A0C_slot_3A(0x01C7, 0x0288, 0x028C, 0x0287, 0x01C6, 0x028A, 0x028B, 0x028D, doorList);
    /* free_stack_list value_u8=0x0 target=[SP+00h] */
    maxFrame = retval;
    /* loopscr value_u8=0x24 */
    /* loopscr value_u8=0x3D */
    /* loopscr value_u8=0x40 */
    /* loopscr value_u8=0x25 */
    /* loop current_var=0xF2 string_bytes=0x6 loop_type=0x2 */

  block_21A2:
    if condition goto block_21B0;

  block_21A5:
    door1 = item;
    /* loopnext  */
    goto block_21A2;

  block_21B0:
    /* loopscr value_u8=0x24 */
    /* loopscr value_u8=0x3D */
    /* loopscr value_u8=0x40 */
    /* loopscr value_u8=0x25 */
    /* loop current_var=0xF2 string_bytes=0x6 loop_type=0x2 */

  block_21D0:
    if condition goto block_21DE;

  block_21D3:
    door2 = item;
    /* loopnext  */
    goto block_21D0;

  block_21DE:
    if (door1 && door2) goto block_24B5;

  block_21F1:
    counter = 1;

  block_2205:
    if (counter <= (maxFrame - 1)) goto block_24B5;

  block_2216:
    class_0A0C_slot_2D(Item.getZ(door2), Item.getY(door2), Item.getX(door2), 0, doorList2, (maxFrame - counter), list_element(size=0x2), door2);
    if (!retval) goto block_2258;

  block_2251:
    nonLegalDoor1 = 1;

  block_2258:
    class_0A0C_slot_2D(Item.getZ(door1), (Item.getY(door1) + 16), Item.getX(door1), 0, doorList, (maxFrame - counter), list_element(size=0x2), door1);
    if (!retval) goto block_229D;

  block_2296:
    nonLegalDoor2 = 1;

  block_229D:
    if ((!nonLegalDoor1) && (!nonLegalDoor2)) goto block_22EC;

  block_22AD:
    spawn class_0A0C_slot_32(pid, 5, 0x00000000);
    suspend;
    goto block_24A8;

  block_22EC:
    spawn class_0A0C_slot_32(pid, 30, 0x00000000);
    suspend;
    if nonLegalDoor1 goto block_2397;

  block_231A:

  block_2397:
    if nonLegalDoor2 goto block_23B7;

  block_239F:

  block_23B7:
    counter2 = ((maxFrame - counter) + 1);

  block_23C4:
    if (counter2 <= maxFrame) goto block_249E;

  block_23CF:
    if (!bool) goto block_2442;

  block_2412:
    bool = 1;
    goto block_246B;

  block_2442:

  block_246B:
    spawn class_0A0C_slot_32(pid, 10, 0x00000000);
    suspend;
    counter2 = (1 + counter2);
    goto block_23C4;

  block_249E:
    /* word_to_dword  */
    /* pop_result  */
    goto block_24BF;

  block_24A8:
    counter = (1 + counter);
    goto block_2205;

  block_24B5:
    /* word_to_dword  */
    /* pop_result  */
    goto block_24BF;

  block_24BF:
    /* free_local_list bp_offset=0xFE target=[BP-02h] */
    /* free_local_list bp_offset=0xFC target=[BP-04h] */
    return;

}
