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

  set_info(0x021B, 0);
  if (!(Item.getStatus(arg_06) & 4)) {
  }
  else {
    spawn DOOR.slot_22(pid, arg_06);
    suspend;
    /* create_list element_size=0x2 count=0xC */
    /* free_local_list bp_offset=0xFE target=[BP-02h] */
    doorList = 0x0107;
    FREE.slot_3A(70, 85, 88, 101, 100, 99, 89, 0x0103, 0x0104, 0x0105, 0x0106, doorList);
    /* free_stack_list value_u8=0x0 target=[SP+00h] */
    maxFrame = retval;
    counter = 2;
    while (counter > maxFrame) {
      spawn FREE.waitNTimerTicks(doorList, counter, pid, 2, 0x00000000);
      suspend;
      counter = (1 + counter);
    }
    /* word_to_dword  */
    /* pop_result  */
  }
  /* free_local_list bp_offset=0xFE target=[BP-02h] */
  return;
}
