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

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

    auto r1 = to::run(opts, restore);
    EXPECT_TRUE(r1);
    EXPECT_EQ(2, c);

    c = 0;
    mockargs M2("-c\0-c\0-c\0");
    auto r2 = to::run(opts, M2.argc, M2.argv, restore);
    EXPECT_TRUE(r2);
    EXPECT_EQ(5, c);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
leaq 0xc(%rsp), %rax
andl $0x0, (%rax)
leaq 0x110(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %rax, (%rsi)
leaq -0x1c061(%rip), %rax    # 0x1461c
movq %rax, 0x18(%rsi)
leaq -0x1c064(%rip), %rax    # 0x14624
movq %rax, 0x10(%rsi)
leaq 0x48(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x26d5d(%rip), %rdx     # 0x573fb
leaq 0x130(%rsp), %rdi
callq 0x32ff6
leaq 0x110(%rsp), %rdi
callq 0x1367e
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
andq $0x0, 0xa0(%rsp)
leaq 0x26d28(%rip), %rsi     # 0x573fb
leaq 0xf0(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1337a
leaq 0x90(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x2ce84
leaq 0xf0(%rsp), %rdi
callq 0xdbe8
leaq 0x26ced(%rip), %rsi     # 0x573fb
leaq 0xd0(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1337a
leaq 0x90(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x2ce84
leaq 0xd0(%rsp), %rdi
callq 0xdbe8
leaq 0xb0(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x33464
movb 0xb0(%rsp), %al
leaq 0x78(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
jne 0x307f6
leaq 0x20(%rsp), %rdi
callq 0x3d5f6
leaq 0x28bbf(%rip), %rdx     # 0x59347
leaq 0x25980(%rip), %rcx     # 0x5610f
leaq 0x2597f(%rip), %r8      # 0x56115
leaq 0x48(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x399e5
movq 0x48(%rsp), %r8
leaq 0x28b39(%rip), %rdx     # 0x592ea
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0x8e, %ecx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
leaq 0x48(%rsp), %rdi
callq 0xdbe8
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x307f6
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
leaq 0x70(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x2781f(%rip), %rsi     # 0x5802f
leaq 0x26be5(%rip), %rdx     # 0x573fc
leaq 0x48(%rsp), %rdi
leaq 0xc(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x48(%rsp)
jne 0x3088f
leaq 0x70(%rsp), %rdi
callq 0x3d5f6
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x30846
movq (%rax), %r8
jmp 0x3084d
leaq 0x2881d(%rip), %r8      # 0x5906a
leaq 0x28a96(%rip), %rdx     # 0x592ea
leaq 0x20(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0x8f, %ecx
callq 0x3b5b6
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x39b08
leaq 0x20(%rsp), %rdi
callq 0x3b616
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x3088f
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x50(%rsp), %rdi
callq 0x13646
andl $0x0, 0xc(%rsp)
leaq 0x28f6a(%rip), %rsi     # 0x5980f
leaq 0x48(%rsp), %rdi
callq 0x2488e
leaq 0x48(%rsp), %rdx
movq 0x8(%rdx), %rcx
leaq 0x70(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x90(%rsp), %r8
callq 0x3348e
movb 0x70(%rsp), %al
leaq 0x18(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
jne 0x30961
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x28aa1(%rip), %rdx     # 0x59397
leaq 0x25812(%rip), %rcx     # 0x5610f
leaq 0x25811(%rip), %r8      # 0x56115
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x399e5
movq 0x20(%rsp), %r8
leaq 0x289cb(%rip), %rdx     # 0x592ea
leaq 0x40(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0x94, %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 0x30961
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
leaq 0x10(%rsp), %rcx
movl $0x5, (%rcx)
leaq 0x26244(%rip), %rsi     # 0x56bbf
leaq 0x26a7a(%rip), %rdx     # 0x573fc
leaq 0x20(%rsp), %rdi
leaq 0xc(%rsp), %r8
callq 0x13a52
cmpb $0x0, 0x20(%rsp)
jne 0x309f4
leaq 0x10(%rsp), %rdi
callq 0x3d5f6
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x309b1
movq (%rax), %r8
jmp 0x309b8
leaq 0x286b2(%rip), %r8      # 0x5906a
leaq 0x2892b(%rip), %rdx     # 0x592ea
movq %rsp, %rdi
pushq $0x1
popq %rsi
movl $0x95, %ecx
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x309f4
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x13646
leaq 0x70(%rsp), %rdi
callq 0x34214
leaq 0x58(%rsp), %rdi
callq 0x25080
leaq 0xb0(%rsp), %rdi
callq 0x34214
leaq 0x90(%rsp), %rdi
callq 0x1cc42
leaq 0x130(%rsp), %rdi
callq 0x1cbe0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3b616
jmp 0x30a54
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x30a69
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x30a69
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x30aa8
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3b616
jmp 0x30a82
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xdbe8
jmp 0x30a91
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x30aa5
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x30aa5
movq %rax, %rbx
movq %r14, %rdi
callq 0x13646
jmp 0x30b20
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3b616
jmp 0x30ac1
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x30ad6
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x30ad6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x30b16
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3b616
jmp 0x30aef
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xdbe8
jmp 0x30afe
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x30b13
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x30b13
movq %rax, %rbx
movq %r14, %rdi
callq 0x13646
jmp 0x30b40
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x34214
leaq 0x58(%rsp), %rdi
callq 0x25080
jmp 0x30b40
movq %rax, %rbx
jmp 0x30b2a
jmp 0x30b3d
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x34214
jmp 0x30b75
jmp 0x30b72
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
jmp 0x30b6b
jmp 0x30b72
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xdbe8
jmp 0x30b75
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1cc42
leaq 0x130(%rsp), %rdi
callq 0x1cbe0
movq %rbx, %rdi
callq 0xdaa0
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x1367e
jmp 0x30b8f
nop