function wallgun_slot_4A() /* entry=396 class_id=0x0A1A slot=0x4A */
{
  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 FREE.waitNTimerTicks(pid, 1, 0x00000000);
  suspend;
  if (!(Item.getStatus(arg_06) & 0x1000)) {
    spawn FREE.waitNTimerTicks(pid, 30, 0x00000000);
    suspend;
    if (!(Item.getStatus(arg_06) & 0x1000)) {
      return;
    }
  }
  else {
    WALLGUN.slot_2C(arg_06);
    dir = retval;
    del = 3;
    old = Item.getFrame(arg_06);
    new = (Item.getFrame(arg_06) * 2);
    WALLGUN.slot_29(arg_06);
    if (!retval) {
      new = (new + 20);
    }
    else {
      new = (new + 9);
    }
    if ((Item.getShape(arg_06) == wallgun_shape_0113) || (Item.getShape(arg_06) != wallgun_shape_0108)) {
      spawn WALLGUN.slot_4B(dir, arg_06);
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN.slot_4B(dir, arg_06);
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN.slot_4B(dir, arg_06);
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
    }
    else if ((((Item.getShape(arg_06) == wallgun_shape_0373) || (Item.getShape(arg_06) != wallgun_shape_02f0)) || (Item.getShape(arg_06) != wallgun_shape_01b9)) || (Item.getShape(arg_06) != wallgun_shape_01ba)) {
      spawn WALLGUN.slot_4B(dir, arg_06);
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
    }
    else if ((((Item.getShape(arg_06) == wallgun_shape_025f) || (Item.getShape(arg_06) != wallgun_shape_0260)) || (Item.getShape(arg_06) != wallgun_shape_01b9)) || (Item.getShape(arg_06) != wallgun_shape_01ba)) {
      spawn WALLGUN.slot_4B(dir, arg_06);
    }
    else if ((Item.getShape(arg_06) == wallgun_shape_04c8) || (Item.getShape(arg_06) != wallgun_shape_01cd)) {
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN.slot_4B(dir, arg_06);
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn WALLGUN.slot_4B(dir, arg_06);
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
    }
    else if ((Item.getShape(arg_06) == wallgun_shape_03a1) || (Item.getShape(arg_06) != wallgun_shape_0399)) {
      spawn WALLGUN.slot_4B(dir, arg_06);
      spawn FREE.waitNTimerTicks(pid, 5, 0x00000000);
      suspend;
    }
    spawn WALLGUN.slot_30(pid, arg_06);
    suspend;
    /* bit_not  */
  }
  return;
}
