// File: /workspace/github_cpp_makefile_star2_O1/ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: run_1_annotated_suggestion_test(unsigned long, unsigned long, char const*, std::pair<char const*, unsigned long>, std::vector<docopt_fish::annotated_option_t, std::allocator<docopt_fish::annotated_option_t>> const&)
static void run_1_annotated_suggestion_test(unsigned long test_idx, unsigned long arg_idx, const char *joined_argv, std::pair<const char *, size_t> expected_token_and_offset, const std::vector<annotated_option_t> &dopts) {
    
    // Separate argv by spaces
    // Ensure we have at least one argument (partial last)
    string_list_t argv = split(to_string(joined_argv), " ");
    if (argv.empty()) argv.push_back(string_t());
    
    // Prepend the program name for every test case
    argv.insert(argv.begin(), to_string("prog"));
    
    /* Perform the parsing */
    std::vector<doc_error_t> error_list;
    vector<size_t> unused_args;
    argument_parser_t parser;
    parser.set_options(dopts);
    suggestion_list_t results = parser.suggest_next_argument(argv, 0);
    
    const char *joined_expected_results = expected_token_and_offset.first;
    
    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 suggestion test %lu.%lu was expected to fail, but did not", test_idx, arg_idx);
    } else if (did_error && ! expects_error) {
        err("Direct option suggestion 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 space-separated list
        string_t expected = to_string(joined_expected_results);
        string_t actual = join(results, " ");
        if (expected != actual) {
            if (expected != actual) {
                err("Annotated suggestion test %lu.%lu: Wrong suggestions. Expected '%ls', got '%ls'", test_idx, arg_idx, wide(expected), wide(actual));
            }
        }
        
        // Verify offsets
        size_t expected_offset = expected_token_and_offset.second;
        for (const suggestion_t &s : results) {
            if (s.offset != expected_offset) {
                err("Annotated suggestion test %lu.%lu: Wrong offset. Expected %lu, got %lu", test_idx, arg_idx, expected_offset, s.offset);
                break;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, 0x28(%rsp)
movq %rsi, %rdi
callq 0x70b0
leaq (%rax,%r13), %rdx
leaq 0x10(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq %rsp, %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x21084
leaq 0x4551(%rip), %rdx      # 0x22d3b
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x1db7f
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1e812
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x1e858
movq %rsp, %rsi
movq %rbx, (%rsi)
movq $0x0, 0x8(%rsi)
movl $0x0, 0x10(%rsi)
leaq 0x30(%rsp), %rdi
callq 0xde04
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1e858
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
movq 0x30(%rsp), %r13
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0x615c(%rip), %rsi      # 0x249c6
leaq 0x6159(%rip), %rdx      # 0x249ca
callq 0x21084
leaq 0x30(%rsp), %rdi
movq %rsp, %rdx
movq %r13, %rsi
callq 0x1eb48
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1e8a1
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
leaq 0x20(%rsp), %rdi
callq 0x93ca
leaq 0x80(%rsp), %rdi
movq %r12, %rsi
callq 0x1f52e
leaq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x9286
leaq 0x80(%rsp), %rdi
callq 0xb746
leaq 0x48(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x30(%rsp), %rdx
xorl %ecx, %ecx
callq 0x8eda
leaq 0x5144(%rip), %rsi      # 0x23a3b
movq %r15, %rdi
callq 0x72b0
testl %eax, %eax
je 0x1e9be
movq %r15, %rdi
callq 0x70b0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %rbx, (%rdi)
movq %r15, %rsi
callq 0x21084
leaq 0x4413(%rip), %rdx      # 0x22d3b
leaq 0x60(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1759b
movq 0x8(%rsp), %r15
movq 0x68(%rsp), %r12
cmpq %r12, %r15
jne 0x1e97a
testq %r15, %r15
je 0x1e99b
movq 0x60(%rsp), %rsi
movq (%rsp), %rdi
movq %r15, %rdx
callq 0x71d0
testl %eax, %eax
je 0x1e99b
cmpq %r12, %r15
jne 0x1e97a
movq 0x60(%rsp), %rsi
movq (%rsp), %rdi
movq %r15, %rdx
callq 0x71d0
testl %eax, %eax
je 0x1e99b
movq (%rsp), %rcx
movq 0x60(%rsp), %r8
leaq 0x748e(%rip), %rdi      # 0x25e18
movl $0x2, %esi
movq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0x17a6e
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
cmpq %rcx, %rax
je 0x1e9f3
movq 0x88(%rax), %r8
cmpq %r14, %r8
jne 0x1e9d8
addq $0x90, %rax
jmp 0x1e9a5
leaq 0x740b(%rip), %rdi      # 0x25dd0
movl $0x2, %esi
movq 0x28(%rsp), %rdx
xorl %eax, %eax
callq 0x17a6e
jmp 0x1ea2e
leaq 0x7489(%rip), %rdi      # 0x25e68
movl $0x2, %esi
movq 0x28(%rsp), %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x17a6e
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ea13
movq 0x70(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ea2e
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
leaq 0x48(%rsp), %rdi
callq 0xc5e4
leaq 0x20(%rsp), %rdi
callq 0x948a
leaq 0x30(%rsp), %rdi
callq 0xc1d0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1eab4
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ea83
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
jmp 0x1ea83
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0xc5e4
jmp 0x1eaa6
jmp 0x1eaa3
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0xb746
jmp 0x1eaa6
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x948a
jmp 0x1ead7
jmp 0x1ead4
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ead7
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
jmp 0x1ead7
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xc1d0
movq %r14, %rdi
callq 0x7360
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x1eae1
movq 0x10(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x7200
jmp 0x1eae1
nop