// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/test/test_run.cc
// Function: run_modal_Test::TestBody()
TEST(run, modal) {
    int a0 = 0, a1 = 0, a2 = 0;
    to::option opts[] = {
        {to::increment(a0), "-a", to::flag, to::when(0)},
        {to::increment(a1), "-a", to::flag, to::when(1)},
        {to::increment(a2), "-a", to::flag, to::when(2)},
        {{}, "one", to::flag, to::then(1)},
        {{}, "two", to::flag, to::then(2)}
    };

    mockargs M("-a\0one\0-a\0two\0-a\0-a\0one\0-a\0-a\0");
    auto r = to::run(opts, M.argc, M.argv);
    EXPECT_TRUE(r);

    EXPECT_EQ(1, a0);
    EXPECT_EQ(3, a1);
    EXPECT_EQ(2, a2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b0, %rsp            # imm = 0x3B0
xorl %eax, %eax
leaq 0x7c(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, 0x4c(%rsp)
movl %eax, 0x48(%rsp)
leaq 0x160(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %rcx, (%rsi)
leaq -0x24e4d(%rip), %rbx    # 0x16410
movq %rbx, 0x18(%rsi)
leaq -0x24e50(%rip), %r15    # 0x16418
movq %r15, 0x10(%rsi)
leaq 0x70(%rsp), %rcx
movl $0x1, (%rcx)
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %r8
movaps %xmm0, (%r8)
leaq -0x19e8b(%rip), %r12    # 0x21402
movq %r12, 0x18(%r8)
leaq -0x19e8e(%rip), %r13    # 0x2140a
movq %r13, 0x10(%r8)
leaq 0x31d19(%rip), %rdx     # 0x6cfbc
leaq 0x180(%rsp), %r14
movq %r14, %rdi
callq 0x3c872
leaq 0x1f0(%rsp), %r14
leaq 0x140(%rsp), %rsi
movq $0x0, 0x8(%rsi)
leaq 0x4c(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
movl $0x1, %eax
leaq 0xdc(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x80(%rsp), %r8
xorps %xmm0, %xmm0
movaps %xmm0, (%r8)
movl %eax, (%r8)
movq %r12, 0x18(%r8)
movq %r13, 0x10(%r8)
leaq 0x31cb1(%rip), %rdx     # 0x6cfbc
movq %r14, %rdi
callq 0x3c872
leaq 0x260(%rsp), %r14
leaq 0x120(%rsp), %rsi
movq $0x0, 0x8(%rsi)
leaq 0x48(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
leaq 0xd8(%rsp), %rcx
movl $0x1, (%rcx)
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
movl $0x2, (%r8)
movq %r12, 0x18(%r8)
movq %r13, 0x10(%r8)
leaq 0x31c53(%rip), %rdx     # 0x6cfbc
movq %r14, %rdi
callq 0x3c872
leaq 0x2d0(%rsp), %r14
leaq 0x100(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
leaq 0x1e9e(%rip), %rbx      # 0x3d22c
movq %rbx, 0x18(%rsi)
leaq 0x1e97(%rip), %r15      # 0x3d230
movq %r15, 0x10(%rsi)
movl $0x1, %eax
leaq 0xd4(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
movl %eax, (%r8)
leaq -0x19f8f(%rip), %r12    # 0x21430
movq %r12, 0x18(%r8)
leaq -0x19f96(%rip), %r13    # 0x21434
movq %r13, 0x10(%r8)
leaq 0x336b7(%rip), %rdx     # 0x6ea8c
movq %r14, %rdi
callq 0x3c982
leaq 0x340(%rsp), %r14
xorps %xmm0, %xmm0
leaq 0xe0(%rsp), %rsi
movaps %xmm0, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
leaq 0xd0(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movl $0x2, (%r8)
movq %r12, 0x18(%r8)
movq %r13, 0x10(%r8)
leaq 0x337ac(%rip), %rdx     # 0x6ebd4
movq %r14, %rdi
callq 0x3c982
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x3b449
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x3b468
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x3b481
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x110(%rsp), %rax
testq %rax, %rax
je 0x3b4a0
leaq 0x100(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3b4b7
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x130(%rsp), %rax
testq %rax, %rax
je 0x3b4d6
leaq 0x120(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x3b4f5
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x3b514
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x3b533
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x170(%rsp), %rax
testq %rax, %rax
je 0x3b552
leaq 0x160(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x34256(%rip), %rsi     # 0x6f7af
leaq 0xa0(%rsp), %rdi
callq 0x29a42
leaq 0xa0(%rsp), %rdx
movq 0x8(%rdx), %rcx
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
leaq 0x80(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x3ca92
movq %rsp, %rdi
callq 0x20770
movb 0x80(%rsp), %al
movb %al, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
testb %al, %al
jne 0x3b663
leaq 0x28(%rsp), %r14
leaq 0x50(%rsp), %rdi
callq 0x4ca86
leaq 0x32de1(%rip), %rdx     # 0x6e3b4
leaq 0x30b2c(%rip), %rcx     # 0x6c106
leaq 0x30b2b(%rip), %r8      # 0x6c10c
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x46893
movq (%rsp), %r8
leaq 0x33c6d(%rip), %rdx     # 0x6f266
leaq 0x70(%rsp), %rdi
movl $0x1, %esi
movl $0xf7, %ecx
callq 0x4902a
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x46a1c
leaq 0x70(%rsp), %rdi
callq 0x49096
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b641
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x3b651
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x3b663
movq %r14, %rdi
callq 0x153ca
leaq 0x20(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x3293a(%rip), %rsi     # 0x6dfaf
leaq 0x340b7(%rip), %rdx     # 0x6f733
movq %rsp, %rdi
leaq 0x7c(%rsp), %r8
callq 0x157b7
cmpb $0x0, (%rsp)
jne 0x3b6f3
leaq 0x20(%rsp), %rdi
callq 0x4ca86
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3b6a8
movq (%rax), %r8
jmp 0x3b6af
leaq 0x33926(%rip), %r8      # 0x6efd5
leaq 0x33bb0(%rip), %rdx     # 0x6f266
leaq 0x50(%rsp), %rdi
movl $0x1, %esi
movl $0xf9, %ecx
callq 0x4902a
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46a1c
leaq 0x50(%rsp), %rdi
callq 0x49096
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3b6f3
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x3b707
leaq 0x8(%rsp), %rdi
callq 0x153ca
leaq 0x20(%rsp), %rcx
movl $0x3, (%rcx)
leaq 0x333b0(%rip), %rsi     # 0x6eac9
leaq 0x34016(%rip), %rdx     # 0x6f736
movq %rsp, %rdi
leaq 0x4c(%rsp), %r8
callq 0x157b7
cmpb $0x0, (%rsp)
jne 0x3b797
leaq 0x20(%rsp), %rdi
callq 0x4ca86
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3b74c
movq (%rax), %r8
jmp 0x3b753
leaq 0x33882(%rip), %r8      # 0x6efd5
leaq 0x33b0c(%rip), %rdx     # 0x6f266
leaq 0x50(%rsp), %rdi
movl $0x1, %esi
movl $0xfa, %ecx
callq 0x4902a
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46a1c
leaq 0x50(%rsp), %rdi
callq 0x49096
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3b797
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x3b7ab
leaq 0x8(%rsp), %rdi
callq 0x153ca
leaq 0x20(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x327e2(%rip), %rsi     # 0x6df9f
leaq 0x33f75(%rip), %rdx     # 0x6f739
movq %rsp, %rdi
leaq 0x48(%rsp), %r8
callq 0x157b7
cmpb $0x0, (%rsp)
jne 0x3b83b
leaq 0x20(%rsp), %rdi
callq 0x4ca86
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3b7f0
movq (%rax), %r8
jmp 0x3b7f7
leaq 0x337de(%rip), %r8      # 0x6efd5
leaq 0x33a68(%rip), %rdx     # 0x6f266
leaq 0x50(%rsp), %rdi
movl $0x1, %esi
movl $0xfb, %ecx
callq 0x4902a
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46a1c
leaq 0x50(%rsp), %rdi
callq 0x49096
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3b83b
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x3b84f
leaq 0x8(%rsp), %rdi
callq 0x153ca
cmpb $0x1, 0x80(%rsp)
jne 0x3b866
leaq 0x88(%rsp), %rdi
callq 0x20770
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x3b883
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0x230, %r14d           # imm = 0x230
leaq (%rsp,%r14), %rdi
addq $0x160, %rdi            # imm = 0x160
callq 0x2145a
leaq (%rsp,%r14), %rdi
addq $0x148, %rdi            # imm = 0x148
callq 0x2148a
leaq (%rsp,%r14), %rbx
addq $0x130, %rbx            # imm = 0x130
movq %rbx, %rdi
callq 0x214ba
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x3b8da
leaq (%rsp,%r14), %rdi
addq $0x110, %rdi            # imm = 0x110
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x3b889
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x3b8fd
jmp 0x3b90c
jmp 0x3b921
jmp 0x3b8fd
jmp 0x3b90c
jmp 0x3b921
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x49096
jmp 0x3b90f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3b924
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3b924
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x3b9cd
leaq 0x8(%rsp), %rdi
jmp 0x3b98d
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x49096
jmp 0x3b94b
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b96b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x3b96b
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x3b980
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3b980
movq %rax, %rbx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x3b9cd
movq %r14, %rdi
callq 0x153ca
jmp 0x3b9cd
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3bbbc
jmp 0x3b9ca
jmp 0x3b9ca
movq %rax, %rbx
cmpb $0x1, 0x80(%rsp)
jne 0x3b9e4
leaq 0x88(%rsp), %rdi
callq 0x20770
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x3ba01
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0x1c0, %r14d           # imm = 0x1C0
leaq (%rsp,%r14), %rdi
addq $0x180, %rdi            # imm = 0x180
callq 0x206e8
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x3ba07
movq %rbx, %rdi
callq 0xda70
movq %rax, %rbx
movq %rsp, %rdi
jmp 0x3b9df
movq %rax, %rbx
jmp 0x3ba01
movq %rax, %rbx
movq 0x60(%rsp), %rax
testq %rax, %rax
je 0x3ba52
leaq 0x50(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x3ba80
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x3ba80
jmp 0x3bbbc
jmp 0x3bbbc
movq %rax, %rbx
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x3ba99
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x110(%rsp), %rax
testq %rax, %rax
je 0x3bac7
leaq 0x100(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x3bac7
jmp 0x3bbbc
jmp 0x3bbbc
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3bade
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x130(%rsp), %rax
testq %rax, %rax
je 0x3bb0c
leaq 0x120(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x3bb0c
jmp 0x3bbbc
jmp 0x3bbbc
movq %rax, %rbx
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x3bb2b
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x150(%rsp), %rax
testq %rax, %rax
je 0x3bb53
leaq 0x140(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x3bb53
jmp 0x3bbbc
jmp 0x3bbbc
movq %rax, %rbx
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x3bb72
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x170(%rsp), %rax
testq %rax, %rax
je 0x3bb91
leaq 0x160(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x180(%rsp), %r15
cmpq %r14, %r15
je 0x3ba21
addq $-0x70, %r14
movq %r14, %rdi
callq 0x206e8
cmpq %r15, %r14
jne 0x3bba2
jmp 0x3ba21
jmp 0x3bbbc
jmp 0x3bbbc
movq %rax, %rdi
callq 0x1536f