LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_Find
edict_t *G_Find (edict_t *from, int fieldofs, char *match)
{
	char	*s;

	if (!from)
		from = g_edicts;
	else
		from++;

	for ( ; from < &g_edicts[globals.num_edicts] ; from++)
	{
		if (!from->inuse)
			continue;
		s = *(char **) ((byte *)from + fieldofs);
		if (!s)
			continue;
		if (!Q_stricmp (s, match))
			return from;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
leaq 0x4a8(%rdi), %rbx
testq %rdi, %rdi
movq 0x2b82f(%rip), %r15     # 0x66558
movq (%r15), %rax
cmoveq %rax, %rbx
movslq %esi, %r12
movq 0x2bdce(%rip), %r13     # 0x66b08
movl 0x8c(%r13), %ecx
movslq %ecx, %rdx
imulq $0x4a8, %rdx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jae 0x3ad81
cmpl $0x0, 0x60(%rbx)
je 0x3ad78
movq (%rbx,%r12), %rdi
testq %rdi, %rdi
je 0x3ad78
movq %r14, %rsi
callq 0x186d0
testl %eax, %eax
je 0x3ad83
movq (%r15), %rax
movl 0x8c(%r13), %ecx
addq $0x4a8, %rbx            # imm = 0x4A8
jmp 0x3ad41
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: findradius
edict_t *findradius (edict_t *from, vec3_t org, float rad)
{
	vec3_t	eorg;
	int		j;

	if (!from)
		from = g_edicts;
	else
		from++;
	for ( ; from < &g_edicts[globals.num_edicts]; from++)
	{
		if (!from->inuse)
			continue;
		if (from->solid == SOLID_NOT)
			continue;
		for (j=0 ; j<3 ; j++)
			eorg[j] = org[j] - (from->s.origin[j] + (from->mins[j] + from->maxs[j])*0.5f);
		if (VectorLength(eorg) > rad)
			continue;
		return from;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movss %xmm0, (%rsp)
movq %rsi, %r14
leaq 0x4a8(%rdi), %rbx
testq %rdi, %rdi
movq 0x2b7a2(%rip), %r12     # 0x66558
movq (%r12), %rax
cmoveq %rax, %rbx
movq 0x2bd43(%rip), %r13     # 0x66b08
movl 0x8c(%r13), %ecx
leaq 0x4(%rsp), %r15
movss 0x15627(%rip), %xmm2    # 0x50400
movslq %ecx, %rdx
imulq $0x4a8, %rdx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jae 0x3ae60
cmpl $0x0, 0x60(%rbx)
je 0x3ae54
cmpl $0x0, 0x108(%rbx)
je 0x3ae54
xorl %eax, %eax
cmpq $0x3, %rax
je 0x3ae33
movss 0xcc(%rbx,%rax,4), %xmm0
addss 0xd8(%rbx,%rax,4), %xmm0
mulss %xmm2, %xmm0
addss 0x4(%rbx,%rax,4), %xmm0
movss (%r14,%rax,4), %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x4(%rsp,%rax,4)
incq %rax
jmp 0x3adfc
movq %r15, %rdi
callq 0x19460
ucomiss (%rsp), %xmm0
jbe 0x3ae62
movq (%r12), %rax
movl 0x8c(%r13), %ecx
movss 0x155ac(%rip), %xmm2    # 0x50400
addq $0x4a8, %rbx            # imm = 0x4A8
jmp 0x3add9
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: findallradius
edict_t *findallradius (edict_t *from, vec3_t org, float rad)
{
	vec3_t	eorg;
	int		j;

	if (!from)
		from = g_edicts;
	else
		from++;
	for ( ; from < &g_edicts[globals.num_edicts]; from++)
	{
		if (!from->inuse)
			continue;
		for (j=0 ; j<3 ; j++)
			eorg[j] = org[j] - (from->s.origin[j] + (from->mins[j] + from->maxs[j])*0.5f);
		if (VectorLength(eorg) > rad)
			continue;
		return from;
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movss %xmm0, (%rsp)
movq %rsi, %r14
leaq 0x4a8(%rdi), %rbx
testq %rdi, %rdi
movq 0x2b6bf(%rip), %r12     # 0x66558
movq (%r12), %rax
cmoveq %rax, %rbx
movq 0x2bc60(%rip), %r13     # 0x66b08
movl 0x8c(%r13), %ecx
leaq 0x4(%rsp), %r15
movss 0x15544(%rip), %xmm2    # 0x50400
movslq %ecx, %rdx
imulq $0x4a8, %rdx, %rdx      # imm = 0x4A8
addq %rax, %rdx
cmpq %rdx, %rbx
jae 0x3af37
cmpl $0x0, 0x60(%rbx)
je 0x3af2e
xorl %eax, %eax
cmpq $0x3, %rax
je 0x3af0d
movss 0xcc(%rbx,%rax,4), %xmm0
addss 0xd8(%rbx,%rax,4), %xmm0
mulss %xmm2, %xmm0
addss 0x4(%rbx,%rax,4), %xmm0
movss (%r14,%rax,4), %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x4(%rsp,%rax,4)
incq %rax
jmp 0x3aed6
movq %r15, %rdi
callq 0x19460
ucomiss (%rsp), %xmm0
jbe 0x3af39
movq (%r12), %rax
movl 0x8c(%r13), %ecx
movss 0x154d2(%rip), %xmm2    # 0x50400
addq $0x4a8, %rbx            # imm = 0x4A8
jmp 0x3aebc
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_PickTarget
edict_t *G_PickTarget (char *targetname)
{
	edict_t	*ent = NULL;
	int		num_choices = 0;
	edict_t	*choice[MAXCHOICES];

	if (!targetname)
	{
		gi.dprintf("G_PickTarget called with NULL targetname\n");
		return NULL;
	}

	while(1)
	{
		ent = G_Find (ent, FOFS(targetname), targetname);
		if (!ent)
			break;
		choice[num_choices++] = ent;
		if (num_choices == MAXCHOICES)
			break;
	}

	if (!num_choices)
	{
		gi.dprintf("G_PickTarget: target %s not found\n", targetname);
		return NULL;
	}

	return choice[rand() % num_choices];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
testq %rdi, %rdi
je 0x3af86
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x8
popq %rbp
xorl %eax, %eax
movq %rax, %rdi
movl $0x158, %esi            # imm = 0x158
movq %rbx, %rdx
callq 0x195e0
testq %rax, %rax
je 0x3af9e
movq %rax, (%rsp,%r14,8)
incq %r14
cmpq $0x8, %r14
jne 0x3af62
jmp 0x3afa6
movq 0x2b673(%rip), %rcx     # 0x66600
leaq 0x1a49c(%rip), %rdi     # 0x55430
xorl %r14d, %r14d
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x3afb5
testq %r14, %r14
je 0x3afc1
movl %r14d, %ebp
callq 0x19bf0
cltd
idivl %ebp
movslq %edx, %rax
movq (%rsp,%rax,8), %r14
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x2b638(%rip), %rcx     # 0x66600
leaq 0x1a48b(%rip), %rdi     # 0x5545a
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x3afb5
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_FreeEdict
void G_FreeEdict (edict_t *ed)
{
	gi.unlinkentity (ed);		// unlink from world

	// LM_JORM -- REMOVE later
/*	
	if (!strcmp(ed->classname, "flag") ||
		!strcmp(ed->classname, "damage_rune") ||
		!strcmp(ed->classname, "haste_rune") ||
		!strcmp(ed->classname, "resist_rune") ||
		!strcmp(ed->classname, "regen_rune"))
		assert(false);
*/
	// LM_JORM END
	if ((ed - g_edicts) <= (maxclients->value + BODY_QUEUE_SIZE))
	{
//		gi.dprintf("tried to free special edict\n");
		return;
	}

	memset (ed, 0, sizeof(*ed));
	ed->classname = "freed";
	ed->freetime = level.time;
	ed->inuse = false;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x2b3b8(%rip), %rax     # 0x66600
callq *0x98(%rax)
movq 0x2b303(%rip), %rcx     # 0x66558
movq %rbx, %rax
subq (%rcx), %rax
movl $0x4a8, %ecx            # imm = 0x4A8
cqto
idivq %rcx
cvtsi2ss %rax, %xmm0
movq 0x2b2bf(%rip), %rax     # 0x66530
movq (%rax), %rax
movss 0x20(%rax), %xmm1
addss 0x13c77(%rip), %xmm1    # 0x4eef8
ucomiss %xmm0, %xmm1
jae 0x3b2b7
movl $0x4a8, %edx            # imm = 0x4A8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x188e0
leaq 0x1a2a9(%rip), %rax     # 0x55545
movq %rax, 0x138(%rbx)
movq 0x2baf6(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
movss %xmm0, 0x128(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_Spawn
edict_t *G_Spawn (void)
{
	int			i;
	edict_t		*e;

	e = &g_edicts[(int)maxclients->value+1];
	for ( i=maxclients->value+1 ; i<globals.num_edicts ; i++, e++)
	{
		// the first couple seconds of server time can involve a lot of
		// freeing and allocating, so relax the replacement policy
		if (!e->inuse && ( e->freetime < 2 || level.time - e->freetime > 0.5f ) )
		{
			G_InitEdict (e);
			return e;
		}
	}
	
	if (i == game.maxentities)
		gi.error ("ED_Alloc: no free edicts");
		
	globals.num_edicts++;
	G_InitEdict (e);
	return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x2b290(%rip), %r15     # 0x66558
movq 0x2b261(%rip), %rax     # 0x66530
movq (%rax), %rax
movss 0x20(%rax), %xmm0
cvttss2si %xmm0, %eax
movslq %eax, %rsi
addss 0x13c42(%rip), %xmm0    # 0x4ef28
cvttss2si %xmm0, %ecx
movq 0x2b817(%rip), %r12     # 0x66b08
movl 0x8c(%r12), %eax
movq 0x2baa0(%rip), %rdx     # 0x66da0
movss 0x4(%rdx), %xmm0
cmpl %eax, %ecx
movl %eax, %edx
cmovgl %ecx, %edx
imulq $0x4a8, %rsi, %rbx      # imm = 0x4A8
addq (%r15), %rbx
movl $0x4a8, %esi            # imm = 0x4A8
addq %rsi, %rbx
movss 0x14146(%rip), %xmm1    # 0x4f46c
movss 0x150d2(%rip), %xmm2    # 0x50400
movq %rbx, %r14
cmpl %eax, %ecx
jge 0x3b360
cmpl $0x0, 0x60(%r14)
jne 0x3b356
movss 0x128(%r14), %xmm3
ucomiss %xmm3, %xmm1
ja 0x3b394
movaps %xmm0, %xmm4
subss %xmm3, %xmm4
ucomiss %xmm2, %xmm4
ja 0x3b394
incl %ecx
addq %rsi, %r14
addq %rsi, %rbx
jmp 0x3b331
movq 0x2b9d9(%rip), %rcx     # 0x66d40
cmpl 0x614(%rcx), %edx
jne 0x3b38a
movq 0x2b28a(%rip), %rcx     # 0x66600
leaq 0x1a1af(%rip), %rdi     # 0x5552c
xorl %eax, %eax
callq *0x38(%rcx)
movl 0x8c(%r12), %eax
incl %eax
movl %eax, 0x8c(%r12)
movl $0x1, 0x60(%r14)
leaq 0x1a181(%rip), %rax     # 0x55524
movq %rax, 0x138(%r14)
movl $0x3f800000, 0x1e0(%r14) # imm = 0x3F800000
subq (%r15), %rbx
movl $0x4a8, %ecx            # imm = 0x4A8
movq %rbx, %rax
cqto
idivq %rcx
movl %eax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: vtos
char	*vtos (vec3_t v)
{
	static	int		index;
	static	char	str[8][32];
	char	*s;

	// use an array so that multiple vtos won't collide
	s = str[index];
	index = (index + 1)&7;

	Com_sprintf (s, 32, "(%i %i %i)", (int)v[0], (int)v[1], (int)v[2]);

	return s;
}

// Assembly:
pushq %rbx
movl 0x53b30(%rip), %eax     # 0x8ef40
leal 0x1(%rax), %ecx
shlq $0x5, %rax
andl $0x7, %ecx
movl %ecx, 0x53b20(%rip)     # 0x8ef40
cvttss2si (%rdi), %ecx
leaq 0x53b25(%rip), %rbx     # 0x8ef50
cvttss2si 0x4(%rdi), %r8d
addq %rax, %rbx
cvttss2si 0x8(%rdi), %r9d
leaq 0x1a0d8(%rip), %rdx     # 0x55519
pushq $0x20
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x18f30
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_SetMovedir
void G_SetMovedir (vec3_t angles, vec3_t movedir)
{
	if (VectorCompare (angles, VEC_UP))
	{
		VectorCopy (MOVEDIR_UP, movedir);
	}
	else if (VectorCompare (angles, VEC_DOWN))
	{
		VectorCopy (MOVEDIR_DOWN, movedir);
	}
	else
	{
		AngleVectors (angles, movedir, NULL, NULL);
	}

	VectorClear (angles);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x2b76c(%rip), %rsi     # 0x66bd0
callq 0x18c20
testl %eax, %eax
je 0x3b476
movq 0x2b0c4(%rip), %rax     # 0x66538
jmp 0x3b490
movq 0x2baf3(%rip), %rsi     # 0x66f70
movq %rbx, %rdi
callq 0x18c20
testl %eax, %eax
je 0x3b4bf
movq 0x2af50(%rip), %rax     # 0x663e0
movss (%rax), %xmm0
movss %xmm0, (%r14)
movss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%r14)
movss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%r14)
andl $0x0, 0x8(%rbx)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x183d0
jmp 0x3b4af
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: vectoyaw
float vectoyaw (vec3_t vec)
{
	float	yaw;
	
	if (/*vec[YAW] == 0 &&*/ vec[PITCH] == 0) 
	{
		yaw = 0;
		if (vec[YAW] > 0)
			yaw = 90;
		else if (vec[YAW] < 0)
			yaw = -90;
	} 
	else
	{
		yaw = (int) (atan2(vec[YAW], vec[PITCH]) * 180 / M_PI);
		if (yaw < 0)
			yaw += 360;
	}

	return yaw;
}

// Assembly:
pushq %rax
movss (%rdi), %xmm2
movss 0x4(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm2
jne 0x3b4f3
jp 0x3b4f3
ucomiss %xmm0, %xmm1
jbe 0x3b529
movss 0x19f13(%rip), %xmm0    # 0x55404
jmp 0x3b536
cvtss2sd %xmm1, %xmm0
cvtss2sd %xmm2, %xmm1
callq 0x19210
mulsd 0x19f08(%rip), %xmm0    # 0x55410
divsd 0x19f08(%rip), %xmm0    # 0x55418
cvttsd2si %xmm0, %eax
cvttpd2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
testl %eax, %eax
jns 0x3b536
addss 0x1483d(%rip), %xmm0    # 0x4fd64
jmp 0x3b536
ucomiss %xmm1, %xmm0
jbe 0x3b536
movss 0x19ed2(%rip), %xmm0    # 0x55408
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: vectoangles
void vectoangles (vec3_t value1, vec3_t angles)
{
	float	forward;
	float	yaw, pitch;
	
	if (value1[1] == 0 && value1[0] == 0)
	{
		yaw = 0;
		if (value1[2] > 0)
			pitch = 90;
		else
			pitch = 270;
	}
	else
	{
		if (value1[0])
			yaw = (int) (atan2(value1[1], value1[0]) * 180 / M_PI);
		else if (value1[1] > 0)
			yaw = 90;
		else
			yaw = -90;
		if (yaw < 0)
			yaw += 360;

		forward = sqrtf (value1[0]*value1[0] + value1[1]*value1[1]);
		pitch = (int) (atan2(value1[2], forward) * 180 / M_PI);
		if (pitch < 0)
			pitch += 360;
	}

	angles[PITCH] = -pitch;
	angles[YAW] = yaw;
	angles[ROLL] = 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movss (%rdi), %xmm1
movss 0x4(%rdi), %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
jne 0x3b581
jp 0x3b581
ucomiss %xmm2, %xmm1
jne 0x3b581
jp 0x3b581
movss 0x8(%r14), %xmm0
xorps %xmm1, %xmm1
xorl %eax, %eax
ucomiss %xmm1, %xmm0
seta %al
leaq 0x19eb1(%rip), %rcx     # 0x55428
movss (%rcx,%rax,4), %xmm0
jmp 0x3b63b
ucomiss %xmm2, %xmm1
jne 0x3b588
jnp 0x3b5b9
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
callq 0x19210
mulsd 0x19e73(%rip), %xmm0    # 0x55410
divsd 0x19e73(%rip), %xmm0    # 0x55418
cvttpd2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm2
movss (%r14), %xmm1
movss 0x4(%r14), %xmm0
jmp 0x3b5cd
xorl %eax, %eax
ucomiss %xmm2, %xmm0
seta %al
leaq 0x19e58(%rip), %rcx     # 0x55420
movss (%rcx,%rax,4), %xmm2
movss 0x1478f(%rip), %xmm3    # 0x4fd64
addss %xmm2, %xmm3
xorps %xmm4, %xmm4
movaps %xmm2, %xmm5
cmpltss %xmm4, %xmm5
andps %xmm5, %xmm3
andnps %xmm2, %xmm5
orps %xmm3, %xmm5
movaps %xmm5, (%rsp)
mulss %xmm0, %xmm0
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
sqrtss %xmm1, %xmm1
cvtss2sd 0x8(%r14), %xmm0
cvtss2sd %xmm1, %xmm1
callq 0x19210
mulsd 0x19df8(%rip), %xmm0    # 0x55410
divsd 0x19df8(%rip), %xmm0    # 0x55418
cvttsd2si %xmm0, %eax
cvttpd2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
testl %eax, %eax
jns 0x3b637
addss 0x1472d(%rip), %xmm0    # 0x4fd64
movaps (%rsp), %xmm1
xorps 0x1666e(%rip), %xmm0    # 0x51cb0
movss %xmm0, (%rbx)
movss %xmm1, 0x4(%rbx)
andl $0x0, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_InitEdict
void G_InitEdict (edict_t *e)
{
	e->inuse = true;
	e->classname = "noclass";
	e->gravity = 1.0;
	e->s.number = e - g_edicts;
}

// Assembly:
movl $0x1, 0x60(%rdi)
leaq 0x19e88(%rip), %rax     # 0x55524
movq %rax, 0x138(%rdi)
movl $0x3f800000, 0x1e0(%rdi) # imm = 0x3F800000
movq 0x2aea4(%rip), %rcx     # 0x66558
movq %rdi, %rax
subq (%rcx), %rax
movl $0x4a8, %ecx            # imm = 0x4A8
cqto
idivq %rcx
movl %eax, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_TouchTriggers
void	G_TouchTriggers (edict_t *ent)
{
	int			i, num;
	edict_t		*touch[MAX_EDICTS], *hit;

	// dead things don't activate triggers!
	if ((ent->client || (ent->svflags & SVF_MONSTER)) && (ent->health <= 0))
		return;

	num = gi.BoxEdicts (ent->absmin, ent->absmax, touch
		, MAX_EDICTS, AREA_TRIGGERS);

	// be careful, it is possible to have an entity in this
	// list removed before we get to it (killtriggered)
	for (i=0 ; i<num ; i++)
	{
		hit = touch[i];
		if (!hit->inuse)
			continue;
		if (!hit->touch)
			continue;
		hit->touch (hit, ent, NULL, NULL);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movq %rdi, %rbx
cmpq $0x0, 0x58(%rdi)
jne 0x3b6e6
testb $0x4, 0xc8(%rbx)
je 0x3b6ef
cmpl $0x0, 0x254(%rbx)
jle 0x3b74b
movq 0x2af0a(%rip), %rax     # 0x66600
leaq 0xe4(%rbx), %rdi
leaq 0xf0(%rbx), %rsi
movq %rsp, %rdx
pushq $0x2
popq %r8
movl $0x400, %ecx            # imm = 0x400
callq *0xa0(%rax)
movl %eax, %r14d
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x3b74b
movq (%rsp,%r15,8), %rdi
cmpl $0x0, 0x60(%rdi)
je 0x3b746
movq 0x220(%rdi), %rax
testq %rax, %rax
je 0x3b746
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
incq %r15
jmp 0x3b722
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: G_TouchSolids
void	G_TouchSolids (edict_t *ent)
{
	int			i, num;
	edict_t		*touch[MAX_EDICTS], *hit;

	num = gi.BoxEdicts (ent->absmin, ent->absmax, touch
		, MAX_EDICTS, AREA_SOLID);

	// be careful, it is possible to have an entity in this
	// list removed before we get to it (killtriggered)
	for (i=0 ; i<num ; i++)
	{
		hit = touch[i];
		if (!hit->inuse)
			continue;
		if (ent->touch)
			ent->touch (hit, ent, NULL, NULL);
		if (!ent->inuse)
			break;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movq %rdi, %rbx
movq 0x2ae92(%rip), %rax     # 0x66600
addq $0xe4, %rdi
leaq 0xf0(%rbx), %rsi
movq %rsp, %rdx
pushq $0x1
popq %r8
movl $0x400, %ecx            # imm = 0x400
callq *0xa0(%rax)
movl %eax, %r14d
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x3b7c9
movq (%rsp,%r15,8), %rdi
cmpl $0x0, 0x60(%rdi)
je 0x3b7c4
movq 0x220(%rbx), %rax
testq %rax, %rax
je 0x3b7be
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
cmpl $0x0, 0x60(%rbx)
je 0x3b7c9
incq %r15
jmp 0x3b79a
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: KillBox
qboolean KillBox (edict_t *ent)
{
	trace_t		tr;

	while (1)
	{
		tr = gi.trace (ent->s.origin, ent->mins, ent->maxs, ent->s.origin, NULL, MASK_PLAYERSOLID);
		if (!tr.ent)
			break;

		// nail it
		T_Damage (tr.ent, ent, ent, vec3_origin, ent->s.origin, vec3_origin, 100000, 0, DAMAGE_NO_PROTECTION, MOD_TELEFRAG);

		// if we didn't kill it, fail
		if (tr.ent->solid)
			return false;
	}

	return true;		// all clear
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x4(%rdi), %r14
leaq 0xcc(%rdi), %r15
leaq 0xd8(%rdi), %r12
movq 0x2af68(%rip), %rbp     # 0x66768
subq $0x8, %rsp
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r14, %r8
xorl %r9d, %r9d
pushq $0x2010003              # imm = 0x2010003
movq 0x2addc(%rip), %rax     # 0x66600
callq *0x60(%rax)
addq $0x10, %rsp
movq 0x40(%rsp), %r13
testq %r13, %r13
je 0x3b869
movq %r13, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r14, %r8
movq %rbp, %r9
pushq $0x15
pushq $0x20
pushq $0x0
pushq $0x186a0                # imm = 0x186A0
callq 0x19260
addq $0x20, %rsp
cmpl $0x0, 0x108(%r13)
je 0x3b800
xorl %eax, %eax
jmp 0x3b86c
pushq $0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: Team_centerprint
void Team_centerprint (int color, char *message, char *elsemessage)
{
    int i;
    edict_t         *cl_ent;

    for (i=0 ; i<game.maxclients ; i++)    //Go through everyone
    {
		cl_ent = g_edicts + 1 + i;    //Select the client entity from the list of ents.
        if (!cl_ent->inuse)        //Not in game yet is what I think this means.
			continue;
        if (cl_ent->client->ctf.teamnum == color) 
			gi.centerprintf (cl_ent, message);
		else if (elsemessage)
			gi.centerprintf (cl_ent, elsemessage);

	}
	gi.dprintf(elsemessage);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, (%rsp)
movl %edi, %ebp
movl $0x4a8, %r15d           # imm = 0x4A8
movq 0x2b4a4(%rip), %r12     # 0x66d40
movq 0x2acb5(%rip), %r13     # 0x66558
xorl %r14d, %r14d
movslq 0x610(%r12), %rax
cmpq %rax, %r14
jge 0x3b8f5
movq (%r13), %rdi
cmpl $0x0, 0x60(%rdi,%r15)
je 0x3b8e9
movq 0x58(%rdi,%r15), %rax
addq %r15, %rdi
cmpl %ebp, 0x1100(%rax)
jne 0x3b8d5
movq (%rsp), %rsi
jmp 0x3b8dd
testq %rbx, %rbx
je 0x3b8e9
movq %rbx, %rsi
xorl %eax, %eax
movq 0x2ad1a(%rip), %rcx     # 0x66600
callq *0x18(%rcx)
incq %r14
addq $0x4a8, %r15            # imm = 0x4A8
jmp 0x3b8a6
movq 0x2ad04(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_utils.c
// Function: Team_cprint
void Team_cprint (int color, char *message, char *elsemessage)
{
    int i;
    edict_t         *cl_ent;

    for (i=0 ; i<game.maxclients ; i++)    //Go through everyone
    {
		cl_ent = g_edicts + 1 + i;    //Select the client entity from the list of ents.
        if (!ctf_validateplayer(cl_ent, CTF_TEAM_IGNORETEAM))  //must be a valid player
			continue;
        if (cl_ent->client->ctf.teamnum == color) 
			ctf_SafePrint(cl_ent, PRINT_HIGH, message);
		else if (elsemessage)
			ctf_SafePrint(cl_ent, PRINT_HIGH, elsemessage);

	}
	gi.dprintf(elsemessage);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movl %edi, %ebp
movl $0x4a8, %r12d           # imm = 0x4A8
xorl %r14d, %r14d
pushq $-0x4
popq %r15
movq 0x2b3fd(%rip), %rax     # 0x66d40
movslq 0x610(%rax), %rax
cmpq %rax, %r14
jge 0x3b9aa
movq 0x2ac02(%rip), %rax     # 0x66558
movq (%rax), %rbx
leaq (%rbx,%r12), %r13
movq %r13, %rdi
movl %r15d, %esi
callq 0x18de0
testl %eax, %eax
je 0x3b99e
movq 0x58(%rbx,%r12), %rax
cmpl %ebp, 0x1100(%rax)
jne 0x3b986
movq %r13, %rdi
pushq $0x2
popq %rsi
movq 0x10(%rsp), %rdx
jmp 0x3b999
cmpq $0x0, 0x8(%rsp)
je 0x3b99e
movq %r13, %rdi
pushq $0x2
popq %rsi
movq 0x8(%rsp), %rdx
callq 0x18ec0
incq %r14
addq $0x4a8, %r12            # imm = 0x4A8
jmp 0x3b93c
movq 0x2ac4f(%rip), %rax     # 0x66600
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_weapon.c
// Function: blaster_touch
void blaster_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	int		mod;

	if (other == self->owner)
		return;

	if (surf && (surf->flags & SURF_SKY))
	{
		G_FreeEdict (self);
		return;
	}

	if (self->owner->client)
		PlayerNoise(self->owner, self->s.origin, PNOISE_IMPACT);

	if (other->takedamage)
	{
		if (self->spawnflags & 1)
			mod = MOD_HYPERBLASTER;
		else
			mod = MOD_BLASTER;
		T_Damage (other, self, self->owner, self->velocity, self->s.origin, plane->normal, self->dmg, 1, DAMAGE_ENERGY, mod);
	}
	else
	{
		gi.WriteByte (svc_temp_entity);
		gi.WriteByte (TE_BLASTER);
		gi.WritePosition (self->s.origin);
		if (!plane)
			gi.WriteDir (vec3_origin);
		else
			gi.WriteDir (plane->normal);
		gi.multicast (self->s.origin, MULTICAST_PVS);
	}

	G_FreeEdict (self);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x110(%rdi), %rdi
cmpq %rsi, %rdi
je 0x3c3db
movq %rdx, %r14
movq %rsi, %r15
testq %rcx, %rcx
je 0x3c37c
testb $0x4, 0x10(%rcx)
jne 0x3c436
cmpq $0x0, 0x58(%rdi)
je 0x3c38f
leaq 0x4(%rbx), %rsi
pushq $0x2
popq %rdx
callq 0x19010
cmpl $0x0, 0x27c(%r15)
je 0x3c3e4
movl 0x140(%rbx), %eax
andl $0x1, %eax
leal (%rax,%rax,8), %eax
incl %eax
movq 0x110(%rbx), %rdx
leaq 0x1c0(%rbx), %rcx
leaq 0x4(%rbx), %r8
movl 0x280(%rbx), %r10d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %r9
pushq %rax
pushq $0x4
pushq $0x1
pushq %r10
callq 0x19260
addq $0x20, %rsp
jmp 0x3c436
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x2a215(%rip), %r12     # 0x66600
pushq $0x3
popq %rdi
callq *0xc8(%r12)
pushq $0x2
popq %rbp
movl %ebp, %edi
callq *0xc8(%r12)
leaq 0x4(%rbx), %r15
movq %r15, %rdi
callq *0xf0(%r12)
testq %r14, %r14
jne 0x3c41e
movq 0x2a34a(%rip), %r14     # 0x66768
movq %r14, %rdi
callq *0xf8(%r12)
movq %r15, %rdi
movl %ebp, %esi
callq *0xb0(%r12)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x19c50
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_weapon.c
// Function: Grenade_Touch
static void Grenade_Touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
{
	if (other == ent->owner)
		return;

	if (surf && (surf->flags & SURF_SKY))
	{
		G_FreeEdict (ent);
		return;
	}

	if (!other->takedamage)
	{
		if (ent->spawnflags & 1)
		{
			if (random() > 0.5)
				gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/hgrenb1a.wav"), 1, ATTN_NORM, 0);
			else
				gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/hgrenb2a.wav"), 1, ATTN_NORM, 0);
		}
		else
		{
			gi.sound (ent, CHAN_VOICE, gi.soundindex ("weapons/grenlb1b.wav"), 1, ATTN_NORM, 0);
		}
		return;
	}

	ent->enemy = other;
	Grenade_Explode (ent);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq %rsi, 0x110(%rdi)
je 0x3c8db
movq %rdi, %rbx
testq %rcx, %rcx
je 0x3c8bc
testb $0x4, 0x10(%rcx)
jne 0x3c8e3
cmpl $0x0, 0x27c(%rsi)
je 0x3c8f2
movq %rsi, 0x2a0(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3c974
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19c50
testb $0x1, 0x140(%rbx)
jne 0x3c912
movq 0x29cfe(%rip), %rax     # 0x66600
movq 0x20(%rax), %r14
leaq 0x15dc4(%rip), %rdi     # 0x526d1
callq *0x48(%rax)
jmp 0x3c952
callq 0x19bf0
andl $0x7fff, %eax           # imm = 0x7FFF
cvtsi2ss %eax, %xmm0
divss 0x12960(%rip), %xmm0    # 0x4f288
ucomiss 0x13ad1(%rip), %xmm0    # 0x50400
movq 0x29cca(%rip), %rax     # 0x66600
movq 0x20(%rax), %r14
movq 0x48(%rax), %rax
jbe 0x3c949
leaq 0x18d51(%rip), %rdi     # 0x55698
jmp 0x3c950
leaq 0x18d5d(%rip), %rdi     # 0x556ad
callq *%rax
pushq $0x2
popq %rsi
movss 0x125cb(%rip), %xmm0    # 0x4ef28
xorps %xmm2, %xmm2
movq %rbx, %rdi
movl %eax, %edx
movaps %xmm0, %xmm1
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_weapon.c
// Function: fire_rocket
void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
{
	edict_t	*rocket;

	rocket = G_Spawn();
	VectorCopy (start, rocket->s.origin);
	VectorCopy (dir, rocket->movedir);
	vectoangles (dir, rocket->s.angles);
	VectorScale (dir, speed, rocket->velocity);
	rocket->movetype = MOVETYPE_FLYMISSILE;
	rocket->clipmask = MASK_SHOT;
	rocket->solid = SOLID_BBOX;
	rocket->s.effects |= EF_ROCKET;
	VectorClear (rocket->mins);
	VectorClear (rocket->maxs);
	rocket->s.modelindex = gi.modelindex ("models/objects/rocket/tris.md2");
	rocket->owner = self;
	rocket->touch = rocket_touch;
	rocket->nextthink = level.time + 8000/speed;
	rocket->think = G_FreeEdict;
	rocket->dmg = damage;
	rocket->radius_dmg = radius_damage;
	rocket->dmg_radius = damage_radius;
	rocket->s.sound = gi.soundindex ("weapons/rockfly.wav");
	rocket->classname = "rocket";

	if (self->client)
		check_dodge (self, rocket->s.origin, dir, speed);

	gi.linkentity (rocket);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, (%rsp)
movss %xmm0, 0x4(%rsp)
movl %r8d, %r13d
movl %ecx, %r12d
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r15
callq 0x198d0
movq %rax, %r14
movss (%rbp), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x4(%rbp), %xmm0
movss %xmm0, 0x8(%rax)
movss 0x8(%rbp), %xmm0
movss %xmm0, 0xc(%rax)
movss (%rbx), %xmm0
movss %xmm0, 0x19c(%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x1a0(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x1a4(%rax)
leaq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x19240
cvtsi2ss %r13d, %xmm0
leaq 0x1c0(%r14), %rsi
movq %rbx, %rdi
callq 0x18a70
movl $0x8, 0x118(%r14)
movabsq $0x600000300000002, %rax # imm = 0x600000300000002
movq %rax, 0x108(%r14)
orb $0x10, 0x40(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0xcc(%r14)
andq $0x0, 0xdc(%r14)
movq 0x295a9(%rip), %rbp     # 0x66600
leaq 0x185b9(%rip), %rdi     # 0x55617
callq *0x40(%rbp)
movl %eax, 0x28(%r14)
movq %r15, 0x110(%r14)
movq 0x299ad(%rip), %rax     # 0x66a20
movq %rax, 0x220(%r14)
movq 0x29d1f(%rip), %rcx     # 0x66da0
movl $0x1f40, %eax           # imm = 0x1F40
xorl %edx, %edx
idivl %r13d
cvtsi2ss %eax, %xmm0
addss 0x4(%rcx), %xmm0
movss %xmm0, 0x200(%r14)
movq 0x2938c(%rip), %rax     # 0x66430
movq %rax, 0x210(%r14)
movl %r12d, 0x280(%r14)
movl (%rsp), %eax
movl %eax, 0x284(%r14)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x288(%r14)
leaq 0x18564(%rip), %rdi     # 0x55636
movq %rbp, %r12
callq *0x48(%rbp)
movl %eax, 0x4c(%r14)
leaq 0x19036(%rip), %rax     # 0x56119
movq %rax, 0x138(%r14)
cmpq $0x0, 0x58(%r15)
je 0x3d100
movq %r14, %rdi
addq $0x4, %rdi
movq %rbx, %rsi
callq 0x3c63a
movq %r14, %rdi
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_weapon.c
// Function: fire_bfg
void fire_bfg (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius)
{
	edict_t	*bfg;

	bfg = G_Spawn();
	VectorCopy (start, bfg->s.origin);
	VectorCopy (dir, bfg->movedir);
	vectoangles (dir, bfg->s.angles);
	VectorScale (dir, speed, bfg->velocity);
	bfg->movetype = MOVETYPE_FLYMISSILE;
	bfg->clipmask = MASK_SHOT;
	bfg->solid = SOLID_BBOX;
	bfg->s.effects |= EF_BFG | EF_ANIM_ALLFAST;
	VectorClear (bfg->mins);
	VectorClear (bfg->maxs);
	bfg->s.modelindex = gi.modelindex ("sprites/s_bfg1.sp2");
	bfg->owner = self;
	bfg->touch = bfg_touch;
	bfg->nextthink = level.time + 8000/speed;
	bfg->think = G_FreeEdict;
	bfg->radius_dmg = damage;
	bfg->dmg_radius = damage_radius;
	bfg->classname = "bfg blast";
	bfg->s.sound = gi.soundindex ("weapons/bfg__l1a.wav");

	bfg->think = bfg_think;
	bfg->nextthink = level.time + FRAMETIME;
	bfg->teammaster = bfg;
	bfg->teamchain = NULL;

	if (self->client)
		check_dodge (self, bfg->s.origin, dir, speed);

	gi.linkentity (bfg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movl %r8d, %r12d
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
callq 0x198d0
movq %rax, %r14
movss (%r13), %xmm0
movss %xmm0, 0x4(%rax)
movss 0x4(%r13), %xmm0
movss %xmm0, 0x8(%rax)
movss 0x8(%r13), %xmm0
movss %xmm0, 0xc(%rax)
movss (%rbx), %xmm0
movss %xmm0, 0x19c(%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, 0x1a0(%rax)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x1a4(%rax)
leaq 0x10(%rax), %rsi
movq %rbx, %rdi
callq 0x19240
cvtsi2ss %r12d, %xmm0
leaq 0x1c0(%r14), %rsi
movq %rbx, %rdi
callq 0x18a70
movl $0x8, 0x118(%r14)
movabsq $0x600000300000002, %rax # imm = 0x600000300000002
movq %rax, 0x108(%r14)
orl $0x2080, 0x40(%r14)     # imm = 0x2080
xorps %xmm0, %xmm0
movups %xmm0, 0xcc(%r14)
andq $0x0, 0xdc(%r14)
movq 0x28b87(%rip), %r13     # 0x66600
leaq 0x17bf2(%rip), %rdi     # 0x55672
callq *0x40(%r13)
movl %eax, 0x28(%r14)
movq %r15, 0x110(%r14)
movq 0x28ba2(%rip), %rax     # 0x66638
movq %rax, 0x220(%r14)
movl $0x1f40, %eax           # imm = 0x1F40
xorl %edx, %edx
idivl %r12d
cvtsi2ss %eax, %xmm0
movq 0x292ee(%rip), %r12     # 0x66da0
addss 0x4(%r12), %xmm0
movss %xmm0, 0x200(%r14)
movq 0x28967(%rip), %rax     # 0x66430
movq %rax, 0x210(%r14)
movl %ebp, 0x284(%r14)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x288(%r14)
leaq 0x17b98(%rip), %rax     # 0x55685
movq %rax, 0x138(%r14)
leaq 0x1208b(%rip), %rdi     # 0x4fb86
movq %r13, %rbp
callq *0x48(%r13)
movl %eax, 0x4c(%r14)
movq 0x293e3(%rip), %rax     # 0x66ef0
movq %rax, 0x210(%r14)
movss 0x4(%r12), %xmm0
addss 0x1176d(%rip), %xmm0    # 0x4f290
movss %xmm0, 0x200(%r14)
movq %r14, 0x2d0(%r14)
andq $0x0, 0x2c8(%r14)
xorl %eax, %eax
cmpq %rax, 0x58(%r15)
je 0x3db52
movq %r14, %rdi
addq $0x4, %rdi
movq %rbx, %rsi
callq 0x3c63a
movq %r14, %rdi
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/m_boss3.c
// Function: Use_Boss3
void Use_Boss3 (edict_t *ent, edict_t *other, edict_t *activator)
{
	gi.WriteByte (svc_temp_entity);
	gi.WriteByte (TE_BOSSTPORT);
	gi.WritePosition (ent->s.origin);
	gi.multicast (ent->s.origin, MULTICAST_PVS);
	G_FreeEdict (ent);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28a85(%rip), %r15     # 0x66600
pushq $0x3
popq %rdi
callq *0xc8(%r15)
pushq $0x16
popq %rdi
callq *0xc8(%r15)
leaq 0x4(%rbx), %r14
movq %r14, %rdi
callq *0xf0(%r15)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq *0xb0(%r15)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19c50
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/m_boss3.c
// Function: SP_monster_boss3_stand
void SP_monster_boss3_stand (edict_t *self)
{
	if (deathmatch->value)
	{
		G_FreeEdict (self);
		return;
	}

	self->movetype = MOVETYPE_STEP;
	self->solid = SOLID_BBOX;
	self->model = "models/monsters/boss3/rider/tris.md2";
	self->s.modelindex = gi.modelindex (self->model);
	self->s.frame = FRAME_stand201;

	gi.soundindex ("misc/bigtele.wav");

	VectorSet (self->mins, -32, -32, 0);
	VectorSet (self->maxs, 32, 32, 90);

	self->use = Use_Boss3;
	self->think = Think_Boss3Stand;
	self->nextthink = level.time + FRAMETIME;
	gi.linkentity (self);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x292c8(%rip), %rax     # 0x66ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3dc0a
jnp 0x3dc19
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19c50
movl $0x5, 0x118(%rbx)
movl $0x2, 0x108(%rbx)
leaq 0x17aac(%rip), %rdi     # 0x556e0
movq %rdi, 0x120(%rbx)
movq 0x289be(%rip), %r14     # 0x66600
callq *0x40(%r14)
movl %eax, 0x28(%rbx)
movl $0x19e, 0x38(%rbx)      # imm = 0x19E
leaq 0x17aae(%rip), %rdi     # 0x55705
callq *0x48(%r14)
movaps 0x1581e(%rip), %xmm0    # 0x53480
movups %xmm0, 0xcc(%rbx)
movsd 0x17a5f(%rip), %xmm0    # 0x556d0
movsd %xmm0, 0xdc(%rbx)
movq 0x28858(%rip), %rax     # 0x664d8
movq %rax, 0x228(%rbx)
movq 0x28fca(%rip), %rax     # 0x66c58
movq %rax, 0x210(%rbx)
movq 0x29104(%rip), %rax     # 0x66da0
movss 0x4(%rax), %xmm0
addss 0x115e7(%rip), %xmm0    # 0x4f290
movss %xmm0, 0x200(%rbx)
movq %rbx, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x90(%rax)
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/m_move.c
// Function: SV_StepDirection
qboolean SV_StepDirection (edict_t *ent, float yaw, float dist)
{
	vec3_t		move, oldorigin;
	float		delta;
	
	ent->ideal_yaw = yaw;
	M_ChangeYaw (ent);
	
	yaw = yaw*M_PI*2 / 360;
	move[0] = cos(yaw)*dist;
	move[1] = sin(yaw)*dist;
	move[2] = 0;

	VectorCopy (ent->s.origin, oldorigin);
	if (SV_movestep (ent, move, false))
	{
		delta = ent->s.angles[YAW] - ent->ideal_yaw;
		if (delta > 45 && delta < 315)
		{		// not turned far enough, so don't take the step
			VectorCopy (oldorigin, ent->s.origin);
		}
		gi.linkentity (ent);
		G_TouchTriggers (ent);
		return true;
	}
	gi.linkentity (ent);
	G_TouchTriggers (ent);
	return false;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movss %xmm1, 0x10(%rsp)
movss %xmm0, (%rsp)
movq %rdi, %rbx
movss %xmm0, 0x1fc(%rdi)
callq 0x18360
cvtss2sd (%rsp), %xmm0
mulsd 0x16ee2(%rip), %xmm0    # 0x55418
addsd %xmm0, %xmm0
divsd 0x17206(%rip), %xmm0    # 0x55748
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
callq 0x18a20
movaps %xmm0, (%rsp)
cvtss2sd 0x10(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x19700
movapd (%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd 0x10(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
cvtpd2ps %xmm0, %xmm0
leaq 0x28(%rsp), %rsi
movlpd %xmm0, (%rsi)
andl $0x0, 0x8(%rsi)
movsd 0x4(%rbx), %xmm0
movaps %xmm0, 0x10(%rsp)
movss 0xc(%rbx), %xmm0
movss %xmm0, (%rsp)
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %edx, %edx
callq 0x19c40
testl %eax, %eax
je 0x3e5f4
movss 0x14(%rbx), %xmm0
subss 0x1fc(%rbx), %xmm0
ucomiss 0x1715d(%rip), %xmm0    # 0x5572c
pushq $0x1
popq %rbp
jbe 0x3e5f4
movss 0x17154(%rip), %xmm1    # 0x55730
ucomiss %xmm0, %xmm1
jbe 0x3e5f4
movaps 0x10(%rsp), %xmm0
movlps %xmm0, 0x4(%rbx)
movss (%rsp), %xmm0
movss %xmm0, 0xc(%rbx)
movq 0x28005(%rip), %rax     # 0x66600
movq %rbx, %rdi
callq *0x90(%rax)
movq %rbx, %rdi
callq 0x19380
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/m_move.c
// Function: M_MoveToGoal
void M_MoveToGoal (edict_t *ent, float dist)
{
	edict_t		*goal;
	
	goal = ent->goalentity;
	
	if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
		return;
	
	// if the next step hits the enemy, return immediately
	if (ent->enemy &&  SV_CloseEnough (ent, ent->enemy, dist) )
		return;
	
	// bump around
	if ((rand() & 3) == 1 || !SV_StepDirection (ent, ent->ideal_yaw, dist))
	{
		if (ent->inuse)
			SV_NewChaseDir (ent, goal, dist);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movq %rdi, %r14
movq 0x1e8(%rdi), %rbx
cmpq $0x0, 0x2b8(%rdi)
jne 0x3e98d
testb $0x3, 0x11c(%r14)
je 0x3e9f2
movq 0x2a0(%r14), %rsi
testq %rsi, %rsi
je 0x3e9ab
movq %r14, %rdi
movss 0x4(%rsp), %xmm0
callq 0x190b0
testl %eax, %eax
jne 0x3e9f2
callq 0x19bf0
andl $0x3, %eax
cmpl $0x1, %eax
je 0x3e9d3
movss 0x1fc(%r14), %xmm0
movq %r14, %rdi
movss 0x4(%rsp), %xmm1
callq 0x18220
testl %eax, %eax
jne 0x3e9f2
cmpl $0x0, 0x60(%r14)
je 0x3e9f2
movq %r14, %rdi
movq %rbx, %rsi
movss 0x4(%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x188a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/m_move.c
// Function: M_walkmove
qboolean M_walkmove (edict_t *ent, float yaw, float dist)
{
	vec3_t	move;
	
	if (!ent->groundentity && !(ent->flags & (FL_FLY|FL_SWIM)))
		return false;

	yaw = yaw * M_PI * 2 / 360;
	
	move[0] = cos(yaw)*dist;
	move[1] = sin(yaw)*dist;
	move[2] = 0;

	return SV_movestep(ent, move, true);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x2b8(%rdi)
jne 0x3ea19
testb $0x3, 0x11c(%rbx)
je 0x3ea9b
cvtss2sd %xmm0, %xmm0
mulsd 0x169f3(%rip), %xmm0    # 0x55418
addsd %xmm0, %xmm0
divsd 0x16d17(%rip), %xmm0    # 0x55748
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movss %xmm1, (%rsp)
callq 0x18a20
movaps %xmm0, 0x20(%rsp)
cvtss2sd (%rsp), %xmm0
movaps %xmm0, (%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x19700
movapd 0x20(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd (%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
cvtpd2ps %xmm0, %xmm0
leaq 0x30(%rsp), %rsi
movlpd %xmm0, (%rsi)
andl $0x0, 0x8(%rsi)
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x19c40
addq $0x40, %rsp
popq %rbx
retq
xorl %eax, %eax
jmp 0x3ea95
nop
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: ClientHasFlag
edict_t *ClientHasFlag(edict_t *ent)
{
	edict_t	*flag;
	int		teamnum = ent->client->ctf.teamnum;
	
	// ctf_validateflags(); //make sure nothing wrong with flags before calling this
	
	// Were we carrying a flag?
	flag = ctf_getteamflag(teamnum, CTF_TEAM_OPPOSING);
	
	if (flag && flag->item)
	{
		if (ent->client->pers.inventory[ITEM_INDEX(flag->item)])
			return flag;
		else
			return NULL;
	}
	return NULL;
	
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movl 0x1100(%rax), %edi
pushq $-0x6
popq %rsi
callq 0x18e90
testq %rax, %rax
je 0x3eaef
movq %rax, %rcx
movq 0x330(%rax), %rax
testq %rax, %rax
je 0x3eaef
movq 0x58(%rbx), %rsi
subq 0x2836b(%rip), %rax     # 0x66e40
movl $0x88, %edi
cqto
idivq %rdi
xorl %edx, %edx
cmpl $0x0, 0x318(%rsi,%rax,4)
cmoveq %rdx, %rcx
jmp 0x3eaf1
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_info_player_start
void SP_info_player_start(edict_t *self)
{
	if (!coop->value)
		return;
	if(Q_stricmp(level.mapname, "security") == 0)
	{
		// invoke one of our gross, ugly, disgusting hacks
		self->think = SP_CreateCoopSpots;
		self->nextthink = level.time + FRAMETIME;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2845f(%rip), %rax     # 0x66f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3eb13
jnp 0x3eb55
movq %rdi, %rbx
movq 0x28283(%rip), %r14     # 0x66da0
leaq 0x48(%r14), %rdi
leaq 0x143b6(%rip), %rsi     # 0x52ede
callq 0x186d0
testl %eax, %eax
jne 0x3eb55
leaq 0x25(%rip), %rax        # 0x3eb5d
movq %rax, 0x210(%rbx)
movss 0x4(%r14), %xmm0
addss 0x10743(%rip), %xmm0    # 0x4f290
movss %xmm0, 0x200(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_CreateCoopSpots
static void SP_CreateCoopSpots (edict_t *self)
{
	edict_t	*spot;

	if(Q_stricmp(level.mapname, "security") == 0)
	{
		spot = G_Spawn();
		spot->classname = "info_player_coop";
		spot->s.origin[0] = 188 - 64;
		spot->s.origin[1] = -164;
		spot->s.origin[2] = 80;
		spot->targetname = "jail3";
		spot->s.angles[1] = 90;

		spot = G_Spawn();
		spot->classname = "info_player_coop";
		spot->s.origin[0] = 188 + 64;
		spot->s.origin[1] = -164;
		spot->s.origin[2] = 80;
		spot->targetname = "jail3";
		spot->s.angles[1] = 90;

		spot = G_Spawn();
		spot->classname = "info_player_coop";
		spot->s.origin[0] = 188 + 128;
		spot->s.origin[1] = -164;
		spot->s.origin[2] = 80;
		spot->targetname = "jail3";
		spot->s.angles[1] = 90;

		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x28235(%rip), %rdi     # 0x66da0
addq $0x48, %rdi
leaq 0x14368(%rip), %rsi     # 0x52ede
callq 0x186d0
testl %eax, %eax
jne 0x3ec11
callq 0x198d0
leaq 0x155c5(%rip), %rbx     # 0x54154
movq %rbx, 0x138(%rax)
movsd 0x16bf2(%rip), %xmm0    # 0x55790
movsd %xmm0, 0x4(%rax)
movl $0x42a00000, %ebp       # imm = 0x42A00000
movl %ebp, 0xc(%rax)
leaq 0x17a6f(%rip), %r14     # 0x56621
movq %r14, 0x158(%rax)
movl $0x42b40000, %r15d      # imm = 0x42B40000
movl %r15d, 0x14(%rax)
callq 0x198d0
movq %rbx, 0x138(%rax)
movsd 0x16bc9(%rip), %xmm0    # 0x557a0
movsd %xmm0, 0x4(%rax)
movl %ebp, 0xc(%rax)
movq %r14, 0x158(%rax)
movl %r15d, 0x14(%rax)
callq 0x198d0
movq %rbx, 0x138(%rax)
movsd 0x16bb2(%rip), %xmm0    # 0x557b0
movsd %xmm0, 0x4(%rax)
movl %ebp, 0xc(%rax)
movq %r14, 0x158(%rax)
movl %r15d, 0x14(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_info_player_coop
void SP_info_player_coop(edict_t *self)
{
	if (!coop->value)
	{
		G_FreeEdict (self);
		return;
	}

	if((Q_stricmp(level.mapname, "jail2") == 0)   ||
	   (Q_stricmp(level.mapname, "jail4") == 0)   ||
	   (Q_stricmp(level.mapname, "mine1") == 0)   ||
	   (Q_stricmp(level.mapname, "mine2") == 0)   ||
	   (Q_stricmp(level.mapname, "mine3") == 0)   ||
	   (Q_stricmp(level.mapname, "mine4") == 0)   ||
	   (Q_stricmp(level.mapname, "lab") == 0)     ||
	   (Q_stricmp(level.mapname, "boss1") == 0)   ||
	   (Q_stricmp(level.mapname, "fact3") == 0)   ||
	   (Q_stricmp(level.mapname, "biggun") == 0)  ||
	   (Q_stricmp(level.mapname, "space") == 0)   ||
	   (Q_stricmp(level.mapname, "command") == 0) ||
	   (Q_stricmp(level.mapname, "power2") == 0) ||
	   (Q_stricmp(level.mapname, "strike") == 0))
	{
		// invoke one of our gross, ugly, disgusting hacks
		self->think = SP_FixCoopSpots;
		self->nextthink = level.time + FRAMETIME;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28312(%rip), %rax     # 0x66f60
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3ec64
jnp 0x3edbf
movq 0x28135(%rip), %r15     # 0x66da0
leaq 0x48(%r15), %r14
leaq 0x16caa(%rip), %rsi     # 0x55920
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x16c99(%rip), %rsi     # 0x55926
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x1571f(%rip), %rsi     # 0x543c3
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x15714(%rip), %rsi     # 0x543cf
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x16498(%rip), %rsi     # 0x5516a
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x16c43(%rip), %rsi     # 0x5592c
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x16c32(%rip), %rsi     # 0x55932
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x16c1f(%rip), %rsi     # 0x55936
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x164a6(%rip), %rsi     # 0x551d0
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x16bff(%rip), %rsi     # 0x5593c
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x174f5(%rip), %rsi     # 0x56245
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x15a32(%rip), %rsi     # 0x54795
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x16bcd(%rip), %rsi     # 0x55943
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
je 0x3ed95
leaq 0x1427c(%rip), %rsi     # 0x53005
movq %r14, %rdi
callq 0x186d0
testl %eax, %eax
jne 0x3edb9
leaq 0x30(%rip), %rax        # 0x3edcc
movq %rax, 0x210(%rbx)
movss 0x4(%r15), %xmm0
addss 0x104df(%rip), %xmm0    # 0x4f290
movss %xmm0, 0x200(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x19c50
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_FixCoopSpots
static void SP_FixCoopSpots (edict_t *self)
{
	edict_t	*spot;
	vec3_t	d;

	spot = NULL;

	while(1)
	{
		spot = G_Find(spot, FOFS(classname), "info_player_start");
		if (!spot)
			return;
		if (!spot->targetname)
			continue;
		VectorSubtract(self->s.origin, spot->s.origin, d);
		if (VectorLength(d) < 384)
		{
			if ((!self->targetname) || Q_stricmp(self->targetname, spot->targetname) != 0)
			{
//				gi.dprintf("FixCoopSpots changed %s at %s targetname from %s to %s\n", self->classname, vtos(self->s.origin), self->targetname, spot->targetname);
				self->targetname = spot->targetname;
			}
			return;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x10775(%rip), %r15     # 0x4f559
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movl $0x138, %esi            # imm = 0x138
movq %r15, %rdx
callq 0x195e0
testq %rax, %rax
je 0x3ee6e
movq %rax, %r14
cmpq $0x0, 0x158(%rax)
je 0x3ede9
movsd 0x4(%rbx), %xmm0
movsd 0x4(%r14), %xmm1
subps %xmm1, %xmm0
movlps %xmm0, 0x8(%rsp)
movss 0xc(%rbx), %xmm0
subss 0xc(%r14), %xmm0
movss %xmm0, 0x10(%rsp)
movq %r12, %rdi
callq 0x19460
movss 0x16931(%rip), %xmm1    # 0x55770
ucomiss %xmm0, %xmm1
jbe 0x3ede9
movq 0x158(%rbx), %rdi
testq %rdi, %rdi
je 0x3ee60
movq 0x158(%r14), %rsi
callq 0x186d0
testl %eax, %eax
je 0x3ee6e
movq 0x158(%r14), %rax
movq %rax, 0x158(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/p_client.c
// Function: SP_info_player_red
void SP_info_player_red(edict_t *self)
{
	vec3_t	end, angles;
	
	// If we have no facing for this spawn point...
	//  Turn it to face the flag
	if (!self->s.angles[1] && redflag)
	{
		VectorSubtract(redflag->s.origin, self->s.origin, end);
		vectoangles(end, angles);
		
		self->s.angles[1] = angles[1];
	}
	self->classname = "info_player_red";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
ucomiss 0x14(%rdi), %xmm0
setnp %al
sete %cl
andb %al, %cl
movq 0x2795e(%rip), %rax     # 0x667f8
movq (%rax), %rax
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x3eee4
movsd 0x4(%rax), %xmm0
movsd 0x4(%rbx), %xmm1
subps %xmm1, %xmm0
movq %rsp, %rdi
movlps %xmm0, (%rdi)
movss 0xc(%rax), %xmm0
subss 0xc(%rbx), %xmm0
movss %xmm0, 0x8(%rdi)
leaq 0xc(%rsp), %r14
movq %r14, %rsi
callq 0x19240
movss 0x4(%r14), %xmm0
movss %xmm0, 0x14(%rbx)
leaq 0x120a4(%rip), %rax     # 0x50f8f
movq %rax, 0x138(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq