// File: /workspace/github_cpp_makefile_star2_O2/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 $0xc8, %rsp
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x15160
leaq 0x3310(%rip), %rdx      # 0x1cd3b
leaq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x19190
leaq 0x10(%rsp), %rdi
callq 0x7050
movq 0x48(%rsp), %r13
cmpq 0x50(%rsp), %r13
jne 0x19a7d
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
andl $0x0, (%rax)
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xc8d0
leaq 0x10(%rsp), %rdi
callq 0x7050
movq 0x48(%rsp), %r13
leaq 0x4faa(%rip), %rsi      # 0x1ea2e
leaq 0x10(%rsp), %rdi
callq 0x15160
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r13, %rsi
callq 0x19e84
leaq 0x10(%rsp), %rdi
callq 0x7050
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x8a7c
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x1a686
leaq 0x8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x89e0
leaq 0xb0(%rsp), %rdi
callq 0xa4aa
leaq 0x78(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
xorl %ecx, %ecx
callq 0x87b2
leaq 0x3f8a(%rip), %rsi      # 0x1daa3
movq %r15, %rdi
callq 0x72f0
movq 0x60(%rsp), %rdx
movb $0x1, %cl
cmpq 0x68(%rsp), %rdx
jne 0x19b49
testl %eax, %eax
setne %dl
movq 0x30(%rsp), %rcx
cmpq 0x38(%rsp), %rcx
setne %cl
orb %cl, %dl
je 0x19cc0
testl %eax, %eax
sete %dl
movl %ecx, %esi
xorb $0x1, %sil
orb %dl, %sil
je 0x19c34
testl %eax, %eax
sete %al
orb %al, %cl
jne 0x19cd4
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x15160
leaq 0x31bd(%rip), %rdx      # 0x1cd3b
leaq 0x90(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x15193
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1a8ba
testb %al, %al
je 0x19bdd
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1a8ba
testb %al, %al
je 0x19bdd
movq 0x10(%rsp), %rcx
movq 0x90(%rsp), %r8
leaq 0x6359(%rip), %rdi      # 0x1ff29
pushq $0x2
popq %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1549d
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rcx
cmpq %rcx, %rax
je 0x19c18
movq 0x88(%rax), %r8
addq $0x90, %rax
cmpq %r14, %r8
je 0x19bea
leaq 0x6371(%rip), %rdi      # 0x1ff79
pushq $0x2
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1549d
leaq 0x90(%rsp), %rdi
callq 0x7050
leaq 0x10(%rsp), %rdi
callq 0x7050
jmp 0x19cd4
leaq 0x629b(%rip), %rdi      # 0x1fed6
pushq $0x2
popq %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1549d
leaq 0x30(%rsp), %rbx
leaq 0x10(%rsp), %r14
leaq 0x90(%rsp), %r15
leaq 0x5cdf(%rip), %r12      # 0x1f940
xorl %r13d, %r13d
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
sarq $0x5, %rax
cmpq %rax, %r13
jae 0x19cd4
movq 0x1b352(%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 0x19c64
leaq 0x61c7(%rip), %rdi      # 0x1fe8e
pushq $0x2
popq %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1549d
leaq 0x78(%rsp), %rdi
callq 0xb3c6
leaq 0x8(%rsp), %rdi
callq 0x8af0
leaq 0x60(%rsp), %rdi
callq 0xf208
leaq 0x30(%rsp), %rdi
callq 0xebbc
leaq 0x48(%rsp), %rdi
callq 0xb092
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7050
jmp 0x19d80
jmp 0x19d7d
jmp 0x19d49
jmp 0x19d3f
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xa4aa
jmp 0x19d8a
movq %rax, %rbx
jmp 0x19d8a
movq %rax, %rbx
jmp 0x19d94
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7050
jmp 0x19da8
movq %rax, %rbx
jmp 0x19da8
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7050
jmp 0x19db2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x70e0
jmp 0x19d80
jmp 0x19d7d
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xb3c6
leaq 0x8(%rsp), %rdi
callq 0x8af0
leaq 0x60(%rsp), %rdi
callq 0xf208
leaq 0x30(%rsp), %rdi
callq 0xebbc
leaq 0x48(%rsp), %rdi
callq 0xb092
movq %rbx, %rdi
callq 0x7390