LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
leaq 0x1a81(%rip), %rdi      # 0x5a45
callq 0x20f0
leaq 0x1ad3(%rip), %rdi      # 0x5aa3
callq 0x20f0
movl $0x64, %edi
callq 0x2bb3
movq 0x3fea(%rip), %rbx      # 0x7fd0
leaq 0x1ac5(%rip), %rsi      # 0x5ab2
movl $0x12, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x4178(%rip), %rdi      # 0x81a0
callq 0x20f0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x28(%rsi), %r15
cmpq 0x30(%rsi), %r15
je 0x14ef
movq %rsi, %r14
movl (%r15), %eax
movq 0x10(%r14), %rcx
movq 0x40(%r14), %rdx
leaq (%rax,%rax,2), %rax
movl (%rdx,%rax,8), %eax
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x3524
movl 0x4(%r15), %eax
movq 0x10(%r14), %rcx
movq 0x40(%r14), %rdx
leaq (%rax,%rax,2), %rax
movl (%rdx,%rax,8), %eax
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x3524
movl 0x8(%r15), %eax
movq 0x10(%r14), %rcx
movq 0x40(%r14), %rdx
leaq (%rax,%rax,2), %rax
movl (%rdx,%rax,8), %eax
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x3524
addq $0x48, %r15
cmpq 0x30(%r14), %r15
jne 0x1471
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x150f
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq %r14, %rdi
callq 0x11b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq (%rax,%rax,2), %rax
movl (%rdi,%rax,8), %r8d
movl 0x4(%rdi,%rax,8), %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 0x1f93
jp 0x1f93
movsd 0x409e(%rip), %xmm0     # 0x6030
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_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl %edx, %eax
movq 0x10(%rdi), %rcx
shlq $0x5, %rax
leaq (%rcx,%rax), %r14
addq $0x8, %r14
movl %esi, %r12d
movq 0x40(%rdi), %rax
leaq (,%r12,8), %rdx
leaq (%rdx,%rdx,2), %rdx
movl (%rax,%rdx), %esi
movl 0x4(%rax,%rdx), %eax
shlq $0x5, %rsi
shlq $0x5, %rax
movsd 0x8(%rcx,%rsi), %xmm0
movsd 0x10(%rcx,%rsi), %xmm1
addsd 0x8(%rcx,%rax), %xmm0
addsd 0x10(%rcx,%rax), %xmm1
movsd 0x18(%rcx,%rsi), %xmm2
addsd 0x18(%rcx,%rax), %xmm2
movsd 0x3fbc(%rip), %xmm3     # 0x6040
mulsd %xmm3, %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm3, %xmm2
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm2, 0x18(%rsp)
movq 0x40(%rdi), %rax
movl 0x8(%rax,%rdx), %esi
movq %r14, %rdx
callq 0x1cb2
testb %al, %al
jne 0x21a6
leaq 0x8(%rsp), %r15
movq 0x40(%rbx), %r13
leaq (%r12,%r12,2), %rax
movl 0xc(%r13,%rax,8), %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1f18
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x20f1
ucomisd 0x3f49(%rip), %xmm0     # 0x6038
jbe 0x210b
leaq (%r12,%r12,2), %rax
movl 0xc(%r13,%rax,8), %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1f18
movl %r12d, %eax
leaq (%rax,%rax,2), %rax
movl (%r13,%rax,8), %ecx
movl 0x4(%r13,%rax,8), %edx
movq 0x10(%rbx), %rsi
shlq $0x5, %rcx
shlq $0x5, %rdx
movsd 0x8(%rsi,%rdx), %xmm1
movsd 0x10(%rsi,%rdx), %xmm2
movsd 0x8(%rsi,%rcx), %xmm3
movsd 0x10(%rsi,%rcx), %xmm4
subsd %xmm3, %xmm1
subsd %xmm4, %xmm2
movsd 0x18(%rsi,%rdx), %xmm5
movsd 0x18(%rsi,%rcx), %xmm6
subsd %xmm6, %xmm5
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm5
addsd %xmm3, %xmm1
addsd %xmm4, %xmm2
addsd %xmm6, %xmm5
movsd %xmm1, 0x8(%rsp)
movsd %xmm2, 0x10(%rsp)
movsd %xmm5, 0x18(%rsp)
movl 0x14(%r13,%rax,8), %r12d
movq 0x40(%rbx), %rax
leaq (%r12,%r12,2), %rcx
movl 0x8(%rax,%rcx,8), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1cb2
testb %al, %al
je 0x20bf
movq 0x40(%rbx), %rax
leaq (%r12,%r12,2), %rcx
movl 0x8(%rax,%rcx,8), %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq (%rax,%rax,8), %rax
movl %edx, (%r9,%rax,8)
movl %ecx, 0x4(%r9,%rax,8)
movl %r8d, 0x8(%r9,%rax,8)
movl %edx, %eax
movq 0x40(%rdi), %rdi
leaq (%rax,%rax,2), %rax
movl %ecx, 0xc(%rdi,%rax,8)
movl %ecx, %r9d
leaq (%r9,%r9,2), %r9
movl %edx, 0x10(%rdi,%r9,8)
movl %r8d, 0xc(%rdi,%r9,8)
movl %r8d, %r10d
leaq (%r10,%r10,2), %r10
movl %ecx, 0x10(%rdi,%r10,8)
movl %edx, 0xc(%rdi,%r10,8)
movl %r8d, 0x10(%rdi,%rax,8)
movl %esi, 0x8(%rdi,%rax,8)
movl %esi, 0x8(%rdi,%r9,8)
movl %esi, 0x8(%rdi,%r10,8)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %esi, %ecx
movq 0x40(%rdi), %rax
leaq (%rcx,%rcx,2), %r10
movl 0xc(%rax,%r10,8), %ecx
movl 0x10(%rax,%r10,8), %r11d
movl 0x14(%rax,%r10,8), %edx
leaq (%rdx,%rdx,2), %r8
movl 0xc(%rax,%r8,8), %ebx
movl 0x10(%rax,%r8,8), %r9d
leaq (%rbx,%rbx,2), %r14
movl 0x4(%rax,%r14,8), %ebp
movl %ebp, (%rax,%r10,8)
leaq (%r11,%r11,2), %r15
movl (%rax,%r15,8), %ebp
movl %ebp, 0x4(%rax,%r10,8)
movl %ebp, (%rax,%r8,8)
movl (%rax,%r10,8), %ebp
movl %ebp, 0x4(%rax,%r8,8)
movl 0x8(%rax,%r10,8), %r12d
movq 0x28(%rdi), %rdi
leaq (%r12,%r12,8), %r13
movl %esi, (%rdi,%r13,8)
movl %r11d, 0x4(%rdi,%r13,8)
movl %ebx, 0x8(%rdi,%r13,8)
movl %r11d, 0xc(%rax,%r10,8)
movl %esi, 0x10(%rax,%r15,8)
movl %ebx, 0xc(%rax,%r15,8)
movl %r11d, 0x10(%rax,%r14,8)
movl %esi, 0xc(%rax,%r14,8)
movl %ebx, 0x10(%rax,%r10,8)
movl %r12d, 0x8(%rax,%r10,8)
movl %r12d, 0x8(%rax,%r15,8)
movl %r12d, 0x8(%rax,%r14,8)
movl 0x14(%rax,%r10,8), %esi
leaq (%rsi,%rsi,2), %rsi
movl 0x8(%rax,%rsi,8), %esi
leaq (%rsi,%rsi,8), %r10
movl %edx, (%rdi,%r10,8)
movl %r9d, 0x4(%rdi,%r10,8)
movl %ecx, 0x8(%rdi,%r10,8)
movl %r9d, 0xc(%rax,%r8,8)
leaq (%r9,%r9,2), %rdi
movl %edx, 0x10(%rax,%rdi,8)
movl %ecx, 0xc(%rax,%rdi,8)
leaq (%rcx,%rcx,2), %r10
movl %r9d, 0x10(%rax,%r10,8)
movl %edx, 0xc(%rax,%r10,8)
movl %ecx, 0x10(%rax,%r8,8)
movl %esi, 0x8(%rax,%r8,8)
movl %esi, 0x8(%rax,%rdi,8)
movl %esi, 0x8(%rax,%r10,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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)
movq $0x0, 0x10(%rdi)
leaq 0x3004(%rip), %rsi      # 0x6050
movq %rdx, %rdi
callq 0x1120
movq %rax, %r14
leaq 0x8(%rsp), %r8
leaq 0xc(%rsp), %r9
leaq 0x2fea(%rip), %rsi      # 0x6052
movq %rsp, %rdx
movq %rax, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x11c0
cmpl $0x4, %eax
jne 0x3120
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 0x30de
cmpl $0x2, %r15d
jne 0x3104
movq %r14, %rdi
leaq 0x2f9d(%rip), %rsi      # 0x605e
movq %rsp, %rdx
movq %rbp, %rcx
leaq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0x11c0
cmpl $0x3, %eax
jne 0x3120
cmpl $0x3, %r15d
jne 0x3104
movq %r14, %rdi
leaq 0x2f81(%rip), %rsi      # 0x6069
movq %rsp, %rdx
movq %rbp, %rcx
leaq 0x18(%rsp), %r8
leaq 0x20(%rsp), %r9
xorl %eax, %eax
callq 0x11c0
cmpl $0x4, %eax
jne 0x3120
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x30(%rsp)
movq %r13, 0x40(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x58e2
jmp 0x30ab
movq %r14, %rdi
callq 0x10f0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x313e
jmp 0x313e
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3155
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq %r14, %rdi
callq 0x11b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x2f06(%rip), %rsi      # 0x6078
movq %rax, %rdi
callq 0x1120
movq %rax, %r14
movq 0x18(%rbx), %rdx
subq 0x10(%rbx), %rdx
shrq $0x5, %rdx
leaq 0x2eea(%rip), %rsi      # 0x607a
movq %rax, %rdi
xorl %eax, %eax
callq 0x1140
movq 0x10(%rbx), %rax
cmpq %rax, 0x18(%rbx)
je 0x31e9
movl $0x1, %ebp
xorl %ecx, %ecx
leaq 0x2ed2(%rip), %r15      # 0x6084
shlq $0x5, %rcx
movsd 0x8(%rax,%rcx), %xmm0
movsd 0x10(%rax,%rcx), %xmm1
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
movb $0x2, %al
callq 0x1140
movl %ebp, %ecx
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x31b2
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x2e62(%rip), %rsi      # 0x6078
movq %rax, %rdi
callq 0x1120
movq %rax, %r14
movq 0x30(%rbx), %rax
subq 0x28(%rbx), %rax
shrq $0x3, %rax
imull $0x38e38e39, %eax, %edx # imm = 0x38E38E39
leaq 0x2e56(%rip), %rsi      # 0x6090
movq %r14, %rdi
xorl %eax, %eax
callq 0x1140
movq 0x28(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x32c5
leaq 0x2e43(%rip), %r15      # 0x6098
movabsq $-0x71c71c71c71c71c7, %r13 # imm = 0x8E38E38E38E38E39
xorl %r12d, %r12d
movl %r12d, %ecx
leaq (%rcx,%rcx,8), %rdx
movq 0x40(%rbx), %rcx
leaq (%rax,%rdx,8), %rax
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
leaq (%rsi,%rsi,2), %rsi
movl (%rcx,%rsi,8), %esi
incl %esi
movl %esi, 0x4(%rsp,%rdx,4)
incq %rdx
cmpq $0x3, %rdx
jne 0x3273
incl %r12d
movl 0x4(%rsp), %ecx
movl 0x8(%rsp), %r8d
movl 0xc(%rsp), %r9d
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1140
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
cmpq %r12, %rcx
ja 0x3262
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10f0
// File: /workspace/github_cpp_makefile_star2_O1/sunweilun[P]Delaunay/Mesh.cpp
// Function: randu(unsigned int&)
unsigned randu(unsigned& seed)
{
    unsigned m_z = seed >> 16;
    unsigned m_w = seed & 0xffff;
    m_z = 36969 * (m_z & 65535) + (m_z >> 16);
    m_w = 18000 * (m_w & 65535) + (m_w >> 16);
    seed = (m_z << 16) + m_w;
    return seed;
}

// Assembly:
movl (%rdi), %eax
movzwl %ax, %ecx
shrl $0x10, %eax
imull $0x4650, %ecx, %ecx     # imm = 0x4650
imull $0x90690000, %eax, %eax # imm = 0x90690000
addl %ecx, %eax
movl %eax, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsp, %rdi
callq 0x3920
cmpb $0x1, 0x4(%rbx)
jne 0x33c6
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x32f3
movq %rbx, %rdi
callq 0x1518
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1572
movq 0x8(%rsp), %rax
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
cmpq (%rsp), %rax
je 0x3496
leaq 0x10(%rbx), %r14
movl $0x3, %ebp
xorl %r12d, %r12d
leaq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5a68
movq (%rsp), %rax
leaq (%r12,%r12,2), %rcx
movq 0x18(%rbx), %rdx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x18(%rdx)
movsd 0x8(%rax,%rcx,8), %xmm0
movsd %xmm0, -0x10(%rdx)
movsd 0x10(%rax,%rcx,8), %xmm0
movsd %xmm0, -0x8(%rdx)
cmpl $0x1, 0x8(%rbx)
jne 0x3476
movq 0x18(%rbx), %rax
movl $0x0, -0x20(%rax)
movq 0x28(%rbx), %rdi
addq $0x10, %rdi
movl %ebp, 0x1c(%rsp)
movq %rdi, 0x20(%rsp)
leaq 0x1c(%rsp), %rsi
movq %r15, %rdx
callq 0x5bf4
leal -0x2(%rbp), %r12d
movq 0x8(%rsp), %rax
subq (%rsp), %rax
sarq $0x3, %rax
imulq %r13, %rax
incl %ebp
cmpq %r12, %rax
ja 0x3403
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
je 0x34cf
movl $0x3, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2bba
leal -0x2(%r14), %eax
movq 0x8(%rsp), %rcx
subq (%rsp), %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
incl %r14d
cmpq %rax, %rcx
ja 0x34a7
movq %rbx, %rdi
callq 0x18ac
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x34ed
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1110
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3502
jmp 0x3502
jmp 0x3502
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x351b
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x1110
movq %rbx, %rdi
callq 0x11b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/sunweilun[P]Delaunay/Mesh.cpp
// Function: std::vector<unsigned int, std::allocator<unsigned int>> lazyDeletion<Mesh::Triangle>(std::vector<Mesh::Triangle, std::allocator<Mesh::Triangle>>&, 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 0x8(%rsi), %rsi
subq (%r14), %rsi
movq %rdi, %rbx
sarq $0x3, %rsi
movabsq $-0x71c71c71c71c71c7, %rax # imm = 0x8E38E38E38E38E39
imulq %rax, %rsi
leaq 0x7(%rsp), %rdx
callq 0x44c0
movq (%r14), %rax
xorl %r12d, %r12d
cmpq %rax, 0x8(%r14)
je 0x38ad
movl $0x1, %ebp
xorl %r13d, %r13d
leal -0x1(%rbp), %esi
leaq (,%r13,8), %rcx
addq %r13, %rcx
movl %r12d, %edx
leaq (%rdx,%rdx,8), %rdx
movl 0x8(%rax,%rcx,8), %edi
movl %edi, 0x8(%rax,%rdx,8)
movq (%rax,%rcx,8), %rdi
movq %rdi, (%rax,%rdx,8)
cmpl %r12d, %esi
je 0x3863
leaq (%rax,%rcx,8), %rsi
leaq (%rax,%rdx,8), %rdi
addq $0x10, %rdi
addq $0x10, %rsi
callq 0x47e2
movq (%rbx), %rax
movl %r12d, (%rax,%r13,4)
movq (%r15), %rax
movq %r13, %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
btq %r13, %rax
sbbl $-0x1, %r12d
movl %ebp, %r13d
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x71c71c71c71c71c7, %rdx # imm = 0x8E38E38E38E38E39
imulq %rdx, %rcx
incl %ebp
cmpq %r13, %rcx
ja 0x3824
movl %r12d, %r12d
movq %r14, %rdi
movq %r12, %rsi
callq 0x4764
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38cc
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x38e3
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq %r14, %rdi
callq 0x11b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
xorl %eax, %eax
leaq 0x26ad5(%rip), %rcx     # 0x2e010
leaq 0x3624e(%rip), %rdx     # 0x3d790
leaq 0x37247(%rip), %rsi     # 0x3e790
xorl %edi, %edi
movq (%rcx,%rdi,8), %r8
movl %edi, %r9d
andl $0x7, %r9d
movl %edi, %r10d
shrl $0x3, %r10d
xorl %r11d, %r11d
leaq (%rax,%r11), %rbx
btq %r11, %r8
setb (%rdx,%rbx)
movl %r11d, %ebp
andl $0x7, %ebp
movl %r9d, %r14d
subl %ebp, %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl %r11d, %r14d
shrl $0x3, %r14d
movl %r10d, %r15d
subl %r14d, %r15d
movl %r15d, %r14d
negl %r14d
cmovsl %r15d, %r14d
cmpl %r14d, %ebp
cmoval %ebp, %r14d
movb %r14b, (%rsi,%rbx)
incq %r11
cmpq $0x40, %r11
jne 0x7560
incq %rdi
addq $0x40, %rax
cmpq $0x40, %rdi
jne 0x754b
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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)
movq $-0x1, %rdx
movq %rdx, -0x10(%rsp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %esi, -0x8(%rsp)
movaps %xmm0, -0x58(%rsp)
movaps %xmm0, -0x48(%rsp)
movq %rax, -0x54(%rsp)
movq %rdx, -0x48(%rsp)
movl %esi, -0x40(%rsp)
movl %ecx, -0x38(%rsp)
xorl %eax, %eax
leaq 0x34e71(%rip), %rcx     # 0x3c490
movl %eax, %edx
shrl $0x3, %edx
movl %eax, %esi
andl $0x7, %esi
imulq $0x4c, %rax, %r8
leaq (%rcx,%r8), %rdi
movl $0x0, 0x48(%r8,%rcx)
xorl %r8d, %r8d
movl -0x28(%rsp,%r8,4), %r9d
addl %edx, %r9d
cmpl $0x7, %r9d
ja 0x766d
movl -0x58(%rsp,%r8,4), %r10d
addl %esi, %r10d
cmpl $0x7, %r10d
ja 0x766d
leal (%r10,%r9,8), %r9d
movslq 0x48(%rdi), %r10
movl %r9d, (%rdi,%r10,4)
leal 0x1(%r10), %r9d
movl %r9d, 0x48(%rdi)
incq %r8
cmpq $0x9, %r8
jne 0x763d
incq %rax
cmpq $0x40, %rax
jne 0x761f
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x75c0
leaq 0x26b79(%rip), %rdi     # 0x2e210
xorl %eax, %eax
callq 0x5060
leaq 0x34deb(%rip), %r15     # 0x3c490
leaq 0x26b89(%rip), %rbx     # 0x2e235
leaq 0x29b3f(%rip), %r14     # 0x311f2
movq %r15, %r12
xorl %r13d, %r13d
imulq $0x4c, %r13, %rax
movslq 0x48(%rax,%r15), %rax
testq %rax, %rax
jle 0x76dd
xorl %ecx, %ecx
xorl %edx, %edx
movb (%r12,%rcx,4), %sil
btsq %rsi, %rdx
incq %rcx
cmpq %rcx, %rax
jne 0x76cb
jmp 0x76df
xorl %edx, %edx
movq %rdx, %rsi
shrq $0x20, %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5060
cmpq $0x3f, %r13
je 0x7700
movq %r14, %rdi
xorl %eax, %eax
callq 0x5060
movl %r13d, %ebp
andl $0x3, %ebp
cmpq $0x3, %rbp
jne 0x7716
movl $0xa, %edi
callq 0x5580
cmpl $0x3, %ebp
setne %al
cmpq $0x3f, %r13
sete %cl
orb %al, %cl
jne 0x7731
movl $0x9, %edi
callq 0x5580
incq %r13
addq $0x4c, %r12
cmpq $0x40, %r13
jne 0x76b9
leaq 0x26afa(%rip), %rdi     # 0x2e243
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5060
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
subq $0x18, %rsp
movq %rdi, %r14
movl $0x7, %eax
leaq 0x11076b(%rip), %r12    # 0x118360
leaq 0xf(%rsp), %rbp
movq %rax, 0x10(%rsp)
movl $0x21, %edx
movq 0x34395(%rip), %rbx     # 0x3bfa0
movq %rbx, %rdi
leaq 0x28b45(%rip), %rsi     # 0x3075a
callq 0x5460
movb $0xa, 0xd(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xd(%rsp), %rsi
callq 0x5460
xorl %r13d, %r13d
leaq 0xe(%rsp), %rbx
movl $0x2, %edx
movq 0x3435b(%rip), %r15     # 0x3bfa0
movq %r15, %rdi
leaq 0x2956a(%rip), %rsi     # 0x311b9
callq 0x5460
testq %r14, (%r12,%r13,8)
movl $0x58, %eax
movl $0x20, %ecx
cmovel %ecx, %eax
movb %al, 0xe(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5460
movb $0x20, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5460
incq %r13
cmpq $0x8, %r13
jne 0x7c39
movl $0x2, %edx
movq 0x342fd(%rip), %rdi     # 0x3bfa0
leaq 0x26fb2(%rip), %rsi     # 0x2ec5c
callq 0x5460
addq $-0x40, %r12
movq 0x10(%rsp), %rax
subq $0x1, %rax
jae 0x7bfa
leaq 0x28a91(%rip), %rsi     # 0x3075a
movl $0x21, %edx
movq 0x342cb(%rip), %rbx     # 0x3bfa0
movq %rbx, %rdi
callq 0x5460
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7d59
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 0x7d6c
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 0x26bc4(%rip), %rdx     # 0x2e940
movl (%rdx,%rax,4), %eax
movq %rcx, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
movq %r9, 0x18(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
xorl %ebp, %ebp
leaq 0x20(%rsp), %r15
xorl %ecx, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0xc(%rsp)
movl %ecx, (%rax,%rbp,4)
movl $0x6, (%rsp)
movl %ebp, %edi
xorl %esi, %esi
movq 0x18(%rsp), %rdx
movl $0x1, %ecx
movl $0x6, %r8d
movl $0x1, %r9d
callq 0x8584
movq 0x10(%rsp), %rcx
movq %rax, (%rcx,%rbp,8)
movq 0x38(%rsp), %rax
movl (%rax,%rbp,4), %eax
movl %eax, %ecx
negb %cl
movl $0x1, %edx
shll %cl, %edx
movl %edx, 0x8(%rsp)
movq %rax, 0x50(%rsp)
cmpq $0x1, %rax
je 0x8560
movslq 0xc(%rsp), %rax
movq 0x28(%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0x48(%rsp)
movl 0x8(%rsp), %eax
cmpl $0x2, %eax
movl $0x1, %r12d
cmovgel %eax, %r12d
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x84ff
xorl %r13d, %r13d
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x7d37
movl $0x1, %edx
movl %eax, %ecx
shlq %cl, %rdx
btl %r13d, %ebx
leal 0x1(%r13), %eax
movl $0x0, %ecx
cmovbq %rdx, %rcx
orq %rcx, %r14
cmpq $0x0, 0x20(%rsp)
movl %eax, %r13d
jne 0x84cc
jmp 0x8502
xorl %r14d, %r14d
movq 0x40(%rsp), %rax
movq (%rax,%rbp,8), %rax
movl %r14d, %ecx
imull %eax, %ecx
movq %r14, %r13
shrq $0x20, %r13
shrq $0x20, %rax
imull %eax, %r13d
xorl %ecx, %r13d
movl $0x7, (%rsp)
movl %ebp, %edi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
movl $0x7, %r8d
xorl %r9d, %r9d
callq 0x8584
movq 0x50(%rsp), %rcx
shrq %cl, %r13
movq 0x48(%rsp), %rcx
movq %rax, (%rcx,%r13,8)
incl %ebx
cmpl %r12d, %ebx
jne 0x84b3
movl 0xc(%rsp), %ecx
addl 0x8(%rsp), %ecx
incq %rbp
cmpq $0x40, %rbp
jne 0x842c
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x38(%rsp), %edx
leal 0x7(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %r10d
sarl $0x3, %r10d
movq %r10, -0x10(%rsp)
andl $-0x8, %eax
subl %eax, %edi
xorl %ebx, %ebx
xorl %eax, %eax
movq -0x8(%rsp), %r10
movl (%r10,%rbx,8), %r14d
movl 0x4(%r10,%rbx,8), %r15d
leal (%rdi,%r14), %r12d
movq -0x10(%rsp), %r10
leal (%r10,%r15), %r13d
leal (%r12,%r13,8), %r11d
leal (%r14,%r15,8), %ebp
testl %r14d, %r14d
je 0x85e6
cmpl %ecx, %r12d
jl 0x860e
cmpl %r8d, %r12d
jg 0x860e
testl %r15d, %r15d
je 0x85f5
cmpl %r9d, %r13d
jl 0x860e
cmpl %edx, %r13d
jg 0x860e
btsq %r11, %rax
movl %r11d, %r10d
addl %ebp, %r10d
addl %r15d, %r13d
addl %r14d, %r12d
btq %r11, %rsi
movl %r10d, %r11d
jae 0x85d7
incq %rbx
cmpq $0x4, %rbx
jne 0x85b4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x54b0
leaq 0x220(%rbx), %r15
movq %r15, 0x210(%rbx)
movq $0x0, 0x218(%rbx)
movb $0x0, 0x220(%rbx)
leaq 0x238(%rbx), %rdi
callq 0x8f3c
callq 0x5100
movslq %eax, %r8
imulq $0x68db8bad, %r8, %rax  # imm = 0x68DB8BAD
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x2c, %rax
addl %ecx, %eax
imull $0x2710, %eax, %eax     # imm = 0x2710
subl %eax, %r8d
je 0x8810
movq 0x238(%rbx), %rax
movq 0x240(%rbx), %rsi
movq 0x248(%rbx), %rdx
movq 0x250(%rbx), %rcx
movl %r8d, %edi
negl %edi
cmpl %edi, %r8d
cmovgl %r8d, %edi
incl %edi
movq %rsi, %r8
rolq $0x7, %r8
movq %rax, %r9
movq %rdx, %rax
rolq $0xd, %rax
xorq %rsi, %rax
movq %rcx, %rsi
rolq $0x25, %rsi
subq %r8, %r9
addq %rdx, %rsi
movq %rcx, %rdx
addq %r9, %rdx
movq %r9, %rcx
addq %rax, %rcx
decl %edi
cmpl $0x1, %edi
jg 0x87c0
movq %rsi, 0x240(%rbx)
movq %rdx, 0x248(%rbx)
movq %rax, 0x238(%rbx)
movq %rcx, 0x250(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x210(%rbx), %rdi
cmpq %r15, %rdi
je 0x8830
movq (%r15), %rsi
incq %rsi
callq 0x5400
movq %rbx, %rdi
callq 0x50d0
movq %r14, %rdi
callq 0x5790
// File: /workspace/github_cpp_makefile_star2_O1/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 0x8878
movq (%rbx), %rsi
movq %r14, %rdi
movl $0x1c, %edx
callq 0x5360
leaq 0x80(%r14), %rdi
callq 0x50e0
testb %al, %al
je 0x8931
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x5560
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 0x8939
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 0x336b0(%rip), %rdi     # 0x3bff0
leaq 0x27c11(%rip), %rsi     # 0x30558
callq 0x53d0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5350
movq %rax, %rdi
callq 0x51c0
movl $0x1, %edi
callq 0x54e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
xorl %r15d, %r15d
cmpl $0x2, %r12d
jl 0x8b4a
decl %r12d
xorl %r15d, %r15d
leal (%r15,%r12), %ebp
shrl %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8b6e
cmpq %r14, %rax
jb 0x8b40
movl %ebp, %r12d
jmp 0x8b45
incl %ebp
movl %ebp, %r15d
cmpl %r12d, %r15d
jl 0x8b26
movq %rbx, %rdi
movl %r15d, %esi
callq 0x8b6e
cmpq %r14, %rax
je 0x8b61
movl 0x230(%rbx), %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/book.cpp
// Function: Book::read_entry(int)
BookEntry Book::read_entry(int idx) {

  assert(idx >= 0 && idx < bookSize);
  assert(bookFile.is_open());

  BookEntry e;

  bookFile.seekg(idx * sizeof(BookEntry), ios_base::beg);

  get_number(e.key);
  get_number(e.move);
  get_number(e.count);
  get_number(e.learn);

  if (!bookFile.good())
  {
      cerr << "Failed to read book entry at index " << idx << endl;
      exit(EXIT_FAILURE);
  }
  return e;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movl %esi, 0x4(%rsp)
movslq %esi, %rsi
shlq $0x4, %rsi
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x5560
movl $0x8, %r12d
movq %r14, %r13
shlq $0x8, %r13
movq %r15, %rdi
callq 0x54c0
movslq %eax, %r14
addq %r13, %r14
decq %r12
jne 0x8b97
xorl %ebp, %ebp
movl $0x1, %r12d
movzwl %bp, %r13d
shll $0x8, %r13d
movq %r15, %rdi
callq 0x54c0
movl %eax, %ebp
addl %r13d, %ebp
decq %r12
je 0x8bb9
xorl %r12d, %r12d
movl $0x1, %r13d
movzwl %r12w, %ebx
shll $0x8, %ebx
movq %r15, %rdi
callq 0x54c0
movl %eax, %r12d
addl %ebx, %r12d
decq %r13
je 0x8bdc
xorl %eax, %eax
movl $0x4, %r13d
movl %eax, %ebx
shll $0x8, %ebx
movq %r15, %rdi
callq 0x54c0
addl %ebx, %eax
decq %r13
jne 0x8bfe
movq (%r15), %rcx
movq -0x18(%rcx), %rcx
cmpl $0x0, 0x20(%r15,%rcx)
jne 0x8c44
shlq $0x20, %rax
shll $0x10, %r12d
orq %rax, %r12
movzwl %bp, %edx
orq %r12, %rdx
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x333a5(%rip), %rdi     # 0x3bff0
leaq 0x27920(%rip), %rsi     # 0x30572
callq 0x53d0
movq %rax, %rdi
movl 0x4(%rsp), %esi
callq 0x5760
movq %rax, %rdi
callq 0x51c0
movl $0x1, %edi
callq 0x54e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/book.cpp
// Function: Book::write_entry(unsigned long, Move, unsigned short)
void Book::write_entry(uint64_t key, Move move, uint16_t count) {
	// convert Move to polyglot move
	uint16_t m = make_move(move_from(move), move_to(move)) | (move_promotion_piece(move) << 12);
	uint32_t learn = 0;
	
	write_number(key);
	write_number(m);
	write_number(count);
	write_number(learn);
	
	++bookSize;
	
	if (!bookFile.good()) {
		cerr << "Failed to write book." << endl;
		exit(EXIT_FAILURE);
	}
	
//	bookFile.flush();
//	
//	if (!bookFile.good()) {
//		cerr << "Failed to flush book." << endl;
//		exit(EXIT_FAILURE);
//	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %r15
movl %edx, %eax
andl $0xfff, %eax            # imm = 0xFFF
movl %edx, %ecx
andl $0xc000, %ecx           # imm = 0xC000
andl $0x3000, %edx           # imm = 0x3000
addl $0x2000, %edx           # imm = 0x2000
xorl %ebx, %ebx
cmpl $0x4000, %ecx           # imm = 0x4000
cmovel %edx, %ebx
orl %eax, %ebx
leaq 0x10(%rdi), %r14
movl $0x8, %ebp
movq %rsp, %r13
movq %r12, %rax
shrq $0x38, %rax
movb %al, (%rsp)
shlq $0x8, %r12
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x5540
decq %rbp
jne 0x8cbf
movl $0x1, %r13d
leaq 0x1(%rsp), %r12
movb %bh, 0x1(%rsp)
shll $0x8, %ebx
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x5540
decq %r13
je 0x8ced
movl $0x1, %r13d
leaq 0x2(%rsp), %r12
movl 0x4(%rsp), %ebx
movb %bh, 0x2(%rsp)
shll $0x8, %ebx
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x5540
decq %r13
je 0x8d18
movl $0x4, %r12d
leaq 0x3(%rsp), %rbx
movb $0x0, 0x3(%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5540
decq %r12
jne 0x8d3f
incl 0x230(%r15)
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r15,%rax)
jne 0x8d7e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3326b(%rip), %rdi     # 0x3bff0
leaq 0x2780a(%rip), %rsi     # 0x30596
callq 0x53d0
movq %rax, %rdi
callq 0x51c0
movl $0x1, %edi
callq 0x54e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/book.cpp
// Function: Book::print_all_moves(Position const&)
void Book::print_all_moves(const Position& pos) {
	  if (!bookFile.is_open() || bookSize == 0) {
		  cout << "book is empty" << endl;
		  return;
	  }
	  

	  BookEntry entry;
	  uint64_t key = book_key(pos);
	  
	  
	  // Choose a book move among the possible moves for the given position
	  for (int idx = find_entry(key); idx < bookSize; idx++)
	  {
	      entry = read_entry(idx);
	      
	      if (entry.key != key)
	          break;
	      
	      cout << "(" << move_to_string(Move(entry.move)) << " " << entry.count << ") ";
	  }
	  cout << endl;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x80, %rdi
callq 0x50e0
testb %al, %al
je 0x8eb4
cmpl $0x0, 0x230(%rbx)
je 0x8eb4
movq %r14, %rdi
callq 0x8624
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x8b02
cmpl 0x230(%rbx), %eax
jge 0x8ecc
movl %eax, %ebp
movq 0x3319c(%rip), %r15     # 0x3bfa0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x8b6e
cmpq %r14, %rax
jne 0x8ecc
movq %rdx, %r12
movl $0x1, %edx
movq %r15, %rdi
leaq 0x27791(%rip), %rsi     # 0x305ba
callq 0x5460
movzwl %r12w, %esi
leaq 0x8(%rsp), %rdi
callq 0x16fdc
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x5460
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x277e0(%rip), %rsi     # 0x30640
callq 0x5460
shrl $0x10, %r12d
movq %r13, %rdi
movq %r12, %rsi
callq 0x5260
movl $0x2, %edx
movq %rax, %rdi
leaq 0x287e6(%rip), %rsi     # 0x31669
callq 0x5460
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8ea4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5400
incl %ebp
cmpl 0x230(%rbx), %ebp
jl 0x8e04
jmp 0x8ecc
movq 0x330e5(%rip), %rdi     # 0x3bfa0
leaq 0x276ea(%rip), %rsi     # 0x305ac
movl $0xd, %edx
callq 0x5460
movq 0x330cd(%rip), %rbx     # 0x3bfa0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8f28
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5400
movq %rbx, %rdi
callq 0x5790
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/./rkiss.h
// Function: RKISS::raninit()
void raninit() {

    s.a = 0xf1ea5eed;
    s.b = s.c = s.d = 0xd4e12c77;
    for (int i = 0; i < 73; i++)
        rand64();
  }

// Assembly:
movl $0xd4e12c77, %eax       # imm = 0xD4E12C77
leaq 0x1d093276(%rax), %rcx
movq %rcx, (%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x10(%rdi)
movq %rax, 0x8(%rdi)
movl $0x49, %edx
movl $0xd4e12c77, %esi       # imm = 0xD4E12C77
movl $0xd4e12c77, %r8d       # imm = 0xD4E12C77
movq %rcx, %r9
movq %rsi, %rcx
rolq $0xd, %rcx
xorq %rax, %rcx
rolq $0x7, %rax
subq %rax, %r9
movq %r8, %rax
rolq $0x25, %rax
addq %rsi, %rax
movq %r8, %rsi
addq %r9, %rsi
movq %r9, %r8
addq %rcx, %r8
decl %edx
jne 0x8f67
movq %rcx, (%rdi)
movq %rax, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %r8, 0x18(%rdi)
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/create_book.cpp
// Function: printTree(MoveTreeNode*)
void printTree(MoveTreeNode* node) {

	if (node->child_count == 0) {
		cout << endl;
		return;
	}

	// print first move
	cout << move_to_string(node->child[0]->ms.move) << " ";
	printTree(node->child[0]);

	// print following moves
	for (int k = 1; k < node->child_count; ++k) {
		// indentation
		for (int s = 0; s < node->depth; ++s) {
			cout << "     ";
		}

		// print moves
		cout << move_to_string(node->child[k]->ms.move) << " ";
		printTree(node->child[k]);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x0, 0xa8(%rdi)
je 0x9690
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0xac(%rax), %esi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x16fdc
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x32a1b(%rip), %rdi     # 0x3bfa0
callq 0x5460
leaq 0x270af(%rip), %rsi     # 0x30640
movl $0x1, %edx
movq %rax, %rdi
callq 0x5460
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x95b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x8(%rbx), %rdi
callq 0x9542
cmpl $0x2, 0xa8(%rbx)
jl 0x9681
movl $0x1, %ebp
movq 0x329c5(%rip), %r14     # 0x3bfa0
leaq 0x2705a(%rip), %r15     # 0x3063c
leaq 0x27057(%rip), %r13     # 0x30640
cmpl $0x0, 0xb8(%rbx)
jle 0x9611
xorl %r12d, %r12d
movl $0x5, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x5460
incl %r12d
cmpl 0xb8(%rbx), %r12d
jl 0x95f5
movq 0x8(%rbx,%rbp,8), %rax
movl 0xac(%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0x16fdc
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x5460
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x5460
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x9664
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5400
movq 0x8(%rbx,%rbp,8), %rdi
callq 0x9542
incq %rbp
movslq 0xa8(%rbx), %rax
cmpq %rax, %rbp
jl 0x95e9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x32909(%rip), %rbx     # 0x3bfa0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5050
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5270
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x96e7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x96f9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5400
movq %rbx, %rdi
callq 0x5790
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/create_book.cpp
// Function: numberOfNodes(MoveTreeNode*)
int numberOfNodes(MoveTreeNode* node) {

	int sum = 0;

	for (int k = 0; k < node->child_count; ++k) {
		sum += numberOfNodes(node->child[k]);
	}

	// node->ms.score was set true or false, false means not playable
	if (node->ms.score) {
		node->ms.score = 1;//sum + 1;	// a move with score 0 will never be played
	}
	return sum + 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0xa8(%rdi)
jle 0x9735
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x8(%rbx,%r14,8), %rdi
callq 0x9701
addl %eax, %ebp
incq %r14
movslq 0xa8(%rbx), %rax
cmpq %rax, %r14
jl 0x9716
incl %ebp
jmp 0x973a
movl $0x1, %ebp
cmpl $0x0, 0xb0(%rbx)
je 0x974d
movl $0x1, 0xb0(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq