function wallgun_slot_47() /* entry=396 class_id=0x0A1A slot=0x47 */
{
  var
    referent, /* [BP+00h] type=0x69 */
    dir, /* [BP+0Ah] type=0x62 */
    x1, /* [BP-02h] type=0x69 */
    x2, /* [BP-04h] type=0x69 */
    y1, /* [BP-06h] type=0x69 */
    y2, /* [BP-08h] type=0x69 */
    z1, /* [BP-09h] type=0x62 */
    z2, /* [BP-0Ah] type=0x62 */
    ammo; /* [BP-0Ch] type=0x69 */

  entry:
    set_info(0x0001, *(arg_06));
    spawn class_0A0C_slot_32(pid, 1, 0x00000000);
    suspend;
    class_0A1A_slot_44(arg_06);
    ammo = retval;
    dir = (dir & 15);
    class_0A1A_slot_3E(dir, arg_06);
    x1 = retval;
    class_0A1A_slot_3F(dir, arg_06);
    y1 = retval;
    class_0A1A_slot_40(dir, arg_06);
    z1 = retval;
    if (ammo != 1) goto block_5A84;

  block_5A7A:

  block_5A84:
    if (ammo != 5) goto block_5A99;

  block_5A8F:

  block_5A99:
    class_0A1A_slot_29(arg_06);
    if retval goto block_5B2A;

  block_5AA9:
    class_0A1A_slot_41(dir, arg_06);
    x2 = retval;
    class_0A1A_slot_42(dir, arg_06);
    y2 = retval;
    class_0A1A_slot_43(dir, arg_06);
    z2 = retval;
    if (Intrinsic0016(arg_06) != 0x04C8) goto block_5B27;

  block_5B0E:

  block_5B27:
    goto block_5B43;

  block_5B2A:

  block_5B43:
    return;

}
