function door_slot_21() /* entry=376 class_id=0x0A06 slot=0x21 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    num, /* [BP+0Ah] type=0x69 */
    doorType, /* [BP-02h] type=0x69 */
    ewall; /* [BP-04h] type=0x24 */

  set_info(0x0207, *(arg_06));
  spawn FREE.waitNTimerTicks(pid, 2, 0x00000000);
  suspend;
  doorType = Item.getShape(arg_06);
  if (doorType == 0x00A9) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_20(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      if (num == 1) {
        for ewall in nearby_items(shape=FORCEFIELD_NE, origin=arg_06) {
          if (Item.getQLo(ewall) == Item.getQLo(arg_06)) {
            spawn FREE.slot_31(pid, ewall, 0x00000000);
            suspend;
          }
          /* loopnext  */
        }
      }
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x00D0) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_21(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 70) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_22(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      if (num == 1) {
        for ewall in nearby_items(shape=FORCEFIELD_NW, origin=arg_06) {
          if (Item.getQLo(ewall) == Item.getQLo(arg_06)) {
            spawn FREE.slot_31(pid, ewall, 0x00000000);
            suspend;
          }
          /* loopnext  */
        }
      }
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0107) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_23(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x02D6) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_24(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x02DB) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_25(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x02D5) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_26(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x02DA) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_27(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 5) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_28(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      if (num == 1) {
        for ewall in nearby_items(shape=FORCEFIELD_NE, origin=arg_06) {
          if (Item.getQLo(ewall) == Item.getQLo(arg_06)) {
            spawn FREE.slot_31(pid, ewall, 0x00000000);
            suspend;
          }
          /* loopnext  */
        }
      }
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x00C2) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_29(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 123) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_2A(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      if (num == 1) {
        for ewall in nearby_items(shape=FORCEFIELD_NW, origin=arg_06) {
          if (Item.getQLo(ewall) == Item.getQLo(arg_06)) {
            spawn FREE.slot_31(pid, ewall, 0x00000000);
            suspend;
          }
          /* loopnext  */
        }
      }
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x00CB) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_2B(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x01AB) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_2C(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0215) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_2D(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0393) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_2E(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0394) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_2F(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0193) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_30(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0189) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_31(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x01C7) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_32(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0289) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_33(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x030A) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_20(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x036B) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_21(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x030B) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_22(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0368) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_23(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0095) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_24(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x030E) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_25(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0099) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_26(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0100) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_27(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x053D) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_28(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x053E) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_29(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x053B) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_2A(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x053C) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR3.slot_2B(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x01EE) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_34(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x01ED) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_35(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03AD) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_36(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03C7) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_37(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03B9) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_41(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03BD) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_42(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03BA) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_43(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03BE) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_44(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x046A) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_45(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x046C) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_46(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03C6) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_47(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x046B) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_48(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x028F) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_38(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0428) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_39(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0312) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3A(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0415) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3B(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x04D8) {
    spawn DOOR2.slot_3C(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03FF) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3D(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0440) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3E(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x03F8) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3F(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x043F) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_40(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 51) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3D(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x009C) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3E(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 108) {
    if (num == 2) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_3F(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else if (doorType == 0x0400) {
    if (num == 1) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    spawn DOOR2.slot_40(pid, arg_06);
    suspend;
    /* dword_to_word  */
    if (!process_result) {
      /* word_to_dword  */
      /* pop_result  */
      return;
    }
    return;
  }
  else {
    /* word_to_dword  */
    /* pop_result  */
    return;
  }
  return;
}
