LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCache::addVertex(unsigned long)
void vertexCache::addVertex(size_t vertex) {
    size_t w = findVertex(vertex);
    // remove the vertex for later reinsertion at the top
    if (w != (size_t)-1)
        removeVertex(w);
    else // not found, cache miss!
        m_misses++;
    // shift all vertices down to make room for the new top vertex
    for (size_t i = 39; i != 0; i--)
        m_cache[i] = m_cache[i - 1];
    // add new vertex to cache
    m_cache[0] = vertex;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
cmpq %rbx, (%r14,%rax,8)
je 0x27bc
incq %rax
cmpq $0x20, %rax
jne 0x27a4
incq 0x140(%r14)
jmp 0x27d7
cmpq $0x25, %rax
ja 0x27d7
incq %rax
movq (%r14,%rax,8), %rcx
movq %rcx, -0x8(%r14,%rax,8)
incq %rax
cmpq $0x27, %rax
jne 0x27c5
leaq 0x8(%r14), %rdi
movl $0x138, %edx            # imm = 0x138
movq %r14, %rsi
callq 0x21e0
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCache::getCacheMissCount(std::vector<unsigned long, std::allocator<unsigned long>> const&)
size_t vertexCache::getCacheMissCount(const u::vector<size_t> &indices) {
    clear();
    for (auto &it : indices)
        addVertex(it);
    return m_misses;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x140, %edx            # imm = 0x140
movl $0xff, %esi
callq 0x20a0
movq $0x0, 0x140(%rbx)
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x286a
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x2798
addq $0x8, %r15
cmpq %r14, %r15
jne 0x284d
movq 0x140(%rbx), %rax
jmp 0x286c
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::optimize(std::vector<unsigned long, std::allocator<unsigned long>>&)
vertexCacheOptimizer::result vertexCacheOptimizer::optimize(u::vector<size_t> &indices) {
    size_t find = (size_t)-1;
    for (size_t i = 0; i < indices.size(); i++)
        if (find == (size_t)-1 || (find != (size_t)-1 && indices[i] > find))
            find = indices[i];
    if (find == (size_t)-1)
        return kErrorNoVertices;

    result begin = init(indices, find + 1);
    if (begin != kSuccess)
        return begin;

    // Process
    while (process())
        ;

    // Rewrite the indices
    for (size_t i = 0; i < m_drawList.size(); i++)
        for (size_t j = 0; j < 3; j++)
            indices[3 * i + j] = m_triangles[m_drawList[i]].vertices[j];

    return kSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
movl $0x2, %eax
subq %rcx, %rsi
je 0x2a1d
movq %rdi, %r14
sarq $0x3, %rsi
cmpq $0x1, %rsi
adcq $0x0, %rsi
movq $-0x1, %rdx
xorl %edi, %edi
movq (%rcx,%rdi,8), %r8
cmpq %rdx, %r8
movq %rdx, %r9
cmovaq %r8, %r9
cmpq $-0x1, %rdx
movq %r9, %rdx
cmoveq %r8, %rdx
incq %rdi
cmpq %rdi, %rsi
jne 0x290b
cmpq $-0x1, %rdx
je 0x2a1d
incq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a24
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x2a1d
movq 0x50(%r14), %rdx
movq 0x20(%r14), %rsi
movq 0x48(%r14), %rax
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x3, %rcx
subq 0x18(%r14), %rsi
sarq $0x3, %rsi
movabsq $-0x3333333333333333, %r15 # imm = 0xCCCCCCCCCCCCCCCD
imulq %r15, %rsi
cmpq %rsi, %rcx
je 0x29d5
movq 0x1a8(%r14), %rsi
movq %r14, %rdi
callq 0x2f28
movq %r14, %rdi
callq 0x3012
movq %r14, %rdi
testb %al, %al
je 0x29a9
callq 0x310c
jmp 0x29ae
callq 0x2d62
movq %rax, 0x1a8(%r14)
movq 0x50(%r14), %rdx
movq 0x20(%r14), %rsi
movq 0x48(%r14), %rax
movq %rdx, %rcx
subq %rax, %rcx
subq 0x18(%r14), %rsi
sarq $0x3, %rcx
sarq $0x3, %rsi
jmp 0x297b
cmpq %rax, %rdx
je 0x2a1b
movq 0x18(%r14), %rdx
movq (%rbx), %rsi
cmpq $0x1, %rcx
adcq $0x0, %rcx
addq $0x8, %rdx
xorl %edi, %edi
xorl %r8d, %r8d
movq (%rax,%rdi,8), %r9
leaq (%r9,%r9,4), %r9
leaq (%rdx,%r9,8), %r9
movq (%r9,%r8,8), %r9
movq %r9, (%rsi,%r8,8)
incq %r8
cmpq $0x3, %r8
jne 0x29f2
incq %rdi
addq $0x18, %rsi
cmpq %rcx, %rdi
jne 0x29ef
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::fullScoreRecalculation()
size_t vertexCacheOptimizer::fullScoreRecalculation() {
    // Calculate score for all vertices
    for (size_t i = 0; i < m_vertices.size(); i++)
        m_vertices[i].currentScore = calcVertexScore(i);

    // Calculate scores for all active triangles
    float maxScore = 0.0f;
    size_t maxScoreTriangle = (size_t)-1;
    bool firstTime = true;

    for (size_t i = 0; i < m_triangles.size(); i++) {
        auto &it = m_triangles[i];
        if (it.rendered)
            continue;

        // Sum the score of all the triangle's vertices
        float sum = m_vertices[it.vertices[0]].currentScore +
                    m_vertices[it.vertices[1]].currentScore +
                    m_vertices[it.vertices[2]].currentScore;
        it.currentScore = sum;

        if (firstTime || sum > maxScore) {
            firstTime = false;
            maxScore = sum;
            maxScoreTriangle = i;
        }
    }

    return maxScoreTriangle;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
cmpq %rcx, 0x8(%rdi)
je 0x2da7
movl $0x20, %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c84
movq (%rbx), %rcx
movss %xmm0, (%rcx,%r15)
incq %r14
movq 0x8(%rbx), %rax
subq %rcx, %rax
sarq $0x6, %rax
addq $0x40, %r15
cmpq %rax, %r14
jb 0x2d7c
movq 0x18(%rbx), %rdx
movq 0x20(%rbx), %rax
subq %rdx, %rax
je 0x2e43
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
cmpq $0x1, %rsi
adcq $0x0, %rsi
movq $-0x1, %rax
movb $0x1, %r8b
xorps %xmm0, %xmm0
xorl %edi, %edi
cmpb $0x0, (%rdx)
jne 0x2e35
movq 0x8(%rdx), %r9
movq 0x10(%rdx), %r10
shlq $0x6, %r9
movss 0x20(%rcx,%r9), %xmm1
shlq $0x6, %r10
addss 0x20(%rcx,%r10), %xmm1
movq 0x18(%rdx), %r9
shlq $0x6, %r9
addss 0x20(%rcx,%r9), %xmm1
movss %xmm1, 0x4(%rdx)
ucomiss %xmm0, %xmm1
seta %r9b
orb %r9b, %r8b
testb $0x1, %r8b
cmovneq %rdi, %rax
jne 0x2e2f
movaps %xmm0, %xmm1
xorl %r8d, %r8d
movaps %xmm1, %xmm0
incq %rdi
addq $0x28, %rdx
cmpq %rdi, %rsi
jne 0x2de1
jmp 0x2e4a
movq $-0x1, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::initialPass()
vertexCacheOptimizer::result vertexCacheOptimizer::initialPass() {
    for (size_t i = 0; i < m_indices.size(); i++) {
        size_t index = m_indices[i];
        if (index == (size_t)-1 || index >= m_vertices.size())
            return kErrorInvalidIndex;
        m_vertices[index].totalValence++;
        m_vertices[index].remainingValence++;
        m_vertices[index].indices.push_back(i / 3);
    }
    m_bestTriangle = fullScoreRecalculation();
    return kSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rcx
cmpq %rcx, 0x38(%rdi)
je 0x2f0a
xorl %r14d, %r14d
pcmpeqd %xmm1, %xmm1
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
movq %rsp, %r15
movq (%rcx,%r14,8), %r8
movl $0x1, %eax
cmpq $-0x1, %r8
je 0x2f1b
movq (%rbx), %r9
movq 0x8(%rbx), %rdx
subq %r9, %rdx
sarq $0x6, %rdx
cmpq %rdx, %r8
jae 0x2f1b
shlq $0x6, %r8
leaq (%r9,%r8), %rdi
movdqu 0x28(%r9,%r8), %xmm0
psubq %xmm1, %xmm0
movdqu %xmm0, 0x28(%r9,%r8)
movq %r14, %rax
mulq %r12
shrq %rdx
movq %rdx, (%rsp)
movq 0x8(%r9,%r8), %rsi
cmpq 0x10(%r9,%r8), %rsi
je 0x2ee3
movq %rdx, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x2ef3
movq %r15, %rdx
callq 0x5d52
pcmpeqd %xmm1, %xmm1
movq 0x30(%rbx), %rcx
incq %r14
movq 0x38(%rbx), %rax
subq %rcx, %rax
sarq $0x3, %rax
cmpq %rax, %r14
jb 0x2e7d
movq %rbx, %rdi
callq 0x2d62
movq %rax, 0x1a8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::addTriangle(unsigned long)
void vertexCacheOptimizer::addTriangle(size_t triangle) {
    // reset all cache positions
    for (size_t i = 0; i < 32; i++) {
        size_t find = m_vertexCache.getCachedVertex(i);
        if (find == (size_t)-1)
            continue;
        m_vertices[find].cachePosition = (size_t)-1;
    }

    triangleCacheData *t = &m_triangles[triangle];
    if (t->rendered)
        return;

    for (size_t i = 0; i < 3; i++) {
        // Add all the triangle's vertices to the cache
        m_vertexCache.addVertex(t->vertices[i]);
        vertexCacheData *v = &m_vertices[t->vertices[i]];

        // Decrease the remaining valence.
        v->remainingValence--;

        // Move the added triangle to the end of the vertex's triangle index
        // list such that the first `remainingValence' triangles in the index
        // list are only the active ones.
        v->moveTriangle(triangle);
    }

    // It's been rendered, mark it
    m_drawList.push_back(triangle);
    t->rendered = true;

    // Update all the vertex cache positions
    for (size_t i = 0; i < 32; i++) {
        size_t index = m_vertexCache.getCachedVertex(i);
        if (index == (size_t)-1)
            continue;
        m_vertices[index].cachePosition = i;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
leaq 0x60(%rdi), %rbx
movq (%rdi), %rax
movl $0xc, %ecx
movq (%r14,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x2f63
shlq $0x6, %rdx
movq $-0x1, 0x18(%rax,%rdx)
incq %rcx
cmpq $0x2c, %rcx
jne 0x2f4c
movq 0x18(%r14), %rax
leaq (%r15,%r15,4), %rcx
cmpb $0x0, (%rax,%rcx,8)
jne 0x3004
leaq (%rax,%rcx,8), %r12
movl $0x1, %r13d
movq (%r12,%r13,8), %rsi
movq %rbx, %rdi
callq 0x2798
movq (%r12,%r13,8), %rax
movq (%r14), %rcx
shlq $0x6, %rax
leaq (%rcx,%rax), %rdi
decq 0x30(%rcx,%rax)
movq %r15, %rsi
callq 0x2632
incq %r13
cmpq $0x4, %r13
jne 0x2f88
movq 0x50(%r14), %rsi
cmpq 0x58(%r14), %rsi
je 0x2fd0
movq %r15, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x50(%r14)
jmp 0x2fde
leaq 0x48(%r14), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5c16
movb $0x1, (%r12)
movq (%r14), %rax
xorl %ecx, %ecx
movq (%rbx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x2ffb
shlq $0x6, %rdx
movq %rcx, 0x18(%rax,%rdx)
incq %rcx
cmpq $0x20, %rcx
jne 0x2fe8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::cleanFlags()
bool vertexCacheOptimizer::cleanFlags() {
    bool found = false;
    for (size_t i = 0; i < 32; i++) {
        size_t find = m_vertexCache.getCachedVertex(i);
        if (find == (size_t)-1)
            continue;

        vertexCacheData *v = &m_vertices[find];
        for (size_t j = 0; j < v->remainingValence; j++) {
            triangleCacheData *t = &m_triangles[v->indices[j]];
            found = true;
            // Clear flags
            t->calculated = false;
            for (size_t k = 0; k < 3; k++)
                m_vertices[t->vertices[k]].calculated = false;
        }
    }
    return found;
}

// Assembly:
pushq %rbx
movq (%rdi), %rcx
movq 0x18(%rdi), %rdx
xorl %eax, %eax
xorl %esi, %esi
movq 0x60(%rdi,%rsi,8), %r9
cmpq $-0x1, %r9
je 0x3077
shlq $0x6, %r9
movq 0x30(%rcx,%r9), %r8
testq %r8, %r8
je 0x3077
addq %rcx, %r9
movq (%r9), %rax
xorl %r9d, %r9d
movq (%rax,%r9,8), %r10
leaq (%r10,%r10,4), %r10
leaq (%rdx,%r10,8), %r10
movb $0x0, 0x20(%r10)
movl $0x1, %r11d
movq (%r10,%r11,8), %rbx
shlq $0x6, %rbx
movb $0x0, 0x38(%rcx,%rbx)
incq %r11
cmpq $0x4, %r11
jne 0x3057
incq %r9
cmpq %r8, %r9
jne 0x3040
movb $0x1, %al
incq %rsi
cmpq $0x20, %rsi
jne 0x301e
andb $0x1, %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::triangleScoreRecalculation(unsigned long)
void vertexCacheOptimizer::triangleScoreRecalculation(size_t triangle) {
    triangleCacheData *t = &m_triangles[triangle];

    // Calculate vertex scores
    float sum = 0.0f;
    for (size_t i = 0; i < 3; i++) {
        vertexCacheData *v = &m_vertices[t->vertices[i]];
        float score = v->calculated ? v->currentScore : calcVertexScore(t->vertices[i]);
        v->currentScore = score;
        v->calculated = true;
        sum += score;
    }

    t->currentScore = sum;
    t->calculated = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq (%rsi,%rsi,4), %r14
shlq $0x3, %r14
addq 0x18(%rdi), %r14
xorps %xmm1, %xmm1
movl $0x1, %r15d
movq (%r14,%r15,8), %rsi
movq (%rbx), %rax
movq %rsi, %rcx
shlq $0x6, %rcx
leaq (%rax,%rcx), %r12
cmpb $0x1, 0x38(%rax,%rcx)
jne 0x30c6
movss 0x20(%r12), %xmm0
jmp 0x30da
movq %rbx, %rdi
movss %xmm1, 0x4(%rsp)
callq 0x2c84
movss 0x4(%rsp), %xmm1
movss %xmm0, 0x20(%r12)
movb $0x1, 0x38(%r12)
addss %xmm0, %xmm1
incq %r15
cmpq $0x4, %r15
jne 0x30a4
movss %xmm1, 0x4(%r14)
movb $0x1, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/graphitemaster[P]smbf/smbf.cpp
// Function: vertexCacheOptimizer::partialScoreRecalculation()
size_t vertexCacheOptimizer::partialScoreRecalculation() {
    // Iterate through all the vertices of the cache
    bool firstTime = true;
    float maxScore = 0.0f;
    size_t maxScoreTriangle = (size_t)-1;
    for (size_t i = 0; i < 32; i++) {
        size_t find = m_vertexCache.getCachedVertex(i);
        if (find == (size_t)-1)
            continue;

        vertexCacheData *v = &m_vertices[find];

        // Iterate through all the active triangles of this vertex
        for (size_t j = 0; j < v->remainingValence; j++) {
            size_t triangle = v->indices[j];
            triangleCacheData *t = &m_triangles[triangle];

            // Calculate triangle score if it isn't already calculated
            if (!t->calculated)
                triangleScoreRecalculation(triangle);

            float score = t->currentScore;
            // Found a triangle to process
            if (firstTime || score > maxScore) {
                firstTime = false;
                maxScore = score;
                maxScoreTriangle = triangle;
            }
        }
    }
    return maxScoreTriangle;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r13
movq $-0x1, %rax
xorps %xmm1, %xmm1
movb $0x1, %bpl
xorl %ecx, %ecx
movq %rcx, 0x10(%rsp)
movq 0x60(%r13,%rcx,8), %rcx
cmpq $-0x1, %rcx
je 0x31cc
movq (%r13), %rsi
shlq $0x6, %rcx
movq 0x30(%rsi,%rcx), %rdx
testq %rdx, %rdx
je 0x31cc
addq %rcx, %rsi
xorl %r12d, %r12d
movq %rsi, 0x18(%rsp)
movq (%rsi), %rcx
movq (%rcx,%r12,8), %r15
movq 0x18(%r13), %r14
leaq (%r15,%r15,4), %rbx
cmpb $0x0, 0x20(%r14,%rbx,8)
jne 0x319e
movq %r13, %rdi
movq %r15, %rsi
movq %rax, 0x20(%rsp)
movss %xmm1, 0xc(%rsp)
callq 0x3084
movq 0x18(%rsp), %rsi
movss 0xc(%rsp), %xmm1
movq 0x20(%rsp), %rax
movq 0x30(%rsi), %rdx
leaq (%r14,%rbx,8), %rcx
movss 0x4(%rcx), %xmm0
ucomiss %xmm1, %xmm0
seta %cl
orb %cl, %bpl
testb $0x1, %bpl
cmovneq %r15, %rax
jne 0x31bd
movaps %xmm1, %xmm0
incq %r12
xorl %ebp, %ebp
movaps %xmm0, %xmm1
cmpq %rdx, %r12
jb 0x315d
jmp 0x31cf
movaps %xmm1, %xmm0
movq 0x10(%rsp), %rcx
incq %rcx
movaps %xmm0, %xmm1
cmpq $0x20, %rcx
jne 0x312c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: Parser::findOption(char)
BaseOption*
Parser::findOption(char shortOption) {

    // iterate over the array and search for the short option
    for(int index=0; index < options.size(); ++index) {

        BaseOption* option = options.at(index);

        if ( option->matches( shortOption ) )
            return option;

    }

    return NULL;

}

// Assembly:
movq 0x60(%rdi), %rcx
movq 0x68(%rdi), %rdx
subq %rcx, %rdx
je 0x3d7f
pushq %rbp
movq %rsp, %rbp
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
movq (%rcx,%rdi,8), %rax
cmpb %sil, 0x8(%rax)
je 0x3d7d
incq %rdi
cmpq %rdi, %rdx
jne 0x3d69
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: Parser::getOptionText[abi:cxx11](BaseOption*, char const*)
std::string
Parser::getOptionText(BaseOption* option, const char* separator) {

    std::string optionBase;

    if ( option->hasShortOption() ) {
        optionBase += "-";
        optionBase += option->getShortOption();
    }

    if ( option->hasLongOption() ) {

        if ( option->hasShortOption() )
            optionBase += separator;

        optionBase += "--" + option->getLongOption();
    }

    return optionBase;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
cmpb $0x0, 0x8(%rdx)
je 0x4515
leaq 0x2bc2(%rip), %rsi      # 0x70c2
movq %rbx, %rdi
callq 0x3340
movsbl 0x8(%r14), %esi
movq %rbx, %rdi
callq 0x3170
movq 0x18(%r14), %rdx
testq %rdx, %rdx
je 0x45e2
cmpb $0x0, 0x8(%r14)
je 0x4538
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3340
movq 0x18(%r14), %rdx
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%r14), %rsi
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x630c
leaq 0x2b6a(%rip), %rcx      # 0x70c1
leaq -0x68(%rbp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x3200
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x458e
movq %rsi, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x4599
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %r13, %rsi
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x3070
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x45cd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x45e2
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4611
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x4611
movq %rax, %r14
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x462d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x462d
jmp 0x462a
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x4641
movq (%r12), %rsi
incq %rsi
callq 0x31d0
movq %r14, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: BaseOption::bestMatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
int bestMatch(const std::string& lOption) const {

        // The idea is to determine the number of chars
        // that matches the requested option
        int matches = 0;

        // is greater don't waste time
        if ( lOption.size() > longOption.size() )
            return matches;

        for(int index=0; index < lOption.size(); ++index) {
            if ( std::tolower(lOption[index]) == std::tolower(longOption[index]) )
                matches++;
            else
                return matches;
        }

        return matches;

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rsi), %r15
leaq -0x1(%r15), %rax
xorl %ebx, %ebx
cmpq 0x18(%rdi), %rax
jae 0x549b
movq (%rsi), %r12
movq 0x10(%rdi), %r13
xorl %ebx, %ebx
movsbl (%r12,%rbx), %edi
callq 0x3260
movl %eax, %r14d
movsbl (%r13,%rbx), %edi
callq 0x3260
cmpl %eax, %r14d
jne 0x549b
incq %rbx
cmpq %rbx, %r15
jne 0x5473
movq %r15, %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: BaseOption::toLower(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::string toLower(const std::string& original) const {
        std::string lc = original;

        for(int index=0; index<lc.size(); ++index)
            lc[index] = std::tolower(lc[index]);

        return lc;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x630c
cmpq $0x0, 0x8(%rbx)
je 0x5821
xorl %r14d, %r14d
movq (%rbx), %r15
movsbl (%r15,%r14), %edi
callq 0x3260
movb %al, (%r15,%r14)
incq %r14
cmpq %r14, 0x8(%rbx)
ja 0x5807
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: bool canBeConvertedTo<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool canBeConvertedTo(const std::string& str) {

    T result;

    std::stringstream text(str);

    if ( text >> result )
        return true;
    else
        return false;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rsi
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq -0x1b8(%rbp), %rdi
movl $0x18, %edx
callq 0x32c0
leaq -0x1b8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3240
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x20(%rax,%rcx), %ebx
movq 0x3ee4(%rip), %rsi      # 0x9fb8
leaq -0x1b8(%rbp), %rdi
callq 0x3140
leaq -0x138(%rbp), %rdi
callq 0x3080
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x6101
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x31d0
testb $0x5, %bl
sete %al
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x3e9b(%rip), %rsi      # 0x9fb8
leaq -0x1b8(%rbp), %rdi
callq 0x3140
leaq -0x138(%rbp), %rdi
callq 0x3080
jmp 0x613a
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x614f
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fromString<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
T fromString(const std::string& str) {

    T result;

    std::stringstream text(str);

    text >> result;

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq -0x1a0(%rbp), %rdi
movl $0x18, %edx
callq 0x32c0
leaq -0x1a0(%rbp), %rdi
movq %rbx, %rsi
callq 0x3240
movq 0x3e14(%rip), %rsi      # 0x9fb8
leaq -0x1a0(%rbp), %rdi
callq 0x3140
leaq -0x120(%rbp), %rdi
callq 0x3080
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x3de1(%rip), %rsi      # 0x9fb8
leaq -0x1a0(%rbp), %rdi
callq 0x3140
leaq -0x120(%rbp), %rdi
callq 0x3080
jmp 0x61f4
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x6207
movq (%r15), %rsi
incq %rsi
callq 0x31d0
movq %r14, %rdi
callq 0x3320
nop
// File: /workspace/github_cpp_makefile_star2_O3/mgo1977[P]c---parsing-argument-options/./Parser.h
// Function: RangeNumberOption<int>::setValue(char const*)
void setValue(const char* readValue) {

        std::string fullRange = readValue;
        size_t pos = fullRange.find(",");

        std::string begin = fullRange.substr(0, pos); 
        std::string end;

        if ( fullRange.find(",", pos) != std::string::npos ) {
            end = fullRange.substr(pos + 1);
        }

        if ( end.size() != 0 ) {
            ListOption<T>::setValue(begin.c_str());
            ListOption<T>::setValue(end.c_str());
        } // if is 0 some error occur in the params

    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq -0x78(%rbp), %r15
leaq -0x58(%rbp), %rdx
movq %r15, %rdi
callq 0x5204
leaq 0x71e(%rip), %rsi       # 0x7270
movl $0x1, %ecx
movq %r15, %rdi
xorl %edx, %edx
callq 0x3310
movq %rax, %r14
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x31f0
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq 0x6e0(%rip), %rsi       # 0x7270
leaq -0x78(%rbp), %rdi
movl $0x1, %ecx
movq %r14, %rdx
callq 0x3310
cmpq $-0x1, %rax
je 0x6bf5
incq %r14
leaq -0x98(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movq %r14, %rdx
movq $-0x1, %rcx
callq 0x31f0
leaq -0x38(%rbp), %rdi
leaq -0x98(%rbp), %r14
movq %r14, %rsi
callq 0x3230
movq (%r14), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x6bf5
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x31d0
cmpq $0x0, -0x30(%rbp)
je 0x6c14
movq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x5d18
movq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x5d18
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x6c29
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c42
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c5b
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31d0
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6c70
movq %rax, %rbx
jmp 0x6ca1
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x6c88
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ca1
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq -0x68(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6cba
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3320
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/./CError.h
// Function: tools::operator<<(std::ostream&, tools::CException const&)
ostream& operator<<(ostream &io_os, const CException &exp)
{
	io_os << exp.what();
#ifdef _DEBUG
	io_os << " [" << exp._file << ":" << exp._line << "]";
#endif

#ifndef _WIN32
	io_os << exp._message ;
#endif
	return io_os;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
testq %rax, %rax
je 0x3f38
movq %rax, %r15
movq %rax, %rdi
callq 0x3130
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3320
jmp 0x3f4f
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x34e0
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x3320
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::~CAksFileTransfert()
CAksFileTransfert::~CAksFileTransfert()
{
	if (_EDSKFile != NULL)
		delete _EDSKFile;
	if (_inStream != NULL)
		delete _inStream;
	if (_outStream != NULL)
		delete _outStream;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x11983(%rip), %rax     # 0x15b28
movq %rax, (%rdi)
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x41ba
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x41cc
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x41de
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x78(%rbx), %rdi
leaq 0x88(%rbx), %rax
cmpq %rax, %rdi
je 0x41f9
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq 0x48(%rbx), %rdi
leaq 0x58(%rbx), %rax
cmpq %rax, %rdi
je 0x4211
movq (%rax), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
popq %rbx
jmp 0x544c
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::GetFilename[abi:cxx11]() const
std::string CAksFileTransfert::GetFilename() const
{
	if (_filename.size() != 0)
		return _filename;
	#ifdef _WIN32
		const char* pathseparator = "\\";
	#else
		const char* pathseparator = "/";
	#endif
	std::string result = _filepath;
	result += pathseparator;
	result += (char*)_amsFilename;
	
	int i = result.size();
	while(result[--i] == ' ');
	result.resize(i + 1);
	
	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %rdx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
testq %rdx, %rdx
je 0x4272
movq 0x48(%r14), %rsi
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3f74
jmp 0x42e8
movq 0x78(%r14), %rsi
movq 0x80(%r14), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3f74
leaq 0xc325(%rip), %rsi      # 0x105b4
movq %rbx, %rdi
callq 0x3550
addq $0x68, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3550
movslq 0x8(%rbx), %rcx
movq (%rbx), %rax
addq %rcx, %rax
decq %rax
shlq $0x20, %rcx
movabsq $0x100000000, %rsi      # imm = 0x100000000
addq %rcx, %rsi
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rcx, %rsi
cmpb $0x20, (%rax)
leaq -0x1(%rax), %rax
je 0x42ce
sarq $0x20, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x30f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
jmp 0x42f3
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4309
movq (%r15), %rsi
incq %rsi
callq 0x32d0
movq %r14, %rdi
callq 0xce30
nop
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::Run(bool)
CAksCommand CAksFileTransfert::Run(bool wait)
{
	CAksCommand cmd = GetCommand(wait);

	switch(cmd)
	{
	case AksTestComunication :	{ TestComunication(cmd);	break; }
	case AksEndTransfert :		{ EndTransfert(cmd);		break; }
	case AksSend:				{ Send(cmd);				break; }
	case AksSendFileSize:		{ SendFileSize(cmd);		break; }
	case AksSendFilename:		{ SendFilename(cmd);		break; }
	case AksRewind:				{ Rewind(cmd);				break; }
	case AksCreateFile:			{ CreateFile(cmd);			break; }
	case AksAddData:			{ AddData(cmd);				break; }
	case AksCloseFile:			{ CloseFile(cmd);			break; }
	case AksInitDSK:			{ InitDSK(cmd);				break; }
	case AksWaitTrack:			{ WaitTrack(cmd);			break; }
	case AksNoMoreTrack:		{ NoMoreTrack(cmd);			break; }
	case AksOpenFile:			{ OpenFile(cmd);			break; }
	default: assert(false);
	}

	return cmd;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x446a
movl %eax, %ebx
movl %eax, 0x4(%rsp)
leal -0xf0(%rbx), %eax
cmpl $0xc, %eax
ja 0x444b
leaq 0xbe3a(%rip), %rcx      # 0x1017c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0xf0, %ebx
jne 0x4441
movq %r14, %rdi
callq 0x5212
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x4ffe
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x47bc
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x50bc
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x4b98
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x462c
jmp 0x4441
cmpl $0xf3, %ebx
jne 0x4441
movq 0xa0(%r14), %rdi
testq %rdi, %rdi
je 0x4441
xorl %esi, %esi
xorl %edx, %edx
callq 0x33f0
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x4a1c
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x46b0
jmp 0x4441
cmpl $0xf5, %ebx
jne 0x4441
leaq 0x68(%r14), %rsi
movl $0xc, %edx
movq %r14, %rdi
callq 0x55f0
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x48cc
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x4c76
jmp 0x4441
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x4b14
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xc164(%rip), %rdi      # 0x105b6
leaq 0xc163(%rip), %rsi      # 0x105bc
leaq 0xc172(%rip), %rcx      # 0x105d2
movl $0x8b, %edx
callq 0x31b0
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::GetCommand(bool)
CAksCommand CAksFileTransfert::GetCommand(bool wait)
{
  //Read the command code
	unsigned char command;
	bool readed = false;
	if (wait)
	{
		ReadWaitByte(command);
		readed = true;
	}
	else
	{
		readed = ReadByte(command);
	}
	
  //Check its validity
	if (readed)
	{
		if (command > AksMinCommand && command < AksMaxCommand)
		{
			std::cout << "Command #" << std::hex << (int)command << std::dec << " : " << AksCommandShortDesc[command-(AksMinCommand+1)] << std::endl;

			return ((CAksCommand)command);
		}
		else
		{
			std::cout << "Unknown command received : 0x" << std::hex << (int)command << std::endl;
			return AksUnknownCommand;
		}
	}
	else
	{
		std::cout << "Unknown command not wait" << std::endl;

		return AksUnknownCommand;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
je 0x447e
leaq 0x7(%rsp), %rsi
callq 0x54d2
jmp 0x4490
leaq 0x7(%rsp), %rsi
callq 0x54fa
testl %eax, %eax
je 0x457d
movb 0x7(%rsp), %al
addb $0x10, %al
movq 0x11b2b(%rip), %rbx     # 0x15fc8
cmpb $0xc, %al
ja 0x453f
leaq 0xc14f(%rip), %rsi      # 0x105fb
movl $0x9, %edx
movq %rbx, %rdi
callq 0x3320
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movzbl 0x7(%rsp), %esi
movq %rbx, %rdi
callq 0x3500
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0xc495(%rip), %rsi      # 0x1098f
movl $0x3, %edx
movq %rbx, %rdi
callq 0x3320
movzbl 0x7(%rsp), %eax
leaq 0x11e9d(%rip), %rcx     # 0x163b0
movq -0x780(%rcx,%rax,8), %r14
testq %r14, %r14
je 0x45c3
movq %r14, %rdi
callq 0x3130
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3320
jmp 0x45dc
leaq 0xc0bf(%rip), %rsi      # 0x10605
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x3320
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movzbl 0x7(%rsp), %esi
movq %rbx, %rdi
callq 0x3500
movq %rax, %rbx
movq (%rax), %rax
jmp 0x459b
movq 0x11a44(%rip), %rbx     # 0x15fc8
leaq 0xc098(%rip), %rsi      # 0x10623
movl $0x18, %edx
movq %rbx, %rdi
callq 0x3320
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
xorl %eax, %eax
jmp 0x4608
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x34e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movzbl 0x7(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::EndTransfert(CAksCommand const&)
bool CAksFileTransfert::EndTransfert(const CAksCommand &cmd)
{
	if (cmd != AksEndTransfert)
		return false;

	if (_EDSKFile != NULL)
		delete _EDSKFile;
	_EDSKFile = NULL;
	if (_inStream != NULL)
		delete _inStream;
	_inStream = NULL;
	if (_outStream != NULL)
		delete _outStream;
	_outStream = NULL;

	if (_transferingData)
	{
		_nbTransfert++;
		_transferingData = false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl (%rsi), %ebp
cmpl $0xf2, %ebp
jne 0x46a0
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x464e
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x98(%rbx)
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x466b
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xa0(%rbx)
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x4688
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xa8(%rbx)
cmpb $0x1, 0x40(%rbx)
jne 0x46a0
incl 0x3c(%rbx)
movb $0x0, 0x40(%rbx)
cmpl $0xf2, %ebp
sete %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::Send(CAksCommand const&)
bool CAksFileTransfert::Send(const CAksCommand &cmd)
{
	if (cmd != AksSend)
		return false;
	
	_transferingData = true;

	// Read a word, send word bytes
	unsigned short s;
	ReadWaitWord(s);

	std::cout << "Read word " << std::hex << (int)s << std::dec << std::endl;

	int size = (s != 0) ? s : 0x10000;

	if (_inStream != NULL)
	{
		unsigned char *buffer = new unsigned char [size];
	
		_inStream->read((char*)buffer, size);

		WriteBuffer(buffer, size);
		
		delete[] buffer;

		return true;
	}
	
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpl $0xf1, (%rsi)
jne 0x47ab
movq %rdi, %rbx
movb $0x1, 0x40(%rdi)
leaq 0xe(%rsp), %r14
movq %r14, %rsi
callq 0x5518
movq 0x118e5(%rip), %r15     # 0x15fc8
leaq 0xbf62(%rip), %rsi      # 0x1064c
movl $0xa, %edx
movq %r15, %rdi
callq 0x3320
movq (%r15), %rax
movq -0x18(%rax), %rax
movl 0x18(%r15,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r15,%rax)
movzwl (%r14), %esi
movq %r15, %rdi
callq 0x3500
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r14,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%r14,%rcx)
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movq 0xa0(%rbx), %r14
testq %r14, %r14
setne %bpl
je 0x47ad
movzwl 0xe(%rsp), %eax
testq %rax, %rax
movl $0x10000, %r15d         # imm = 0x10000
cmovneq %rax, %r15
movq %r15, %rdi
callq 0x3030
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x3380
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x55f0
movq %r12, %rdi
callq 0x33b0
jmp 0x47ad
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::SendFileSize(CAksCommand const&)
bool CAksFileTransfert::SendFileSize(const CAksCommand &cmd)
{
	if (cmd != AksSendFileSize)
		return false;

	int fileSize = 0;
	
	if (_inStream != NULL)
	{
		std::streampos pos = _inStream->tellg();
		
		_inStream->seekg(0,std::ios::end);
		fileSize = _inStream->tellg();
		_inStream->seekg(pos);
	}

	unsigned char c;
	c = (fileSize >> 0) & 0xFF;
	WriteByte(c);
	c = (fileSize >> 8) & 0xFF;
	WriteByte(c);
	c = (fileSize >> 16) & 0xFF;
	WriteByte(c);
	c = (fileSize >> 24) & 0xFF;
	WriteByte(c);

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl (%rsi), %ebp
cmpl $0xf4, %ebp
jne 0x486a
movq %rdi, %rbx
movq 0xa0(%rdi), %rdi
testq %rdi, %rdi
je 0x4822
callq 0x3510
movq %rax, %r15
movq %rdx, %r12
movq 0xa0(%rbx), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x33f0
movq 0xa0(%rbx), %rdi
callq 0x3510
movq %rax, %r14
movq 0xa0(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x33a0
jmp 0x4825
xorl %r14d, %r14d
movl $0xff, %r15d
movl %r14d, %esi
andl %r15d, %esi
movq %rbx, %rdi
callq 0x5508
movl %r14d, %esi
shrl $0x8, %esi
andl %r15d, %esi
movq %rbx, %rdi
callq 0x5508
movl %r14d, %esi
shrl $0x10, %esi
andl %r15d, %esi
movq %rbx, %rdi
callq 0x5508
shrl $0x18, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5508
cmpl $0xf4, %ebp
sete %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::Rewind(CAksCommand const&)
bool CAksFileTransfert::Rewind(const CAksCommand &cmd)
{
	if (cmd != AksRewind)
		return false;

	if (_inStream != NULL)
	{
		_inStream->seekg(0,std::ios::beg);
	}

	return true;
}

// Assembly:
pushq %rbx
movl (%rsi), %ebx
cmpl $0xf3, %ebx
jne 0x48c0
movq 0xa0(%rdi), %rdi
testq %rdi, %rdi
je 0x48c0
xorl %esi, %esi
xorl %edx, %edx
callq 0x33f0
cmpl $0xf3, %ebx
sete %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::CreateFile(CAksCommand const&)
bool CAksFileTransfert::CreateFile(const CAksCommand &cmd)
{
	if (cmd != AksCreateFile)
		return false;

	ReadWaitBuffer(_amsFilename, 12);
	_amsFilename[12] = 0;

	std::cout << "Filename " << _amsFilename << std::endl;

	if (_outStream != NULL)
		delete _outStream;

	_outStream = new std::ofstream(GetFilename().c_str(), std::ios::binary);

	if (_outStream->good())
	{
		Acknowledge();
		return true;
	}
	else
	{
		NotAcknowledge();
		return false;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpl $0xf6, (%rsi)
jne 0x49cc
movq %rdi, %rbx
leaq 0x68(%rdi), %r15
movl $0xc, %edx
movq %r15, %rsi
callq 0x55a4
movb $0x0, 0x74(%rbx)
movq 0x116c8(%rip), %r14     # 0x15fc8
leaq 0xbd50(%rip), %rsi      # 0x10657
movl $0x9, %edx
movq %r14, %rdi
callq 0x3320
movq %r15, %rdi
callq 0x3130
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x3320
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x4963
movq (%rdi), %rax
callq *0x8(%rax)
movl $0x200, %edi            # imm = 0x200
callq 0x32c0
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x4246
movq (%rsp), %rsi
movq %r14, %rdi
movl $0x4, %edx
callq 0x3300
movq %r14, 0xa8(%rbx)
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49b5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0xa8(%rbx), %r14
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
je 0x49d8
movq %rbx, %rdi
callq 0x5270
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x5212
movb $0x1, %al
jmp 0x49ce
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a07
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32d0
jmp 0x4a07
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0xce30
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::AddData(CAksCommand const&)
bool CAksFileTransfert::AddData(const CAksCommand &cmd)
{
	if (cmd != AksAddData)
		return false;

	_transferingData = true;

	unsigned short size;

	ReadWaitWord(size);
	
	std::cout << "Read word " << std::hex << (int)size << std::dec << std::endl;

	unsigned char *buffer = new unsigned char[size];

	ReadWaitBuffer(buffer, size);

	if (_outStream != NULL)
	{
		_outStream->write((char*)buffer, size);
	}

	delete[] buffer;

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl (%rsi), %ebp
cmpl $0xf7, %ebp
jne 0x4aff
movq %rdi, %rbx
movb $0x1, 0x40(%rdi)
leaq 0x6(%rsp), %r14
movq %r14, %rsi
callq 0x5518
movq 0x1157c(%rip), %r15     # 0x15fc8
leaq 0xbbf9(%rip), %rsi      # 0x1064c
movl $0xa, %edx
movq %r15, %rdi
callq 0x3320
movq (%r15), %rax
movq -0x18(%rax), %rax
movl 0x18(%r15,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r15,%rax)
movzwl (%r14), %esi
movq %r15, %rdi
callq 0x3500
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r15,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%r15,%rcx)
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3290
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31d0
movzwl (%r14), %r15d
movq %r15, %rdi
callq 0x3030
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x55a4
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x4af7
movzwl 0x6(%rsp), %edx
movq %r14, %rsi
callq 0x33c0
movq %r14, %rdi
callq 0x33b0
cmpl $0xf7, %ebp
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::CloseFile(CAksCommand const&)
bool CAksFileTransfert::CloseFile(const CAksCommand &cmd)
{
	if (cmd != AksCloseFile)
		return false;

	if (_EDSKFile != NULL)
		delete _EDSKFile;
	_EDSKFile = NULL;
	if (_inStream != NULL)
		delete _inStream;
	_inStream = NULL;
	if (_outStream != NULL)
		delete _outStream;
	_outStream = NULL;

	if (_transferingData)
	{
		_nbTransfert ++;
		_transferingData = false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl (%rsi), %ebp
cmpl $0xf8, %ebp
jne 0x4b88
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x4b36
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x98(%rbx)
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x4b53
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xa0(%rbx)
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x4b70
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xa8(%rbx)
cmpb $0x1, 0x40(%rbx)
jne 0x4b88
incl 0x3c(%rbx)
movb $0x0, 0x40(%rbx)
cmpl $0xf8, %ebp
sete %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::InitDSK(CAksCommand const&)
bool CAksFileTransfert::InitDSK(const CAksCommand &cmd)
{
	if (cmd != AksInitDSK)
		return false;

	_transferingData = true;

	if (_EDSKFile != NULL)
		delete _EDSKFile;

	if (_outStream != NULL)
		delete _outStream;
	_outStream = NULL;

	unsigned char nbTrack;
	unsigned char nbSide;
	unsigned char creator[2];
	
	ReadWaitByte(creator[0]);
	ReadWaitByte(creator[1]);
	ReadWaitByte(nbTrack);
	ReadWaitByte(nbSide);

	_EDSKFile = new CExtendedDSKFile(nbTrack, nbSide);

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl (%rsi), %ebp
cmpl $0xf9, %ebp
jne 0x4c47
movq %rdi, %rbx
movb $0x1, 0x40(%rdi)
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x4bcb
movq (%rdi), %rax
callq *0x8(%rax)
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x4bdd
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0xa8(%rbx)
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x54d2
leaq 0xd(%rsp), %rsi
movq %rbx, %rdi
callq 0x54d2
leaq 0xf(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x54d2
leaq 0xe(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x54d2
movl $0x120, %edi            # imm = 0x120
callq 0x32c0
movq %rax, %r14
movzbl (%r15), %esi
movzbl (%r12), %edx
movq %rax, %rdi
callq 0x77c8
movq %r14, 0x98(%rbx)
cmpl $0xf9, %ebp
sete %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x120, %esi            # imm = 0x120
movq %r14, %rdi
callq 0x32d0
movq %rbx, %rdi
callq 0xce30
nop
// File: /workspace/github_cpp_makefile_star2_O3/pelrun[P]aft/CAksFileTransfert.cpp
// Function: CAksFileTransfert::NoMoreTrack(CAksCommand const&)
bool CAksFileTransfert::NoMoreTrack(const CAksCommand &cmd)
{
	if (cmd != AksNoMoreTrack)
		return false;

	// Release EDSK file
	if (_EDSKFile != NULL)
	{
		_EDSKFile->SaveDSKFile(GetFilename());

		delete _EDSKFile;
		_EDSKFile = NULL;
	}

	if (_transferingData)
	{
		_nbTransfert ++;
		_transferingData = false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl (%rsi), %ebp
cmpl $0xfb, %ebp
jne 0x5081
movq %rdi, %rbx
movq 0x98(%rdi), %r14
testq %r14, %r14
je 0x5074
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4246
movq %r14, %rdi
movq %r15, %rsi
callq 0x72a8
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5057
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x5069
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x98(%rbx)
cmpb $0x1, 0x40(%rbx)
jne 0x5081
incl 0x3c(%rbx)
movb $0x0, 0x40(%rbx)
cmpl $0xfb, %ebp
sete %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x50b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32d0
movq %rbx, %rdi
callq 0xce30
nop