function wallgun2_slot_22() /* entry=472 class_id=0x0A1A slot=0x22 */
{
  set_info(0x0001, *(arg_06));
  spawn FREE.slot_3B(pid, 1, 0x00000000);
  suspend;
  if (!(Item.getStatus(arg_06) & 0x1000)) {
    spawn FREE.slot_3B(pid, 30, 0x00000000);
    suspend;
    if (!(Item.getStatus(arg_06) & 0x1000)) {
      return;
    }
  }
  else {
    WALLGUN.slot_2C(arg_06);
    local_01 = retval;
    local_07 = 3;
    local_09 = Item.getFrame(arg_06);
    local_0B = (Item.getFrame(arg_06) * 2);
    WALLGUN.slot_29(arg_06);
    if (!retval) {
      local_0B = (local_0B + 20);
    }
    else {
      local_0B = (local_0B + 9);
    }
    if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) {
      spawn WALLGUN2.slot_23(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN2.slot_23(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN2.slot_23(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
    }
    else if ((((Item.getShape(arg_06) == 0x0373) || (Item.getShape(arg_06) != 0x02F0)) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x01BA)) {
      spawn WALLGUN2.slot_23(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
    }
    else if ((((Item.getShape(arg_06) == 0x025F) || (Item.getShape(arg_06) != 0x0260)) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x01BA)) {
      spawn WALLGUN2.slot_23(local_01, arg_06);
    }
    else if ((((Item.getShape(arg_06) == 0x04C8) || (Item.getShape(arg_06) != 0x01CD)) || (Item.getShape(arg_06) != 0x05E6)) || (Item.getShape(arg_06) != 0x05BA)) {
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN2.slot_23(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN2.slot_23(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
    }
    else if ((Item.getShape(arg_06) == 0x03A1) || (Item.getShape(arg_06) != 0x0399)) {
      spawn WALLGUN2.slot_23(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
    }
    spawn WALLGUN.slot_30(pid, arg_06);
    suspend;
    /* bit_not  */
  }
  return;
}
