// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/ex/ex2-parse.cc
// Function: main
int main(int, char** argv) {
    try {
        std::vector<int> x;
        bool help = false;

        for (auto arg = argv+1; *arg; ) {
            bool ok =
                help << to::parse(arg, "-h", "--help") ||
                x    << to::parse<std::vector<int>>(arg, to::delimited<int>(), "--sum");

            if (!ok) throw to::option_error("unrecognized argument", *arg);
        }

        if (help) {
            to::usage(argv[0], usage_str);
            return 0;
        }

        std::cout << std::accumulate(x.begin(), x.end(), 0) << "\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 $0xe8, %rsp
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rsi, 0x70(%rsp)
leaq 0x8(%rsi), %rax
leaq 0x48(%rsp), %r15
movq %rax, (%r15)
xorl %r13d, %r13d
leaq 0xa0(%rsp), %r12
leaq 0x78(%rsp), %r14
leaq 0x28(%rsp), %rbp
movq 0x48(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2595
movq %r12, %rdi
leaq 0x1c5b(%rip), %rsi      # 0x407a
callq 0x2a30
leaq 0x5(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
leaq 0x1c47(%rip), %rcx      # 0x407d
callq 0x293c
cmpb $0x0, 0x5(%rsp)
je 0x244c
movb $0x1, %r13b
movb $0x1, %bl
jmp 0x24ef
movb $0x2c, 0x6(%rsp)
movq %r14, %rdi
leaq 0x1c29(%rip), %rsi      # 0x4084
callq 0x2a30
movq %rbp, %rdi
movq %r15, %rsi
leaq 0x6(%rsp), %rdx
movq %r14, %rcx
callq 0x2ae8
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %rbp, %rdx
callq 0x2ab4
movb 0x8(%rsp), %bl
cmpb $0x1, %bl
jne 0x24a5
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x24a5
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movb $0x0, 0x8(%rsp)
cmpb $0x1, 0x28(%rsp)
jne 0x24c8
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x24c8
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movb $0x0, 0x28(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x24ef
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2160
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x2514
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2160
testb %bl, %bl
jne 0x2406
movl $0x30, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1b50(%rip), %rsi      # 0x408a
leaq 0x1b5e(%rip), %rdx      # 0x409f
leaq 0x8(%rsp), %rdi
callq 0x31c0
movq 0x48(%rsp), %rax
movq (%rax), %rsi
leaq 0xc8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x2d54
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
movq %rbx, %rdi
callq 0x2d92
xorl %ebp, %ebp
leaq 0x3762(%rip), %rsi      # 0x5ce8
leaq 0x102f(%rip), %rdx      # 0x35bc
movq %rbx, %rdi
callq 0x2210
testb $0x1, %r13b
je 0x2625
movq 0x70(%rsp), %rax
movq (%rax), %rbx
movq 0x3b92(%rip), %rsi      # 0x6140
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x2d54
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1ad2(%rip), %rsi      # 0x40a0
leaq 0x1ad2(%rip), %rdx      # 0x40a7
leaq 0x28(%rsp), %rdi
callq 0x31c0
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x2efb
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2608
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x265e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x265e
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
xorl %esi, %esi
cmpq %rcx, %rax
je 0x263e
addl (%rax), %esi
addq $0x4, %rax
jmp 0x2631
movq 0x398b(%rip), %rdi      # 0x5fd0
callq 0x2220
leaq 0x1a27(%rip), %rsi      # 0x4078
movl $0x1, %edx
movq %rax, %rdi
callq 0x2190
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x2675
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x26ae
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x26ae
movq %rdx, %r15
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x27cf
movq 0x18(%rsp), %rsi
jmp 0x27bf
jmp 0x27c9
jmp 0x27c9
movq %rdx, %r15
movq %rax, %r14
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26fb
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2160
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2712
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
testb %bpl, %bpl
jne 0x2749
jmp 0x27cf
movq %rdx, %r15
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2749
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x2749
movq %rdx, %r15
movq %rax, %r14
jmp 0x2767
movq %rdx, %r15
movq %rax, %r14
movq %rbx, %rdi
callq 0x2100
jmp 0x27cf
jmp 0x279c
movq %rdx, %r15
movq %rax, %r14
cmpb $0x1, 0x28(%rsp)
je 0x278b
movb $0x0, 0x28(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x27a2
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x27a2
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2270
jmp 0x2762
movq %rdx, %r15
movq %rax, %r14
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x27cf
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x27cf
movq %rdx, %r15
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x27e6
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
cmpl $0x1, %r15d
jne 0x292c
movq %r14, %rdi
callq 0x2080
movq %rax, %r14
movq 0x70(%rsp), %rax
movq (%rax), %rbx
movq 0x3936(%rip), %rsi      # 0x6140
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x2d54
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x5(%rsp), %rdx
movq %rax, %rsi
callq 0x2d54
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x185c(%rip), %rsi      # 0x40a0
leaq 0x185c(%rip), %rdx      # 0x40a7
leaq 0x50(%rsp), %rdi
callq 0x31c0
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %rbx, %rdi
callq 0x2fb0
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x2883
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x289e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
callq 0x21e0
movl $0x1, %eax
jmp 0x2677
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x28e7
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x28e7
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2907
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x2907
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2927
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x2927
movq %rax, %r14
callq 0x21e0
movq %r14, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x30e2