// File: /workspace/github_cpp_makefile_star2_O2/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 $0xf8, %rsp
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq %rsi, 0x38(%rsp)
leaq 0x8(%rsi), %rax
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movl $0x0, 0xc(%rsp)
leaq 0xd0(%rsp), %r13
leaq 0xa8(%rsp), %r14
leaq 0x40(%rsp), %r12
leaq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2513
movq %r13, %rdi
leaq 0x1c61(%rip), %rsi      # 0x407a
callq 0x27fa
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq 0x1c4d(%rip), %rcx      # 0x407d
callq 0x2761
cmpb $0x0, 0x8(%rsp)
je 0x2446
movb $0x1, %al
movl %eax, 0xc(%rsp)
movb $0x1, %bl
jmp 0x2499
movb $0x2c, 0x9(%rsp)
movq %r14, %rdi
leaq 0x1c2f(%rip), %rsi      # 0x4084
callq 0x27fa
movq %r12, %rdi
movq %r15, %rsi
leaq 0x9(%rsp), %rdx
movq %r14, %rcx
callq 0x2875
movq %rbp, %rdi
leaq 0x60(%rsp), %rsi
movq %r12, %rdx
callq 0x2848
movb 0x18(%rsp), %bl
movq %rbp, %rdi
callq 0x33ee
movq %r12, %rdi
callq 0x33ee
movq %r14, %rdi
callq 0x2080
movq %r13, %rdi
callq 0x2080
testb %bl, %bl
jne 0x2400
pushq $0x30
popq %rdi
callq 0x20b0
movq %rax, %r12
leaq 0x1bcf(%rip), %rsi      # 0x408a
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x2a50
movq 0x10(%rsp), %rax
movq (%rax), %rsi
leaq 0x88(%rsp), %rdi
leaq 0x9(%rsp), %rdx
callq 0x2a50
movb $0x1, %bl
leaq 0x18(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %r12, %rdi
callq 0x2a8c
xorl %ebx, %ebx
leaq 0x47ec(%rip), %rsi      # 0x6cf0
leaq 0xb39(%rip), %rdx       # 0x3044
movq %r12, %rdi
callq 0x2220
testb $0x1, 0xc(%rsp)
je 0x2576
movq 0x38(%rsp), %rax
movq (%rax), %rbx
movq 0x4c27(%rip), %rsi      # 0x7150
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x2a50
leaq 0x1b61(%rip), %rsi      # 0x40a0
leaq 0x40(%rsp), %rdi
leaq 0x9(%rsp), %rdx
callq 0x2a50
leaq 0x18(%rsp), %rsi
leaq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x2b1f
leaq 0x40(%rsp), %rdi
callq 0x2080
leaq 0x18(%rsp), %rdi
callq 0x2080
jmp 0x25aa
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rcx
xorl %esi, %esi
cmpq %rcx, %rax
je 0x258f
addl (%rax), %esi
addq $0x4, %rax
jmp 0x2582
movq 0x4a3a(%rip), %rdi      # 0x6fd0
callq 0x2230
leaq 0x1ad6(%rip), %rsi      # 0x4078
movq %rax, %rdi
callq 0x2160
leaq 0x60(%rsp), %rdi
callq 0x2d6e
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x2080
jmp 0x25e0
movq %rdx, %r15
movq %rax, %r14
leaq 0x18(%rsp), %rdi
jmp 0x265f
jmp 0x2666
jmp 0x2666
movq %rdx, %r15
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x2080
jmp 0x2608
movq %rdx, %r15
movq %rax, %r14
movb $0x1, %bl
leaq 0x18(%rsp), %rdi
callq 0x2080
testb %bl, %bl
jne 0x2626
jmp 0x266c
movq %rdx, %r15
movq %rax, %r14
jmp 0x2642
movq %rdx, %r15
movq %rax, %r14
movq %r12, %rdi
callq 0x2100
jmp 0x266c
jmp 0x2651
movq %rdx, %r15
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x33ee
leaq 0xa8(%rsp), %rdi
callq 0x2080
jmp 0x2657
movq %rdx, %r15
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
callq 0x2080
jmp 0x266c
movq %rdx, %r15
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x2d6e
cmpl $0x1, %r15d
jne 0x2751
movq %r14, %rdi
callq 0x2060
movq %rax, %r14
movq 0x38(%rsp), %rax
movq (%rax), %rbx
movq 0x4ab6(%rip), %rsi      # 0x7150
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x2a50
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x40(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rax, %rsi
callq 0x2a50
leaq 0x19d5(%rip), %rsi      # 0x40a0
leaq 0x60(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x2a50
leaq 0x18(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %rbx, %rdi
callq 0x2b91
leaq 0x60(%rsp), %rdi
callq 0x2080
leaq 0x40(%rsp), %rdi
callq 0x2080
leaq 0x18(%rsp), %rdi
callq 0x2080
callq 0x2200
pushq $0x1
popq %rax
jmp 0x25b6
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x2080
jmp 0x272e
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x2080
jmp 0x273d
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x2080
jmp 0x274c
movq %rax, %r14
callq 0x2200
movq %r14, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x2c3b