function door3_slot_23() /* entry=378 class_id=0x0A08 slot=0x23 */
{
  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=0x4 */
    /* free_local_list bp_offset=0xFE target=[BP-02h] */
    doorList = 0x0368;
    /* create_list element_size=0x2 count=0x4 */
    /* free_local_list bp_offset=0xFC target=[BP-04h] */
    doorList2 = 0x0369;
    class_0A0C_slot_3A(0x0352, 0x0354, 0x0355, 0x0353, 0x0356, 0x0357, 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_0C19:
    if condition goto block_0C27;

  block_0C1C:
    door1 = item;
    /* loopnext  */
    goto block_0C19;

  block_0C27:
    /* 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_0C47:
    if condition goto block_0C55;

  block_0C4A:
    door2 = item;
    /* loopnext  */
    goto block_0C47;

  block_0C55:
    if (door1 && door2) goto block_0FC4;

  block_0C68:
    counter = 1;

  block_0C7C:
    if (counter <= (maxFrame - 1)) goto block_0FC4;

  block_0C8D:
    class_0A0C_slot_2D(Item.getZ(door1), Item.legal_create(door1), Intrinsic0013(door1), 0, doorList, (maxFrame - counter), list_element(size=0x2), door1);
    if (!retval) goto block_0CCF;

  block_0CC8:
    nonLegalDoor1 = 1;

  block_0CCF:
    if ((!bool) && (!nonLegalDoor1)) goto block_0D2E;

  block_0CDF:
    class_0A0C_slot_2D(Item.getZ(door2), (Item.legal_create(door2) + 16), Intrinsic0013(door2), 0, doorList2, (maxFrame - counter), list_element(size=0x2), door2);
    if (!retval) goto block_0D24;

  block_0D1D:
    nonLegalDoor2 = 1;

  block_0D24:
    bool = 1;
    goto block_0D73;

  block_0D2E:
    class_0A0C_slot_2D(Item.getZ(door2), (Item.legal_create(door2) + 16), Intrinsic0013(door2), 0, doorList2, (maxFrame - counter), list_element(size=0x2), door2);
    if (!retval) goto block_0D73;

  block_0D6C:
    nonLegalDoor2 = 1;

  block_0D73:
    if ((!nonLegalDoor1) && (!nonLegalDoor2)) goto block_0DC5;

  block_0D83:
    spawn class_0A0C_slot_32(pid, (5 + counter), 0x00000000);
    suspend;
    goto block_0FB7;

  block_0DC5:
    bool = 0;
    if nonLegalDoor2 goto block_0E06;

  block_0DEE:

  block_0E06:
    if ((nonLegalDoor1 != 1) && (nonLegalDoor2 != 0)) goto block_0E66;

  block_0E1A:

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

  block_0E73:
    if (counter2 <= (maxFrame - 1)) goto block_0F73;

  block_0E84:
    if (!bool) goto block_0EFA;

  block_0EAA:
    bool = 1;
    goto block_0F40;

  block_0EFA:

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

  block_0F73:
    /* word_to_dword  */
    /* pop_result  */
    goto block_0FFA;

  block_0FB7:
    counter = (1 + counter);
    goto block_0C7C;

  block_0FC4:
    set_info(1, 0);
    /* word_to_dword  */
    /* pop_result  */
    goto block_0FFA;

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

}
