// File: /workspace/github_c_makefile_star2_O3/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: ThrowDebris
void ThrowDebris (edict_t *self, char *modelname, float speed, vec3_t origin)
{
	edict_t	*chunk;
	vec3_t	v;

	chunk = G_Spawn();
	VectorCopy (origin, chunk->s.origin);
	gi.setmodel (chunk, modelname);
	v[0] = 100 * crandom();
	v[1] = 100 * crandom();
	v[2] = 100 + 100 * crandom();
	VectorMA (self->velocity, speed, v, chunk->velocity);
	chunk->movetype = MOVETYPE_BOUNCE;
	chunk->solid = SOLID_NOT;
	chunk->avelocity[0] = random()*600;
	chunk->avelocity[1] = random()*600;
	chunk->avelocity[2] = random()*600;
	chunk->think = G_FreeEdict;
	chunk->nextthink = level.time + 5 + random()*5;
	chunk->s.frame = 0;
	chunk->flags = 0;
	chunk->classname = "debris";
	chunk->takedamage = DAMAGE_YES;
	chunk->die = debris_die;
	gi.linkentity (chunk);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movss %xmm0, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %r14
callq 0x19700
movq %rax, %rbx
movss (%r15), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x4(%r15), %xmm0
movss %xmm0, 0x8(%rax)
movss 0x8(%r15), %xmm0
movss %xmm0, 0xc(%rax)
movq 0x34cb4(%rip), %r13     # 0x68600
movq %rax, %rdi
movq %r12, %rsi
callq *0x58(%r13)
callq 0x19a10
movl %eax, %ebp
callq 0x19a10
movd %ebp, %xmm0
movd %eax, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pand 0x23a1a(%rip), %xmm0    # 0x57390
cvtdq2ps %xmm0, %xmm0
divps 0x23a20(%rip), %xmm0    # 0x573a0
cvtps2pd %xmm0, %xmm0
addpd 0x23a25(%rip), %xmm0    # 0x573b0
addpd %xmm0, %xmm0
mulpd 0x23a29(%rip), %xmm0    # 0x573c0
cvtpd2ps %xmm0, %xmm0
leaq 0x8(%rsp), %r15
movlpd %xmm0, (%r15)
callq 0x19a10
movl $0x7fff, %ebp           # imm = 0x7FFF
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1f8c8(%rip), %xmm0    # 0x53288
cvtss2sd %xmm0, %xmm0
addsd 0x2224c(%rip), %xmm0    # 0x55c18
addsd %xmm0, %xmm0
movsd 0x23968(%rip), %xmm1    # 0x57340
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%r15)
movl $0x1c0, %edx            # imm = 0x1C0
addq %rdx, %r14
addq %rbx, %rdx
movq %r14, %rdi
movss 0x4(%rsp), %xmm0
movq %r15, %rsi
callq 0x19760
movl $0x9, 0x118(%rbx)
xorl %r14d, %r14d
movl %r14d, 0x108(%rbx)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1f858(%rip), %xmm0    # 0x53288
mulss 0x238fc(%rip), %xmm0    # 0x57334
movss %xmm0, 0x1cc(%rbx)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1f832(%rip), %xmm0    # 0x53288
mulss 0x238d6(%rip), %xmm0    # 0x57334
movss %xmm0, 0x1d0(%rbx)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1f80c(%rip), %xmm0    # 0x53288
mulss 0x238b0(%rip), %xmm0    # 0x57334
movss %xmm0, 0x1d4(%rbx)
movq 0x3499d(%rip), %rax     # 0x68430
movq %rax, 0x210(%rbx)
movq 0x352ff(%rip), %rax     # 0x68da0
movss 0x4(%rax), %xmm0
addss 0x1f45a(%rip), %xmm0    # 0x52f08
movss %xmm0, 0x4(%rsp)
callq 0x19a10
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x1f7be(%rip), %xmm0    # 0x53288
mulss 0x1f436(%rip), %xmm0    # 0x52f08
addss 0x4(%rsp), %xmm0
movss %xmm0, 0x200(%rbx)
movl %r14d, 0x38(%rbx)
movl %r14d, 0x11c(%rbx)
leaq 0x23a93(%rip), %rax     # 0x57585
movq %rax, 0x138(%rbx)
movl $0x1, 0x27c(%rbx)
movq 0x3523e(%rip), %rax     # 0x68d48
movq %rax, 0x238(%rbx)
movq %rbx, %rdi
callq *0x90(%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq