LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Tree.hpp
// Function: evolve::tree::TreeFactory<int>::addTerminator(int (*)(), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void addTerminator(Rtype (*f)(), const std::string& name) {
        const auto val = currentID;
        std::function<BaseNode<Rtype>*()> func = [f, name, val]() {
            return new Terminator<std::function<Rtype()>>(f, name, val);
        };
        terminators[currentID++] = func;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movl 0x4(%rdi), %r15d
leaq -0x60(%rbp), %r14
movq %rsi, -0x8(%r14)
movq %r14, %rdi
movq %rdx, %rsi
callq 0x2190
movl %r15d, 0x20(%r14)
leaq -0x38(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x480a
movq %r14, %rdi
callq 0x2090
leaq 0x38(%rbx), %rdi
movl 0x4(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%rbx)
leaq -0x68(%rbp), %rsi
movl %eax, (%rsi)
callq 0x384a
leaq -0x38(%rbp), %rsi
movq %rax, %rdi
callq 0x389c
leaq -0x38(%rbp), %rdi
callq 0x5e42
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x2090
jmp 0x2a55
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x5e42
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Crossover.hpp
// Function: evolve::tree::Tree<int>* evolve::tree::crossover::singlePoint<int>(evolve::tree::Tree<int> const*, evolve::tree::Tree<int> const*)
Tree<T>* singlePoint(const Tree<T>* left, const Tree<T>* right) {
    auto tree = left->clone(); // Copy left

    auto treeDepth = right->getDepth();
    auto depth = utils::random_uint(treeDepth);

    auto sourceNode = right->root; // Crossover from the right to the left
    BaseNode<T>* prevSourceNode = nullptr;

    for (unsigned int i = 0; i < depth; ++i) {
        if (sourceNode->getChildren().empty()) {
            sourceNode = prevSourceNode; // Do not copy terminators
            break;
        }
        prevSourceNode = sourceNode;
        sourceNode = sourceNode->getChildren()[utils::random_uint(
            sourceNode->getChildren().size())];
    }

    auto currentNode = tree->root;
    BaseNode<T>* prevNode = nullptr;

    for (unsigned int i = 0; i < depth; ++i) {
        prevNode = currentNode;
        auto nextNodeLocation =
            utils::random_uint(currentNode->getChildren().size());
        currentNode = currentNode->getChildren()[nextNodeLocation];

        if (sourceNode->getDepth() == currentNode->getDepth()) {
            auto& children = prevNode->getChildren();
            delete currentNode;
            children[nextNodeLocation] = sourceNode->clone();
            break;
        } else if (currentNode->getChildren().empty()) {
            break; // This point should never be reached
        }
    }

    return tree;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
callq 0x4c86
movq %rax, %r15
movq %r12, %rdi
callq 0x4cc2
movl %eax, %edi
callq 0x23b3
movq %rax, %r13
xorl %ebx, %ebx
xorl %ecx, %ecx
movq (%r12), %r14
movl %ebx, %eax
cmpq %rax, %r13
jbe 0x2b1d
movq 0x8(%r14), %rax
movq 0x10(%r14), %rdi
cmpq %rdi, %rax
je 0x2b20
subq %rax, %rdi
sarq $0x3, %rdi
callq 0x23b3
movq %rax, %r12
shlq $0x3, %r12
addq 0x8(%r14), %r12
incl %ebx
movq %r14, %rcx
jmp 0x2ae7
movq %r14, %rcx
movq %rcx, -0x38(%rbp)
movq %r15, -0x40(%rbp)
movq (%r15), %r14
xorl %r15d, %r15d
movl %r15d, %eax
cmpq %rax, %r13
jbe 0x2b9f
movq %r13, %rbx
movq 0x10(%r14), %rdi
subq 0x8(%r14), %rdi
sarq $0x3, %rdi
callq 0x23b3
movq %rax, %r12
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %r13
movq -0x38(%rbp), %rdi
callq 0x4cd0
movl %eax, -0x2c(%rbp)
movq %r13, %rdi
callq 0x4cd0
cmpl %eax, -0x2c(%rbp)
je 0x2b83
movq 0x8(%r13), %rax
incl %r15d
movq %r13, %r14
cmpq 0x10(%r13), %rax
movq %rbx, %r13
jne 0x2b2e
jmp 0x2b9f
movq (%r13), %rax
movq %r13, %rdi
callq *0x8(%rax)
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x8(%r14), %rcx
movq %rax, (%rcx,%r12,8)
movq -0x40(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Mutator.hpp
// Function: void evolve::tree::mutator::randomNode<int>(evolve::tree::Tree<int>*, evolve::tree::TreeFactory<int> const&)
void randomNode(Tree<T>* tree, const TreeFactory<T>& factory) {
    auto treeDepth = tree->getDepth();
    auto depth = utils::random_uint(treeDepth);

    auto currentNode = tree->root;
    BaseNode<T>* prevNode = nullptr;

    for (unsigned int i = 0; i < depth; ++i) {
        prevNode = currentNode;
        auto nodeLocation =
            utils::random_uint(currentNode->getChildren().size());
        currentNode = currentNode->getChildren()[nodeLocation];

        if (currentNode->getChildren().empty()) {
            auto& children = prevNode->getChildren();
            delete currentNode;
            children[nodeLocation] = factory.createRandomTerminator();
            return;
        }
    }

    auto childValue = utils::random_uint(currentNode->getChildren().size());
    auto nodeDepth = currentNode->getChildren()[childValue]->getDepth();
    delete currentNode->getChildren()[childValue];

    currentNode->getChildren()[childValue] =
        factory.createRandomSubTree(nodeDepth - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
callq 0x4cc2
movl %eax, %edi
callq 0x23b3
movq %rax, %r15
movq (%r14), %rdi
xorl %r13d, %r13d
movq %rdi, %r12
movl %r13d, %ebx
movq 0x10(%rdi), %rdi
subq 0x8(%r12), %rdi
sarq $0x3, %rdi
callq 0x23b3
movq %rax, %r14
movq 0x8(%r12), %rax
movq (%rax,%r14,8), %rdi
cmpq %rbx, %r15
jbe 0x2c27
movq 0x8(%rdi), %rax
incl %r13d
cmpq 0x10(%rdi), %rax
jne 0x2bdc
addq $0x8, %r12
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x4d44
jmp 0x2c56
callq 0x4cd0
movl %eax, %r15d
movq 0x8(%r12), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x2c43
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r12
decl %r15d
movq -0x30(%rbp), %rdi
movl %r15d, %esi
callq 0x4d7c
movq (%r12), %rcx
movq %rax, (%rcx,%r14,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Tree.hpp
// Function: evolve::tree::Node<std::function<int (int, int)>>::clone() const
virtual BaseNode<typename Genome::result_type>* clone() const {
        auto node = new Node<Genome>(val, this->name, this->ID);
        for (auto child : this->children) {
            node->children.push_back(child->clone());
        }
        return node;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
pushq $0x68
popq %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x48(%r14), %rsi
leaq -0x50(%rbp), %rdi
callq 0x3b04
leaq 0x20(%r14), %rdx
movl 0x40(%r14), %ecx
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x3a34
leaq -0x50(%rbp), %rdi
callq 0x5e42
movq 0x8(%r14), %r12
movq 0x10(%r14), %r13
movq %rbx, %r14
addq $0x8, %r14
leaq -0x30(%rbp), %r15
cmpq %r13, %r12
je 0x3c70
movq (%r12), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, -0x30(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3e14
addq $0x8, %r12
jmp 0x3c4c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x5e42
jmp 0x3c93
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Tree.hpp
// Function: evolve::tree::Terminator<std::function<int ()>>::clone() const
virtual BaseNode<typename Genome::result_type>* clone() const {
        auto node = new Terminator<Genome>(val, this->name, this->ID);
        for (auto child : this->children) {
            node->children.push_back(child->clone());
        }
        return node;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
pushq $0x68
popq %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x48(%r14), %rsi
leaq -0x50(%rbp), %rdi
callq 0x4a00
leaq 0x20(%r14), %rdx
movl 0x40(%r14), %ecx
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x498a
leaq -0x50(%rbp), %rdi
callq 0x5e42
movq 0x8(%r14), %r12
movq 0x10(%r14), %r13
movq %rbx, %r14
addq $0x8, %r14
leaq -0x30(%rbp), %r15
cmpq %r13, %r12
je 0x4b22
movq (%r12), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %rax, -0x30(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3e14
addq $0x8, %r12
jmp 0x4afe
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x5e42
jmp 0x4b45
movq %rax, %r14
movq %rbx, %rdi
callq 0x2140
movq %r14, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Tree.hpp
// Function: evolve::tree::BaseNode<int>::getDepth() const
unsigned int getDepth() const {
        unsigned int max = 0;
        for (auto child : children) {
            auto depth = child->getDepth();
            if (depth > max)
                max = depth;
        }
        return max + 1;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r15
xorl %ebx, %ebx
cmpq %r15, %r14
je 0x4cfc
movq (%r14), %rdi
callq 0x4cd0
cmpl %ebx, %eax
cmoval %eax, %ebx
addq $0x8, %r14
jmp 0x4ce4
incl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Tree.hpp
// Function: evolve::tree::TreeFactory<int>::createRandomSubTree(unsigned int) const
BaseNode<Rtype>* createRandomSubTree(unsigned int depth = 5) const {

        BaseNode<Rtype>* root = nullptr;

        if (depth == 0) {
            root = createRandomTerminator();
        } else {
            root = createRandomNode();
            for (unsigned int i = 0; i < root->getNumChildren(); ++i) {
                root->getChildren().push_back(createRandomSubTree(depth - 1));
            }
        }
        return root;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x4dec
movl %esi, %r14d
movq %rbx, %rdi
callq 0x4e88
movq %rax, %r15
movq %rax, %r12
addq $0x8, %r12
decl %r14d
xorl %r13d, %r13d
movq (%r15), %rax
movq %r15, %rdi
callq *0x20(%rax)
cmpl %eax, %r13d
jae 0x4dda
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4d7c
movq %rax, -0x30(%rbp)
movq %r12, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3e14
incl %r13d
jmp 0x4dac
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4d44
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Selector.hpp
// Function: void evolve::selector::details::topHelper<evolve::tree::Tree<int>*, 10ul, (evolve::Ordering)1>(std::vector<evolve::tree::Tree<int>*, std::allocator<evolve::tree::Tree<int>*>>&, std::function<float (evolve::tree::Tree<int>* const&)> const&, std::integral_constant<bool, true>)
void topHelper(std::vector<Genome>& population,
               const std::function<float(const Genome&)>& evaluator,
               std::true_type) {
    orderedSort(population, evaluator, Ord);

    auto location = population.begin();
    std::advance(location, Num);

    // Assume the pointer points to dynamically allocated memory
    for (auto iter = location; iter != population.end(); ++iter) {
        delete *iter;
    }

    population.erase(location, population.end());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rdx
callq 0x4f58
movq (%rbx), %r14
addq $0x50, %r14
movq %r14, %r12
movq 0x8(%rbx), %rdx
cmpq %rdx, %r12
je 0x4f45
movq (%r12), %r15
testq %r15, %r15
je 0x4f37
movq (%r15), %rdi
testq %rdi, %rdi
je 0x4f37
movq (%rdi), %rax
callq *0x8(%rax)
movq %r15, %rdi
callq 0x2140
addq $0x8, %r12
jmp 0x4f17
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4f7c
// File: /workspace/github_cpp_makefile_star2_O2/ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Tree.hpp
// Function: std::ostream& evolve::tree::operator<<<int>(std::ostream&, evolve::tree::BaseNode<int> const&)
std::ostream& operator<<(std::ostream& out, const BaseNode<T>& node) {
    out << node.name;

    if (!node.children.empty()) {
        out << "(";
        for (unsigned int i = 0; i < node.children.size() - 1; ++i)
            out << *(node.children[i]) << ", ";

        out << *node.children[node.children.size() - 1] << ")";
    }
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
addq $0x20, %rsi
callq 0x2130
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
je 0x6656
leaq 0xd67(%rip), %rsi       # 0x7357
movq %rbx, %rdi
callq 0x2150
xorl %eax, %eax
leaq 0xe0c(%rip), %r15       # 0x740d
movl %eax, %r12d
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
leaq -0x1(%rcx), %rdx
cmpq %r12, %rdx
jbe 0x663a
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x65c5
movq %rax, %rdi
movq %r15, %rsi
callq 0x2150
leal 0x1(%r12), %eax
jmp 0x6601
movq -0x8(%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x65c5
leaq 0xd4e(%rip), %rsi       # 0x739c
movq %rax, %rdi
callq 0x2150
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: readQuantizationTable(BitReader&, JPGImage*)
void readQuantizationTable(BitReader& bitReader, JPGImage* const image) {
    std::cout << "Reading DQT Marker\n";
    int length = bitReader.readWord();
    length -= 2;

    while (length > 0) {
        byte tableInfo = bitReader.readByte();
        length -= 1;
        byte tableID = tableInfo & 0x0F;

        if (tableID > 3) {
            std::cout << "Error - Invalid quantization table ID: " << (uint)tableID << '\n';
            image->valid = false;
            return;
        }
        QuantizationTable& qTable = image->quantizationTables[tableID];
        qTable.set = true;

        if (tableInfo >> 4 != 0) {
            for (uint i = 0; i < 64; ++i) {
                qTable.table[zigZagMap[i]] = bitReader.readWord();
            }
            length -= 128;
        }
        else {
            for (uint i = 0; i < 64; ++i) {
                qTable.table[zigZagMap[i]] = bitReader.readByte();
            }
            length -= 64;
        }
    }

    if (length != 0) {
        std::cout << "Error - DQT invalid\n";
        image->valid = false;
        return;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x68ff(%rip), %rdi      # 0x8fd8
leaq 0x3b36(%rip), %rsi      # 0x6216
callq 0x20e0
movq %r14, %rdi
callq 0x4fd4
movl %eax, %ebp
addl $-0x2, %ebp
leaq 0x3957(%rip), %r13      # 0x6050
testl %ebp, %ebp
jle 0x2776
movq %r14, %rdi
callq 0x5000
movl %eax, %ecx
andb $0xf, %cl
movzbl %cl, %r15d
cmpb $0x4, %cl
jae 0x278d
imulq $0x104, %r15, %rcx      # imm = 0x104
leaq (%rbx,%rcx), %r15
movb $0x1, 0x100(%rbx,%rcx)
xorl %r12d, %r12d
cmpb $0x10, %al
jae 0x274c
cmpq $0x40, %r12
je 0x2768
movq %r14, %rdi
callq 0x5000
movzbl %al, %eax
movzbl (%r12,%r13), %ecx
movl %eax, (%r15,%rcx,4)
incq %r12
jmp 0x272d
cmpq $0x40, %r12
je 0x276d
movq %r14, %rdi
callq 0x4fd4
movzbl (%r12,%r13), %ecx
movl %eax, (%r15,%rcx,4)
incq %r12
jmp 0x274c
pushq $-0x41
popq %rax
jmp 0x2772
movl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
addl %eax, %ebp
jmp 0x26f9
je 0x27bd
movq 0x6859(%rip), %rdi      # 0x8fd8
leaq 0x3aa4(%rip), %rsi      # 0x622a
callq 0x20e0
jmp 0x27b6
movq 0x6844(%rip), %rdi      # 0x8fd8
leaq 0x3a3e(%rip), %rsi      # 0x61d9
callq 0x20e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x20a0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x2120
movb $0x0, 0x2088(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: readHuffmanTable(BitReader&, JPGImage*)
void readHuffmanTable(BitReader& bitReader, JPGImage* const image) {
    std::cout << "Reading DHT Marker\n";
    int length = bitReader.readWord();
    length -= 2;

    while (length > 0) {
        byte tableInfo = bitReader.readByte();
        byte tableID = tableInfo & 0x0F;
        bool acTable = tableInfo >> 4;

        if (tableID > 3) {
            std::cout << "Error - Invalid Huffman table ID: " << (uint)tableID << '\n';
            image->valid = false;
            return;
        }

        HuffmanTable& hTable = (acTable) ?
            (image->huffmanACTables[tableID]) :
            (image->huffmanDCTables[tableID]);
        hTable.set = true;

        hTable.offsets[0] = 0;
        uint allSymbols = 0;
        for (uint i = 1; i <= 16; ++i) {
            allSymbols += bitReader.readByte();
            hTable.offsets[i] = allSymbols;
        }
        if (allSymbols > 176) {
            std::cout << "Error - Too many symbols in Huffman table: " << allSymbols << '\n';
            image->valid = false;
            return;
        }

        for (uint i = 0; i < allSymbols; ++i) {
            hTable.symbols[i] = bitReader.readByte();
        }

        generateCodes(hTable);

        length -= 17 + allSymbols;
    }

    if (length != 0) {
        std::cout << "Error - DHT invalid\n";
        image->valid = false;
        return;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x67bd(%rip), %rdi      # 0x8fd8
leaq 0x3a1d(%rip), %rsi      # 0x623f
callq 0x20e0
movq %r14, %rdi
callq 0x4fd4
movl %eax, %ebp
addl $-0x2, %ebp
leaq 0x1230(%rbx), %rax
movq %rax, 0x10(%rsp)
movq %rbx, (%rsp)
leaq 0x410(%rbx), %rax
movq %rax, 0x8(%rsp)
testl %ebp, %ebp
jle 0x28ef
movq %r14, %rdi
callq 0x5000
movl %eax, %ecx
andb $0xf, %cl
movzbl %cl, %r15d
cmpb $0x4, %cl
jae 0x2906
imulq $0x388, %r15, %rcx      # imm = 0x388
cmpb $0x10, %al
movq 0x10(%rsp), %rax
cmovbq 0x8(%rsp), %rax
leaq (%rax,%rcx), %r15
movb $0x1, 0x384(%rax,%rcx)
movb $0x0, (%rax,%rcx)
xorl %ebx, %ebx
pushq $0x1
popq %r12
cmpq $0x11, %r12
je 0x28b8
movq %r14, %rdi
callq 0x5000
movzbl %al, %eax
addl %eax, %ebx
movb %bl, (%r15,%r12)
incq %r12
jmp 0x289c
movl %ebx, %r12d
cmpl $0xb0, %ebx
ja 0x2921
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x28dd
movq %r14, %rdi
callq 0x5000
movb %al, 0x11(%r15,%r13)
incq %r13
jmp 0x28c6
movq %r15, %rdi
callq 0x27cc
subl %ebx, %ebp
addl $-0x11, %ebp
jmp 0x2850
je 0x2955
movq 0x66e0(%rip), %rdi      # 0x8fd8
leaq 0x39a3(%rip), %rsi      # 0x62a2
callq 0x20e0
jmp 0x294a
movq 0x66cb(%rip), %rdi      # 0x8fd8
leaq 0x393f(%rip), %rsi      # 0x6253
callq 0x20e0
movq %rax, %rdi
movq %r15, %rsi
jmp 0x293a
movq 0x66b0(%rip), %rdi      # 0x8fd8
leaq 0x3947(%rip), %rsi      # 0x6276
callq 0x20e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x20a0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x2120
movq (%rsp), %rax
movb $0x0, 0x2088(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: readRestartInterval(BitReader&, JPGImage*)
void readRestartInterval(BitReader& bitReader, JPGImage* const image) {
    std::cout << "Reading DRI Marker\n";
    uint length = bitReader.readWord();

    image->restartInterval = bitReader.readWord();
    if (length - 4 != 0) {
        std::cout << "Error - DRI invalid\n";
        image->valid = false;
        return;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x626d(%rip), %rdi      # 0x8fd8
leaq 0x3835(%rip), %rsi      # 0x65a7
callq 0x20e0
movq %r14, %rdi
callq 0x4fd4
movl %eax, %ebp
movq %r14, %rdi
callq 0x4fd4
movl %eax, 0x2078(%rbx)
cmpl $0x4, %ebp
je 0x2dae
movq 0x623d(%rip), %rdi      # 0x8fd8
leaq 0x3819(%rip), %rsi      # 0x65bb
callq 0x20e0
movb $0x0, 0x2088(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: readAPPN(BitReader&, JPGImage*)
void readAPPN(BitReader& bitReader, JPGImage* const image) {
    std::cout << "Reading APPN Marker\n";
    uint length = bitReader.readWord();
    if (length < 2) {
        std::cout << "Error - APPN invalid\n";
        image->valid = false;
        return;
    }

    for (uint i = 0; i < length - 2; ++i) {
        bitReader.readByte();
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x6214(%rip), %rdi      # 0x8fd8
leaq 0x3805(%rip), %rsi      # 0x65d0
callq 0x20e0
movq %rbx, %rdi
callq 0x4fd4
cmpl $0x2, %eax
jae 0x2dfd
movq 0x61f4(%rip), %rdi      # 0x8fd8
leaq 0x37fa(%rip), %rsi      # 0x65e5
callq 0x20e0
movb $0x0, 0x2088(%r14)
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
addl $-0x2, %ebp
subl $0x1, %ebp
jb 0x2df8
movq %rbx, %rdi
callq 0x5000
jmp 0x2e02
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: readComment(BitReader&, JPGImage*)
void readComment(BitReader& bitReader, JPGImage* const image) {
    std::cout << "Reading COM Marker\n";
    uint length = bitReader.readWord();
    if (length < 2) {
        std::cout << "Error - COM invalid\n";
        image->valid = false;
        return;
    }

    for (uint i = 0; i < length - 2; ++i) {
        bitReader.readByte();
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x61b6(%rip), %rdi      # 0x8fd8
leaq 0x37d2(%rip), %rsi      # 0x65fb
callq 0x20e0
movq %rbx, %rdi
callq 0x4fd4
cmpl $0x2, %eax
jae 0x2e5b
movq 0x6196(%rip), %rdi      # 0x8fd8
leaq 0x37c6(%rip), %rsi      # 0x660f
callq 0x20e0
movb $0x0, 0x2088(%r14)
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %ebp
addl $-0x2, %ebp
subl $0x1, %ebp
jb 0x2e56
movq %rbx, %rdi
callq 0x5000
jmp 0x2e60
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: readJPG(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
JPGImage* readJPG(const std::string& filename) {
    // open file
    std::cout << "Reading " << filename << "...\n";
    BitReader bitReader(filename);
    if (!bitReader.hasBits()) {
        std::cout << "Error - Error opening input file\n";
        return nullptr;
    }

    JPGImage* image = new (std::nothrow) JPGImage;
    if (image == nullptr) {
        std::cout << "Error - Memory error\n";
        return nullptr;
    }

    readFrameHeader(bitReader, image);

    if (!image->valid) {
        return image;
    }

    printFrameInfo(image);

    image->blocks = new (std::nothrow) Block[image->blockHeightReal * image->blockWidthReal];
    if (image->blocks == nullptr) {
        std::cout << "Error - Memory error\n";
        image->valid = false;
        return image;
    }

    readScans(bitReader, image);

    return image;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %rbx
movq 0x5416(%rip), %rdi      # 0x8fd8
leaq 0x2d5c(%rip), %rsi      # 0x6925
callq 0x20e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x20d0
leaq 0x2d4e(%rip), %rsi      # 0x692e
movq %rax, %rdi
callq 0x20e0
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5010
movq 0x8(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
je 0x3c38
movq 0x53ca(%rip), %rdi      # 0x8fd8
leaq 0x2d1e(%rip), %rsi      # 0x6933
callq 0x20e0
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
callq 0x5180
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x5381(%rip), %rsi      # 0x8fc0
movl $0x20a0, %edi           # imm = 0x20A0
callq 0x2210
testq %rax, %rax
je 0x3ced
movq %rax, %rbx
movq %rax, %rdi
callq 0x5054
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x3572
cmpb $0x1, 0x2088(%rbx)
jne 0x3c1c
movq %rbx, %rdi
callq 0x2e6f
movl 0x2098(%rbx), %r12d
imull 0x2094(%rbx), %r12d
imulq $0x300, %r12, %r14      # imm = 0x300
movq 0x5328(%rip), %rsi      # 0x8fc0
movq %r14, %rdi
callq 0x21c0
testq %rax, %rax
je 0x3d05
movq %rax, %r15
testl %r12d, %r12d
je 0x3cd4
addq $-0x300, %r14           # imm = 0xFD00
movl $0x300, %ecx            # imm = 0x300
movq %r14, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %r14
addq %rcx, %r14
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2090
movq %r15, 0x2080(%rbx)
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x37f0
jmp 0x3c1c
movq 0x52e4(%rip), %rdi      # 0x8fd8
leaq 0x2c5a(%rip), %rsi      # 0x6955
callq 0x20e0
jmp 0x3c1a
andq $0x0, 0x2080(%rbx)
movq 0x52c4(%rip), %rdi      # 0x8fd8
leaq 0x2c3a(%rip), %rsi      # 0x6955
callq 0x20e0
movb $0x0, 0x2088(%rbx)
jmp 0x3c1c
jmp 0x3d2e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5180
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: getNextSymbol(BitReader&, HuffmanTable const&)
byte getNextSymbol(BitReader& bitReader, const HuffmanTable& hTable) {
    uint currentCode = 0;
    for (uint i = 0; i < 16; ++i) {
        int bit = bitReader.readBit();
        if (bit == -1) {
            return -1;
        }
        currentCode = (currentCode << 1) | bit;
        for (uint j = hTable.offsets[i]; j < hTable.offsets[i + 1]; ++j) {
            if (currentCode == hTable.codes[j]) {
                return hTable.symbols[j];
            }
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movb $-0x1, %bpl
cmpq $0x10, %r15
je 0x3d9c
movq %r14, %rdi
callq 0x51c0
cmpl $-0x1, %eax
je 0x3d9c
addl %r12d, %r12d
orl %eax, %r12d
movzbl (%rbx,%r15), %eax
movzbl 0x1(%rbx,%r15), %ecx
incq %r15
cmpq %rcx, %rax
jae 0x3d5a
leaq 0x1(%rax), %rdx
cmpl 0xc4(%rbx,%rax,4), %r12d
movq %rdx, %rax
jne 0x3d81
movb 0x10(%rbx,%rdx), %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: dequantize(JPGImage const*)
void dequantize(const JPGImage* const image) {
    for (uint y = 0; y < image->blockHeight; y += image->verticalSamplingFactor) {
        for (uint x = 0; x < image->blockWidth; x += image->horizontalSamplingFactor) {
            for (uint i = 0; i < image->numComponents; ++i) {
                const ColorComponent& component = image->colorComponents[i];
                for (uint v = 0; v < component.verticalSamplingFactor; ++v) {
                    for (uint h = 0; h < component.horizontalSamplingFactor; ++h) {
                        dequantizeBlockComponent(image->quantizationTables[component.quantizationTableID],
                            image->blocks[(y + v) * image->blockWidthReal + (x + h)][i]);
                    }
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x2050(%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ecx, %ecx
cmpl 0x208c(%rbx), %ecx
jae 0x44a7
xorl %r12d, %r12d
movq %rcx, 0x10(%rsp)
cmpl 0x2090(%rbx), %r12d
jae 0x4499
xorl %r13d, %r13d
movzbl 0x2070(%rbx), %eax
cmpq %rax, %r13
jae 0x448a
imulq $0x7, %r13, %rbp
addq 0x8(%rsp), %rbp
xorl %edx, %edx
movl %ecx, %r15d
movzbl 0x1(%rbp), %eax
cmpl %eax, %edx
jae 0x447d
movl %edx, 0x4(%rsp)
xorl %r14d, %r14d
movzbl (%rbp), %eax
cmpl %eax, %r14d
jae 0x4472
movl 0x2098(%rbx), %eax
imull %r15d, %eax
addl %r12d, %eax
addl %r14d, %eax
imulq $0x300, %rax, %rsi      # imm = 0x300
addq 0x2080(%rbx), %rsi
testl %r13d, %r13d
je 0x445a
cmpl $0x2, %r13d
je 0x444f
cmpl $0x1, %r13d
jne 0x4458
addq $0x100, %rsi            # imm = 0x100
jmp 0x445a
addq $0x200, %rsi            # imm = 0x200
jmp 0x445a
xorl %esi, %esi
movzbl 0x2(%rbp), %eax
imulq $0x104, %rax, %rdi      # imm = 0x104
addq %rbx, %rdi
callq 0x4386
incl %r14d
jmp 0x440e
movl 0x4(%rsp), %edx
incl %edx
incl %r15d
jmp 0x43ff
incq %r13
movq 0x10(%rsp), %rcx
jmp 0x43e1
movzbl 0x209c(%rbx), %eax
addl %eax, %r12d
jmp 0x43d1
movzbl 0x209d(%rbx), %eax
addl %eax, %ecx
jmp 0x43bd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: YCbCrToRGBBlock(Block&, Block const&, unsigned int, unsigned int, unsigned int, unsigned int)
void YCbCrToRGBBlock(Block& yBlock, const Block& cbcrBlock, const uint vSamp, const uint hSamp, const uint v, const uint h) {
    for (uint y = 7; y < 8; --y) {
        for (uint x = 7; x < 8; --x) {
            const uint pixel = y * 8 + x;
            const uint cbcrPixelRow = y / vSamp + 4 * v;
            const uint cbcrPixelColumn = x / hSamp + 4 * h;
            const uint cbcrPixel = cbcrPixelRow * 8 + cbcrPixelColumn;
            int r = yBlock.y[pixel]                                    + 1.402f * cbcrBlock.cr[cbcrPixel] + 128;
            int g = yBlock.y[pixel] - 0.344f * cbcrBlock.cb[cbcrPixel] - 0.714f * cbcrBlock.cr[cbcrPixel] + 128;
            int b = yBlock.y[pixel] + 1.772f * cbcrBlock.cb[cbcrPixel]                                    + 128;
            if (r < 0)   r = 0;
            if (r > 255) r = 255;
            if (g < 0)   g = 0;
            if (g > 255) g = 255;
            if (b < 0)   b = 0;
            if (b > 255) b = 255;
            yBlock.r[pixel] = r;
            yBlock.g[pixel] = g;
            yBlock.b[pixel] = b;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, -0x4(%rsp)
shll $0x5, %r8d
leal (%r8,%r9,4), %r8d
movl $0x7, %r9d
movl $0x3f, %ebp
xorl %r14d, %r14d
movss 0x16fe(%rip), %xmm0     # 0x6090
movss 0x16fa(%rip), %xmm1     # 0x6094
movss 0x16f6(%rip), %xmm2     # 0x6098
movss 0x16f2(%rip), %xmm3     # 0x609c
movss 0x16ee(%rip), %xmm4     # 0x60a0
movl $0xff, %r15d
cmpl $0x7, %r9d
ja 0x4a99
movl %r9d, %eax
xorl %edx, %edx
divl -0x4(%rsp)
leal (%r8,%rax,8), %r12d
movl %ebp, %r13d
movl $0x7, %r10d
cmpl $0x8, %r10d
jae 0x4a8e
movl %r10d, %eax
xorl %edx, %edx
divl %ecx
movl %r13d, %edx
cvtsi2ssl (%rdi,%rdx,4), %xmm5
addl %r12d, %eax
cvtsi2ssl 0x200(%rsi,%rax,4), %xmm6
movaps %xmm6, %xmm7
mulss %xmm0, %xmm7
addss %xmm5, %xmm7
addss %xmm1, %xmm7
cvttss2si %xmm7, %ebx
cvtsi2ssl 0x100(%rsi,%rax,4), %xmm7
movaps %xmm7, %xmm8
mulss %xmm2, %xmm8
addss %xmm5, %xmm8
mulss %xmm3, %xmm6
addss %xmm8, %xmm6
addss %xmm1, %xmm6
cvttss2si %xmm6, %eax
mulss %xmm4, %xmm7
addss %xmm5, %xmm7
addss %xmm1, %xmm7
cvttss2si %xmm7, %r11d
testl %ebx, %ebx
cmovlel %r14d, %ebx
cmpl %r15d, %ebx
cmovgel %r15d, %ebx
testl %eax, %eax
cmovlel %r14d, %eax
cmpl %r15d, %eax
cmovgel %r15d, %eax
testl %r11d, %r11d
cmovlel %r14d, %r11d
cmpl %r15d, %r11d
cmovgel %r15d, %r11d
movl %ebx, (%rdi,%rdx,4)
movl %eax, 0x100(%rdi,%rdx,4)
movl %r11d, 0x200(%rdi,%rdx,4)
decl %r10d
decl %r13d
jmp 0x49d8
decl %r9d
addl $-0x8, %ebp
jmp 0x49b8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: YCbCrToRGB(JPGImage const*)
void YCbCrToRGB(const JPGImage* const image) {
    const uint vSamp = image->verticalSamplingFactor;
    const uint hSamp = image->horizontalSamplingFactor;
    for (uint y = 0; y < image->blockHeight; y += vSamp) {
        for (uint x = 0; x < image->blockWidth; x += hSamp) {
            const Block& cbcrBlock = image->blocks[y * image->blockWidthReal + x];
            for (uint v = vSamp - 1; v < vSamp; --v) {
                for (uint h = hSamp - 1; h < hSamp; --h) {
                    Block& yBlock = image->blocks[(y + v) * image->blockWidthReal + (x + h)];
                    YCbCrToRGBBlock(yBlock, cbcrBlock, vSamp, hSamp, v, h);
                }
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movzbl 0x209d(%rdi), %eax
movzbl 0x209c(%rdi), %r15d
leal -0x1(%r15), %ecx
movl %ecx, 0x1c(%rsp)
movq %rax, 0x10(%rsp)
decl %eax
movl %eax, 0xc(%rsp)
xorl %ecx, %ecx
cmpl 0x208c(%rbx), %ecx
jae 0x4b98
xorl %edx, %edx
movl %ecx, 0x18(%rsp)
cmpl 0x2090(%rbx), %edx
jae 0x4b88
movl 0x2098(%rbx), %eax
imull %ecx, %eax
movq %rdx, 0x20(%rsp)
addl %edx, %eax
imulq $0x300, %rax, %r12      # imm = 0x300
addq 0x2080(%rbx), %r12
movl 0xc(%rsp), %r14d
movq 0x10(%rsp), %rax
movl %eax, %ebp
decl %ebp
movl 0x1c(%rsp), %eax
movl %eax, %r13d
cmpl 0x10(%rsp), %ebp
jae 0x4b77
cmpl %r15d, %r13d
jae 0x4b72
movl 0x2098(%rbx), %eax
imull %r14d, %eax
movq 0x20(%rsp), %rcx
addl %r13d, %ecx
addl %ecx, %eax
imulq $0x300, %rax, %rdi      # imm = 0x300
addq 0x2080(%rbx), %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
movl %r15d, %ecx
movl %ebp, %r8d
movl %r13d, %r9d
callq 0x4966
decl %r13d
jmp 0x4b30
decl %r14d
jmp 0x4b21
movq 0x20(%rsp), %rdx
addl %r15d, %edx
movl 0x18(%rsp), %ecx
jmp 0x4aeb
movq 0x10(%rsp), %rax
addl %eax, %ecx
addl %eax, 0xc(%rsp)
jmp 0x4ad9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: main
int main(int argc, char** argv) {
    // validate arguments
    if (argc < 2) {
        std::cout << "Error - Invalid arguments\n";
        return 1;
    }

    for (int i = 1; i < argc; ++i) {
        const std::string filename(argv[i]);

        // read image
        JPGImage* image = readJPG(filename);
        // validate image
        if (image == nullptr) {
            continue;
        }
        if (image->blocks == nullptr) {
            delete image;
            continue;
        }
        if (image->valid == false) {
            delete[] image->blocks;
            delete image;
            continue;
        }

        // dequantize DCT coefficients
        dequantize(image);

        // Inverse Discrete Cosine Transform
        inverseDCT(image);

        // color conversion
        YCbCrToRGB(image);

        // write BMP file
        const std::size_t pos = filename.find_last_of('.');
        const std::string outFilename = (pos == std::string::npos) ?
            (filename + ".bmp") :
            (filename.substr(0, pos) + ".bmp");
        writeBMP(image, outFilename);

        delete[] image->blocks;
        delete image;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x10(%rsp)
cmpl $0x2, %edi
jge 0x4e63
movq 0x4189(%rip), %rdi      # 0x8fd8
leaq 0x1c3a(%rip), %rsi      # 0x6a90
callq 0x20e0
pushq $0x1
popq %rax
jmp 0x4f92
movl %edi, %eax
movq %rax, 0x8(%rsp)
pushq $0x1
popq %rbp
leaq 0x58(%rsp), %r15
leaq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %r12
cmpq %rbp, 0x8(%rsp)
je 0x4f90
movq 0x10(%rsp), %rax
movq (%rax,%rbp,8), %rsi
movq %r15, %rdi
movq %rdx, %r14
callq 0x2070
movq %r15, %rdi
callq 0x3baa
movq %rax, %r13
testq %rax, %rax
je 0x4f7d
movq 0x2080(%r13), %rdi
testq %rdi, %rdi
je 0x4f28
cmpb $0x0, 0x2088(%r13)
je 0x4f23
movq %r13, %rdi
callq 0x439e
movq %r13, %rdi
callq 0x485c
movq %r13, %rdi
callq 0x4aa4
movq %r15, %rdi
pushq $0x2e
popq %rsi
pushq $-0x1
popq %rdx
callq 0x2200
cmpq $-0x1, %rax
je 0x4f37
movq %r12, %rbx
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x2100
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x1b9a(%rip), %rdx      # 0x6aab
callq 0x5340
movq %rbx, %rdi
callq 0x2080
movq %r14, %rbx
jmp 0x4f4c
callq 0x2150
movl $0x20a0, %esi           # imm = 0x20A0
movq %r13, %rdi
callq 0x20f0
jmp 0x4f7d
movq %r14, %rbx
movq %r14, %rdi
movq %r15, %rsi
leaq 0x1b64(%rip), %rdx      # 0x6aab
callq 0x5308
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4bfd
movq 0x2080(%r13), %rdi
testq %rdi, %rdi
je 0x4f68
callq 0x2150
movl $0x20a0, %esi           # imm = 0x20A0
movq %r13, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x2080
movq %r15, %rdi
callq 0x2080
incq %rbp
movq %r14, %rdx
jmp 0x4e7c
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fbe
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
jmp 0x4fb7
jmp 0x4fbe
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x2080
jmp 0x4fc1
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: BitReader::readBit()
uint readBit() {
        if (nextBit == 0) {
            if (!hasBits()) {
                return -1;
            }
            nextByte = inFile.get();
            while (nextByte == 0xFF) {
                if (!hasBits()) {
                    return -1;
                }
                byte marker = inFile.peek();
                // ignore multiple 0xFF's in a row
                while (marker == 0xFF) {
                    inFile.get();
                    if (!hasBits()) {
                        return -1;
                    }
                    marker = inFile.peek();
                }
                // literal 0xFF's are encoded in the bitstream as 0xFF00
                if (marker == 0x00) {
                    inFile.get();
                    break;
                }
                // restart marker
                else if (marker >= RST0 && marker <= RST7) {
                    inFile.get();
                    nextByte = inFile.get();
                }
                else {
                    std::cout << "Error - Invalid marker: 0x" << std::hex << (uint)marker << std::dec << '\n';
                    return -1;
                }
            }
        }
        uint bit = (nextByte >> (7 - nextBit)) & 1;
        nextBit = (nextBit + 1) % 8;
        return bit;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
cmpb $0x0, 0x1(%rdi)
je 0x51f0
movzbl (%r14), %eax
movb 0x1(%r14), %cl
movb $0x7, %dl
subb %cl, %dl
movzbl %dl, %edx
xorl %ebx, %ebx
btl %edx, %eax
setb %bl
incb %cl
andb $0x7, %cl
movb %cl, 0x1(%r14)
jmp 0x5203
movq 0x8(%r14), %rax
movq -0x18(%rax), %rax
pushq $-0x1
popq %rbx
testb $0x5, 0x28(%r14,%rax)
je 0x520b
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x2130
movb %al, (%r14)
cmpb $-0x1, %al
jne 0x51ce
movq 0x8(%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%r14,%rax)
jne 0x5203
movq %r15, %rdi
callq 0x2060
cmpb $-0x1, %al
jne 0x5244
movq %r15, %rdi
callq 0x2130
jmp 0x521e
movzbl %al, %ecx
testl %ecx, %ecx
je 0x5265
movl %eax, %ecx
andl $0xf8, %ecx
cmpl $0xd0, %ecx
jne 0x5272
movq %r15, %rdi
callq 0x2130
jmp 0x520f
movq %r15, %rdi
callq 0x2130
jmp 0x51ce
movzbl %al, %r14d
movq 0x3d5b(%rip), %rdi      # 0x8fd8
leaq 0x1686(%rip), %rsi      # 0x690a
callq 0x20e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x20a0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x2120
jmp 0x5203
// File: /workspace/github_cpp_makefile_star2_O2/dannye[P]jed/src/decoder.cpp
// Function: BitReader::readBits(unsigned int)
uint readBits(const uint length) {
        uint bits = 0;
        for (uint i = 0; i < length; ++i) {
            uint bit = readBit();
            if (bit == -1) {
                bits = -1;
                break;
            }
            bits = (bits << 1) | bit;
        }
        return bits;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
xorl %ebx, %ebx
pushq $-0x1
popq %r15
subl $0x1, %ebp
jb 0x52fb
movq %r14, %rdi
callq 0x51c0
cmpl $-0x1, %eax
je 0x52f8
addl %ebx, %ebx
orl %eax, %ebx
jmp 0x52e0
movl %r15d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/config.cpp
// Function: croak(char const*, ...)
void croak(const char *format, ...) {
    va_list args;
    va_start(args, format);
    fprintf(stderr, "slimfastq: %s %s: ",
            ( conf.encode ? "encoding" : "decoding"),
            conf.get_info("orig.filename"));

    // if (errno)
    //     fprintf(stderr, "err=%s", strerror(errno));

    vfprintf(stderr, format, args);
    fprintf(stderr, "\n");

    exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x23b7
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
movq 0xcbf2(%rip), %r13      # 0xefd0
movq (%r13), %r15
leaq 0xef67(%rip), %rax      # 0x11350
leaq 0x6c9f(%rip), %rcx      # 0x908f
leaq 0x6ca1(%rip), %r12      # 0x9098
cmpb $0x0, 0xc(%rax)
cmovneq %rcx, %r12
leaq 0x6c9b(%rip), %rsi      # 0x90a1
callq 0x2cb8
leaq 0x6c6a(%rip), %rsi      # 0x907c
movq %r15, %rdi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x22a0
movq (%r13), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2280
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x2250
pushq $0x1
popq %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/bfiler.cpp
// Function: BFileSave::~BFileSave()
BFileSave::~BFileSave() {
    if (bcnt and filer)
        ranger->put(&rc, bmap);
    rc.done();
    DELETE(filer);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x1(%rdi)
je 0x2772
cmpq $0x0, 0x38(%rbx)
je 0x2772
movq 0x8(%rbx), %rdi
leaq 0x10(%rbx), %rsi
movzbl (%rbx), %edx
callq 0x28e4
leaq 0x10(%rbx), %rdi
callq 0x2962
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x2799
movq %r14, %rdi
callq 0x411a
movl $0x4040, %esi           # imm = 0x4040
movq %r14, %rdi
callq 0x21f0
andq $0x0, 0x38(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x26ba
movq %rax, %rdi
callq 0x2957
nop
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/bfiler.cpp
// Function: BFileSave::putb(bool)
void BFileSave::putb(bool bit) {
    bmap |= ((!!bit)<<bcnt++);
    rarely_if (bcnt == 8) {
        ranger->put(&rc, bmap);
        bmap = bcnt = 0;
    }
}

// Assembly:
movb 0x1(%rdi), %cl
leal 0x1(%rcx), %eax
movb %al, 0x1(%rdi)
shll %cl, %esi
orb (%rdi), %sil
movb %sil, (%rdi)
cmpb $0x8, %al
je 0x27cc
retq
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x10(%rbx), %rax
movzbl %sil, %edx
movq %rax, %rsi
callq 0x28e4
andw $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/bfiler.cpp
// Function: BFileLoad::getb()
bool BFileLoad::getb() {
    rarely_if(bcnt == 0) {
        bcnt = 8;
        bmap = ranger->get(&rc);
    }
    return !! (bmap & (0x100>> bcnt--));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb 0x1(%rdi), %cl
testb %cl, %cl
je 0x28bc
movb (%rbx), %al
movzbl %al, %eax
leal -0x1(%rcx), %edx
shll %cl, %eax
movb %dl, 0x1(%rbx)
shrl $0x8, %eax
andl $0x1, %eax
popq %rbx
retq
movb $0x8, 0x1(%rbx)
movq 0x8(%rbx), %rdi
leaq 0x10(%rbx), %rsi
callq 0x29da
movb %al, (%rbx)
movb 0x1(%rbx), %cl
jmp 0x28a9
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/./power_ranger.hpp
// Function: PowerRanger::put(RCoder*, unsigned char)
void put(RCoder *rc, UCHAR sym) {
        UINT32 sumf  = 0;
        UINT32 i = 0;

        rarely_if(iend <= sym)
            for (;iend <= sym; iend++)
                  syms[iend] = iend;

        for (; syms[i] != sym; sumf += freq[i++]);

        rc->Encode(sumf+i, freq[i]+1, total + NSYM);

        update_freq(i);
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movzwl 0x204(%rdi), %ecx
cmpw %dx, %cx
jbe 0x293c
xorl %esi, %esi
xorl %ebp, %ebp
movl %ebp, %ecx
movzwl 0x4(%rbx,%rcx,2), %r8d
cmpb %dl, 0x207(%rbx,%rcx)
je 0x2915
incl %ebp
addl %r8d, %esi
jmp 0x28fd
addl %ebp, %esi
incl %r8d
movl $0x100, %ecx            # imm = 0x100
addl (%rbx), %ecx
movq %rax, %rdi
movl %r8d, %edx
callq 0x2a74
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2ae0
movzbl %dl, %esi
cmpq %rsi, %rcx
ja 0x28f9
movb %cl, 0x207(%rbx,%rcx)
incq %rcx
movw %cx, 0x204(%rbx)
jmp 0x293f
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/./coder.hpp
// Function: RCoder::done()
void done() {
        // Allow explicit 'done' in case we wish not FilerSave close before this call
        if (m_out) {
            for (int i=0; i<8; i++) {
                m_out->put(low >> 56);
                low <<= 8;
            }
            m_out = NULL;
        }
    }

// Assembly:
cmpq $0x0, 0x20(%rdi)
je 0x2995
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %rbp
subl $0x1, %ebp
jb 0x298a
movq 0x20(%rbx), %rdi
movzbl 0x7(%rbx), %esi
callq 0x2b5c
shlq $0x8, (%rbx)
jmp 0x2972
andq $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/./coder.hpp
// Function: RCoder::init(FilerLoad*)
void init(FilerLoad* f_in) {
        m_in  = f_in;
        m_out = NULL;
        low=0;
        range=(UINT32)-1;
        code = 0;               // happy compiler
        for (int i=0; i<8; i++)
            code = (code<<8) | m_in->get();
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x18(%rdi)
andq $0x0, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
orl $-0x1, 0x10(%rdi)
pushq $0x8
popq %rbp
xorl %r14d, %r14d
subl $0x1, %ebp
jb 0x29d4
shlq $0x8, %r14
movq 0x18(%rbx), %rdi
callq 0x2bfc
movzbl %al, %eax
orq %rax, %r14
movq %r14, 0x8(%rbx)
jmp 0x29b6
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Infinidat[P]slimfastq/./power_ranger.hpp
// Function: PowerRanger::get(RCoder*)
UINT16 get(RCoder *rc) {

        UINT32 vtot = total + NSYM; // - iend;
        UINT32 sumf = 0;
        UINT32 i;

        UINT32 prob = rc->GetFreq(vtot);
        for ( i = 0;
              i < NSYM;
              i ++ ) {

            rarely_if(iend    == i)
                syms[ iend++ ] = i;

            if (sumf +  freq[i] + 1 <= prob)
                sumf += freq[i] + 1;
            else
                break;
        }
        rc->Decode(sumf, freq[i]+1, vtot);

        return update_freq(i);
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %r8
movq %rdi, %rbx
movl $0x100, %ebp            # imm = 0x100
movl (%rdi), %ecx
addl %ebp, %ecx
movl 0x10(%rsi), %eax
xorl %edi, %edi
xorl %edx, %edx
divl %ecx
movl %eax, %esi
movl %eax, 0x10(%r8)
movq 0x8(%r8), %rax
xorl %edx, %edx
divq %rsi
movzwl 0x204(%rbx), %edx
xorl %esi, %esi
cmpq $0x100, %rdi            # imm = 0x100
je 0x2a4f
movzwl %dx, %r9d
cmpq %r9, %rdi
je 0x2a38
movzwl 0x4(%rbx,%rdi,2), %r9d
addl %esi, %r9d
incl %r9d
cmpl %eax, %r9d
ja 0x2a4d
incq %rdi
movl %r9d, %esi
jmp 0x2a0d
leal 0x1(%r9), %edx
movw %dx, 0x204(%rbx)
movb %dil, 0x207(%rbx,%r9)
jmp 0x2a1f
movl %edi, %ebp
movl %ebp, %eax
movzwl 0x4(%rbx,%rax,2), %edx
incl %edx
movq %r8, %rdi
callq 0x2c3c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2ae0
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq