// File: /workspace/github_cpp_makefile_star2_O2/ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: run_1_annotated_option_test(unsigned long, unsigned long, char const*, char const*, std::vector<docopt_fish::annotated_option_t, std::allocator<docopt_fish::annotated_option_t>> const&)
static void run_1_annotated_option_test(unsigned long test_idx, unsigned long arg_idx, const char *joined_argv, const char *joined_expected_results, const std::vector<annotated_option_t> &dopts) {
    typedef map<string_t, argument_t > arg_map_t;
    typedef map<string_t, string_t> string_map_t;
    
    /* Separate argv by spaces */
    string_list_t argv = split_nonempty(joined_argv, ' ');
    
    /* Prepend the program name for every argument */
    argv.insert(argv.begin(), to_string("prog"));
    
    /* Perform the parsing */
    arg_map_t results;
    std::vector<doc_error_t> error_list;
    vector<size_t> unused_args;
    argument_parser_t parser;
    parser.set_options(dopts);
    results = parser.parse_arguments(argv, 0, &error_list, &unused_args);
    
    bool expects_error = ! strcmp(joined_expected_results, ERROR_EXPECTED);
    bool did_error = ! unused_args.empty() || ! error_list.empty();
    
    if (expects_error && ! did_error) {
        err("Direct option test %lu.%lu was expected to fail, but did not", test_idx, arg_idx);
    } else if (did_error && ! expects_error) {
        err("Direct option test %lu.%lu was expected to succeed, but instead errored", test_idx, arg_idx);
        for (size_t i=0; i < error_list.size(); i++) {
            fprintf(stderr, "\t%ls\n", wide(error_list.at(i).text));
        }
    } else if (! did_error && ! expects_error) {
        /* joined_expected_results is a newline-delimited "map" of the form key:value */
        const string_map_t expected = parse_expected_results(joined_expected_results);
        
        // Verify everything we expected appears in our map
        for (auto iter = expected.cbegin(); iter != expected.cend(); ++iter) {
            const string_t &key = iter->first;
            const string_t &val = iter->second;
            arg_map_t::const_iterator arg_iter = results.find(key);
            if (arg_iter == results.end()) {
                err("Direct option test %lu.%lu: Expected to find %ls = %ls, but it was missing", test_idx, arg_idx, wide(key), wide(val));
            } else {
                const argument_t &arg = arg_iter->second;
                /* The value here can be interpreted a few ways. If it is "True" or "False", it means we expect the argument to have no values, and to have a count of 1 or 0, respectively. If it is % followed by a one-digit number, it represents the count of the argument; values is expected to be empty. Otherwise, split the value about ', '; those are the values we expect. */
                if (val == to_string("True")) {
                    /* A "true" means we expect the argument ot have no values, and to have appeared once */
                    do_arg_test(arg.count == 1);
                    do_arg_test(arg.values.empty());
                } else if (val == to_string("False") || val == to_string("None")) {
                    do_arg_test(arg.count == 0);
                    do_arg_test(arg.values.empty());
                } else if (is_percent_digit(val)) {
                    size_t expected_count = val.at(1) - '0';
                    assert(expected_count <= 9);
                    do_arg_test(arg.count == expected_count);
                    do_arg_test(arg.values.empty());
                } else {
                    const string_list_t values = split(val, ", ");
                    do_arg_test(arg.values == values);
                    if (arg.values != values) {
                        err("Key '%ls' expected '%ls', found '%ls'", wide(key), wide(join(arg.values, ", ")), wide(val));
                    }
                    /* Note that we don't test count here, since count will be 0 if it came from a default: clause, and nonzero if it did not */
                }
            }
        }
        
        // Verify nothing we didn't expect appears in our map
        for (arg_map_t::const_iterator iter = results.begin(); iter != results.end(); ++iter) {
            const string_t &key = iter->first;
            auto result = expected.find(key);
            if (result == expected.end()) {
                err("Test %lu.%lu: Unexpected key %ls with count %u", test_idx, arg_idx, wide(key), iter->second.count);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xb8(%rsp), %r12
pushq $0x20
popq %rdx
movq %r12, %rdi
callq 0x18e60
movq (%r12), %r12
leaq 0x5677(%rip), %rsi      # 0x1ea2e
leaq 0x58(%rsp), %rdi
callq 0x15160
leaq 0xb8(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %r12, %rsi
callq 0x19e84
leaq 0x58(%rsp), %rdi
callq 0x7050
leaq 0x60(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x8a7c
leaq 0xf0(%rsp), %rdi
movq %r15, %rsi
callq 0x1a686
leaq 0x8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x89e0
leaq 0xf0(%rsp), %rdi
callq 0xa4aa
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
xorl %ecx, %ecx
callq 0x88c6
leaq 0x58(%rsp), %rdi
leaq 0x88(%rsp), %r15
movq %r15, %rsi
callq 0x19f5c
movq %r15, %rdi
callq 0xd08c
leaq 0x460d(%rip), %rsi      # 0x1daa3
movq %r14, %rdi
callq 0x72f0
movq 0x30(%rsp), %rdx
movb $0x1, %cl
cmpq 0x38(%rsp), %rdx
jne 0x194c6
testl %eax, %eax
setne %dl
movq 0x10(%rsp), %rcx
cmpq 0x18(%rsp), %rcx
setne %cl
orb %cl, %dl
je 0x198ad
testl %eax, %eax
sete %dl
movl %ecx, %esi
xorb $0x1, %sil
orb %dl, %sil
je 0x197a8
testl %eax, %eax
sete %al
orb %al, %cl
jne 0x198c1
leaq 0x88(%rsp), %rdi
movq %r14, %rsi
callq 0x18ff2
leaq 0x90(%rsp), %rax
movq 0x10(%rax), %r14
leaq 0x90(%rsp), %rax
cmpq %rax, %r14
je 0x1983b
leaq 0x20(%r14), %r13
leaq 0x58(%rsp), %rdi
movq %r13, %rsi
callq 0x1a498
movq %rax, %rbp
movq %r14, 0x50(%rsp)
addq $0x40, %r14
leaq 0x60(%rsp), %rax
cmpq %rax, %rbp
je 0x195af
movq %rbx, %r15
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
leaq 0x5388(%rip), %rsi      # 0x1e8d8
callq 0x15160
movq %r14, %rdi
movq %r12, %rsi
callq 0x19e27
movl %eax, %ebx
movq %r12, %rdi
callq 0x7050
testb %bl, %bl
je 0x195c8
cmpl $0x1, 0x58(%rbp)
movq %r15, %rbx
je 0x19597
movl $0x14e, %ecx            # imm = 0x14E
leaq 0x640c(%rip), %rdi      # 0x1f98f
pushq $0x1
popq %rsi
movq %rbx, %rdx
leaq 0x6423(%rip), %r8       # 0x1f9b3
xorl %eax, %eax
callq 0x1549d
movq 0x40(%rbp), %rax
cmpq 0x48(%rbp), %rax
je 0x19683
movl $0x14f, %ecx            # imm = 0x14F
jmp 0x19668
movq (%r13), %rcx
movq (%r14), %r8
leaq 0x6802(%rip), %rdi      # 0x1fdbf
pushq $0x1
popq %rsi
movq %rbx, %rdx
jmp 0x1967c
movq %r12, %rdi
leaq 0x6403(%rip), %rsi      # 0x1f9d5
callq 0x15160
movq %r15, %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x19e27
testb %al, %al
je 0x195f3
movq %r12, %rdi
callq 0x7050
jmp 0x19633
leaq 0x108(%rsp), %rbx
movq %rbx, %rdi
leaq 0x63d6(%rip), %rsi      # 0x1f9db
callq 0x15160
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19e27
movq %rbx, %rdi
movl %eax, %ebx
callq 0x7050
leaq 0xd0(%rsp), %rdi
callq 0x7050
testb %bl, %bl
movq %r15, %rbx
je 0x19695
cmpl $0x0, 0x58(%rbp)
je 0x19659
movl $0x151, %ecx            # imm = 0x151
leaq 0x634a(%rip), %rdi      # 0x1f98f
pushq $0x1
popq %rsi
movq %rbx, %rdx
leaq 0x638e(%rip), %r8       # 0x1f9e0
xorl %eax, %eax
callq 0x1549d
movq 0x40(%rbp), %rax
cmpq 0x48(%rbp), %rax
je 0x19683
movl $0x152, %ecx            # imm = 0x152
leaq 0x6320(%rip), %rdi      # 0x1f98f
pushq $0x1
popq %rsi
movq %rbx, %rdx
leaq 0x6346(%rip), %r8       # 0x1f9c2
xorl %eax, %eax
callq 0x1549d
movq 0x50(%rsp), %rdi
callq 0x72c0
movq %rax, %r14
jmp 0x19503
movq %r14, %rdi
callq 0x19141
testb %al, %al
je 0x196f3
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0x73d0
movl (%rax), %eax
addl $-0x30, %eax
cmpl $0xa, %eax
jae 0x19908
cmpl %eax, 0x58(%rbp)
je 0x196df
movl $0x156, %ecx            # imm = 0x156
leaq 0x62c4(%rip), %rdi      # 0x1f98f
pushq $0x1
popq %rsi
movq %rbx, %rdx
leaq 0x6396(%rip), %r8       # 0x1fa6e
xorl %eax, %eax
callq 0x1549d
movq 0x40(%rbp), %rax
cmpq 0x48(%rbp), %rax
je 0x19683
movl $0x157, %ecx            # imm = 0x157
jmp 0x19668
leaq 0x108(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
leaq 0x6382(%rip), %rdx      # 0x1fa8a
callq 0x19190
addq $0x40, %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x19e50
testb %al, %al
jne 0x19740
movl $0x15a, %ecx            # imm = 0x15A
leaq 0x6263(%rip), %rdi      # 0x1f98f
pushq $0x1
popq %rsi
movq %rbx, %rdx
leaq 0x6354(%rip), %r8       # 0x1fa8d
xorl %eax, %eax
callq 0x1549d
movq %rbp, %rdi
leaq 0x108(%rsp), %rsi
callq 0x19e79
testb %al, %al
je 0x19796
movq (%r13), %r13
leaq 0xd0(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x631d(%rip), %rdx      # 0x1fa8a
callq 0x15242
movq 0xd0(%rsp), %rdx
movq (%r14), %rcx
leaq 0x631e(%rip), %rdi      # 0x1faa2
movq %r13, %rsi
xorl %eax, %eax
callq 0x1549d
movq %r15, %rdi
callq 0x7050
leaq 0x108(%rsp), %rdi
callq 0xb092
jmp 0x19683
leaq 0x65c8(%rip), %rdi      # 0x1fd77
pushq $0x1
popq %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1549d
leaq 0x10(%rsp), %rbx
leaq 0x88(%rsp), %r14
leaq 0xd0(%rsp), %r15
leaq 0x6168(%rip), %r12      # 0x1f940
xorl %r13d, %r13d
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x5, %rax
cmpq %rax, %r13
jae 0x198c1
movq 0x1b7d7(%rip), %rax     # 0x34fd0
movq (%rax), %rbp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x19e06
movq 0x18(%rax), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x10d68
movq %r14, %rdi
callq 0x18f20
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x7300
movq %r14, %rdi
callq 0x70e0
incq %r13
jmp 0x197db
movq 0x70(%rsp), %r12
leaq 0x88(%rsp), %r14
leaq 0x6279(%rip), %r15      # 0x1fac8
pushq $0x1
popq %r13
leaq 0x60(%rsp), %rax
cmpq %rax, %r12
je 0x1989e
leaq 0x20(%r12), %rsi
movq %r14, %rdi
callq 0x1a50e
leaq 0x90(%rsp), %rcx
cmpq %rcx, %rax
jne 0x19891
movq 0x20(%r12), %rcx
movl 0x58(%r12), %r8d
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1549d
movq %r12, %rdi
callq 0x72c0
movq %rax, %r12
jmp 0x19853
leaq 0x88(%rsp), %rdi
callq 0x1a584
jmp 0x198c1
leaq 0x6486(%rip), %rdi      # 0x1fd3a
pushq $0x1
popq %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1549d
leaq 0x8(%rsp), %rdi
callq 0x8af0
leaq 0x30(%rsp), %rdi
callq 0xf208
leaq 0x10(%rsp), %rdi
callq 0xebbc
leaq 0x58(%rsp), %rdi
callq 0xd08c
leaq 0xb8(%rsp), %rdi
callq 0xb092
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x60e0(%rip), %rdi      # 0x1f9ef
leaq 0x60ed(%rip), %rsi      # 0x1fa03
leaq 0x64ed(%rip), %rcx      # 0x1fe0a
movl $0x155, %edx            # imm = 0x155
callq 0x7150
jmp 0x19932
jmp 0x199b3
jmp 0x1998d
jmp 0x1998d
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0xb092
jmp 0x19990
jmp 0x1998d
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x7050
jmp 0x19990
jmp 0x199b3
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xa4aa
jmp 0x199b6
jmp 0x199b3
movq %rax, %rbx
jmp 0x199c0
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x7050
jmp 0x199de
movq %rax, %rbx
jmp 0x199de
jmp 0x1998d
jmp 0x1998d
jmp 0x1998d
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x1a584
jmp 0x199b6
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x70e0
jmp 0x199b6
jmp 0x199b3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8af0
leaq 0x30(%rsp), %rdi
callq 0xf208
leaq 0x10(%rsp), %rdi
callq 0xebbc
leaq 0x58(%rsp), %rdi
callq 0xd08c
leaq 0xb8(%rsp), %rdi
callq 0xb092
movq %rbx, %rdi
callq 0x7390