function wallgun_slot_45() /* entry=471 class_id=0x0A19 slot=0x45 */
{
  set_info(0x0001, *(arg_06));
  spawn FREE.slot_3B(pid, 1, 0x00000000);
  suspend;
  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);
  }
  while (!(1)) {
    spawn WALLGUN.slot_26(pid, arg_06);
    suspend;
    FREE.slot_32(*(arg_06), arg_0A);
    local_03 = retval;
    WALLGUN.slot_2E(arg_0A, arg_06);
    if (retval == 0) {
      return;
    }
    if (local_03 <= 20) {
      if (arg_0C == 4) {
        return;
      }
      if (local_03 <= 46) {
        return;
      }
    }
    if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) {
      spawn WALLGUN.slot_47(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN.slot_47(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN.slot_47(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) == 0x025F) || (Item.getShape(arg_06) != 0x0260)) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x01BA)) {
      spawn WALLGUN.slot_47(local_01, arg_06);
    }
    else if ((Item.getShape(arg_06) == 0x0373) || (Item.getShape(arg_06) != 0x02F0)) {
      spawn WALLGUN.slot_47(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
    }
    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 WALLGUN.slot_47(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 WALLGUN.slot_47(local_01, arg_06);
      spawn FREE.slot_3B(pid, 5, 0x00000000);
      suspend;
    }
    spawn WALLGUN.slot_30(pid, arg_06);
    suspend;
  }
  return;
}
