LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_phys.c
// Function: SV_Impact
void SV_Impact (edict_t *e1, trace_t *trace)
{
	edict_t		*e2;
//	cplane_t	backplane;

	e2 = trace->ent;

	if (e1->touch && e1->solid != SOLID_NOT)
		e1->touch (e1, e2, &trace->plane, trace->surface);
	
	if (e2->touch && e2->solid != SOLID_NOT)
		e2->touch (e2, e1, NULL, NULL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rsi), %r14
movq 0x220(%rdi), %rax
testq %rax, %rax
je 0x37b28
cmpl $0x0, 0x108(%rbx)
je 0x37b28
movq %rsi, %rdx
movq 0x30(%rsi), %rcx
addq $0x18, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
movq 0x220(%r14), %rax
testq %rax, %rax
je 0x37b51
cmpl $0x0, 0x108(%r14)
je 0x37b51
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_phys.c
// Function: ClipVelocity
int ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
{
	float	backoff;
	float	change;
	int		i, blocked;
	
	blocked = 0;
	if (normal[2] > 0)
		blocked |= 1;		// floor
	if (!normal[2])
		blocked |= 2;		// step
	
	backoff = DotProduct (in, normal) * overbounce;

	for (i=0 ; i<3 ; i++)
	{
		change = normal[i]*backoff;
		out[i] = in[i] - change;
		if (out[i] > -STOP_EPSILON && out[i] < STOP_EPSILON)
			out[i] = 0;
	}

	return blocked;
}

// Assembly:
movss 0x8(%rsi), %xmm1
movss (%rdi), %xmm3
movss 0x4(%rdi), %xmm2
mulss 0x4(%rsi), %xmm2
mulss (%rsi), %xmm3
addss %xmm2, %xmm3
movss 0x8(%rdi), %xmm2
mulss %xmm1, %xmm2
addss %xmm3, %xmm2
mulss %xmm0, %xmm2
xorl %eax, %eax
movaps 0x1c3b2(%rip), %xmm0    # 0x53f40
movsd 0x1d082(%rip), %xmm3    # 0x54c18
movss (%rsi,%rax,4), %xmm5
mulss %xmm2, %xmm5
movss (%rdi,%rax,4), %xmm4
subss %xmm5, %xmm4
movaps %xmm4, %xmm5
andps %xmm0, %xmm5
cvtss2sd %xmm5, %xmm5
ucomisd %xmm5, %xmm3
xorps %xmm5, %xmm5
ja 0x37bbe
movaps %xmm4, %xmm5
movss %xmm5, (%rdx,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x37b96
xorps %xmm0, %xmm0
xorl %ecx, %ecx
ucomiss %xmm0, %xmm1
seta %cl
leal 0x2(%rcx), %eax
ucomiss %xmm0, %xmm1
cmovnel %ecx, %eax
cmovpl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_phys.c
// Function: SV_PushEntity
trace_t SV_PushEntity (edict_t *ent, vec3_t push)
{
	trace_t	trace;
	vec3_t	start;
	vec3_t	end;
	int		mask;

	VectorCopy (ent->s.origin, start);
	VectorAdd (start, push, end);

retry:
	if (ent->clipmask)
		mask = ent->clipmask;
	else
		mask = MASK_SOLID;

	trace = gi.trace (start, ent->mins, ent->maxs, end, ent, mask);
	
	VectorCopy (trace.endpos, ent->s.origin);
	gi.linkentity (ent);

	if (trace.fraction != 1.0)
	{
		SV_Impact (ent, &trace);

		// if the pushed entity went away and the pusher is still there
		if (!trace.ent->inuse && ent->inuse)
		{
			// move the pusher back and try again
			VectorCopy (start, ent->s.origin);
			gi.linkentity (ent);
			goto retry;
		}
	}

	if (ent->inuse)
		G_TouchTriggers (ent);

	return trace;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movss 0x4(%rsi), %xmm0
leaq 0x8(%rsp), %rax
movss %xmm0, (%rax)
movss 0x8(%rsi), %xmm1
movss %xmm1, 0x4(%rax)
movss 0xc(%rsi), %xmm2
movss %xmm2, 0x8(%rax)
addss (%rdx), %xmm0
leaq 0x14(%rsp), %rax
movss %xmm0, (%rax)
addss 0x4(%rdx), %xmm1
movss %xmm1, 0x4(%rax)
addss 0x8(%rdx), %xmm2
movq %rdi, %r15
movss %xmm2, 0x8(%rax)
leaq 0xcc(%rsi), %r13
leaq 0xd8(%rsi), %rbp
movq 0x314e9(%rip), %r12     # 0x69600
leaq 0x20(%rsp), %r14
movl 0x10c(%rbx), %eax
testl %eax, %eax
movl $0x3, %ecx
cmovel %ecx, %eax
movl %eax, (%rsp)
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movq %r13, %rdx
movq %rbp, %rcx
leaq 0x14(%rsp), %r8
movq %rbx, %r9
callq *0x60(%r12)
movl $0x9, %ecx
movq %r15, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movss 0xc(%r15), %xmm0
movss %xmm0, 0x4(%rbx)
movss 0x10(%r15), %xmm0
movss %xmm0, 0x8(%rbx)
movss 0x14(%r15), %xmm0
movss %xmm0, 0xc(%rbx)
movq %rbx, %rdi
callq *0x90(%r12)
movss 0x8(%r15), %xmm0
ucomiss 0x1bd97(%rip), %xmm0    # 0x53f28
jne 0x38195
jnp 0x381e1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18a80
movq 0x40(%r15), %rax
cmpl $0x0, 0x60(%rax)
jne 0x381e1
cmpl $0x0, 0x60(%rbx)
je 0x381e1
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rbx)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x8(%rbx)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0xc(%rbx)
movq %rbx, %rdi
callq *0x90(%r12)
jmp 0x3811c
cmpl $0x0, 0x60(%rbx)
je 0x381ef
movq %rbx, %rdi
callq 0x19200
movq %r15, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_phys.c
// Function: SV_Physics_Noclip
void SV_Physics_Noclip (edict_t *ent)
{
// regular thinking
	if (!SV_RunThink (ent))
		return;
	
	VectorMA (ent->s.angles, FRAMETIME, ent->avelocity, ent->s.angles);
	VectorMA (ent->s.origin, FRAMETIME, ent->velocity, ent->s.origin);

	gi.linkentity (ent);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x18620
testl %eax, %eax
je 0x38b3c
leaq 0x10(%rbx), %rdi
leaq 0x1cc(%rbx), %rsi
movss 0x1b788(%rip), %xmm0    # 0x54290
movq %rdi, %rdx
callq 0x19770
leaq 0x4(%rbx), %rdi
leaq 0x1c0(%rbx), %rsi
movss 0x1b76d(%rip), %xmm0    # 0x54290
movq %rdi, %rdx
callq 0x19770
movq 0x30ace(%rip), %rax     # 0x69600
movq %rbx, %rdi
popq %rbx
jmpq *0x90(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_phys.c
// Function: SV_AddRotationalFriction
void SV_AddRotationalFriction (edict_t *ent)
{
	int		n;
	float	adjustment;

	VectorMA (ent->s.angles, FRAMETIME, ent->avelocity, ent->s.angles);
	adjustment = FRAMETIME * sv_stopspeed * sv_friction;
	for (n = 0; n < 3; n++)
	{
		if (ent->avelocity[n] > 0)
		{
			ent->avelocity[n] -= adjustment;
			if (ent->avelocity[n] < 0)
				ent->avelocity[n] = 0;
		}
		else
		{
			ent->avelocity[n] += adjustment;
			if (ent->avelocity[n] > 0)
				ent->avelocity[n] = 0;
		}
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x10, %rdi
addq $0x1cc, %rbx            # imm = 0x1CC
movss 0x1b42e(%rip), %xmm0    # 0x54290
movq %rbx, %rsi
movq %rdi, %rdx
callq 0x19770
xorl %eax, %eax
xorps %xmm0, %xmm0
movss 0x1dd7e(%rip), %xmm1    # 0x56bf8
movss 0x1dd7a(%rip), %xmm2    # 0x56bfc
movss (%rbx,%rax,4), %xmm3
ucomiss %xmm0, %xmm3
jbe 0x38e9c
addss %xmm1, %xmm3
movss %xmm3, (%rbx,%rax,4)
ucomiss %xmm3, %xmm0
ja 0x38eaa
jmp 0x38eb1
addss %xmm2, %xmm3
movss %xmm3, (%rbx,%rax,4)
ucomiss %xmm0, %xmm3
jbe 0x38eb1
movl $0x0, (%rbx,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x38e82
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_phys.c
// Function: G_RunEntity
void G_RunEntity (edict_t *ent)
{
	if (ent->prethink)
		ent->prethink (ent);

	switch ( (int)ent->movetype)
	{
	case MOVETYPE_PUSH:
	case MOVETYPE_STOP:
		SV_Physics_Pusher (ent);
		break;
	case MOVETYPE_NONE:
		SV_Physics_None (ent);
		break;
	case MOVETYPE_NOCLIP:
		SV_Physics_Noclip (ent);
		break;
	case MOVETYPE_STEP:
		SV_Physics_Step (ent);
		break;
	case MOVETYPE_TOSS:
	case MOVETYPE_BOUNCE:
	case MOVETYPE_FLY:
	case MOVETYPE_FLYMISSILE:
 	case MOVETYPE_REFLECT: // SKWiD MOD
		SV_Physics_Toss (ent);
		break;
	default:
		gi.error ("SV_Physics: bad movetype %i", (int)ent->movetype);			
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x208(%rdi), %rax
testq %rax, %rax
je 0x39213
movq %rbx, %rdi
callq *%rax
movl 0x118(%rbx), %esi
cmpq $0xa, %rsi
ja 0x39241
leaq 0x1f5e2(%rip), %rax     # 0x58808
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
popq %rbx
jmp 0x191c0
movq %rbx, %rdi
popq %rbx
jmp 0x184c0
movq 0x303b8(%rip), %rax     # 0x69600
movq 0x38(%rax), %rcx
leaq 0x1f663(%rip), %rdi     # 0x588b6
xorl %eax, %eax
popq %rbx
jmpq *%rcx
movq %rbx, %rdi
popq %rbx
jmp 0x18620
movq %rbx, %rdi
popq %rbx
jmp 0x199f0
movq %rbx, %rdi
popq %rbx
jmp 0x18a40
nop
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: SortMaplist
void SortMaplist(MapInfo arr[], int min, int max) {
	if (min < max) {
		int ndx = MapDivide(arr, min, max);
		SortMaplist(arr, min, ndx - 1);
		SortMaplist(arr, ndx + 1, max);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
cmpl %ebx, %ebp
jge 0x39f3d
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x193a0
movl %eax, %r15d
leal -0x1(%r15), %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x19560
incl %r15d
movl %r15d, %ebp
jmp 0x39f14
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: MapDivide
int MapDivide(MapInfo arr[], int min, int max) {
	MapInfo tmp = arr[max];
	int nndx = (min - 1);

	for (int x = min; x <= max - 1; x++) {
		if (strcmp(arr[x].mapname, tmp.mapname) < 0) {
			nndx++;
			flip(&arr[nndx], &arr[x]);
		}
	}
	flip(&arr[nndx + 1], &arr[max]);
	return(nndx + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movslq %edx, %r12
leaq (%r12,%r12,2), %rax
leaq (%rdi,%rax,8), %r15
cmpl %r12d, %esi
jge 0x39fd9
movq (%rbx,%rax,8), %r14
movslq %ebp, %rax
decl %ebp
leaq (%rax,%rax,2), %rcx
leaq (%rbx,%rcx,8), %r13
subq %rax, %r12
movq (%r13), %rdi
movq %r14, %rsi
callq 0x18b20
testl %eax, %eax
jns 0x39fce
incl %ebp
movslq %ebp, %rax
leaq (%rax,%rax,2), %rax
movq 0x10(%rbx,%rax,8), %rcx
movq %rcx, 0x10(%rsp)
movups (%rbx,%rax,8), %xmm0
movaps %xmm0, (%rsp)
movq 0x10(%r13), %rcx
movq %rcx, 0x10(%rbx,%rax,8)
movups (%r13), %xmm0
movups %xmm0, (%rbx,%rax,8)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r13)
movaps (%rsp), %xmm0
movups %xmm0, (%r13)
addq $0x18, %r13
decq %r12
jne 0x39f7f
incl %ebp
movslq %ebp, %rax
leaq (%rax,%rax,2), %rcx
movq 0x10(%rbx,%rcx,8), %rdx
movq %rdx, 0x10(%rsp)
movups (%rbx,%rcx,8), %xmm0
movaps %xmm0, (%rsp)
movq 0x10(%r15), %rdx
movq %rdx, 0x10(%rbx,%rcx,8)
movups (%r15), %xmm0
movups %xmm0, (%rbx,%rcx,8)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%r15)
movaps (%rsp), %xmm0
movups %xmm0, (%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: WriteField1
void WriteField1(FILE* f, field_t* field, byte* base)
{
	void* p;
	size_t		len;
	int			index;

	if (field->flags & FFL_SPAWNTEMP)
		return;

	p = (void*)(base + field->ofs);
	switch (field->type)
	{
	case F_INT:
	case F_FLOAT:
	case F_ANGLEHACK:
	case F_VECTOR:
	case F_IGNORE:
		break;

	case F_LSTRING:
	case F_GSTRING:
		if (*(char**)p)
			len = strlen(*(char**)p) + 1;
		else
			len = 0;
		*(size_t*)p = len;
		break;
	case F_EDICT:
		if (*(edict_t**)p == NULL)
			index = -1;
		else
			index = *(edict_t**)p - g_edicts;
		*(int*)p = index;
		break;
	case F_CLIENT:
		if (*(gclient_t**)p == NULL)
			index = -1;
		else
			index = *(gclient_t**)p - game.clients;
		*(int*)p = index;
		break;
	case F_ITEM:
		if (*(edict_t**)p == NULL)
			index = -1;
		else
			index = *(gitem_t**)p - itemlist;
		*(int*)p = index;
		break;

		//relative to code segment
	case F_FUNCTION:
		if (*(byte**)p == NULL)
			index = 0;
		else
			index = *(byte**)p - ((byte*)InitGame);
		*(int*)p = index;
		break;

		//relative to data segment
	case F_MMOVE:
		if (*(byte**)p == NULL)
			index = 0;
		else
			index = *(byte**)p - (byte*)&mmove_reloc;
		*(int*)p = index;
		break;

	default:
		gi.error("WriteEdict: unknown field type");
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testb $0x1, 0x10(%rsi)
jne 0x3a154
movl 0xc(%rsi), %eax
cmpq $0xb, %rax
ja 0x3a131
movq %rdx, %rbx
movslq 0x8(%rsi), %r14
leaq 0x1e857(%rip), %rcx     # 0x588d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x3a14e
callq 0x18680
incq %rax
jmp 0x3a150
movq (%rbx,%r14), %rax
testq %rax, %rax
je 0x3a10a
movq 0x2f4a8(%rip), %rcx     # 0x69558
subq (%rcx), %rax
shrq $0x3, %rax
imull $0x8ce2cabd, %eax, %eax # imm = 0x8CE2CABD
jmp 0x3a10f
movq (%rbx,%r14), %rax
testq %rax, %rax
je 0x3a10a
subq 0x2fd71(%rip), %rax     # 0x69e40
shrq $0x3, %rax
imull $0xf0f0f0f1, %eax, %eax # imm = 0xF0F0F0F1
jmp 0x3a10f
movq (%rbx,%r14), %rax
movl 0x2f8a3(%rip), %ecx     # 0x69988
jmp 0x3a11f
movq (%rbx,%r14), %rax
testq %rax, %rax
je 0x3a10a
movq 0x2fc49(%rip), %rcx     # 0x69d40
subq 0x408(%rcx), %rax
shrq $0x6, %rax
imull $0x4f4fc08d, %eax, %eax # imm = 0x4F4FC08D
jmp 0x3a10f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rbx,%r14)
jmp 0x3a154
movq (%rbx,%r14), %rax
movl 0x2f569(%rip), %ecx     # 0x69688
movl %eax, %edx
subl %ecx, %edx
xorl %ecx, %ecx
testq %rax, %rax
cmovnel %edx, %ecx
movl %ecx, (%rbx,%r14)
jmp 0x3a154
movq 0x2f4c8(%rip), %rax     # 0x69600
movq 0x38(%rax), %rcx
leaq 0x1ed35(%rip), %rdi     # 0x58e78
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
xorl %eax, %eax
movq %rax, (%rbx,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: WriteField2
void WriteField2(FILE* f, field_t* field, byte* base)
{
	size_t		len;
	void* p;

	if (field->flags & FFL_SPAWNTEMP)
		return;

	p = (void*)(base + field->ofs);
	switch (field->type)
	{
	case F_LSTRING:
		if (*(char**)p)
		{
			len = strlen(*(char**)p) + 1;
			fwrite(*(char**)p, len, 1, f);
		}
		break;
	default:// MJD Added because the compile FREAKS, here
		break;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testb $0x1, 0x10(%rsi)
jne 0x3a19f
cmpl $0x2, 0xc(%rsi)
jne 0x3a19f
movslq 0x8(%rsi), %rax
movq (%rdx,%rax), %r14
testq %r14, %r14
je 0x3a19f
movq %rdi, %rbx
movq %r14, %rdi
callq 0x18680
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19720
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: ReadField
void ReadField(FILE* f, field_t* field, byte* base)
{
	void* p;
	int			len;
	int			index;

	if (field->flags & FFL_SPAWNTEMP)
		return;

	p = (void*)(base + field->ofs);
	switch (field->type)
	{
	case F_INT:
	case F_FLOAT:
	case F_ANGLEHACK:
	case F_VECTOR:
	case F_IGNORE:
		break;

	case F_LSTRING:
		len = *(int*)p;
		if (!len)
			*(char**)p = NULL;
		else
		{
			*(char**)p = gi.TagMalloc(len, TAG_LEVEL);
			size_t count = fread(*(char**)p, len, 1, f);
			if (count)
				; // don't worry, be happy
		}
		break;
	case F_EDICT:
		index = *(int*)p;
		if (index == -1)
			*(edict_t**)p = NULL;
		else
			*(edict_t**)p = &g_edicts[index];
		break;
	case F_CLIENT:
		index = *(int*)p;
		if (index == -1)
			*(gclient_t**)p = NULL;
		else
			*(gclient_t**)p = &game.clients[index];
		break;
	case F_ITEM:
		index = *(int*)p;
		if (index == -1)
			*(gitem_t**)p = NULL;
		else
			*(gitem_t**)p = &itemlist[index];
		break;

		//relative to code segment
	case F_FUNCTION:
		index = *(int*)p;
		if (index == 0)
			*(byte**)p = NULL;
		else
			*(byte**)p = ((byte*)InitGame) + index;
		break;

		//relative to data segment
	case F_MMOVE:
		index = *(int*)p;
		if (index == 0)
			*(byte**)p = NULL;
		else
			*(byte**)p = (byte*)&mmove_reloc + index;
		break;

	default:
		gi.error("ReadEdict: unknown field type");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testb $0x1, 0x10(%rsi)
jne 0x3a2b0
movl 0xc(%rsi), %eax
cmpq $0xb, %rax
ja 0x3a2bc
movq %rdx, %rbx
movslq 0x8(%rsi), %r12
leaq 0x1e730(%rip), %rcx     # 0x58904
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq (%rbx,%r12), %r15
testq %r15, %r15
je 0x3a2a8
movq %rdi, %r14
movq 0x2f40c(%rip), %rax     # 0x69600
movl %r15d, %edi
movl $0x2fe, %esi            # imm = 0x2FE
callq *0x108(%rax)
movq %rax, (%rbx,%r12)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x183f0
movslq (%rbx,%r12), %rax
testq %rax, %rax
je 0x3a2a8
addq 0x2f454(%rip), %rax     # 0x69688
jmp 0x3a2a2
movslq (%rbx,%r12), %rax
cmpq $-0x1, %rax
je 0x3a2a8
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rax
addq 0x2fbee(%rip), %rax     # 0x69e40
jmp 0x3a2a2
movslq (%rbx,%r12), %rax
testq %rax, %rax
je 0x3a2a8
addq 0x2f724(%rip), %rax     # 0x69988
jmp 0x3a2a2
movslq (%rbx,%r12), %rax
cmpq $-0x1, %rax
je 0x3a2a8
movq 0x2fac9(%rip), %rcx     # 0x69d40
imulq $0x9140, %rax, %rax     # imm = 0x9140
addq 0x408(%rcx), %rax
jmp 0x3a2a2
movslq (%rbx,%r12), %rax
cmpq $-0x1, %rax
je 0x3a2a8
movq 0x2f2c0(%rip), %rcx     # 0x69558
imulq $0x4a8, %rax, %rax      # imm = 0x4A8
addq (%rcx), %rax
movq %rax, (%rbx,%r12)
jmp 0x3a2b0
movq $0x0, (%rbx,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x2f33d(%rip), %rax     # 0x69600
movq 0x38(%rax), %rcx
leaq 0x1ebc9(%rip), %rdi     # 0x58e97
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: WriteClient
void WriteClient(FILE* f, gclient_t* client)
{
	field_t* field;

	// all of the ints, floats, and vectors stay as they are
	temp = *client;

	// change the pointers to lengths or indexes
	for (field = clientfields; field->name; field++)
	{
		WriteField1(f, field, (byte*)&temp);
	}

	// write the block
	fwrite(&temp, sizeof(temp), 1, f);

	// now write any allocated data following the edict
	for (field = clientfields; field->name; field++)
	{
		WriteField2(f, field, (byte*)client);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4c986(%rip), %rdi     # 0x86c78
movl $0x9140, %edx           # imm = 0x9140
callq 0x18c80
movq 0x2f62d(%rip), %r15     # 0x69930
cmpq $0x0, (%r15)
je 0x3a326
leaq 0x4c968(%rip), %r12     # 0x86c78
movq %r15, %rsi
movq %r12, %rdx
callq 0x18540
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x3a310
leaq 0x4c94b(%rip), %rdi     # 0x86c78
movl $0x9140, %esi           # imm = 0x9140
movl $0x1, %edx
movq %r14, %rcx
callq 0x19720
movq 0x2f5ea(%rip), %r15     # 0x69930
cmpq $0x0, (%r15)
je 0x3a365
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x191b0
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x3a34c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: ReadClient
void ReadClient(FILE* f, gclient_t* client)
{
	field_t* field;
	size_t	count;

	count = fread(client, sizeof(*client), 1, f);
	if (count)
		; // don't worry, be happy

	for (field = clientfields; field->name; field++)
	{
		ReadField(f, field, (byte*)client);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x9140, %esi           # imm = 0x9140
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x183f0
movq 0x2f598(%rip), %r15     # 0x69930
cmpq $0x0, (%r15)
je 0x3a3b7
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x198c0
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x3a39e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: WriteGame
void WriteGame(char* filename, qboolean autosave)
{
	FILE* f;
	int		i;
	char	str[MAX_INFO_STRING];

	if (!autosave)
		SaveClientData();

	f = fopen(filename, "wb");
	if (!f)
	{
		gi.error("Couldn't open %s", filename);
		return;
	}

	memset(str, 0, sizeof(str));
	strcpy(str, __DATE__);
	fwrite(str, sizeof(str), 1, f);

	game.autosaved = autosave;
	fwrite(&game, sizeof(game), 1, f);
	game.autosaved = false;

	for (i = 0; i < game.maxclients; i++)
		WriteClient(f, &game.clients[i]);

	fclose(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
jne 0x3a3da
callq 0x18cd0
leaq 0x1dde6(%rip), %rsi     # 0x581c7
movq %r14, %rdi
callq 0x19470
testq %rax, %rax
je 0x3a4b1
movq %rax, %rbx
leaq 0xc(%rsp), %r14
movl $0x1f4, %edx            # imm = 0x1F4
movq %r14, %rdi
xorl %esi, %esi
callq 0x18880
movabsq $0x3220323120677541, %rax # imm = 0x3220323120677541
movq %rax, -0xc(%r14)
movl $0x353230, -0x4(%r14)   # imm = 0x353230
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movl $0x1, %edx
movq %rbx, %rcx
callq 0x19720
movq 0x2f905(%rip), %r14     # 0x69d40
movl %ebp, 0x620(%r14)
movl $0x628, %esi            # imm = 0x628
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x19720
movl $0x0, 0x620(%r14)
cmpl $0x0, 0x610(%r14)
jle 0x3a49a
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x408(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x194a0
incq %r12
movslq 0x610(%r14), %rax
addq $0x9140, %r15           # imm = 0x9140
cmpq %rax, %r12
jl 0x3a472
movq %rbx, %rdi
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x185a0
movq 0x2f148(%rip), %rax     # 0x69600
movq 0x38(%rax), %rcx
leaq 0x1a9fa(%rip), %rdi     # 0x54ebd
movq %r14, %rsi
xorl %eax, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: ReadGame
void ReadGame(char* filename)
{
	FILE* f;
	int		i;
	char	str[MAX_INFO_STRING] = { 0 };
	size_t	count;

	gi.FreeTags(TAG_GAME);

	f = fopen(filename, "rb");
	if (!f)
	{
		gi.error("Couldn't open %s", filename);
		return;
	}

	count = fread(str, sizeof(str), 1, f);
	if (count)
		; // don't worry, be happy
	if (strcmp(str, __DATE__))
	{
		fclose(f);
		gi.error("Savegame from an older version.\n");
	}

	g_edicts = gi.TagMalloc(game.maxentities * sizeof(g_edicts[0]), TAG_GAME);
	globals.edicts = g_edicts;

	count = fread(&game, sizeof(game), 1, f);
	game.clients = gi.TagMalloc(game.maxclients * sizeof(game.clients[0]), TAG_GAME);
	for (i = 0; i < game.maxclients; i++)
		ReadClient(f, &game.clients[i]);

	fclose(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %r14
movq %rsp, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x18880
movq 0x2f100(%rip), %r15     # 0x69600
movl $0x2fd, %edi            # imm = 0x2FD
callq *0x118(%r15)
leaq 0x1dcb1(%rip), %rsi     # 0x581c4
movq %r14, %rdi
callq 0x19470
testq %rax, %rax
je 0x3a628
movq %rax, %rbx
movq %rsp, %r14
movl $0x200, %esi            # imm = 0x200
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rcx
callq 0x183f0
movabsq $0x3220323120677541, %rax # imm = 0x3220323120677541
xorq (%r14), %rax
movl 0x8(%r14), %ecx
xorq $0x353230, %rcx         # imm = 0x353230
orq %rax, %rcx
je 0x3a571
movq %rbx, %rdi
callq 0x185a0
leaq 0x1e94a(%rip), %rdi     # 0x58eb5
xorl %eax, %eax
callq *0x38(%r15)
movq 0x2f7c8(%rip), %r14     # 0x69d40
imull $0x4a8, 0x614(%r14), %edi # imm = 0x4A8
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r15)
movq 0x2efc2(%rip), %rcx     # 0x69558
movq %rax, (%rcx)
movq 0x2f568(%rip), %rcx     # 0x69b08
movq %rax, 0x80(%rcx)
movl $0x628, %esi            # imm = 0x628
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x183f0
imull $0x9140, 0x610(%r14), %edi # imm = 0x9140
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r15)
movq %rax, 0x408(%r14)
cmpl $0x0, 0x610(%r14)
jle 0x3a612
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x408(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x19290
incq %r12
movslq 0x610(%r14), %rax
addq $0x9140, %r15           # imm = 0x9140
cmpq %rax, %r12
jl 0x3a5ea
movq %rbx, %rdi
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x185a0
movq 0x38(%r15), %rcx
leaq 0x1a88a(%rip), %rdi     # 0x54ebd
movq %r14, %rsi
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: WriteEdict
void WriteEdict(FILE* f, edict_t* ent)
{
	field_t* field;
	edict_t		temp;

	// all of the ints, floats, and vectors stay as they are
	temp = *ent;

	// change the pointers to lengths or indexes
	for (field = fields; field->name; field++)
	{
		WriteField1(f, field, (byte*)&temp);
	}

	// write the block
	fwrite(&temp, sizeof(temp), 1, f);

	// now write any allocated data following the edict
	for (field = fields; field->name; field++)
	{
		WriteField2(f, field, (byte*)ent);
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
movl $0x4a8, %edx            # imm = 0x4A8
callq 0x18c80
movq 0x2f3d0(%rip), %r15     # 0x69a40
cmpq $0x0, (%r15)
je 0x3a68f
movq %rsp, %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0x18540
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x3a679
movq %rsp, %rdi
movl $0x4a8, %esi            # imm = 0x4A8
movl $0x1, %edx
movq %r14, %rcx
callq 0x19720
movq 0x2f395(%rip), %r15     # 0x69a40
cmpq $0x0, (%r15)
je 0x3a6ca
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x191b0
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x3a6b1
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: WriteLevelLocals
void WriteLevelLocals(FILE* f)
{
	field_t* field;
	level_locals_t		temp;

	// all of the ints, floats, and vectors stay as they are
	temp = level;

	// change the pointers to lengths or indexes
	for (field = levelfields; field->name; field++)
	{
		WriteField1(f, field, (byte*)&temp);
	}

	// write the block
	fwrite(&temp, sizeof(temp), 1, f);

	// now write any allocated data following the edict
	for (field = levelfields; field->name; field++)
	{
		WriteField2(f, field, (byte*)&level);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq %rdi, %rbx
movq 0x2f6b1(%rip), %rsi     # 0x69da0
leaq 0x8(%rsp), %rdi
movl $0x158, %edx            # imm = 0x158
callq 0x18c80
movq 0x2eff3(%rip), %r14     # 0x696f8
cmpq $0x0, (%r14)
je 0x3a726
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x18540
cmpq $0x0, 0x18(%r14)
leaq 0x18(%r14), %r14
jne 0x3a710
leaq 0x8(%rsp), %rdi
movl $0x158, %esi            # imm = 0x158
movl $0x1, %edx
movq %rbx, %rcx
callq 0x19720
movq 0x2efb4(%rip), %r14     # 0x696f8
cmpq $0x0, (%r14)
je 0x3a76a
movq 0x2f64f(%rip), %r15     # 0x69da0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x191b0
cmpq $0x0, 0x18(%r14)
leaq 0x18(%r14), %r14
jne 0x3a751
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: ReadEdict
void ReadEdict(FILE* f, edict_t* ent)
{
	field_t* field;
	size_t	count;

	count = fread(ent, sizeof(*ent), 1, f);
	if (count)
		; // don't worry, be happy

	for (field = fields; field->name; field++)
	{
		ReadField(f, field, (byte*)ent);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4a8, %esi            # imm = 0x4A8
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x183f0
movq 0x2f2a2(%rip), %r15     # 0x69a40
cmpq $0x0, (%r15)
je 0x3a7bd
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x198c0
cmpq $0x0, 0x18(%r15)
leaq 0x18(%r15), %r15
jne 0x3a7a4
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: ReadLevelLocals
void ReadLevelLocals(FILE* f)
{
	field_t* field;
	size_t	count;

	count = fread(&level, sizeof(level), 1, f);
	if (count)
		; // don't worry, be happy

	for (field = levelfields; field->name; field++)
	{
		ReadField(f, field, (byte*)&level);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x2f5ce(%rip), %rdi     # 0x69da0
movl $0x158, %esi            # imm = 0x158
movl $0x1, %edx
movq %rbx, %rcx
callq 0x183f0
movq 0x2ef0d(%rip), %r14     # 0x696f8
cmpq $0x0, (%r14)
je 0x3a811
movq 0x2f5a8(%rip), %r15     # 0x69da0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x198c0
cmpq $0x0, 0x18(%r14)
leaq 0x18(%r14), %r14
jne 0x3a7f8
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: WriteLevel
void WriteLevel(char* filename)
{
	int		i;
	edict_t* ent;
	FILE* f;
	void	(*base)(void);	/* Pointer to function with no arguments */

	f = fopen(filename, "wb");
	if (!f)
	{
		gi.error("Couldn't open %s", filename);
		return;
	}

	// write out edict size for checking
	i = sizeof(edict_t);
	fwrite(&i, sizeof(i), 1, f);

	// write out a function pointer for checking
	base = InitGame;
	fwrite(&base, sizeof(base), 1, f);

	// write out level_locals_t
	WriteLevelLocals(f);

	// write out all the entities
	for (i = 0; i < globals.num_edicts; i++)
	{
		ent = &g_edicts[i];
		if (!ent->inuse)
			continue;
		fwrite(&i, sizeof(i), 1, f);
		WriteEdict(f, ent);
	}
	i = -1;
	fwrite(&i, sizeof(i), 1, f);

	fclose(f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x1d999(%rip), %rsi     # 0x581c7
callq 0x19470
testq %rax, %rax
je 0x3a92e
movq %rax, %rbx
leaq 0x4(%rsp), %r14
movl $0x4a8, (%r14)          # imm = 0x4A8
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rax, %rcx
callq 0x19720
movq 0x2ee21(%rip), %rax     # 0x69688
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x19720
movq %rbx, %rdi
callq 0x19940
movl $0x0, (%r14)
movq 0x2f271(%rip), %r12     # 0x69b08
cmpl $0x0, 0x8c(%r12)
jle 0x3a8fc
xorl %eax, %eax
movq 0x2ecad(%rip), %r13     # 0x69558
leaq 0x4(%rsp), %r14
movq (%r13), %r15
cltq
imulq $0x4a8, %rax, %rax      # imm = 0x4A8
cmpl $0x0, 0x60(%r15,%rax)
je 0x3a8e8
addq %rax, %r15
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x19720
movq %rbx, %rdi
movq %r15, %rsi
callq 0x181d0
movl 0x4(%rsp), %eax
incl %eax
movl %eax, 0x4(%rsp)
cmpl 0x8c(%r12), %eax
jl 0x3a8b0
leaq 0x4(%rsp), %rdi
movl $0xffffffff, (%rdi)     # imm = 0xFFFFFFFF
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x19720
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x185a0
movq 0x2eccb(%rip), %rax     # 0x69600
movq 0x38(%rax), %rcx
leaq 0x1a57d(%rip), %rdi     # 0x54ebd
movq %r14, %rsi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: SP_info_flag_red
void SP_info_flag_red(edict_t *self)
{
	if (!deathmatch->value)
	{
		G_FreeEdict (self);
		return;
	}
	SP_misc_teleporter_dest (self);
	self->s.effects |= EF_COLOR_SHELL;
	self->s.renderfx |= RF_SHELL_RED;
	self->classname = "info_flag_red";
	redflag = self;
	putonfloor(self);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x2ed31(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3b1a1
jnp 0x3b1d2
movq %rbx, %rdi
callq 0x18510
orb $0x1, 0x41(%rbx)
orb $0x4, 0x45(%rbx)
leaq 0x18d98(%rip), %rax     # 0x53f50
movq %rax, 0x138(%rbx)
movq 0x2e632(%rip), %rax     # 0x697f8
movq %rbx, (%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x18670
movq %rbx, %rdi
popq %rbx
jmp 0x19a60
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: SP_info_flag_blue
void SP_info_flag_blue(edict_t *self)
{
	if (!deathmatch->value)
	{
		G_FreeEdict (self);
		return;
	}
	SP_misc_teleporter_dest (self);
	self->s.effects |= EF_COLOR_SHELL;
	self->s.renderfx |= RF_SHELL_BLUE;
	self->classname = "info_flag_blue";
	blueflag = self;
	putonfloor(self);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x2ecda(%rip), %rax     # 0x69ec0
movq (%rax), %rax
movss 0x20(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x3b1f8
jnp 0x3b229
movq %rbx, %rdi
callq 0x18510
orb $0x1, 0x41(%rbx)
orb $0x10, 0x45(%rbx)
leaq 0x18d4f(%rip), %rax     # 0x53f5e
movq %rax, 0x138(%rbx)
movq 0x2e643(%rip), %rax     # 0x69860
movq %rbx, (%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x18670
movq %rbx, %rdi
popq %rbx
jmp 0x19a60
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: WriteEntFile
void WriteEntFile (char *mapname, char *entities)
{
	FILE	*fp;
	char	name[MAX_INFO_STRING];

	strcpy (name, gamedir->string);
	strcat (name, "/ent/");
	strcat (name, mapname);
	strcat (name, ".ent");

	fp = fopen (name, "wt");
	fwrite(entities, 1, strlen(entities), fp);
	fclose(fp);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %rbx
movq %rdi, %r14
movq 0x2ec65(%rip), %rax     # 0x69eb0
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x182a0
movq %r15, %rdi
callq 0x18680
movl $0x746e652f, (%rsp,%rax) # imm = 0x746E652F
movw $0x2f, 0x4(%rsp,%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x19640
movq %r15, %rdi
callq 0x18680
movl $0x746e652e, (%rsp,%rax) # imm = 0x746E652E
movb $0x0, 0x4(%rsp,%rax)
leaq 0x1e0ca(%rip), %rsi     # 0x59363
movq %r15, %rdi
callq 0x19470
movq %rax, %r14
movq %rbx, %rdi
callq 0x18680
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0x19720
movq %r14, %rdi
callq 0x185a0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: ED_CallSpawn
void ED_CallSpawn (edict_t *ent)
{
	spawn_t	*s;
	gitem_t	*item;
	int		i;

	if (!ent->classname)
	{
		gi.dprintf ("ED_CallSpawn: NULL classname\n");
		return;
	}

	// check item spawn functions
	for (i=0,item=itemlist ; i<game.num_items ; i++,item++)
	{
		if (!item->classname)
			continue;
		if (!strcmp(item->classname, ent->classname))
		{	// found it
			SpawnItem (ent, item);
			return;
		}
	}

	// check normal spawn functions
	for (s=spawns ; s->name ; s++)
	{
		if (!strcmp(s->name, ent->classname))
		{	// found it
			s->spawn (ent);
			return;
		}
	}
	gi.dprintf ("%s doesn't have a spawn function\n", ent->classname);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x138(%rdi), %rbx
testq %rbx, %rbx
je 0x3b58e
movq %rdi, %r14
movq 0x2e836(%rip), %rax     # 0x69d40
movl 0x61c(%rax), %ebp
testl %ebp, %ebp
jle 0x3b53a
movq 0x2e925(%rip), %r15     # 0x69e40
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3b52f
movq %rbx, %rsi
callq 0x18b20
testl %eax, %eax
je 0x3b5ae
addq $0x88, %r15
decl %ebp
jne 0x3b51b
movq 0x2e81f(%rip), %rax     # 0x69d60
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3b56b
addq $0x10, %rax
movq %rax, %r15
movq %rbx, %rsi
callq 0x18b20
testl %eax, %eax
je 0x3b5c3
movq %r15, %rax
movq (%r15), %rdi
addq $0x10, %rax
testq %rdi, %rdi
jne 0x3b54d
movq 0x2e08e(%rip), %rax     # 0x69600
movq 0x8(%rax), %rcx
leaq 0x1df01(%rip), %rdi     # 0x5947e
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
movq 0x2e06b(%rip), %rax     # 0x69600
movq 0x8(%rax), %rcx
leaq 0x1dec0(%rip), %rdi     # 0x59460
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
movq %r14, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x18ec0
movq %r14, %rdi
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *-0x8(%rax)
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: ED_NewString
char *ED_NewString (char *string)
{
	char	*newb, *new_p;
	int		i;
	int		len;
	
	len = (int)strlen(string) + 1;

	newb = gi.TagMalloc (len, TAG_LEVEL);

	new_p = newb;

	for (i=0 ; i< len ; i++)
	{
		if (string[i] == '\\' && i < len-1)
		{
			i++;
			if (string[i] == 'n')
				*new_p++ = '\n';
			else
				*new_p++ = '\\';
		}
		else
			*new_p++ = string[i];
	}
	
	return newb;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x18680
movq %rax, %r14
leal 0x1(%rax), %edi
movq 0x2e011(%rip), %rax     # 0x69600
movl $0x2fe, %esi            # imm = 0x2FE
callq *0x108(%rax)
testl %r14d, %r14d
js 0x3b646
xorl %esi, %esi
movl $0xa, %ecx
movq %rax, %rdx
movslq %esi, %r8
movb (%rbx,%r8), %dil
cmpb $0x5c, %dil
setne %r9b
cmpl %r14d, %r8d
setge %r10b
orb %r9b, %r10b
jne 0x3b636
cmpb $0x6e, 0x1(%rbx,%r8)
leaq 0x1(%r8), %rsi
movl $0x5c, %edi
cmovel %ecx, %edi
movb %dil, (%rdx)
incq %rdx
leal 0x1(%rsi), %edi
cmpl %r14d, %esi
movl %edi, %esi
jl 0x3b609
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: ED_ParseEdict
char *ED_ParseEdict (char *data, edict_t *ent)
{
	qboolean	init;
	char		keyname[MAX_INFO_STRING];
	char		*com_token;

	init = false;
	memset (&st, 0, sizeof(st));

// go through all the dictionary pairs
	while (1)
	{	
	// parse key
		com_token = COM_Parse (&data);
		if (com_token[0] == '}')
			break;
		if (!data)
			gi.error ("ED_ParseEntity: EOF without closing brace");

		strncpy (keyname, com_token, sizeof(keyname)-1);
		
	// parse value	
		com_token = COM_Parse (&data);
		if (!data)
			gi.error ("ED_ParseEntity: EOF without closing brace");

		if (com_token[0] == '}')
			gi.error ("ED_ParseEntity: closing brace without data");

		init = true;	

	// keynames with a leading underscore are used for utility comments,
	// and are immediately discarded by quake
		if (keyname[0] == '_')
			continue;

		ED_ParseField (keyname, com_token, ent);
	}

	if (!init)
		memset (ent, 0, sizeof(*ent));

	return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
xorps %xmm0, %xmm0
movq 0x2de5b(%rip), %rcx     # 0x69668
movups %xmm0, (%rcx)
movups %xmm0, 0x10(%rcx)
movups %xmm0, 0x20(%rcx)
movups %xmm0, 0x30(%rcx)
movups %xmm0, 0x40(%rcx)
movups %xmm0, 0x50(%rcx)
movq %rax, %rdi
callq 0x19190
cmpb $0x7d, (%rax)
jne 0x3b845
movl $0x4a8, %edx            # imm = 0x4A8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x18880
jmp 0x3b8d5
movq %rax, %rbp
movq 0x2ddb1(%rip), %r13     # 0x69600
leaq 0x1dcb0(%rip), %r14     # 0x59506
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
cmpq $0x0, 0x8(%rsp)
jne 0x3b871
movq %r14, %rdi
xorl %eax, %eax
callq *0x38(%r13)
movl $0x1ff, %edx            # imm = 0x1FF
movq %r15, %rdi
movq %rbp, %rsi
callq 0x181c0
movq %r12, %rdi
callq 0x19190
movq %rax, %rbp
cmpq $0x0, 0x8(%rsp)
jne 0x3b89d
movq %r14, %rdi
xorl %eax, %eax
callq *0x38(%r13)
cmpb $0x7d, (%rbp)
jne 0x3b8b0
leaq 0x1dc86(%rip), %rdi     # 0x59530
xorl %eax, %eax
callq *0x38(%r13)
cmpb $0x5f, 0x10(%rsp)
je 0x3b8c5
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x18920
movq %r12, %rdi
callq 0x19190
movq %rax, %rbp
cmpb $0x7d, (%rax)
jne 0x3b860
movq 0x8(%rsp), %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: G_FindTeams
void G_FindTeams (void)
{
	edict_t	*e, *e2, *chain;
	int		i, j;
	int		c, c2;

	c = 0;
	c2 = 0;
	for (i=1, e=g_edicts+i ; i < globals.num_edicts ; i++,e++)
	{
		if (!e->inuse)
			continue;
		if (!e->team)
			continue;
		if (e->flags & FL_TEAMSLAVE)
			continue;
		chain = e;
		e->teammaster = e;
		c++;
		c2++;
		for (j=i+1, e2=e+1 ; j < globals.num_edicts ; j++,e2++)
		{
			if (!e2->inuse)
				continue;
			if (!e2->team)
				continue;
			if (e2->flags & FL_TEAMSLAVE)
				continue;
			if (!strcmp(e->team, e2->team))
			{
				c2++;
				chain->teamchain = e2;
				e2->teammaster = e;
				chain = e2;
				e2->flags |= FL_TEAMSLAVE;
			}
		}
	}

	gi.dprintf ("%i teams with %i entities\n", c, c2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x2e207(%rip), %rax     # 0x69b08
movl 0x8c(%rax), %ecx
xorl %esi, %esi
movl $0x0, %edx
cmpl $0x2, %ecx
jl 0x3ba1f
movq 0x2dc3a(%rip), %rax     # 0x69558
movq (%rax), %rdi
leal -0x2(%rcx), %r15d
movl $0x1, %r13d
xorl %edx, %edx
xorl %esi, %esi
movq %rcx, 0x20(%rsp)
movq %rdi, %rbp
addq $0x4a8, %rdi            # imm = 0x4A8
cmpl $0x0, 0x508(%rbp)
je 0x3ba10
movq 0x610(%rbp), %r14
testq %r14, %r14
je 0x3ba10
testb $0x4, 0x5c5(%rbp)
jne 0x3ba10
movq %rdi, 0x778(%rbp)
incl %esi
incl %edx
leal 0x1(%r13), %eax
cmpl %ecx, %eax
jge 0x3ba10
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
addq $0x950, %rbp            # imm = 0x950
movl %r15d, %r12d
movq %rdi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
cmpl $0x0, 0x60(%rbp)
je 0x3b9f2
movq 0x168(%rbp), %rsi
testq %rsi, %rsi
je 0x3b9f2
movl 0x11c(%rbp), %ebx
btl $0xa, %ebx
jb 0x3b9f2
movq %r14, %rdi
callq 0x18b20
testl %eax, %eax
jne 0x3b9f2
incl 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rbp, 0x2c8(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x2d0(%rbp)
orl $0x400, %ebx            # imm = 0x400
movl %ebx, 0x11c(%rbp)
movq %rbp, 0x18(%rsp)
addq $0x4a8, %rbp            # imm = 0x4A8
decl %r12d
jne 0x3b99b
movl 0x8(%rsp), %edx
movq 0x20(%rsp), %rcx
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdi
incl %r13d
decl %r15d
cmpl %ecx, %r13d
jne 0x3b934
movq 0x2dbda(%rip), %rax     # 0x69600
movq 0x8(%rax), %rcx
leaq 0x1db2a(%rip), %rdi     # 0x5955b
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_spawn.c
// Function: putonfloor
void putonfloor (edict_t *ent)
{
	trace_t		tr;
	vec3_t		dest;
	float		*v;

	v = tv(0,0,-128);
	VectorAdd (ent->s.origin, v, dest);

	tr = gi.trace (ent->s.origin, ent->mins, ent->maxs, dest, ent, MASK_SOLID);
	if (tr.startsolid)
	{
		// If we start solid, don't move us
		return;
	}

	VectorCopy (tr.endpos, ent->s.origin);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movss 0x189f7(%rip), %xmm2    # 0x5444c
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
callq 0x19510
leaq 0x4(%rbx), %rsi
movss 0x4(%rbx), %xmm0
addss (%rax), %xmm0
leaq 0x14(%rsp), %r8
movss %xmm0, (%r8)
movss 0x8(%rbx), %xmm0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%r8)
movss 0xc(%rbx), %xmm0
addss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%r8)
movq 0x2db62(%rip), %rax     # 0x69600
leaq 0xcc(%rbx), %rdx
leaq 0xd8(%rbx), %rcx
movl $0x3, (%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %r9
callq *0x60(%rax)
cmpl $0x0, 0x4(%r14)
jne 0x3bae9
movss 0x2c(%rsp), %xmm0
movss 0x30(%rsp), %xmm1
movss 0x34(%rsp), %xmm2
movss %xmm0, 0x4(%rbx)
movss %xmm1, 0x8(%rbx)
movss %xmm2, 0xc(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_svcmds.c
// Function: SV_FilterPacket
qboolean SV_FilterPacket (char *from)
{
	int		i;
	unsigned	in;
	byte m[4] = { 0 };
	char *p;

	i = 0;
	p = from;
	while (*p && i < 4) {
		m[i] = 0;
		while (*p >= '0' && *p <= '9') {
			m[i] = m[i]*10 + (*p - '0');
			p++;
		}
		if (!*p || *p == ':')
			break;
		i++, p++;
	}
	
	memcpy(&in, m, sizeof in);

	for (i=0 ; i<numipfilters ; i++)
		if ( (in & ipfilters[i].mask) == ipfilters[i].compare)
			return (int)filterban->value;

	return (int)!filterban->value;
}

// Assembly:
movl $0x0, -0x4(%rsp)
cmpb $0x0, (%rdi)
je 0x3bf4e
xorl %eax, %eax
movb $0x0, -0x4(%rsp,%rax)
movb (%rdi), %cl
leal -0x30(%rcx), %edx
cmpb $0x9, %dl
ja 0x3bf2c
movb -0x4(%rsp,%rax), %dl
movzbl %dl, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
addb %cl, %dl
addb $-0x30, %dl
movb %dl, -0x4(%rsp,%rax)
movb 0x1(%rdi), %cl
incq %rdi
leal -0x30(%rcx), %esi
cmpb $0xa, %sil
jb 0x3bf0c
testb %cl, %cl
je 0x3bf4e
movzbl %cl, %ecx
cmpl $0x3a, %ecx
je 0x3bf4e
cmpb $0x0, 0x1(%rdi)
je 0x3bf4e
leaq 0x1(%rax), %rcx
incq %rdi
cmpq $0x3, %rax
movq %rcx, %rax
jb 0x3bef9
movq 0x2d85b(%rip), %rax     # 0x697b0
movslq (%rax), %rax
testq %rax, %rax
jle 0x3bf7d
movl -0x4(%rsp), %ecx
xorl %edx, %edx
movq 0x2de3e(%rip), %rsi     # 0x69da8
movl (%rsi,%rdx,8), %edi
andl %ecx, %edi
cmpl 0x4(%rsi,%rdx,8), %edi
je 0x3bf98
incq %rdx
cmpq %rdx, %rax
jne 0x3bf6a
movq 0x2de4c(%rip), %rax     # 0x69dd0
movq (%rax), %rax
xorps %xmm0, %xmm0
cmpeqss 0x20(%rax), %xmm0
movd %xmm0, %eax
andl $0x1, %eax
retq
movq 0x2de31(%rip), %rax     # 0x69dd0
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_svcmds.c
// Function: SVCmd_AddIP_f
void SVCmd_AddIP_f (void)
{
	int		i;
	
	if (gi.argc() < 3) {
		gi.cprintf(NULL, PRINT_HIGH, "Usage:  addip <ip-mask>\n");
		return;
	}

	for (i=0 ; i<numipfilters ; i++)
		if (ipfilters[i].compare == 0xffffffff)
			break;		// free spot
	if (i == numipfilters)
	{
		if (numipfilters == MAX_IPFILTERS)
		{
			gi.cprintf (NULL, PRINT_HIGH, "IP filter list is full\n");
			return;
		}
		numipfilters++;
	}
	
	if (!StringToFilter (gi.argv(2), &ipfilters[i]))
		ipfilters[i].compare = 0xffffffff;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2d64d(%rip), %rbx     # 0x69600
callq *0x138(%rbx)
cmpl $0x3, %eax
jge 0x3bfdb
movq 0x10(%rbx), %rcx
leaq 0x1ddb1(%rip), %rdx     # 0x59d7a
xorl %edi, %edi
movl $0x2, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
movq 0x2d7ce(%rip), %rax     # 0x697b0
movl (%rax), %ecx
xorl %r14d, %r14d
testl %ecx, %ecx
jle 0x3c005
movq 0x2ddb6(%rip), %rdx     # 0x69da8
cmpl $-0x1, 0x4(%rdx,%r14,8)
je 0x3c005
incq %r14
cmpq %r14, %rcx
jne 0x3bff2
movl %ecx, %r14d
cmpl %ecx, %r14d
jne 0x3c023
cmpl $0x400, %ecx            # imm = 0x400
jne 0x3c01f
movq 0x10(%rbx), %rcx
leaq 0x1dd76(%rip), %rdx     # 0x59d93
jmp 0x3bfc9
incl %ecx
movl %ecx, (%rax)
movl $0x2, %edi
callq *0x140(%rbx)
movl %r14d, %ebx
shlq $0x3, %rbx
addq 0x2dd6c(%rip), %rbx     # 0x69da8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3c05a
testl %eax, %eax
jne 0x3c052
movl $0xffffffff, 0x4(%rbx)  # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/QwazyWabbitWOS[P]lmctf60/g_svcmds.c
// Function: StringToFilter
static qboolean StringToFilter (char *s, ipfilter_t *f)
{
	char	num[128];
	int		i, j;
	byte	b[4];
	byte	m[4];
	
	for (i=0 ; i<4 ; i++)
	{
		b[i] = 0;
		m[i] = 0;
	}
	
	for (i=0 ; i<4 ; i++)
	{
		if (*s < '0' || *s > '9')
		{
			gi.cprintf(NULL, PRINT_HIGH, "Bad filter address: %s\n", s);
			return false;
		}
		
		j = 0;
		while (*s >= '0' && *s <= '9')
		{
			num[j++] = *s++;
		}
		num[j] = 0;
		b[i] = atoi(num);
		if (b[i] != 0)
			m[i] = 255;

		if (!*s)
			break;
		s++;
	}
	
	memcpy(&f->mask, m, sizeof f->mask);
	memcpy(&f->compare, b, sizeof f->compare);

	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %r12d, %r12d
movl %r12d, 0xc(%rsp)
movl %r12d, 0x8(%rsp)
leaq 0x10(%rsp), %r15
movb (%rbx), %al
addb $-0x3a, %al
cmpb $-0xa, %al
jb 0x3c0f9
movb (%rbx), %al
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x3c0ae
xorl %ecx, %ecx
movb %al, 0x10(%rsp,%rcx)
movb 0x1(%rbx,%rcx), %al
incq %rcx
leal -0x30(%rax), %edx
cmpb $0xa, %dl
jb 0x3c094
movl %ecx, %eax
addq %rcx, %rbx
jmp 0x3c0b0
xorl %eax, %eax
movb $0x0, 0x10(%rsp,%rax)
movq %r15, %rdi
callq 0x195e0
movb %al, 0xc(%rsp,%r12)
testb %al, %al
je 0x3c0cc
movb $-0x1, 0x8(%rsp,%r12)
cmpb $0x0, (%rbx)
je 0x3c0e2
incq %rbx
leaq 0x1(%r12), %rax
cmpq $0x3, %r12
movq %rax, %r12
jb 0x3c080
movl 0x8(%rsp), %eax
movl %eax, (%r14)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%r14)
movl $0x1, %r14d
jmp 0x3c11a
movq 0x2d500(%rip), %r8      # 0x69600
leaq 0x1ddfb(%rip), %rdx     # 0x59f02
xorl %r14d, %r14d
xorl %edi, %edi
movl $0x2, %esi
movq %rbx, %rcx
xorl %eax, %eax
callq *0x10(%r8)
movl %r14d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq