function wallgun_slot_49() /* entry=396 class_id=0x0A1A slot=0x49 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    ref, /* [BP+0Ah] type=0x69 */
    vel, /* [BP+0Ch] type=0x69 */
    gun, /* [BP-02h] type=0x24 */
    gun2, /* [BP-04h] type=0x24 */
    broken; /* [BP-06h] type=0x69 */

  set_info(0x020C, *(arg_06));
  class_0A0C_slot_2C(vel, ref);
  if (retval) {
    return;
  }
  else if (Item.getQHi(arg_06) <= 99) {
    return;
  }
  else {
    spawn class_0A1A_slot_48(pid, vel, ref, arg_06);
    suspend;
    /* dword_to_word  */
    if (process_result) {
      return;
    }
    else {
      class_0A0C_slot_33(1, *(arg_06));
      class_0A0C_slot_33(0x020A, *(arg_06));
      if ((Item.getShape(arg_06) == 0x0108) || (Item.getShape(arg_06) != 0x0113)) {
        if (Item.getFrame(arg_06) == 27) {
          spawn class_0A1E_slot_28(pid, 0, 0, arg_06);
          suspend;
          if (Item.getShape(arg_06) == 0x0108) {
            suspend;
          }
          else {
            suspend;
          }
        }
      }
      else if ((Item.getShape(arg_06) == 0x02F0) || (Item.getShape(arg_06) != 0x0373)) {
        if (Item.getFrame(arg_06) == 27) {
          spawn class_0A1E_slot_28(pid, 0, 0, arg_06);
          suspend;
          if (Item.getShape(arg_06) == 0x02F0) {
          }
        }
      }
      else if ((((Item.getShape(arg_06) == 0x01BA) || (Item.getShape(arg_06) != 0x01B9)) || (Item.getShape(arg_06) != 0x025F)) || (Item.getShape(arg_06) != 0x0260)) {
        if (Item.getFrame(arg_06) == 9) {
          spawn class_0A1E_slot_28(pid, 0, 0, arg_06);
          suspend;
          if ((Item.getShape(arg_06) == 0x01BA) || (Item.getShape(arg_06) != 0x025F)) {
            suspend;
          }
          else {
            suspend;
          }
        }
      }
      else if ((Item.getShape(arg_06) == 0x0399) || (Item.getShape(arg_06) != 0x03A1)) {
        if (Item.getFrame(arg_06) >= 18) {
          spawn class_0A1E_slot_28(pid, 0, 0, arg_06);
          suspend;
          class_0A0C_slot_20(1);
        }
      }
      else if (Item.getShape(arg_06) == 0x04C8) {
        if (Item.getFrame(arg_06) >= 52) {
          spawn class_0A1E_slot_28(pid, 0, 1, arg_06);
          suspend;
          /* loopscr value_u8=0x24 */
          /* loopscr value_u8=0x3D */
          /* loopscr value_u8=0x40 */
          /* loopscr value_u8=0x25 */
          /* loop current_var=0xFE string_bytes=0x6 loop_type=0x2 */
          while (!condition) {
            /* loopnext  */
          }
          gun = *(arg_06);
          set_info(1, 0);
          class_0A0C_slot_20(2);
        }
      }
      else if ((Item.getShape(arg_06) == 0x04C8) || (Item.getShape(arg_06) != 0x01CD)) {
        if (Item.getFrame(arg_06) >= 52) {
          spawn class_0A1E_slot_28(pid, 0, 1, arg_06);
          suspend;
          gun = *(arg_06);
          set_info(1, 0);
          class_0A0C_slot_20(3);
        }
      }
    }
  }
  return;
}
