LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/fuad00[P]wifitool/code.cpp
// Function: deauth_func()
bool deauth_func()	{
	string airodump2 = "xterm -hold -title 'Слушаем канал...' -e sudo airodump-ng " + wireless_card_monitormode + " --bssid='" + target_bssid + "' -c " + target_channel_number + " -w tmp/'" + target_name + "'.cap";
	const char *airodump_sniff_selected_ap = airodump2.c_str();
	system(airodump_sniff_selected_ap);  // Запуск команды для прослушки канала
	// TODO: Автоматом понять, что хендшейк пойман (у fluxion есть реализация)
	return 0;

}

// Assembly:
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
leaq 0x1a7e(%rip), %rsi      # 0x4992
leaq 0x426d(%rip), %rdx      # 0x7188
leaq 0xe0(%rsp), %rbx
movq %rbx, %rdi
callq 0x337f
leaq 0x1aa7(%rip), %rdx      # 0x49d9
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x3341
leaq 0x432c(%rip), %rdx      # 0x7270
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x3360
leaq 0x1a8c(%rip), %rdx      # 0x49e4
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3341
leaq 0x4282(%rip), %rdx      # 0x71f0
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3360
leaq 0x1a66(%rip), %rdx      # 0x49ea
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x3341
leaq 0x4313(%rip), %rdx      # 0x72b0
leaq 0xa0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x3360
leaq 0x1a3b(%rip), %rdx      # 0x49f4
leaq 0xc0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3341
leaq 0xa0(%rsp), %rdi
callq 0x2228
leaq 0x80(%rsp), %rdi
callq 0x2228
leaq 0x60(%rsp), %rdi
callq 0x2228
leaq 0x40(%rsp), %rdi
callq 0x2228
leaq 0x20(%rsp), %rdi
callq 0x2228
movq %rsp, %rdi
callq 0x2228
leaq 0xe0(%rsp), %rdi
callq 0x2228
movq 0xc0(%rsp), %rdi
callq 0x20f0
leaq 0xc0(%rsp), %rdi
callq 0x2228
xorl %eax, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
retq
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
jmp 0x30ac
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x2228
jmp 0x3062
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x2228
jmp 0x3074
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2228
jmp 0x3083
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2228
jmp 0x3092
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2228
movq %rsp, %rdi
callq 0x2228
leaq 0xe0(%rsp), %rdi
callq 0x2228
movq %rbx, %rdi
callq 0x21d0
movq %rax, %rbx
jmp 0x309c
movq %rax, %rbx
jmp 0x30a4
// File: /workspace/github_cpp_makefile_star2_O2/fuad00[P]wifitool/code.cpp
// Function: animation()
bool animation() {

	for(int t=0; t<15; t++)	{
		string channel_anim = " Настраиваем сетевой канал";

		cout << "[)]" << channel_anim << "." << endl;
		system("sleep 0.1 && clear");
		cout << "[|]" << channel_anim << ".." << endl;
		system("sleep 0.1 && clear");
		cout << "[(]" << channel_anim << "..." << endl;
		system("sleep 0.1 && clear");
		cout << "[|]" << channel_anim << ".." << endl;
		system("sleep 0.1 && clear");

	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
pushq $0xf
popq %rbp
leaq 0x8(%rsp), %r14
movq 0x3ef0(%rip), %r12      # 0x6fd0
leaq 0x1a89(%rip), %rbx      # 0x4b70
leaq 0x1a95(%rip), %r15      # 0x4b83
leaq 0x13d3(%rip), %r13      # 0x44c8
subl $0x1, %ebp
jb 0x31f3
movq %r14, %rdi
leaq 0x1a32(%rip), %rsi      # 0x4b3a
leaq 0x7(%rsp), %rdx
callq 0x3306
movq %r12, %rdi
leaq 0x1a50(%rip), %rsi      # 0x4b6c
callq 0x2130
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
movq %rax, %rdi
leaq 0x197a(%rip), %rsi      # 0x4ab0
callq 0x2130
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20f0
movq %r12, %rdi
movq %r15, %rsi
callq 0x2130
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20f0
movq %r12, %rdi
leaq 0x1a01(%rip), %rsi      # 0x4b87
callq 0x2130
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
movq %rax, %rdi
leaq 0x1327(%rip), %rsi      # 0x44c7
callq 0x2130
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20f0
movq %r12, %rdi
movq %r15, %rsi
callq 0x2130
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
movq %rax, %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x2228
jmp 0x30f5
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2228
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/fuad00[P]wifitool/code.cpp
// Function: deauth_func2()
bool deauth_func2()	{
	string airplay_deauth = "xterm -title 'Глушим сеть...' -e sudo aireplay-ng --deauth 7 -a " + target_bssid + " " + wireless_card_monitormode; // -c Client_MAC
	const char *deauther = airplay_deauth.c_str();
	system(deauther); // Запуск команды для деаута клиентов
	return 0;
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
leaq 0x17d5(%rip), %rsi      # 0x49fa
leaq 0x4044(%rip), %rdx      # 0x7270
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x337f
leaq 0x15bc(%rip), %rdx      # 0x47fc
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x3341
leaq 0x3f36(%rip), %rdx      # 0x7188
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x3360
movq %rsp, %rdi
callq 0x2228
leaq 0x40(%rsp), %rdi
callq 0x2228
movq 0x20(%rsp), %rdi
callq 0x20f0
leaq 0x20(%rsp), %rdi
callq 0x2228
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x32ac
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2228
jmp 0x32a7
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2228
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/fuad00[P]wifitool/code.cpp
// Function: crack_func()
bool crack_func()	{
	system("xterm -hold -title 'Перебор пароля...' -e sudo aircrack-ng -w list.txt tmp/*.cap"); // Запуск команды для перебора
	system("cp tmp/*.cap ."); // Копируем рукопожатие
	progress(100);            // Выводим строку прогресса
	cout << "\nProgram finished!" << endl;
	system(start_func);       // Запуск команды для отчистки
	return 0;
}

// Assembly:
pushq %rax
leaq 0x1784(%rip), %rdi      # 0x4a45
callq 0x20f0
leaq 0x17d6(%rip), %rdi      # 0x4aa3
callq 0x20f0
pushq $0x64
popq %rdi
callq 0x28d1
movq 0x3cef(%rip), %rdi      # 0x6fd0
leaq 0x17ca(%rip), %rsi      # 0x4ab2
callq 0x2130
movq %rax, %rdi
callq 0x20a0
movq 0x3eac(%rip), %rdi      # 0x71a8
callq 0x20f0
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::getTriangles() const
std::vector<vec3> Mesh::getTriangles() const
{
    std::vector<vec3> vList;
    for(auto it=triangles.begin(); it!=triangles.end(); it++)
    {
        vList.push_back(vertices[halfEdges[it->eIndices[0]].vIndices[0]].pos);
        vList.push_back(vertices[halfEdges[it->eIndices[1]].vIndices[0]].pos);
        vList.push_back(vertices[halfEdges[it->eIndices[2]].vIndices[0]].pos);
    }
    return vList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x28(%rsi), %r15
cmpq 0x30(%r14), %r15
je 0x13ae
movl (%r15), %eax
movq 0x10(%r14), %rcx
movq 0x40(%r14), %rdx
imulq $0x18, %rax, %rax
movl (%rdx,%rax), %eax
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x2a22
movl 0x4(%r15), %eax
movq 0x10(%r14), %rcx
movq 0x40(%r14), %rdx
imulq $0x18, %rax, %rax
movl (%rdx,%rax), %eax
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x2a22
movl 0x8(%r15), %eax
movq 0x10(%r14), %rcx
movq 0x40(%r14), %rdx
imulq $0x18, %rax, %rax
movl (%rdx,%rax), %eax
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x2a22
addq $0x48, %r15
jmp 0x132e
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x31cc
movq %r14, %rdi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::inTriangle(unsigned int, glm::detail::tvec3<double, (glm::precision)0> const&) const
bool Mesh::inTriangle(unsigned triIndex, const vec3& pos) const
{
    bool projCond = false;
    for(int i=0; i<3; i++)
    {
        vec3 v[2];
        const HalfEdge& e = halfEdges[triangles[triIndex].eIndices[i]];
        v[0] = vertices[e.vIndices[0]].pos;
        v[1] = vertices[e.vIndices[1]].pos;
        if(orient(v[0], v[1], pos)<0)
            return false;
        real projDist = glm::dot(pos-v[0], glm::normalize(v[1]-v[0]));
        if(projDist >= 0 && projDist < glm::length(v[1] - v[0]))
            projCond = true;
    }
    return projCond;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, %eax
imulq $0x48, %rax, %r13
xorl %r15d, %r15d
movq %rsp, %r12
xorl %ebp, %ebp
cmpq $0x3, %r15
je 0x1a80
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq 0x28(%r14), %rax
addq %r13, %rax
movl (%rax,%r15,4), %eax
movq 0x10(%r14), %rcx
movq 0x40(%r14), %rdx
imulq $0x18, %rax, %rax
movl (%rdx,%rax), %esi
shlq $0x5, %rsi
movsd 0x8(%rcx,%rsi), %xmm0
movsd %xmm0, (%rsp)
movsd 0x10(%rcx,%rsi), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rcx,%rsi), %xmm0
movsd %xmm0, 0x10(%rsp)
movl 0x4(%rdx,%rax), %eax
shlq $0x5, %rax
movsd 0x8(%rcx,%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rcx,%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x18(%rcx,%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x2dc8
testl %eax, %eax
js 0x1a7e
movsd 0x8(%rbx), %xmm1
movsd 0x8(%rsp), %xmm2
subsd %xmm2, %xmm1
movapd 0x10(%rsp), %xmm3
movsd 0x20(%rsp), %xmm0
subsd %xmm2, %xmm0
movapd %xmm0, %xmm4
mulsd %xmm0, %xmm4
movsd 0x10(%rbx), %xmm2
movhpd (%rbx), %xmm2           # xmm2 = xmm2[0],mem[0]
movhpd (%rsp), %xmm3           # xmm3 = xmm3[0],mem[0]
subpd %xmm3, %xmm2
movsd 0x28(%rsp), %xmm5
movhpd 0x18(%rsp), %xmm5       # xmm5 = xmm5[0],mem[0]
subpd %xmm3, %xmm5
movapd %xmm5, %xmm3
unpckhpd %xmm5, %xmm3            # xmm3 = xmm3[1],xmm5[1]
mulsd %xmm3, %xmm3
addsd %xmm4, %xmm3
movapd %xmm5, %xmm4
mulsd %xmm5, %xmm4
addsd %xmm3, %xmm4
sqrtsd %xmm4, %xmm3
movsd 0x4625(%rip), %xmm4     # 0x6058
divsd %xmm3, %xmm4
mulsd %xmm4, %xmm0
mulsd %xmm1, %xmm0
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd %xmm5, %xmm4
mulpd %xmm2, %xmm4
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
addsd %xmm0, %xmm1
addsd %xmm4, %xmm1
xorpd %xmm0, %xmm0
cmplepd %xmm1, %xmm0
cmpltpd %xmm3, %xmm1
andpd %xmm0, %xmm1
movd %xmm1, %eax
orb %bpl, %al
incq %r15
movl %eax, %ebp
jmp 0x1922
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::intersectRatio(unsigned int, glm::detail::tvec3<double, (glm::precision)0> const&, glm::detail::tvec3<double, (glm::precision)0> const&) const
real Mesh::intersectRatio(unsigned eIndex, const vec3& searchPos, const vec3& pos) const
{
    const vec3& v0 = vertices[halfEdges[eIndex].vIndices[0]].pos;
    const vec3& v1 = vertices[halfEdges[eIndex].vIndices[1]].pos;
    vec3 dv = v1 - v0;
    vec3 dp = -pos + searchPos;
    vec3 rhs = searchPos - v0;
    real down = dv.x * dp.y - dv.y * dp.x;
    real up = rhs.x * dp.y - rhs.y * dp.x;
    if(down == 0)
        return -1;
    return up / down;
}

// Assembly:
movl %esi, %eax
movq 0x10(%rdi), %rsi
movq 0x40(%rdi), %rdi
imulq $0x18, %rax, %rax
movl (%rdi,%rax), %r8d
movl 0x4(%rdi,%rax), %eax
shlq $0x5, %r8
shlq $0x5, %rax
movsd 0x8(%rsi,%r8), %xmm2
movsd 0x10(%rsi,%r8), %xmm3
movsd 0x8(%rsi,%rax), %xmm1
movsd 0x10(%rsi,%rax), %xmm7
subsd %xmm2, %xmm1
subsd %xmm3, %xmm7
movsd (%rdx), %xmm0
movsd 0x8(%rdx), %xmm5
movapd %xmm0, %xmm4
subsd (%rcx), %xmm4
movapd %xmm5, %xmm6
subsd 0x8(%rcx), %xmm6
mulsd %xmm4, %xmm7
mulsd %xmm6, %xmm1
subsd %xmm7, %xmm1
xorpd %xmm7, %xmm7
ucomisd %xmm7, %xmm1
jne 0x1b11
jp 0x1b11
movsd 0x4540(%rip), %xmm0     # 0x6050
retq
subsd %xmm3, %xmm5
subsd %xmm2, %xmm0
mulsd %xmm5, %xmm4
mulsd %xmm6, %xmm0
subsd %xmm4, %xmm0
divsd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::locateTriangleWalking(unsigned int, unsigned int) const
unsigned Mesh::locateTriangleWalking(unsigned startEdgeIndex, unsigned vIndex) const
{
    const vec3& pos = vertices[vIndex].pos;
    unsigned eIndex = startEdgeIndex;
    vec3 searchPos = getMidPoint(eIndex);
    while(!inTriangle(halfEdges[eIndex].tIndex, pos))
    {
        unsigned exitIndex = halfEdges[eIndex].nextIndex;
        real r = intersectRatio(exitIndex, searchPos, pos);
        if(r < 0 || r > 1)
        {
            exitIndex = halfEdges[exitIndex].nextIndex;
            r = intersectRatio(exitIndex, searchPos, pos);
        }

        const vec3& v0 = vertices[halfEdges[exitIndex].vIndices[0]].pos;
        const vec3& v1 = vertices[halfEdges[exitIndex].vIndices[1]].pos;
        searchPos = v0+r*(v1-v0);
        eIndex = halfEdges[exitIndex].neighborIndex;
    }
    return halfEdges[eIndex].tIndex;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl %edx, %eax
movq 0x10(%rdi), %rcx
shlq $0x5, %rax
leaq (%rcx,%rax), %r14
addq $0x8, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x1b2a
movq 0x40(%rbx), %r13
movl %ebp, %eax
imulq $0x18, %rax, %r12
movl 0x8(%r13,%r12), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1900
movq 0x40(%rbx), %r13
testb %al, %al
jne 0x1c85
movl 0xc(%r13,%r12), %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1a96
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x1c05
ucomisd 0x4455(%rip), %xmm0     # 0x6058
jbe 0x1c1f
imulq $0x18, %r12, %rax
movl 0xc(%r13,%rax), %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1a96
movl %r12d, %eax
imulq $0x18, %rax, %rax
movl (%r13,%rax), %ecx
movl 0x4(%r13,%rax), %edx
movq 0x10(%rbx), %rsi
shlq $0x5, %rcx
shlq $0x5, %rdx
movsd 0x18(%rsi,%rdx), %xmm1
movsd 0x18(%rsi,%rcx), %xmm2
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movupd 0x8(%rsi,%rdx), %xmm2
movupd 0x8(%rsi,%rcx), %xmm3
subpd %xmm3, %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm2, %xmm0
addpd %xmm3, %xmm0
movapd %xmm0, (%rsp)
movsd %xmm1, 0x10(%rsp)
movl 0x14(%r13,%rax), %ebp
jmp 0x1bb9
movl 0x8(%r13,%r12), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::fillTriangle(unsigned int, unsigned int, unsigned int, unsigned int)
void Mesh::fillTriangle(unsigned tIndex, unsigned eIndex0, unsigned eIndex1, unsigned eIndex2)
{
    Triangle &t = triangles[tIndex];
    t.eIndices[0] = eIndex0;
    t.eIndices[1] = eIndex1;
    t.eIndices[2] = eIndex2;

    connectEdges(eIndex0, eIndex1);
    connectEdges(eIndex1, eIndex2);
    connectEdges(eIndex2, eIndex0);
    halfEdges[eIndex0].tIndex = tIndex;
    halfEdges[eIndex1].tIndex = tIndex;
    halfEdges[eIndex2].tIndex = tIndex;
}

// Assembly:
movl %esi, %eax
movq 0x28(%rdi), %r9
imulq $0x48, %rax, %rax
movl %edx, (%r9,%rax)
movl %ecx, 0x4(%r9,%rax)
movl %r8d, 0x8(%r9,%rax)
movl %edx, %eax
movq 0x40(%rdi), %rdi
imulq $0x18, %rax, %rax
movl %ecx, 0xc(%rdi,%rax)
movl %ecx, %r9d
imulq $0x18, %r9, %r9
movl %edx, 0x10(%rdi,%r9)
movl %r8d, 0xc(%rdi,%r9)
movl %r8d, %r10d
imulq $0x18, %r10, %r10
movl %ecx, 0x10(%rdi,%r10)
movl %edx, 0xc(%rdi,%r10)
movl %r8d, 0x10(%rdi,%rax)
movl %esi, 0x8(%rdi,%rax)
movl %esi, 0x8(%rdi,%r9)
movl %esi, 0x8(%rdi,%r10)
retq
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::isDelaunay(unsigned int) const
bool Mesh::isDelaunay(unsigned eIndex) const
{
    const HalfEdge &e = halfEdges[eIndex];
    const HalfEdge &next = halfEdges[e.nextIndex];
    const HalfEdge &neighbor_next = halfEdges[halfEdges[e.neighborIndex].nextIndex];
    vec3 v[4];
    v[0] = vertices[e.vIndices[0]].pos;
    v[1] = vertices[e.vIndices[1]].pos;
    v[2] = vertices[next.vIndices[1]].pos;
    v[3] = vertices[neighbor_next.vIndices[1]].pos;
    int ori123 = orient(v[1], v[2], v[3]);
    int ori203 = orient(v[2], v[0], v[3]);
    if(ori123<=0 || ori203<=0)
        return true;

    if(v[0].z == 0 && (v[2].z==0 || v[3].z == 0))
        return false;

    if(v[1].z == 0 && (v[2].z==0 || v[3].z == 0))
        return false;

    if(v[0].z == 0)
    {
        return ori123<=0;
    }
    if(v[1].z == 0)
    {
        return ori203<=0;
    }
    if(inCircle(v[0], v[1], v[2], v[3])>=0)
        return false;
    return inCircle(v[0], v[3], v[1], v[2])<0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %ecx
movq 0x40(%rdi), %rax
imulq $0x18, %rcx, %rsi
movl 0xc(%rax,%rsi), %r8d
movl 0x14(%rax,%rsi), %ecx
imulq $0x18, %rcx, %rcx
movl 0xc(%rax,%rcx), %edx
movl (%rax,%rsi), %r9d
movq 0x10(%rdi), %rcx
shlq $0x5, %r9
movsd 0x8(%rcx,%r9), %xmm0
leaq 0x18(%rsp), %rbx
movsd %xmm0, -0x18(%rbx)
movsd 0x10(%rcx,%r9), %xmm0
movsd %xmm0, -0x10(%rbx)
movsd 0x18(%rcx,%r9), %xmm0
movsd %xmm0, -0x8(%rbx)
movl 0x4(%rax,%rsi), %esi
shlq $0x5, %rsi
movsd 0x8(%rcx,%rsi), %xmm0
movsd %xmm0, (%rbx)
movsd 0x10(%rcx,%rsi), %xmm0
movsd %xmm0, 0x8(%rbx)
movsd 0x18(%rcx,%rsi), %xmm0
movsd %xmm0, 0x10(%rbx)
imulq $0x18, %r8, %rsi
movl 0x4(%rax,%rsi), %esi
shlq $0x5, %rsi
leaq 0x30(%rsp), %r14
movsd 0x8(%rcx,%rsi), %xmm0
movsd %xmm0, (%r14)
movsd 0x10(%rcx,%rsi), %xmm0
movsd %xmm0, 0x8(%r14)
movsd 0x18(%rcx,%rsi), %xmm0
movsd %xmm0, 0x10(%r14)
imulq $0x18, %rdx, %rdx
movl 0x4(%rax,%rdx), %eax
shlq $0x5, %rax
leaq 0x48(%rsp), %r15
movsd 0x8(%rcx,%rax), %xmm0
movsd %xmm0, (%r15)
movsd 0x10(%rcx,%rax), %xmm0
movsd %xmm0, 0x8(%r15)
movsd 0x18(%rcx,%rax), %xmm0
movsd %xmm0, 0x10(%r15)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2dc8
movl %eax, %ebp
movq %rsp, %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2dc8
movl %eax, %ecx
movb $0x1, %al
testl %ebp, %ebp
jle 0x1eab
testl %ecx, %ecx
jle 0x1eab
movsd 0x10(%rsp), %xmm1
xorl %eax, %eax
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x1e70
jnp 0x1eab
movsd 0x28(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1e7e
jnp 0x1eab
movq %rsp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2e19
testl %eax, %eax
js 0x1e97
xorl %eax, %eax
jmp 0x1eab
movq %rsp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x2e19
shrl $0x1f, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::flipEdge(unsigned int)
void Mesh::flipEdge(unsigned eIndex)
{
    HalfEdge &e = halfEdges[eIndex];
    unsigned eIndexList[5];
    eIndexList[0] = e.nextIndex;
    eIndexList[1] = e.prevIndex;
    eIndexList[2] = e.neighborIndex;
    eIndexList[3] = halfEdges[e.neighborIndex].nextIndex;
    eIndexList[4] = halfEdges[e.neighborIndex].prevIndex;

    e.vIndices[0] = halfEdges[eIndexList[3]].vIndices[1];
    e.vIndices[1] = halfEdges[eIndexList[1]].vIndices[0];
    halfEdges[eIndexList[2]].vIndices[0] = e.vIndices[1];
    halfEdges[eIndexList[2]].vIndices[1] = e.vIndices[0];
    fillTriangle(e.tIndex, eIndex, eIndexList[1], eIndexList[3]);
    fillTriangle(halfEdges[e.neighborIndex].tIndex, eIndexList[2], eIndexList[4], eIndexList[0]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %edx
movq %rdi, %rbx
movl %esi, %eax
movq 0x40(%rdi), %r12
imulq $0x18, %rax, %r13
movl 0xc(%r12,%r13), %ebp
movl 0x10(%r12,%r13), %ecx
movl 0x14(%r12,%r13), %r14d
imulq $0x18, %r14, %rax
movl 0xc(%r12,%rax), %r8d
movl 0x10(%r12,%rax), %r15d
imulq $0x18, %r8, %rsi
movl 0x4(%r12,%rsi), %esi
movl %esi, (%r12,%r13)
imulq $0x18, %rcx, %rsi
movl (%r12,%rsi), %esi
movl %esi, 0x4(%r12,%r13)
movl %esi, (%r12,%rax)
movl (%r12,%r13), %esi
movl %esi, 0x4(%r12,%rax)
movl 0x8(%r12,%r13), %esi
callq 0x1cec
movl 0x14(%r12,%r13), %eax
movq 0x40(%rbx), %rcx
imulq $0x18, %rax, %rax
movl 0x8(%rcx,%rax), %esi
movq %rbx, %rdi
movl %r14d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1cec
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::loadNodes(char const*)
std::vector<vec3> Mesh::loadNodes(const char* nodePath)
{
    glm::ivec4 h;
    std::vector<vec3> vList;
    FILE* file = fopen(nodePath, "r");
    if(fscanf(file, "%d %d %d %d", &h.x, &h.y, &h.z, &h.w) != 4)
    {
        fclose(file);
        return vList;
    }
    int nDims = h.y;
    glm::dvec4 v;
    while(1)
    {
        if(nDims == 2 && fscanf(file, "%d %lf %lf", &h.x, &v.x, &v.y) != 3)
            break;
        if(nDims == 3 && fscanf(file, "%d %lf %lf %lf", &h.x, &v.x, &v.y, &v.z) != 4)
            break;
        vList.push_back(vec3(v.x, v.y, 1));
    }
    fclose(file);
    return vList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x4(%rsp), %r15
movaps %xmm0, -0x4(%r15)
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x3ab9(%rip), %rsi      # 0x6070
movq %rdx, %rdi
callq 0x1110
movq %rax, %r14
leaq 0x8(%rsp), %r8
leaq 0xc(%rsp), %r9
leaq 0x3a9f(%rip), %rsi      # 0x6072
movq %rsp, %rdx
movq %rax, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x11b0
cmpl $0x4, %eax
jne 0x2687
movq %rsp, %rax
movl 0x4(%rax), %r15d
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, -0x10(%rax)
leaq 0x10(%rsp), %rbp
movabsq $0x3ff0000000000000, %r13 # imm = 0x3FF0000000000000
leaq 0x30(%rsp), %r12
cmpl $0x3, %r15d
je 0x2645
cmpl $0x2, %r15d
jne 0x266b
movq %r14, %rdi
leaq 0x3a52(%rip), %rsi      # 0x607e
movq %rsp, %rdx
movq %rbp, %rcx
leaq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0x11b0
cmpl $0x3, %eax
je 0x266b
jmp 0x2687
movq %r14, %rdi
leaq 0x3a3a(%rip), %rsi      # 0x6089
movq %rsp, %rdx
movq %rbp, %rcx
leaq 0x18(%rsp), %r8
leaq 0x20(%rsp), %r9
xorl %eax, %eax
callq 0x11b0
cmpl $0x4, %eax
jne 0x2687
movaps 0x10(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movq %r13, 0x40(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x525c
jmp 0x2616
movq %r14, %rdi
callq 0x10e0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x26a5
jmp 0x26a5
movq %rax, %r14
movq %rbx, %rdi
callq 0x31cc
movq %r14, %rdi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::outputNodes(char const*)
void Mesh::outputNodes(const char* nodePath)
{
    glm::ivec4 h;
    std::vector<vec3> vList;
    FILE* file = fopen(nodePath, "w");
    fprintf(file, "%u 2 0 0\n", unsigned(vertices.size()));
    for(unsigned i=0; i<vertices.size(); i++)
    {
        vec3 &v = vertices[i].pos;
        fprintf(file, "%u %lf %lf\n", i+1, v.x, v.y);
    }
    fclose(file);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x39bb(%rip), %rsi      # 0x6098
movq %rax, %rdi
callq 0x1110
movq %rax, %r14
movq 0x18(%rbx), %rdx
subq 0x10(%rbx), %rdx
shrq $0x5, %rdx
leaq 0x399f(%rip), %rsi      # 0x609a
movq %rax, %rdi
xorl %eax, %eax
callq 0x1130
pushq $0x1
popq %r15
leaq 0x3994(%rip), %r12      # 0x60a4
leal -0x1(%r15), %eax
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %rdx
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rax, %rdx
jbe 0x274d
shlq $0x5, %rax
movsd 0x8(%rcx,%rax), %xmm0
movsd 0x10(%rcx,%rax), %xmm1
movq %r14, %rdi
movq %r12, %rsi
movl %r15d, %edx
movb $0x2, %al
callq 0x1130
incl %r15d
jmp 0x2710
movq %r14, %rdi
callq 0x10e0
movq %rsp, %rdi
callq 0x31cc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::outputElements(char const*)
void Mesh::outputElements(const char* elePath)
{
    glm::ivec4 h;
    std::vector<vec3> vList;
    FILE* file = fopen(elePath, "w");
    fprintf(file, "%u 3 0\n", unsigned(triangles.size()));
    for(unsigned i=0; i<triangles.size(); i++)
    {
        unsigned vi[3];
        for(unsigned k=0; k<3; k++)
            vi[k] = halfEdges[triangles[i].eIndices[k]].vIndices[0]+1;
        fprintf(file, "%u %u %u %u\n", i+1, vi[0], vi[1], vi[2]);
    }
    fclose(file);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x3907(%rip), %rsi      # 0x6098
movq %rax, %rdi
callq 0x1110
movq %rax, %r14
movq 0x30(%rbx), %rax
subq 0x28(%rbx), %rax
pushq $0x48
popq %r12
cqto
idivq %r12
leaq 0x38fc(%rip), %rsi      # 0x60b0
movq %r14, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x1130
leaq 0x38f1(%rip), %r15      # 0x60b8
xorl %ebp, %ebp
movl %ebp, %esi
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %rax
subq %rcx, %rax
cqto
idivq %r12
cmpq %rsi, %rax
jbe 0x2829
imulq $0x48, %rsi, %rdx
movq 0x40(%rbx), %rax
addq %rdx, %rcx
xorl %edx, %edx
cmpq $0x3, %rdx
je 0x2808
movl (%rcx,%rdx,4), %esi
imulq $0x18, %rsi, %rsi
movl (%rax,%rsi), %esi
incl %esi
movl %esi, 0x4(%rsp,%rdx,4)
incq %rdx
jmp 0x27ed
incl %ebp
movl 0x4(%rsp), %ecx
movl 0x8(%rsp), %r8d
movl 0xc(%rsp), %r9d
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1130
jmp 0x27c9
movq %r14, %rdi
callq 0x10e0
leaq 0x10(%rsp), %rdi
callq 0x31cc
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: Mesh::delaunay(std::vector<glm::detail::tvec3<double, (glm::precision)0>, std::allocator<glm::detail::tvec3<double, (glm::precision)0>>> const&)
void Mesh::delaunay(const std::vector<vec3>& v)
{
    std::vector<vec3> vList = v;

    if(randomize)
        shuffle(vList, seed);

    clearAll();
    buildGhostTriangle(vList);

    for(unsigned i=0; i<vList.size(); i++)
    {
        vertices.push_back(Vertex());
        vertices.back().pos = vList[i];
        if(method == CONFLICT_GRAPH)
        {
            vertices.back().confTriIndex = 0;
            triangles.front().confVertIndices.insert(i+3);
        }
    }

    for(unsigned i=0; i<vList.size(); i++)
    {
        insertVertex(i+3);
    }

    destroyGhostTriangle();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2f5c
cmpb $0x1, 0x4(%rbx)
jne 0x2900
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2861
movq %rbx, %rdi
callq 0x13ca
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x13f6
leaq 0x10(%rbx), %r14
pushq $0x3
popq %r13
pushq $0x18
popq %r12
leaq 0x20(%rsp), %r15
leal -0x3(%r13), %ebp
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rcx
movq %rcx, %rax
subq %rsi, %rax
cqto
idivq %r12
cmpq %rbp, %rax
jbe 0x29b4
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x540e
movq 0x8(%rsp), %rax
imulq $0x18, %rbp, %rcx
movq 0x18(%rbx), %rdx
movsd (%rax,%rcx), %xmm0
movsd %xmm0, -0x18(%rdx)
movsd 0x8(%rax,%rcx), %xmm0
movsd %xmm0, -0x10(%rdx)
movsd 0x10(%rax,%rcx), %xmm0
movsd %xmm0, -0x8(%rdx)
cmpl $0x1, 0x8(%rbx)
jne 0x29ac
movq 0x18(%rbx), %rax
andl $0x0, -0x20(%rax)
movq 0x28(%rbx), %rdi
addq $0x10, %rdi
movl %r13d, 0x20(%rsp)
movq %r15, %rsi
callq 0x556e
incl %r13d
jmp 0x2926
pushq $0x3
popq %r14
subq %rsi, %rcx
leal -0x3(%r14), %esi
movq %rcx, %rax
cqto
idivq %r12
cmpq %rsi, %rax
jbe 0x29e6
movq %rbx, %rdi
movl %r14d, %esi
callq 0x227e
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rcx
incl %r14d
jmp 0x29b8
movq %rbx, %rdi
callq 0x1656
leaq 0x8(%rsp), %rdi
callq 0x31cc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2a0d
jmp 0x2a0d
jmp 0x2a0d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x31cc
movq %rbx, %rdi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/Mesh.cpp
// Function: std::vector<unsigned int, std::allocator<unsigned int>> lazyDeletion<Mesh::HalfEdge>(std::vector<Mesh::HalfEdge, std::allocator<Mesh::HalfEdge>>&, std::vector<bool, std::allocator<bool>>)
std::vector<unsigned> lazyDeletion(std::vector<T>& v, std::vector<bool> delMap)
{
    std::vector<unsigned> indicesMap(v.size());
    unsigned k=0;
    for(unsigned i=0; i<v.size(); i++)
    {
        v[k] = v[i];
        indicesMap[i] = k;
        if(!delMap[i])
            k++;
    }
    v.resize(k);
    return indicesMap;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
pushq $0x18
popq %r13
cqto
idivq %r13
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x3d7a
xorl %ebp, %ebp
xorl %r12d, %r12d
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
idivq %r13
movl %ebp, %esi
cmpq %r12, %rax
jbe 0x2c21
imulq $0x18, %r12, %rax
imulq $0x18, %rsi, %rdx
movq 0x10(%rcx,%rax), %rsi
movq %rsi, 0x10(%rcx,%rdx)
movups (%rcx,%rax), %xmm0
movups %xmm0, (%rcx,%rdx)
movq (%rbx), %rax
movl %ebp, (%rax,%r12,4)
movq %r15, %rdi
movq %r12, %rsi
callq 0x2b7a
andq (%rax), %rdx
cmpq $0x1, %rdx
adcl $0x0, %ebp
incl %r12d
jmp 0x2bcd
movq %r14, %rdi
callq 0x3dcc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2c3d
movq %rax, %r14
movq %rbx, %rdi
callq 0x3e30
movq %r14, %rdi
callq 0x11a0
// File: /workspace/github_cpp_makefile_star2_O2/sunweilun[P]Delaunay/./Mesh.h
// Function: inCircle(glm::detail::tvec3<double, (glm::precision)0> const&, glm::detail::tvec3<double, (glm::precision)0> const&, glm::detail::tvec3<double, (glm::precision)0> const&, glm::detail::tvec3<double, (glm::precision)0> const&)
inline int inCircle(const vec3& a, const vec3& b, const vec3& c, const vec3& d)
{
    vec3 da, db, dc;
    real det;

    if(orient(a, b, c) == 0)
        return 1;

    if(d.z == 0)
        return -1;
    if(b.z == 0)
        return -1;

    glm::dmat3 mat;
    da = a - d;
    db = b - d;
    dc = c - d;
    mat[0][0] = da.x;
    mat[1][0] = da.y;
    mat[2][0] = da.x*da.x+da.y*da.y;
    mat[0][1] = db.x;
    mat[1][1] = db.y;
    mat[2][1] = db.x*db.x+db.y*db.y;
    mat[0][2] = dc.x;
    mat[1][2] = dc.y;
    mat[2][2] = dc.x*dc.x+dc.y*dc.y;
    det = glm::determinant(mat);
    return det == 0 ? 0 : int(det > 0)*2-1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
callq 0x2dc8
testl %eax, %eax
je 0x2f05
movsd 0x10(%r15), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
pushq $-0x1
popq %rax
jne 0x2e56
jnp 0x2f08
movsd 0x10(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x2e67
jnp 0x2f08
movupd (%r12), %xmm2
movupd 0x8(%rbx), %xmm1
movupd (%r14), %xmm0
movupd (%r15), %xmm3
movhpd 0x8(%r12), %xmm0        # xmm0 = xmm0[0],mem[0]
subpd %xmm3, %xmm0
movhpd 0x8(%r14), %xmm1        # xmm1 = xmm1[0],mem[0]
movhpd (%rbx), %xmm2           # xmm2 = xmm2[0],mem[0]
movq %rsp, %rdi
movupd %xmm0, 0x10(%rdi)
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
subpd %xmm4, %xmm1
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
subpd %xmm3, %xmm2
movupd %xmm2, (%rdi)
movapd %xmm0, %xmm3
shufpd $0x1, %xmm1, %xmm3      # xmm3 = xmm3[1],xmm1[0]
mulpd %xmm3, %xmm3
mulpd %xmm2, %xmm2
addpd %xmm3, %xmm2
movupd %xmm2, 0x30(%rdi)
movupd %xmm1, 0x20(%rdi)
mulpd %xmm1, %xmm1
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rdi)
callq 0x2fb6
xorl %eax, %eax
xorpd %xmm1, %xmm1
xorl %ecx, %ecx
ucomisd %xmm1, %xmm0
seta %cl
leal -0x1(%rcx,%rcx), %ecx
cmovnel %ecx, %eax
cmovpl %ecx, %eax
jmp 0x2f08
pushq $0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/atomicdata.cpp
// Function: generate_squaresTouch()
void generate_squaresTouch() {
	for (int i = 0; i < 64; ++i) {
		for (int j = 0; j < 64; ++j) {
			if (explBB[i] & ((Bitboard)1 << j)) {
				squares_touch[i][j] = 1;
			} else {
				squares_touch[i][j] = 0;
			}
			square_dist_arr[i][j] = square_distance(Square(i), Square(j));
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x3037f(%rip), %rbp     # 0x37790
xorl %ebx, %ebx
cmpq $0x40, %rbx
je 0x745e
leaq 0x1ebf0(%rip), %rax     # 0x26010
movq (%rax,%rbx,8), %r12
xorl %r14d, %r14d
cmpq $0x40, %r14
je 0x7455
leaq (%r15,%r14), %r13
btq %r14, %r12
leaq 0x2f354(%rip), %rax     # 0x36790
setb (%rax,%r13)
movl %ebx, %edi
movl %r14d, %esi
callq 0x75ec
movb %al, (%rbp,%r13)
incq %r14
jmp 0x7427
incq %rbx
addq $0x40, %r15
jmp 0x7413
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/atomicdata.cpp
// Function: generate_explosionSquares()
void generate_explosionSquares() {
	int rank, file, currR, currF;
	
	int r[9] = { 0,  0,  1,  1,  1,  0, -1, -1, -1};
	int f[9] = { 0,  1,  1,  0, -1, -1, -1,  0,  1}; 
	
	for (int sq = 0; sq < 64; ++sq) {
		rank = sq / 8;
		file = sq % 8;
		
		explSq[sq].size = 0;
		
		for (int k = 0; k < 9; ++k) {
			currR = rank + r[k];
			currF = file + f[k];
			if (SQUARE_LEGAL(currR, currF)) {
				explSq[sq].square[explSq[sq].size] = (Square)(currR * 8 + currF);
				++explSq[sq].size;
			}
		}
	}
}

// Assembly:
xorps %xmm0, %xmm0
movaps %xmm0, -0x28(%rsp)
movaps %xmm0, -0x18(%rsp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, -0x20(%rsp)
movl $0x1, %ecx
movl %ecx, -0x18(%rsp)
orq $-0x1, -0x10(%rsp)
orl $-0x1, -0x8(%rsp)
movaps %xmm0, -0x58(%rsp)
movaps %xmm0, -0x48(%rsp)
movq %rax, -0x54(%rsp)
orq $-0x1, -0x48(%rsp)
orl $-0x1, -0x40(%rsp)
movl %ecx, -0x38(%rsp)
xorl %eax, %eax
leaq 0x2dfcc(%rip), %rcx     # 0x35490
cmpq $0x40, %rax
je 0x7524
movl %eax, %edx
shrl $0x3, %edx
movl %eax, %esi
imulq $0x4c, %rax, %rdi
andl $0x0, 0x48(%rdi,%rcx)
andl $0x7, %esi
addq %rcx, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
cmpq $0x9, %r9
je 0x751f
movl -0x28(%rsp,%r9,4), %r10d
addl %edx, %r10d
cmpl $0x7, %r10d
ja 0x751a
movl -0x58(%rsp,%r9,4), %r11d
addl %esi, %r11d
cmpl $0x7, %r11d
ja 0x751a
leal (%r11,%r10,8), %r10d
movslq %r8d, %r8
movl %r10d, (%rdi,%r8,4)
incl %r8d
movl %r8d, 0x48(%rdi)
incq %r9
jmp 0x74e6
incq %rax
jmp 0x74c4
retq
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/atomicdata.cpp
// Function: generate_explosionBitboards()
void generate_explosionBitboards() {
	generate_explosionSquares();
	
	Bitboard b;
	
	printf("const Bitboard explosionBB[64] = {\n\t");
	for (int sq = 0; sq < 64; ++sq) {
		b = 0;
		for (int k = 0; k < explSq[sq].size; ++k) {
			b |= BIT(explSq[sq].square[k]);	
		}
		printf("0x%.8X%.8XULL", HI64(b), LO64(b));
		if (sq < 63) printf(", ");
		if (sq % 4 == 3) printf("\n");
		if (sq < 63 && sq % 4 == 3) printf("\t");
	}
	printf("};");
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
callq 0x746d
leaq 0x1ecd4(%rip), %rdi     # 0x26210
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x5050
leaq 0x2df43(%rip), %r13     # 0x35490
leaq 0x1ece1(%rip), %rbx     # 0x26235
pushq $0xa
popq %rbp
movq %r13, %r12
xorl %r14d, %r14d
cmpq $0x40, %r14
je 0x75d0
imulq $0x4c, %r14, %rax
movl 0x48(%rax,%r13), %eax
testl %eax, %eax
cmovlel %r15d, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %rcx, %rax
je 0x7588
movb (%r12,%rcx,4), %sil
btsq %rsi, %rdx
incq %rcx
jmp 0x7576
movq %rdx, %rsi
shrq $0x20, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5050
movl %ebp, %edi
cmpq $0x3f, %r14
je 0x75c2
leaq 0x21b5a(%rip), %rdi     # 0x29102
xorl %eax, %eax
callq 0x5050
movl %r14d, %eax
notl %eax
testb $0x3, %al
jne 0x75c7
movl %ebp, %edi
callq 0x5570
pushq $0x9
popq %rdi
callq 0x5570
incq %r14
addq $0x4c, %r12
jmp 0x755d
leaq 0x1ec6c(%rip), %rdi     # 0x26243
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5050
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/bitbase.cpp
// Function: (anonymous namespace)::KPKPosition::from_index(int)
void KPKPosition::from_index(int index) {

    int s = (index / 8192) % 24;

    sideToMove = Color(index % 2);
    blackKingSquare = Square((index / 2) % 64);
    whiteKingSquare = Square((index / 128) % 64);
    pawnSquare = make_square(File(s % 4), Rank(s / 4 + 1));
  }

// Assembly:
movl $0x2000, %ecx           # imm = 0x2000
movl %esi, %eax
cltd
idivl %ecx
pushq $0x18
popq %rcx
cltd
idivl %ecx
movl %edx, %ecx
pushq $0x2
popq %r8
movl %esi, %eax
cltd
idivl %r8d
movl %esi, %r8d
subl %eax, %r8d
subl %eax, %r8d
movl %r8d, 0xc(%rdi)
pushq $0x40
popq %r8
cltd
idivl %r8d
movl %edx, 0x4(%rdi)
movl $0x80, %r9d
movl %esi, %eax
cltd
idivl %r9d
cltd
idivl %r8d
movl %edx, (%rdi)
movsbl %cl, %ecx
movb $0x4, %dl
movl %ecx, %eax
idivb %dl
leal (,%rax,4), %edx
subb %dl, %cl
movsbl %cl, %ecx
movsbl %al, %eax
leal 0x8(,%rax,8), %eax
orl %ecx, %eax
movl %eax, 0x8(%rdi)
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/bitboard.cpp
// Function: print_bitboard(unsigned long)
void print_bitboard(Bitboard b) {

  for (Rank r = RANK_8; r >= RANK_1; r--)
  {
      std::cout << "+---+---+---+---+---+---+---+---+" << '\n';
      for (File f = FILE_A; f <= FILE_H; f++)
          std::cout << "| " << (bit_is_set(b, make_square(f, r)) ? 'X' : ' ') << ' ';

      std::cout << "|\n";
  }
  std::cout << "+---+---+---+---+---+---+---+---+" << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x7
popq %r13
leaq 0x1098bb(%rip), %r12    # 0x111360
movq 0x2d4f4(%rip), %r14     # 0x34fa0
pushq $0x20
popq %rbp
pushq $0x58
popq %r15
movq %r14, %rdi
leaq 0x20bbd(%rip), %rsi     # 0x2867a
callq 0x53b0
testq %r13, %r13
js 0x7b28
movq %r13, (%rsp)
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x5450
xorl %r13d, %r13d
movq %r14, %rdi
cmpq $0x8, %r13
je 0x7b0f
leaq 0x215e0(%rip), %rsi     # 0x290c9
callq 0x53b0
testq %rbx, (%r12,%r13,8)
movl %r15d, %esi
cmovel %ebp, %esi
movq %rax, %rdi
callq 0x5450
movq %rax, %rdi
movl %ebp, %esi
callq 0x5450
incq %r13
jmp 0x7ad9
leaq 0x1f086(%rip), %rsi     # 0x26b9c
callq 0x53b0
movq (%rsp), %r13
decq %r13
addq $-0x40, %r12
jmp 0x7ab3
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x51d0
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/bitboard.cpp
// Function: pop_1st_bit(unsigned long*)
Square pop_1st_bit(Bitboard* bb) {

   b_union u;
   Square ret;

   u.b = *bb;

   if (u.dw.l)
   {
       ret = Square(BitTable[((u.dw.l ^ (u.dw.l - 1)) * 0x783a9b23) >> 26]);
       u.dw.l &= (u.dw.l - 1);
       *bb = u.b;
       return ret;
   }
   ret = Square(BitTable[((~(u.dw.h ^ (u.dw.h - 1))) * 0x783a9b23) >> 26]);
   u.dw.h &= (u.dw.h - 1);
   *bb = u.b;
   return ret;
}

// Assembly:
movq (%rdi), %rax
testl %eax, %eax
je 0x7b84
leal -0x1(%rax), %ecx
movl %ecx, %edx
xorl %eax, %edx
andl %eax, %ecx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %rsi, %rax
orq %rax, %rcx
jmp 0x7b97
shrq $0x20, %rax
leal -0x1(%rax), %ecx
movl %ecx, %edx
xorl %eax, %edx
notl %edx
andl %eax, %ecx
shlq $0x20, %rcx
imull $0x783a9b23, %edx, %eax # imm = 0x783A9B23
shrl $0x1a, %eax
leaq 0x1ecd9(%rip), %rdx     # 0x26880
movl (%rdx,%rax,4), %eax
movq %rcx, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/bitboard.cpp
// Function: (anonymous namespace)::init_sliding_attacks(unsigned long*, int*, unsigned long*, int const*, unsigned long const*, int (*) [2])
void init_sliding_attacks(Bitboard attacks[], int attackIndex[], Bitboard mask[],
                            const int shift[], const Bitboard mult[], int deltas[][2]) {
    Bitboard b, v;
    int i, j, index;

    for (i = index = 0; i < 64; i++)
    {
        attackIndex[i] = index;
        mask[i] = sliding_attacks(i, 0, deltas, 1, 6, 1, 6);
        j = 1 << ((CpuIs64Bit ? 64 : 32) - shift[i]);

        for (int k = 0; k < j; k++)
        {
            b = index_to_bitboard(k, mask[i]);
            v = CpuIs64Bit ? b * mult[i] : unsigned(b * mult[i] ^ (b >> 32) * (mult[i] >> 32));
            attacks[index + (v >> shift[i])] = sliding_attacks(i, b, deltas, 0, 7, 0, 7);
        }
        index += j;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, 0x28(%rsp)
movq %r8, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
xorl %r15d, %r15d
leaq 0x30(%rsp), %r13
pushq $0x1
popq %rbx
xorl %ecx, %ecx
cmpq $0x40, %r15
je 0x80fe
movq 0x40(%rsp), %rax
movl %ecx, (%rax,%r15,4)
movl $0x6, (%rsp)
xorl %r12d, %r12d
movl %r15d, %edi
xorl %esi, %esi
movq 0x28(%rsp), %rdx
pushq $0x1
popq %rbp
movl %ecx, %r14d
movl %ebp, %ecx
pushq $0x6
popq %r8
movl %ebp, %r9d
callq 0x810d
movq 0x20(%rsp), %rcx
movq %rax, (%rcx,%r15,8)
movq 0x48(%rsp), %rax
movl (%rax,%r15,4), %eax
movq %rax, 0x60(%rsp)
movl %eax, %ecx
negb %cl
shll %cl, %ebp
movl %r14d, 0x18(%rsp)
movslq %r14d, %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x58(%rsp)
testl %ebp, %ebp
movl $0x0, %eax
movl %ebp, 0x14(%rsp)
cmovgl %ebp, %eax
movl %eax, 0x1c(%rsp)
cmpl 0x1c(%rsp), %r12d
je 0x80ee
movq 0x20(%rsp), %rax
movq (%rax,%r15,8), %rax
movq %rax, 0x30(%rsp)
xorl %r14d, %r14d
xorl %ebp, %ebp
testq %rax, %rax
je 0x8096
movq %r13, %rdi
callq 0x7b62
movq %rbx, %rdx
movl %eax, %ecx
shlq %cl, %rdx
btl %ebp, %r12d
movl $0x0, %eax
cmovbq %rdx, %rax
leal 0x1(%rbp), %ecx
orq %rax, %r14
movq 0x30(%rsp), %rax
movl %ecx, %ebp
jmp 0x8065
movq 0x50(%rsp), %rax
movq (%rax,%r15,8), %rax
movl %r14d, %ecx
imull %eax, %ecx
movq %r14, %rbp
shrq $0x20, %rbp
shrq $0x20, %rax
imull %eax, %ebp
xorl %ecx, %ebp
movl $0x7, (%rsp)
movl %r15d, %edi
movq %r14, %rsi
movq 0x28(%rsp), %rdx
xorl %ecx, %ecx
pushq $0x7
popq %r8
xorl %r9d, %r9d
callq 0x810d
movq 0x60(%rsp), %rcx
shrq %cl, %rbp
movq 0x58(%rsp), %rcx
movq %rax, (%rcx,%rbp,8)
incl %r12d
jmp 0x8047
movl 0x18(%rsp), %ecx
addl 0x14(%rsp), %ecx
incq %r15
jmp 0x7fc7
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/bitboard.cpp
// Function: (anonymous namespace)::sliding_attacks(int, unsigned long, int (*) [2], int, int, int, int)
Bitboard sliding_attacks(int sq, Bitboard occupied, int deltas[][2],
                           int fmin, int fmax, int rmin, int rmax) {
    int dx, dy, f, r;
    int rk = sq / 8;
    int fl = sq % 8;
    Bitboard attacks = EmptyBoardBB;

    for (int i = 0; i < 4; i++)
    {
        dx = deltas[i][0];
        dy = deltas[i][1];
        f = fl + dx;
        r = rk + dy;

        while (   (dx == 0 || (f >= fmin && f <= fmax))
               && (dy == 0 || (r >= rmin && r <= rmax)))
        {
            attacks |= (1ULL << (f + r * 8));

            if (occupied & (1ULL << (f + r * 8)))
                break;

            f += dx;
            r += dy;
        }
    }
    return attacks;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, -0x8(%rsp)
movl %edi, %eax
movl $0x8, %edi
cltd
idivl %edi
xorl %ebx, %ebx
xorl %edi, %edi
cmpq $0x4, %rbx
je 0x818c
movq -0x8(%rsp), %r10
movl (%r10,%rbx,8), %r14d
movl 0x4(%r10,%rbx,8), %r15d
leal (%rdx,%r14), %r12d
leal (%rax,%r15), %r13d
leal (%r12,%r13,8), %r10d
leal (%r14,%r15,8), %ebp
testl %r14d, %r14d
je 0x815d
cmpl %ecx, %r12d
jl 0x8187
cmpl %r8d, %r12d
jg 0x8187
testl %r15d, %r15d
je 0x816e
cmpl %r9d, %r13d
jl 0x8187
cmpl 0x38(%rsp), %r13d
jg 0x8187
btsq %r10, %rdi
movl %r10d, %r11d
addl %ebp, %r11d
addl %r15d, %r13d
addl %r14d, %r12d
btq %r10, %rsi
movl %r11d, %r10d
jae 0x814e
incq %rbx
jmp 0x812a
movq %rdi, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/./bitcount.h
// Function: int count_1s<(BitCountType)2>(unsigned long)
inline int count_1s<CNT32>(Bitboard b) {
  unsigned w = unsigned(b >> 32), v = unsigned(b);
  v -= (v >> 1) & 0x55555555; // 0-2 in 2 bits
  w -= (w >> 1) & 0x55555555;
  v = ((v >> 2) & 0x33333333) + (v & 0x33333333); // 0-4 in 4 bits
  w = ((w >> 2) & 0x33333333) + (w & 0x33333333);
  v = ((v >> 4) + v) & 0x0F0F0F0F; // 0-8 in 8 bits
  v += (((w >> 4) + w) & 0x0F0F0F0F);  // 0-16 in 8 bits
  v *= 0x01010101; // mul is fast on amd procs
  return int(v >> 24);
}

// Assembly:
movd %edi, %xmm0
shrq $0x20, %rdi
movd %edi, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movdqa %xmm1, %xmm0
psrld $0x1, %xmm0
pand 0x1e095(%rip), %xmm0    # 0x26250
psubd %xmm0, %xmm1
movdqa %xmm1, %xmm0
psrld $0x2, %xmm0
movdqa 0x1e090(%rip), %xmm2    # 0x26260
pand %xmm2, %xmm0
pand %xmm2, %xmm1
paddd %xmm0, %xmm1
movdqa %xmm1, %xmm0
psrld $0x4, %xmm0
paddd %xmm1, %xmm0
pand 0x1e07f(%rip), %xmm0    # 0x26270
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
paddd %xmm0, %xmm1
movd %xmm1, %eax
imull $0x1010101, %eax, %eax  # imm = 0x1010101
shrl $0x18, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/book.cpp
// Function: Book::Book()
Book::Book() {

  OLD for (int i = abs(get_system_time() % 10000); i > 0; i--)
      RKiss.rand<unsigned>();
  
  STARTNEW
  // in our implementation get_system_time returns the milliseconds since program start 
  for (int i = abs(rand() % 10000); i > 0; i--)
        RKiss.rand<unsigned>();
  ENDNEW
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x5480
leaq 0x220(%rbx), %rax
movq %rax, 0x210(%rbx)
andq $0x0, 0x218(%rbx)
movb $0x0, 0x220(%rbx)
leaq 0x238(%rbx), %r14
movq %r14, %rdi
callq 0x8b8e
callq 0x5110
movl $0x2710, %ecx           # imm = 0x2710
cltd
idivl %ecx
movl %edx, %ebp
negl %ebp
cmovsl %edx, %ebp
testl %ebp, %ebp
jle 0x842c
movq %r14, %rdi
callq 0x8bc8
decl %ebp
jmp 0x841c
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x8433
movq %rax, %r14
leaq 0x210(%rbx), %rdi
callq 0x5858
movq %rbx, %rdi
callq 0x50d0
movq %r14, %rdi
callq 0x5780
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/book.cpp
// Function: Book::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Book::open(const string& fileName) {

  // Close old file before opening the new
  close();
  
  OLD bookFile.open(fileName.c_str(), ifstream::in | ifstream::binary);
  NEW bookFile.open(fileName.c_str(), 
		  ifstream::in | ifstream::binary | ofstream::binary | ofstream::out);

  // Silently return when asked to open a non-exsistent file
  if (!bookFile.is_open())
      return;

  // Get the book size in number of entries
  bookFile.seekg(0, ios::end);
  bookSize = long(bookFile.tellg()) / sizeof(BookEntry);

  if (!bookFile.good())
  {
      cerr << "Failed to open book file " << fileName << endl;
      exit(EXIT_FAILURE);
  }

  // Set only if successful
  bookName = fileName;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8478
movq (%rbx), %rsi
pushq $0x1c
popq %rdx
movq %r14, %rdi
callq 0x5350
leaq 0x80(%r14), %rdi
callq 0x50e0
testb %al, %al
je 0x8521
pushq $0x2
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x5540
movq %r14, %rdi
callq 0x5770
shrq $0x4, %rax
movl %eax, 0x230(%r14)
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
jne 0x8529
addq $0x210, %r14            # imm = 0x210
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5200
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x2cac0(%rip), %rdi     # 0x34ff0
leaq 0x1ff61(%rip), %rsi     # 0x28498
callq 0x53b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5340
movq %rax, %rdi
callq 0x51d0
pushq $0x1
popq %rdi
callq 0x54b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/book.cpp
// Function: Book::find_entry(unsigned long)
int Book::find_entry(uint64_t key) {

  int left, right, mid;

  // Binary search (finds the leftmost entry)
  left = 0;
  right = bookSize - 1;

  assert(left <= right);

  while (left < right)
  {
      mid = (left + right) / 2;

      assert(mid >= left && mid < right);

      if (key <= read_entry(mid).key)
          right = mid;
      else
          left = mid + 1;
  }

  assert(left == right);

  return read_entry(left).key == key ? left : bookSize;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x230(%rdi), %r12d
decl %r12d
xorl %r15d, %r15d
cmpl %r12d, %r15d
jge 0x86fb
leal (%r15,%r12), %ebp
shrl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x871e
cmpq %r14, %rax
jb 0x86f4
movl %ebp, %r12d
jmp 0x86d5
incl %ebp
movl %ebp, %r15d
jmp 0x86d5
movq %rbx, %rdi
movl %r15d, %esi
callq 0x871e
cmpq %r14, %rax
je 0x8712
movl 0x230(%rbx), %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq