// File: /workspace/github_cpp_makefile_star2_O1/halfflat[P]tinyopt/ex/ex7-run.cc
// Function: main
int main(int argc, char** argv) {
    try {
        auto help = [argv0 = argv[0]] { to::usage(argv0, usage_str); };

        std::vector<std::vector<int>> nss;

        auto new_ns = [&]() { nss.push_back({}); return true; };
        auto push_ns = [&](int n) { nss.back().push_back(n); return true; };

        auto gt0 = [](int m) { return m>0; };
        auto decrement = [](int m) { return m-1; };

        to::option opts[] = {
            { to::action(help), "-h", "--help", to::flag, to::exit },
            { to::action(new_ns), to::then(3), "-n", to::flag },
            { to::action(push_ns), to::when(gt0), to::then(decrement)}
        };

        if (!to::run(opts, argc, argv+1)) return 0;
        if (argv[1]) throw to::option_error("unrecognized argument", argv[1]);

        for (auto& ns: nss) {
            std::cout << "{ ";
            std::ostream_iterator<int> os(std::cout, " ");
            for (int n: ns) *os = n;
            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 $0x278, %rsp            # imm = 0x278
movl %edi, 0x44(%rsp)
movq %rsi, 0x48(%rsp)
movq (%rsi), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0xe0(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %rax, (%rsi)
leaq 0x70d(%rip), %rax       # 0x2c20
movq %rax, 0x18(%rsi)
leaq 0x7cc(%rip), %rax       # 0x2cea
movq %rax, 0x10(%rsi)
leaq 0x7c(%rsp), %r8
movl $0x1, (%r8)
leaq 0x78(%rsp), %r9
movl $0x10, (%r9)
leaq 0x4baf(%rip), %rdx      # 0x70f0
leaq 0x4bab(%rip), %rcx      # 0x70f3
leaq 0x120(%rsp), %r12
movq %r12, %rdi
callq 0x2e80
leaq 0x190(%rsp), %r12
leaq 0xc0(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
leaq 0x50(%rsp), %rbx
movq %rbx, (%rsi)
leaq 0x78f(%rip), %rax       # 0x2d10
movq %rax, 0x18(%rsi)
leaq 0x7e2(%rip), %rax       # 0x2d6e
movq %rax, 0x10(%rsi)
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movl $0x3, (%rdx)
leaq 0x1301(%rip), %rax      # 0x38a8
movq %rax, 0x18(%rdx)
leaq 0x12fa(%rip), %rax      # 0x38ac
movq %rax, 0x10(%rdx)
leaq 0x74(%rsp), %r8
movl $0x1, (%r8)
leaq 0x4b31(%rip), %rcx      # 0x70fa
movq %r12, %rdi
callq 0x2f8e
leaq 0x200(%rsp), %r12
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %rbx, (%rsi)
leaq 0x79f(%rip), %rax       # 0x2d94
movq %rax, 0x18(%rsi)
leaq 0x800(%rip), %rax       # 0x2e00
movq %rax, 0x10(%rsi)
leaq 0x20(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x80f(%rip), %rax       # 0x2e26
movq %rax, 0x18(%rdx)
leaq 0x80c(%rip), %rax       # 0x2e2e
movq %rax, 0x10(%rdx)
leaq 0x80(%rsp), %rcx
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq 0x818(%rip), %rax       # 0x2e54
movq %rax, 0x18(%rcx)
leaq 0x813(%rip), %rax       # 0x2e5a
movq %rax, 0x10(%rcx)
movq %r12, %rdi
callq 0x30b8
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x2672
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x268b
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x26aa
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x26c1
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xd0(%rsp), %rax
testq %rax, %rax
je 0x26e0
leaq 0xc0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x26ff
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x48(%rsp), %rax
leaq 0x8(%rax), %r14
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
movq %rsp, %rdi
leaq 0x120(%rsp), %rsi
leaq 0x44(%rsp), %rdx
movq %r14, %rcx
callq 0x31de
cmpb $0x1, (%rsp)
jne 0x27f5
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x34dc
movb $0x0, -0x8(%r15)
leaq 0x20(%rsp), %rdi
callq 0x34dc
cmpq $0x0, (%r14)
jne 0x287e
movq 0x50(%rsp), %rbx
movq 0x58(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq %rax, %rbx
je 0x2803
movq 0x884d(%rip), %r14      # 0xafd0
movq %rsp, %r13
leaq 0x20(%rsp), %rbp
movl $0x2, %edx
movq %r14, %rdi
leaq 0x4979(%rip), %rsi      # 0x7113
callq 0x21a0
movq %r14, (%rsp)
leaq 0x4975(%rip), %rax      # 0x711f
movq %rax, 0x8(%rsp)
movq (%rbx), %r12
movq 0x8(%rbx), %r15
cmpq %r15, %r12
je 0x27d4
movl (%r12), %eax
movl %eax, 0x20(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x36e0
addq $0x4, %r12
jmp 0x27b6
movl $0x2, %edx
movq %r14, %rdi
leaq 0x4933(%rip), %rsi      # 0x7116
callq 0x21a0
addq $0x18, %rbx
cmpq 0x68(%rsp), %rbx
jne 0x278b
jmp 0x2803
movb $0x0, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x34dc
movl $0x150, %r14d           # imm = 0x150
leaq (%rsp,%r14), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x38d2
leaq (%rsp,%r14), %rdi
addq $0xe8, %rdi
callq 0x3902
leaq (%rsp,%r14), %rbx
addq $0xd0, %rbx
movq %rbx, %rdi
callq 0x3932
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x285a
leaq (%rsp,%r14), %rdi
addq $0xb0, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x2809
leaq 0x50(%rsp), %rdi
callq 0x371e
xorl %eax, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0x20c0
movq %rax, %r12
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4862(%rip), %rsi      # 0x70fd
leaq 0x4870(%rip), %rdx      # 0x7112
movq %rsp, %rdi
callq 0x3b54
movq (%r14), %rsi
leaq 0x100(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x3538
movb $0x1, %bpl
movq %rsp, %rsi
leaq 0x100(%rsp), %rdx
movq %r12, %rdi
callq 0x3576
xorl %ebp, %ebp
leaq 0x836a(%rip), %rsi      # 0xac48
leaq 0x291b(%rip), %rdx      # 0x5200
movq %r12, %rdi
callq 0x2250
movq %rdx, %r15
movq %rax, %r14
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x291f
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x291f
movq %rdx, %r15
movq %rax, %r14
movb $0x1, %bpl
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2940
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2940
movq %rdx, %r15
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x2a92
movq %r12, %rdi
callq 0x2110
jmp 0x2a92
jmp 0x2a84
jmp 0x2a84
jmp 0x2a84
jmp 0x2a84
jmp 0x2a84
jmp 0x2a84
movq %rdx, %r15
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x34dc
jmp 0x2a92
movq %rdx, %r15
movq %rax, %r14
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x29ae
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x29c7
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x29fd
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x29fd
jmp 0x2a84
jmp 0x2a84
jmp 0x2a84
movq %rdx, %r15
movq %rax, %r14
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x2a14
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xd0(%rsp), %rax
testq %rax, %rax
je 0x2a3f
leaq 0xc0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2a3f
jmp 0x2a84
jmp 0x2a84
movq %rdx, %r15
movq %rax, %r14
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x2a5e
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x120(%rsp), %rbx
cmpq %r12, %rbx
je 0x2ab1
addq $-0x70, %r12
movq %r12, %rdi
callq 0x58d6
cmpq %rbx, %r12
jne 0x2a6b
jmp 0x2ab1
jmp 0x2a84
jmp 0x2a8c
jmp 0x2a8c
movq %rax, %rdi
callq 0x389d
movq %rdx, %r15
movq %rax, %r14
movl $0xe0, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x58d6
addq $-0x70, %rbx
cmpq $-0x70, %rbx
jne 0x2a97
leaq 0x50(%rsp), %rdi
callq 0x371e
cmpl $0x1, %r15d
jne 0x2c12
movq %r14, %rdi
callq 0x2090
movq %rax, %r14
movq 0x48(%rsp), %rax
movq (%rax), %rbx
movq 0x8681(%rip), %rsi      # 0xb160
leaq 0x120(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x3538
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq %rsp, %rdi
leaq 0x50(%rsp), %rdx
movq %rax, %rsi
callq 0x3538
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x45fc(%rip), %rsi      # 0x7119
leaq 0x45fc(%rip), %rdx      # 0x7120
leaq 0x20(%rsp), %rdi
callq 0x3b54
leaq 0x120(%rsp), %rsi
movq %rsp, %rdx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdi
callq 0x376b
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2b5d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b78
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2b99
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x2170
callq 0x2220
movl $0x1, %eax
jmp 0x286c
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x2bc7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2bc7
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2be7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2be7
movq %rax, %r14
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c0d
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x2170
jmp 0x2c0d
movq %rax, %r14
callq 0x2220
movq %r14, %rdi
callq 0x2270
jmp 0x2a84
nop