LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: ALSchwalm[P]cppEvolve/include/cppEvolve/Genome/Tree/Tree.hpp
// Function: void evolve::tree::TreeFactory<int>::addNode<int, int>(int (*)(int, int), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void addNode(Rtype (*f)(T...), const std::string& name) {
        static_assert(sizeof...(T) > 0,
                      "Node function with 0 arguments should be terminator");
        const auto val = currentID;

        // explicitly capture to avoid bug in gcc
        std::function<BaseNode<Rtype>*()> func = [f, name, val]() {
            return new Node<std::function<Rtype(T...)>>(f, name, val);
        };
        nodes[currentID++] = func;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2080
movl -0x1c(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x6250
jmp 0x3042
leaq -0x70(%rbp), %rdi
callq 0x62f0
movq -0x88(%rbp), %rcx
movq %rcx, %rdi
addq $0x8, %rdi
movl 0x4(%rcx), %eax
movl %eax, %edx
incl %edx
movl %edx, 0x4(%rcx)
movl %eax, -0x80(%rbp)
leaq -0x80(%rbp), %rsi
callq 0x6310
movq %rax, -0x90(%rbp)
jmp 0x3078
movq -0x90(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x63f0
jmp 0x308a
leaq -0x40(%rbp), %rdi
callq 0x4ec0
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x62f0
jmp 0x30c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4ec0
movq -0x78(%rbp), %rdi
callq 0x2210
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2080
movl -0x1c(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x9c40
jmp 0x3222
leaq -0x70(%rbp), %rdi
callq 0x9ce0
movq -0x88(%rbp), %rcx
movq %rcx, %rdi
addq $0x38, %rdi
movl 0x4(%rcx), %eax
movl %eax, %edx
incl %edx
movl %edx, 0x4(%rcx)
movl %eax, -0x80(%rbp)
leaq -0x80(%rbp), %rsi
callq 0x6310
movq %rax, -0x90(%rbp)
jmp 0x3258
movq -0x90(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x63f0
jmp 0x326a
leaq -0x40(%rbp), %rdi
callq 0x4ec0
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x9ce0
jmp 0x32a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4ec0
movq -0x78(%rbp), %rdi
callq 0x2210
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: 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
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xac50
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %edi
callq 0x2420
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpq -0x20(%rbp), %rax
jae 0x3747
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0xac70
movq %rax, %rdi
callq 0x7430
movq %rax, %rdi
callq 0x2420
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0xac70
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0xacd0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xac70
movq %rax, %rdi
callq 0xac90
testb $0x1, %al
jne 0x36ec
jmp 0x3737
movq -0x30(%rbp), %rdi
callq 0xac70
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0x3711
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0xb140
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0xacd0
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x37df
jmp 0x3739
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3687
movq -0x28(%rbp), %rdi
callq 0xac70
movq %rax, %rdi
callq 0x7430
movq %rax, %rdi
callq 0x2420
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
callq 0xac70
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0xacd0
movq (%rax), %rdi
callq 0xacf0
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rdi
callq 0xac70
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0xacd0
movq (%rax), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
je 0x37b0
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x10(%rbp), %rdi
movl -0x54(%rbp), %esi
subl $0x1, %esi
callq 0xb1a0
movq %rax, -0x78(%rbp)
movq -0x28(%rbp), %rdi
callq 0xac70
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0xacd0
movq -0x78(%rbp), %rcx
movq %rcx, (%rax)
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x68, %edi
callq 0x2160
movq -0x78(%rbp), %rsi
movq %rax, -0x70(%rbp)
movb $0x1, -0x3d(%rbp)
addq $0x48, %rsi
leaq -0x30(%rbp), %rdi
callq 0x6be0
jmp 0x6dac
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $0x20, %rdx
movl 0x40(%rax), %ecx
leaq -0x30(%rbp), %rsi
callq 0x67b0
jmp 0x6dc9
movb $0x0, -0x3d(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6820
movq -0x70(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x10(%rbp)
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x7520
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x7550
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x7580
testb $0x1, %al
jne 0x6e17
jmp 0x6e8f
leaq -0x50(%rbp), %rdi
callq 0x75c0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x80(%rbp)
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x80(%rbp), %rdi
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rsi
callq 0x75e0
leaq -0x50(%rbp), %rdi
callq 0x7610
jmp 0x6e04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6e7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x6820
testb $0x1, -0x3d(%rbp)
jne 0x6e84
jmp 0x6e8d
movq -0x70(%rbp), %rdi
callq 0x2140
jmp 0x6e9c
movq -0x10(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2210
nopw %cs:(%rax,%rax)
nop
// File: 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
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x68, %edi
callq 0x2160
movq -0x78(%rbp), %rsi
movq %rax, -0x70(%rbp)
movb $0x1, -0x3d(%rbp)
addq $0x48, %rsi
leaq -0x30(%rbp), %rdi
callq 0xa3b0
jmp 0xa52c
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $0x20, %rdx
movl 0x40(%rax), %ecx
leaq -0x30(%rbp), %rsi
callq 0xa060
jmp 0xa549
movb $0x0, -0x3d(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xa0d0
movq -0x70(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x10(%rbp)
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x7520
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x7550
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x7580
testb $0x1, %al
jne 0xa597
jmp 0xa60f
leaq -0x50(%rbp), %rdi
callq 0x75c0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x80(%rbp)
movq -0x60(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x80(%rbp), %rdi
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rsi
callq 0x75e0
leaq -0x50(%rbp), %rdi
callq 0x7610
jmp 0xa584
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xa5fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xa0d0
testb $0x1, -0x3d(%rbp)
jne 0xa604
jmp 0xa60d
movq -0x70(%rbp), %rdi
callq 0x2140
jmp 0xa61c
movq -0x10(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x2210
nopw %cs:(%rax,%rax)
nop
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, -0xc(%rbp)
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7520
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7550
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7580
testb $0x1, %al
jne 0xad3c
jmp 0xad73
leaq -0x20(%rbp), %rdi
callq 0x75c0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xacf0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0xad66
movl -0x34(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0xad68
leaq -0x20(%rbp), %rdi
callq 0x7610
jmp 0xad29
movl -0xc(%rbp), %eax
addl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xb1d4
movq -0x30(%rbp), %rdi
callq 0xb140
movq %rax, -0x18(%rbp)
jmp 0xb23b
movq -0x30(%rbp), %rdi
callq 0xb480
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jae 0xb239
movq -0x18(%rbp), %rdi
callq 0xac70
movq -0x30(%rbp), %rdi
movq %rax, -0x40(%rbp)
movl -0xc(%rbp), %esi
subl $0x1, %esi
callq 0xb1a0
movq -0x40(%rbp), %rdi
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x75e0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb1e8
jmp 0xb23b
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0xb960
movq -0x10(%rbp), %rdi
callq 0xb9f0
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
movl $0xa, %esi
callq 0xba20
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xbab0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xba70
testb $0x1, %al
jne 0xb8d5
jmp 0xb90a
leaq -0x28(%rbp), %rdi
callq 0xbae0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0xb8fd
movq -0x58(%rbp), %rdi
callq 0xbb00
movq -0x58(%rbp), %rdi
callq 0x2140
jmp 0xb8ff
leaq -0x28(%rbp), %rdi
callq 0xbb30
jmp 0xb8b5
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xbbe0
movq -0x10(%rbp), %rdi
callq 0xbab0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xbbe0
movq -0x60(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0xbb50
movq %rax, -0x50(%rbp)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
callq 0x2130
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0xac90
testb $0x1, %al
jne 0x104ad
movq -0x8(%rbp), %rdi
leaq 0x1002(%rip), %rsi      # 0x113f3
callq 0x2150
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x7430
movq %rax, %rcx
movq -0x20(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x10461
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x7500
movq -0x28(%rbp), %rdi
movq (%rax), %rsi
callq 0x103b0
movq %rax, %rdi
leaq 0x1058(%rip), %rsi      # 0x114a9
callq 0x2150
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x103fd
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x7430
movq -0x38(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x7500
movq -0x30(%rbp), %rdi
movq (%rax), %rsi
callq 0x103b0
movq %rax, %rdi
leaq 0xf90(%rip), %rsi       # 0x11438
callq 0x2150
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x9383(%rip), %rdi      # 0xbfd8
leaq 0x6576(%rip), %rsi      # 0x91d2
callq 0x2110
movq 0x20(%rsp), %rdi
callq 0x7a40
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jle 0x2dc1
movq 0x20(%rsp), %rdi
callq 0x7a80
movb %al, 0x13(%rsp)
movl 0x14(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
movzbl 0x13(%rsp), %eax
andl $0xf, %eax
movb %al, 0x12(%rsp)
movzbl 0x12(%rsp), %eax
cmpl $0x3, %eax
jle 0x2cf2
movq 0x931d(%rip), %rdi      # 0xbfd8
leaq 0x64d3(%rip), %rsi      # 0x9195
callq 0x2110
movq %rax, %rdi
movzbl 0x12(%rsp), %esi
callq 0x21b0
movq %rax, %rdi
movl $0xa, %esi
callq 0x2160
movq 0x18(%rsp), %rax
movb $0x0, 0x2088(%rax)
jmp 0x2de7
movq 0x18(%rsp), %rax
movzbl 0x12(%rsp), %ecx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movb $0x1, 0x100(%rax)
movzbl 0x13(%rsp), %eax
sarl $0x4, %eax
cmpl $0x0, %eax
je 0x2d74
movl $0x0, 0x4(%rsp)
cmpl $0x40, 0x4(%rsp)
jae 0x2d65
movq 0x20(%rsp), %rdi
callq 0x7a40
movl %eax, %edx
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movl %ecx, %esi
leaq 0x6d1f(%rip), %rcx      # 0x9a70
movzbl (%rcx,%rsi), %ecx
movl %edx, (%rax,%rcx,4)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x2d2c
movl 0x14(%rsp), %eax
subl $0x80, %eax
movl %eax, 0x14(%rsp)
jmp 0x2dbc
movl $0x0, (%rsp)
cmpl $0x40, (%rsp)
jae 0x2db1
movq 0x20(%rsp), %rdi
callq 0x7a80
movzbl %al, %edx
movq 0x8(%rsp), %rax
movl (%rsp), %ecx
movl %ecx, %esi
leaq 0x6cd1(%rip), %rcx      # 0x9a70
movzbl (%rcx,%rsi), %ecx
movl %edx, (%rax,%rcx,4)
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x2d7b
movl 0x14(%rsp), %eax
subl $0x40, %eax
movl %eax, 0x14(%rsp)
jmp 0x2c7a
cmpl $0x0, 0x14(%rsp)
je 0x2de7
movq 0x9209(%rip), %rdi      # 0xbfd8
leaq 0x6410(%rip), %rsi      # 0x91e6
callq 0x2110
movq 0x18(%rsp), %rax
movb $0x0, 0x2088(%rax)
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8793(%rip), %rdi      # 0xbfd8
leaq 0x5d17(%rip), %rsi      # 0x9563
callq 0x2110
movq 0x10(%rsp), %rdi
callq 0x7a40
movl %eax, 0x4(%rsp)
movq 0x10(%rsp), %rdi
callq 0x7a40
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x2078(%rax)
movl 0x4(%rsp), %eax
subl $0x4, %eax
cmpl $0x0, %eax
je 0x38a1
movq 0x874f(%rip), %rdi      # 0xbfd8
leaq 0x5ce7(%rip), %rsi      # 0x9577
callq 0x2110
movq 0x8(%rsp), %rax
movb $0x0, 0x2088(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8713(%rip), %rdi      # 0xbfd8
leaq 0x5cc0(%rip), %rsi      # 0x958c
callq 0x2110
movq 0x10(%rsp), %rdi
callq 0x7a40
movl %eax, 0x4(%rsp)
cmpl $0x2, 0x4(%rsp)
jae 0x3907
movq 0x86eb(%rip), %rdi      # 0xbfd8
leaq 0x5cad(%rip), %rsi      # 0x95a1
callq 0x2110
movq 0x8(%rsp), %rax
movb $0x0, 0x2088(%rax)
jmp 0x3931
movl $0x0, (%rsp)
movl (%rsp), %eax
movl 0x4(%rsp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jae 0x3931
movq 0x10(%rsp), %rdi
callq 0x7a80
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x390e
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8683(%rip), %rdi      # 0xbfd8
leaq 0x5c5b(%rip), %rsi      # 0x95b7
callq 0x2110
movq 0x10(%rsp), %rdi
callq 0x7a40
movl %eax, 0x4(%rsp)
cmpl $0x2, 0x4(%rsp)
jae 0x3997
movq 0x865b(%rip), %rdi      # 0xbfd8
leaq 0x5c47(%rip), %rsi      # 0x95cb
callq 0x2110
movq 0x8(%rsp), %rax
movb $0x0, 0x2088(%rax)
jmp 0x39c1
movl $0x0, (%rsp)
movl (%rsp), %eax
movl 0x4(%rsp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jae 0x39c1
movq 0x10(%rsp), %rdi
callq 0x7a80
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x399e
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
cmpl $0x10, 0x8(%rsp)
jae 0x5155
movq 0x18(%rsp), %rdi
callq 0x7ee0
movl %eax, 0x4(%rsp)
cmpl $-0x1, 0x4(%rsp)
jne 0x50d8
movb $-0x1, 0x27(%rsp)
jmp 0x515a
movl 0xc(%rsp), %eax
shll %eax
orl 0x4(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0x8(%rsp), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, (%rsp)
movl (%rsp), %eax
movq 0x10(%rsp), %rcx
movl 0x8(%rsp), %edx
addl $0x1, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jae 0x5143
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rcx
movl (%rsp), %edx
cmpl 0xc4(%rcx,%rdx,4), %eax
jne 0x5136
movq 0x10(%rsp), %rax
movl (%rsp), %ecx
movb 0x11(%rax,%rcx), %al
movb %al, 0x27(%rsp)
jmp 0x515a
jmp 0x5138
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x50f6
jmp 0x5145
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x50ae
movb $-0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x208c(%rcx), %eax
jae 0x6036
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x2090(%rcx), %eax
jae 0x601b
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x30(%rsp), %rcx
movzbl 0x2070(%rcx), %ecx
cmpl %ecx, %eax
jae 0x6000
movq 0x30(%rsp), %rax
addq $0x2050, %rax           # imm = 0x2050
movl 0x24(%rsp), %ecx
imulq $0x7, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jae 0x5fee
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x18(%rsp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jae 0x5fdc
movq 0x30(%rsp), %rax
movq 0x18(%rsp), %rcx
movzbl 0x2(%rcx), %ecx
imulq $0x104, %rcx, %rcx      # imm = 0x104
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq 0x2080(%rax), %rdi
movl 0x2c(%rsp), %eax
addl 0x14(%rsp), %eax
movq 0x30(%rsp), %rcx
imull 0x2098(%rcx), %eax
movl 0x28(%rsp), %ecx
addl 0x10(%rsp), %ecx
addl %ecx, %eax
movl %eax, %eax
imulq $0x300, %rax, %rax      # imm = 0x300
addq %rax, %rdi
movl 0x24(%rsp), %esi
callq 0x8150
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x5e60
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x5f53
jmp 0x5fde
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x5f36
jmp 0x5ff0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x5efb
jmp 0x6002
movq 0x30(%rsp), %rax
movzbl 0x209c(%rax), %eax
addl 0x28(%rsp), %eax
movl %eax, 0x28(%rsp)
jmp 0x5ede
jmp 0x601d
movq 0x30(%rsp), %rax
movzbl 0x209d(%rax), %eax
addl 0x2c(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0x5ec1
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movzbl 0x209d(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movzbl 0x209c(%rax), %eax
movl %eax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x208c(%rcx), %eax
jae 0x7123
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x2090(%rcx), %eax
jae 0x7110
movq 0x30(%rsp), %rax
movq 0x2080(%rax), %rax
movl 0x24(%rsp), %ecx
movq 0x30(%rsp), %rdx
imull 0x2098(%rdx), %ecx
addl 0x20(%rsp), %ecx
movl %ecx, %ecx
imulq $0x300, %rcx, %rcx      # imm = 0x300
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl 0x2c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jae 0x70fd
movl 0x28(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x28(%rsp), %eax
jae 0x70eb
movq 0x30(%rsp), %rax
movq 0x2080(%rax), %rax
movl 0x24(%rsp), %ecx
addl 0x14(%rsp), %ecx
movq 0x30(%rsp), %rdx
imull 0x2098(%rdx), %ecx
movl 0x20(%rsp), %edx
addl 0x10(%rsp), %edx
addl %edx, %ecx
movl %ecx, %ecx
imulq $0x300, %rcx, %rcx      # imm = 0x300
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x2c(%rsp), %edx
movl 0x28(%rsp), %ecx
movl 0x14(%rsp), %r8d
movl 0x10(%rsp), %r9d
callq 0x6d80
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x7078
jmp 0x70ed
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x705f
jmp 0x70ff
movl 0x28(%rsp), %eax
addl 0x20(%rsp), %eax
movl %eax, 0x20(%rsp)
jmp 0x700e
jmp 0x7112
movl 0x2c(%rsp), %eax
addl 0x24(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x6ff1
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: dannye[P]jed/src/decoder.cpp
// Function: putInt(unsigned char*&, unsigned int)
void putInt(byte*& bufferPos, const uint v) {
    *bufferPos++ = v >>  0;
    *bufferPos++ = v >>  8;
    *bufferPos++ = v >> 16;
    *bufferPos++ = v >> 24;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movl -0xc(%rsp), %eax
shrl $0x0, %eax
movb %al, %cl
movq -0x8(%rsp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
movl -0xc(%rsp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x8(%rsp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
movl -0xc(%rsp), %eax
shrl $0x10, %eax
movb %al, %cl
movq -0x8(%rsp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
movl -0xc(%rsp), %eax
shrl $0x18, %eax
movb %al, %cl
movq -0x8(%rsp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
retq
nop
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jae 0x812b
movq 0x8(%rsp), %rdi
callq 0x7ee0
movl %eax, 0x10(%rsp)
cmpl $-0x1, 0x10(%rsp)
jne 0x8110
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x812b
movl 0x18(%rsp), %eax
shll %eax
orl 0x10(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x80e7
movl 0x18(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Infinidat[P]slimfastq/bfiler.cpp
// Function: BFileSave::~BFileSave()
BFileSave::~BFileSave() {
    if (bcnt and filer)
        ranger->put(&rc, bmap);
    rc.done();
    DELETE(filer);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpb $0x0, 0x1(%rax)
je 0x28b1
movq 0x8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x28b1
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
movq %rax, %rsi
addq $0x10, %rsi
movzbl (%rax), %edx
callq 0x2c20
jmp 0x28af
jmp 0x28b1
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
callq 0x2d40
jmp 0x28c1
jmp 0x28c3
movq 0x8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x28fb
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x28f9
movq (%rsp), %rdi
callq 0x6ed0
movq (%rsp), %rdi
movl $0x4040, %esi           # imm = 0x4040
callq 0x2290
jmp 0x28fb
movq 0x8(%rsp), %rax
movq $0x0, 0x38(%rax)
jmp 0x290a
movq 0x8(%rsp), %rdi
callq 0x2720
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x2d30
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movb %sil, %al
movq %rdi, 0x10(%rsp)
andb $0x1, %al
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movb 0xf(%rsp), %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %edx
movb 0x1(%rax), %cl
movb %cl, %sil
addb $0x1, %sil
movb %sil, 0x1(%rax)
movzbl %cl, %ecx
shll %cl, %edx
movzbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
movzbl 0x1(%rax), %eax
cmpl $0x8, %eax
jne 0x29a0
movq (%rsp), %rax
movq 0x8(%rax), %rdi
movq %rax, %rsi
addq $0x10, %rsi
movzbl (%rax), %edx
callq 0x2c20
movq (%rsp), %rax
movb $0x0, 0x1(%rax)
movb $0x0, (%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x2b4c
movq 0x8(%rsp), %rsi
movb $0x8, 0x1(%rsi)
movq 0x8(%rsi), %rdi
addq $0x10, %rsi
callq 0x2e40
movw %ax, %cx
movq 0x8(%rsp), %rax
movb %cl, (%rax)
movq 0x8(%rsp), %rdx
movzbl (%rdx), %eax
movb 0x1(%rdx), %cl
movb %cl, %sil
addb $-0x1, %sil
movb %sil, 0x1(%rdx)
movzbl %cl, %ecx
movl $0x100, %edx            # imm = 0x100
sarl %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: Infinidat[P]slimfastq/./coder.hpp
// Function: RCoder::init(FilerSave*)
void init(FilerSave* f_out) {
        m_out = f_out;
        m_in  = NULL;
        low=0;
        range=(UINT32)-1;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq -0x10(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, (%rax)
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
retq
nop
// File: 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:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movzwl 0x204(%rax), %eax
movzbl 0x17(%rsp), %ecx
cmpl %ecx, %eax
jg 0x2ca8
jmp 0x2c5f
movq (%rsp), %rax
movzwl 0x204(%rax), %eax
movzbl 0x17(%rsp), %ecx
cmpl %ecx, %eax
jg 0x2ca6
movq (%rsp), %rax
movw 0x204(%rax), %cx
movb %cl, %dl
movzwl 0x204(%rax), %ecx
movb %dl, 0x207(%rax,%rcx)
movq (%rsp), %rax
movw 0x204(%rax), %cx
addw $0x1, %cx
movw %cx, 0x204(%rax)
jmp 0x2c5f
jmp 0x2ca8
jmp 0x2caa
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movzbl 0x207(%rax,%rcx), %eax
movzbl 0x17(%rsp), %ecx
cmpl %ecx, %eax
je 0x2ce7
jmp 0x2cc5
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0xc(%rsp)
movl %ecx, %ecx
movzwl 0x4(%rax,%rcx,2), %eax
addl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
jmp 0x2caa
movq (%rsp), %rax
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
addl 0xc(%rsp), %esi
movl 0xc(%rsp), %ecx
movzwl 0x4(%rax,%rcx,2), %edx
addl $0x1, %edx
movl (%rax), %ecx
addl $0x100, %ecx            # imm = 0x100
callq 0x2f50
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x3030
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x20(%rax)
je 0x2da6
movl $0x0, 0xc(%rsp)
cmpl $0x8, 0xc(%rsp)
jge 0x2d9a
movq (%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rax), %rax
shrq $0x38, %rax
movzbl %al, %esi
callq 0x3160
movq (%rsp), %rax
movq (%rax), %rcx
shlq $0x8, %rcx
movq %rcx, (%rax)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2d61
movq (%rsp), %rax
movq $0x0, 0x20(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq $0x0, 0x20(%rax)
movq $0x0, (%rax)
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rax)
movl $0x0, 0x14(%rsp)
cmpl $0x8, 0x14(%rsp)
jge 0x2e3a
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
shlq $0x8, %rcx
movq %rcx, (%rsp)
movq 0x18(%rax), %rdi
callq 0x32c0
movq (%rsp), %rcx
movb %al, %dl
movq 0x8(%rsp), %rax
movzbl %dl, %edx
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2df7
addq $0x28, %rsp
retq
nop
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl (%rax), %eax
addl $0x100, %eax            # imm = 0x100
movl %eax, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x3330
movl %eax, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
cmpl $0x100, 0xc(%rsp)       # imm = 0x100
jae 0x2f16
movq (%rsp), %rax
movzwl 0x204(%rax), %eax
cmpl 0xc(%rsp), %eax
jne 0x2ecc
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movb %cl, %dl
movw 0x204(%rax), %cx
movw %cx, %si
addw $0x1, %si
movw %si, 0x204(%rax)
movzwl %cx, %ecx
movb %dl, 0x207(%rax,%rcx)
movq (%rsp), %rcx
movl 0x10(%rsp), %eax
movl 0xc(%rsp), %edx
movzwl 0x4(%rcx,%rdx,2), %ecx
addl %ecx, %eax
addl $0x1, %eax
cmpl 0x8(%rsp), %eax
ja 0x2f02
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movzwl 0x4(%rax,%rcx,2), %eax
addl $0x1, %eax
addl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
jmp 0x2f04
jmp 0x2f16
jmp 0x2f06
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2e84
movq (%rsp), %rax
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %ecx
movzwl 0x4(%rax,%rcx,2), %edx
addl $0x1, %edx
movl 0x14(%rsp), %ecx
callq 0x3360
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
callq 0x3030
movzbl %al, %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: Infinidat[P]slimfastq/./coder.hpp
// Function: RCoder::Encode(unsigned int, unsigned int, unsigned int)
void Encode (UINT32 cumFreq, UINT32 freq, UINT32 totFreq) {

        range /= totFreq ;
        low   += cumFreq * range ;
        range *= freq;

        // assert (cumFreq + freq <= totFreq);

        while( range<TOP ) {
            rarely_if ( (low^(low+range)) & (0xffULL<<56) )
                range = ((UINT32(low)|(TOP-1))-UINT32(low));
            m_out->put(low >> 56);
            range <<= 8;
            low   <<= 8;
        }
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x14(%rsp), %ecx
movl 0x10(%rax), %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movl 0x1c(%rsp), %ecx
imull 0x10(%rax), %ecx
movl %ecx, %ecx
addq (%rax), %rcx
movq %rcx, (%rax)
movl 0x18(%rsp), %ecx
imull 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq 0x8(%rsp), %rax
cmpl $0x1000000, 0x10(%rax)  # imm = 0x1000000
jae 0x301c
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq (%rdx), %rcx
movl 0x10(%rdx), %edx
addq %rdx, %rcx
xorq %rcx, %rax
movabsq $-0x100000000000000, %rcx # imm = 0xFF00000000000000
andq %rcx, %rax
cmpq $0x0, %rax
je 0x2fea
movq 0x8(%rsp), %rax
movq (%rax), %rcx
orl $0xffffff, %ecx         # imm = 0xFFFFFF
movq (%rax), %rdx
subl %edx, %ecx
movl %ecx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq (%rax), %rax
shrq $0x38, %rax
movzbl %al, %esi
callq 0x3160
movq 0x8(%rsp), %rax
movl 0x10(%rax), %ecx
shll $0x8, %ecx
movl %ecx, 0x10(%rax)
movq (%rax), %rcx
shlq $0x8, %rcx
movq %rcx, (%rax)
jmp 0x2f9f
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: Infinidat[P]slimfastq/./power_ranger.hpp
// Function: PowerRanger::update_freq(int)
inline UCHAR update_freq(int i) {

        rarely_if(freq[i] > (MAX_FREQ - STEP)) {
            if  (i == 0 and
                 freq[i] + 256U > total)
                return syms[i];

            normalize();
        }

        freq[i] += STEP;
        total   += STEP;

        return LIKELY (i == 0 or
                       (++ count & 0xf) or
                       freq[i] <= freq[i-1] ) ?
            syms[i] :
            down_level(i);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movslq 0x14(%rsp), %rcx
movzwl 0x4(%rax,%rcx,2), %eax
cmpl $0x7fd2, %eax           # imm = 0x7FD2
jle 0x309b
cmpl $0x0, 0x14(%rsp)
jne 0x3091
movq 0x8(%rsp), %rcx
movslq 0x14(%rsp), %rax
movzwl 0x4(%rcx,%rax,2), %eax
addl $0x100, %eax            # imm = 0x100
cmpl (%rcx), %eax
jbe 0x3091
movq 0x8(%rsp), %rax
movslq 0x14(%rsp), %rcx
movb 0x207(%rax,%rcx), %al
movb %al, 0x27(%rsp)
jmp 0x314c
movq 0x8(%rsp), %rdi
callq 0x31c0
movq 0x8(%rsp), %rax
movslq 0x14(%rsp), %rcx
movzwl 0x4(%rax,%rcx,2), %edx
addl $0xe, %edx
movw %dx, 0x4(%rax,%rcx,2)
movl (%rax), %ecx
addl $0xe, %ecx
movl %ecx, (%rax)
movb $0x1, %al
cmpl $0x0, 0x14(%rsp)
movb %al, 0x7(%rsp)
je 0x3111
movq 0x8(%rsp), %rcx
movb 0x206(%rcx), %al
addb $0x1, %al
movb %al, 0x206(%rcx)
movzbl %al, %ecx
andl $0xf, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, 0x7(%rsp)
jne 0x3111
movq 0x8(%rsp), %rcx
movslq 0x14(%rsp), %rax
movzwl 0x4(%rcx,%rax,2), %eax
movl 0x14(%rsp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movzwl 0x4(%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
setle %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x311b
jmp 0x3132
movq 0x8(%rsp), %rax
movslq 0x14(%rsp), %rcx
movb 0x207(%rax,%rcx), %al
movb %al, 0x6(%rsp)
jmp 0x3144
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x3220
movb %al, 0x6(%rsp)
movb 0x6(%rsp), %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: Infinidat[P]slimfastq/./filer.hpp
// Function: FilerSave::put(unsigned char)
inline bool put(UCHAR c) {
        rarely_if(m_cur >= FILER_PAGE)
            save_page();
        m_buff[m_cur++] = c;
        return m_valid;
    }

// Assembly:
subq $0x18, %rsp
movb %sil, %al
movq %rdi, 0x10(%rsp)
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x2000, 0x2018(%rax) # imm = 0x2000
jb 0x3191
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x6f20
movq (%rsp), %rax
movb 0xf(%rsp), %dl
movq 0x2018(%rax), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x2018(%rax)
movb %dl, 0x9(%rax,%rcx)
movb 0x8(%rax), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopl (%rax)
// File: Infinidat[P]slimfastq/./power_ranger.hpp
// Function: PowerRanger::down_level(int)
inline UCHAR down_level(int i) {

        UCHAR t = syms[i  ];
        syms[i] = syms[i-1];
        syms[i-1] = t;

        UINT16 f = freq[i];
        freq[i]  = freq[i-1];
        freq[i-1] = f;

        return t;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movslq -0xc(%rsp), %rcx
movb 0x207(%rax,%rcx), %cl
movb %cl, -0xd(%rsp)
movl -0xc(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb 0x207(%rax,%rcx), %dl
movslq -0xc(%rsp), %rcx
movb %dl, 0x207(%rax,%rcx)
movb -0xd(%rsp), %dl
movl -0xc(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, 0x207(%rax,%rcx)
movslq -0xc(%rsp), %rcx
movw 0x4(%rax,%rcx,2), %cx
movw %cx, -0x10(%rsp)
movl -0xc(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movw 0x4(%rax,%rcx,2), %dx
movslq -0xc(%rsp), %rcx
movw %dx, 0x4(%rax,%rcx,2)
movw -0x10(%rsp), %dx
movl -0xc(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movw %dx, 0x4(%rax,%rcx,2)
movb -0xd(%rsp), %al
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: Infinidat[P]slimfastq/./coder.hpp
// Function: RCoder::Decode(unsigned int, unsigned int, unsigned int)
void Decode (UINT32 cumFreq, UINT32 freq, UINT32 totFreq) {
        UINT32 temp = cumFreq*range;
        low  += temp;
        code -= temp;
        range*= freq;

        while( range<TOP ) {
            rarely_if ( (low^(low+range)) & (0xffULL<<56) )
                range = ((UINT32(low)|(TOP-1))-UINT32(low));
            code <<=8;
            code |= m_in->get();
            range<<=8;
            low  <<=8;
        }
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x1c(%rsp), %ecx
imull 0x10(%rax), %ecx
movl %ecx, 0x10(%rsp)
movl 0x10(%rsp), %ecx
addq (%rax), %rcx
movq %rcx, (%rax)
movl 0x10(%rsp), %ecx
movl %ecx, %edx
movq 0x8(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x8(%rax)
movl 0x18(%rsp), %ecx
imull 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movq 0x8(%rsp), %rax
cmpl $0x1000000, 0x10(%rax)  # imm = 0x1000000
jae 0x3444
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq (%rdx), %rcx
movl 0x10(%rdx), %edx
addq %rdx, %rcx
xorq %rcx, %rax
movabsq $-0x100000000000000, %rcx # imm = 0xFF00000000000000
andq %rcx, %rax
cmpq $0x0, %rax
je 0x3400
movq 0x8(%rsp), %rax
movq (%rax), %rcx
orl $0xffffff, %ecx         # imm = 0xFFFFFF
movq (%rax), %rdx
subl %edx, %ecx
movl %ecx, 0x10(%rax)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
shlq $0x8, %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rax), %rdi
callq 0x32c0
movb %al, %cl
movq 0x8(%rsp), %rax
movzbl %cl, %ecx
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movl 0x10(%rax), %ecx
shll $0x8, %ecx
movl %ecx, 0x10(%rax)
movq (%rax), %rcx
shlq $0x8, %rcx
movq %rcx, (%rax)
jmp 0x33b1
addq $0x28, %rsp
retq
nopl (%rax)