LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: scrambler::add_node(char const*, scrambler::node*, scrambler::node*, scrambler::node*, scrambler::node*)
void add_node(const char *s, node *n1, node *n2, node *n3, node *n4)
{
    assert(s); // s must be a top-level SMT-LIB command

    node *ret = new node;
    ret->symbol = s;
    ret->is_name = false;
    ret->needs_parens = true;

    if (n1) {
        ret->children.push_back(n1);
    }
    if (n2) {
        ret->children.push_back(n2);
    }
    if (n3) {
        ret->children.push_back(n3);
    }
    if (n4) {
        ret->children.push_back(n4);
    }

    commands.push_back(ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
testq %rdi, %rdi
je 0x3e42
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r15
movl $0x30, %edi
callq 0x3270
movq %rax, %rbx
movq 0xf265(%rip), %rax      # 0x12f88
addq $0x18, %rax
movq %rax, (%rbx)
leaq 0x10(%rbx), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq %rbx, 0x10(%rsp)
movq %r15, %rdi
callq 0x3100
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x32b0
movb $0x0, 0x8(%rbx)
movb $0x1, 0x28(%rbx)
testq %rbp, %rbp
je 0x3d8d
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x3d7e
movq %rbp, (%rsi)
addq $0x8, 0x18(%rbx)
jmp 0x3d8d
leaq 0x30(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x6e92
testq %r13, %r13
je 0x3db5
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x3da6
movq %r13, (%rsi)
addq $0x8, 0x18(%rbx)
jmp 0x3db5
leaq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x6e92
testq %r12, %r12
je 0x3ddd
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x3dce
movq %r12, (%rsi)
addq $0x8, 0x18(%rbx)
jmp 0x3ddd
leaq 0x20(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x6e92
testq %r14, %r14
je 0x3e05
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x3df6
movq %r14, (%rsi)
addq $0x8, 0x18(%rbx)
jmp 0x3e05
leaq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x6e92
movq 0xf4fc(%rip), %rsi      # 0x13308
cmpq 0xf4fd(%rip), %rsi      # 0x13310
je 0x3e22
movq %rbx, (%rsi)
addq $0x8, 0xf4e8(%rip)      # 0x13308
jmp 0x3e33
leaq 0xf4d7(%rip), %rdi      # 0x13300
leaq 0x10(%rsp), %rdx
callq 0x6e92
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x82de(%rip), %rdi      # 0xc127
leaq 0x81dd(%rip), %rsi      # 0xc02d
leaq 0x8206(%rip), %rcx      # 0xc05d
movl $0xe4, %edx
callq 0x31a0
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: scrambler::make_node(char const*, scrambler::node*, scrambler::node*)
node *make_node(const char *s, node *n1, node *n2)
{
    node *ret = new node;
    ret->needs_parens = true;
    if (s) {
        ret->symbol = s;
    }
    ret->is_name = false;
    if (n1) {
        ret->children.push_back(n1);
    }
    if (n2) {
        ret->children.push_back(n2);
    }
    if (!ret->symbol.empty() && ret->children.empty()) {
        ret->needs_parens = false;
    }
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
movl $0x30, %edi
callq 0x3270
movq %rax, %r15
movq %rax, %rbx
movq 0xf0f1(%rip), %rax      # 0x12f88
addq $0x18, %rax
movq %rax, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq $0x0, 0x20(%r15)
movb $0x1, 0x28(%r15)
testq %r13, %r13
je 0x3ece
movq %r13, %rdi
callq 0x3100
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x32b0
addq $0x10, %r15
movb $0x0, 0x8(%rbx)
testq %r12, %r12
je 0x3efc
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x3eef
movq %r12, (%rsi)
addq $0x8, 0x18(%rbx)
jmp 0x3efc
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0x6e92
testq %r14, %r14
je 0x3f20
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x3f15
movq %r14, (%rsi)
addq $0x8, 0x18(%rbx)
jmp 0x3f20
movq %rsp, %rdx
movq %r15, %rdi
callq 0x6e92
movq (%rbx), %rax
cmpq $0x0, -0x18(%rax)
je 0x3f38
movq 0x10(%rbx), %rax
cmpq 0x18(%rbx), %rax
jne 0x3f38
movb $0x0, 0x28(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: scrambler::make_node(std::vector<scrambler::node*, std::allocator<scrambler::node*>> const*)
node *make_node(const std::vector<node *> *v)
{
    node *ret = new node;
    ret->needs_parens = true;
    ret->symbol = "";
    ret->is_name = false;
    ret->children.assign(v->begin(), v->end());
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x30, %edi
callq 0x3270
movq %rax, %r14
movq 0xf023(%rip), %rax      # 0x12f88
addq $0x18, %rax
movq %rax, (%r14)
leaq 0x10(%r14), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
movb $0x1, 0x28(%r14)
leaq 0x89ea(%rip), %rsi      # 0xc976
movq %r14, %rdi
xorl %edx, %edx
callq 0x32b0
movb $0x0, 0x8(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r15, %rdi
callq 0x6f68
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: scrambler::make_node(scrambler::node*, std::vector<scrambler::node*, std::allocator<scrambler::node*>> const*)
node *make_node(node *n, const std::vector<node *> *v)
{
    node *ret = new node;
    ret->needs_parens = true;
    ret->symbol = "";
    ret->is_name = false;
    ret->children.push_back(n);
    ret->children.insert(ret->children.end(), v->begin(), v->end());
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r12
movq %rdi, (%rsp)
movl $0x30, %edi
callq 0x3270
movq %rax, %rbx
movq 0xefaf(%rip), %rax      # 0x12f88
addq $0x18, %rax
movq %rax, (%rbx)
leaq 0x10(%rbx), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movb $0x1, 0x28(%rbx)
leaq 0x8978(%rip), %rsi      # 0xc976
movq %rbx, %rdi
xorl %edx, %edx
callq 0x32b0
movb $0x0, 0x8(%rbx)
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x4027
movq %r12, (%rsi)
movq 0x18(%rbx), %rsi
addq $0x8, %rsi
movq %rsi, 0x18(%rbx)
jmp 0x4036
movq %rsp, %rdx
movq %r15, %rdi
callq 0x6e92
movq 0x18(%rbx), %rsi
movq (%r14), %rdx
movq 0x8(%r14), %rcx
movq %r15, %rdi
callq 0x6c7e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: scrambler::make_name_node(char const*, scrambler::node*)
node *make_name_node(const char* s, node *n1)
{
    node *ret = new node;
    assert(s);
    ret->symbol = s;
    ret->is_name = true;
    ret->needs_parens = false;
    if (n1) {
        ret->children.push_back(n1);
        ret->needs_parens = true;
    }
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
movl $0x30, %edi
callq 0x3270
movq %rax, %rbx
movq 0xef0c(%rip), %rax      # 0x12f88
addq $0x18, %rax
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
testq %r15, %r15
je 0x40f0
movq %r15, %rdi
callq 0x3100
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x32b0
movb $0x1, 0x8(%rbx)
movb $0x0, 0x28(%rbx)
testq %r14, %r14
je 0x40e3
movq 0x18(%rbx), %rsi
cmpq 0x20(%rbx), %rsi
je 0x40ce
movq %r14, (%rsi)
addq $0x8, 0x18(%rbx)
jmp 0x40df
movq %rbx, %rdi
addq $0x10, %rdi
leaq 0x8(%rsp), %rdx
callq 0x6e92
movb $0x1, 0x28(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8030(%rip), %rdi      # 0xc127
leaq 0x7f2f(%rip), %rsi      # 0xc02d
leaq 0x7f9f(%rip), %rcx      # 0xc0a4
movl $0x127, %edx            # imm = 0x127
callq 0x31a0
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: scrambler::shuffle_list(std::vector<scrambler::node*, std::allocator<scrambler::node*>>*, unsigned long, unsigned long)
void shuffle_list(std::vector<scrambler::node *> *v, size_t start, size_t end)
{
    if (!no_scramble) {
        size_t n = end - start;
        for (size_t i = n-1; i > 0; --i) {
            std::swap((*v)[i+start], (*v)[next_rand_int(i+1)+start]);
        }
    }
}

// Assembly:
cmpb $0x0, 0xf13b(%rip)      # 0x132b0
jne 0x41eb
movq %rdx, %rcx
movq %rsi, %rax
notq %rax
addq %rdx, %rax
je 0x41eb
pushq %rbx
movq 0xf11b(%rip), %r8       # 0x132a8
movq %rsi, %r9
negq %r9
movabsq $0x5deece66d, %r10      # imm = 0x5DEECE66D
imulq %r10, %r8
movq (%rdi), %r11
leaq (%r9,%rcx), %rbx
addq $0xb, %r8
btrq $0x31, %r8
movq %r8, %rax
shrq $0x10, %rax
xorl %edx, %edx
divq %rbx
leaq (%r11,%rdx,8), %rax
movq -0x8(%r11,%rcx,8), %rdx
movq (%rax,%rsi,8), %rbx
movq %rbx, -0x8(%r11,%rcx,8)
movq %rdx, (%rax,%rsi,8)
leaq (%r9,%rcx), %rax
decq %rax
decq %rcx
cmpq $0x1, %rax
jne 0x419d
movq %r8, 0xf0be(%rip)       # 0x132a8
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: logic_is_dl()
bool logic_is_dl()  // Difference Logic: IDL, RDL
{
    static int result = -1;
    if (result == -1) {
        if (logic.empty()) {
            std::cerr << "ERROR logic has not been set" << std::endl;
            exit(1);
        }

        if (logic.find("IDL") != std::string::npos || logic.find("RDL") != std::string::npos) {
            result = 1;
        } else {
            result = 0;
        }
    }

    return (result == 1);
}

// Assembly:
pushq %rax
movl 0xf018(%rip), %ecx      # 0x13260
cmpl $-0x1, %ecx
jne 0x42a9
movq 0xf0c4(%rip), %rax      # 0x13318
cmpq $0x0, -0x18(%rax)
je 0x42b1
leaq 0xf0b6(%rip), %rdi      # 0x13318
leaq 0x7ea9(%rip), %rsi      # 0xc112
movl $0x3, %ecx
xorl %edx, %edx
callq 0x3090
movl $0x1, %ecx
cmpq $-0x1, %rax
jne 0x42a3
leaq 0xf091(%rip), %rdi      # 0x13318
leaq 0x7e88(%rip), %rsi      # 0xc116
movl $0x3, %ecx
xorl %edx, %edx
callq 0x3090
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
movl %ecx, 0xefb7(%rip)      # 0x13260
cmpl $0x1, %ecx
sete %al
popq %rcx
retq
movq 0xed38(%rip), %rdi      # 0x12ff0
leaq 0x7e36(%rip), %rsi      # 0xc0f5
callq 0x3260
movq %rax, %rdi
callq 0x3120
movl $0x1, %edi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: logic_is_arith()
bool logic_is_arith()  // Arithmetic: IA, RA, IRA
{
    static int result = -1;
    if (result == -1) {
        if (logic.empty()) {
            std::cerr << "ERROR logic has not been set" << std::endl;
            exit(1);
        }

        if (logic.find("IA") != std::string::npos || logic.find("RA") != std::string::npos) {
            result = 1;
        } else {
            result = 0;
        }
    }

    return (result == 1);
}

// Assembly:
pushq %rax
movl 0xef87(%rip), %ecx      # 0x13264
cmpl $-0x1, %ecx
jne 0x433e
movq 0xf02f(%rip), %rax      # 0x13318
cmpq $0x0, -0x18(%rax)
je 0x4346
leaq 0xf021(%rip), %rdi      # 0x13318
leaq 0x7e1c(%rip), %rsi      # 0xc11a
movl $0x2, %ecx
xorl %edx, %edx
callq 0x3090
movl $0x1, %ecx
cmpq $-0x1, %rax
jne 0x4338
leaq 0xeffc(%rip), %rdi      # 0x13318
leaq 0x7dfa(%rip), %rsi      # 0xc11d
movl $0x2, %ecx
xorl %edx, %edx
callq 0x3090
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
movl %ecx, 0xef26(%rip)      # 0x13264
cmpl $0x1, %ecx
sete %al
popq %rcx
retq
movq 0xeca3(%rip), %rdi      # 0x12ff0
leaq 0x7da1(%rip), %rsi      # 0xc0f5
callq 0x3260
movq %rax, %rdi
callq 0x3120
movl $0x1, %edi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: logic_is_bv()
bool logic_is_bv()  // BitVectors (BV)
{
    static int result = -1;
    if (result == -1) {
        if (logic.empty()) {
            std::cerr << "ERROR logic has not been set" << std::endl;
            exit(1);
        }

        if (logic.find("BV") != std::string::npos) {
            result = 1;
        } else {
            result = 0;
        }
    }

    return result == 1;
}

// Assembly:
pushq %rax
movl 0xeef6(%rip), %ecx      # 0x13268
cmpl $-0x1, %ecx
jne 0x43ae
movq 0xef9a(%rip), %rax      # 0x13318
cmpq $0x0, -0x18(%rax)
je 0x43b6
leaq 0xef8c(%rip), %rdi      # 0x13318
leaq 0x7d8d(%rip), %rsi      # 0xc120
movl $0x2, %ecx
xorl %edx, %edx
callq 0x3090
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
movl %ecx, 0xeeba(%rip)      # 0x13268
cmpl $0x1, %ecx
sete %al
popq %rcx
retq
movq 0xec33(%rip), %rdi      # 0x12ff0
leaq 0x7d31(%rip), %rsi      # 0xc0f5
callq 0x3260
movq %rax, %rdi
callq 0x3120
movl $0x1, %edi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: logic_is_fp()
bool logic_is_fp()  // FloatingPoint (FP)
{
    static int result = -1;
    if (result == -1) {
        if (logic.empty()) {
            std::cerr << "ERROR logic has not been set" << std::endl;
            exit(1);
        }

        if (logic.find("FP") != std::string::npos) {
            result = 1;
        } else {
            result = 0;
        }
    }

    return result == 1;
}

// Assembly:
pushq %rax
movl 0xee8a(%rip), %ecx      # 0x1326c
cmpl $-0x1, %ecx
jne 0x441e
movq 0xef2a(%rip), %rax      # 0x13318
cmpq $0x0, -0x18(%rax)
je 0x4426
leaq 0xef1c(%rip), %rdi      # 0x13318
leaq 0x7d20(%rip), %rsi      # 0xc123
movl $0x2, %ecx
xorl %edx, %edx
callq 0x3090
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
movl %ecx, 0xee4e(%rip)      # 0x1326c
cmpl $0x1, %ecx
sete %al
popq %rcx
retq
movq 0xebc3(%rip), %rdi      # 0x12ff0
leaq 0x7cc1(%rip), %rsi      # 0xc0f5
callq 0x3260
movq %rax, %rdi
callq 0x3120
movl $0x1, %edi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: make_annotation_name()
std::string make_annotation_name()
{
    static uint64_t n = 1;
    std::ostringstream tmp;
    tmp << "smtcomp" << n;
    ++n;
    return tmp.str();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3080
leaq 0x7fec(%rip), %rsi      # 0xc9f2
movl $0x7, %edx
movq %r14, %rdi
callq 0x32a0
movq 0xe856(%rip), %rsi      # 0x13270
leaq 0x8(%rsp), %rdi
callq 0x31b0
incq 0xe845(%rip)            # 0x13270
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x31e0
movq 0xe559(%rip), %rsi      # 0x12f98
leaq 0x8(%rsp), %rdi
callq 0x33b0
leaq 0x60(%rsp), %rdi
callq 0x30d0
movq %rbx, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0xe52d(%rip), %rsi      # 0x12f98
leaq 0x8(%rsp), %rdi
callq 0x33b0
leaq 0x60(%rsp), %rdi
callq 0x30d0
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: filter_named(std::unordered_set<std::string, std::hash<std::string>, std::equal_to<std::string>, std::allocator<std::string>> const&)
void filter_named(const StringSet &to_keep)
{
    size_t i, k;
    for (i = k = 0; i < commands.size(); ++i) {
        scrambler::node *cur = commands[i];
        bool keep = true;
        if (cur->symbol == "assert") {
            std::string name = get_named_annot(cur);
            if (!name.empty() && to_keep.find(name) == to_keep.end()) {
                keep = false;
            }
        }
        if (keep) {
            commands[k++] = cur;
        }
    }
    commands.resize(k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0xdbb1(%rip), %rax      # 0x13300
cmpq %rax, 0xdbb2(%rip)      # 0x13308
je 0x57fe
xorl %ebx, %ebx
leaq 0x89f9(%rip), %r15      # 0xe15e
leaq 0x8(%rsp), %r12
xorl %r14d, %r14d
movq (%rax,%rbx,8), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x30a0
testl %eax, %eax
je 0x57ad
movq 0xdb79(%rip), %rax      # 0x13300
movq %r13, (%rax,%r14,8)
incq %r14
incq %rbx
movq 0xdb70(%rip), %rcx      # 0x13308
movq 0xdb61(%rip), %rax      # 0x13300
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbx
jb 0x576d
jmp 0x5801
movq %r12, %rdi
movq %r13, %rsi
callq 0x54f6
movq 0x8(%rsp), %rdi
cmpq $0x0, -0x18(%rdi)
je 0x57ee
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x7f82
movq %rax, %rbp
movq 0x8(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x5(%rsp), %rsi
callq 0x3170
testq %rbp, %rbp
jne 0x5780
jmp 0x578e
addq $-0x18, %rdi
leaq 0x7(%rsp), %rsi
callq 0x3170
jmp 0x5780
xorl %r14d, %r14d
leaq 0xdaf8(%rip), %rdi      # 0x13300
movq %r14, %rsi
callq 0x6610
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
addq $-0x18, %rdi
leaq 0x6(%rsp), %rsi
callq 0x3170
movq %rbx, %rdi
callq 0x3410
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/scrambler.cpp
// Function: c_strdup(char const*)
char *c_strdup(const char *s)
{
    char *ret = (char *)malloc(strlen(s) + 1);
    if (ret == NULL) {
        exit(1);
    }

    strcpy(ret, s);
    return ret;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3100
leaq 0x1(%rax), %rdi
callq 0x3310
testq %rax, %rax
je 0x5860
movq %rax, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x3230
movl $0x1, %edi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O3/SMT-COMP[P]scrambler/parser.cpp
// Function: yy_symbol_print(_IO_FILE*, yysymbol_kind_t, YYSTYPE const*, YYLTYPE const*)
static void
yy_symbol_print (FILE *yyo,
                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
{
  YYFPRINTF (yyo, "%s %s (",
             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));

  YYLOCATION_PRINT (yyo, yylocationp);
  YYFPRINTF (yyo, ": ");
  yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp);
  YYFPRINTF (yyo, ")");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
cmpl $0x2e, %esi
leaq 0x474f(%rip), %rax      # 0xdf73
leaq 0x474e(%rip), %rdx      # 0xdf79
cmovlq %rax, %rdx
movq %rdi, %rbx
movslq %esi, %rax
leaq 0x9214(%rip), %rcx      # 0x12a50
movq (%rcx,%rax,8), %rcx
leaq 0x4724(%rip), %rsi      # 0xdf6b
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x3340
movl (%r14), %edx
movl 0xc(%r14), %ebp
subl $0x1, %ebp
cmovbl %r15d, %ebp
testl %edx, %edx
js 0x988d
leaq 0x46fe(%rip), %rsi      # 0xdf68
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3340
movl 0x4(%r14), %edx
testl %edx, %edx
js 0x988d
leaq 0x4b50(%rip), %rsi      # 0xe3d3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3340
movl 0x8(%r14), %edx
testl %edx, %edx
js 0x98d5
cmpl %edx, (%r14)
jge 0x98b8
leaq 0x4b36(%rip), %rsi      # 0xe3d7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3340
testl %ebp, %ebp
js 0x98d5
leaq 0x4b1d(%rip), %rsi      # 0xe3d3
jmp 0x98c9
testl %ebp, %ebp
js 0x98d5
cmpl %ebp, 0x4(%r14)
jge 0x98d5
leaq 0x4b0e(%rip), %rsi      # 0xe3d7
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x3340
leaq 0x467e(%rip), %rdi      # 0xdf5a
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x3460
movl $0x29, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x32e0
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day05/ex03/Intern.cpp
// Function: Intern::Intern()
Intern::Intern(void)
{
	this->constructors[0] = ShrubberyCreationForm::constructor;
	this->formNames[0] = "shrubbery";
	this->constructors[1] = RobotomyRequestForm::constructor;
	this->formNames[1] = "robotomy";
	this->constructors[2] = PresidentialPardonForm::constructor;
	this->formNames[2] = "presidential";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x10, %eax
leaq (%rbx,%rax), %rcx
movq %rcx, -0x10(%rbx,%rax)
movq $0x0, -0x8(%rbx,%rax)
movb $0x0, (%rbx,%rax)
addq $0x20, %rax
cmpq $0x70, %rax
jne 0x3006
leaq 0x60(%rbx), %r14
leaq 0xfd7(%rip), %rax       # 0x4008
movq %rax, 0x60(%rbx)
movq 0x8(%rbx), %rdx
leaq 0x23ae(%rip), %rcx      # 0x53ee
movl $0x9, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2180
leaq 0xa73(%rip), %rax       # 0x3aca
movq %rax, 0x68(%rbx)
leaq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rdx
leaq 0x211d(%rip), %rcx      # 0x5187
movl $0x8, %r8d
xorl %esi, %esi
callq 0x2180
leaq 0x55a(%rip), %rax       # 0x35d8
movq %rax, 0x70(%rbx)
leaq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rdx
leaq 0x20ff(%rip), %rcx      # 0x5190
movl $0xc, %r8d
xorl %esi, %esi
callq 0x2180
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2210
movq %r15, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day05/ex03/Bureaucrat.cpp
// Function: Bureaucrat::setGrade(int)
void Bureaucrat::setGrade(int grade)
{
	if (grade < 1)
		throw GradeTooHighException();
	if (grade > 150)
		throw GradeTooLowException();
	this->grade = grade;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
jle 0x258f
cmpl $0x97, %esi
jae 0x25ac
movl %esi, 0x20(%rdi)
popq %rbp
retq
movl $0x8, %edi
callq 0x2080
leaq 0x5598(%rip), %rcx      # 0x7b38
movq %rcx, (%rax)
leaq 0x55ce(%rip), %rsi      # 0x7b78
jmp 0x25c7
movl $0x8, %edi
callq 0x2080
leaq 0x55a3(%rip), %rcx      # 0x7b60
movq %rcx, (%rax)
leaq 0x55c9(%rip), %rsi      # 0x7b90
movq 0x5a12(%rip), %rdx      # 0x7fe0
movq %rax, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day05/ex03/Form.cpp
// Function: Form::Form(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
Form::Form(std::string name, int requiredSignatureGrade, int requiredExecutionGrade) : name(name), requiredSignatureGrade(requiredSignatureGrade), requiredExecutionGrade(requiredExecutionGrade)
{
	if (requiredExecutionGrade < 1 || requiredSignatureGrade < 1)
		throw GradeTooHighException();
	if (requiredExecutionGrade > 150 || requiredSignatureGrade > 150)
		throw GradeTooLowException();
	this->hasBeenSigned = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r12d
movl %edx, %r13d
movq %rdi, %r14
leaq 0x511b(%rip), %rax      # 0x7c30
movq %rax, (%rdi)
addq $0x8, %rdi
leaq 0x18(%r14), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x8(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rdi, -0x38(%rbp)
movq %rax, %rsi
callq 0x2a24
movl %r13d, 0x2c(%r14)
movl %r12d, 0x30(%r14)
leaq 0x512b(%rip), %r15      # 0x7c78
leaq 0x508c(%rip), %rbx      # 0x7be0
testl %r13d, %r13d
jle 0x2b92
testl %r12d, %r12d
jle 0x2b92
leaq 0x50fb(%rip), %r15      # 0x7c60
leaq 0x504c(%rip), %rbx      # 0x7bb8
cmpl $0x96, %r13d
ja 0x2b92
cmpl $0x97, %r12d
jae 0x2b92
movb $0x0, 0x28(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x2080
movq %rbx, (%rax)
movq 0x543a(%rip), %rdx      # 0x7fe0
movq %rax, %rdi
movq %r15, %rsi
callq 0x21a0
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0x2bd0
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2110
movq %r14, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day05/ex03/Form.cpp
// Function: Form::beSigned(Bureaucrat&)
void			Form::beSigned(Bureaucrat &bureaucrat)
{
	if (bureaucrat.getGrade() > this->getSigningGrade())
		throw GradeTooLowException();
	std::cout << bureaucrat.getName() << " signs " << this->getName() << "." << std::endl;
	this->hasBeenSigned = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2606
cmpl 0x2c(%rbx), %eax
jg 0x2e5e
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2632
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq 0x5235(%rip), %rdi      # 0x7fd0
callq 0x2130
movq %rax, %r14
leaq 0x235c(%rip), %rsi      # 0x5106
movl $0x7, %edx
movq %rax, %rdi
callq 0x2130
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq %rsi, %rdx
leaq -0x38(%rbp), %rdi
callq 0x2a24
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq %r14, %rdi
callq 0x2130
movq %rax, %r14
leaq 0x2452(%rip), %rsi      # 0x523f
movl $0x1, %edx
movq %rax, %rdi
callq 0x2130
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x20e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2090
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x2e36
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2110
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e4f
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2110
movb $0x1, 0x28(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x2080
leaq 0x4d49(%rip), %rcx      # 0x7bb8
movq %rcx, (%rax)
leaq 0x4de7(%rip), %rsi      # 0x7c60
movq 0x5160(%rip), %rdx      # 0x7fe0
movq %rax, %rdi
callq 0x21a0
jmp 0x2e8a
movq %rax, %rbx
jmp 0x2ea7
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x2ea7
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x2110
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ec0
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day05/ex03/Form.cpp
// Function: Form::execute(Bureaucrat const&) const
void Form::execute(const Bureaucrat &executor) const
{
	if (!this->hasBeenSigned)
		throw NotSignedException();
	if (executor.getGrade() > this->requiredExecutionGrade)
		throw GradeTooLowException();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpb $0x0, 0x28(%rdi)
je 0x2f47
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x2606
cmpl 0x30(%rbx), %eax
jg 0x2f64
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x8, %edi
callq 0x2080
leaq 0x4cb0(%rip), %rcx      # 0x7c08
movq %rcx, (%rax)
leaq 0x4ce6(%rip), %rsi      # 0x7c48
jmp 0x2f7f
movl $0x8, %edi
callq 0x2080
leaq 0x4c43(%rip), %rcx      # 0x7bb8
movq %rcx, (%rax)
leaq 0x4ce1(%rip), %rsi      # 0x7c60
movq 0x505a(%rip), %rdx      # 0x7fe0
movq %rax, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day05/ex03/Intern.cpp
// Function: Intern::makeForm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Form *Intern::makeForm(std::string formName, std::string target)
{
	for (unsigned int i = 0; i < 3; i++)
	{
		if (this->formNames[i] == formName)
		{
			return ((this->constructors[i])(target));
		}
	}
	std::cout << "No form with name " << formName << "." << std::endl;
	return (nullptr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rsi), %r12
movq $-0x18, %r13
cmpq %r12, 0x68(%r15,%r13,4)
jne 0x3179
testq %r12, %r12
je 0x31eb
movq (%rbx), %rsi
movq 0x60(%r15,%r13,4), %rdi
movq %r12, %rdx
callq 0x2120
testl %eax, %eax
je 0x31eb
addq $0x8, %r13
jne 0x3155
movq 0x4e4a(%rip), %r14      # 0x7fd0
leaq 0x2010(%rip), %rsi      # 0x519d
movl $0x12, %edx
movq %r14, %rdi
callq 0x2130
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x2130
movq %rax, %rbx
leaq 0x208c(%rip), %rsi      # 0x523f
movl $0x1, %edx
movq %rax, %rdi
callq 0x2130
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2090
xorl %ebx, %ebx
jmp 0x322c
movq 0x78(%r15,%r13), %r12
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x2a24
movq %rbx, %rdi
callq *%r12
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x322c
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x3256
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O3/t0mm4rx[P]piscine_cpp/day05/ex03/ShrubberyCreationForm.cpp
// Function: ShrubberyCreationForm::execute(Bureaucrat const&) const
void	ShrubberyCreationForm::execute(const Bureaucrat &bureaucrat) const
{
	std::string		filename = this->target + "_shrubbery";
	std::ofstream	file(filename);

	if (file.fail())
		throw FileErrorException();
	Form::execute(bureaucrat);
	std::cout << "Creating " << filename << "." << std::endl;
	file << this->tree;
	file.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x38(%rdi), %rsi
movq 0x40(%rdi), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x2a24
leaq 0x156e(%rip), %rsi      # 0x53ed
movq %r15, %rdi
callq 0x21e0
leaq -0x240(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x10, %edx
callq 0x21f0
movq -0x240(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x220(%rbp,%rax)
jne 0x3fab
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f24
movq 0x4109(%rip), %rdi      # 0x7fd0
leaq 0x152a(%rip), %rsi      # 0x53f8
movl $0x9, %edx
callq 0x2130
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq 0x40e9(%rip), %rdi      # 0x7fd0
callq 0x2130
movq %rax, %rbx
leaq 0x1349(%rip), %rsi      # 0x523f
movl $0x1, %edx
movq %rax, %rdi
callq 0x2130
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20e0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2090
movq 0x41ff(%rip), %rsi      # 0x8130
movq 0x4200(%rip), %rdx      # 0x8138
leaq -0x240(%rbp), %rdi
callq 0x2130
leaq -0x240(%rbp), %rdi
callq 0x2150
movq 0x4071(%rip), %rax      # 0x7fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x238(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x240(%rbp,%rcx)
callq 0x20c0
leaq -0x148(%rbp), %rdi
callq 0x2050
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x3f9b
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2110
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x2080
leaq 0x3d9c(%rip), %rcx      # 0x7d58
movq %rcx, (%rax)
leaq 0x3daa(%rip), %rsi      # 0x7d70
movq 0x4013(%rip), %rdx      # 0x7fe0
movq %rax, %rdi
callq 0x21a0
jmp 0x3fd7
movq %rax, %rbx
jmp 0x3feb
movq %rax, %rbx
leaq -0x240(%rbp), %rdi
callq 0x2160
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x4000
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2110
movq %rbx, %rdi
callq 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/vividvilla[P]hackerrank/src/largest-sum-m.cpp
// Function: largestSum(int, std::vector<int, std::allocator<int>>, int)
int largestSum(int k, vector<int> d, int M) {
    int best = 0;
    int N = d.size();
    vector<vector<bool> > s = vector<vector<bool> >(M, vector<bool>(k + 1, false));
    s[0][0] = true;

    for (int j = 0; j < N; j++) {
        for (int l = M - 1; l >= d[j]; l--) {
            for (int i = 1; i <= k; i++) {
                s[l][i] = s[l][i] || s[l - d[j]][i - 1];
                if (i == k && s[l][i] && l > best)
                    best = l;
            }
        }
    }

    return best;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, %r14d
movq %rsi, %r12
movq 0x8(%rsi), %r15
subq (%rsi), %r15
movq %rdi, 0x8(%rsp)
leal 0x1(%rdi), %ebx
movslq %ebx, %rsi
leaq 0x3(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x48(%rsp), %rbp
leaq 0x2(%rsp), %rcx
movq %rbp, %rdi
callq 0x1748
movl %r14d, 0x4(%rsp)
movslq %r14d, %rsi
leaq 0x70(%rsp), %rdi
leaq 0x1(%rsp), %rcx
movq %rsi, 0x28(%rsp)
movq %rbp, %rdx
callq 0x17b0
shrq $0x2, %r15
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1359
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x10f0
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movq (%rax), %rcx
orq $0x1, (%rcx)
testl %r15d, %r15d
jle 0x14a8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq (%r12), %rcx
movq %rcx, 0x18(%rsp)
movl 0x8(%rsp), %edi
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movl %ebx, %r8d
xorl %ecx, %ecx
addq $0x3f, %rax
movq %rax, 0x40(%rsp)
xorl %r14d, %r14d
movq %r15, 0x20(%rsp)
movabsq $-0x8000000000000000, %r10 # imm = 0x8000000000000000
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rsp)
movslq (%rax,%rcx,4), %rax
movq 0x28(%rsp), %r12
movq %rax, 0x10(%rsp)
cmpl 0x4(%rsp), %eax
jge 0x1490
decq %r12
cmpl $0x0, 0x8(%rsp)
jle 0x147f
leaq (%r12,%r12,4), %rcx
movq 0x38(%rsp), %rax
movq (%rax,%rcx,8), %rbx
movq %r12, %rcx
subq 0x10(%rsp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rax,%rcx,8), %r15
movl $0x1, %ecx
movl $0x1, %r9d
shlq %cl, %r9
movl %ecx, %r13d
shrl $0x6, %r13d
movq (%rbx,%r13,8), %rsi
btq %rcx, %rsi
jb 0x1448
leaq -0x1(%rcx), %r11
movl %r11d, %ebp
shrl $0x3, %ebp
andl $-0x8, %ebp
addq (%r15), %rbp
movq %r11, %rax
andq 0x40(%rsp), %rax
xorl %edx, %edx
cmpq %r10, %rax
setbe %dl
movq -0x8(%rbp,%rdx,8), %rax
btq %r11, %rax
jae 0x1474
orq %r9, %rsi
cmpl %r14d, %r12d
movl %r14d, %ebp
cmovgl %r12d, %ebp
testq %r9, %rsi
cmovel %r14d, %ebp
cmpq %rcx, %rdi
cmovnel %r14d, %ebp
movq %rsi, (%rbx,%r13,8)
incq %rcx
movl %ebp, %r14d
cmpq %rcx, %r8
jne 0x1403
jmp 0x1482
movq %r9, %rax
notq %rax
andq %rax, %rsi
jmp 0x144b
movl %r14d, %ebp
movl %ebp, %r14d
cmpq 0x10(%rsp), %r12
jg 0x13d3
movq 0x30(%rsp), %rcx
incq %rcx
movq 0x20(%rsp), %r15
cmpq %r15, %rcx
jne 0x13b1
jmp 0x14ab
xorl %r14d, %r14d
leaq 0x70(%rsp), %rdi
callq 0x1848
movl %r14d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x14e1
leaq 0x48(%rsp), %rdi
callq 0x1170
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/vividvilla[P]hackerrank/src/largest-sum-m.cpp
// Function: partitions(int)
int partitions(int Z) {
    vector<int> p = vector<int>(Z + 1, 0);
    p[0] = 1;

    for (int i = 1; i <= Z; i++) {
        for (int j = i; j <= Z; j++) {
            p[j] = (p[j] + p[j - i]) % MOD;
        }
    }

    return p[Z];
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
leal 0x1(%rbx), %ebp
movslq %ebp, %rsi
leaq 0x4(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x8(%rsp), %r14
leaq 0x3(%rsp), %rcx
movq %r14, %rdi
callq 0x1878
movq (%r14), %rdi
movl $0x1, (%rdi)
testl %ebx, %ebx
jle 0x157a
movl %ebp, %eax
movl $0x1, %ecx
movl $0x4, %edx
movq %rax, %rsi
movq %rdi, %r8
movl (%r8), %r9d
addl (%r8,%rdx), %r9d
movslq %r9d, %r9
imulq $0x44b82f99, %r9, %r10  # imm = 0x44B82F99
movq %r10, %r11
shrq $0x3f, %r11
sarq $0x3c, %r10
addl %r11d, %r10d
imull $0x3b9aca07, %r10d, %r10d # imm = 0x3B9ACA07
subl %r10d, %r9d
movl %r9d, (%r8,%rdx)
addq $0x4, %r8
decq %rsi
cmpq %rsi, %rcx
jne 0x1535
incq %rcx
addq $0x4, %rdx
cmpq %rax, %rcx
jne 0x152f
movslq %ebx, %rax
movl (%rdi,%rax,4), %ebx
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x10f0
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/vividvilla[P]hackerrank/src/largest-sum-m.cpp
// Function: main
int main() {
    int n, k, M, x;
    cin >> n >> k >> M;

    vector<int> d;
    for (int i = 0; i < n; i++) {
        cin >> x;
        d.push_back(x);
    }

    int Z = largestSum(k, d, M);
    cout << Z << endl;
    cout << partitions(Z) << endl;

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq 0x2a37(%rip), %rdi      # 0x3fe0
leaq 0xc(%rsp), %rbx
movq %rbx, %rsi
callq 0x1090
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x1090
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0x1090
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x0, (%rbx)
jle 0x1631
xorl %ebp, %ebp
movq 0x29f1(%rip), %rbx      # 0x3fe0
movq %rsp, %r14
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1090
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x161e
movl (%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x1629
movq %r15, %rdi
movq %r14, %rdx
callq 0x1d52
incl %ebp
cmpl 0xc(%rsp), %ebp
jl 0x15f7
movl 0x8(%rsp), %ebx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x19f4
movl 0x4(%rsp), %edx
leaq 0x30(%rsp), %rsi
movl %ebx, %edi
callq 0x12dc
movl %eax, %ebx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x166d
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x10f0
movq 0x295c(%rip), %rdi      # 0x3fd0
movl %ebx, %esi
callq 0x1140
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movl %ebx, %edi
callq 0x14e9
movq 0x291d(%rip), %rdi      # 0x3fd0
movl %eax, %esi
callq 0x1140
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x16fb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10f0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1729
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x10f0
jmp 0x1729
jmp 0x1726
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1740
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10f0
movq %rbx, %rdi
callq 0x1150
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/static_search_trees.cpp
// Function: co_static_search_tree::get_tree_height_pwr_2(int, int, int, int, int)
int co_static_search_tree::get_tree_height_pwr_2(int block_index, int height, int range_left, int og_height, int value) {
    int inner_block_index = 0;
    int depth = 1;
    int path = 0;
    int length = (1 << (og_height - 2));
    while (depth != height)
    {
        this->block_index_memo[depth] = inner_block_index;
        int left_child_inner_block_index = this->left_child(inner_block_index, depth, path);
        if (value <= this->tree[block_index + left_child_inner_block_index])
        {
            path <<= 1;
            inner_block_index = left_child_inner_block_index;
        }
        else {
            inner_block_index = this->right_child(inner_block_index, depth, path);
            path = (path << 1) | 1;
            range_left += length;
        }
        length >>= 1;
        depth += 1;
    }
    return range_left;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r9d, -0x4(%rsp)
movl %ecx, %eax
cmpl $0x1, %edx
je 0x1cfa
addb $-0x2, %r8b
movl $0x1, %r10d
movl %r8d, %ecx
shll %cl, %r10d
movq (%rdi), %r9
movl %edx, %edx
decq %rdx
xorl %ebx, %ebx
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %rbx, %r13
incq %rbx
movl %r15d, 0x24(%rdi,%r13,4)
testb $0x1, %bl
jne 0x1cc0
movl %ebx, %ecx
andl %r11d, %ecx
addl %r14d, %r14d
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
shll %cl, %r12d
notl %r12d
movl %r14d, %r8d
andl %r12d, %r8d
incl %r13d
orl $0x1, %r13d
subl %ecx, %r13d
incl %r8d
movl %r8d, %r15d
shll %cl, %r15d
movslq %r13d, %r13
movl 0x20(%rdi,%r13,4), %ebp
subl %r8d, %r15d
addl %ebp, %r15d
leal (%r15,%rsi), %r8d
movslq %r8d, %r8
movl -0x4(%rsp), %r13d
cmpl %r13d, (%r9,%r8,4)
jge 0x1ceb
orl $0x1, %r14d
andl %r14d, %r12d
leal 0x1(%r12), %r8d
shll %cl, %r8d
notl %r12d
addl %ebp, %r12d
addl %r8d, %r12d
movl %r12d, %r15d
jmp 0x1ce0
leal (%r15,%rsi), %ecx
incl %ecx
movslq %ecx, %rcx
movl -0x4(%rsp), %r8d
cmpl %r8d, (%r9,%rcx,4)
jge 0x1ce5
addl $0x2, %r15d
leal 0x1(,%r14,2), %r14d
addl %r10d, %eax
jmp 0x1ceb
incl %r15d
addl %r14d, %r14d
sarl %r10d
decl %r11d
cmpq %rbx, %rdx
jne 0x1c46
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/static_search_trees.cpp
// Function: built_co_static_search_tree::van_emde_boas_build(int, int, int, int)
void built_co_static_search_tree::van_emde_boas_build(int tree_l, int h, int og_height, int bfs_order) {
    if (h == 1)
    {
        this->temp_tree[bfs_order] = tree_l;
        return;
    }

    int bottom_tree_h = bottom_tree_height_memo[h];
    int top_tree_h = h - bottom_tree_h;

    this->van_emde_boas_build(tree_l, top_tree_h, og_height, bfs_order);
    
    int top_tree_size = (1 << top_tree_h) - 1;

    int bottom_tree_og_height = og_height - top_tree_h;
    int bottom_tree_size = (1 << bottom_tree_h) - 1;
    int bottom_tree_tree_l = tree_l + top_tree_size;

    for (int bottom_tree_index = 0; bottom_tree_index < (1 << top_tree_h); ++bottom_tree_index) {
        int bottom_tree_bfs_order = (bfs_order << top_tree_h) | bottom_tree_index;
        this->van_emde_boas_build(bottom_tree_tree_l, bottom_tree_h, bottom_tree_og_height, bottom_tree_bfs_order);
        bottom_tree_tree_l += bottom_tree_size;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, (%rsp)
movl %ecx, 0x4(%rsp)
movl %esi, %r12d
movq %rdi, %r14
cmpl $0x1, %edx
jne 0x1dda
movq 0x8(%r14), %rax
movslq (%rsp), %rcx
movl %r12d, (%rax,%rcx,4)
jmp 0x1e50
movl %edx, %ebx
movslq %edx, %rax
leaq 0x225a(%rip), %rcx      # 0x4040
movl (%rcx,%rax,4), %r15d
subl %r15d, %ebx
movq %r14, %rdi
movl %r12d, %esi
movl %ebx, %edx
movl 0x4(%rsp), %ecx
movl (%rsp), %r8d
callq 0x1dae
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl %r15d, %ecx
shll %cl, %r13d
cmpl $0x1f, %ebx
je 0x1e50
movl $0x1, %ebp
movl %ebx, %ecx
shll %cl, %ebp
subl %ebx, 0x4(%rsp)
notl %r13d
addl %ebp, %r12d
decl %r12d
shll %cl, (%rsp)
xorl %ebx, %ebx
movl %ebx, %r8d
orl (%rsp), %r8d
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
movl 0x4(%rsp), %ecx
callq 0x1dae
addl %r13d, %r12d
incl %ebx
cmpl %ebx, %ebp
jne 0x1e2e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/static_search_trees.cpp
// Function: built_co_static_search_tree::build(int, int)
void built_co_static_search_tree::build(int index, int h) {
    if(h == 1) {
        return;
    }
    int van_emde_boas_index = this->temp_tree[index];
    this->tree[van_emde_boas_index * 3 + 1] = this->temp_tree[index << 1] * 3;
    this->tree[van_emde_boas_index * 3 + 2] = this->temp_tree[(index << 1) + 1] * 3;
    this->build(index << 1, h-1);
    this->build((index << 1) + 1, h-1);
}

// Assembly:
cmpl $0x1, %edx
je 0x1eba
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
decl %ebx
movq (%r14), %rax
movq 0x8(%r14), %rcx
movslq %ebp, %rdx
movslq (%rcx,%rdx,4), %rdi
leal (%rdx,%rdx), %esi
movslq %esi, %rsi
movl (%rcx,%rsi,4), %r8d
leal (%r8,%r8,2), %r8d
leaq (%rdi,%rdi,2), %rdi
movl %r8d, 0x4(%rax,%rdi,4)
leal 0x1(%rdx,%rdx), %ebp
movslq %ebp, %rdx
movl (%rcx,%rdx,4), %ecx
leal (%rcx,%rcx,2), %ecx
movl %ecx, 0x8(%rax,%rdi,4)
movq %r14, %rdi
movl %ebx, %edx
callq 0x1e60
decl %ebx
jne 0x1e72
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/static_search_trees.cpp
// Function: built_co_static_search_tree::update(int, int, int, int)
void built_co_static_search_tree::update(int current_node, int h, int index, int value) {
    if(h == 1) {
        this->tree[current_node] = value;
        return;
    }
    if(index & (1 << (h - 2))) {
        this->update(this->tree[current_node + 2], h - 1, index, value);
    } else {
        this->update(this->tree[current_node + 1], h - 1, index, value);
    }
    this->tree[current_node] = max(this->tree[this->tree[current_node + 1]], this->tree[this->tree[current_node + 2]]);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x1, %edx
jne 0x1edc
movq (%rbx), %rax
movslq %esi, %rcx
movl %r8d, (%rax,%rcx,4)
jmp 0x1f23
leal -0x2(%rdx), %eax
movzbl %al, %eax
xorl %edi, %edi
btl %eax, %ecx
setb %dil
movslq %esi, %r14
leaq (,%r14,4), %rax
addq (%rbx), %rax
decl %edx
movl 0x4(%rax,%rdi,4), %esi
movq %rbx, %rdi
callq 0x1ec4
movq (%rbx), %rax
movslq 0x4(%rax,%r14,4), %rcx
movslq 0x8(%rax,%r14,4), %rdx
movl (%rax,%rcx,4), %ecx
movl (%rax,%rdx,4), %edx
cmpl %edx, %ecx
cmovgl %ecx, %edx
movl %edx, (%rax,%r14,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/static_search_trees.cpp
// Function: built_co_static_search_tree::get(int)
int built_co_static_search_tree::get(int value) {
    int current_node = 0;
    int index = 0;
    for (int i = 0; i < this->height - 1; ++i)
    {
        if (value <= this->tree[this->tree[current_node + 1]])
        {
            current_node = this->tree[current_node + 1];
            index <<= 1;
        }
        else
        {
            current_node = this->tree[current_node + 2];
            index <<= 1;
            index += 1;
        }
    }
    return index;
}

// Assembly:
movl 0x1c(%rdi), %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
jl 0x1f70
movq (%rdi), %rdx
decl %ecx
xorl %eax, %eax
xorl %edi, %edi
movslq %edi, %r8
movslq 0x4(%rdx,%r8,4), %rdi
cmpl %esi, (%rdx,%rdi,4)
jge 0x1f6a
movl 0x8(%rdx,%r8,4), %edi
leal 0x1(,%rax,2), %eax
jmp 0x1f6c
addl %eax, %eax
decl %ecx
jne 0x1f4f
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/static_search_trees.cpp
// Function: CA_static_search_tree::get(int, int, int, int, int, int, int)
int CA_static_search_tree::get(int tree_l, int num_inner_nodes, int temp_root, int h, int arr_l, int arr_r, int value) {
    if (arr_l == arr_r)
    {
        // printf("get at index %d, real index %d, value %d\n", arr_l, tree_l + temp_root, this->tree[tree_l+temp_root]);
        return arr_l;
    }
    int mid = (arr_l + arr_r) >> 1;
    if (h > 0 && (h+1) & 3 == 0) {
        h++;
        num_inner_nodes += (1 << (h-4));
        // update tree_l
        int mid = (arr_l + arr_r) >> 1;
        int left_or_right = 1;
        int new_tree_l = (tree_l << 4) + ((temp_root-8) << 1) + 1;
        tree_l = new_tree_l;
        temp_root = 1;
        int last_subtree_size = min((1 << (this->height-((h>>2)<<2))) - 1, 15);
        int real_subtree_root = ((num_inner_nodes<<4)-num_inner_nodes) + (tree_l-num_inner_nodes)*last_subtree_size;
        if (value <= this->tree[real_subtree_root + temp_root]) {
            arr_r = mid;
        } else {
            arr_l = mid + 1;
            tree_l++;
        }
        if (h == this->height - 1) {
            return arr_l;
        }
    }
    mid = (arr_l + arr_r) >> 1;
    int left_child = temp_root << 1;
    int right_child = (temp_root << 1) + 1;
    h++;
    int last_subtree_size = min((1 << (this->height-((h>>2)<<2))) - 1, 15);
    int real_subtree_root = ((num_inner_nodes<<4)-num_inner_nodes) + (tree_l-num_inner_nodes)*last_subtree_size;
    if(value <= this->tree[real_subtree_root + left_child]) {
        return this->get(tree_l, num_inner_nodes, left_child, h, arr_l, mid, value);
    } else {
        return this->get(tree_l, num_inner_nodes, right_child, h, mid + 1, arr_r, value);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %r9d, %eax
movl %ecx, %r9d
movl 0x30(%rsp), %r10d
movl 0x28(%rsp), %ebx
movl 0x14(%rdi), %r11d
leal (%rdx,%rdx,4), %ecx
leal (%rcx,%rcx,2), %r14d
subl %edx, %esi
movq (%rdi), %rdx
movl $0xfffffff0, %edi       # imm = 0xFFFFFFF0
movl %ebx, %ebp
cmpl %ebp, %eax
je 0x2197
movl %ebp, %ebx
leal (%rbx,%rax), %ebp
sarl %ebp
incl %r8d
movl %r8d, %r15d
andl $0xfc, %r15d
movl %r11d, %ecx
subl %r15d, %ecx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
shll %cl, %r15d
leal (%r9,%r9), %ecx
cmpl $-0xf, %r15d
cmovbl %edi, %r15d
notl %r15d
imull %esi, %r15d
leal (%r14,%r9,2), %r9d
addl %r15d, %r9d
movslq %r9d, %r15
movl %ecx, %r9d
cmpl %r10d, (%rdx,%r15,4)
jge 0x213e
orl $0x1, %ecx
incl %ebp
movl %ecx, %r9d
movl %ebp, %eax
jmp 0x213c
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/6851-2021[P]Cache-Oblivious-Data-Structures/static_search_trees/static_search_trees.cpp
// Function: CA_static_search_tree::print_tree()
void CA_static_search_tree::print_tree() {
    int start = 1;
    // printf("")
    for (int i = 1; i < this->size; i++) {
        printf("%d ", this->tree[i]);
    }
    printf("\n");
}

// Assembly:
cmpl $0x2, 0x10(%rdi)
jl 0x2243
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %r15d
leaq 0x1f43(%rip), %r14      # 0x4164
movq (%rbx), %rax
movl (%rax,%r15,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
incq %r15
movslq 0x10(%rbx), %rax
cmpq %rax, %r15
jl 0x2221
popq %rbx
popq %r14
popq %r15
movl $0xa, %edi
jmp 0x1170
nop