// File: /workspace/github_c_makefile_star2_O1/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, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %r14
callq 0x19710
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 0x35727(%rip), %r13     # 0x69600
movq %rax, %rdi
movq %r12, %rsi
callq *0x58(%r13)
callq 0x19a20
movl $0x7fff, %ebp           # imm = 0x7FFF
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2038a(%rip), %xmm0    # 0x54288
cvtss2sd %xmm0, %xmm0
addsd 0x22ca6(%rip), %xmm0    # 0x56bb0
addsd %xmm0, %xmm0
mulsd 0x24332(%rip), %xmm0    # 0x58248
cvtsd2ss %xmm0, %xmm0
leaq 0xc(%rsp), %r15
movss %xmm0, (%r15)
callq 0x19a20
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2034e(%rip), %xmm0    # 0x54288
cvtss2sd %xmm0, %xmm0
addsd 0x22c6a(%rip), %xmm0    # 0x56bb0
addsd %xmm0, %xmm0
mulsd 0x242f6(%rip), %xmm0    # 0x58248
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4(%r15)
callq 0x19a20
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x20316(%rip), %xmm0    # 0x54288
cvtss2sd %xmm0, %xmm0
addsd 0x22c32(%rip), %xmm0    # 0x56bb0
addsd %xmm0, %xmm0
movsd 0x242be(%rip), %xmm1    # 0x58248
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 0x8(%rsp), %xmm0
movq %r15, %rsi
callq 0x19770
movl $0x9, 0x118(%rbx)
xorl %r14d, %r14d
movl %r14d, 0x108(%rbx)
callq 0x19a20
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x202a6(%rip), %xmm0    # 0x54288
mulss 0x24252(%rip), %xmm0    # 0x5823c
movss %xmm0, 0x1cc(%rbx)
callq 0x19a20
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x20280(%rip), %xmm0    # 0x54288
mulss 0x2422c(%rip), %xmm0    # 0x5823c
movss %xmm0, 0x1d0(%rbx)
callq 0x19a20
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2025a(%rip), %xmm0    # 0x54288
mulss 0x24206(%rip), %xmm0    # 0x5823c
movss %xmm0, 0x1d4(%rbx)
movq 0x353eb(%rip), %rax     # 0x69430
movq %rax, 0x210(%rbx)
movq 0x35d4d(%rip), %rax     # 0x69da0
movss 0x4(%rax), %xmm0
addss 0x1fea4(%rip), %xmm0    # 0x53f04
movss %xmm0, 0x8(%rsp)
callq 0x19a20
andl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x2020c(%rip), %xmm0    # 0x54288
mulss 0x1fe80(%rip), %xmm0    # 0x53f04
addss 0x8(%rsp), %xmm0
movss %xmm0, 0x200(%rbx)
movl %r14d, 0x38(%rbx)
movl %r14d, 0x11c(%rbx)
leaq 0x242d1(%rip), %rax     # 0x58375
movq %rax, 0x138(%rbx)
movl $0x1, 0x27c(%rbx)
movq 0x35c8c(%rip), %rax     # 0x69d48
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