// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: ThrowClientHead
void ThrowClientHead (edict_t *self, int damage)
{
	vec3_t	vd;
	char	*gibname;

	if (rand()&1)
	{
		gibname = "models/objects/gibs/head2/tris.md2";
		self->s.skinnum = 1;		// second skin is player
	}
	else
	{
		gibname = "models/objects/gibs/skull/tris.md2";
		self->s.skinnum = 0;
	}

	self->s.origin[2] += 32;
	self->s.frame = 0;
	gi.setmodel (self, gibname);
	VectorSet (self->mins, -16, -16, 0);
	VectorSet (self->maxs, 16, 16, 16);

	self->takedamage = DAMAGE_NO;
	self->solid = SOLID_NOT;
	self->s.effects = EF_GIB;
	self->s.sound = 0;
	self->flags |= FL_NO_KNOCKBACK;

	self->movetype = MOVETYPE_BOUNCE;
	VelocityForDamage (damage, vd);
	VectorAdd (self->velocity, vd, self->velocity);

	if (self->client)	// bodies in the queue don't have a client anymore
	{
		self->client->anim_priority = ANIM_DEATH;
		self->client->anim_end = self->s.frame;
	}
	else
	{
		self->think = NULL;
		self->nextthink = 0;
	}

	gi.linkentity (self);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
callq 0x19c80
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3fae4
leaq 0x34758(%rip), %rax     # 0x7422b
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0x3c(%rax)
jmp 0x3fafa
leaq 0x34763(%rip), %rax     # 0x7424e
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movss 0x3096e(%rip), %xmm0    # 0x70474
addss 0xc(%rax), %xmm0
movss %xmm0, 0xc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x38(%rax)
movq 0x42ade(%rip), %rax     # 0x82600
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movss 0x3094c(%rip), %xmm0    # 0x70488
movss %xmm0, 0xcc(%rax)
movq -0x8(%rbp), %rax
movss 0x30938(%rip), %xmm0    # 0x70488
movss %xmm0, 0xd0(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xd4(%rax)
movq -0x8(%rbp), %rax
movss 0x34685(%rip), %xmm0    # 0x741f8
movss %xmm0, 0xd8(%rax)
movq -0x8(%rbp), %rax
movss 0x34671(%rip), %xmm0    # 0x741f8
movss %xmm0, 0xdc(%rax)
movq -0x8(%rbp), %rax
movss 0x3465d(%rip), %xmm0    # 0x741f8
movss %xmm0, 0xe0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x27c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x108(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x8(%rbp), %rax
movl 0x11c(%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x11c(%rax)
movq -0x8(%rbp), %rax
movl $0x9, 0x118(%rax)
movl -0xc(%rbp), %edi
leaq -0x18(%rbp), %rsi
callq 0x19840
movq -0x8(%rbp), %rax
movss 0x1c0(%rax), %xmm0
addss -0x18(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1c0(%rax)
movq -0x8(%rbp), %rax
movss 0x1c4(%rax), %xmm0
addss -0x14(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1c4(%rax)
movq -0x8(%rbp), %rax
movss 0x1c8(%rax), %xmm0
addss -0x10(%rbp), %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x1c8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x3fc90
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl $0x5, 0xef8(%rax)
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movl %ecx, 0xef4(%rax)
jmp 0x3fcae
movq -0x8(%rbp), %rax
movq $0x0, 0x210(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x200(%rax)
movq 0x4294b(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)