// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/ex/ex3-run.cc
// Function: main
int main(int argc, char** argv) {
    try {
        auto print_apple = [] { std::cout << "apple!\n"; };
        auto help = [argv0 = argv[0]] { to::usage(argv0, usage_str); };

        to::option opts[] = {
            { to::action(print_apple), to::flag, "-a", "--apple" },
            { to::action(help), to::flag, to::exit, "-h", "--help" },
            { {}, to::flag, to::stop, "--" }
        };

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

        std::cout << "remaining arguments:";
        for (auto a = argv+1; *a; ++a) std::cout << ' ' << *a;
        std::cout << "\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 $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movl %edi, 0xc(%rsp)
movq (%rsi), %r14
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0x4f7(%rip), %rax       # 0x2950
movq %rax, 0x18(%rsi)
leaq 0x50a(%rip), %rax       # 0x296e
movq %rax, 0x10(%rsi)
leaq 0x30(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x3c93(%rip), %rcx      # 0x610d
leaq 0x3c8f(%rip), %r8       # 0x6110
leaq 0xb0(%rsp), %r15
movq %r15, %rdi
callq 0x2a84
leaq 0x120(%rsp), %r15
leaq 0x90(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %r14, (%rsi)
leaq 0x4e1(%rip), %rax       # 0x2994
movq %rax, 0x18(%rsi)
leaq 0x5a0(%rip), %rax       # 0x2a5e
movq %rax, 0x10(%rsi)
leaq 0x10(%rsp), %rdx
movl $0x1, (%rdx)
movq %rsp, %rcx
movl $0x10, (%rcx)
leaq 0x3c3b(%rip), %r8       # 0x6118
leaq 0x3c37(%rip), %r9       # 0x611b
movq %r15, %rdi
callq 0x2b3c
leaq 0x190(%rsp), %r15
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
leaq 0xc62(%rip), %rax       # 0x3168
movq %rax, 0x18(%rsi)
leaq 0xc5b(%rip), %rax       # 0x316c
movq %rax, 0x10(%rsi)
leaq 0x8(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x4(%rsp), %rcx
movl $0x20, (%rcx)
leaq 0x3bf0(%rip), %r8       # 0x6122
movq %r15, %rdi
callq 0x2bf6
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x2553
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa0(%rsp), %rax
testq %rax, %rax
je 0x2572
leaq 0x90(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x80(%rsp), %rax
testq %rax, %rax
je 0x258e
leaq 0x70(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x8(%rbx), %r14
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
leaq 0x30(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movq %r14, %rcx
callq 0x2cad
cmpb $0x0, 0x30(%rsp)
je 0x268b
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x2f90
movb $0x0, -0x8(%r15)
leaq 0x10(%rsp), %rdi
callq 0x2f90
movq 0x79e2(%rip), %rdi      # 0x9fd0
leaq 0x3b30(%rip), %rsi      # 0x6125
movl $0x14, %edx
callq 0x2170
cmpq $0x0, (%r14)
je 0x2671
leaq 0x10(%rbx), %rbp
movq 0x79c0(%rip), %r14      # 0x9fd0
movq %rsp, %r15
movb $0x20, (%rsp)
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
movq %rax, %r12
movq -0x8(%rbp), %r13
testq %r13, %r13
je 0x264b
movq %r13, %rdi
callq 0x2090
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x2170
jmp 0x2666
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x21e0
cmpq $0x0, (%rbp)
leaq 0x8(%rbp), %rbp
jne 0x2613
movq 0x7958(%rip), %rdi      # 0x9fd0
leaq 0x3af3(%rip), %rsi      # 0x6172
movl $0x1, %edx
callq 0x2170
jmp 0x269a
movb $0x0, 0x30(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2f90
movl $0x150, %r14d           # imm = 0x150
leaq (%rsp,%r14), %rdi
addq $0x90, %rdi
callq 0x3184
leaq (%rsp,%r14), %rdi
addq $0x78, %rdi
callq 0x31b4
leaq (%rsp,%r14), %rbx
addq $0x60, %rbx
movq %rbx, %rdi
callq 0x31e4
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x26e8
leaq (%rsp,%r14), %rdi
addq $0x40, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x26a0
xorl %eax, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2947
jmp 0x2947
jmp 0x2947
jmp 0x27c4
movq %rdx, %r12
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x2f90
jmp 0x27ca
movq %rdx, %r12
movq %rax, %r14
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x2757
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2757
jmp 0x2947
movq %rdx, %r12
movq %rax, %r14
movq 0xa0(%rsp), %rax
testq %rax, %rax
je 0x2783
leaq 0x90(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2783
jmp 0x2947
movq %rdx, %r12
movq %rax, %r14
movq 0x80(%rsp), %rax
testq %rax, %rax
je 0x279f
leaq 0x70(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xb0(%rsp), %r13
cmpq %r15, %r13
je 0x27ea
addq $-0x70, %r15
movq %r15, %rdi
callq 0x49de
cmpq %r13, %r15
jne 0x27ac
jmp 0x27ea
jmp 0x2947
movq %rdx, %r12
movq %rax, %r14
movl $0xe0, %r15d
leaq (%rsp,%r15), %rdi
addq $0xb0, %rdi
callq 0x49de
addq $-0x70, %r15
cmpq $-0x70, %r15
jne 0x27d0
cmpl $0x1, %r12d
jne 0x293d
movq %r14, %rdi
callq 0x2080
movq %rax, %r14
movq (%rbx), %rbx
movq 0x791f(%rip), %rsi      # 0xa128
leaq 0xb0(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3120
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x30(%rsp), %rdi
leaq 0x4(%rsp), %rdx
movq %rax, %rsi
callq 0x3120
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x38f4(%rip), %rsi      # 0x613a
leaq 0x38f4(%rip), %rdx      # 0x6141
leaq 0x10(%rsp), %rdi
callq 0x333c
leaq 0xb0(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
callq 0x2fee
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x2888
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28a3
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2140
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28c4
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2140
callq 0x21d0
movl $0x1, %eax
jmp 0x26f0
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x28f2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x28f2
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2912
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x2912
movq %rax, %r14
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2938
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x2938
movq %rax, %r14
callq 0x21d0
movq %r14, %rdi
callq 0x2200
jmp 0x2947
movq %rax, %rdi
callq 0x315d
nop