// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/test/test_run.cc
// Function: run_exit_Test::TestBody()
TEST(run, exit) {
    int a = 0;
    int b = 0;

    to::option opts[] = {
        { a, "-a", to::exit },
        { b, "-b" }
    };

    mockargs M("-a\09\0-b\08\0");
    auto r = to::run(opts, M.argc, M.argv);
    EXPECT_FALSE(r);
    EXPECT_EQ(9, a);
    EXPECT_EQ(0, b);
    EXPECT_EQ(2, M.argc);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c0, %rsp            # imm = 0x1C0
xorl %eax, %eax
leaq 0x54(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, 0x44(%rsp)
leaq 0xc0(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %rcx, (%rsi)
leaq -0x205ad(%rip), %rbx    # 0x15620
movq %rbx, 0x18(%rsi)
leaq -0x20586(%rip), %r15    # 0x15652
movq %r15, 0x10(%rsi)
leaq 0x58(%rsp), %rcx
movl $0x10, (%rcx)
leaq 0x373ce(%rip), %rdx     # 0x6cfbc
leaq 0xe0(%rsp), %r14
movq %r14, %rdi
callq 0x3bbc4
leaq 0x150(%rsp), %r14
leaq 0xa0(%rsp), %rsi
movq $0x0, 0x8(%rsi)
leaq 0x44(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
leaq 0x37398(%rip), %rdx     # 0x6cfc5
movq %r14, %rdi
callq 0x3bff2
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x35c54
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xd0(%rsp), %rax
testq %rax, %rax
je 0x35c73
leaq 0xc0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x39ae2(%rip), %rsi     # 0x6f75c
leaq 0x58(%rsp), %rdi
callq 0x29a42
leaq 0x58(%rsp), %rdx
movq 0x8(%rdx), %rcx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
leaq 0x80(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x3bccd
leaq 0x20(%rsp), %rdi
callq 0x20770
movb 0x80(%rsp), %al
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
testb %al, %al
je 0x35d8a
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rdi
callq 0x4ca86
leaq 0x386bd(%rip), %rdx     # 0x6e3b4
leaq 0x3640e(%rip), %rcx     # 0x6c10c
leaq 0x36401(%rip), %r8      # 0x6c106
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46893
movq 0x20(%rsp), %r8
leaq 0x39546(%rip), %rdx     # 0x6f266
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
movl $0x32, %ecx
callq 0x4902a
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
leaq 0x48(%rsp), %rdi
callq 0x49096
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x35d68
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x35d78
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x35d8a
movq %r14, %rdi
callq 0x153ca
leaq 0x10(%rsp), %rcx
movl $0x9, (%rcx)
leaq 0x375a7(%rip), %rsi     # 0x6d343
leaq 0x3721a(%rip), %rdx     # 0x6cfbd
leaq 0x20(%rsp), %rdi
leaq 0x54(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x20(%rsp)
jne 0x35e1d
leaq 0x10(%rsp), %rdi
callq 0x4ca86
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x35dd2
movq (%rax), %r8
jmp 0x35dd9
leaq 0x391fc(%rip), %r8      # 0x6efd5
leaq 0x39486(%rip), %rdx     # 0x6f266
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x33, %ecx
callq 0x4902a
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46a1c
leaq 0x8(%rsp), %rdi
callq 0x49096
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x35e1d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x35e31
leaq 0x28(%rsp), %rdi
callq 0x153ca
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x3cec5(%rip), %rsi     # 0x72d08
leaq 0x3717c(%rip), %rdx     # 0x6cfc6
leaq 0x20(%rsp), %rdi
leaq 0x44(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x20(%rsp)
jne 0x35ec4
leaq 0x10(%rsp), %rdi
callq 0x4ca86
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x35e79
movq (%rax), %r8
jmp 0x35e80
leaq 0x39155(%rip), %r8      # 0x6efd5
leaq 0x393df(%rip), %rdx     # 0x6f266
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x34, %ecx
callq 0x4902a
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46a1c
leaq 0x8(%rsp), %rdi
callq 0x49096
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x35ec4
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x35ed8
leaq 0x28(%rsp), %rdi
callq 0x153ca
leaq 0x10(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x380b5(%rip), %rsi     # 0x6df9f
leaq 0x38041(%rip), %rdx     # 0x6df32
leaq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x20(%rsp)
jne 0x35f6b
leaq 0x10(%rsp), %rdi
callq 0x4ca86
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x35f20
movq (%rax), %r8
jmp 0x35f27
leaq 0x390ae(%rip), %r8      # 0x6efd5
leaq 0x39338(%rip), %rdx     # 0x6f266
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x35, %ecx
callq 0x4902a
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46a1c
leaq 0x8(%rsp), %rdi
callq 0x49096
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x35f6b
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x35f7f
leaq 0x28(%rsp), %rdi
callq 0x153ca
cmpb $0x1, 0x80(%rsp)
jne 0x35f96
leaq 0x88(%rsp), %rdi
callq 0x20770
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x35fad
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xc0, %rdi
callq 0x2145a
leaq (%rsp,%r14), %rdi
addq $0xa8, %rdi
callq 0x2148a
leaq (%rsp,%r14), %rbx
addq $0x90, %rbx
movq %rbx, %rdi
callq 0x214ba
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x36001
leaq (%rsp,%r14), %rdi
addq $0x70, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x35fb3
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x36020
jmp 0x3602f
jmp 0x36044
jmp 0x36020
jmp 0x3602f
jmp 0x36044
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x49096
jmp 0x36032
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x36047
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x36047
movq %rax, %rbx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x360c4
leaq 0x28(%rsp), %rdi
jmp 0x360ac
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x49096
jmp 0x3606a
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3608a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x3608a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3609f
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3609f
movq %rax, %rbx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x360c4
movq %r14, %rdi
callq 0x153ca
jmp 0x360c4
jmp 0x36193
jmp 0x36193
jmp 0x360c1
jmp 0x360c1
movq %rax, %rbx
cmpb $0x1, 0x80(%rsp)
jne 0x360db
leaq 0x88(%rsp), %rdi
callq 0x20770
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x360f2
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0x70, %r14d
leaq (%rsp,%r14), %rdi
addq $0xe0, %rdi
callq 0x206e8
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x360f8
movq %rbx, %rdi
callq 0xda70
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x360d6
movq %rax, %rbx
jmp 0x360f2
movq %rax, %rbx
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x36152
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x36152
jmp 0x36193
movq %rax, %rbx
movq 0xd0(%rsp), %rax
testq %rax, %rax
je 0x36171
leaq 0xc0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xe0(%rsp), %r15
cmpq %r14, %r15
je 0x36112
addq $-0x70, %r14
movq %r14, %rdi
callq 0x206e8
cmpq %r15, %r14
jne 0x3617e
jmp 0x36112
jmp 0x36193
movq %rax, %rdi
callq 0x1536f
nop