// File: /workspace/github_c_makefile_star2_O2/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 0x198d0
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 0x35896(%rip), %r13     # 0x66600
movq %rax, %rdi
movq %r12, %rsi
callq *0x58(%r13)
callq 0x19bf0
movl %eax, %ebp
callq 0x19bf0
movd %ebp, %xmm0
movd %eax, %xmm1
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
pand 0x225dc(%rip), %xmm0    # 0x53370
cvtdq2ps %xmm0, %xmm0
divps 0x225e2(%rip), %xmm0    # 0x53380
cvtps2pd %xmm0, %xmm0
addpd 0x225e7(%rip), %xmm0    # 0x53390
addpd %xmm0, %xmm0
mulpd 0x225eb(%rip), %xmm0    # 0x533a0
cvtpd2ps %xmm0, %xmm0
leaq 0x8(%rsp), %r15
movlpd %xmm0, (%r15)
callq 0x19bf0
movl $0x7fff, %ebp           # imm = 0x7FFF
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x1e4ad(%rip), %xmm0    # 0x4f288
cvtss2sd %xmm0, %xmm0
addsd 0x20e11(%rip), %xmm0    # 0x51bf8
addsd %xmm0, %xmm0
movsd 0x2252d(%rip), %xmm1    # 0x53320
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 0x19940
movl $0x9, 0x118(%rbx)
andl $0x0, 0x108(%rbx)
callq 0x19bf0
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x1e443(%rip), %xmm0    # 0x4f288
mulss 0x224c7(%rip), %xmm0    # 0x53314
movss %xmm0, 0x1cc(%rbx)
callq 0x19bf0
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x1e420(%rip), %xmm0    # 0x4f288
mulss 0x224a4(%rip), %xmm0    # 0x53314
movss %xmm0, 0x1d0(%rbx)
callq 0x19bf0
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x1e3fd(%rip), %xmm0    # 0x4f288
mulss 0x22481(%rip), %xmm0    # 0x53314
movss %xmm0, 0x1d4(%rbx)
movq 0x3558e(%rip), %rax     # 0x66430
movq %rax, 0x210(%rbx)
movq 0x35ef0(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
addss 0x1e047(%rip), %xmm0    # 0x4ef04
movss %xmm0, 0x4(%rsp)
callq 0x19bf0
andl %ebp, %eax
cvtsi2ss %eax, %xmm0
divss 0x1e3b2(%rip), %xmm0    # 0x4f288
mulss 0x1e026(%rip), %xmm0    # 0x4ef04
addss 0x4(%rsp), %xmm0
movss %xmm0, 0x200(%rbx)
andl $0x0, 0x38(%rbx)
andl $0x0, 0x11c(%rbx)
leaq 0x22667(%rip), %rax     # 0x53565
movq %rax, 0x138(%rbx)
movl $0x1, 0x27c(%rbx)
movq 0x35e32(%rip), %rax     # 0x66d48
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