// File: /workspace/github_c_makefile_star2_O0/QwazyWabbitWOS[P]lmctf60/g_misc.c
// Function: SP_misc_deadsoldier
void SP_misc_deadsoldier (edict_t *ent)
{
	if (deathmatch->value)
	{	// auto-remove for deathmatch
		G_FreeEdict (ent);
		return;
	}

	ent->movetype = MOVETYPE_NONE;
	ent->solid = SOLID_BBOX;
	ent->s.modelindex=gi.modelindex ("models/deadbods/dude/tris.md2");

	// Defaults to frame 0
	if (ent->spawnflags & 2)
		ent->s.frame = 1;
	else if (ent->spawnflags & 4)
		ent->s.frame = 2;
	else if (ent->spawnflags & 8)
		ent->s.frame = 3;
	else if (ent->spawnflags & 16)
		ent->s.frame = 4;
	else if (ent->spawnflags & 32)
		ent->s.frame = 5;
	else
		ent->s.frame = 0;

	VectorSet (ent->mins, -16, -16, 0);
	VectorSet (ent->maxs, 16, 16, 16);
	ent->deadflag = DEAD_DEAD;
	ent->takedamage = DAMAGE_YES;
	ent->svflags |= SVF_MONSTER|SVF_DEADMONSTER;
	ent->die = misc_deadsoldier_die;
	ent->monsterinfo.aiflags |= AI_GOOD_GUY;

	gi.linkentity (ent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x3f37d(%rip), %rax     # 0x82ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x43b57
jp 0x43b57
jmp 0x43b65
movq -0x8(%rbp), %rdi
callq 0x19cd0
jmp 0x43d2a
movq -0x8(%rbp), %rax
movl $0x0, 0x118(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x108(%rax)
leaq 0x308f3(%rip), %rdi     # 0x7447b
movq 0x3ea71(%rip), %rax     # 0x82600
callq *0x40(%rax)
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x43bbd
movq -0x8(%rbp), %rax
movl $0x1, 0x38(%rax)
jmp 0x43c4c
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x43bdc
movq -0x8(%rbp), %rax
movl $0x2, 0x38(%rax)
jmp 0x43c4a
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x43bfb
movq -0x8(%rbp), %rax
movl $0x3, 0x38(%rax)
jmp 0x43c48
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x43c1a
movq -0x8(%rbp), %rax
movl $0x4, 0x38(%rax)
jmp 0x43c46
movq -0x8(%rbp), %rax
movl 0x140(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x43c39
movq -0x8(%rbp), %rax
movl $0x5, 0x38(%rax)
jmp 0x43c44
movq -0x8(%rbp), %rax
movl $0x0, 0x38(%rax)
jmp 0x43c46
jmp 0x43c48
jmp 0x43c4a
jmp 0x43c4c
movq -0x8(%rbp), %rax
movss 0x2c830(%rip), %xmm0    # 0x70488
movss %xmm0, 0xcc(%rax)
movq -0x8(%rbp), %rax
movss 0x2c81c(%rip), %xmm0    # 0x70488
movss %xmm0, 0xd0(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xd4(%rax)
movq -0x8(%rbp), %rax
movss 0x30569(%rip), %xmm0    # 0x741f8
movss %xmm0, 0xd8(%rax)
movq -0x8(%rbp), %rax
movss 0x30555(%rip), %xmm0    # 0x741f8
movss %xmm0, 0xdc(%rax)
movq -0x8(%rbp), %rax
movss 0x30541(%rip), %xmm0    # 0x741f8
movss %xmm0, 0xe0(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x260(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x27c(%rax)
movq -0x8(%rbp), %rax
movl 0xc8(%rax), %ecx
orl $0x6, %ecx
movl %ecx, 0xc8(%rax)
movq -0x8(%rbp), %rax
movq 0x3ec4f(%rip), %rcx     # 0x82948
movq %rcx, 0x238(%rax)
movq -0x8(%rbp), %rax
movl 0x3c0(%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x3c0(%rax)
movq 0x3e8e3(%rip), %rax     # 0x82600
movq 0x90(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq