LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: ridiculousfish[P]docopt_fish/docopt_matching.cpp
// Function: docopt_fish::match_context_t::has_consumed_everything(docopt_fish::match_state_t const&) const
bool has_consumed_everything(const match_state_t &state) const {
        if (has_more_positionals(state)) {
            // Unconsumed positional
            return false;
        }

        // Now return whether all of our consumed options are true
        const std::vector<bool> &ops = *state.consumed_options;
        return std::all_of(ops.begin(), ops.end(), [](bool v) { return v; });
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x32b60
testb $0x1, %al
jne 0x34973
jmp 0x34979
movb $0x0, -0x1(%rbp)
jmp 0x349de
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
callq 0x349f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x34a80
movl %edx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x34ac0
movl %edx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %esi
movq -0x50(%rbp), %rdx
movl -0x48(%rbp), %ecx
callq 0x34a10
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: ridiculousfish[P]docopt_fish/docopt_matching.cpp
// Function: docopt_fish::match_state_t::progress() const
size_t progress() const {
        // Add in positionals
        size_t result = this->next_positional_index;

        // Add in arguments by counting set bits in the bitmap
        result += std::accumulate(this->consumed_options->cbegin(),
                                  this->consumed_options->cend(),
                                  0);

        // Add in number of suggestions
        result += suggested_next_arguments.size();

        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movq 0x20(%rdi), %rax
movq %rax, -0x10(%rbp)
addq $0x10, %rdi
movq %rdi, -0x60(%rbp)
callq 0x355e0
movq %rax, %rdi
callq 0x35600
movq -0x60(%rbp), %rdi
movl %edx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x355e0
movq %rax, %rdi
callq 0x35640
movl %edx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %esi
movq -0x40(%rbp), %rdx
movl -0x38(%rbp), %ecx
xorl %r8d, %r8d
callq 0x35580
movq -0x58(%rbp), %rdi
cltq
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
addq $0x28, %rdi
callq 0x13eb0
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: join[abi:cxx11](std::vector<docopt_fish::suggestion_t, std::allocator<docopt_fish::suggestion_t>> const&, char const*)
string_t join(const suggestion_list_t &vec, const char *delim) {
    string_t result;
    const string_t delim_string = to_string(delim);
    for (size_t i=0; i < vec.size(); i++) {
        if (i > 0) {
            result.append(delim_string);
        }
        result.append(vec.at(i).token);
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x8150
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3af90
jmp 0x3b05a
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0x157d0
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x3b0f1
cmpq $0x0, -0x58(%rbp)
jbe 0x3b0bc
movq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8600
jmp 0x3b095
jmp 0x3b0bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3b11a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8590
jmp 0x3b11a
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x43f90
movq %rax, -0x78(%rbp)
jmp 0x3b0cf
movq -0x78(%rbp), %rsi
movq -0x68(%rbp), %rdi
callq 0x8600
jmp 0x3b0de
jmp 0x3b0e0
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x3b062
movb $0x1, -0x19(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8590
testb $0x1, -0x19(%rbp)
jne 0x3b10d
movq -0x68(%rbp), %rdi
callq 0x8590
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x8590
movq -0x48(%rbp), %rdi
callq 0x85d0
nopl (%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: join(std::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>>>> const&, char const*)
string_t join(const string_list_t &vec, const char *delim) {
    string_t result;
    const string_t delim_string = to_string(delim);
    for (size_t i=0; i < vec.size(); i++) {
        if (i > 0) {
            result.append(delim_string);
        }
        result.append(vec.at(i));
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x8150
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3af90
jmp 0x3b16a
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc910
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x3b201
cmpq $0x0, -0x58(%rbp)
jbe 0x3b1cc
movq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8600
jmp 0x3b1a5
jmp 0x3b1cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3b22a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8590
jmp 0x3b22a
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xc930
movq %rax, -0x78(%rbp)
jmp 0x3b1df
movq -0x78(%rbp), %rsi
movq -0x68(%rbp), %rdi
callq 0x8600
jmp 0x3b1ee
jmp 0x3b1f0
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x3b172
movb $0x1, -0x19(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8590
testb $0x1, -0x19(%rbp)
jne 0x3b21d
movq -0x68(%rbp), %rdi
callq 0x8590
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x8590
movq -0x48(%rbp), %rdi
callq 0x85d0
nopl (%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: err(char const*, ...)
__attribute__ ((format (printf, 1, 2)))
static void err(const char *blah, ...)
{
    static bool has_term = !! getenv("TERM");
    va_list va;
    va_start(va, blah);
    err_count++;
    
    // show errors in red
    if (has_term) {
        fputs("\x1b[31m", stdout);
    }
    
    printf("Error: ");
    vprintf(blah, va);
    va_end(va);
    
    if (has_term) {
        // return to normal color
        fputs("\x1b[0m", stdout);
    }
    
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x3b5a5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0x3cdcd(%rip)     # 0x783a0
jne 0x3b611
leaq 0x3cdc4(%rip), %rdi     # 0x783a0
callq 0x8640
cmpl $0x0, %eax
je 0x3b611
leaq 0x11594(%rip), %rdi     # 0x4cb81
callq 0x8420
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0x3cd93(%rip)      # 0x78398
leaq 0x3cd94(%rip), %rdi     # 0x783a0
callq 0x81d0
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x3cd54(%rip), %rax     # 0x78390
addq $0x1, %rax
movq %rax, 0x3cd49(%rip)     # 0x78390
testb $0x1, 0x3cd4a(%rip)     # 0x78398
je 0x3b666
movq 0x3c959(%rip), %rax     # 0x77fb0
movq (%rax), %rsi
leaq 0x11525(%rip), %rdi     # 0x4cb86
callq 0x83c0
leaq 0x1151f(%rip), %rdi     # 0x4cb8c
movb $0x0, %al
callq 0x8040
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x8350
leaq -0x20(%rbp), %rax
testb $0x1, 0x3cd0c(%rip)     # 0x78398
je 0x3b6a4
movq 0x3c91b(%rip), %rax     # 0x77fb0
movq (%rax), %rsi
leaq 0x114f5(%rip), %rdi     # 0x4cb94
callq 0x83c0
leaq 0x108d5(%rip), %rdi     # 0x4bf80
xorl %eax, %eax
callq 0x8040
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: do_all_tests()
void do_all_tests() {
    test_correctness();
    test_annotated_options();
    test_unused_args();
    test_suggestions();
    test_descriptions();
    test_commands();
    test_validation();
    test_errors_in_usage();
    test_errors_in_argv();
    test_command_names();
    test_fuzzing();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x3b720
callq 0x3b840
callq 0x3f0a0
callq 0x3f1c0
callq 0x3f2e0
callq 0x3f400
callq 0x3f520
callq 0x3f5a0
callq 0x3f650
callq 0x3f700
callq 0x3b240
popq %rbp
retq
nopl (%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: test_unused_args()
static void test_unused_args()
{
    const testcase_t testcases[] =
    {   /* Case 0 */
        {   "Usage: prog [--status]\n"
            "       prog jump [--height <in>]",
            {
                {   "", // argv
                    ""
                },
                {   "jump", // argv
                    ""
                },
                {   "--foo", // argv
                    "--foo"
                },
                {   "jump foo", // argv
                    "foo"
                },
            },
        },
        /* Case 1 */
        {   "Usage: prog [options] <pid>\n"
            "Options: --embiggen, -e  Embiggen the smallest man",
            {
                {   "12", // argv
                    ""
                },
                {   "12 -e", // argv
                    ""
                },
                {   "12 -e -e", // argv
                    "-e"
                },
                {   "12 --embiggen -e", // argv
                    "-e"
                },
            },
        },
        {nullptr, {}}
    };
    for (size_t testcase_idx=0; testcases[testcase_idx].usage != nullptr; testcase_idx++) {
        const testcase_t *testcase = &testcases[testcase_idx];
        for (size_t arg_idx = 0; testcase->args[arg_idx].argv != nullptr; arg_idx++) {
            const args_t *args = &testcase->args[arg_idx];
            run_1_unused_argument_test(testcase->usage, args->argv, args->expected_results, testcase_idx, arg_idx);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
leaq -0x320(%rbp), %rdi
leaq 0x37ab7(%rip), %rsi     # 0x76b70
movl $0x318, %edx            # imm = 0x318
callq 0x8270
movq $0x0, -0x328(%rbp)
leaq -0x320(%rbp), %rax
imulq $0x108, -0x328(%rbp), %rcx # imm = 0x108
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3f1b5
leaq -0x320(%rbp), %rax
imulq $0x108, -0x328(%rbp), %rcx # imm = 0x108
addq %rcx, %rax
movq %rax, -0x330(%rbp)
movq $0x0, -0x338(%rbp)
movq -0x330(%rbp), %rax
addq $0x8, %rax
movq -0x338(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3f19c
movq -0x330(%rbp), %rax
addq $0x8, %rax
movq -0x338(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x340(%rbp)
movq -0x330(%rbp), %rax
movq (%rax), %rdi
movq -0x340(%rbp), %rax
movq (%rax), %rsi
movq -0x340(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x328(%rbp), %rcx
movq -0x338(%rbp), %r8
callq 0x422d0
movq -0x338(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x338(%rbp)
jmp 0x3f114
jmp 0x3f19e
movq -0x328(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x328(%rbp)
jmp 0x3f0ce
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
nop
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: test_descriptions()
static void test_descriptions()
{
    const testcase_t testcases[] =
    {
        /* Case 0 */
        {   "Usage: prog [options] <pid>\n"
            "Options: --embiggen, -e  Embiggen the smallest man\n"
            "         --debiggen, -d  Debiggen the largest man\n",
            {
                {   "--embiggen",
                    "Embiggen the smallest man"
                },
                {   "-e",
                    "Embiggen the smallest man"
                },
                {   "-f",
                    ""
                },
                {   "--debiggen",
                    "Debiggen the largest man"
                },
                {   "--rebiggen",
                    ""
                },
            },
        },
        {nullptr, {}}
    };
    for (size_t testcase_idx=0; testcases[testcase_idx].usage != nullptr; testcase_idx++) {
        const testcase_t *testcase = &testcases[testcase_idx];
        for (size_t arg_idx = 0; testcase->args[arg_idx].argv != nullptr; arg_idx++) {
            const args_t *args = &testcase->args[arg_idx];
            run_1_description_test(testcase->usage, args->argv, args->expected_results, testcase_idx, arg_idx);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
leaq -0x210(%rbp), %rdi
leaq 0x382d7(%rip), %rsi     # 0x775d0
movl $0x210, %edx            # imm = 0x210
callq 0x8270
movq $0x0, -0x218(%rbp)
leaq -0x210(%rbp), %rax
imulq $0x108, -0x218(%rbp), %rcx # imm = 0x108
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3f3f5
leaq -0x210(%rbp), %rax
imulq $0x108, -0x218(%rbp), %rcx # imm = 0x108
addq %rcx, %rax
movq %rax, -0x220(%rbp)
movq $0x0, -0x228(%rbp)
movq -0x220(%rbp), %rax
addq $0x8, %rax
movq -0x228(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3f3dc
movq -0x220(%rbp), %rax
addq $0x8, %rax
movq -0x228(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x220(%rbp), %rax
movq (%rax), %rdi
movq -0x230(%rbp), %rax
movq (%rax), %rsi
movq -0x230(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x218(%rbp), %rcx
movq -0x228(%rbp), %r8
callq 0x42e00
movq -0x228(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x228(%rbp)
jmp 0x3f354
jmp 0x3f3de
movq -0x218(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x218(%rbp)
jmp 0x3f30e
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
nop
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: test_commands()
static void test_commands()
{
    const testcase_t testcases[] =
    {   /* Case 0 */
        {   "Usage: prog <pid> <grp> <uid> <gid>\n"
            "  <pid>  get_a_pid\n"
            "  <grp>  (echo groups)\n"
            "  <uid>   1 2\n   3 4\n"
            "  <gid>   \n    1 2\n   3 4\n",
            {
                {   "<pid>", // variable
                    "get_a_pid"
                },
                {   "<grp>", // variable
                    "(echo groups)"
                },
                {   "<uid>", // variable
                    "1 2\n   3 4"
                },
                {   "<gid>", // variable
                    "1 2\n   3 4"
                },
            }
        },
        /* Case 1 */
        {   "Usage: prog <arg> <val>\n"
            "Arguments:\n"
            "  <pid>\n"
            "    get_a_pid\n"
            "  <val>\n"
            "    get_a_val",
            {
                {   "<pid>", // variable
                    "get_a_pid"
                },
                {   "<val>", // variable
                    "get_a_val"
                }
            }
        },
        {nullptr, {}}
    };
    for (size_t testcase_idx=0; testcases[testcase_idx].usage != nullptr; testcase_idx++) {
        const testcase_t *testcase = &testcases[testcase_idx];
        for (size_t arg_idx = 0; testcase->args[arg_idx].argv != nullptr; arg_idx++) {
            const args_t *args = &testcase->args[arg_idx];
            run_1_command_test(testcase->usage, args->argv, args->expected_results, testcase_idx, arg_idx);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
leaq -0x320(%rbp), %rdi
leaq 0x383c7(%rip), %rsi     # 0x777e0
movl $0x318, %edx            # imm = 0x318
callq 0x8270
movq $0x0, -0x328(%rbp)
leaq -0x320(%rbp), %rax
imulq $0x108, -0x328(%rbp), %rcx # imm = 0x108
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3f515
leaq -0x320(%rbp), %rax
imulq $0x108, -0x328(%rbp), %rcx # imm = 0x108
addq %rcx, %rax
movq %rax, -0x330(%rbp)
movq $0x0, -0x338(%rbp)
movq -0x330(%rbp), %rax
addq $0x8, %rax
movq -0x338(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3f4fc
movq -0x330(%rbp), %rax
addq $0x8, %rax
movq -0x338(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x340(%rbp)
movq -0x330(%rbp), %rax
movq (%rax), %rdi
movq -0x340(%rbp), %rax
movq (%rax), %rsi
movq -0x340(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x328(%rbp), %rcx
movq -0x338(%rbp), %r8
callq 0x43110
movq -0x338(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x338(%rbp)
jmp 0x3f474
jmp 0x3f4fe
movq -0x328(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x328(%rbp)
jmp 0x3f42e
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
nop
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: test_validation()
static void test_validation()
{
    const struct validation_testcase_t {
        const char *usage;
        const char *argv;
        const char *valids;
    } testcases[] =
    {   /* Case 0 */
        {   "Usage: prog (foo|bar) --baz\n",
            "foo --baz", // argv
            "11"
        },
        /* Case 1 */
        {   "Usage: prog (foo|bar) --baz\n",
            "--baz", // argv
            "1"
        },
        /* Case 2 */
        {   "--baz\n",
            "foo --baz", // argv
            "01"
        },
        {nullptr, nullptr, nullptr}
    };
    for (size_t testcase_idx=0; testcases[testcase_idx].usage != nullptr; testcase_idx++) {
        const validation_testcase_t *testcase = &testcases[testcase_idx];
        run_1_validation_test(testcase->usage, testcase->argv, testcase->valids, testcase_idx, 0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq -0x60(%rbp), %rdi
leaq 0x385cd(%rip), %rsi     # 0x77b00
movl $0x60, %edx
callq 0x8270
movq $0x0, -0x68(%rbp)
leaq -0x60(%rbp), %rax
imulq $0x18, -0x68(%rbp), %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x3f59a
leaq -0x60(%rbp), %rax
imulq $0x18, -0x68(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rdi
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x68(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x43430
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x3f545
addq $0x70, %rsp
popq %rbp
retq
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: split_nonempty[abi:cxx11](char const*, char)
static string_list_t split_nonempty(const char *str, char delimiter) {
    string_list_t result;
    const char *cursor = str;
    for (;;) {
        const char *next = strchr(cursor, delimiter);
        if (next == nullptr) {
            next = cursor + strlen(cursor);
        }
        
        /* Insert the token if it is not empty */
        if (next > cursor) {
            result.push_back(string_t(cursor, next));
        }
        
        // Skip over delimeters
        while (*next == delimiter) {
            next++;
        }
        // Break if we're done
        if (*next == '\0') {
            break;
        }
        cursor = next;
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x70(%rbp)
movb %dl, %al
movq %rdi, %rcx
movq %rcx, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
callq 0x18ad0
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x80c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x406db
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8110
movq %rax, %rcx
movq -0x78(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x40783
movq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x8130
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq -0x80(%rbp), %rcx
leaq -0x48(%rbp), %rdi
callq 0x43f20
jmp 0x40729
movq -0x70(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x18c20
jmp 0x40738
leaq -0x48(%rbp), %rdi
callq 0x8590
leaq -0x49(%rbp), %rdi
callq 0x85f0
jmp 0x40783
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x4076f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x8590
leaq -0x49(%rbp), %rdi
callq 0x85f0
movq -0x70(%rbp), %rdi
callq 0x12f80
jmp 0x407dd
jmp 0x40785
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x407a2
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x40785
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x407b0
jmp 0x407bd
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x406a4
movb $0x1, -0x12(%rbp)
testb $0x1, -0x12(%rbp)
jne 0x407d0
movq -0x70(%rbp), %rdi
callq 0x12f80
movq -0x68(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x85d0
nopw %cs:(%rax,%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: wide(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static const wchar_t *wide(const string &t) {
    static wstring result[16];
    static size_t idx = 0;
    idx = (idx + 1) % 16;
    result[idx].erase();
    result[idx].insert(result[idx].begin(), t.begin(), t.end());
    return result[idx].c_str();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0x37dad(%rip)     # 0x785b0
jne 0x40872
leaq 0x37da4(%rip), %rdi     # 0x785b0
callq 0x8640
cmpl $0x0, %eax
je 0x40872
leaq 0x37b93(%rip), %rax     # 0x783b0
movq %rax, -0x38(%rbp)
jmp 0x40823
movq -0x38(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x8150
movq -0x40(%rbp), %rax
addq $0x20, %rax
leaq 0x37b71(%rip), %rcx     # 0x783b0
addq $0x200, %rcx            # imm = 0x200
cmpq %rcx, %rax
movq %rax, -0x38(%rbp)
jne 0x40823
leaq -0x380c6(%rip), %rdi    # 0x8790
xorl %eax, %eax
movl %eax, %esi
leaq 0x37b07(%rip), %rdx     # 0x78368
callq 0x82b0
leaq 0x37d43(%rip), %rdi     # 0x785b0
callq 0x81d0
movq 0x37d3f(%rip), %rax     # 0x785b8
addq $0x1, %rax
andq $0xf, %rax
movq %rax, 0x37d30(%rip)     # 0x785b8
movq 0x37d29(%rip), %rax     # 0x785b8
leaq 0x37b1a(%rip), %rdi     # 0x783b0
shlq $0x5, %rax
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movq $-0x1, %rdx
callq 0x8030
movq 0x37d04(%rip), %rcx     # 0x785b8
leaq 0x37af5(%rip), %rax     # 0x783b0
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq 0x37ceb(%rip), %rax     # 0x785b8
leaq 0x37adc(%rip), %rdi     # 0x783b0
shlq $0x5, %rax
addq %rax, %rdi
callq 0x84d0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x2c200
movq -0x8(%rbp), %rdi
callq 0x82f0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x8670
movq -0x48(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x44c30
movq %rax, -0x30(%rbp)
movq 0x37c8d(%rip), %rax     # 0x785b8
leaq 0x37a7e(%rip), %rdi     # 0x783b0
shlq $0x5, %rax
addq %rax, %rdi
callq 0x8400
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: parse_expected_results[abi:cxx11](char const*)
static map<string_t, string_t> parse_expected_results(const char *joined_expected_results) {
    map<string_t, string_t> expected;
    string_list_t expected_lines = split_nonempty(joined_expected_results, '\n');
    for (size_t i=0; i < expected_lines.size(); i++) {
        const string_t &str = expected_lines.at(i);
        size_t colon = str.find(':');
        assert(colon != string_t::npos);
        
        const string_t key(str, 0, colon);
        const string_t value(str, colon + 1);
        expected[key] = value;
    }
    return expected;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x44d60
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdi
movl $0xa, %edx
callq 0x40670
jmp 0x40991
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xc910
movq %rax, %rcx
movq -0xb8(%rbp), %rax
cmpq %rcx, %rax
jae 0x40b44
movq -0x48(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x44d80
movq %rax, -0xc0(%rbp)
jmp 0x409d6
movq -0xc0(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movl $0x3a, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x82d0
movq %rax, -0x58(%rbp)
cmpq $-0x1, -0x58(%rbp)
je 0x40a00
jmp 0x40a41
leaq 0xe1f8(%rip), %rdi      # 0x4ebff
leaq 0xe0fd(%rip), %rsi      # 0x4eb0b
movl $0x9c, %edx
leaq 0xe1fd(%rip), %rcx      # 0x4ec17
callq 0x81e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x40b80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x40b59
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x78(%rbp), %rdi
callq 0x84a0
jmp 0x40a58
movq -0x50(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x58(%rbp), %rax
incq %rax
movq %rax, -0xd0(%rbp)
leaq -0x99(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x8130
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
leaq -0x98(%rbp), %rdi
callq 0x8650
jmp 0x40aa7
leaq -0x99(%rbp), %rdi
callq 0x85f0
movq -0xb0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x44dc0
movq %rax, -0xe0(%rbp)
jmp 0x40acc
movq -0xe0(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x8460
jmp 0x40ae1
leaq -0x98(%rbp), %rdi
callq 0x8590
leaq -0x78(%rbp), %rdi
callq 0x8590
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x40999
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x99(%rbp), %rdi
callq 0x85f0
jmp 0x40b39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x8590
leaq -0x78(%rbp), %rdi
callq 0x8590
jmp 0x40b59
movb $0x1, -0x11(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x12f80
testb $0x1, -0x11(%rbp)
jne 0x40b70
jmp 0x40b64
leaq -0x30(%rbp), %rdi
callq 0x12f80
jmp 0x40b80
movq -0xb0(%rbp), %rdi
callq 0x445b0
movq -0xa8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x445b0
movq -0x38(%rbp), %rdi
callq 0x85d0
nopw %cs:(%rax,%rax)
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: split(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, char const*)
static string_list_t split(const string_t &str, const char *delim) {
    string_list_t result;
    const string_t delim_string = to_string(delim);
    size_t cursor = 0;
    while (cursor <= str.size()) {
        size_t delim_pos = str.find(delim_string, cursor);
        if (delim_pos == string_t::npos) {
            delim_pos = str.size();
        }
        result.push_back(str.substr(cursor, delim_pos - cursor));
        cursor = delim_pos + delim_string.size();
    }
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x18ad0
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3af90
jmp 0x40c60
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8230
movq %rax, %rcx
movq -0x98(%rbp), %rax
cmpq %rcx, %rax
ja 0x40d4f
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rdx
leaq -0x40(%rbp), %rsi
callq 0x86a0
movq %rax, -0x60(%rbp)
cmpq $-0x1, -0x60(%rbp)
jne 0x40ccb
movq -0x10(%rbp), %rdi
callq 0x8230
movq %rax, -0x60(%rbp)
jmp 0x40ccb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x40d8b
movq -0x10(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x60(%rbp), %rcx
subq %rdx, %rcx
leaq -0x80(%rbp), %rdi
callq 0x8160
jmp 0x40ce5
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x18c20
jmp 0x40cf7
leaq -0x80(%rbp), %rdi
callq 0x8590
movq -0x60(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8230
movq %rax, %rcx
movq -0xa0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x40c68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x40d64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x8590
jmp 0x40d64
movb $0x1, -0x19(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8590
testb $0x1, -0x19(%rbp)
jne 0x40d7b
jmp 0x40d6f
leaq -0x40(%rbp), %rdi
callq 0x8590
jmp 0x40d8b
movq -0x90(%rbp), %rdi
callq 0x12f80
movq -0x88(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x12f80
movq -0x48(%rbp), %rdi
callq 0x85d0
// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: build_metadata[abi:cxx11](char const*, char const*, char const*, int)
static metadata_t build_metadata(const char *command, const char *description, const char *condition, int tag) {
    metadata_t result;
    const string_t empty;
    result.command = command ? to_string(command) : empty;
    result.description = description ? to_string(description) : empty;
    result.condition = condition ? to_string(condition) : empty;
    result.tag = tag;
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movb $0x0, -0x25(%rbp)
callq 0x111f0
leaq -0x48(%rbp), %rdi
callq 0x8150
cmpq $0x0, -0x10(%rbp)
je 0x40dfa
movq -0x10(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x3af90
jmp 0x40df8
jmp 0x40e0b
leaq -0x68(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x82c0
jmp 0x40e09
jmp 0x40e0b
movq -0xc8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x8460
jmp 0x40e1d
leaq -0x68(%rbp), %rdi
callq 0x8590
cmpq $0x0, -0x18(%rbp)
je 0x40e41
movq -0x18(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x3af90
jmp 0x40e3f
jmp 0x40e55
leaq -0x98(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x82c0
jmp 0x40e53
jmp 0x40e55
movq -0xc8(%rbp), %rdi
addq $0x40, %rdi
leaq -0x98(%rbp), %rsi
callq 0x8460
jmp 0x40e6e
leaq -0x98(%rbp), %rdi
callq 0x8590
cmpq $0x0, -0x20(%rbp)
je 0x40e95
movq -0x20(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x3af90
jmp 0x40e93
jmp 0x40ea9
leaq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x82c0
jmp 0x40ea7
jmp 0x40ea9
movq -0xc8(%rbp), %rdi
addq $0x20, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x8460
jmp 0x40ec2
leaq -0xb8(%rbp), %rdi
callq 0x8590
movq -0xc8(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, 0x60(%rax)
movb $0x1, -0x25(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x8590
testb $0x1, -0x25(%rbp)
jne 0x40f6a
jmp 0x40f5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x40f47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x8590
jmp 0x40f47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x8590
jmp 0x40f47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x8590
leaq -0x48(%rbp), %rdi
callq 0x8590
movq -0xc8(%rbp), %rdi
callq 0x11350
jmp 0x40f7a
movq -0xc8(%rbp), %rdi
callq 0x11350
movq -0xc0(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x85d0
nopw %cs:(%rax,%rax)
// File: eecs280staff[P]unit_test_framework/test/string_equal.cpp
// Function: string_equal()
TEST(string_equal) {
  std::string s1 = "hello";
  ASSERT_EQUAL(s1, "hello");
  ASSERT_EQUAL("hello", s1);
  char cs[] = "hello";
  ASSERT_EQUAL(s1, cs);
  ASSERT_EQUAL(cs, s1);

  std::string s2 = "world";
  ASSERT_NOT_EQUAL(s2, "hello");
  ASSERT_NOT_EQUAL("hello", s2);
  ASSERT_NOT_EQUAL(s2, cs);
  ASSERT_NOT_EQUAL(cs, s2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq -0x21(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x33d0
movq -0x70(%rbp), %rdx
leaq 0x697e(%rip), %rsi      # 0xa011
leaq -0x20(%rbp), %rdi
callq 0x3880
jmp 0x369e
leaq -0x21(%rbp), %rdi
callq 0x3280
leaq 0x6963(%rip), %rsi      # 0xa011
leaq 0x6962(%rip), %rcx      # 0xa017
leaq -0x20(%rbp), %rdi
movl $0x6, %edx
callq 0x4d60
jmp 0x36c5
leaq 0x6945(%rip), %rdi      # 0xa011
leaq 0x695e(%rip), %rcx      # 0xa031
leaq -0x20(%rbp), %rsi
movl $0x7, %edx
callq 0x4ed0
jmp 0x36e3
movw $0x6f, -0x38(%rbp)
movl $0x6c6c6568, -0x3c(%rbp) # imm = 0x6C6C6568
leaq 0x6954(%rip), %rcx      # 0xa04b
leaq -0x20(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
movl $0x9, %edx
callq 0x5040
jmp 0x370b
leaq 0x694e(%rip), %rcx      # 0xa060
leaq -0x3c(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x51b0
jmp 0x3726
leaq -0x61(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x33d0
movq -0x78(%rbp), %rdx
leaq 0x6937(%rip), %rsi      # 0xa075
leaq -0x60(%rbp), %rdi
callq 0x3880
jmp 0x3749
leaq -0x61(%rbp), %rdi
callq 0x3280
leaq 0x68b8(%rip), %rsi      # 0xa011
leaq 0x691b(%rip), %rcx      # 0xa07b
leaq -0x60(%rbp), %rdi
movl $0xd, %edx
callq 0x5320
jmp 0x3770
leaq 0x689a(%rip), %rdi      # 0xa011
leaq 0x691b(%rip), %rcx      # 0xa099
leaq -0x60(%rbp), %rsi
movl $0xe, %edx
callq 0x54a0
jmp 0x378e
leaq 0x6922(%rip), %rcx      # 0xa0b7
leaq -0x60(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
movl $0xf, %edx
callq 0x5620
jmp 0x37a9
leaq 0x6920(%rip), %rcx      # 0xa0d0
leaq -0x3c(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x10, %edx
callq 0x57a0
jmp 0x37c4
leaq -0x60(%rbp), %rdi
callq 0x3150
leaq -0x20(%rbp), %rdi
callq 0x3150
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x3280
jmp 0x3839
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x3830
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x61(%rbp), %rdi
callq 0x3280
jmp 0x3830
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3150
leaq -0x20(%rbp), %rdi
callq 0x3150
movq -0x30(%rbp), %rdi
callq 0x33c0
nopw %cs:(%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Battle/Battle.cpp
// Function: Battle::BattleHappens()
bool Battle::BattleHappens(void) 
{
    float chanceToFight = 0.05;
    float determ = (double)rand() / RAND_MAX;

    if (chanceToFight > determ)
        return true;
    else
        return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movss 0x26298(%rip), %xmm0    # 0x3d278
movss %xmm0, -0x8(%rbp)
callq 0x40a0
cvtsi2sd %eax, %xmm0
movsd 0x2626a(%rip), %xmm1    # 0x3d260
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
movss -0x8(%rbp), %xmm0
ucomiss -0xc(%rbp), %xmm0
jbe 0x17014
movb $0x1, -0x1(%rbp)
jmp 0x17018
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Battle/Battle.cpp
// Function: Battle::AttackWithWeapon(Hero&, Monster&)
bool Battle::AttackWithWeapon(Hero& hero, Monster& monster)
{
    unsigned int totalDamage = hero.GetWeaponDamage() + hero.GetStrength();

    if ((double)rand() / RAND_MAX > monster.MonsterGetAvoidance()) {
        monster.ChangeHealth(floor((double)(totalDamage * totalDamage) / (totalDamage + monster.MonsterGetDefence())));
        //changes the monster's health according to the function (damage*damage)/(damage + armor)
        return true;
    
    } else {
        cout << monster.Living::GetName() << " avoided the attack!" << endl;
        usleep(1500000);
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20b00
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1edb0
movl %eax, %ecx
movl -0x5c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
callq 0x40a0
cvtsi2sd %eax, %xmm0
movsd 0x25c2d(%rip), %xmm1    # 0x3d260
divsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e710
movaps %xmm0, %xmm1
movsd -0x58(%rbp), %xmm0
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x176ab
movq -0x18(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x6c(%rbp)
imull %eax, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x78(%rbp)
callq 0x2e6f0
movsd -0x78(%rbp), %xmm0
movl %eax, %ecx
movl -0x6c(%rbp), %eax
addl %ecx, %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x4410
movq -0x68(%rbp), %rdi
cvttsd2si %xmm0, %rax
movl %eax, %esi
movq (%rdi), %rax
callq *0x8(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x17736
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x1ea60
movq -0x88(%rbp), %rsi
movq 0x368fb(%rip), %rdi     # 0x4dfc8
callq 0x4210
movq %rax, -0x80(%rbp)
jmp 0x176d8
movq -0x80(%rbp), %rdi
leaq 0x25bd1(%rip), %rsi     # 0x3d2b4
callq 0x4260
movq %rax, -0x90(%rbp)
jmp 0x176f1
movq -0x90(%rbp), %rdi
movq 0x368b9(%rip), %rsi     # 0x4dfb8
callq 0x4290
jmp 0x17706
leaq -0x40(%rbp), %rdi
callq 0x4160
movl $0x16e360, %edi         # imm = 0x16E360
callq 0x4390
movb $0x0, -0x1(%rbp)
jmp 0x17736
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4160
jmp 0x17744
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x4440
nopl (%rax)
// File: MichaelXanth[P]RPG_Game/Battle/Battle.cpp
// Function: Battle::MonsterAttack(Monster&, Hero&)
bool Battle::MonsterAttack(Monster& monster ,Hero& hero)//the monster attacks the hero . If the hero doesn't avoid the attack they take damage
{
    unsigned int totalDamage = monster.MonsterGetDamage();

    if ((double)rand() / RAND_MAX > hero.GetAgility()) {
        hero.ChangeHealth(floor((double)(totalDamage * totalDamage) / (totalDamage + hero.GetArmorDefence())));
    
    } else {
        cout << endl << "\033[38;5;220m" << hero.Living::GetName() << "\033[0m avoided the attack!" << endl;
        usleep(1500000);
        cout << "\033[2A";
        cout << "\033[J";
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2e6b0
movl %eax, -0x14(%rbp)
callq 0x40a0
cvtsi2sd %eax, %xmm0
movsd 0x257c0(%rip), %xmm1    # 0x3d260
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1edf0
movaps %xmm0, %xmm1
movsd -0x50(%rbp), %xmm0
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x17b14
movq -0x10(%rbp), %rdi
movq %rdi, -0x58(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
imull %eax, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x20b50
movsd -0x68(%rbp), %xmm0
movl %eax, %ecx
movl -0x5c(%rbp), %eax
addl %ecx, %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x4410
movq -0x58(%rbp), %rdi
cvttsd2si %xmm0, %rax
movl %eax, %esi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17bde
movq 0x364ad(%rip), %rdi     # 0x4dfc8
movq 0x36496(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq %rax, %rdi
leaq 0x25a2e(%rip), %rsi     # 0x3d55f
callq 0x4260
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x1ea60
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x4210
movq %rax, -0x70(%rbp)
jmp 0x17b5e
movq -0x70(%rbp), %rdi
leaq 0x25747(%rip), %rsi     # 0x3d2b0
callq 0x4260
movq %rax, -0x88(%rbp)
jmp 0x17b77
movq -0x88(%rbp), %rdi
movq 0x36433(%rip), %rsi     # 0x4dfb8
callq 0x4290
jmp 0x17b8c
leaq -0x38(%rbp), %rdi
callq 0x4160
movl $0x16e360, %edi         # imm = 0x16E360
callq 0x4390
movq 0x36422(%rip), %rdi     # 0x4dfc8
leaq 0x25c8a(%rip), %rsi     # 0x3d837
callq 0x4260
movq 0x3640f(%rip), %rdi     # 0x4dfc8
leaq 0x27c73(%rip), %rsi     # 0x3f833
callq 0x4260
jmp 0x17bde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4160
jmp 0x17beb
movb $0x1, %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x4440
nopw %cs:(%rax,%rax)
nop
// File: MichaelXanth[P]RPG_Game/Game/Game.cpp
// Function: Game::GetInput()
char Game::GetInput()  //takes an input and it checks if it is acceptable
{
    char input;

    do {
        input = getch();
    } while(input != 'i' && input != 'q' && input != 'a' && input != 'w' && input != 's' && input != 'd');

    return input;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x1e820
movb %al, -0x9(%rbp)
movsbl -0x9(%rbp), %ecx
xorl %eax, %eax
cmpl $0x69, %ecx
movb %al, -0xa(%rbp)
je 0x17cb7
movsbl -0x9(%rbp), %ecx
xorl %eax, %eax
cmpl $0x71, %ecx
movb %al, -0xa(%rbp)
je 0x17cb7
movsbl -0x9(%rbp), %ecx
xorl %eax, %eax
cmpl $0x61, %ecx
movb %al, -0xa(%rbp)
je 0x17cb7
movsbl -0x9(%rbp), %ecx
xorl %eax, %eax
cmpl $0x77, %ecx
movb %al, -0xa(%rbp)
je 0x17cb7
movsbl -0x9(%rbp), %ecx
xorl %eax, %eax
cmpl $0x73, %ecx
movb %al, -0xa(%rbp)
je 0x17cb7
movsbl -0x9(%rbp), %eax
cmpl $0x64, %eax
setne %al
movb %al, -0xa(%rbp)
movb -0xa(%rbp), %al
testb $0x1, %al
jne 0x17c5c
movb -0x9(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Game/Game.cpp
// Function: Game::OpenInventory(Hero&, short)
bool Game::OpenInventory(Hero& hero, short action)
{
    switch(action)
    {
        case 1:
            if (Battle::ChangeArmor(hero) == false)
                return false;
            return true;
        case 2:
            if (Battle::ChangeWeapon(hero) == false)
                return false;
            return true;
        case 3:
            if (Battle::UsePotion(hero) == false)
                return false;
            return true;
        
        default:
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %dx, %ax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movw %ax, -0x1a(%rbp)
movswl -0x1a(%rbp), %eax
movl %eax, -0x20(%rbp)
subl $0x1, %eax
je 0x18429
jmp 0x18415
movl -0x20(%rbp), %eax
subl $0x2, %eax
je 0x1844a
jmp 0x1841f
movl -0x20(%rbp), %eax
subl $0x3, %eax
je 0x1846b
jmp 0x1848c
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x179d0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x18444
movb $0x0, -0x1(%rbp)
jmp 0x18490
movb $0x1, -0x1(%rbp)
jmp 0x18490
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x17a20
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x18465
movb $0x0, -0x1(%rbp)
jmp 0x18490
movb $0x1, -0x1(%rbp)
jmp 0x18490
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x17980
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x18486
movb $0x0, -0x1(%rbp)
jmp 0x18490
movb $0x1, -0x1(%rbp)
jmp 0x18490
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Game/Game.cpp
// Function: Game::ChooseMonsterToAttack(std::vector<Monster*, std::allocator<Monster*>>&, short&)
bool Game::ChooseMonsterToAttack(vector<Monster *>& monsters, short& mNum)//the user chooses which monster to attack
{
    char testAction;
    char monSize = '0' + monsters.size();

    cout << endl;
    cout << "Press '0' to cancel the attack" << endl;
    cout << "Choose which monster to attack (1-" << monsters.size() << "): ";

    do {
        testAction = getch();

        if (testAction == '0')
            break;

    } while(testAction < '1' || testAction > monSize); //checks if monster chosen exists

    cout << endl << "\033[3A";
    cout << "\033[J";

    if (testAction == '0')
        return false;

    mNum = testAction - '0';

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1b7a0
addq $0x30, %rax
movb %al, -0x22(%rbp)
movq 0x329ad(%rip), %rdi     # 0x4dfc8
movq 0x32996(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq 0x3299a(%rip), %rdi     # 0x4dfc8
leaq 0x22207(%rip), %rsi     # 0x3d83c
callq 0x4260
movq %rax, %rdi
movq 0x32974(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq 0x32978(%rip), %rdi     # 0x4dfc8
leaq 0x22204(%rip), %rsi     # 0x3d85b
callq 0x4260
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1b7a0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x4080
movq %rax, %rdi
leaq 0x24de2(%rip), %rsi     # 0x40461
callq 0x4260
callq 0x1e820
movb %al, -0x21(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x30, %eax
jne 0x1b697
jmp 0x1b6be
jmp 0x1b699
movsbl -0x21(%rbp), %ecx
movb $0x1, %al
cmpl $0x31, %ecx
movb %al, -0x31(%rbp)
jl 0x1b6b7
movsbl -0x21(%rbp), %eax
movsbl -0x22(%rbp), %ecx
cmpl %ecx, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x1b684
movq 0x32903(%rip), %rdi     # 0x4dfc8
movq 0x328ec(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq %rax, %rdi
leaq 0x21cb6(%rip), %rsi     # 0x3d391
callq 0x4260
movq 0x328e1(%rip), %rdi     # 0x4dfc8
leaq 0x24145(%rip), %rsi     # 0x3f833
callq 0x4260
movsbl -0x21(%rbp), %eax
cmpl $0x30, %eax
jne 0x1b702
movb $0x0, -0x1(%rbp)
jmp 0x1b717
movsbl -0x21(%rbp), %eax
subl $0x30, %eax
movw %ax, %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: MichaelXanth[P]RPG_Game/Grid/Grid.cpp
// Function: Grid::Grid()
Grid::Grid() : horizontalSize(50), verticalSize(30)
{
    grid = new char*[verticalSize];

    for(int i = 0; i < verticalSize; i++)
        grid[i] = new char[horizontalSize];

    marketBlocks = new int[2];
    heroLoc[0]   = -1;
    heroLoc[1]   = -1;
    heroInStore  = false;

    MakeEmpty(grid , verticalSize , horizontalSize); // it fills the grid with spaces
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x32, (%rax)
movl $0x1e, 0x4(%rax)
movslq 0x4(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x1ce4e
movq -0x18(%rbp), %rax
movslq (%rax), %rdi
callq 0x4030
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1ce18
movl $0x8, %edi
callq 0x4030
movq -0x18(%rbp), %rdi
movq %rax, 0x8(%rdi)
movl $0xffffffff, 0x18(%rdi) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x1c(%rdi) # imm = 0xFFFFFFFF
movb $0x0, 0x20(%rdi)
movq 0x10(%rdi), %rsi
movl 0x4(%rdi), %edx
movl (%rdi), %ecx
callq 0x1ce90
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Grid/Grid.cpp
// Function: Grid::~Grid()
Grid::~Grid()
{
    for(int i = 0; i < verticalSize; i++)
        delete[] grid[i];
    delete[] grid;
    delete[] marketBlocks;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x1cf47
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1cf3a
movq -0x20(%rbp), %rdi
callq 0x4350
jmp 0x1cf3c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1cf0b
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1cf62
movq -0x28(%rbp), %rdi
callq 0x4350
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x1cf7d
movq -0x30(%rbp), %rdi
callq 0x4350
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)