// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/test_run.cc
// Function: run_restore_single_Test::TestBody()
TEST(run, restore_single) {
    int c = 0, d = 0;
    to::option opts[] = {
        { to::increment(c), "-c", to::flag, to::single },
        { to::increment(d), "-c", to::flag, to::single }
    };

    to::saved_options restore;
    restore.add("-c");

    mockargs M("-c\0-c\0-c\0");
    auto r = to::run(opts, M.argc, M.argv, restore);
    EXPECT_EQ(1, c);
    EXPECT_EQ(1, d);
    EXPECT_EQ(2, M.argc);
    EXPECT_TRUE(r);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
leaq 0x4c(%rsp), %rax
andl $0x0, (%rax)
andl $0x0, 0x1c(%rsp)
leaq 0xf0(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %rax, (%rsi)
leaq -0x1c5c0(%rip), %rbx    # 0x1461c
movq %rbx, 0x18(%rsi)
leaq -0x1c5c3(%rip), %r12    # 0x14624
movq %r12, 0x10(%rsi)
leaq 0x68(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x90(%rsp), %r8
movl $0x4, (%r8)
leaq 0x267ef(%rip), %rdx     # 0x573fb
leaq 0x110(%rsp), %r15
movq %r15, %rdi
callq 0x333c0
leaq 0x180(%rsp), %r14
leaq 0xd0(%rsp), %rsi
andq $0x0, 0x8(%rsi)
leaq 0x1c(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r12, 0x10(%rsi)
leaq 0x20(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x50(%rsp), %r8
movl $0x4, (%r8)
leaq 0x2679c(%rip), %rdx     # 0x573fb
movq %r14, %rdi
callq 0x333c0
leaq 0xd0(%rsp), %rdi
callq 0x1367e
leaq 0xf0(%rsp), %rdi
callq 0x1367e
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
leaq 0x26765(%rip), %rsi     # 0x573fb
leaq 0xb0(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x1337a
leaq 0x50(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x2ce84
leaq 0xb0(%rsp), %rdi
callq 0xdbe8
leaq 0x28b41(%rip), %rsi     # 0x5980f
leaq 0x68(%rsp), %rdi
callq 0x2488e
leaq 0x68(%rsp), %rdx
movq 0x8(%rdx), %rcx
leaq 0x90(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x50(%rsp), %r8
callq 0x33094
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x27332(%rip), %rsi     # 0x5803f
leaq 0x266e8(%rip), %rdx     # 0x573fc
leaq 0x20(%rsp), %rdi
leaq 0x4c(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x20(%rsp)
jne 0x30d86
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x30d43
movq (%rax), %r8
jmp 0x30d4a
leaq 0x28320(%rip), %r8      # 0x5906a
leaq 0x28599(%rip), %rdx     # 0x592ea
movq %rsp, %rdi
pushq $0x1
popq %rsi
movl $0xa4, %ecx
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x30d86
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x2729d(%rip), %rsi     # 0x5803f
leaq 0x28381(%rip), %rdx     # 0x5912a
leaq 0x20(%rsp), %rdi
leaq 0x1c(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x20(%rsp)
jne 0x30e1b
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x30dd8
movq (%rax), %r8
jmp 0x30ddf
leaq 0x2828b(%rip), %r8      # 0x5906a
leaq 0x28504(%rip), %rdx     # 0x592ea
movq %rsp, %rdi
pushq $0x1
popq %rsi
movl $0xa5, %ecx
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x30e1b
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x271f8(%rip), %rsi     # 0x5802f
leaq 0x27184(%rip), %rdx     # 0x57fc2
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x20(%rsp)
jne 0x30eb0
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x30e6d
movq (%rax), %r8
jmp 0x30e74
leaq 0x281f6(%rip), %r8      # 0x5906a
leaq 0x2846f(%rip), %rdx     # 0x592ea
movq %rsp, %rdi
pushq $0x1
popq %rsi
movl $0xa6, %ecx
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x30eb0
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x13646
movb 0x90(%rsp), %al
leaq 0x10(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
jne 0x30f4c
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x27568(%rip), %rdx     # 0x58449
leaq 0x25227(%rip), %rcx     # 0x5610f
leaq 0x25226(%rip), %r8      # 0x56115
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x399e5
movq 0x20(%rsp), %r8
leaq 0x283e0(%rip), %rdx     # 0x592ea
leaq 0x40(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0xa7, %ecx
callq 0x3b5b6
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x39b08
leaq 0x40(%rsp), %rdi
callq 0x3b616
leaq 0x20(%rsp), %rdi
callq 0xdbe8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x30f4c
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
leaq 0x90(%rsp), %rdi
callq 0x34214
leaq 0x78(%rsp), %rdi
callq 0x25080
leaq 0x50(%rsp), %rdi
callq 0x1cc42
pushq $0x70
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x1cbe0
addq $-0x70, %rbx
cmpq $-0x70, %rbx
jne 0x30f78
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3b616
jmp 0x30fb3
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xdbe8
jmp 0x30fc2
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x30fd8
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x30fd8
jmp 0x30fe7
movq %rax, %rbx
movq %r14, %rdi
jmp 0x31011
jmp 0x30ff4
jmp 0x31009
jmp 0x30fe7
jmp 0x30ff4
jmp 0x31009
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3b616
jmp 0x30ff7
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3100c
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3100c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x13646
jmp 0x3101f
jmp 0x3101c
jmp 0x3101c
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x34214
leaq 0x78(%rsp), %rdi
callq 0x25080
leaq 0x50(%rsp), %rdi
callq 0x1cc42
pushq $0x70
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x1cbe0
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x31044
movq %rbx, %rdi
callq 0xdaa0
movq %rax, %rbx
jmp 0x3102c
jmp 0x3107f
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xdbe8
jmp 0x31036
movq %rax, %rbx
jmp 0x31036
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x1367e
jmp 0x3109c
movq %rax, %rbx
movq %r15, %r14
leaq 0xf0(%rsp), %rdi
callq 0x1367e
cmpq %r14, %r15
je 0x3105e
leaq 0x110(%rsp), %r15
addq $-0x70, %r14
movq %r14, %rdi
callq 0x1cbe0
cmpq %r15, %r14
jne 0x310b6
jmp 0x3105e
nop