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 */

  entry:
    set_info(0x021B, 0);
    door = ref;

  block_0A1C:
    if 1 goto block_0AAC;

  block_0A24:
    if ((Item.getStatus(door) & 0x1000) != 0) goto block_0A83;

  block_0A3A:
    spawn class_0A06_slot_21(pid, num, door);
    suspend;
    /* bit_not  */
    goto block_0AAC;

  block_0A80:
    goto block_0AA9;

  block_0A83:
    spawn class_0A0C_slot_32(pid, 10, 0x00000000);
    suspend;

  block_0AA9:
    goto block_0A1C;

  block_0AAC:
    return;

}
