// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
leaq 0x54(%rsp), %rax
andl $0x0, (%rax)
andl $0x0, 0x1c(%rsp)
leaq 0xc0(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %rax, (%rsi)
leaq -0x1ad18(%rip), %rbx    # 0x138e0
movq %rbx, 0x18(%rsi)
leaq -0x1ad1d(%rip), %r12    # 0x138e6
movq %r12, 0x10(%rsi)
leaq 0x58(%rsp), %rcx
movl $0x10, (%rcx)
leaq 0x28dd0(%rip), %rdx     # 0x573e9
leaq 0xe0(%rsp), %r15
movq %r15, %rdi
callq 0x32ff6
leaq 0x150(%rsp), %r14
leaq 0xa0(%rsp), %rsi
andq $0x0, 0x8(%rsi)
leaq 0x1c(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r12, 0x10(%rsi)
leaq 0x28d9d(%rip), %rdx     # 0x573f2
movq %r14, %rdi
callq 0x33328
leaq 0xa0(%rsp), %rdi
callq 0x1367e
leaq 0xc0(%rsp), %rdi
callq 0x1367e
leaq 0x2b162(%rip), %rsi     # 0x597e0
leaq 0x58(%rsp), %rdi
callq 0x2488e
leaq 0x58(%rsp), %rdx
movq 0x8(%rdx), %rcx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
andq $0x0, 0x10(%r8)
leaq 0x80(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x33094
leaq 0x20(%rsp), %rdi
callq 0x1cc42
movb 0x80(%rsp), %al
movl %eax, %ecx
xorb $0x1, %cl
leaq 0x10(%rsp), %r14
movb %cl, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
je 0x2e756
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x29d5c(%rip), %rdx     # 0x58449
leaq 0x27a21(%rip), %rcx     # 0x56115
leaq 0x27a14(%rip), %r8      # 0x5610f
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x399e5
movq 0x20(%rsp), %r8
leaq 0x2abd4(%rip), %rdx     # 0x592ea
leaq 0x48(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x32
popq %rcx
callq 0x3b5b6
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
callq 0x39b08
leaq 0x48(%rsp), %rdi
callq 0x3b616
leaq 0x20(%rsp), %rdi
callq 0xdbe8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2e756
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x9, (%rcx)
leaq 0x29000(%rip), %rsi     # 0x57770
leaq 0x28c73(%rip), %rdx     # 0x573ea
leaq 0x20(%rsp), %rdi
leaq 0x54(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x20(%rsp)
jne 0x2e7e7
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x2e7a6
movq (%rax), %r8
jmp 0x2e7ad
leaq 0x2a8bd(%rip), %r8      # 0x5906a
leaq 0x2ab36(%rip), %rdx     # 0x592ea
movq %rsp, %rdi
pushq $0x1
popq %rsi
pushq $0x33
popq %rcx
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e7e7
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x13646
leaq 0x8(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0x2e548(%rip), %rsi     # 0x5cd48
leaq 0x28bec(%rip), %rdx     # 0x573f3
leaq 0x20(%rsp), %rdi
leaq 0x1c(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x20(%rsp)
jne 0x2e877
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x2e836
movq (%rax), %r8
jmp 0x2e83d
leaq 0x2a82d(%rip), %r8      # 0x5906a
leaq 0x2aaa6(%rip), %rdx     # 0x592ea
movq %rsp, %rdi
pushq $0x1
popq %rsi
pushq $0x34
popq %rcx
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e877
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x2979c(%rip), %rsi     # 0x5802f
leaq 0x29728(%rip), %rdx     # 0x57fc2
leaq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x20(%rsp)
jne 0x2e90a
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x2e8c9
movq (%rax), %r8
jmp 0x2e8d0
leaq 0x2a79a(%rip), %r8      # 0x5906a
leaq 0x2aa13(%rip), %rdx     # 0x592ea
movq %rsp, %rdi
pushq $0x1
popq %rsi
pushq $0x35
popq %rcx
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e90a
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x13646
leaq 0x80(%rsp), %rdi
callq 0x34214
leaq 0x68(%rsp), %rdi
callq 0x25080
pushq $0x70
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0xe0, %rdi
callq 0x1cbe0
addq $-0x70, %rbx
cmpq $-0x70, %rbx
jne 0x2e92e
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2e963
jmp 0x2e970
jmp 0x2e985
jmp 0x2e963
jmp 0x2e970
jmp 0x2e985
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3b616
jmp 0x2e973
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2e988
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x2e988
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x2e9c7
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3b616
jmp 0x2e9a1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xdbe8
jmp 0x2e9b0
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x2e9c4
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x2e9c4
movq %rax, %rbx
movq %r14, %rdi
callq 0x13646
jmp 0x2e9d5
jmp 0x2e9d2
jmp 0x2e9d2
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x34214
leaq 0x68(%rsp), %rdi
callq 0x25080
pushq $0x70
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xe0, %rdi
callq 0x1cbe0
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x2e9f0
movq %rbx, %rdi
callq 0xdaa0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1cc42
jmp 0x2e9e2
movq %rax, %rbx
jmp 0x2e9ec
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x1367e
jmp 0x2ea3e
movq %rax, %rbx
movq %r15, %r14
leaq 0xc0(%rsp), %rdi
callq 0x1367e
cmpq %r14, %r15
je 0x2ea0a
leaq 0xe0(%rsp), %r15
addq $-0x70, %r14
movq %r14, %rdi
callq 0x1cbe0
cmpq %r15, %r14
jne 0x2ea58
jmp 0x2ea0a
nop