function wallgun_slot_46() /* entry=396 class_id=0x0A1A slot=0x46 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    target, /* [BP+0Ah] type=0x69 */
    dir, /* [BP-01h] type=0x62 */
    dist, /* [BP-03h] type=0x69 */
    t, /* [BP-05h] type=0x69 */
    del, /* [BP-07h] type=0x69 */
    old, /* [BP-09h] type=0x69 */
    new; /* [BP-0Bh] type=0x69 */

  set_info(0x0001, *(arg_06));
  spawn class_0A0C_slot_32(pid, 1, 0x00000000);
  suspend;
  if (!(Item.getStatus(arg_06) & 0x1000)) {
    spawn class_0A0C_slot_32(pid, 30, 0x00000000);
    suspend;
    if (!(Item.getStatus(arg_06) & 0x1000)) {
      return;
    }
  }
  else {
    class_0A1A_slot_2C(arg_06);
    dir = retval;
    del = 3;
    old = Item.getFrame(arg_06);
    new = (Item.getFrame(arg_06) * 2);
    class_0A1A_slot_29(arg_06);
    if (!retval) {
      new = (new + 20);
    }
    else {
      new = (new + 9);
    }
    if ((Item.getShape(arg_06) == 0x0113) || (Item.getShape(arg_06) != 0x0108)) {
      spawn class_0A1A_slot_47(dir, arg_06);
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A1A_slot_47(dir, arg_06);
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A1A_slot_47(dir, arg_06);
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A0C_slot_32(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 class_0A1A_slot_47(dir, arg_06);
      spawn class_0A0C_slot_32(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 class_0A1A_slot_47(dir, arg_06);
    }
    else if ((Item.getShape(arg_06) == 0x04C8) || (Item.getShape(arg_06) != 0x01CD)) {
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A1A_slot_47(dir, arg_06);
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A1A_slot_47(dir, arg_06);
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
    }
    else if ((Item.getShape(arg_06) == 0x03A1) || (Item.getShape(arg_06) != 0x0399)) {
      spawn class_0A1A_slot_47(dir, arg_06);
      spawn class_0A0C_slot_32(pid, 5, 0x00000000);
      suspend;
    }
    spawn class_0A1A_slot_30(pid, arg_06);
    suspend;
    /* bit_not  */
  }
  return;
}
