function door2_slot_21() /* entry=377 class_id=0x0A07 slot=0x21 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    doorList, /* [BP-02h] type=0x6C */
    counter, /* [BP-04h] type=0x69 */
    maxFrame; /* [BP-06h] type=0x69 */

  entry:
    set_info(0x021B, 0);
    if (Item.getStatus(arg_06) & 4) goto block_0370;

  block_036A:
    goto block_052A;

  block_0370:
    /* create_list element_size=0x2 count=0xC */
    /* free_local_list bp_offset=0xFE target=[BP-02h] */
    doorList = 0x00D0;
    FREE.slot_3A(0x00A9, 0x00AB, 0x00AC, 0x00AF, 0x00B2, 0x00B3, 0x00B4, 0x00B6, 0x00B7, 0x00B8, 0x00B9, doorList);
    /* free_stack_list value_u8=0x0 target=[SP+00h] */
    maxFrame = retval;
    counter = (maxFrame - 1);

  block_03D3:
    if (counter != 0) goto block_0520;

  block_03DB:
    FREE.slot_2D((Item.getZ(arg_06) - 8), Item.getY(arg_06), Item.getX(arg_06), Item.getFrame(arg_06), doorList, counter, list_element(size=0x2), *(arg_06));
    if retval goto block_0444;

  block_041B:
    spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
    suspend;
    goto block_0510;

  block_0444:
    counter = (1 + counter);
    counter = (1 + counter);

  block_0472:
    if (counter < (maxFrame + 1)) goto block_0506;

  block_0483:
    spawn FREE.waitNTimerTicks(doorList, counter, pid, 5, 0x00000000);
    suspend;
    counter = (1 + counter);
    /* word_to_dword  */
    /* pop_result  */
    goto block_052A;

  block_0503:
    goto block_0472;

  block_0506:
    /* word_to_dword  */
    /* pop_result  */
    goto block_052A;

  block_0510:
    counter = (counter - 1);
    goto block_03D3;

  block_0520:
    /* word_to_dword  */
    /* pop_result  */
    goto block_052A;

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

}
