// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_weapon.c
// Function: fire_grenade
void fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius)
{
	edict_t	*grenade;
	vec3_t	dir;
	vec3_t	forward, right, up;

	vectoangles (aimdir, dir);
	AngleVectors (dir, forward, right, up);

	grenade = G_Spawn();
	VectorCopy (start, grenade->s.origin);
	VectorScale (aimdir, speed, grenade->velocity);
	VectorMA (grenade->velocity, 200 + crandom() * 10.0, up, grenade->velocity);
	VectorMA (grenade->velocity, crandom() * 10.0, right, grenade->velocity);
	VectorSet (grenade->avelocity, 300, 300, 300);
	grenade->movetype = MOVETYPE_BOUNCE;
	grenade->clipmask = MASK_SHOT;
	grenade->solid = SOLID_BBOX;
	grenade->s.effects |= EF_GRENADE;
	VectorClear (grenade->mins);
	VectorClear (grenade->maxs);
	grenade->s.modelindex = gi.modelindex ("models/objects/grenade/tris.md2");
	grenade->owner = self;
	grenade->touch = Grenade_Touch;
	grenade->nextthink = level.time + timer;
	grenade->think = Grenade_Explode;
	grenade->dmg = damage;
	grenade->dmg_radius = damage_radius;
	grenade->classname = "grenade";

	gi.linkentity (grenade);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movss %xmm0, -0x24(%rbp)
movss %xmm1, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x192a0
leaq -0x3c(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x54(%rbp), %rdx
leaq -0x60(%rbp), %rcx
callq 0x183e0
callq 0x19950
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq -0x18(%rbp), %rdi
cvtsi2ssl -0x20(%rbp), %xmm0
movq -0x30(%rbp), %rsi
addq $0x1c0, %rsi            # imm = 0x1C0
callq 0x18a80
movq -0x30(%rbp), %rax
addq $0x1c0, %rax            # imm = 0x1C0
movq %rax, -0x70(%rbp)
callq 0x19c80
movq -0x70(%rbp), %rdi
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x1d942(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x1ead2(%rip), %xmm0    # 0x71428
subsd %xmm0, %xmm1
movsd 0x20236(%rip), %xmm0    # 0x72b98
mulsd %xmm1, %xmm0
movsd 0x238ea(%rip), %xmm1    # 0x76258
mulsd %xmm1, %xmm0
movsd 0x2184e(%rip), %xmm1    # 0x741c8
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
leaq -0x60(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x1c0, %rdx            # imm = 0x1C0
callq 0x199c0
movq -0x30(%rbp), %rax
addq $0x1c0, %rax            # imm = 0x1C0
movq %rax, -0x68(%rbp)
callq 0x19c80
movq -0x68(%rbp), %rdi
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x1d8ca(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x1ea5a(%rip), %xmm0    # 0x71428
subsd %xmm0, %xmm1
movsd 0x201be(%rip), %xmm0    # 0x72b98
mulsd %xmm1, %xmm0
movsd 0x23872(%rip), %xmm1    # 0x76258
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
leaq -0x54(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x1c0, %rdx            # imm = 0x1C0
callq 0x199c0
movq -0x30(%rbp), %rax
movss 0x1da76(%rip), %xmm0    # 0x70484
movss %xmm0, 0x1cc(%rax)
movq -0x30(%rbp), %rax
movss 0x1da62(%rip), %xmm0    # 0x70484
movss %xmm0, 0x1d0(%rax)
movq -0x30(%rbp), %rax
movss 0x1da4e(%rip), %xmm0    # 0x70484
movss %xmm0, 0x1d4(%rax)
movq -0x30(%rbp), %rax
movl $0x9, 0x118(%rax)
movq -0x30(%rbp), %rax
movl $0x6000003, 0x10c(%rax) # imm = 0x6000003
movq -0x30(%rbp), %rax
movl $0x2, 0x108(%rax)
movq -0x30(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x40(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xd4(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xd0(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xcc(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xe0(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xdc(%rax)
movq -0x30(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xd8(%rax)
leaq 0x237ad(%rip), %rdi     # 0x76283
movq 0x2fb23(%rip), %rax     # 0x82600
callq *0x40(%rax)
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x30(%rbp), %rax
leaq 0x8d(%rip), %rcx        # 0x52b90
movq %rcx, 0x220(%rax)
movq 0x3028f(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
addss -0x24(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x30(%rbp), %rax
leaq 0x1fe(%rip), %rcx       # 0x52d30
movq %rcx, 0x210(%rax)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x280(%rax)
movss -0x28(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x288(%rax)
movq -0x30(%rbp), %rax
leaq 0x24107(%rip), %rcx     # 0x76c69
movq %rcx, 0x138(%rax)
movq 0x2fa90(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x30(%rbp), %rdi
callq *%rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)