// File: /workspace/github_cpp_makefile_star2_O3/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)
leaq 0xf0(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %rcx, (%rsi)
leaq -0x22891(%rip), %rbx    # 0x16410
movq %rbx, 0x18(%rsi)
leaq -0x22894(%rip), %r15    # 0x16418
movq %r15, 0x10(%rsi)
leaq 0xa8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x68(%rsp), %r8
movl $0x4, (%r8)
leaq 0x342fd(%rip), %rdx     # 0x6cfce
leaq 0x110(%rsp), %r14
movq %r14, %rdi
callq 0x3c0ee
leaq 0x180(%rsp), %r14
leaq 0xd0(%rsp), %rsi
movq $0x0, 0x8(%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 0x342a7(%rip), %rdx     # 0x6cfce
movq %r14, %rdi
callq 0x3c0ee
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x38d4e
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x100(%rsp), %rax
testq %rax, %rax
je 0x38d6d
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 0x3423d(%rip), %rsi     # 0x6cfce
leaq 0x34238(%rip), %rdx     # 0x6cfd0
leaq 0x88(%rsp), %rdi
callq 0x1558a
leaq 0x50(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x33dd4
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x38dd4
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xd530
leaq 0x369b0(%rip), %rsi     # 0x6f78b
leaq 0xa8(%rsp), %rdi
callq 0x29a42
leaq 0xa8(%rsp), %rdx
movq 0x8(%rdx), %rcx
leaq 0x68(%rsp), %rdi
leaq 0x110(%rsp), %rsi
leaq 0x50(%rsp), %r8
callq 0x3bccd
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x35192(%rip), %rsi     # 0x6dfaf
leaq 0x341ab(%rip), %rdx     # 0x6cfcf
leaq 0x18(%rsp), %rdi
leaq 0x4c(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x18(%rsp)
jne 0x38e98
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38e53
movq (%rax), %r8
jmp 0x38e5a
leaq 0x3617b(%rip), %r8      # 0x6efd5
leaq 0x36405(%rip), %rdx     # 0x6f266
movq %rsp, %rdi
movl $0x1, %esi
movl $0xa4, %ecx
callq 0x4902a
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
movq %rsp, %rdi
callq 0x49096
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x38e98
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x38eac
leaq 0x20(%rsp), %rdi
callq 0x153ca
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x350f1(%rip), %rsi     # 0x6dfaf
leaq 0x361d0(%rip), %rdx     # 0x6f095
leaq 0x18(%rsp), %rdi
leaq 0x3c(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x18(%rsp)
jne 0x38f39
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38ef4
movq (%rax), %r8
jmp 0x38efb
leaq 0x360da(%rip), %r8      # 0x6efd5
leaq 0x36364(%rip), %rdx     # 0x6f266
movq %rsp, %rdi
movl $0x1, %esi
movl $0xa5, %ecx
callq 0x4902a
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
movq %rsp, %rdi
callq 0x49096
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x38f39
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x38f4d
leaq 0x20(%rsp), %rdi
callq 0x153ca
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x35040(%rip), %rsi     # 0x6df9f
leaq 0x34fcc(%rip), %rdx     # 0x6df32
leaq 0x18(%rsp), %rdi
leaq 0xa8(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x18(%rsp)
jne 0x38fdd
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x38f98
movq (%rax), %r8
jmp 0x38f9f
leaq 0x36036(%rip), %r8      # 0x6efd5
leaq 0x362c0(%rip), %rdx     # 0x6f266
movq %rsp, %rdi
movl $0x1, %esi
movl $0xa6, %ecx
callq 0x4902a
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
movq %rsp, %rdi
callq 0x49096
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x38fdd
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x38ff1
leaq 0x20(%rsp), %rdi
callq 0x153ca
movb 0x68(%rsp), %al
movb %al, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
testb %al, %al
jne 0x390ae
leaq 0x10(%rsp), %r14
movq %rsp, %rdi
callq 0x4ca86
leaq 0x35396(%rip), %rdx     # 0x6e3b4
leaq 0x330e1(%rip), %rcx     # 0x6c106
leaq 0x330e0(%rip), %r8      # 0x6c10c
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46893
movq 0x18(%rsp), %r8
leaq 0x3621f(%rip), %rdx     # 0x6f266
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
movl $0xa7, %ecx
callq 0x4902a
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
callq 0x46a1c
leaq 0x40(%rsp), %rdi
callq 0x49096
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3908d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xd530
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3909c
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x390ae
movq %r14, %rdi
callq 0x153ca
cmpb $0x1, 0x68(%rsp)
jne 0x390bf
leaq 0x70(%rsp), %rdi
callq 0x20770
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x390dc
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
leaq 0x50(%rsp), %rdi
callq 0x20770
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0xf0, %rdi
callq 0x2145a
leaq (%rsp,%r14), %rdi
addq $0xd8, %rdi
callq 0x2148a
leaq (%rsp,%r14), %rbx
addq $0xc0, %rbx
movq %rbx, %rdi
callq 0x214ba
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x3913d
leaq (%rsp,%r14), %rdi
addq $0xa0, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x390ec
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x49096
jmp 0x39162
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39182
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x39182
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x39198
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x39198
jmp 0x391b1
movq %rax, %rbx
movq 0x10(%rsp), %rsi
testq %rsi, %rsi
je 0x391fd
movq %r14, %rdi
jmp 0x391e5
jmp 0x391be
jmp 0x391d3
jmp 0x391b1
jmp 0x391be
jmp 0x391d3
movq %rax, %rbx
movq %rsp, %rdi
callq 0x49096
jmp 0x391c1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x391d6
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x391d6
movq %rax, %rbx
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x391fd
leaq 0x20(%rsp), %rdi
callq 0x153ca
jmp 0x391fd
jmp 0x392f0
jmp 0x392f0
jmp 0x391fa
jmp 0x391fa
movq %rax, %rbx
cmpb $0x1, 0x68(%rsp)
jne 0x3920e
leaq 0x70(%rsp), %rdi
callq 0x20770
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x39254
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
jmp 0x39254
movq %rax, %rbx
jmp 0x3920e
jmp 0x39251
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x39254
movq 0x98(%rsp), %rsi
incq %rsi
jmp 0x39226
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x20770
movl $0x70, %r14d
leaq (%rsp,%r14), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x206e8
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x39264
movq %rbx, %rdi
callq 0xda70
movq %rax, %rbx
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x392af
leaq 0xd0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x392af
jmp 0x392f0
movq %rax, %rbx
movq 0x100(%rsp), %rax
testq %rax, %rax
je 0x392ce
leaq 0xf0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x110(%rsp), %r15
cmpq %r14, %r15
je 0x3927e
addq $-0x70, %r14
movq %r14, %rdi
callq 0x206e8
cmpq %r15, %r14
jne 0x392db
jmp 0x3927e
jmp 0x392f0
movq %rax, %rdi
callq 0x1536f