// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/ex/ex1-run.cc
// Function: main
int main(int argc, char** argv) {
    try {
        int n = 1, fn = 0;

        std::pair<const char*, int> functions[] = {
            { "one", 1 }, { "two", 2 }
        };

        auto help = [argv0 = argv[0]] { to::usage(argv0, usage_str); };

        to::option opts[] = {
            { n, "-n", "--number" },
            { {fn, to::keywords(functions)}, "-f", "--function", to::mandatory },
            { to::action(help), to::flag, to::exit, "-h", "--help" }
        };

        if (!to::run(opts, argc, argv+1)) return 0;

        if (argv[1]) throw to::option_error("unrecognized argument", argv[1]);
        if (n<1) throw to::option_error("N must be at least 1");

        // Do things with arguments:

        for (int i = 0; i<n; ++i) {
            std::cout << "Performing function #" << fn << "\n";
        }
    }
    catch (to::option_error& e) {
        to::usage_error(argv[0], usage_str, e.what());
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, %r14
movl %edi, 0xc(%rsp)
pushq $0x1
popq %rbx
leaq 0x4(%rsp), %rax
andl $0x0, (%rsp)
movl %ebx, (%rax)
leaq 0x3d27(%rip), %rcx      # 0x6140
movq %rcx, 0x50(%rsp)
movl %ebx, 0x58(%rsp)
leaq 0x3d1b(%rip), %rcx      # 0x6144
movq %rcx, 0x60(%rsp)
movl $0x2, 0x68(%rsp)
movq (%rsi), %r15
leaq 0xf0(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %rax, (%rsi)
leaq 0x129c(%rip), %rax      # 0x36ec
movq %rax, 0x18(%rsi)
leaq 0x1297(%rip), %rax      # 0x36f2
movq %rax, 0x10(%rsi)
leaq 0x110(%rsp), %r13
leaq 0x3cda(%rip), %rdx      # 0x6148
leaq 0x3cd6(%rip), %rcx      # 0x614b
movq %r13, %rdi
callq 0x2978
leaq 0x180(%rsp), %r13
leaq 0x78(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2fc6
leaq 0x90(%rsp), %rdi
movq %rsp, %rsi
leaq 0x78(%rsp), %rdx
callq 0x2a16
leaq 0x10(%rsp), %r8
movl $0x8, (%r8)
leaq 0x3c98(%rip), %rdx      # 0x6154
leaq 0x3c94(%rip), %rcx      # 0x6157
leaq 0x90(%rsp), %rsi
movq %r13, %rdi
callq 0x2a64
leaq 0x1f0(%rsp), %r13
leaq 0xd0(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %r15, (%rsi)
leaq 0x3da(%rip), %rax       # 0x28cc
movq %rax, 0x18(%rsi)
leaq 0x455(%rip), %rax       # 0x2952
movq %rax, 0x10(%rsi)
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x8(%rsp), %rcx
movl $0x10, (%rcx)
leaq 0x3c44(%rip), %r8       # 0x6162
leaq 0x3c40(%rip), %r9       # 0x6165
movq %r13, %rdi
callq 0x2b08
leaq 0xd0(%rsp), %rdi
callq 0x3472
leaq 0x90(%rsp), %rdi
callq 0x3472
leaq 0x78(%rsp), %rdi
callq 0x2ffc
leaq 0xf0(%rsp), %rdi
callq 0x3472
leaq 0x8(%r14), %r15
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r8
movaps %xmm0, (%r8)
andq $0x0, 0x10(%r8)
leaq 0x10(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movq %r15, %rcx
callq 0x2b95
leaq 0x10(%rsp), %rdi
movb (%rdi), %bpl
callq 0x3662
leaq 0x30(%rsp), %rdi
callq 0x2df8
testb %bpl, %bpl
je 0x2603
cmpq $0x0, (%r15)
jne 0x2638
movl 0x4(%rsp), %eax
testl %eax, %eax
jle 0x26a0
xorl %ebp, %ebp
movq 0x8a08(%rip), %r15      # 0xafd0
leaq 0x3bc8(%rip), %r12      # 0x6197
leaq 0x3b68(%rip), %r13      # 0x613e
cmpl %eax, %ebp
jge 0x2603
movq %r15, %rdi
movq %r12, %rsi
callq 0x2170
movl (%rsp), %esi
movq %rax, %rdi
callq 0x2260
movq %rax, %rdi
movq %r13, %rsi
callq 0x2170
incl %ebp
movl 0x4(%rsp), %eax
jmp 0x25d6
movl $0xe0, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x4c9c
addq $-0x70, %rbx
cmpq $-0x70, %rbx
jne 0x2608
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0x20c0
movq %rax, %r13
leaq 0x3b22(%rip), %rsi      # 0x616c
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2e1a
movq (%r15), %rsi
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x2e1a
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
movq %r13, %rdi
callq 0x2e56
xorl %ebp, %ebp
leaq 0x85f1(%rip), %rsi      # 0xac80
leaq 0x1f50(%rip), %rdx      # 0x45e6
movq %r13, %rdi
callq 0x2250
jmp 0x26e9
pushq $0x30
popq %rdi
callq 0x20c0
movq %rax, %r13
leaq 0x3ad0(%rip), %rsi      # 0x6182
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2e1a
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x2eea
xorl %ebp, %ebp
leaq 0x85a6(%rip), %rsi      # 0xac80
leaq 0x1f05(%rip), %rdx      # 0x45e6
movq %r13, %rdi
callq 0x2250
movq %rdx, %r12
movq %rax, %r15
leaq 0xb0(%rsp), %rdi
callq 0x2090
jmp 0x270f
movq %rdx, %r12
movq %rax, %r15
movb $0x1, %bpl
jmp 0x270f
movq %rdx, %r12
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x2090
testb %bpl, %bpl
jne 0x272b
jmp 0x27bf
jmp 0x2725
movq %rdx, %r12
movq %rax, %r15
movq %r13, %rdi
callq 0x2110
jmp 0x27bf
movq %rdx, %r12
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x2df8
jmp 0x27bf
movq %rdx, %r12
movq %rax, %r15
leaq 0xd0(%rsp), %rdi
callq 0x3472
jmp 0x2765
movq %rdx, %r12
movq %rax, %r15
leaq 0x90(%rsp), %rdi
callq 0x3472
jmp 0x277a
movq %rdx, %r12
movq %rax, %r15
leaq 0x78(%rsp), %rdi
callq 0x2ffc
jmp 0x278c
movq %rdx, %r12
movq %rax, %r15
leaq 0xf0(%rsp), %rdi
callq 0x3472
leaq 0x110(%rsp), %rbp
cmpq %r13, %rbp
je 0x27df
addq $-0x70, %r13
movq %r13, %rdi
callq 0x4c9c
cmpq %rbp, %r13
jne 0x27a6
jmp 0x27df
movq %rdx, %r12
movq %rax, %r15
movl $0xe0, %r13d
leaq (%rsp,%r13), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x4c9c
addq $-0x70, %r13
cmpq $-0x70, %r13
jne 0x27c5
cmpl $0x1, %r12d
jne 0x28bc
movq %r15, %rdi
callq 0x2070
movq %rax, %r15
movq (%r14), %r14
movq 0x8972(%rip), %rsi      # 0xb170
leaq 0x110(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x2e1a
movq (%r15), %rax
movq %r15, %rdi
callq *0x10(%rax)
leaq 0x50(%rsp), %rdi
leaq 0x4(%rsp), %rdx
movq %rax, %rsi
callq 0x2e1a
leaq 0x397b(%rip), %rsi      # 0x61ad
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
callq 0x2e1a
leaq 0x110(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
callq 0x2f10
leaq 0x10(%rsp), %rdi
callq 0x2090
leaq 0x50(%rsp), %rdi
callq 0x2090
leaq 0x110(%rsp), %rdi
callq 0x2090
callq 0x2230
jmp 0x2624
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x2090
jmp 0x2896
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0x2090
jmp 0x28a5
movq %rax, %r15
leaq 0x110(%rsp), %rdi
callq 0x2090
jmp 0x28b7
movq %rax, %r15
callq 0x2230
movq %r15, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x2fba