// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/test/test_run.cc
// Function: run_ephemeral_Test::TestBody()
TEST(run, ephemeral) {
    int a = 0;
    int b = 0;

    to::option opts[] = {
        { a, "-a", to::ephemeral },
        { b, "-b" }
    };

    mockargs M("-a\09\0-b\08\0");
    auto r = to::run(opts, M.argc, M.argv);
    EXPECT_EQ(9, a);
    EXPECT_EQ(8, b);
    EXPECT_EQ(0, M.argc);
    ASSERT_TRUE(r);
    EXPECT_EQ((svector{"-b", "8"}), svector(r->begin(), r->end()));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
xorl %eax, %eax
leaq 0x94(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, 0x3c(%rsp)
leaq 0x100(%rsp), %rsi
movq $0x0, 0x8(%rsi)
movq %rcx, (%rsi)
leaq -0x20bb2(%rip), %rbx    # 0x15620
movq %rbx, 0x18(%rsi)
leaq -0x20b8b(%rip), %r15    # 0x15652
movq %r15, 0x10(%rsi)
leaq 0x50(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x36dc9(%rip), %rdx     # 0x6cfbc
leaq 0x120(%rsp), %r14
movq %r14, %rdi
callq 0x3bbc4
leaq 0x190(%rsp), %r14
leaq 0xe0(%rsp), %rsi
movq $0x0, 0x8(%rsi)
leaq 0x3c(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
leaq 0x36d93(%rip), %rdx     # 0x6cfc5
movq %r14, %rdi
callq 0x3bff2
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x36259
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x110(%rsp), %rax
testq %rax, %rax
je 0x36278
leaq 0x100(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x394dd(%rip), %rsi     # 0x6f75c
leaq 0xb8(%rsp), %rdi
callq 0x29a42
leaq 0xb8(%rsp), %rdx
movq 0x8(%rdx), %rcx
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r8
movaps %xmm0, (%r8)
movq $0x0, 0x10(%r8)
leaq 0x98(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x3bccd
leaq 0x50(%rsp), %rdi
callq 0x20770
movq %rsp, %rcx
movl $0x9, (%rcx)
leaq 0x37068(%rip), %rsi     # 0x6d343
leaq 0x36cdb(%rip), %rdx     # 0x6cfbd
leaq 0x50(%rsp), %rdi
leaq 0x94(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x50(%rsp)
jne 0x3635a
movq %rsp, %rdi
callq 0x4ca86
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x36312
movq (%rax), %r8
jmp 0x36319
leaq 0x38cbc(%rip), %r8      # 0x6efd5
leaq 0x38f46(%rip), %rdx     # 0x6f266
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x43, %ecx
callq 0x4902a
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x46a1c
leaq 0x20(%rsp), %rdi
callq 0x49096
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3635a
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x3636e
leaq 0x58(%rsp), %rdi
callq 0x153ca
movq %rsp, %rcx
movl $0x8, (%rcx)
leaq 0x3b2be(%rip), %rsi     # 0x7163c
leaq 0x36c41(%rip), %rdx     # 0x6cfc6
leaq 0x50(%rsp), %rdi
leaq 0x3c(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x50(%rsp)
jne 0x363fa
movq %rsp, %rdi
callq 0x4ca86
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x363b2
movq (%rax), %r8
jmp 0x363b9
leaq 0x38c1c(%rip), %r8      # 0x6efd5
leaq 0x38ea6(%rip), %rdx     # 0x6f266
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x44, %ecx
callq 0x4902a
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x46a1c
leaq 0x20(%rsp), %rdi
callq 0x49096
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x363fa
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x3640e
leaq 0x58(%rsp), %rdi
callq 0x153ca
movq %rsp, %rcx
movl $0x0, (%rcx)
leaq 0x3c8ea(%rip), %rsi     # 0x72d08
leaq 0x37b0d(%rip), %rdx     # 0x6df32
leaq 0x50(%rsp), %rdi
leaq 0xb8(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x50(%rsp)
jne 0x3649d
movq %rsp, %rdi
callq 0x4ca86
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x36455
movq (%rax), %r8
jmp 0x3645c
leaq 0x38b79(%rip), %r8      # 0x6efd5
leaq 0x38e03(%rip), %rdx     # 0x6f266
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x45, %ecx
callq 0x4902a
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x46a1c
leaq 0x20(%rsp), %rdi
callq 0x49096
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3649d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x364b1
leaq 0x58(%rsp), %rdi
callq 0x153ca
movb 0x98(%rsp), %al
movb %al, (%rsp)
movq $0x0, 0x8(%rsp)
testb %al, %al
je 0x365c9
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x36ae9(%rip), %rsi     # 0x6cfc5
leaq 0x36ae4(%rip), %rdx     # 0x6cfc7
leaq 0x50(%rsp), %rdi
callq 0x1558a
leaq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x3b137(%rip), %rsi     # 0x7163c
leaq 0x3b131(%rip), %rdx     # 0x7163d
callq 0x1558a
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x1f(%rsp), %rcx
movl $0x2, %edx
callq 0x20728
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
leaq 0x1e(%rsp), %rcx
callq 0x3bfb0
leaq 0x38dd9(%rip), %rsi     # 0x6f327
leaq 0x38de7(%rip), %rdx     # 0x6f33c
leaq 0x40(%rsp), %rdi
movq %rsp, %rcx
leaq 0x20(%rsp), %r8
callq 0x237a7
leaq 0x20(%rsp), %rdi
callq 0x20770
movq %rsp, %rdi
callq 0x20770
movq $-0x40, %rbx
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x36594
movq (%r14), %rsi
incq %rsi
callq 0xd530
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x36580
cmpb $0x0, 0x40(%rsp)
jne 0x366b2
leaq 0x50(%rsp), %rdi
callq 0x4ca86
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x3666d
movq (%rax), %r8
jmp 0x36674
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %rdi
callq 0x4ca86
leaq 0x37dd5(%rip), %rdx     # 0x6e3b4
leaq 0x35b20(%rip), %rcx     # 0x6c106
leaq 0x35b1f(%rip), %r8      # 0x6c10c
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
callq 0x46893
movq 0x50(%rsp), %r8
leaq 0x38c60(%rip), %rdx     # 0x6f266
leaq 0x40(%rsp), %rdi
movl $0x2, %esi
movl $0x46, %ecx
callq 0x4902a
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46a1c
leaq 0x40(%rsp), %rdi
callq 0x49096
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3664e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3665e
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x366c6
movq %r14, %rdi
jmp 0x366c1
leaq 0x38961(%rip), %r8      # 0x6efd5
leaq 0x38beb(%rip), %rdx     # 0x6f266
movq %rsp, %rdi
movl $0x1, %esi
movl $0x47, %ecx
callq 0x4902a
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
callq 0x46a1c
movq %rsp, %rdi
callq 0x49096
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x366b2
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x366c6
leaq 0x48(%rsp), %rdi
callq 0x153ca
cmpb $0x1, 0x98(%rsp)
jne 0x366dd
leaq 0xa0(%rsp), %rdi
callq 0x20770
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x366fa
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x2145a
leaq (%rsp,%r14), %rdi
addq $0xe8, %rdi
callq 0x2148a
leaq (%rsp,%r14), %rbx
addq $0xd0, %rbx
movq %rbx, %rdi
callq 0x214ba
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x36751
leaq (%rsp,%r14), %rdi
addq $0xb0, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x36700
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x49096
jmp 0x36774
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x36789
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x36789
movq %rax, %rbx
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x368b8
leaq 0x48(%rsp), %rdi
jmp 0x368a0
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20770
jmp 0x367c2
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x49096
jmp 0x367cf
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20770
jmp 0x367ef
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3681d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x3681d
movq %rax, %rbx
xorl %r15d, %r15d
movq 0x70(%rsp,%r15), %rdi
leaq (%r14,%r15), %rax
cmpq %rdi, %rax
je 0x3680b
movq (%rax), %rsi
incq %rsi
callq 0xd530
addq $-0x20, %r15
cmpq $-0x40, %r15
jne 0x367f2
jmp 0x368b8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x36850
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x36850
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x368b8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x368b8
jmp 0x3686b
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x368b8
movq %r14, %rdi
jmp 0x368a0
jmp 0x368b5
jmp 0x3687a
jmp 0x3688e
jmp 0x3686b
jmp 0x3687a
jmp 0x3688e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x49096
jmp 0x3687d
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x36891
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x36891
movq %rax, %rbx
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x368b8
leaq 0x58(%rsp), %rdi
callq 0x153ca
jmp 0x368b8
jmp 0x3698d
jmp 0x3698d
jmp 0x368b5
jmp 0x368b5
movq %rax, %rbx
cmpb $0x1, 0x98(%rsp)
jne 0x368cf
leaq 0xa0(%rsp), %rdi
callq 0x20770
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x368ec
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0x70, %r14d
leaq (%rsp,%r14), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x206e8
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x368f2
movq %rbx, %rdi
callq 0xda70
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x368ca
movq %rax, %rbx
jmp 0x368ec
movq %rax, %rbx
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x3694c
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x3694c
jmp 0x3698d
movq %rax, %rbx
movq 0x110(%rsp), %rax
testq %rax, %rax
je 0x3696b
leaq 0x100(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x120(%rsp), %r15
cmpq %r14, %r15
je 0x3690c
addq $-0x70, %r14
movq %r14, %rdi
callq 0x206e8
cmpq %r15, %r14
jne 0x36978
jmp 0x3690c
jmp 0x3698d
movq %rax, %rdi
callq 0x1536f
nop