LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: TestFaceIntersect(intersecttest_t*, int)
bool TestFaceIntersect (intersecttest_t *t, int facenum)
{
	dface_t *f2 = &g_dfaces[facenum];
	Winding *w = new Winding (*f2);
	int k;
	for (k = 0; k < w->m_NumPoints; k++)
	{
		VectorAdd (w->m_Points[k], g_face_offset[facenum], w->m_Points[k]);
	}
	for (k = 0; k < t->numclipplanes; k++)
	{
		if (!w->Clip (t->clipplanes[k], false
#ifdef ZHLT_WINDING_EPSILON
			, ON_EPSILON*4
#endif
			))
		{
			break;
		}
	}
	bool intersect = w->m_NumPoints > 0;
	delete w;
	return intersect;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movslq %esi, %r12
leaq (%r12,%r12,4), %r15
shlq $0x2, %r15
addq 0x320ab(%rip), %r15     # 0x47fe0
movl $0x20, %edi
callq 0x42f0
movq %rax, %rbx
movss 0x25b3a(%rip), %xmm0    # 0x3ba84
movq %rax, %rdi
movq %r15, %rsi
callq 0xc700
cmpl $0x0, 0x8(%rbx)
je 0x15fb9
leaq (%r12,%r12,2), %rax
shlq $0x2, %rax
addq 0x3200e(%rip), %rax     # 0x47f78
xorl %ecx, %ecx
xorl %edx, %edx
movq 0x10(%rbx), %rsi
movss (%rsi,%rcx), %xmm0
addss (%rax), %xmm0
movss %xmm0, (%rsi,%rcx)
movq 0x10(%rbx), %rsi
movss 0x4(%rsi,%rcx), %xmm0
addss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%rsi,%rcx)
movq 0x10(%rbx), %rsi
movss 0x8(%rsi,%rcx), %xmm0
addss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%rsi,%rcx)
incq %rdx
movl 0x8(%rbx), %esi
addq $0xc, %rcx
cmpq %rsi, %rdx
jb 0x15f6e
cmpl $0x0, (%r14)
jle 0x15ff1
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
xorl %edx, %edx
movss 0x25aaf(%rip), %xmm0    # 0x3ba88
callq 0xd0d2
testb %al, %al
je 0x15ff1
incq %r12
movslq (%r14), %rax
addq $0x14, %r15
cmpq %rax, %r12
jl 0x15fc5
movq (%rbx), %rax
cmpl $0x0, 0x8(%rbx)
setne %bpl
movq %rbx, %rdi
callq *0x8(%rax)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x20, %esi
movq %rbx, %rdi
callq 0x4300
movq %r14, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: AddFaceForVertexNormal_printerror(int, int, dface_t*)
void AddFaceForVertexNormal_printerror (const int edgeabs, const int edgeend, dface_t *const f)
{
	if (DEVELOPER_LEVEL_WARNING <= g_developer)
	{
		int i, e;
		Log ("AddFaceForVertexNormal - bad face:\n");
		Log (" edgeabs=%d edgeend=%d\n", edgeabs, edgeend);
		for (i = 0; i < f->numedges; i++)
		{
			e = g_dsurfedges[f->firstedge + i];
			edgeshare_t *es = &g_edgeshare[abs(e)];
			int v0 = g_dedges[abs(e)].v[0], v1 = g_dedges[abs(e)].v[1];
			Log (" e=%d v0=%d(%f,%f,%f) v1=%d(%f,%f,%f) share0=%d share1=%d\n", e,
				v0, g_dvertexes[v0].point[0], g_dvertexes[v0].point[1], g_dvertexes[v0].point[2],
				v1, g_dvertexes[v1].point[0], g_dvertexes[v1].point[1], g_dvertexes[v1].point[2],
				(es->faces[0]==NULL? -1: es->faces[0]-g_dfaces), (es->faces[1]==NULL? -1: es->faces[1]-g_dfaces));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x20a914f(%rip), %rax   # 0x20bf440
cmpl $0x2, (%rax)
jl 0x16420
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
leaq 0x25adb(%rip), %rdi     # 0x3bde4
xorl %eax, %eax
callq 0x9d2e
leaq 0x25af1(%rip), %rdi     # 0x3be08
movl %r14d, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x9d2e
cmpw $0x0, 0x8(%rbx)
jle 0x16420
xorl %r15d, %r15d
leaq 0x21365d8(%rip), %r13   # 0x214c910
leaq 0x1d1b0c1(%rip), %rbp   # 0x1d31400
leaq 0x101b0ba(%rip), %r12   # 0x1031400
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
movslq 0x4(%rbx), %rax
addq %r15, %rax
leaq 0x1e350c2(%rip), %rcx   # 0x1e4b420
movl (%rcx,%rax,4), %esi
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
imulq $0xb0, %rax, %rcx
movq (%rcx,%r13), %rdx
movq $-0x1, %r9
movq $-0x1, %r8
testq %rdx, %rdx
je 0x16398
subq 0x31c53(%rip), %rdx     # 0x47fe0
sarq $0x2, %rdx
imulq %r14, %rdx
movq %rdx, %r8
addq %r13, %rcx
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0x163b6
subq 0x31c35(%rip), %rcx     # 0x47fe0
sarq $0x2, %rcx
imulq %r14, %rcx
movq %rcx, %r9
movzwl (%rbp,%rax,4), %edx
leaq (%rdx,%rdx,2), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%r12,%rcx,4), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%r12,%rcx,4), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x8(%r12,%rcx,4), %xmm2
movzwl 0x2(%rbp,%rax,4), %ecx
leaq (%rcx,%rcx,2), %rax
xorps %xmm3, %xmm3
cvtss2sd (%r12,%rax,4), %xmm3
xorps %xmm4, %xmm4
cvtss2sd 0x4(%r12,%rax,4), %xmm4
xorps %xmm5, %xmm5
cvtss2sd 0x8(%r12,%rax,4), %xmm5
leaq 0x25a17(%rip), %rdi     # 0x3be20
movb $0x6, %al
callq 0x9d2e
movswl 0x8(%rbx), %eax
incq %r15
cmpl %eax, %r15d
jl 0x16350
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: MLH_AddFace(mdllight_t*, int)
int MLH_AddFace (mdllight_t *ml, int facenum)
{
	dface_t *f = &g_dfaces[facenum];
	int i, j;
	for (i = 0; i < ml->facecount; i++)
	{
		if (ml->face[i].num == facenum)
		{
			return -1;
		}
	}
	if (ml->facecount >= MLH_MAXFACECOUNT)
	{
		return -1;
	}
	i = ml->facecount;
	ml->facecount++;
	ml->face[i].num = facenum;
	ml->face[i].samplecount = 0;
	for (j = 0; j < ALLSTYLES; j++)
	{
		ml->face[i].style[j].exist = false;
	}
	for (j = 0; j < MAXLIGHTMAPS && f->styles[j] != 255; j++)
	{
		ml->face[i].style[f->styles[j]].exist = true;
		ml->face[i].style[f->styles[j]].seq = j;
	}
	return i;
}

// Assembly:
movslq 0xa518(%rdi), %rcx
testq %rcx, %rcx
jle 0x20f9a
imulq $0xa50, %rcx, %rax      # imm = 0xA50
xorl %edx, %edx
cmpl %esi, 0x18(%rdi,%rdx)
je 0x21015
addq $0xa50, %rdx            # imm = 0xA50
cmpq %rdx, %rax
jne 0x20f84
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0xf, %ecx
jg 0x21014
movslq %esi, %rdx
leal 0x1(%rcx), %eax
movl %eax, 0xa518(%rdi)
imulq $0xa50, %rcx, %rax      # imm = 0xA50
addq %rdi, %rax
addq $0x18, %rax
movl %edx, (%rax)
movl $0x0, 0xa48(%rax)
xorl %esi, %esi
movb $0x0, 0x4(%rax,%rsi,8)
incq %rsi
cmpq $0x40, %rsi
jne 0x20fcc
leaq (%rdx,%rdx,4), %rdx
leaq 0x1b9041b(%rip), %rsi   # 0x1bb1400
leaq (%rsi,%rdx,4), %rdx
addq $0xc, %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %edi
cmpq $0xff, %rdi
je 0x21012
movb $0x1, 0x4(%rax,%rdi,8)
movzbl (%rdx,%rsi), %edi
movl %esi, 0x8(%rax,%rdi,8)
incq %rsi
cmpq $0x4, %rsi
jne 0x20fef
movl %ecx, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: MLH_AddSample(mdllight_t*, int, int, int, int, int, float const*)
void MLH_AddSample (mdllight_t *ml, int facenum, int w, int h, int s, int t, const vec3_t pos)
{
	dface_t *f = &g_dfaces[facenum];
	int i, j;
	int r = MLH_AddFace (ml, facenum);
	if (r == -1)
	{
		return;
	}
	int size = w * h;
	int num = s + w * t;
	for (i = 0; i < ml->face[r].samplecount; i++)
	{
		if (ml->face[r].sample[i].num == num)
		{
			return;
		}
	}
	if (ml->face[r].samplecount >= MLH_MAXSAMPLECOUNT)
	{
		return;
	}
	i = ml->face[r].samplecount;
	ml->face[r].samplecount++;
	ml->face[r].sample[i].num = num;
	VectorCopy (pos, ml->face[r].sample[i].pos);
	for (j = 0; j < ALLSTYLES; j++)
	{
		if (ml->face[r].style[j].exist)
		{
			ml->face[r].sample[i].style[j] = &g_dlightdata[f->lightofs + (num + size * ml->face[r].style[j].seq) * 3];
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %r13d
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
callq 0x20f6f
cmpl $-0x1, %eax
je 0x2112e
imull %r15d, %ebx
addl %r13d, %ebx
cltq
imulq $0xa50, %rax, %rax      # imm = 0xA50
leaq (%r14,%rax), %rcx
addq $0x18, %rcx
movslq 0xa48(%rcx), %rdx
testq %rdx, %rdx
jle 0x2108b
imulq $0x210, %rdx, %rsi      # imm = 0x210
xorl %edi, %edi
cmpl %ebx, 0x208(%rcx,%rdi)
je 0x2112e
addq $0x210, %rdi            # imm = 0x210
cmpq %rdi, %rsi
jne 0x21072
cmpl $0x3, %edx
jg 0x2112e
movq 0x40(%rsp), %rsi
movslq %r12d, %rdi
imull %r15d, %ebp
leal 0x1(%rdx), %r8d
movl %r8d, 0xa48(%rcx)
imulq $0x210, %rdx, %rdx      # imm = 0x210
addq %rdx, %rcx
addq $0x208, %rcx            # imm = 0x208
movl %ebx, (%rcx)
movss (%rsi), %xmm0
movss %xmm0, 0x4(%rcx)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x8(%rcx)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0xc(%rcx)
leaq (%rdi,%rdi,4), %rdx
leaq 0x1b9031a(%rip), %rsi   # 0x1bb1400
leaq (%rsi,%rdx,4), %rdx
addq $0x10, %rdx
addq %r14, %rax
addq $0x20, %rax
xorl %esi, %esi
leaq 0x83038a(%rip), %rdi    # 0x851488
cmpb $0x1, -0x4(%rax,%rsi,8)
jne 0x21125
movslq (%rdx), %r8
movl (%rax,%rsi,8), %r9d
imull %ebp, %r9d
addl %ebx, %r9d
movslq %r9d, %r9
leaq (%r9,%r9,2), %r9
addq %r8, %r9
addq (%rdi), %r9
movq %r9, 0x10(%rcx,%rsi,8)
incq %rsi
cmpq $0x40, %rsi
jne 0x210fe
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: MLH_mdllightCreate(mdllight_t*)
void MLH_mdllightCreate (mdllight_t *ml)
{
	// code from Quake
	float p[3];
	float end[3];
	ml->facecount = 0;
	VectorCopy (ml->origin, ml->floor);
	VectorCopy (ml->origin, p);
	VectorCopy (ml->origin, end);
	end[2] -= 2048;
	MLH_GetSamples_r (ml, 0, p, end);
}

// Assembly:
subq $0x28, %rsp
movl $0x0, 0xa518(%rdi)
movsd (%rdi), %xmm0
movsd %xmm0, 0xc(%rdi)
movss 0x8(%rdi), %xmm1
movss %xmm1, 0x14(%rdi)
leaq 0x18(%rsp), %rdx
movsd %xmm0, (%rdx)
movss %xmm1, 0x8(%rdx)
leaq 0x8(%rsp), %rcx
movsd %xmm0, (%rcx)
addss 0x1a60a(%rip), %xmm1    # 0x3bad8
movss %xmm1, 0x8(%rcx)
xorl %esi, %esi
callq 0x21196
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: MdlLightHack()
void MdlLightHack ()
{
	int ient;
	entity_t *ent1, *ent2;
	vec3_t origin1, origin2;
	const char *target;
#ifndef HLRAD_MDL_LIGHT_HACK_NEW
    double start, end;
#endif
	int used = 0, countent = 0, countsample = 0, r;
#ifndef HLRAD_MDL_LIGHT_HACK_NEW
    start = I_FloatTime();
#endif
	for (ient = 0; ient < g_numentities; ++ient)
	{
		ent1 = &g_entities[ient];
		target = ValueForKey (ent1, "zhlt_copylight");
		if (!strcmp (target, ""))
			continue;
		used = 1;
		ent2 = FindTargetEntity (target);
		if (ent2 == NULL)
		{
			Warning ("target entity '%s' not found", target);
			continue;
		}
		GetVectorForKey (ent1, "origin", origin1);
		GetVectorForKey (ent2, "origin", origin2);
		r = MLH_CopyLight (origin2, origin1);
		if (r < 0)
			Warning ("can not copy light from (%f,%f,%f)", origin2[0], origin2[1], origin2[2]);
		else
		{
			countent += 1;
			countsample += r;
		}
	}
#ifndef HLRAD_MDL_LIGHT_HACK_NEW
    end = I_FloatTime();
#endif
	if (used)
#ifdef HLRAD_MDL_LIGHT_HACK_NEW
		Log ("Adjust mdl light: modified %d samples for %d entities\n", countsample, countent);
#else
		Log("Mdl Light Hack: %d entities %d samples (%.2f seconds)\n", countent, countsample, end - start);
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x201dd18(%rip), %rax   # 0x203f424
cmpl $0x0, (%rax)
jle 0x21803
leaq 0x201dd14(%rip), %r14   # 0x203f430
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %r14, %rdi
leaq 0x1ac3c(%rip), %rsi     # 0x3c372
callq 0x7571
cmpb $0x0, (%rax)
je 0x217dd
movq %rax, %r12
movq %rax, %rdi
callq 0x80c1
testq %rax, %rax
je 0x2179b
movq %rax, %r13
movq %r14, %rdi
leaq 0x1decf(%rip), %r12     # 0x3f630
movq %r12, %rsi
leaq 0x1c(%rsp), %rbp
movq %rbp, %rdx
callq 0x814e
movq %r13, %rdi
movq %r12, %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdx
callq 0x814e
movq %r12, %rdi
movq %rbp, %rsi
callq 0x214df
testl %eax, %eax
js 0x217ae
incl %ebx
addl %eax, 0xc(%rsp)
jmp 0x217d7
leaq 0x1abdf(%rip), %rdi     # 0x3c381
movq %r12, %rsi
xorl %eax, %eax
callq 0xa38e
jmp 0x217d7
xorps %xmm0, %xmm0
cvtss2sd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x14(%rsp), %xmm1
xorps %xmm2, %xmm2
cvtss2sd 0x18(%rsp), %xmm2
leaq 0x1abce(%rip), %rdi     # 0x3c39e
movb $0x3, %al
callq 0xa38e
movl $0x1, %r13d
incq %r15
leaq 0x201dc3d(%rip), %rax   # 0x203f424
movslq (%rax), %rax
addq $0x20, %r14
cmpq %rax, %r15
jl 0x2172c
testl %r13d, %r13d
sete %al
movl 0xc(%rsp), %esi
jmp 0x21809
xorl %ebx, %ebx
movb $0x1, %al
xorl %esi, %esi
testb %al, %al
jne 0x2181d
leaq 0x1abad(%rip), %rdi     # 0x3c3c1
movl %ebx, %edx
xorl %eax, %eax
callq 0x9d2e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: CreateFacelightDependencyList()
void CreateFacelightDependencyList ()
{
	int facenum;
	dface_t *f;
	facelight_t *fl;
	int i;
	int k;
	int surface;
	facelightlist_t *item;

	for (i = 0; i < MAX_MAP_FACES; i++)
	{
		g_dependentfacelights[i] = NULL;
	}

	// for each face
	for (facenum = 0; facenum < g_numfaces; facenum++)
	{
		f = &g_dfaces[facenum];
		fl = &facelight[facenum];
		if (g_texinfo[f->texinfo].flags & TEX_SPECIAL)
		{
			continue;
		}

		for (k = 0; k < MAXLIGHTMAPS && f->styles[k] != 255; k++)
		{
			for (i = 0; i < fl->numsamples; i++)
			{
				surface = fl->samples[k][i].surface; // that surface contains at least one sample from this face
				if (0 <= surface && surface < g_numfaces)
				{
					// insert this face into the dependency list of that surface
					for (item = g_dependentfacelights[surface]; item != NULL; item = item->next)
					{
						if (item->facenum == facenum)
							break;
					}
					if (item)
					{
						continue;
					}

					item = (facelightlist_t *)malloc (sizeof (facelightlist_t));
					hlassume (item != NULL, assume_NoMemory);
					item->facenum = facenum;
					item->next = g_dependentfacelights[surface];
					g_dependentfacelights[surface] = item;
				}
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x51d114f(%rip), %rbx   # 0x51f2990
movl $0x7fff8, %edx          # imm = 0x7FFF8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4190
leaq 0x1b8fb9d(%rip), %rbp   # 0x1bb13f4
cmpl $0x0, (%rbp)
jle 0x21967
movq %rbx, %rdx
xorl %r12d, %r12d
leaq (%r12,%r12,4), %rax
leaq 0x1b8fb8e(%rip), %rcx   # 0x1bb1400
movswq 0xa(%rcx,%rax,4), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq 0x118fb6d(%rip), %rdi   # 0x11b13f0
testb $0x1, 0x24(%rdi,%rcx,8)
jne 0x21957
leaq 0x1b8fb6b(%rip), %rcx   # 0x1bb1400
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x4f5110b(%rip), %rcx   # 0x4f729b0
leaq (%rcx,%rax,8), %r13
xorl %edi, %edi
movq 0x8(%rsp), %rax
cmpb $-0x1, 0xc(%rax,%rdi)
je 0x21957
cmpl $0x0, (%r13)
jle 0x2194a
xorl %r15d, %r15d
movq %rdi, 0x10(%rsp)
movq 0x8(%r13,%rdi,8), %rax
leaq (%r15,%r15,8), %rcx
leaq (%rcx,%rcx,2), %rcx
addq %r15, %rcx
movslq 0x18(%rax,%rcx), %rbx
testq %rbx, %rbx
js 0x2193e
cmpl (%rbp), %ebx
jge 0x2193e
movq (%rdx,%rbx,8), %rax
testq %rax, %rax
je 0x21903
movl (%rax), %ecx
cmpq %rcx, %r12
je 0x2193e
movq 0x8(%rax), %rax
jmp 0x218f1
movl $0x10, %edi
callq 0x4410
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa7c9
movq 0x10(%rsp), %rdi
leaq 0x51d1061(%rip), %rdx   # 0x51f2990
movl %r12d, (%r14)
movq (%rdx,%rbx,8), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rdx,%rbx,8)
incq %r15
movslq (%r13), %rax
cmpq %rax, %r15
jl 0x218ce
incq %rdi
cmpq $0x4, %rdi
jne 0x218ab
incq %r12
movslq (%rbp), %rax
cmpq %rax, %r12
jl 0x21867
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: FreeFacelightDependencyList()
void FreeFacelightDependencyList ()
{
	int i;
	facelightlist_t *item;

	for (i = 0; i < MAX_MAP_FACES; i++)
	{
		while (g_dependentfacelights[i])
		{
			item = g_dependentfacelights[i];
			g_dependentfacelights[i] = item->next;
			free (item);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
leaq 0x51d100c(%rip), %r14   # 0x51f2990
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x219a2
movq 0x8(%rdi), %r15
movq %r15, (%r14,%rbx,8)
callq 0x4380
movq %r15, %rdi
testq %r15, %r15
jne 0x2198d
incq %rbx
cmpq $0xffff, %rbx           # imm = 0xFFFF
jne 0x21984
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/lightmap.cpp
// Function: ScaleDirectLights()
void ScaleDirectLights ()
{
	int facenum;
	dface_t *f;
	facelight_t *fl;
	int i;
	int k;
	sample_t *samp;

	for (facenum = 0; facenum < g_numfaces; facenum++)
	{
		f = &g_dfaces[facenum];

		if (g_texinfo[f->texinfo].flags & TEX_SPECIAL)
		{
			continue;
		}

		fl = &facelight[facenum];

		for (k = 0; k < MAXLIGHTMAPS && f->styles[k] != 255; k++)
		{
			for (i = 0; i < fl->numsamples; i++)
			{
				samp = &fl->samples[k][i];
				VectorScale (samp->light, g_direct_scale, samp->light);
	#ifdef ZHLT_XASH
				VectorScale (samp->light_direction, g_direct_scale, samp->light_direction);
	#endif
			}
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1b8fa34(%rip), %rax   # 0x1bb13f4
cmpl $0x0, (%rax)
jle 0x21a85
xorl %ecx, %ecx
leaq 0x1b8fa2e(%rip), %rdx   # 0x1bb1400
leaq 0x118fa17(%rip), %rsi   # 0x11b13f0
leaq 0x4f50fd0(%rip), %rdi   # 0x4f729b0
leaq 0x279d9(%rip), %r8      # 0x493c0
leaq (%rcx,%rcx,4), %r10
movswq 0xa(%rdx,%r10,4), %r9
leaq (%r9,%r9,4), %r9
testb $0x1, 0x24(%rsi,%r9,8)
jne 0x21a76
leaq (%rdx,%r10,4), %r9
leaq (%rdi,%r10,8), %r10
xorl %r11d, %r11d
cmpb $-0x1, 0xc(%r9,%r11)
je 0x21a76
movslq (%r10), %r15
testq %r15, %r15
jle 0x21a6d
movq 0x8(%r10,%r11,8), %rbx
leaq (%r15,%r15,8), %r14
leaq (%r14,%r14,2), %r14
addq %r15, %r14
xorl %r15d, %r15d
movss 0xc(%rbx,%r15), %xmm0
mulss (%r8), %xmm0
movss 0x10(%rbx,%r15), %xmm1
movss %xmm0, 0xc(%rbx,%r15)
mulss (%r8), %xmm1
movss %xmm1, 0x10(%rbx,%r15)
movss 0x14(%rbx,%r15), %xmm0
mulss (%r8), %xmm0
movss %xmm0, 0x14(%rbx,%r15)
addq $0x1c, %r15
cmpq %r15, %r14
jne 0x21a2b
incq %r11
cmpq $0x4, %r11
jne 0x21a08
incq %rcx
movslq (%rax), %r9
cmpq %r9, %rcx
jl 0x219e7
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/loadtextures.cpp
// Function: AddWadFolder(char const*)
void AddWadFolder (const char *path)
{
	waddir_t *waddir;
	waddir = (waddir_t *)malloc (sizeof (waddir_t));
	hlassume (waddir != NULL, assume_NoMemory);
	{
		waddir_t **pos;
		for (pos = &g_waddirs; *pos; pos = &(*pos)->next)
			;
		waddir->next = *pos;
		*pos = waddir;
	}
	safe_snprintf (waddir->path, _MAX_PATH, "%s", path);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1008, %edi           # imm = 0x1008
callq 0x4410
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa7c9
leaq 0x52504fe(%rip), %rcx   # 0x52729b0
movq %rcx, %rax
movq (%rcx), %rcx
testq %rcx, %rcx
jne 0x224b2
movq $0x0, (%r14)
movq %r14, (%rax)
addq $0x8, %r14
leaq 0x1a227(%rip), %rdx     # 0x3c6f9
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x88fb
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/loadtextures.cpp
// Function: TryOpenWadFiles()
void TryOpenWadFiles ()
{
	if (!g_wadfiles_opened)
	{
		g_wadfiles_opened = true;
#ifdef ZHLT_NOWADDIR
		char filename[_MAX_PATH];
		safe_snprintf(filename, _MAX_PATH, "%s.wa_", g_Mapname);
	   if (q_exists (filename))
	   {
		OpenWadFile (filename, true);
	   }
	   else
	   {
		Warning ("Couldn't open %s", filename);
#endif
		Log ("Opening wad files from directories:\n");
		if (!g_waddirs)
		{
			Warning ("No wad directories have been set.");
		}
		else
		{
			waddir_t *dir;
			for (dir = g_waddirs; dir; dir = dir->next)
			{
				Log ("  %s\n", dir->path);
			}
		}
		const char *value = ValueForKey (&g_entities[0], "wad");
		char path[MAX_VAL];
		int i, j;
		for (i = 0, j = 0; i < strlen(value) + 1; i++)
		{
			if (value[i] == ';' || value[i] == '\0')
			{
				path[j] = '\0';
				if (path[0])
				{
					char name[MAX_VAL];
					ExtractFile (path, name);
					DefaultExtension (name, ".wad");
					OpenWadFile (name);
				}
				j = 0;
			}
			else
			{
				path[j] = value[i];
				j++;
			}
		}
#ifdef ZHLT_NOWADDIR
	   }
#endif
		CheckFatal ();
	}
}

// Assembly:
cmpb $0x0, 0x525017f(%rip)   # 0x52729c0
jne 0x229b0
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3008, %rsp           # imm = 0x3008
movb $0x1, 0x5250161(%rip)   # 0x52729c0
leaq 0x171f2(%rip), %rdx     # 0x39a58
leaq 0x25ae3(%rip), %rcx     # 0x48350
leaq 0x1000(%rsp), %rbx
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
xorl %eax, %eax
callq 0x88fb
movq %rbx, %rdi
callq 0x9856
testb %al, %al
je 0x228a7
leaq 0x1000(%rsp), %rdi
movl $0x1, %esi
callq 0x224eb
jmp 0x2299a
leaq 0x19dc6(%rip), %rdi     # 0x3c674
leaq 0x1000(%rsp), %rsi
xorl %eax, %eax
callq 0xa38e
leaq 0x19e72(%rip), %rdi     # 0x3c736
xorl %eax, %eax
callq 0x9d2e
movq 0x52500de(%rip), %r14   # 0x52729b0
testq %r14, %r14
je 0x228f6
leaq 0x19e9f(%rip), %rbx     # 0x3c77d
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9d2e
movq (%r14), %r14
testq %r14, %r14
jne 0x228de
jmp 0x22904
leaq 0x19e5e(%rip), %rdi     # 0x3c75b
xorl %eax, %eax
callq 0xa38e
leaq 0x201cb25(%rip), %rdi   # 0x203f430
leaq 0x19e72(%rip), %rsi     # 0x3c784
callq 0x7571
movq %rax, %rbx
movq %rax, %rdi
callq 0x4150
cmpq $-0x1, %rax
je 0x2299a
xorl %r13d, %r13d
movq %rsp, %r14
leaq 0x2000(%rsp), %r15
leaq 0x19e46(%rip), %r12     # 0x3c783
xorl %ebp, %ebp
movzbl (%rbx,%r13), %eax
movslq %ebp, %rbp
cmpl $0x3b, %eax
je 0x22950
testl %eax, %eax
jne 0x2297e
movb $0x0, (%rsp,%rbp)
cmpb $0x0, (%rsp)
je 0x22985
movq %r14, %rdi
movq %r15, %rsi
callq 0x86a7
movq %r15, %rdi
movq %r12, %rsi
callq 0x8479
xorl %ebp, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x224eb
jmp 0x22987
movb %al, (%rsp,%rbp)
incl %ebp
jmp 0x22987
xorl %ebp, %ebp
incq %r13
movq %rbx, %rdi
callq 0x4150
incq %rax
cmpq %r13, %rax
ja 0x2293f
callq 0xa007
addq $0x3008, %rsp           # imm = 0x3008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/loadtextures.cpp
// Function: TryCloseWadFiles()
void TryCloseWadFiles ()
{
	if (g_wadfiles_opened)
	{
		g_wadfiles_opened = false;
		wadfile_t *wadfile, *next;
		for (wadfile = g_wadfiles; wadfile; wadfile = next)
		{
			next = wadfile->next;
			free (wadfile->lumpinfos);
			fclose (wadfile->file);
			free (wadfile);
		}
		g_wadfiles = NULL;
	}
}

// Assembly:
cmpb $0x1, 0x5250008(%rip)   # 0x52729c0
jne 0x22a0e
pushq %r14
pushq %rbx
pushq %rax
movb $0x0, 0x524fffb(%rip)   # 0x52729c0
movq 0x524ffec(%rip), %rbx   # 0x52729b8
testq %rbx, %rbx
je 0x229fc
movq (%rbx), %r14
movq 0x1018(%rbx), %rdi
callq 0x4380
movq 0x1008(%rbx), %rdi
callq 0x42e0
movq %rbx, %rdi
callq 0x4380
movq %r14, %rbx
testq %r14, %r14
jne 0x229d1
movq $0x0, 0x524ffb1(%rip) # 0x52729b8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/loadtextures.cpp
// Function: DefaultTexture(radtexture_t*, char const*)
void DefaultTexture (radtexture_t *tex, const char *name)
{
	int i;
	tex->width = 16;
	tex->height = 16;
	strcpy (tex->name, name);
	tex->name[16 - 1] = '\0';
	tex->canvas = (byte *)malloc (tex->width * tex->height);
	hlassume (tex->canvas != NULL, assume_NoMemory);
	for (i = 0; i < 256; i++)
	{
		VectorFill (tex->palette[i], 0x80);
	}
	for (i = 0; i < tex->width * tex->height; i++)
	{
		tex->canvas[i] = 0x00;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movabsq $0x1000000010, %rax     # imm = 0x1000000010
movq %rax, 0x10(%rdi)
callq 0x42b0
movb $0x0, 0xf(%rbx)
movslq 0x10(%rbx), %rax
movslq 0x14(%rbx), %rdi
imulq %rax, %rdi
callq 0x4410
movq %rax, 0x18(%rbx)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa7c9
leaq 0x20(%rbx), %rdi
movl $0x300, %edx            # imm = 0x300
movl $0x80, %esi
callq 0x4190
movl 0x14(%rbx), %eax
imull 0x10(%rbx), %eax
testl %eax, %eax
jle 0x22a8e
xorl %eax, %eax
movq 0x18(%rbx), %rcx
movb $0x0, (%rcx,%rax)
incq %rax
movslq 0x10(%rbx), %rcx
movslq 0x14(%rbx), %rdx
imulq %rcx, %rdx
cmpq %rdx, %rax
jl 0x22a72
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/loadtextures.cpp
// Function: NewTextures_PushTexture(int, void*)
void NewTextures_PushTexture (int size, void *data)
{
	if (g_newtextures_num >= RADTEXTURES_MAX)
	{
		Error ("the number of textures created by hlrad has exceeded its internal limit(%d).", (int)RADTEXTURES_MAX);
	}
	g_newtextures_data[g_newtextures_num] = (byte *)malloc (size);
	hlassume (g_newtextures_data[g_newtextures_num] != NULL, assume_NoMemory);
	memcpy (g_newtextures_data[g_newtextures_num], data, size);
	g_newtextures_size[g_newtextures_num] = size;
	g_newtextures_num++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x800, 0x524f7d4(%rip) # imm = 0x800
jl 0x23205
leaq 0x197c4(%rip), %rdi     # 0x3c9bd
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0xa01c
movslq %ebp, %r14
movq %r14, %rdi
callq 0x4410
movslq 0x524f7ad(%rip), %rcx   # 0x52729c4
leaq 0x524f7b2(%rip), %r15   # 0x52729d0
movq %rax, (%r15,%rcx,8)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa7c9
movslq 0x524f788(%rip), %r12   # 0x52729c4
movq (%r15,%r12,8), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4250
leaq 0x525377e(%rip), %rax   # 0x52769d0
movl %r14d, (%rax,%r12,4)
leal 0x1(%r12), %eax
movl %eax, 0x524f763(%rip)   # 0x52729c4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/loadtextures.cpp
// Function: GetLightInt(dface_t*, int const*, int, int, float (&) [3])
static void GetLightInt (dface_t *face, const int texsize[2], int ix, int iy, vec3_t &light)
{
	ix = qmax (0, qmin (ix, texsize[0]));
	iy = qmax (0, qmin (iy, texsize[1]));
	VectorClear (light);
	if (face->lightofs < 0)
	{
		return;
	}
	for (int k = 0; k < MAXLIGHTMAPS && face->styles[k] != 255; k++)
	{
		byte *samples = &g_dlightdata[face->lightofs + k * (texsize[0] + 1) * (texsize[1] + 1) * 3];
		if (face->styles[k] == 0)
		{
			VectorAdd (light, &samples[(iy * (texsize[0] + 1) + ix) * 3], light);
		}
	}
}

// Assembly:
movl (%rsi), %eax
cmpl %edx, %eax
cmovll %eax, %edx
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
movl 0x4(%rsi), %r9d
cmpl %ecx, %r9d
cmovll %r9d, %ecx
testl %ecx, %ecx
cmovlel %eax, %ecx
movl %eax, 0x8(%r8)
movq $0x0, (%r8)
cmpl $0x0, 0x10(%rdi)
js 0x2521e
pushq %rbp
pushq %r14
pushq %rbx
leaq 0xc(%rdi), %rax
xorl %r9d, %r9d
leaq 0x82c332(%rip), %r10    # 0x851488
movzbl (%rax), %r11d
testl %r11d, %r11d
je 0x25171
cmpl $0xff, %r11d
jne 0x25209
jmp 0x2521a
movslq 0x10(%rdi), %rbx
movl (%rsi), %ebp
movl 0x4(%rsi), %r11d
incl %ebp
incl %r11d
movl %r9d, %r14d
imull %ebp, %r14d
imull %r11d, %r14d
movslq %r14d, %r11
addq %rbx, %r11
addq (%r10), %r11
imull %ecx, %ebp
addl %edx, %ebp
movslq %ebp, %rbx
leaq (%rbx,%rbx,2), %rbx
movzbl (%r11,%rbx), %ebx
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
addss (%r8), %xmm0
movss %xmm0, (%r8)
movl (%rsi), %ebx
incl %ebx
imull %ecx, %ebx
addl %edx, %ebx
movslq %ebx, %rbx
leaq (%rbx,%rbx,2), %rbx
movzbl 0x1(%r11,%rbx), %ebx
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
addss 0x4(%r8), %xmm0
movss %xmm0, 0x4(%r8)
movl (%rsi), %ebx
incl %ebx
imull %ecx, %ebx
addl %edx, %ebx
movslq %ebx, %rbx
leaq (%rbx,%rbx,2), %rbx
movzbl 0x2(%r11,%rbx), %r11d
xorps %xmm0, %xmm0
cvtsi2ss %r11d, %xmm0
addss 0x8(%r8), %xmm0
movss %xmm0, 0x8(%r8)
addq $0x3, %r9
incq %rax
cmpq $0xc, %r9
jne 0x25156
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/loadtextures.cpp
// Function: CQ_MapPoint_r(int*, int*, cq_searchnode_s*, unsigned char const (*) [3], unsigned char const*, int)
static void CQ_MapPoint_r (int *bestdist, int *best,
					cq_searchnode_t *node, const unsigned char (*colors)[CQ_DIM],
					const unsigned char point[CQ_DIM], int searchradius)
{
	while (!node->isleafnode)
	{
		int dist = point[node->planeaxis] - node->planedist;
		if (dist <= -searchradius)
		{
			node = node->childrennode[0];
		}
		else if (dist >= searchradius - 1)
		{
			node = node->childrennode[1];
		}
		else
		{
			CQ_MapPoint_r (bestdist, best, node->childrennode[0], colors, point, searchradius);
			CQ_MapPoint_r (bestdist, best, node->childrennode[1], colors, point, searchradius);
			return;
		}
	}
	int dist = 0;
	for (int k = 0; k < CQ_DIM; k++)
	{
		dist += (colors[node->result][k] - point[k]) * (colors[node->result][k] - point[k]);
	}
	if (dist <= *bestdist)
	{
		if (dist < *bestdist || node->result < *best)
		{
			*bestdist = dist;
			*best = node->result;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movl %r9d, %edx
negl %edx
movq %r9, 0x20(%rsp)
leal -0x1(%r9), %esi
movl %edx, 0x1c(%rsp)
movl %esi, 0x18(%rsp)
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r15
movq 0x20(%rsp), %r14
cmpb $0x1, (%rbx)
je 0x25637
movslq 0x18(%rbx), %rax
movzbl (%r12,%rax), %ecx
subl 0x1c(%rbx), %ecx
movl $0x8, %eax
cmpl %edx, %ecx
jle 0x2562b
movl $0x10, %eax
cmpl %esi, %ecx
jge 0x2562b
movq 0x8(%rbx), %rdx
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rcx
movq %r12, %r8
movl %r14d, %r9d
callq 0x25586
movq 0x10(%rbx), %rdx
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rcx
movq %r12, %r8
movl %r14d, %r9d
callq 0x25586
movl 0x18(%rsp), %esi
movl 0x1c(%rsp), %edx
xorl %eax, %eax
jmp 0x25631
movq (%rbx,%rax), %rbx
movb $0x1, %al
testb %al, %al
jne 0x255cc
jmp 0x25689
movslq 0x20(%rbx), %rax
leaq (%rax,%rax,2), %rax
addq %rax, %r13
xorl %ecx, %ecx
xorl %eax, %eax
movzbl (%r13,%rcx), %edx
movzbl (%r12,%rcx), %esi
subl %esi, %edx
imull %edx, %edx
addl %edx, %eax
incq %rcx
cmpq $0x3, %rcx
jne 0x25646
movq 0x10(%rsp), %rcx
cmpl (%rcx), %eax
jg 0x25689
jl 0x25678
movl 0x20(%rbx), %ecx
movq 0x8(%rsp), %rdx
cmpl (%rdx), %ecx
jge 0x25689
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
movl 0x20(%rbx), %eax
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/mathutil.cpp
// Function: point_in_winding(Winding const&, dplane_t const&, float const*, float)
bool            point_in_winding(const Winding& w, const dplane_t& plane, const vec_t* const point, vec_t epsilon/* = 0.0*/)
{
	int				numpoints;
	int				x;
	vec3_t			delta;
	vec3_t			normal;
	vec_t			dist;

	numpoints = w.m_NumPoints;

	for (x = 0; x < numpoints; x++)
	{
		VectorSubtract (w.m_Points[(x+ 1) % numpoints], w.m_Points[x], delta);
		CrossProduct (delta, plane.normal, normal);
		dist = DotProduct (point, normal) - DotProduct (w.m_Points[x], normal);

		if (dist < 0.0
			&& (epsilon == 0.0 || dist * dist > epsilon * epsilon * DotProduct (normal, normal)))
		{
			return false;
		}
	}

	return true;
}

// Assembly:
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
setle %al
jle 0x25818
movq 0x10(%rdi), %rdi
movss 0x8(%rsi), %xmm1
movss (%rsi), %xmm4
movss 0x4(%rsi), %xmm3
movss %xmm0, -0x4(%rsp)
mulss %xmm0, %xmm0
movss (%rdx), %xmm5
movss 0x4(%rdx), %xmm6
movss 0x8(%rdx), %xmm7
leaq 0x8(%rdi), %rdx
movq %rcx, %rsi
negq %rsi
movl $0x1, %r8d
xorl %r9d, %r9d
xorps %xmm8, %xmm8
movq %rsi, %r10
addq %r8, %r10
movq %r8, %r10
cmoveq %r9, %r10
leaq (%r10,%r10,2), %r10
movss (%rdi,%r10,4), %xmm9
movss 0x4(%rdi,%r10,4), %xmm10
movss -0x8(%rdx), %xmm14
movss -0x4(%rdx), %xmm13
subss %xmm14, %xmm9
subss %xmm13, %xmm10
movss 0x8(%rdi,%r10,4), %xmm11
movss (%rdx), %xmm12
subss %xmm12, %xmm11
movaps %xmm3, %xmm15
mulss %xmm11, %xmm15
movaps %xmm4, %xmm2
mulss %xmm10, %xmm2
mulss %xmm1, %xmm10
subss %xmm15, %xmm10
movaps %xmm1, %xmm15
mulss %xmm9, %xmm15
mulss %xmm4, %xmm11
subss %xmm15, %xmm11
mulss %xmm3, %xmm9
subss %xmm2, %xmm9
movaps %xmm11, %xmm2
shufps $0x0, %xmm11, %xmm2     # xmm2 = xmm2[0,0],xmm11[0,0]
movlhps %xmm6, %xmm13           # xmm13 = xmm13[0],xmm6[0]
shufps $0xe2, %xmm6, %xmm13    # xmm13 = xmm13[2,0],xmm6[2,3]
mulps %xmm2, %xmm13
movlhps %xmm5, %xmm14           # xmm14 = xmm14[0],xmm5[0]
shufps $0xe2, %xmm5, %xmm14    # xmm14 = xmm14[2,0],xmm5[2,3]
movaps %xmm10, %xmm2
shufps $0x0, %xmm10, %xmm2     # xmm2 = xmm2[0,0],xmm10[0,0]
mulps %xmm14, %xmm2
addps %xmm13, %xmm2
movlhps %xmm7, %xmm12           # xmm12 = xmm12[0],xmm7[0]
shufps $0xe2, %xmm7, %xmm12    # xmm12 = xmm12[2,0],xmm7[2,3]
movaps %xmm9, %xmm13
shufps $0x0, %xmm9, %xmm13     # xmm13 = xmm13[0,0],xmm9[0,0]
mulps %xmm12, %xmm13
addps %xmm2, %xmm13
movaps %xmm13, %xmm2
shufps $0x55, %xmm13, %xmm2    # xmm2 = xmm2[1,1],xmm13[1,1]
subps %xmm2, %xmm13
ucomiss %xmm13, %xmm8
jbe 0x257fa
movss -0x4(%rsp), %xmm2
ucomiss %xmm8, %xmm2
jne 0x257d1
jnp 0x25818
mulss %xmm13, %xmm13
mulss %xmm11, %xmm11
mulss %xmm10, %xmm10
addss %xmm11, %xmm10
mulss %xmm9, %xmm9
addss %xmm10, %xmm9
mulss %xmm0, %xmm9
ucomiss %xmm9, %xmm13
ja 0x25818
cmpq %rcx, %r8
setae %al
addq $0xc, %rdx
leaq (%rsi,%r8), %r10
incq %r10
incq %r8
cmpq $0x1, %r10
jne 0x256e9
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/mathutil.cpp
// Function: point_in_winding_noedge(Winding const&, dplane_t const&, float const*, float)
bool            point_in_winding_noedge(const Winding& w, const dplane_t& plane, const vec_t* const point, vec_t width)
{
	int				numpoints;
	int				x;
	vec3_t			delta;
	vec3_t			normal;
	vec_t			dist;

	numpoints = w.m_NumPoints;

	for (x = 0; x < numpoints; x++)
	{
		VectorSubtract (w.m_Points[(x+ 1) % numpoints], w.m_Points[x], delta);
		CrossProduct (delta, plane.normal, normal);
		dist = DotProduct (point, normal) - DotProduct (w.m_Points[x], normal);

		if (dist < 0.0 || dist * dist <= width * width * DotProduct (normal, normal))
		{
			return false;
		}
	}

	return true;
}

// Assembly:
movq %rdx, %rcx
movslq 0x8(%rdi), %r8
movq 0x10(%rdi), %rdi
movss 0x8(%rsi), %xmm1
movss (%rsi), %xmm2
movss 0x4(%rsi), %xmm3
mulss %xmm0, %xmm0
xorl %eax, %eax
testl %r8d, %r8d
movl $0x0, %esi
cmovgl %r8d, %esi
leaq 0x8(%rdi), %r9
xorps %xmm4, %xmm4
movq %rax, %r10
cmpq %rax, %rsi
je 0x2595a
leal 0x1(%r10), %eax
cltd
idivl %r8d
leaq (%rdx,%rdx,2), %rax
movss (%rdi,%rax,4), %xmm5
movss 0x4(%rdi,%rax,4), %xmm6
movss -0x8(%r9), %xmm9
movss -0x4(%r9), %xmm10
subss %xmm9, %xmm5
subss %xmm10, %xmm6
movss 0x8(%rdi,%rax,4), %xmm7
movss (%r9), %xmm8
subss %xmm8, %xmm7
movaps %xmm3, %xmm11
mulss %xmm7, %xmm11
movaps %xmm2, %xmm12
mulss %xmm6, %xmm12
mulss %xmm1, %xmm6
subss %xmm11, %xmm6
movaps %xmm1, %xmm11
mulss %xmm5, %xmm11
mulss %xmm2, %xmm7
subss %xmm11, %xmm7
mulss %xmm3, %xmm5
subss %xmm12, %xmm5
movaps %xmm7, %xmm11
shufps $0x0, %xmm7, %xmm11     # xmm11 = xmm11[0,0],xmm7[0,0]
movss (%rcx), %xmm12
movss 0x4(%rcx), %xmm13
movss 0x8(%rcx), %xmm14
unpcklps %xmm10, %xmm13          # xmm13 = xmm13[0],xmm10[0],xmm13[1],xmm10[1]
mulps %xmm11, %xmm13
unpcklps %xmm9, %xmm12           # xmm12 = xmm12[0],xmm9[0],xmm12[1],xmm9[1]
movaps %xmm6, %xmm9
shufps $0x0, %xmm6, %xmm9      # xmm9 = xmm9[0,0],xmm6[0,0]
mulps %xmm12, %xmm9
addps %xmm13, %xmm9
unpcklps %xmm8, %xmm14           # xmm14 = xmm14[0],xmm8[0],xmm14[1],xmm8[1]
movaps %xmm5, %xmm8
shufps $0x0, %xmm5, %xmm8      # xmm8 = xmm8[0,0],xmm5[0,0]
mulps %xmm14, %xmm8
addps %xmm9, %xmm8
movaps %xmm8, %xmm9
shufps $0x55, %xmm8, %xmm9     # xmm9 = xmm9[1,1],xmm8[1,1]
subps %xmm9, %xmm8
ucomiss %xmm8, %xmm4
ja 0x2595a
mulss %xmm8, %xmm8
mulss %xmm7, %xmm7
mulss %xmm6, %xmm6
addss %xmm7, %xmm6
mulss %xmm5, %xmm5
addss %xmm6, %xmm5
mulss %xmm0, %xmm5
addq $0xc, %r9
leaq 0x1(%r10), %rax
ucomiss %xmm8, %xmm5
jb 0x2584d
cmpq %r8, %r10
setge %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/mathutil.cpp
// Function: intersect_linesegment_plane(dplane_t const*, float const*, float const*, float*)
bool			intersect_linesegment_plane(const dplane_t* const plane, const vec_t* const p1, const vec_t* const p2, vec3_t point)
{
	vec_t			part1;
	vec_t			part2;
	int				i;
	part1 = DotProduct (p1, plane->normal) - plane->dist;
	part2 = DotProduct (p2, plane->normal) - plane->dist;
	if (part1 * part2 > 0 || part1 == part2)
		return false;
	for (i=0; i<3; ++i)
		point[i] = (part1 * p2[i] - part2 * p1[i]) / (part1 - part2);
	return true;
}

// Assembly:
movss (%rdi), %xmm1
movss 0x4(%rdi), %xmm2
movss 0x8(%rdi), %xmm0
movss 0xc(%rdi), %xmm3
shufps $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
movss 0x8(%rdx), %xmm6
movss (%rsi), %xmm7
unpcklps %xmm4, %xmm7            # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1]
movss 0x4(%rsi), %xmm4
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
mulps %xmm2, %xmm4
movss 0x8(%rsi), %xmm2
unpcklps %xmm6, %xmm2            # xmm2 = xmm2[0],xmm6[0],xmm2[1],xmm6[1]
shufps $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
mulps %xmm7, %xmm1
addps %xmm4, %xmm1
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
mulps %xmm2, %xmm0
addps %xmm1, %xmm0
shufps $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
subps %xmm3, %xmm0
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movaps %xmm0, %xmm1
mulss %xmm2, %xmm1
movaps %xmm0, %xmm3
cmpneqps %xmm2, %xmm3
xorps %xmm4, %xmm4
cmpnltps %xmm1, %xmm4
andps %xmm3, %xmm4
movd %xmm4, %eax
testb $0x1, %al
je 0x26274
movaps 0x11e50(%rip), %xmm1    # 0x38090
xorps %xmm2, %xmm1
movaps %xmm0, %xmm3
subss %xmm2, %xmm3
xorl %edi, %edi
movss (%rsi,%rdi,4), %xmm2
mulss %xmm1, %xmm2
movss (%rdx,%rdi,4), %xmm4
mulss %xmm0, %xmm4
addss %xmm2, %xmm4
divss %xmm3, %xmm4
movss %xmm4, (%rcx,%rdi,4)
incq %rdi
cmpq $0x3, %rdi
jne 0x2624c
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/mathutil.cpp
// Function: plane_from_points(float const*, float const*, float const*, dplane_t*)
void            plane_from_points(const vec3_t p1, const vec3_t p2, const vec3_t p3, dplane_t* plane)
{
    vec3_t          delta1;
    vec3_t          delta2;
    vec3_t          normal;

    VectorSubtract(p3, p2, delta1);
    VectorSubtract(p1, p2, delta2);
    CrossProduct(delta1, delta2, normal);
    VectorNormalize(normal);
    plane->dist = DotProduct(normal, p1);
    VectorCopy(normal, plane->normal);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movss (%rdx), %xmm1
movss (%rsi), %xmm3
subss %xmm3, %xmm1
movss 0x4(%rdi), %xmm6
movsd 0x4(%rdx), %xmm0
movsd 0x4(%rsi), %xmm4
subps %xmm4, %xmm0
subss %xmm4, %xmm6
movss (%rdi), %xmm5
movss 0x8(%rdi), %xmm2
unpcklps %xmm5, %xmm2            # xmm2 = xmm2[0],xmm5[0],xmm2[1],xmm5[1]
shufps $0xd4, %xmm4, %xmm3     # xmm3 = xmm3[0,1],xmm4[1,3]
shufps $0x52, %xmm4, %xmm3     # xmm3 = xmm3[2,0],xmm4[1,1]
subps %xmm3, %xmm2
movaps %xmm2, %xmm3
shufps $0x0, %xmm2, %xmm3      # xmm3 = xmm3[0,0],xmm2[0,0]
movss %xmm6, %xmm3            # xmm3 = xmm6[0],xmm3[1,2,3]
mulss %xmm1, %xmm6
shufps $0xd4, %xmm0, %xmm1     # xmm1 = xmm1[0,1],xmm0[1,3]
shufps $0x52, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[1,1]
mulps %xmm1, %xmm3
movaps %xmm0, %xmm4
mulps %xmm2, %xmm4
subps %xmm3, %xmm4
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
mulss %xmm0, %xmm2
subss %xmm2, %xmm6
movaps %xmm4, %xmm0
mulps %xmm4, %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm4, %xmm1
mulss %xmm4, %xmm1
addss %xmm0, %xmm1
movaps %xmm6, %xmm0
mulss %xmm6, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2631f
sqrtsd %xmm0, %xmm0
jmp 0x26336
movaps %xmm6, 0x10(%rsp)
movaps %xmm4, (%rsp)
callq 0x4240
movaps (%rsp), %xmm4
movaps 0x10(%rsp), %xmm6
movsd 0x11dd2(%rip), %xmm1    # 0x38110
ucomisd %xmm0, %xmm1
jbe 0x2634d
xorpd %xmm1, %xmm1
xorps %xmm0, %xmm0
jmp 0x26372
cvtps2pd %xmm4, %xmm1
movapd %xmm0, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
divpd %xmm2, %xmm1
cvtpd2ps %xmm1, %xmm1
xorps %xmm2, %xmm2
cvtss2sd %xmm6, %xmm2
divsd %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
movapd %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
mulss 0x4(%r14), %xmm2
movss (%r14), %xmm3
mulss %xmm1, %xmm3
addss %xmm2, %xmm3
movss 0x8(%r14), %xmm2
mulss %xmm0, %xmm2
addss %xmm3, %xmm2
movss %xmm2, 0xc(%rbx)
movlpd %xmm1, (%rbx)
movss %xmm0, 0x8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/mathutil.cpp
// Function: LineSegmentIntersectsBounds_r(float const*, float const*, float const*, float const*, int)
bool LineSegmentIntersectsBounds_r (const vec_t* p1, const vec_t* p2, const vec_t* mins, const vec_t* maxs, int d)
{
	vec_t lmin, lmax;
	const vec_t* tmp;
	vec3_t x1, x2;
	int i;
	d--;
	if (p2[d]<p1[d])
		tmp=p1, p1=p2, p2=tmp;
	if (p2[d]<mins[d] || p1[d]>maxs[d])
		return false;
	if (d==0)
		return true;
	lmin = p1[d]>=mins[d]? 0 : (mins[d]-p1[d])/(p2[d]-p1[d]);
	lmax = p2[d]<=maxs[d]? 1 : (p2[d]-maxs[d])/(p2[d]-p1[d]);
	for (i=0; i<d; ++i)
	{
		x1[i]=(1-lmin)*p1[i]+lmin*p2[i];
		x2[i]=(1-lmax)*p2[i]+lmax*p2[i];
	}
	return LineSegmentIntersectsBounds_r (x1, x2, mins, maxs, d);
}

// Assembly:
movl %r8d, %eax
movslq %r8d, %r8
movss -0x4(%rdi,%r8,4), %xmm0
ucomiss -0x4(%rsi,%r8,4), %xmm0
movq %rsi, %r9
cmovaq %rdi, %r9
cmovaq %rsi, %rdi
movss -0x4(%r9,%r8,4), %xmm0
movss -0x4(%rdx,%r8,4), %xmm1
ucomiss %xmm0, %xmm1
ja 0x263f6
decq %r8
movss (%rdi,%r8,4), %xmm3
movss (%rcx,%r8,4), %xmm2
ucomiss %xmm2, %xmm3
jbe 0x263f9
xorl %eax, %eax
retq
testl %r8d, %r8d
je 0x264b0
subq $0x18, %rsp
cmpl $0x2, %eax
jl 0x2649e
movaps %xmm1, %xmm4
subss %xmm3, %xmm4
movaps %xmm0, %xmm5
subss %xmm3, %xmm5
divss %xmm5, %xmm4
cmpnless %xmm3, %xmm1
andps %xmm4, %xmm1
movaps %xmm0, %xmm3
subss %xmm2, %xmm3
divss %xmm5, %xmm3
cmpnless %xmm2, %xmm0
andps %xmm0, %xmm3
movss 0x11cf4(%rip), %xmm2    # 0x38138
andnps %xmm2, %xmm0
orps %xmm3, %xmm0
movss 0x11ce6(%rip), %xmm2    # 0x38138
movaps %xmm2, %xmm3
subss %xmm1, %xmm3
subss %xmm0, %xmm2
movl %r8d, %eax
xorl %esi, %esi
movss (%r9,%rsi,4), %xmm4
movaps %xmm1, %xmm5
mulss %xmm4, %xmm5
movss (%rdi,%rsi,4), %xmm6
mulss %xmm3, %xmm6
addss %xmm5, %xmm6
movss %xmm6, 0xc(%rsp,%rsi,4)
movaps %xmm0, %xmm5
mulss %xmm4, %xmm5
mulss %xmm2, %xmm4
addss %xmm5, %xmm4
movss %xmm4, (%rsp,%rsi,4)
incq %rsi
cmpq %rsi, %rax
jne 0x26462
leaq 0xc(%rsp), %rdi
movq %rsp, %rsi
callq 0x263b1
addq $0x18, %rsp
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/nomatrix.cpp
// Function: MakeScalesNoVismatrix()
void            MakeScalesNoVismatrix()
{
    char            transferfile[_MAX_PATH];

    hlassume(g_num_patches < MAX_PATCHES, assume_MAX_PATCHES);

#ifdef ZHLT_DEFAULTEXTENSION_FIX
	safe_snprintf(transferfile, _MAX_PATH, "%s.inc", g_Mapname);
#else
    safe_strncpy(transferfile, g_source, _MAX_PATH);
    StripExtension(transferfile);
    DefaultExtension(transferfile, ".inc");
#endif

    if (!g_incremental || !readtransfers(transferfile, g_num_patches))
    {
        g_CheckVisBit = CheckVisBitNoVismatrix;
#ifndef HLRAD_HULLU
        NamedRunThreadsOn(g_num_patches, g_estimate, MakeScales);
#else
	if(g_rgb_transfers)
		{NamedRunThreadsOn(g_num_patches, g_estimate, MakeRGBScales);}
	else
		{NamedRunThreadsOn(g_num_patches, g_estimate, MakeScales);}
#endif

#ifndef HLRAD_NOSWAP
        // invert the transfers for gather vs scatter
#ifndef HLRAD_HULLU
        NamedRunThreadsOnIndividual(g_num_patches, g_estimate, SwapTransfers);
#else
	if(g_rgb_transfers)
		{NamedRunThreadsOnIndividual(g_num_patches, g_estimate, SwapRGBTransfers);}
	else
		{NamedRunThreadsOnIndividual(g_num_patches, g_estimate, SwapTransfers);}
#endif
#endif /*HLRAD_NOSWAP*/
        if (g_incremental)
        {
            writetransfers(transferfile, g_num_patches);
        }
        else
        {
            unlink(transferfile);
        }
        DumpTransfersMemoryUsage();
#ifdef HLRAD_OPAQUE_STYLE_BOUNCE
		CreateFinalStyleArrays ("dynamic shadow array");
#endif
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
leaq 0x541159e(%rip), %r14   # 0x54389e8
xorl %edi, %edi
cmpl $0xffff0, (%r14)        # imm = 0xFFFF0
setb %dil
movl $0x1b, %esi
callq 0xa7c9
leaq 0x12596(%rip), %rdx     # 0x399fe
leaq 0x20ee1(%rip), %rcx     # 0x48350
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
xorl %eax, %eax
callq 0x88fb
leaq 0x54d357b(%rip), %r15   # 0x54faa00
cmpb $0x1, (%r15)
jne 0x2749e
movl (%r14), %esi
movq %rsp, %rdi
callq 0x34e98
testb %al, %al
jne 0x27531
leaq 0x99(%rip), %rax        # 0x2753e
leaq 0x66d368c(%rip), %rcx   # 0x66fab38
movq %rax, (%rcx)
leaq 0x54d3573(%rip), %rax   # 0x54faa29
leaq 0x1573f(%rip), %rcx     # 0x3cbfc
leaq 0x15747(%rip), %rdi     # 0x3cc0b
cmpb $0x0, (%rax)
cmovneq %rcx, %rdi
leaq 0xed4d(%rip), %rbx      # 0x3621f
cmovneq 0x20aa6(%rip), %rbx     # 0x47f80
callq 0x9e7a
leaq 0x15299(%rip), %rdi     # 0x3c77f
movq %rax, %rsi
xorl %eax, %eax
callq 0x9d2e
movl (%r14), %edi
leaq 0x21f2a(%rip), %rax     # 0x49424
movzbl (%rax), %esi
movq %rbx, %rdx
callq 0xb446
cmpb $0x1, (%r15)
jne 0x27518
movl (%r14), %esi
movq %rsp, %rdi
callq 0x34cfc
jmp 0x27520
movq %rsp, %rdi
callq 0x4160
callq 0x374fd
leaq 0x156eb(%rip), %rdi     # 0x3cc17
callq 0x357db
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlrad/qrad.cpp
// Function: ReadCustomChopValue()
void ReadCustomChopValue()
{
	int num;
	int i, k;
	entity_t *mapent;
	epair_t *ep;

	num = ((dmiptexlump_t *)g_dtexdata)->nummiptex;
	chopscales = (vec_t *)malloc (num * sizeof(vec_t));
	for (i = 0; i < num; i++)
	{
		chopscales[i] = 1.0;
	}
	for (k = 0; k < g_numentities; k++)
	{
		mapent = &g_entities[k];
		if (strcmp(ValueForKey(mapent, "classname"), "info_chopscale"))
			continue;
		Developer (DEVELOPER_LEVEL_MESSAGE, "info_chopscale entity detected.\n");
		for (i = 0; i < num; i++)
		{
			const char *texname = ((miptex_t*)(g_dtexdata+((dmiptexlump_t*)g_dtexdata)->dataofs[i]))->name;
			for (ep = mapent->epairs; ep; ep = ep->next)
			{
				if (strcasecmp (ep->key, texname))
					continue;
				if (!strcasecmp (ep->key, "origin"))
					continue;
				if (atof (ep->value) <= 0)
					continue;
				chopscales[i] = atof (ep->value);
				Developer (DEVELOPER_LEVEL_MESSAGE, "info_chopscale: %s = %f\n", texname, chopscales[i]);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x82957b(%rip), %rax    # 0x851498
movq (%rax), %rax
movslq (%rax), %rbp
leaq (,%rbp,4), %rdi
callq 0x4410
movq %rax, 0x5512c41(%rip)   # 0x553ab78
testq %rbp, %rbp
jle 0x27f54
xorl %eax, %eax
movq 0x5512c33(%rip), %rcx   # 0x553ab78
movl $0x3f800000, (%rcx,%rax,4) # imm = 0x3F800000
incq %rax
cmpq %rax, %rbp
jne 0x27f3e
leaq 0x20174c9(%rip), %rax   # 0x203f424
cmpl $0x0, (%rax)
jle 0x2808a
leaq 0x176c5(%rip), %r12     # 0x3f630
xorl %ecx, %ecx
movq %rcx, 0x8(%rsp)
movq %rcx, %rdi
shlq $0x5, %rdi
addq 0x20048(%rip), %rdi     # 0x47fc8
movq %rdi, 0x10(%rsp)
leaq 0x1067f(%rip), %rsi     # 0x3860b
callq 0x7571
movq %rax, %rdi
leaq 0x15253(%rip), %rsi     # 0x3d1ee
callq 0x4440
testl %eax, %eax
jne 0x2806f
movl $0x3, %edi
leaq 0x15249(%rip), %rsi     # 0x3d1fd
xorl %eax, %eax
callq 0xa52e
testl %ebp, %ebp
jle 0x2806f
xorl %r14d, %r14d
movq 0x10(%rsp), %rax
movq 0x18(%rax), %r13
testq %r13, %r13
je 0x28063
leaq 0x8294b9(%rip), %rax    # 0x851498
movq (%rax), %rax
movslq 0x4(%rax,%r14,4), %r15
addq %rax, %r15
movq 0x8(%r13), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4320
testl %eax, %eax
je 0x28008
movq (%r13), %r13
testq %r13, %r13
jne 0x27fea
jmp 0x28063
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4320
testl %eax, %eax
je 0x27ffd
movq 0x10(%r13), %rdi
callq 0x43c0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x27ffd
cvtsd2ss %xmm0, %xmm0
movq 0x5512b43(%rip), %rax   # 0x553ab78
movss %xmm0, (%rax,%r14,4)
movq 0x5512b36(%rip), %rax   # 0x553ab78
xorps %xmm0, %xmm0
cvtss2sd (%rax,%r14,4), %xmm0
movl $0x3, %edi
leaq 0x151c7(%rip), %rsi     # 0x3d21e
movq %r15, %rdx
movb $0x1, %al
callq 0xa52e
jmp 0x27ffd
incq %r14
cmpq %rbp, %r14
jne 0x27fc6
movq 0x8(%rsp), %rcx
incq %rcx
leaq 0x20173a6(%rip), %rax   # 0x203f424
movslq (%rax), %rax
cmpq %rax, %rcx
jl 0x27f6d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq