// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x1f0, %rsp            # imm = 0x1F0
xorl %eax, %eax
leaq 0x4c(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, 0x3c(%rsp)
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %rcx, (%rsi)
leaq -0x239b7(%rip), %rbx    # 0x1676c
movq %rbx, 0x18(%rsi)
leaq -0x239ba(%rip), %r15    # 0x16774
movq %r15, 0x10(%rsi)
leaq 0xa8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x68(%rsp), %r8
movl $0x4, (%r8)
leaq 0x35238(%rip), %rdx     # 0x6f38b
leaq 0x110(%rsp), %r14
movq %r14, %rdi
callq 0x3d6fe
leaq 0x180(%rsp), %r14
leaq 0xd0(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
leaq 0x3c(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
leaq 0x18(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x50(%rsp), %r8
movl $0x4, (%r8)
leaq 0x351e0(%rip), %rdx     # 0x6f38b
movq %r14, %rdi
callq 0x3d6fe
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x3a1d2
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x100(%rsp), %rax
testq %rax, %rax
je 0x3a1f1
leaq 0xf0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x35176(%rip), %rsi     # 0x6f38b
leaq 0x35171(%rip), %rdx     # 0x6f38d
leaq 0x88(%rsp), %rdi
callq 0x15892
leaq 0x50(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x34fc4
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x3a258
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xd530
leaq 0x3753e(%rip), %rsi     # 0x7179d
leaq 0xa8(%rsp), %rdi
callq 0x2a408
leaq 0xa8(%rsp), %rdx
movq 0x8(%rdx), %rcx
leaq 0x68(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x50(%rsp), %r8
callq 0x3d2c3
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x35d2e(%rip), %rsi     # 0x6ffcf
leaq 0x350e4(%rip), %rdx     # 0x6f38c
leaq 0x18(%rsp), %rdi
leaq 0x4c(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x18(%rsp)
jne 0x3a31c
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a2d7
movq (%rax), %r8
jmp 0x3a2de
leaq 0x36d1a(%rip), %r8      # 0x70ff8
leaq 0x36f93(%rip), %rdx     # 0x71278
movq %rsp, %rdi
movl $0x1, %esi
movl $0xa4, %ecx
callq 0x4a84c
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
movq %rsp, %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a31c
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x3a330
leaq 0x20(%rsp), %rdi
callq 0x156d0
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x35c8d(%rip), %rsi     # 0x6ffcf
leaq 0x36d6f(%rip), %rdx     # 0x710b8
leaq 0x18(%rsp), %rdi
leaq 0x3c(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x18(%rsp)
jne 0x3a3bd
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a378
movq (%rax), %r8
jmp 0x3a37f
leaq 0x36c79(%rip), %r8      # 0x70ff8
leaq 0x36ef2(%rip), %rdx     # 0x71278
movq %rsp, %rdi
movl $0x1, %esi
movl $0xa5, %ecx
callq 0x4a84c
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
movq %rsp, %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a3bd
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x3a3d1
leaq 0x20(%rsp), %rdi
callq 0x156d0
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x35bdc(%rip), %rsi     # 0x6ffbf
leaq 0x35b68(%rip), %rdx     # 0x6ff52
leaq 0x18(%rsp), %rdi
leaq 0xa8(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x18(%rsp)
jne 0x3a461
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a41c
movq (%rax), %r8
jmp 0x3a423
leaq 0x36bd5(%rip), %r8      # 0x70ff8
leaq 0x36e4e(%rip), %rdx     # 0x71278
movq %rsp, %rdi
movl $0x1, %esi
movl $0xa6, %ecx
callq 0x4a84c
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
movq %rsp, %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a461
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x3a475
leaq 0x20(%rsp), %rdi
callq 0x156d0
movb 0x68(%rsp), %al
leaq 0x10(%rsp), %r14
movb %al, -0x8(%r14)
movq $0x0, (%r14)
testb %al, %al
jne 0x3a51e
movq %rsp, %rdi
callq 0x4e2e8
leaq 0x35f34(%rip), %rdx     # 0x703d4
leaq 0x33c5f(%rip), %rcx     # 0x6e106
leaq 0x33c5e(%rip), %r8      # 0x6e10c
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x48021
movq 0x18(%rsp), %r8
leaq 0x36daf(%rip), %rdx     # 0x71278
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
movl $0xa7, %ecx
callq 0x4a84c
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x481aa
leaq 0x40(%rsp), %rdi
callq 0x4a8b8
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a50f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xd530
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3a51e
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x3a530
movq %r14, %rdi
callq 0x156d0
cmpb $0x1, 0x68(%rsp)
jne 0x3a541
leaq 0x70(%rsp), %rdi
callq 0x20fca
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a55e
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
leaq 0x50(%rsp), %rdi
callq 0x20fca
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xf0, %rdi
callq 0x21caa
leaq (%rsp,%r14), %rdi
addq $0xd8, %rdi
callq 0x21cda
leaq (%rsp,%r14), %rbx
addq $0xc0, %rbx
movq %rbx, %rdi
callq 0x21d0a
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x3a5bf
leaq (%rsp,%r14), %rdi
addq $0xa0, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x3a56e
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x4a8b8
jmp 0x3a5e4
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3a604
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x3a604
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3a613
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
jmp 0x3a622
jmp 0x3a640
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x3a69e
movq %r14, %rdi
callq 0x156d0
jmp 0x3a69e
jmp 0x3a64d
jmp 0x3a66b
jmp 0x3a640
jmp 0x3a64d
jmp 0x3a66b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4a8b8
jmp 0x3a650
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a660
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x3a66e
movq %rax, %rbx
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x3a682
leaq 0x20(%rsp), %rdi
callq 0x156d0
movq $0x0, 0x20(%rsp)
jmp 0x3a69e
jmp 0x3a796
jmp 0x3a796
jmp 0x3a69b
jmp 0x3a69b
movq %rax, %rbx
cmpb $0x1, 0x68(%rsp)
jne 0x3a6af
leaq 0x70(%rsp), %rdi
callq 0x20fca
movb $0x0, 0x68(%rsp)
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a6fa
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
jmp 0x3a6fa
movq %rax, %rbx
jmp 0x3a6b4
jmp 0x3a6f7
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x3a6fa
movq 0x98(%rsp), %rsi
incq %rsi
jmp 0x3a6cc
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x20fca
movl $0x70, %r14d
leaq (%rsp,%r14), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x20f42
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x3a70a
movq %rbx, %rdi
callq 0xda70
movq %rax, %rbx
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x3a755
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x3a755
jmp 0x3a796
movq %rax, %rbx
movq 0x100(%rsp), %rax
testq %rax, %rax
je 0x3a774
leaq 0xf0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x110(%rsp), %r15
cmpq %r14, %r15
je 0x3a724
addq $-0x70, %r14
movq %r14, %rdi
callq 0x20f42
cmpq %r15, %r14
jne 0x3a781
jmp 0x3a724
jmp 0x3a796
movq %rax, %rdi
callq 0x15674