function trigger_slot_22() /* entry=394 class_id=0x0A18 slot=0x22 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    ref, /* [BP+0Ah] type=0x69 */
    num, /* [BP+0Ch] type=0x69 */
    door; /* [BP-02h] type=0x24 */

  set_info(0x021B, 0);
  door = ref;
  while (!(1)) {
    if ((Item.getStatus(door) & 0x1000) == 0) {
      spawn DOOR.slot_21(pid, num, door);
      suspend;
      /* bit_not  */
      return;
    }
    else {
      spawn FREE.waitNTimerTicks(pid, 10, 0x00000000);
      suspend;
    }
  }
  return;
}
