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

        int a = 0, b = 0, c = 0;
        bool one = false, two = false, three = false;
        std::string save_file;

        to::option opts[] = {
            { to::increment(a), to::flag, "-a"_compact },
            { to::increment(b), to::flag, "-b"_compact },
            { to::increment(c), to::flag, "-c"_compact },
            { to::set(one),     to::flag, "set/one"_compact },
            { to::set(two),     to::flag, "set/two"_compact },
            { to::set(three),   to::flag, "set/three"_compact },
            { save_file,        to::ephemeral, "--save" },
            { to::action(help), to::flag, to::exit, "-h", "--help" }
        };

        auto saved = to::run(opts, argc, argv);
        if (!saved) return 0;

        if (!save_file.empty()) {
            std::ofstream f(save_file);
            f << *saved << '\n';
        }

        if (a>0) std::cout << "a=" << a << '\n';
        if (b>0) std::cout << "b=" << b << '\n';
        if (c>0) std::cout << "c=" << c << '\n';
        if (one) std::cout << "set/one\n";
        if (two) std::cout << "set/two\n";
        if (three) std::cout << "set/three\n";
    }
    catch (to::option_error& e) {
        to::usage_error(argv[0], usage_str, e.what());
        return 1;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7b0, %rsp            # imm = 0x7B0
movq %rsi, %rbx
movl %edi, 0x34(%rsp)
movq (%rsi), %r15
leaq 0x18(%rsp), %rax
andl $0x0, (%rax)
andl $0x0, 0x14(%rsp)
andl $0x0, 0x10(%rsp)
xorl %ecx, %ecx
movb %cl, 0xf(%rsp)
leaq 0x140(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, 0xe(%rsp)
andq $0x0, 0x118(%rsp)
movb %cl, 0xd(%rsp)
movb %cl, (%rdx)
movq %rax, 0x110(%rsp)
leaq 0x1295(%rip), %r12      # 0x36e6
movq %r12, 0x128(%rsp)
leaq 0x128e(%rip), %r13      # 0x36ee
movq %r13, 0x120(%rsp)
movl $0x1, 0x30(%rsp)
leaq 0x3cef(%rip), %rsi      # 0x6166
leaq 0x230(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x2d6d
leaq 0x430(%rsp), %r14
leaq 0x110(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x230(%rsp), %rcx
movq %r14, %rdi
callq 0x2de2
leaq 0x4a0(%rsp), %r14
andq $0x0, 0xf8(%rsp)
leaq 0x14(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq %r12, 0x108(%rsp)
movq %r13, 0x100(%rsp)
movl $0x1, 0x2c(%rsp)
leaq 0x3c80(%rip), %rsi      # 0x6169
leaq 0x38(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x2d6d
leaq 0xf0(%rsp), %rsi
leaq 0x2c(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r14, %rdi
callq 0x2de2
leaq 0x510(%rsp), %r14
andq $0x0, 0xd8(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq %r12, 0xe8(%rsp)
movq %r13, 0xe0(%rsp)
movl $0x1, 0x28(%rsp)
leaq 0x3c1f(%rip), %rsi      # 0x616c
leaq 0x1a0(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x2d6d
leaq 0xd0(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x1a0(%rsp), %rcx
movq %r14, %rdi
callq 0x2de2
leaq 0x580(%rsp), %r14
movq $0x1, 0xb8(%rsp)
leaq 0xf(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x119a(%rip), %r12      # 0x373c
movq %r12, 0xc8(%rsp)
leaq 0x1197(%rip), %r13      # 0x3748
movq %r13, 0xc0(%rsp)
movl $0x1, 0x24(%rsp)
leaq 0x3ba7(%rip), %rsi      # 0x616f
leaq 0x178(%rsp), %rdi
pushq $0x7
popq %rdx
callq 0x2d6d
leaq 0xb0(%rsp), %rsi
leaq 0x24(%rsp), %rdx
leaq 0x178(%rsp), %rcx
movq %r14, %rdi
callq 0x2de2
leaq 0x5f0(%rsp), %r14
movq $0x1, 0x98(%rsp)
leaq 0xe(%rsp), %rax
movq %rax, 0x90(%rsp)
movq %r12, 0xa8(%rsp)
movq %r13, 0xa0(%rsp)
movl $0x1, 0x20(%rsp)
leaq 0x3b42(%rip), %rsi      # 0x6177
leaq 0x150(%rsp), %rdi
pushq $0x7
popq %rdx
callq 0x2d6d
leaq 0x90(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x150(%rsp), %rcx
movq %r14, %rdi
callq 0x2de2
leaq 0x660(%rsp), %r14
movq $0x1, 0x78(%rsp)
leaq 0xd(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %r12, 0x88(%rsp)
movq %r13, 0x80(%rsp)
movl $0x1, 0x1c(%rsp)
leaq 0x3ae3(%rip), %rsi      # 0x617f
leaq 0x1c8(%rsp), %rdi
pushq $0x9
popq %rdx
callq 0x2d6d
leaq 0x70(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
leaq 0x1c8(%rsp), %rcx
movq %r14, %rdi
callq 0x2de2
leaq 0x6d0(%rsp), %r14
leaq 0x210(%rsp), %rsi
andq $0x0, 0x8(%rsi)
leaq 0x130(%rsp), %rax
movq %rax, (%rsi)
leaq 0x13fd(%rip), %rax      # 0x3aea
movq %rax, 0x18(%rsi)
leaq 0x13f8(%rip), %rax      # 0x3af0
movq %rax, 0x10(%rsi)
leaq 0x6c(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x3a7b(%rip), %rcx      # 0x6189
movq %r14, %rdi
callq 0x2e5e
leaq 0x740(%rsp), %r14
leaq 0x1f0(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %r15, (%rsi)
leaq 0x58d(%rip), %rax       # 0x2cc2
movq %rax, 0x18(%rsi)
leaq 0x608(%rip), %rax       # 0x2d48
movq %rax, 0x10(%rsi)
leaq 0x68(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x64(%rsp), %rcx
movl $0x10, (%rcx)
leaq 0x3a2f(%rip), %r8       # 0x6190
leaq 0x3a2b(%rip), %r9       # 0x6193
movq %r14, %rdi
callq 0x2eda
leaq 0x1f0(%rsp), %rdi
callq 0x346a
leaq 0x210(%rsp), %rdi
callq 0x346a
leaq 0x1c8(%rsp), %rdi
callq 0x2090
leaq 0x70(%rsp), %rdi
callq 0x346a
leaq 0x150(%rsp), %rdi
callq 0x2090
leaq 0x90(%rsp), %rdi
callq 0x346a
leaq 0x178(%rsp), %rdi
callq 0x2090
leaq 0xb0(%rsp), %rdi
callq 0x346a
leaq 0x1a0(%rsp), %rdi
callq 0x2090
leaq 0xd0(%rsp), %rdi
callq 0x346a
leaq 0x38(%rsp), %rdi
callq 0x2090
leaq 0xf0(%rsp), %rdi
callq 0x346a
leaq 0x230(%rsp), %r14
movq %r14, %rdi
callq 0x2090
leaq 0x110(%rsp), %rdi
callq 0x346a
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
leaq 0x38(%rsp), %rdi
leaq 0x430(%rsp), %rsi
leaq 0x34(%rsp), %rdx
leaq 0x230(%rsp), %r8
movq %rbx, %rcx
callq 0x2f67
leaq 0x230(%rsp), %rdi
callq 0x31ca
cmpb $0x0, 0x38(%rsp)
je 0x2997
cmpq $0x0, 0x138(%rsp)
je 0x28b6
leaq 0x230(%rsp), %rdi
leaq 0x130(%rsp), %rsi
pushq $0x10
popq %rdx
callq 0x22a0
leaq 0x40(%rsp), %rsi
leaq 0x230(%rsp), %rdi
callq 0x31eb
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x21b0
leaq 0x230(%rsp), %rdi
callq 0x2210
cmpl $0x0, 0x18(%rsp)
jle 0x28e7
movq 0x770c(%rip), %rdi      # 0x9fd0
leaq 0x38cf(%rip), %rsi      # 0x619a
callq 0x2160
movl 0x18(%rsp), %esi
movq %rax, %rdi
callq 0x2260
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x21b0
cmpl $0x0, 0x14(%rsp)
jle 0x2918
movq 0x76db(%rip), %rdi      # 0x9fd0
leaq 0x38a1(%rip), %rsi      # 0x619d
callq 0x2160
movl 0x14(%rsp), %esi
movq %rax, %rdi
callq 0x2260
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x21b0
cmpl $0x0, 0x10(%rsp)
jle 0x2949
movq 0x76aa(%rip), %rdi      # 0x9fd0
leaq 0x3873(%rip), %rsi      # 0x61a0
callq 0x2160
movl 0x10(%rsp), %esi
movq %rax, %rdi
callq 0x2260
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x21b0
cmpb $0x1, 0xf(%rsp)
jne 0x2963
movq 0x7679(%rip), %rdi      # 0x9fd0
leaq 0x3845(%rip), %rsi      # 0x61a3
callq 0x2160
cmpb $0x1, 0xe(%rsp)
jne 0x297d
movq 0x765f(%rip), %rdi      # 0x9fd0
leaq 0x3834(%rip), %rsi      # 0x61ac
callq 0x2160
cmpb $0x1, 0xd(%rsp)
jne 0x2997
movq 0x7645(%rip), %rdi      # 0x9fd0
leaq 0x3823(%rip), %rsi      # 0x61b5
callq 0x2160
leaq 0x38(%rsp), %rdi
callq 0x36ce
movl $0x310, %ebx            # imm = 0x310
leaq (%rsp,%rbx), %rdi
addq $0x430, %rdi            # imm = 0x430
callq 0x4a70
addq $-0x70, %rbx
cmpq $-0x70, %rbx
jne 0x29a6
leaq 0x130(%rsp), %rdi
callq 0x2090
xorl %eax, %eax
addq $0x7b0, %rsp            # imm = 0x7B0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2b7d
movq %rdx, %r12
movq %rax, %r15
leaq 0x230(%rsp), %rdi
callq 0x2210
jmp 0x2b83
movq %rdx, %r12
movq %rax, %r15
leaq 0x230(%rsp), %rdi
callq 0x31ca
jmp 0x2b8d
movq %rdx, %r12
movq %rax, %r15
leaq 0x1f0(%rsp), %rdi
callq 0x346a
jmp 0x2a30
movq %rdx, %r12
movq %rax, %r15
leaq 0x210(%rsp), %rdi
callq 0x346a
jmp 0x2a45
movq %rdx, %r12
movq %rax, %r15
leaq 0x1c8(%rsp), %rdi
callq 0x2090
jmp 0x2a5a
movq %rdx, %r12
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x346a
jmp 0x2a6c
movq %rdx, %r12
movq %rax, %r15
leaq 0x150(%rsp), %rdi
callq 0x2090
leaq 0x90(%rsp), %rdi
callq 0x346a
leaq 0x178(%rsp), %rdi
callq 0x2090
leaq 0xb0(%rsp), %rdi
callq 0x346a
leaq 0x1a0(%rsp), %rdi
callq 0x2090
leaq 0xd0(%rsp), %rdi
callq 0x346a
leaq 0x38(%rsp), %rdi
callq 0x2090
leaq 0xf0(%rsp), %rdi
callq 0x346a
leaq 0x230(%rsp), %rdi
callq 0x2090
leaq 0x110(%rsp), %rdi
callq 0x346a
leaq 0x430(%rsp), %r13
cmpq %r14, %r13
je 0x2bad
addq $-0x70, %r14
movq %r14, %rdi
callq 0x4a70
cmpq %r13, %r14
jne 0x2afc
jmp 0x2bad
movq %rdx, %r12
movq %rax, %r15
jmp 0x2a79
movq %rdx, %r12
movq %rax, %r15
jmp 0x2a86
movq %rdx, %r12
movq %rax, %r15
jmp 0x2a93
movq %rdx, %r12
movq %rax, %r15
jmp 0x2aa0
movq %rdx, %r12
movq %rax, %r15
jmp 0x2aad
movq %rdx, %r12
movq %rax, %r15
jmp 0x2aba
movq %rdx, %r12
movq %rax, %r15
jmp 0x2ac4
movq %rdx, %r12
movq %rax, %r15
jmp 0x2ad1
movq %rdx, %r12
movq %rax, %r15
leaq 0x430(%rsp), %r14
jmp 0x2ade
movq %rdx, %r12
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x36ce
movl $0x310, %r14d           # imm = 0x310
leaq (%rsp,%r14), %rdi
addq $0x430, %rdi            # imm = 0x430
callq 0x4a70
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x2b93
leaq 0x130(%rsp), %rdi
callq 0x2090
cmpl $0x1, %r12d
jne 0x2cb1
movq %r15, %rdi
callq 0x2070
movq %rax, %r14
movq (%rbx), %rbx
movq 0x7597(%rip), %rsi      # 0xa170
leaq 0x430(%rsp), %rdi
leaq 0x1a0(%rsp), %rdx
callq 0x3320
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x230(%rsp), %rdi
leaq 0x178(%rsp), %rdx
movq %rax, %rsi
callq 0x3320
leaq 0x35aa(%rip), %rsi      # 0x61c0
leaq 0x38(%rsp), %rdi
leaq 0x150(%rsp), %rdx
callq 0x3320
leaq 0x430(%rsp), %rsi
leaq 0x230(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %rbx, %rdi
callq 0x3275
leaq 0x38(%rsp), %rdi
callq 0x2090
leaq 0x230(%rsp), %rdi
callq 0x2090
leaq 0x430(%rsp), %rdi
callq 0x2090
callq 0x2240
pushq $0x1
popq %rax
jmp 0x29cf
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x2090
jmp 0x2c88
movq %rax, %r15
leaq 0x230(%rsp), %rdi
callq 0x2090
jmp 0x2c9a
movq %rax, %r15
leaq 0x430(%rsp), %rdi
callq 0x2090
jmp 0x2cac
movq %rax, %r15
callq 0x2240
movq %r15, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x335b
nop