// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
callq 0x19950
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x20(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0xc(%rax)
movq 0x428a2(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq *%rax
callq 0x19c80
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x30506(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x31696(%rip), %xmm1    # 0x71428
subsd %xmm1, %xmm0
movsd 0x32dfa(%rip), %xmm1    # 0x72b98
mulsd %xmm0, %xmm1
movsd 0x34416(%rip), %xmm0    # 0x741c0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
callq 0x19c80
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x304bb(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3164b(%rip), %xmm1    # 0x71428
subsd %xmm1, %xmm0
movsd 0x32daf(%rip), %xmm1    # 0x72b98
mulsd %xmm0, %xmm1
movsd 0x343cb(%rip), %xmm0    # 0x741c0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
callq 0x19c80
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x30470(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x31600(%rip), %xmm0    # 0x71428
subsd %xmm0, %xmm1
movsd 0x32d64(%rip), %xmm0    # 0x72b98
mulsd %xmm1, %xmm0
movsd 0x34380(%rip), %xmm1    # 0x741c0
mulsd %xmm1, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1c0, %rdi            # imm = 0x1C0
movss -0x14(%rbp), %xmm0
leaq -0x34(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq $0x1c0, %rdx            # imm = 0x1C0
callq 0x199c0
movq -0x28(%rbp), %rax
movl $0x9, 0x118(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x108(%rax)
callq 0x19c80
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x303e1(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
movss 0x34341(%rip), %xmm1    # 0x741f4
mulss %xmm1, %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x1cc(%rax)
callq 0x19c80
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x303af(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
movss 0x3430f(%rip), %xmm1    # 0x741f4
mulss %xmm1, %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x1d0(%rax)
callq 0x19c80
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x3037d(%rip), %xmm1    # 0x70288
divss %xmm1, %xmm0
movss 0x342dd(%rip), %xmm1    # 0x741f4
mulss %xmm1, %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x1d4(%rax)
movq -0x28(%rbp), %rax
movq 0x424fe(%rip), %rcx     # 0x82430
movq %rcx, 0x210(%rax)
movss 0x2ffc7(%rip), %xmm0    # 0x6ff08
movq 0x42e58(%rip), %rax     # 0x82da0
addss 0x4(%rax), %xmm0
movss %xmm0, -0x38(%rbp)
callq 0x19c80
movss -0x38(%rbp), %xmm1
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
movss 0x3031b(%rip), %xmm2    # 0x70288
divss %xmm2, %xmm0
movss 0x2ff8f(%rip), %xmm2    # 0x6ff08
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, 0x200(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x11c(%rax)
movq -0x28(%rbp), %rax
leaq 0x342c0(%rip), %rcx     # 0x74271
movq %rcx, 0x138(%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x27c(%rax)
movq -0x28(%rbp), %rax
movq 0x42d77(%rip), %rcx     # 0x82d48
movq %rcx, 0x238(%rax)
movq 0x42621(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x28(%rbp), %rdi
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)