// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movl %edi, 0x2c(%rsp)
movl $0x1, %eax
movq %rsp, %rcx
movl %eax, (%rcx)
movl $0x0, 0x4(%rsp)
leaq 0x4c43(%rip), %rdx      # 0x7130
movq %rdx, 0x30(%rsp)
movl %eax, 0x38(%rsp)
leaq 0x4c37(%rip), %rax      # 0x7134
movq %rax, 0x40(%rsp)
movl $0x2, 0x48(%rsp)
movq (%rsi), %r14
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %rcx, (%rsi)
leaq 0x189f(%rip), %rax      # 0x3dc8
movq %rax, 0x18(%rsi)
leaq 0x18c6(%rip), %rax      # 0x3dfa
movq %rax, 0x10(%rsi)
leaq 0x110(%rsp), %r12
leaq 0x4bf1(%rip), %rdx      # 0x7138
leaq 0x4bed(%rip), %rcx      # 0x713b
movq %r12, %rdi
callq 0x2c66
leaq 0x180(%rsp), %r12
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x360a
leaq 0x78(%rsp), %rdi
leaq 0x4(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x2d68
leaq 0x8(%rsp), %r8
movl $0x8, (%r8)
leaq 0x4baa(%rip), %rdx      # 0x7144
leaq 0x4ba6(%rip), %rcx      # 0x7147
leaq 0x78(%rsp), %rsi
movq %r12, %rdi
callq 0x2e0a
leaq 0x1f0(%rsp), %r12
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %r14, (%rsi)
leaq 0x5a4(%rip), %rax       # 0x2b76
movq %rax, 0x18(%rsi)
leaq 0x663(%rip), %rax       # 0x2c40
movq %rax, 0x10(%rsi)
leaq 0x50(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x74(%rsp), %rcx
movl $0x10, (%rcx)
leaq 0x4b54(%rip), %r8       # 0x7152
leaq 0x4b50(%rip), %r9       # 0x7155
movq %r12, %rdi
callq 0x2f12
movq 0xc0(%rsp), %rax
testq %rax, %rax
je 0x262c
leaq 0xb0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x2648
leaq 0x78(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x98(%rsp), %rdi
callq 0x3644
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x2674
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x8(%rbx), %r14
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
leaq 0x8(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x2c(%rsp), %rdx
movq %r14, %rcx
callq 0x2fcc
cmpb $0x1, 0x8(%rsp)
jne 0x2733
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x32ca
movb $0x0, -0x8(%r15)
leaq 0x50(%rsp), %rdi
callq 0x32ca
cmpq $0x0, (%r14)
jne 0x27b3
cmpl $0x0, (%rsp)
jle 0x2828
cmpl $0x0, (%rsp)
jle 0x2742
xorl %ebp, %ebp
movq 0x88e0(%rip), %r14      # 0xafd0
leaq 0x4a90(%rip), %r15      # 0x7187
leaq 0x4a30(%rip), %r12      # 0x712e
movl $0x15, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21a0
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x2270
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21a0
incl %ebp
cmpl (%rsp), %ebp
jl 0x26fe
jmp 0x2742
movb $0x0, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x32ca
movl $0x150, %r14d           # imm = 0x150
leaq (%rsp,%r14), %rdi
addq $0xf0, %rdi
callq 0x3a00
leaq (%rsp,%r14), %rdi
addq $0xd8, %rdi
callq 0x3a30
leaq (%rsp,%r14), %rbx
addq $0xc0, %rbx
movq %rbx, %rdi
callq 0x3a60
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x2799
leaq (%rsp,%r14), %rdi
addq $0xa0, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x2748
xorl %eax, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0x20c0
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x498c(%rip), %rsi      # 0x715c
leaq 0x499a(%rip), %rdx      # 0x7171
leaq 0x8(%rsp), %rdi
callq 0x3c82
movq (%r14), %rsi
leaq 0xf0(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x3326
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
movq %r12, %rdi
callq 0x3364
xorl %ebp, %ebp
leaq 0x8461(%rip), %rsi      # 0xac78
leaq 0x26e6(%rip), %rdx      # 0x4f04
movq %r12, %rdi
callq 0x2260
jmp 0x28a4
movl $0x30, %edi
callq 0x20c0
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x492d(%rip), %rsi      # 0x7172
leaq 0x493a(%rip), %rdx      # 0x7186
leaq 0x8(%rsp), %rdi
callq 0x3c82
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x21c0
leaq 0x8433(%rip), %rax      # 0xaca0
movq %rax, (%r12)
movq %r12, %rax
addq $0x20, %rax
movq %rax, 0x10(%r12)
movq $0x0, 0x18(%r12)
movb $0x0, 0x20(%r12)
xorl %ebp, %ebp
leaq 0x83e3(%rip), %rsi      # 0xac78
leaq 0x2668(%rip), %rdx      # 0x4f04
movq %r12, %rdi
callq 0x2260
movq %rdx, %r15
movq %rax, %r14
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28de
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x28de
movq %rdx, %r15
movq %rax, %r14
movb $0x1, %bpl
jmp 0x28de
movq %rdx, %r15
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x2902
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2902
jmp 0x28f9
movq %rdx, %r15
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x29f8
movq %r12, %rdi
callq 0x2110
jmp 0x29f8
jmp 0x29ea
jmp 0x29ea
jmp 0x29ea
movq %rdx, %r15
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x32ca
jmp 0x29f8
movq %rdx, %r15
movq %rax, %r14
movq 0xc0(%rsp), %rax
testq %rax, %rax
je 0x296e
leaq 0xb0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x296e
jmp 0x29ea
movq %rdx, %r15
movq %rax, %r14
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x2994
leaq 0x78(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2994
jmp 0x29ea
movq %rdx, %r15
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0x3644
jmp 0x29a9
movq %rdx, %r15
movq %rax, %r14
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x29c8
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x110(%rsp), %r13
cmpq %r12, %r13
je 0x2a18
addq $-0x70, %r12
movq %r12, %rdi
callq 0x5612
cmpq %r13, %r12
jne 0x29d5
jmp 0x2a18
jmp 0x29ea
movq %rax, %rdi
callq 0x35ff
movq %rdx, %r15
movq %rax, %r14
movl $0xe0, %r12d
leaq (%rsp,%r12), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x5612
addq $-0x70, %r12
cmpq $-0x70, %r12
jne 0x29fe
cmpl $0x1, %r15d
jne 0x2b69
movq %r14, %rdi
callq 0x2090
movq %rax, %r14
movq (%rbx), %rbx
movq 0x8731(%rip), %rsi      # 0xb168
leaq 0x110(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x3326
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x30(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x3326
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x472b(%rip), %rsi      # 0x719d
leaq 0x472b(%rip), %rdx      # 0x71a4
leaq 0x8(%rsp), %rdi
callq 0x3c82
leaq 0x110(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
callq 0x34cd
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2ab4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2acf
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2af0
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x2170
callq 0x2230
movl $0x1, %eax
jmp 0x27a1
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2b1e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2b1e
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b3e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2b3e
movq %rax, %r14
leaq 0x120(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b64
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2b64
movq %rax, %r14
callq 0x2230
movq %r14, %rdi
callq 0x2280
jmp 0x29ea