// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_weapon.c
// Function: fire_bfg
void fire_bfg (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius)
{
	edict_t	*bfg;

	bfg = G_Spawn();
	VectorCopy (start, bfg->s.origin);
	VectorCopy (dir, bfg->movedir);
	vectoangles (dir, bfg->s.angles);
	VectorScale (dir, speed, bfg->velocity);
	bfg->movetype = MOVETYPE_FLYMISSILE;
	bfg->clipmask = MASK_SHOT;
	bfg->solid = SOLID_BBOX;
	bfg->s.effects |= EF_BFG | EF_ANIM_ALLFAST;
	VectorClear (bfg->mins);
	VectorClear (bfg->maxs);
	bfg->s.modelindex = gi.modelindex ("sprites/s_bfg1.sp2");
	bfg->owner = self;
	bfg->touch = bfg_touch;
	bfg->nextthink = level.time + 8000/speed;
	bfg->think = G_FreeEdict;
	bfg->radius_dmg = damage;
	bfg->dmg_radius = damage_radius;
	bfg->classname = "bfg blast";
	bfg->s.sound = gi.soundindex ("weapons/bfg__l1a.wav");

	bfg->think = bfg_think;
	bfg->nextthink = level.time + FRAMETIME;
	bfg->teammaster = bfg;
	bfg->teamchain = NULL;

	if (self->client)
		check_dodge (self, bfg->s.origin, dir, speed);

	gi.linkentity (bfg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %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)
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), %rax
movss (%rax), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x19c(%rax)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x1a0(%rax)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x1a4(%rax)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x10, %rsi
callq 0x192a0
movq -0x18(%rbp), %rdi
cvtsi2ssl -0x20(%rbp), %xmm0
movq -0x30(%rbp), %rsi
addq $0x1c0, %rsi            # imm = 0x1C0
callq 0x18a80
movq -0x30(%rbp), %rax
movl $0x8, 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 $0x2080, %ecx           # imm = 0x2080
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 0x21c11(%rip), %rdi     # 0x76352
movq 0x2deb8(%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
movq 0x2deca(%rip), %rcx     # 0x82638
movq %rcx, 0x220(%rax)
movq 0x2e624(%rip), %rax     # 0x82da0
movss 0x4(%rax), %xmm0
movl $0x1f40, %eax           # imm = 0x1F40
cltd
idivl -0x20(%rbp)
cvtsi2ss %eax, %xmm1
addss %xmm1, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x30(%rbp), %rax
movq 0x2dc87(%rip), %rcx     # 0x82430
movq %rcx, 0x210(%rax)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x284(%rax)
movss -0x24(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x288(%rax)
movq -0x30(%rbp), %rax
leaq 0x21b8c(%rip), %rcx     # 0x76365
movq %rcx, 0x138(%rax)
leaq 0x1c385(%rip), %rdi     # 0x70b6c
movq 0x2de12(%rip), %rax     # 0x82600
callq *0x48(%rax)
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x30(%rbp), %rax
movq 0x2e6eb(%rip), %rcx     # 0x82ef0
movq %rcx, 0x210(%rax)
movss 0x1ba80(%rip), %xmm0    # 0x70294
movq 0x2e585(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x30(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x2d0(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x2c8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x5486d
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %rdx
movl -0x20(%rbp), %ecx
callq 0x52800
movq 0x2dd8c(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x30(%rbp), %rdi
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nop
nopl (%rax,%rax)