// File: /workspace/github_cpp_makefile_star2_O1/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)
xorps %xmm0, %xmm0
leaq 0xc0(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %rcx, (%rsi)
leaq -0x21553(%rip), %rbx    # 0x15922
movq %rbx, 0x18(%rsi)
leaq -0x2152c(%rip), %r15    # 0x15954
movq %r15, 0x10(%rsi)
leaq 0x78(%rsp), %rcx
movl $0x10, (%rcx)
leaq 0x384e3(%rip), %rdx     # 0x6f379
leaq 0xe0(%rsp), %r14
movq %r14, %rdi
callq 0x3d1ba
leaq 0x150(%rsp), %r14
leaq 0xa0(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
leaq 0x44(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
leaq 0x384ab(%rip), %rdx     # 0x6f382
movq %r14, %rdi
callq 0x3d602
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x36efe
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xd0(%rsp), %rax
testq %rax, %rax
je 0x36f1d
leaq 0xc0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x3a84a(%rip), %rsi     # 0x7176e
leaq 0x78(%rsp), %rdi
callq 0x2a408
leaq 0x78(%rsp), %rdx
movq 0x8(%rdx), %rcx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
leaq 0x58(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x3d2c3
leaq 0x20(%rsp), %rdi
callq 0x20fca
movb 0x58(%rsp), %al
movl %eax, %ecx
xorb $0x1, %cl
leaq 0x18(%rsp), %r14
movb %cl, -0x8(%r14)
movq $0x0, (%r14)
testb %al, %al
je 0x3701a
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
leaq 0x3943b(%rip), %rdx     # 0x703d4
leaq 0x3716c(%rip), %rcx     # 0x6e10c
leaq 0x3715f(%rip), %r8      # 0x6e106
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x48021
movq 0x20(%rsp), %r8
leaq 0x3a2b6(%rip), %rdx     # 0x71278
leaq 0x48(%rsp), %rdi
movl $0x1, %esi
movl $0x32, %ecx
callq 0x4a84c
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
leaq 0x48(%rsp), %rdi
callq 0x4a8b8
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3700a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3701a
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x3702c
movq %r14, %rdi
callq 0x156d0
leaq 0x10(%rsp), %rcx
movl $0x9, (%rcx)
leaq 0x386c2(%rip), %rsi     # 0x6f700
leaq 0x38335(%rip), %rdx     # 0x6f37a
leaq 0x20(%rsp), %rdi
leaq 0x54(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x20(%rsp)
jne 0x370bf
leaq 0x10(%rsp), %rdi
callq 0x4e2e8
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x37074
movq (%rax), %r8
jmp 0x3707b
leaq 0x39f7d(%rip), %r8      # 0x70ff8
leaq 0x3a1f6(%rip), %rdx     # 0x71278
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x33, %ecx
callq 0x4a84c
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x481aa
leaq 0x8(%rsp), %rdi
callq 0x4a8b8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x370bf
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x370d3
leaq 0x28(%rsp), %rdi
callq 0x156d0
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x3dc13(%rip), %rsi     # 0x74cf8
leaq 0x38297(%rip), %rdx     # 0x6f383
leaq 0x20(%rsp), %rdi
leaq 0x44(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x20(%rsp)
jne 0x37166
leaq 0x10(%rsp), %rdi
callq 0x4e2e8
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x3711b
movq (%rax), %r8
jmp 0x37122
leaq 0x39ed6(%rip), %r8      # 0x70ff8
leaq 0x3a14f(%rip), %rdx     # 0x71278
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x34, %ecx
callq 0x4a84c
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x481aa
leaq 0x8(%rsp), %rdi
callq 0x4a8b8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x37166
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x3717a
leaq 0x28(%rsp), %rdi
callq 0x156d0
leaq 0x10(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x38e33(%rip), %rsi     # 0x6ffbf
leaq 0x38dbf(%rip), %rdx     # 0x6ff52
leaq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x20(%rsp)
jne 0x3720d
leaq 0x10(%rsp), %rdi
callq 0x4e2e8
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x371c2
movq (%rax), %r8
jmp 0x371c9
leaq 0x39e2f(%rip), %r8      # 0x70ff8
leaq 0x3a0a8(%rip), %rdx     # 0x71278
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x35, %ecx
callq 0x4a84c
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x481aa
leaq 0x8(%rsp), %rdi
callq 0x4a8b8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3720d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x37221
leaq 0x28(%rsp), %rdi
callq 0x156d0
cmpb $0x1, 0x58(%rsp)
jne 0x37232
leaq 0x60(%rsp), %rdi
callq 0x20fca
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x3724f
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xc0, %rdi
callq 0x21caa
leaq (%rsp,%r14), %rdi
addq $0xa8, %rdi
callq 0x21cda
leaq (%rsp,%r14), %rbx
addq $0x90, %rbx
movq %rbx, %rdi
callq 0x21d0a
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x372a3
leaq (%rsp,%r14), %rdi
addq $0x70, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x37255
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x372c2
jmp 0x372d1
jmp 0x372ef
jmp 0x372c2
jmp 0x372d1
jmp 0x372ef
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4a8b8
jmp 0x372d4
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x372e4
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x10(%rsp)
jmp 0x372f2
movq %rax, %rbx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x37306
leaq 0x28(%rsp), %rdi
callq 0x156d0
movq $0x0, 0x28(%rsp)
jmp 0x37386
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4a8b8
jmp 0x37323
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37343
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x37343
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x37353
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x37361
movq %rax, %rbx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x37386
movq %r14, %rdi
callq 0x156d0
jmp 0x37386
jmp 0x37462
jmp 0x37462
jmp 0x37383
jmp 0x37383
movq %rax, %rbx
cmpb $0x1, 0x58(%rsp)
jne 0x37397
leaq 0x60(%rsp), %rdi
callq 0x20fca
movb $0x0, 0x58(%rsp)
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x373b9
movq 0x98(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0x70, %r14d
leaq (%rsp,%r14), %rdi
addq $0xe0, %rdi
callq 0x20f42
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x373bf
movq %rbx, %rdi
callq 0xda70
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20fca
jmp 0x3739c
movq %rax, %rbx
jmp 0x373b9
movq %rax, %rbx
movq 0xb0(%rsp), %rax
testq %rax, %rax
je 0x3741e
leaq 0xa0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x3741e
jmp 0x37462
movq %rax, %rbx
movq 0xd0(%rsp), %rax
testq %rax, %rax
je 0x3743d
leaq 0xc0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xe0(%rsp), %r15
cmpq %r14, %r15
je 0x373d9
addq $-0x70, %r14
movq %r14, %rdi
callq 0x20f42
cmpq %r15, %r14
jne 0x3744a
jmp 0x373d9
jmp 0x37462
movq %rax, %rdi
callq 0x15674