LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: BrinkReplaceClipnode(bbrink_t*, bclipnode_s*, bclipnode_s*)
void BrinkReplaceClipnode (bbrink_t *b, bclipnode_t *prev, bclipnode_t *n)
{
	int found;
	int numfound = 0;
	for (int i = 0; i < b->numnodes; i++)
	{
		bbrinknode_t *node = &(*b->nodes)[i];
		if (node->isleaf && node->clipnode == prev)
		{
			found = i;
			numfound++;
		}
	}
	if (numfound == 0)
	{
		PrintOnce ("BrinkSplitClipnode: internal error: couldn't find clipnode");
		hlassume (false, assume_first);
	}
	if (numfound > 1)
	{
		PrintOnce ("BrinkSplitClipnode: internal error: found more than one clipnode");
		hlassume (false, assume_first);
	}
	bbrinknode_t *node = &(*b->nodes)[found];
	node->clipnode = n;
	node->content = n->content;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movslq 0x48(%rdi), %rax
testq %rax, %rax
jle 0xe000
movq 0x50(%r14), %rcx
movq (%rcx), %rcx
addq $0x20, %rcx
xorl %edx, %edx
xorl %r15d, %r15d
cmpq %rsi, (%rcx)
sete %r8b
andb -0x20(%rcx), %r8b
movzbl %r8b, %r8d
addl %r8d, %r15d
testb %r8b, %r8b
cmovnel %edx, %edi
incq %rdx
addq $0x28, %rcx
cmpq %rdx, %rax
jne 0xdfd7
movslq %edi, %r12
jmp 0xe006
xorl %r15d, %r15d
xorl %r12d, %r12d
testl %r15d, %r15d
jne 0xe022
leaq 0x13541(%rip), %rdi     # 0x21553
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
cmpl $0x2, %r15d
jl 0xe03f
leaq 0x1355f(%rip), %rdi     # 0x2158e
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq 0x50(%r14), %rax
movq (%rax), %rax
leaq (%r12,%r12,4), %rcx
movq %rbx, 0x20(%rax,%rcx,8)
movl 0x20(%rbx), %edx
movl %edx, 0x18(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: AllocTreepoint(int&, bool)
btreepoint_t *AllocTreepoint (int &numobjects, bool infinite)
{
	numobjects++;
	btreepoint_t *tp = (btreepoint_t *)malloc (sizeof (btreepoint_t));
	hlassume (tp != NULL, assume_NoMemory);
	tp->edges = new btreeedge_l ();
	tp->infinite = infinite;
	return tp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
incl (%rdi)
movl $0x40, %edi
callq 0x4400
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
movl $0x18, %edi
callq 0x42f0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq %rax, 0x20(%r14)
movb %bl, 0x18(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: AllocTreeedge(int&, bool)
btreeedge_t *AllocTreeedge (int &numobjects, bool infinite)
{
	numobjects++;
	btreeedge_t *te = (btreeedge_t *)malloc (sizeof (btreeedge_t));
	hlassume (te != NULL, assume_NoMemory);
	te->points[0].p = NULL;
	te->points[0].side = false;
	te->points[1].p = NULL;
	te->points[1].side = true;
	te->faces = new btreeface_l ();
	te->infinite = infinite;
	// should be followed by SetEdgePoints
	return te;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
incl (%rdi)
movl $0x48, %edi
callq 0x4400
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
xorl %r15d, %r15d
movq %r15, (%r14)
movb $0x0, 0x8(%r14)
movq %r15, 0x10(%r14)
movb $0x1, 0x18(%r14)
movl $0x18, %edi
callq 0x42f0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %r15, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq %rax, 0x28(%r14)
movb %bl, 0x20(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: AttachPointToEdge(btreeedge_s*, btreepoint_s*, bool)
void AttachPointToEdge (btreeedge_t *te, btreepoint_t *tp, bool side)
{
	if (te->points[side].p)
	{
		PrintOnce ("AttachPointToEdge: internal error: point occupied.");
		hlassume (false, assume_first);
	}
	if (te->infinite && !tp->infinite)
	{
		PrintOnce ("AttachPointToEdge: internal error: attaching a finite object to an infinite object.");
		hlassume (false, assume_first);
	}
	te->points[side].p = tp;

	btreeedge_r er;
	er.e = te;
	er.side = side;
	tp->edges->push_back (er);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl %edx, %r12d
shll $0x4, %r12d
cmpq $0x0, (%rdi,%r12)
je 0xe15a
leaq 0x134b2(%rip), %rdi     # 0x215fc
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
addq %r14, %r12
cmpb $0x1, 0x20(%r14)
jne 0xe182
cmpb $0x0, 0x18(%r15)
jne 0xe182
leaq 0x134bd(%rip), %rdi     # 0x2162f
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq %r15, (%r12)
movq 0x20(%r15), %r15
movl $0x20, %edi
callq 0x42f0
movq %r14, 0x10(%rax)
movb %bl, 0x18(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x4070
incq 0x10(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: AllocTreeface(int&, bool)
btreeface_t *AllocTreeface (int &numobjects, bool infinite)
{
	numobjects++;
	btreeface_t *tf = (btreeface_t *)malloc (sizeof (btreeface_t));
	hlassume (tf != NULL, assume_NoMemory);
	tf->edges = new btreeedge_l ();
	tf->leafs[0].l = NULL;
	tf->leafs[0].side = false;
	tf->leafs[1].l = NULL;
	tf->leafs[1].side = true;
	tf->infinite = infinite;
	return tf;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
incl (%rdi)
movl $0x48, %edi
callq 0x4400
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
movl $0x18, %edi
callq 0x42f0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq %rax, (%r14)
movq %rcx, 0x10(%r14)
movb $0x0, 0x18(%r14)
movq %rcx, 0x20(%r14)
movb $0x1, 0x28(%r14)
movb %bl, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: AttachEdgeToFace(btreeface_s*, btreeedge_s*, int)
void AttachEdgeToFace (btreeface_t *tf, btreeedge_t *te, int side)
{
	if (tf->infinite && !te->infinite)
	{
		PrintOnce ("AttachEdgeToFace: internal error: attaching a finite object to an infinite object.");
		hlassume (false, assume_first);
	}
	btreeedge_r er;
	er.e = te;
	er.side = side;
	tf->edges->push_back (er);

	btreeface_r fr;
	fr.f = tf;
	fr.side = side;
	te->faces->push_back (fr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
cmpb $0x1, 0x8(%rdi)
jne 0xe27b
cmpb $0x0, 0x20(%r15)
jne 0xe27b
leaq 0x13418(%rip), %rdi     # 0x21683
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq (%r14), %r12
movl $0x20, %edi
callq 0x42f0
testl %ebx, %ebx
movq %r15, 0x10(%rax)
setne 0x18(%rax)
movq %rax, %rdi
movq %r12, %rsi
callq 0x4070
incq 0x10(%r12)
movq 0x28(%r15), %r15
movl $0x20, %edi
callq 0x42f0
testl %ebx, %ebx
movq %r14, 0x10(%rax)
setne 0x18(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x4070
incq 0x10(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: AttachFaceToLeaf(btreeleaf_s*, btreeface_s*, int)
void AttachFaceToLeaf (btreeleaf_t *tl, btreeface_t *tf, int side)
{
	if (tl->infinite && !tf->infinite)
	{
		PrintOnce ("AttachFaceToLeaf: internal error: attaching a finite object to an infinite object.");
		hlassume (false, assume_first);
	}
	btreeface_r fr;
	fr.f = tf;
	fr.side = side;
	tl->faces->push_back (fr);

	if (tf->leafs[side].l)
	{
		PrintOnce ("AttachFaceToLeaf: internal error: leaf occupied.");
		hlassume (false, assume_first);
	}
	tf->leafs[side].l = tl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x8(%rdi)
jne 0xe308
cmpb $0x0, 0x8(%r14)
jne 0xe308
leaq 0x133de(%rip), %rdi     # 0x216d6
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq (%rbx), %r15
movl $0x20, %edi
callq 0x42f0
testl %ebp, %ebp
movq %r14, 0x10(%rax)
setne 0x18(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0x4070
incq 0x10(%r15)
movslq %ebp, %rax
shlq $0x4, %rax
addq %rax, %r14
addq $0x10, %r14
cmpq $0x0, (%r14)
je 0xe359
leaq 0x133e0(%rip), %rdi     # 0x21729
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: AllocTreeleaf(int&, bool)
btreeleaf_t *AllocTreeleaf (int &numobjects, bool infinite)
{
	numobjects++;
	btreeleaf_t *tl = (btreeleaf_t *)malloc (sizeof (btreeleaf_t));
	hlassume (tl != NULL, assume_NoMemory);
	tl->faces = new btreeface_l ();
	tl->infinite = infinite;
	return tl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
incl (%rdi)
movl $0x18, %edi
callq 0x4400
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
movl $0x18, %edi
callq 0x42f0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq %rax, (%r14)
movb %bl, 0x8(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: GetPointFromEdge(btreeedge_s*, bool)
btreepoint_t *GetPointFromEdge (btreeedge_t *te, bool side)
{
	if (!te->points[side].p)
	{
		PrintOnce ("GetPointFromEdge: internal error: point not set.");
		hlassume (false, assume_first);
	}
	return te->points[side].p;
}

// Assembly:
pushq %rbx
shll $0x4, %esi
leaq (%rdi,%rsi), %rbx
cmpq $0x0, (%rdi,%rsi)
jne 0xe99a
leaq 0x12dd0(%rip), %rdi     # 0x2175a
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq (%rbx), %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: RemoveEdgeFromList(std::__cxx11::list<btreeedge_r, std::allocator<btreeedge_r>>*, btreeedge_s*, bool)
void RemoveEdgeFromList (btreeedge_l *el, btreeedge_t *te, bool side)
{
	btreeedge_l::iterator ei;
	for (ei = el->begin (); ei != el->end (); ei++)
	{
		if (ei->e == te && ei->side == side)
		{
			el->erase (ei);
			return; // only remove one copy if there are many (in order to preserve topological correctness)
		}
	}
	PrintOnce ("RemoveEdgeFromList: internal error: edge not found.");
	hlassume (false, assume_first);
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
cmpq %rdi, %rbx
je 0xe9b8
cmpq %rsi, 0x10(%rbx)
jne 0xe9b3
cmpb %dl, 0x18(%rbx)
je 0xe9d0
movq (%rbx), %rbx
jmp 0xe9a3
leaq 0x12dcc(%rip), %rdi     # 0x2178b
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0xa731
decq 0x10(%rdi)
movq %rbx, %rdi
callq 0x4500
movl $0x20, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x4300
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: RemovePointFromEdge(btreeedge_s*, btreepoint_s*, bool)
void RemovePointFromEdge (btreeedge_t *te, btreepoint_t *tp, bool side) // warning: the point will not be freed
{
	if (te->points[side].p != tp)
	{
		PrintOnce ("RemovePointFromEdge: internal error: point not found.");
		hlassume (false, assume_first);
	}
	te->points[side].p = NULL;

	RemoveEdgeFromList (tp->edges, te, side);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %eax
shll $0x4, %eax
leaq (%rdi,%rax), %r15
cmpq %rsi, (%rdi,%rax)
je 0xea1f
leaq 0x12db0(%rip), %rdi     # 0x217bf
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq $0x0, (%r15)
movq 0x20(%r14), %rdi
movzbl %bpl, %edx
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xe99f
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: DeletePoint(int&, btreepoint_s*)
void DeletePoint (int &numobjects, btreepoint_t *tp)
{
	if (!tp->edges->empty ())
	{
		PrintOnce ("DeletePoint: internal error: point used by edge.");
		hlassume (false, assume_first);
	}
	delete tp->edges;
	free (tp);
	numobjects--;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
cmpq %rax, (%rax)
je 0xea6e
leaq 0x12d97(%rip), %rdi     # 0x217f5
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq 0x20(%r14), %r15
testq %r15, %r15
je 0xeaa1
movq (%r15), %rdi
cmpq %r15, %rdi
je 0xea94
movq (%rdi), %r12
movl $0x20, %esi
callq 0x4300
movq %r12, %rdi
cmpq %r15, %r12
jne 0xea7f
movl $0x18, %esi
movq %r15, %rdi
callq 0x4300
movq %r14, %rdi
callq 0x4380
decl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: RemoveFaceFromList(std::__cxx11::list<btreeface_r, std::allocator<btreeface_r>>*, btreeface_s*, bool)
void RemoveFaceFromList (btreeface_l *fl, btreeface_t *tf, bool side)
{
	btreeface_l::iterator fi;
	for (fi = fl->begin (); fi != fl->end (); fi++)
	{
		if (fi->f == tf && fi->side == side)
		{
			fl->erase (fi);
			return;
		}
	}
	PrintOnce ("RemoveFaceFromList: internal error: face not found.");
	hlassume (false, assume_first);
}

// Assembly:
pushq %rbx
movq (%rdi), %rbx
cmpq %rdi, %rbx
je 0xead0
cmpq %rsi, 0x10(%rbx)
jne 0xeacb
cmpb %dl, 0x18(%rbx)
je 0xeae8
movq (%rbx), %rbx
jmp 0xeabb
leaq 0x12d4f(%rip), %rdi     # 0x21826
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0xa731
decq 0x10(%rdi)
movq %rbx, %rdi
callq 0x4500
movl $0x20, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x4300
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: DeleteEdge(int&, btreeedge_s*)
void DeleteEdge (int &numobjects, btreeedge_t *te) // warning: points in this edge could be freed if not reference by any other edges
{
	if (!te->faces->empty ())
	{
		PrintOnce ("DeleteEdge: internal error: edge used by face.");
		hlassume (false, assume_first);
	}
	if (!te->infinite)
	{
		DeleteBrink (te->brink);
	}
	for (int side = 0; side < 2; side++)
	{
		btreepoint_t *tp;
		tp = GetPointFromEdge (te, side);
		RemovePointFromEdge (te, tp, side);
		if (tp->edges->empty ())
		{
			DeletePoint (numobjects, tp);
		}
	}
	delete te->faces;
	free (te);
	numobjects--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rax
cmpq %rax, (%rax)
je 0xeb58
leaq 0x12d12(%rip), %rdi     # 0x2185a
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
cmpb $0x1, 0x20(%r14)
je 0xeb68
movq 0x30(%r14), %rdi
callq 0xdc5e
movl $0x1, %r12d
xorl %ebp, %ebp
cmpl $0x1, %r12d
setne %bpl
movq %r14, %rdi
movl %ebp, %esi
callq 0xe974
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0xe9ea
movq 0x20(%r15), %rax
cmpq %rax, (%rax)
jne 0xeba6
movq %rbx, %rdi
movq %r15, %rsi
callq 0xea40
decl %r12d
je 0xeb6e
movq 0x28(%r14), %r15
testq %r15, %r15
je 0xebde
movq (%r15), %rdi
cmpq %r15, %rdi
je 0xebd1
movq (%rdi), %r12
movl $0x20, %esi
callq 0x4300
movq %r12, %rdi
cmpq %r15, %r12
jne 0xebbc
movl $0x18, %esi
movq %r15, %rdi
callq 0x4300
movq %r14, %rdi
callq 0x4380
decl (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: GetLeafFromFace(btreeface_s*, bool)
btreeleaf_t *GetLeafFromFace (btreeface_t *tf, bool side)
{
	if (!tf->leafs[side].l)
	{
		PrintOnce ("GetLeafFromFace: internal error: Leaf not set.");
		hlassume (false, assume_first);
	}
	return tf->leafs[side].l;
}

// Assembly:
pushq %rbx
shll $0x4, %esi
leaq (%rdi,%rsi), %rbx
addq $0x10, %rbx
cmpq $0x0, (%rbx)
jne 0xec1a
leaq 0x12c7f(%rip), %rdi     # 0x21889
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq (%rbx), %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: RemoveFaceFromLeaf(btreeleaf_s*, btreeface_s*, bool)
void RemoveFaceFromLeaf (btreeleaf_t *tl, btreeface_t *tf, bool side)
{
	if (tf->leafs[side].l != tl)
	{
		PrintOnce ("RemoveFaceFromLeaf: internal error: leaf not found.");
		hlassume (false, assume_first);
	}
	tf->leafs[side].l = NULL;

	RemoveFaceFromList (tl->faces, tf, side);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %eax
shll $0x4, %eax
leaq (%rsi,%rax), %r15
addq $0x10, %r15
cmpq %rdi, (%r15)
je 0xec57
leaq 0x12c71(%rip), %rdi     # 0x218b8
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
movq $0x0, (%r15)
movq (%r14), %rdi
movzbl %bpl, %edx
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xeab7
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: DeleteFace(int&, btreeface_s*)
void DeleteFace (int &numobjects, btreeface_t *tf) // warning: edges in this face could be freed if not reference by any other faces
{
	btreeedge_l::iterator ei;
	while ((ei = tf->edges->begin ()) != tf->edges->end ())
	{
		btreeedge_t *te = ei->e;
		RemoveFaceFromList (te->faces, tf, ei->side);
		tf->edges->erase (ei);
		if (te->faces->empty ())
		{
			DeleteEdge (numobjects, te);
		}
	}
	for (int side = 0; side < 2; side++)
	{
		if (tf->leafs[side].l)
		{
			PrintOnce ("DeleteFace: internal error: face used by leaf.");
			hlassume (false, assume_first);
		}
	}
	delete tf->edges;
	free (tf);
	numobjects--;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %r15
cmpq %rax, %r15
je 0xecdc
movq 0x10(%r15), %r12
movq 0x28(%r12), %rdi
movzbl 0x18(%r15), %edx
movq %r14, %rsi
callq 0xeab7
movq (%r14), %rax
decq 0x10(%rax)
movq %r15, %rdi
callq 0x4500
movl $0x20, %esi
movq %r15, %rdi
callq 0x4300
movq 0x28(%r12), %rax
cmpq %rax, (%rax)
jne 0xecd7
movq %rbx, %rdi
movq %r12, %rsi
callq 0xeb2a
movq (%r14), %rax
jmp 0xec88
movl $0x10, %r12d
leaq 0x12c03(%rip), %r15     # 0x218ec
cmpq $0x0, (%r14,%r12)
je 0xed03
movq %r15, %rdi
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
addq $0x10, %r12
cmpq $0x20, %r12
je 0xece9
movq (%r14), %r15
testq %r15, %r15
je 0xed3f
movq (%r15), %rdi
cmpq %r15, %rdi
je 0xed32
movq (%rdi), %r12
movl $0x20, %esi
callq 0x4300
movq %r12, %rdi
cmpq %r15, %r12
jne 0xed1d
movl $0x18, %esi
movq %r15, %rdi
callq 0x4300
movq %r14, %rdi
callq 0x4380
decl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: DeleteLeaf(int&, btreeleaf_s*)
void DeleteLeaf (int &numobjects, btreeleaf_t *tl)
{
	btreeface_l::iterator fi;
	while ((fi = tl->faces->begin ()) != tl->faces->end ())
	{
		btreeface_t *tf = fi->f;
		RemoveFaceFromLeaf (tl, tf, fi->side);
		if (!tf->leafs[false].l && !tf->leafs[true].l)
		{
			DeleteFace (numobjects, tf);
		}
	}
	delete tl->faces;
	free (tl);
	numobjects--;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
movq (%rdi), %rax
cmpq %rdi, %rax
je 0xed9c
movq 0x10(%rax), %r15
movzbl 0x18(%rax), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0xec1f
cmpq $0x0, 0x10(%r15)
jne 0xed97
cmpq $0x0, 0x20(%r15)
jne 0xed97
movq %rbx, %rdi
movq %r15, %rsi
callq 0xec77
movq (%r14), %rdi
jmp 0xed63
movl $0x18, %esi
callq 0x4300
movq %r14, %rdi
callq 0x4380
decl (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: BuildTreeCells_r(int&, bclipnode_s*)
void BuildTreeCells_r (int &numobjects, bclipnode_t *c)
{
	if (c->isleaf)
	{
		return;
	}
	btreeleaf_t *tl, *front, *back;
	tl = c->treeleaf;
	SplitTreeLeaf (numobjects, tl, c->plane, c->planenum, ON_EPSILON, front, back, c->children[0], c->children[1]);
	c->treeleaf = NULL;
	c->children[0]->treeleaf = front;
	c->children[1]->treeleaf = back;
	BuildTreeCells_r (numobjects, c->children[0]);
	BuildTreeCells_r (numobjects, c->children[1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %r15
leaq 0x18(%rsp), %r12
cmpb $0x0, (%rbx)
jne 0xfccc
movq 0x30(%rbx), %rsi
movq 0x8(%rbx), %rdx
movl 0x4(%rbx), %ecx
movups 0x10(%rbx), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movsd 0x11803(%rip), %xmm0    # 0x21490
movq %r15, %r8
movq %r12, %r9
callq 0xedb6
movq $0x0, 0x30(%rbx)
movq 0x20(%rsp), %rax
movq 0x10(%rbx), %rcx
movq %rax, 0x30(%rcx)
movq 0x18(%rsp), %rax
movq 0x18(%rbx), %rcx
movq %rax, 0x30(%rcx)
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0xfc4f
movq 0x18(%rbx), %rbx
jmp 0xfc6a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: ExpandClipnodes_r(bclipnode_s*, int&, dclipnode_t const*, int)
bclipnode_t *ExpandClipnodes_r (bclipnode_t *bclipnodes, int &numbclipnodes, const dclipnode_t *clipnodes, int headnode)
{
	if (numbclipnodes >= MAXCLIPNODES)
	{
		Error ("ExpandClipnodes_r: exceeded MAXCLIPNODES");
	}
	bclipnode_t *c = &bclipnodes[numbclipnodes];
	numbclipnodes++;
	if (headnode < 0)
	{
		c->isleaf = true;
		c->content = headnode;
		c->partitions = NULL;
	}
	else
	{
		c->isleaf = false;
		c->planenum = clipnodes[headnode].planenum;
		c->plane = &g_dplanes[c->planenum];
		for (int k = 0; k < 2; k++)
		{
			c->children[k] = ExpandClipnodes_r (bclipnodes, numbclipnodes, clipnodes, clipnodes[headnode].children[k]);
		}
	}
	return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x3fff8, (%rsi)        # imm = 0x3FFF8
jl 0xfd04
leaq 0x11d81(%rip), %rdi     # 0x21a7e
xorl %eax, %eax
callq 0x9f84
movslq (%r14), %rax
imulq $0x38, %rax, %r12
addq %r15, %r12
incl %eax
movl %eax, (%r14)
testl %ebp, %ebp
js 0xfd61
movb $0x0, (%r12)
movl %ebp, %eax
leaq (%rbx,%rax,8), %r13
movslq (%r13), %rax
movl %eax, 0x4(%r12)
shlq $0x6, %rax
addq 0x1b272(%rip), %rax     # 0x2afa8
movq %rax, 0x8(%r12)
xorl %ebp, %ebp
movswl 0x4(%r13,%rbp,2), %ecx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xfcd8
movq %rax, 0x10(%r12,%rbp,8)
incq %rbp
cmpq $0x1, %rbp
je 0xfd3d
jmp 0xfd74
movb $0x1, (%r12)
movl %ebp, 0x20(%r12)
movq $0x0, 0x28(%r12)
movq %r12, %rax
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/hlbsp/brink.cpp
// Function: ExpandClipnodes(bbrinkinfo_s*, dclipnode_t const*, int)
void ExpandClipnodes (bbrinkinfo_t *info, const dclipnode_t *clipnodes, int headnode)
{
	bclipnode_t *bclipnodes = (bclipnode_t *)malloc (MAXCLIPNODES * sizeof (bclipnode_t)); // 262144 * 30byte = 7.5MB
	hlassume (bclipnodes != NULL, assume_NoMemory);
	info->numclipnodes = 0;
	ExpandClipnodes_r (bclipnodes, info->numclipnodes, clipnodes, headnode);
	info->clipnodes = (bclipnode_t *)malloc (info->numclipnodes * sizeof (bclipnode_t));
	hlassume (info->clipnodes != NULL, assume_NoMemory);
	memcpy (info->clipnodes, bclipnodes, info->numclipnodes * sizeof (bclipnode_t));
	for (int i = 0; i < info->numclipnodes; i++)
	{
		for (int k = 0; k < 2; k++)
		{
			info->clipnodes[i].children[k] = info->clipnodes + (bclipnodes[i].children[k] - bclipnodes);
		}
	}
	free (bclipnodes);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0xdffe40, %edi         # imm = 0xDFFE40
callq 0x4400
movq %rax, %r14
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0xfcd8
movslq (%rbx), %rax
imulq $0x38, %rax, %rdi
callq 0x4400
movq %rax, 0x8(%rbx)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
movq 0x8(%rbx), %rdi
movslq (%rbx), %rax
imulq $0x38, %rax, %rdx
movq %r14, %rsi
callq 0x4260
cmpl $0x0, (%rbx)
jle 0xfe44
leaq 0x10(%r14), %rax
movl $0x10, %ecx
xorl %edx, %edx
xorl %esi, %esi
movq 0x8(%rbx), %rdi
movq (%rax,%rsi,8), %r8
subq %r14, %r8
addq %rdi, %r8
addq %rcx, %rdi
movq %r8, (%rdi,%rsi,8)
incq %rsi
cmpq $0x1, %rsi
je 0xfe13
incq %rdx
movslq (%rbx), %rsi
addq $0x38, %rax
addq $0x38, %rcx
cmpq %rsi, %rdx
jl 0xfe11
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4380
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: BuildTreeCells(bbrinkinfo_s*)
void BuildTreeCells (bbrinkinfo_t *info)
{
	info->numobjects = 0;
	info->leaf_outside = BuildOutside (info->numobjects);
	info->clipnodes[0].treeleaf = BuildBaseCell (info->numobjects, &info->clipnodes[0], BOGUS_RANGE, info->leaf_outside);
	BuildTreeCells_r (info->numobjects, &info->clipnodes[0]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movl $0x0, 0x10(%rdi)
movq %r14, %rdi
movl $0x1, %esi
callq 0xe395
movq $0x0, 0x10(%rax)
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rsi
movsd 0x1160b(%rip), %xmm0    # 0x21498
movq %r14, %rdi
movq %rax, %rdx
callq 0xe403
movq 0x8(%rbx), %rcx
movq %rax, 0x30(%rcx)
movq 0x8(%rbx), %rsi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xfc4f
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: DeleteTreeCells_r(int&, bclipnode_s*)
void DeleteTreeCells_r (int &numobjects, bclipnode_t *node)
{
	if (node->treeleaf)
	{
		DeleteLeaf (numobjects, node->treeleaf);
		node->treeleaf = NULL;
	}
	if (!node->isleaf)
	{
		DeleteTreeCells_r (numobjects, node->children[0]);
		DeleteTreeCells_r (numobjects, node->children[1]);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rbx), %rsi
testq %rsi, %rsi
je 0xfed6
movq %r14, %rdi
callq 0xed55
movq $0x0, 0x30(%rbx)
cmpb $0x0, (%rbx)
jne 0xfeed
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0xfeb3
movq 0x18(%rbx), %rbx
jmp 0xfebd
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: DeleteTreeCells(bbrinkinfo_s*)
void DeleteTreeCells (bbrinkinfo_t *info)
{
	DeleteLeaf (info->numobjects, info->leaf_outside);
	info->leaf_outside = NULL;
	DeleteTreeCells_r (info->numobjects, &info->clipnodes[0]);
	if (info->numobjects != 0)
	{
		PrintOnce ("DeleteTreeCells: internal error: numobjects != 0");
		hlassume (false, assume_first);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq 0x18(%rdi), %rsi
movq %r14, %rdi
callq 0xed55
movq $0x0, 0x18(%rbx)
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0xfeb3
cmpl $0x0, 0x10(%rbx)
je 0xff44
leaq 0x11b7a(%rip), %rdi     # 0x21aa7
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa731
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: ClearMarks_r(bclipnode_s*)
void ClearMarks_r (bclipnode_t *node)
{
	if (node->isleaf)
	{
		btreeface_l::iterator fi;
		btreeedge_l::iterator ei;
		for (fi = node->treeleaf->faces->begin (); fi != node->treeleaf->faces->end (); fi++)
		{
			for (ei = fi->f->edges->begin (); ei != fi->f->edges->end (); ei++)
			{
				ei->e->tmp_tested = false;
			}
		}
	}
	else
	{
		ClearMarks_r (node->children[0]);
		ClearMarks_r (node->children[1]);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, (%rbx)
je 0xff64
movq 0x10(%rbx), %rdi
callq 0xff4c
movq 0x18(%rbx), %rbx
jmp 0xff50
movq 0x30(%rbx), %rax
movq (%rax), %rcx
movq (%rcx), %rax
cmpq %rcx, %rax
je 0xffa2
movq 0x10(%rax), %rcx
movq (%rcx), %rdx
movq (%rdx), %rcx
cmpq %rdx, %rcx
je 0xff96
movq 0x10(%rcx), %rdx
movb $0x0, 0x38(%rdx)
movq (%rcx), %rcx
movq 0x10(%rax), %rdx
cmpq (%rdx), %rcx
jne 0xff82
movq (%rax), %rax
movq 0x30(%rbx), %rcx
cmpq (%rcx), %rax
jne 0xff73
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: CollectBrinks_r(bclipnode_s*, int&, bbrink_t**)
void CollectBrinks_r (bclipnode_t *node, int &numbrinks, bbrink_t **brinks)
{
	if (node->isleaf)
	{
		btreeface_l::iterator fi;
		btreeedge_l::iterator ei;
		for (fi = node->treeleaf->faces->begin (); fi != node->treeleaf->faces->end (); fi++)
		{
			for (ei = fi->f->edges->begin (); ei != fi->f->edges->end (); ei++)
			{
				if (ei->e->tmp_tested)
				{
					continue;
				}
				ei->e->tmp_tested = true;
				if (!ei->e->infinite)
				{
					if (brinks != NULL)
					{
						brinks[numbrinks] = ei->e->brink;
						brinks[numbrinks]->edge = ei->e;
						for (int i = 0; i < brinks[numbrinks]->numnodes; i++)
						{
							bbrinknode_t *node = &(*brinks[numbrinks]->nodes)[i];
							if (node->isleaf && !node->clipnode->isleaf)
							{
								PrintOnce ("CollectBrinks_r: internal error: not leaf");
								hlassume (false, assume_first);
							}
						}
					}
					numbrinks++;
				}
			}
		}
	}
	else
	{
		CollectBrinks_r (node->children[0], numbrinks, brinks);
		CollectBrinks_r (node->children[1], numbrinks, brinks);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x1, (%r15)
je 0xffd3
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xffa4
movq 0x18(%r15), %r15
jmp 0xffb8
movq 0x30(%r15), %rax
movq (%rax), %rax
movq (%rax), %r13
cmpq %rax, %r13
je 0x100bd
movq %r15, (%rsp)
movq 0x10(%r13), %rax
movq (%rax), %rax
movq (%rax), %rbp
cmpq %rax, %rbp
je 0x100a8
movq 0x10(%rbp), %rax
cmpb $0x0, 0x38(%rax)
jne 0x10097
movb $0x1, 0x38(%rax)
movq 0x10(%rbp), %rax
cmpb $0x0, 0x20(%rax)
jne 0x10097
testq %rbx, %rbx
je 0x10094
movq 0x30(%rax), %rax
movslq (%r14), %rcx
movq %rax, (%rbx,%rcx,8)
movq 0x10(%rbp), %rax
movslq (%r14), %rcx
movq (%rbx,%rcx,8), %rcx
movq %rax, 0x58(%rcx)
movslq (%r14), %rax
movq (%rbx,%rax,8), %rax
cmpl $0x0, 0x48(%rax)
jle 0x10094
movl $0x20, %r15d
xorl %r12d, %r12d
movq 0x50(%rax), %rax
movq (%rax), %rax
cmpb $0x1, -0x20(%rax,%r15)
jne 0x1007d
movq (%rax,%r15), %rax
cmpb $0x0, (%rax)
jne 0x1007d
leaq 0x11a6b(%rip), %rdi     # 0x21ad8
xorl %eax, %eax
callq 0xa1f4
xorl %edi, %edi
xorl %esi, %esi
callq 0xa731
incq %r12
movslq (%r14), %rax
movq (%rbx,%rax,8), %rax
movslq 0x48(%rax), %rcx
addq $0x28, %r15
cmpq %rcx, %r12
jl 0x1004e
incl (%r14)
movq (%rbp), %rbp
movq 0x10(%r13), %rax
cmpq (%rax), %rbp
jne 0xfffd
movq (%r13), %r13
movq (%rsp), %r15
movq 0x30(%r15), %rax
cmpq (%rax), %r13
jne 0xffea
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/hlbsp/brink.cpp
// Function: CollectBrinks(bbrinkinfo_s*)
void CollectBrinks (bbrinkinfo_t *info)
{
	info->numbrinks = 0;
	ClearMarks_r (&info->clipnodes[0]);
	CollectBrinks_r (&info->clipnodes[0], info->numbrinks, NULL);
	hlassume (info->brinks = (bbrink_t **)malloc (info->numbrinks * sizeof (bbrink_t *)), assume_NoMemory);
	info->numbrinks = 0;
	ClearMarks_r (&info->clipnodes[0]);
	CollectBrinks_r (&info->clipnodes[0], info->numbrinks, info->brinks);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x20(%rdi), %rbx
xorl %r15d, %r15d
movl %r15d, 0x20(%rdi)
movq 0x8(%rdi), %rdi
callq 0xff4c
movq 0x8(%r14), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xffa4
movslq 0x20(%r14), %rdi
shlq $0x3, %rdi
callq 0x4400
movq %rax, 0x28(%r14)
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
movl %r15d, 0x20(%r14)
movq 0x8(%r14), %rdi
callq 0xff4c
movq 0x8(%r14), %rdi
movq 0x28(%r14), %rdx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xffa4
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: PrintCircle(bcircle_t const*)
void PrintCircle (const bcircle_t *c)
{
	Log ("axis %f %f %f\n", c->axis[0], c->axis[1], c->axis[2]);
	Log ("basenormal %f %f %f\n", c->basenormal[0], c->basenormal[1], c->basenormal[2]);
	Log ("numwedges %d %d\n", c->numwedges[0], c->numwedges[1]);
	for (int side = 0; side < 2; side++)
	{
		for (int i = 0; i < c->numwedges[side]; i++)
		{
			const bwedge_t *w = &c->wedges[side][i];
			const bsurface_t *s = &c->surfaces[side][i];
			Log ("surface[%d][%d] nodenum %d nodeside %d normal %f %f %f\n", side, i, s->nodenum, s->nodeside, s->normal[0], s->normal[1], s->normal[2]);
			Log ("wedge[%d][%d] nodenum %d content %d\n", side, i, w->nodenum, w->content);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
movsd 0x10(%rdi), %xmm2
leaq 0x112be(%rip), %rdi     # 0x21b4e
movb $0x3, %al
callq 0x9c96
movsd 0x18(%rbx), %xmm0
movsd 0x20(%rbx), %xmm1
movsd 0x28(%rbx), %xmm2
leaq 0x112b0(%rip), %rdi     # 0x21b5d
movb $0x3, %al
callq 0x9c96
movl 0x30(%rbx), %esi
movl 0x34(%rbx), %edx
leaq 0x112b1(%rip), %rdi     # 0x21b72
xorl %eax, %eax
callq 0x9c96
movl $0x62a, %eax            # imm = 0x62A
movq %rax, (%rsp)
leaq 0x112ab(%rip), %r14     # 0x21b83
leaq 0x112dc(%rip), %r15     # 0x21bbb
xorl %r12d, %r12d
cmpl $0x0, 0x30(%rbx,%r12,4)
jle 0x1094c
movq (%rsp), %rbp
xorl %r13d, %r13d
movl -0x4(%rbx,%rbp,2), %ecx
movzbl (%rbx,%rbp,2), %r8d
movsd -0x1c(%rbx,%rbp,2), %xmm0
movsd -0x14(%rbx,%rbp,2), %xmm1
movsd -0xc(%rbx,%rbp,2), %xmm2
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
movb $0x3, %al
callq 0x9c96
movl -0x5f2(%rbx,%rbp), %r8d
movl -0x5ee(%rbx,%rbp), %ecx
movq %r15, %rdi
movl %r12d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x9c96
incq %r13
movslq 0x30(%rbx,%r12,4), %rax
addq $0x18, %rbp
cmpq %rax, %r13
jl 0x108f1
leaq 0x1(%r12), %rax
addq $0x600, (%rsp)          # imm = 0x600
testq %r12, %r12
movq %rax, %r12
je 0x108e2
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/hlbsp/brink.cpp
// Function: DeleteClipnodes(bbrinkinfo_s*)
void DeleteClipnodes (bbrinkinfo_t *info)
{
	for (int i = 0; i < info->numclipnodes; i++)
	{
#ifdef HLBSP_BRINKHACK_BUGFIX
		if (!info->clipnodes[i].isleaf)
		{
			continue;
		}
#endif
		bpartition_t *p;
		while ((p = info->clipnodes[i].partitions) != NULL)
		{
			info->clipnodes[i].partitions = p->next;
			free (p);
		}
	}
	free (info->clipnodes);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x112b7
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
imulq $0x38, %r14, %r15
cmpb $0x1, (%rax,%r15)
jne 0x112ac
movq 0x8(%rbx), %rax
movq 0x28(%rax,%r15), %rdi
testq %rdi, %rdi
je 0x112ac
addq %r15, %rax
addq $0x28, %rax
movq 0x10(%rdi), %rcx
movq %rcx, (%rax)
callq 0x4380
movq 0x8(%rbx), %rax
addq %r15, %rax
addq $0x28, %rax
movq (%rax), %rdi
testq %rdi, %rdi
jne 0x1128d
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x11269
movq 0x8(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4380
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: CreateBrinkinfo(dclipnode_t const*, int)
void *CreateBrinkinfo (const dclipnode_t *clipnodes, int headnode)
{
	bbrinkinfo_t *info;
	try
	{
		hlassume (info = (bbrinkinfo_t *)malloc (sizeof (bbrinkinfo_t)), assume_NoMemory);
		ExpandClipnodes (info, clipnodes, headnode);
		BuildTreeCells (info);
		CollectBrinks (info);
		AnalyzeBrinks (info);
		FreeBrinks (info);
		DeleteTreeCells (info);
		SortPartitions (info);
	}
	catch (std::bad_alloc)
	{
		hlassume (false, assume_NoMemory);
	}
	return info;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %r14
movl $0x30, %edi
callq 0x4400
movq %rax, %rbx
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl $0x1, %esi
callq 0xa731
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0xfd86
movq %rbx, %rdi
callq 0xfe56
movq %rbx, %rdi
callq 0x100cc
movq %rbx, %rdi
callq 0x10afd
movq 0x28(%rbx), %rdi
callq 0x4380
movq %rbx, %rdi
callq 0xfef5
movq %rbx, %rdi
callq 0x112c5
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
cmpl $0x1, %edx
jne 0x11588
movq %r14, %rdi
callq 0x43c0
movq 0x19a78(%rip), %rax     # 0x2afc0
addq $0x10, %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
callq 0x4130
xorl %edi, %edi
movl $0x1, %esi
callq 0xa731
leaq 0x8(%rsp), %rdi
callq 0x41c0
callq 0x4510
jmp 0x11525
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x41c0
callq 0x4510
movq %r14, %rdi
callq 0x4540
movq %rax, %rdi
callq 0x11afc
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/brink.cpp
// Function: FixBrinks(void const*, bbrinklevel_e, int&, dclipnode_t*, int, int, int&)
bool FixBrinks (const void *brinkinfo, bbrinklevel_e level, int &headnode_out, dclipnode_t *clipnodes_out, int maxsize, int size, int &size_out)
{
	const bbrinkinfo_t *info = (const bbrinkinfo_t *)brinkinfo;
	dclipnode_t *begin = clipnodes_out;
	dclipnode_t *end = &clipnodes_out[maxsize];
	dclipnode_t *current = &clipnodes_out[size];
#ifdef HLBSP_MERGECLIPNODE
	clipnodemap_t outputmap;
#endif
	int r;
	if (!FixBrinks_r (&info->clipnodes[0], level, r, begin, end, current
#ifdef HLBSP_MERGECLIPNODE
		, &outputmap
#endif
		))
	{
		return false;
	}
	headnode_out = r;
	size_out = current - begin;
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movslq %r8d, %rax
leaq (%rcx,%rax,8), %r8
movslq %r9d, %rax
leaq (%rcx,%rax,8), %rax
leaq 0x18(%rsp), %r9
movq %rax, (%r9)
leaq 0x28(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0x8(%rdi), %rdi
leaq 0x20(%rsp), %rax
movq %rax, (%rsp)
leaq 0x14(%rsp), %rdx
movq %rbx, %rcx
callq 0x11702
movl %eax, %ebp
testb %al, %al
je 0x1191d
movq 0x70(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, (%r14)
movq 0x18(%rsp), %rcx
subq %rbx, %rcx
shrq $0x3, %rcx
movl %ecx, (%rax)
leaq 0x20(%rsp), %rdi
callq 0x11c20
movl %ebp, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x11c20
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/merge.cpp
// Function: MergePlaneFaces(surface_s*)
void            MergePlaneFaces(surface_t* plane)
{
    face_t*         f1;
    face_t*         next;
    face_t*         merged;

    merged = NULL;

    for (f1 = plane->faces; f1; f1 = next)
    {
        next = f1->next;
        merged = MergeFaceToList(f1, merged);
    }

    // chain all of the non-empty faces to the plane
    plane->faces = FreeMergeListScraps(merged);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
xorl %eax, %eax
testq %rdi, %rdi
je 0x12822
movq (%rdi), %r14
movq %rax, %rsi
callq 0x12855
movq %r14, %rdi
testq %r14, %r14
jne 0x1280f
xorl %r14d, %r14d
testq %rax, %rax
je 0x1284b
movq (%rax), %r15
cmpl $-0x1, 0x2c(%rax)
je 0x1283b
movq %r14, (%rax)
movq %rax, %r14
jmp 0x12843
movq %rax, %rdi
callq 0x150c0
movq %r15, %rax
testq %r15, %r15
jne 0x1282a
movq %r14, 0x48(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/merge.cpp
// Function: MergeAll(surface_s*)
void            MergeAll(surface_t* surfhead)
{
    surface_t*      surf;
    int             mergefaces;
    face_t*         f;

    Verbose("---- MergeAll ----\n");

    mergefaces = 0;
    for (surf = surfhead; surf; surf = surf->next)
    {
        MergePlaneFaces(surf);
        for (f = surf->faces; f; f = f->next)
        {
            mergefaces++;
        }
    }

    Verbose("%i mergefaces\n", mergefaces);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xef25(%rip), %rdi      # 0x21e43
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xa3d7
testq %r14, %r14
je 0x12f4e
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x127fc
leaq 0x48(%r14), %rax
decl %ebx
movq (%rax), %rax
incl %ebx
testq %rax, %rax
jne 0x12f3c
movq (%r14), %r14
testq %r14, %r14
jne 0x12f2e
leaq 0xef02(%rip), %rdi      # 0x21e57
movl %ebx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa3d7
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/outside.cpp
// Function: isClassnameAllowableOutside(char const*)
bool            isClassnameAllowableOutside(const char* const classname)
{
    if (g_strAllowableOutsideList)
    {
        unsigned        x;
        char**          list = g_strAllowableOutsideList;

        for (x = 0; x < g_nAllowableOutside; x++, list++)
        {
            if (list)
            {
                if (!strcasecmp(classname, *list))
                {
                    return true;
                }
            }
        }
    }

    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x20bc966(%rip), %r14   # 0x20cf8e0
testq %r14, %r14
je 0x12fcc
movl 0x20bc952(%rip), %r15d  # 0x20cf8d8
testl %r15d, %r15d
setne %bpl
je 0x12fcc
movq %rdi, %rbx
movq (%r14), %rsi
callq 0x4320
testl %eax, %eax
je 0x12fc5
leal -0x1(%r15), %r13d
xorl %r12d, %r12d
cmpl %r12d, %r13d
je 0x12fcc
movq 0x8(%r14,%r12,8), %rsi
movq %rbx, %rdi
callq 0x4320
incq %r12
testl %eax, %eax
jne 0x12fa5
cmpl %r15d, %r12d
setb %bpl
movb $0x1, %al
testb %bpl, %bpl
jne 0x12fce
xorl %eax, %eax
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/hlbsp/outside.cpp
// Function: RecursiveFillOutside(node_s*, bool)
static bool     RecursiveFillOutside(node_t* l, const bool fill)
{
    portal_t*       p;
    int             s;

    if ((l->contents == CONTENTS_SOLID) || (l->contents == CONTENTS_SKY) 
#ifdef ZHLT_DETAIL
        || (l->contents == CONTENTS_DETAIL)
#endif
        )
	{
        /*if (l->contents != CONTENTS_SOLID)
            Log("RecursiveFillOutside::l->contents == %i \n", l->contents);*/

        return false;
    }

    if (l->valid == valid)
    {
        return false;
    }

    if (l->occupied)
    {
        hit_occupied = l->occupied;
        backdraw = 1000;
        return true;
    }

    l->valid = valid;

    // fill it and it's neighbors
    if (fill)
    {
#ifdef ZHLT_DETAILBRUSH
		FillLeaf (l);
#else
        l->contents = CONTENTS_SOLID;
        l->planenum = -1;
#endif
    }
    outleafs++;

    for (p = l->portals; p;)
    {
        s = (p->nodes[0] == l);

        if (RecursiveFillOutside(p->nodes[s], fill))
        {                                                  // leaked, so stop filling
            if (backdraw-- > 0)
            {
                MarkLeakTrail(p);
            }
            return true;
        }
        p = p->next[!s];
    }

    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0xa0(%rdi), %eax
orl $0x4, %eax
cmpl $-0x2, %eax
jne 0x135d9
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
movl 0x20bc30a(%rip), %eax   # 0x20cf8ec
cmpl %eax, 0xbc(%rdi)
je 0x135cc
movl 0xc0(%rbx), %ecx
testl %ecx, %ecx
je 0x13609
movl %ecx, 0x20bc30e(%rip)   # 0x20cf908
movl $0x3e8, 0x20bc314(%rip) # imm = 0x3E8
movb $0x1, %bpl
jmp 0x135ce
movl %esi, %ebp
movl %eax, 0xbc(%rbx)
testb %bpl, %bpl
je 0x1361e
movq %rbx, %rdi
callq 0x138b3
incl 0x20bc2c4(%rip)         # 0x20cf8e8
movq 0xb0(%rbx), %r14
testq %r14, %r14
je 0x135cc
movzbl %bpl, %r15d
xorl %ebp, %ebp
movq 0x48(%r14), %r12
xorl %eax, %eax
cmpq %rbx, %r12
sete %al
movq 0x48(%r14,%rax,8), %rdi
movl %r15d, %esi
callq 0x135b6
testb %al, %al
jne 0x1366a
xorl %eax, %eax
cmpq %rbx, %r12
setne %al
movq 0x58(%r14,%rax,8), %r14
testq %r14, %r14
jne 0x13636
jmp 0x135ce
movl 0x20bc2a8(%rip), %eax   # 0x20cf918
leal -0x1(%rax), %ecx
movl %ecx, 0x20bc29f(%rip)   # 0x20cf918
movb $0x1, %bpl
testl %eax, %eax
jle 0x135ce
movq %r14, %rdi
callq 0x13a3b
jmp 0x135ce
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/outside.cpp
// Function: MarkOccupied_r(node_s*)
void			MarkOccupied_r (node_t* node)
{
	if (node->empty == 1)
	{
		node->empty = 0;
		portal_t*       p;
		int             s;
		for (p = node->portals; p; p = p->next[!s])
		{
			s = (p->nodes[0] == node);
			MarkOccupied_r (p->nodes[s]);
		}
	}
}

// Assembly:
cmpl $0x1, 0xc4(%rdi)
jne 0x13882
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0xc4(%rdi)
movq 0xb0(%rdi), %r14
testq %r14, %r14
je 0x1387d
xorl %r15d, %r15d
xorl %eax, %eax
cmpq %rbx, 0x48(%r14)
setne %r15b
sete %al
movq 0x48(%r14,%rax,8), %rdi
callq 0x13835
movq 0x58(%r14,%r15,8), %r14
jmp 0x13857
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/outside.cpp
// Function: FillLeaf(node_s*)
static void FillLeaf (node_t *l)
{
	if (!l->isportalleaf)
	{
		Warning ("FillLeaf: not leaf");
		return;
	}
	if (l->contents == CONTENTS_SOLID)
	{
		Warning ("FillLeaf: fill solid");
		return;
	}
	FreeDetailNode_r (l);
	l->contents = CONTENTS_SOLID;
	l->planenum = -1;
}

// Assembly:
pushq %rbx
cmpb $0x0, 0x49(%rdi)
je 0x138cf
movq %rdi, %rbx
cmpl $-0x2, 0xa0(%rdi)
jne 0x138de
leaq 0xe9f8(%rip), %rdi      # 0x222c5
jmp 0x138d6
leaq 0xe9dc(%rip), %rdi      # 0x222b2
xorl %eax, %eax
popq %rbx
jmp 0xa2f6
movq %rbx, %rdi
callq 0x13c90
movl $0xfffffffe, 0xa0(%rbx) # imm = 0xFFFFFFFE
movl $0xffffffff, 0x80(%rbx) # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/outside.cpp
// Function: FillInside(node_s*)
void			FillInside (node_t* node)
{
	int i;
	g_outside_node.empty = 0;
	ResetMark_r (node);
    for (i = 1; i < g_numentities; i++)
    {
		if (*ValueForKey(&g_entities[i], "origin"))
		{
			vec3_t origin;
			node_t* innode;
			GetVectorForKey(&g_entities[i], "origin", origin);
			origin[2] += 1;
			innode = PointInLeaf (node, origin);
			MarkOccupied_r (innode);
			origin[2] -= 2;
			innode = PointInLeaf (node, origin);
			MarkOccupied_r (innode);
		}
	}
	RemoveUnused_r (node);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x20bc00c(%rip), %rax   # 0x20cf920
movl $0x0, 0xc4(%rax)
callq 0x137f0
leaq 0x200eaca(%rip), %r13   # 0x20223f4
cmpl $0x2, (%r13)
jl 0x139cb
leaq 0x200eac4(%rip), %r14   # 0x2022400
addq $0x28, %r14
movl $0x1, %ebp
leaq 0xad9a(%rip), %r15      # 0x1e6e6
movq %rsp, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x74c9
cmpb $0x0, (%rax)
je 0x139bb
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x80ad
movsd 0x10(%rsp), %xmm0
addsd 0xd75d(%rip), %xmm0     # 0x210d8
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x139e2
movq %rax, %rdi
callq 0x13835
movsd 0x10(%rsp), %xmm0
addsd 0xe4c6(%rip), %xmm0     # 0x21e68
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x139e2
movq %rax, %rdi
callq 0x13835
incq %rbp
movslq (%r13), %rax
addq $0x28, %r14
cmpq %rax, %rbp
jl 0x1394f
movq %rbx, %rdi
callq 0x13883
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/hlbsp/outside.cpp
// Function: MarkFacesInside_r(node_s*)
static void MarkFacesInside_r (node_t *node)
{
	if (node->planenum == -1)
	{
		face_t **fp;
		for (fp = node->markfaces; *fp; fp++)
		{
	        (*fp)->outputnumber = 0;
		}
	}
	else
	{
		MarkFacesInside_r (node->children[0]);
		MarkFacesInside_r (node->children[1]);
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $-0x1, 0x80(%rbx)
je 0x13c68
movq 0x88(%rbx), %rdi
callq 0x13c46
movq 0x90(%rbx), %rbx
jmp 0x13c4a
movq 0xa8(%rbx), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x13c8e
addq $0x8, %rax
movl $0x0, 0x28(%rcx)
movq (%rax), %rcx
addq $0x8, %rax
testq %rcx, %rcx
jne 0x13c7b
popq %rbx
retq