// File: ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: run_1_usage_err_test(char const*, int, unsigned long, unsigned long)
static void run_1_usage_err_test(const char *usage, int expected_error_code, size_t test_idx, size_t arg_idx) {
    const string_t usage_str(usage, usage + strlen(usage));
    
    /* Perform the parsing */
    std::vector<doc_error_t> error_list;
    argument_parser_t parser(usage_str, &error_list);
    
    /* Check errors */
    if (error_list.empty()) {
        err("Usage Err Test %lu.%lu: No errors reported for '%s'. Expected error '%d'.", test_idx, arg_idx, usage, expected_error_code);
    } else {
        if (error_list.front().code != expected_error_code) {
            err("Test %lu.%lu: Wrong error code for '%s'. Expected '%d', got '%d' with text %ls", test_idx, arg_idx, usage, expected_error_code, error_list.front().code, wide(error_list.front().text));
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x8110
movq %rax, %rcx
movq -0xb8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x8130
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
movq -0xa8(%rbp), %rcx
leaq -0x40(%rbp), %rdi
callq 0x43f20
jmp 0x4392e
leaq -0x41(%rbp), %rdi
callq 0x85f0
leaq -0x70(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0xbe50
movq -0xc0(%rbp), %rdx
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xab40
jmp 0x4395d
leaq -0x70(%rbp), %rdi
callq 0xbfd0
testb $0x1, %al
jne 0x4396c
jmp 0x439cd
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %r8d
leaq 0xc043(%rip), %rdi      # 0x4f9c6
xorl %eax, %eax
callq 0x3b570
jmp 0x4398c
jmp 0x43b10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x41(%rbp), %rdi
callq 0x85f0
jmp 0x43b4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x43b3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x43b34
leaq -0x70(%rbp), %rdi
callq 0x49b50
movl 0x10(%rax), %eax
cmpl -0xc(%rbp), %eax
je 0x43b0e
movq -0x18(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0xe4(%rbp)
leaq -0x70(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x49b50
movq -0xe0(%rbp), %rdi
movl 0x10(%rax), %eax
movl %eax, -0xd4(%rbp)
callq 0x49b50
movq 0x18(%rax), %rax
movq %rax, -0xd0(%rbp)
leaq -0x99(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x85e0
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
leaq -0x98(%rbp), %rdi
callq 0x2be70
jmp 0x43a6b
leaq -0x98(%rbp), %rdi
callq 0x407f0
movq %rax, -0x108(%rbp)
jmp 0x43a80
movl -0xd4(%rbp), %r9d
movl -0xe4(%rbp), %r8d
movq -0xf0(%rbp), %rcx
movq -0xf8(%rbp), %rdx
movq -0x100(%rbp), %rsi
movq -0x108(%rbp), %rdi
movq %rsp, %rax
movq %rdi, (%rax)
leaq 0xc050(%rip), %rdi      # 0x4fb07
xorl %eax, %eax
callq 0x3b570
jmp 0x43ac0
leaq -0x98(%rbp), %rdi
callq 0x81c0
leaq -0x99(%rbp), %rdi
callq 0x8380
jmp 0x43b0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x43b00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x81c0
leaq -0x99(%rbp), %rdi
callq 0x8380
jmp 0x43b34
jmp 0x43b10
leaq -0x78(%rbp), %rdi
callq 0xac20
leaq -0x70(%rbp), %rdi
callq 0xc3d0
leaq -0x40(%rbp), %rdi
callq 0x8590
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
leaq -0x78(%rbp), %rdi
callq 0xac20
leaq -0x70(%rbp), %rdi
callq 0xc3d0
leaq -0x40(%rbp), %rdi
callq 0x8590
movq -0x50(%rbp), %rdi
callq 0x85d0
nopl (%rax,%rax)