// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
xorl %eax, %eax
leaq 0x94(%rsp), %rcx
movl %eax, (%rcx)
movl %eax, 0x4c(%rsp)
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %rsi
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
movq %rcx, (%rsi)
leaq -0x21b84(%rip), %rbx    # 0x15922
movq %rbx, 0x18(%rsi)
leaq -0x21b5d(%rip), %r15    # 0x15954
movq %r15, 0x10(%rsi)
leaq 0x50(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x37eb2(%rip), %rdx     # 0x6f379
leaq 0x120(%rsp), %r14
movq %r14, %rdi
callq 0x3d1ba
leaq 0x190(%rsp), %r14
leaq 0xe0(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
movaps %xmm0, 0x10(%rsi)
leaq 0x4c(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r15, 0x10(%rsi)
leaq 0x37e7a(%rip), %rdx     # 0x6f382
movq %r14, %rdi
callq 0x3d602
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x3752f
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x110(%rsp), %rax
testq %rax, %rax
je 0x3754e
leaq 0x100(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x3a219(%rip), %rsi     # 0x7176e
leaq 0xb8(%rsp), %rdi
callq 0x2a408
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 0x3d2c3
leaq 0x50(%rsp), %rdi
callq 0x20fca
movq %rsp, %rcx
movl $0x9, (%rcx)
leaq 0x3814f(%rip), %rsi     # 0x6f700
leaq 0x37dc2(%rip), %rdx     # 0x6f37a
leaq 0x50(%rsp), %rdi
leaq 0x94(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x50(%rsp)
jne 0x37630
movq %rsp, %rdi
callq 0x4e2e8
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x375e8
movq (%rax), %r8
jmp 0x375ef
leaq 0x39a09(%rip), %r8      # 0x70ff8
leaq 0x39c82(%rip), %rdx     # 0x71278
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x43, %ecx
callq 0x4a84c
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x481aa
leaq 0x20(%rsp), %rdi
callq 0x4a8b8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x37630
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x37644
leaq 0x58(%rsp), %rdi
callq 0x156d0
movq %rsp, %rcx
movl $0x8, (%rcx)
leaq 0x3bfd8(%rip), %rsi     # 0x7362c
leaq 0x37d28(%rip), %rdx     # 0x6f383
leaq 0x50(%rsp), %rdi
leaq 0x4c(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x50(%rsp)
jne 0x376d0
movq %rsp, %rdi
callq 0x4e2e8
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x37688
movq (%rax), %r8
jmp 0x3768f
leaq 0x39969(%rip), %r8      # 0x70ff8
leaq 0x39be2(%rip), %rdx     # 0x71278
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x44, %ecx
callq 0x4a84c
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x481aa
leaq 0x20(%rsp), %rdi
callq 0x4a8b8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x376d0
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x376e4
leaq 0x58(%rsp), %rdi
callq 0x156d0
movq %rsp, %rcx
movl $0x0, (%rcx)
leaq 0x3d604(%rip), %rsi     # 0x74cf8
leaq 0x38857(%rip), %rdx     # 0x6ff52
leaq 0x50(%rsp), %rdi
leaq 0xb8(%rsp), %r8
callq 0x15aba
cmpb $0x0, 0x50(%rsp)
jne 0x37773
movq %rsp, %rdi
callq 0x4e2e8
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x3772b
movq (%rax), %r8
jmp 0x37732
leaq 0x398c6(%rip), %r8      # 0x70ff8
leaq 0x39b3f(%rip), %rdx     # 0x71278
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x45, %ecx
callq 0x4a84c
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x481aa
leaq 0x20(%rsp), %rdi
callq 0x4a8b8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x37773
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x37787
leaq 0x58(%rsp), %rdi
callq 0x156d0
movb 0x98(%rsp), %al
movb %al, (%rsp)
movq $0x0, 0x8(%rsp)
testb %al, %al
je 0x378a8
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x37bd0(%rip), %rsi     # 0x6f382
leaq 0x37bcb(%rip), %rdx     # 0x6f384
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x15892
leaq 0x70(%rsp), %r14
leaq 0x80(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x3be4d(%rip), %rsi     # 0x7362c
leaq 0x3be47(%rip), %rdx     # 0x7362d
movq %r14, %rdi
callq 0x15892
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x1f(%rsp), %rcx
movl $0x2, %edx
callq 0x20f82
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
leaq 0x20(%rsp), %rdi
leaq 0x1e(%rsp), %rcx
callq 0x3d5c0
leaq 0x39b0e(%rip), %rsi     # 0x71339
leaq 0x39b1c(%rip), %rdx     # 0x7134e
leaq 0x38(%rsp), %rdi
movq %rsp, %rcx
leaq 0x20(%rsp), %r8
callq 0x24081
leaq 0x20(%rsp), %rdi
callq 0x20fca
movq %rsp, %rdi
callq 0x20fca
movq $-0x40, %rbx
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x37873
movq (%r12), %rsi
incq %rsi
callq 0xd530
addq $-0x20, %r12
addq $0x20, %rbx
jne 0x3785d
cmpb $0x0, 0x38(%rsp)
jne 0x37991
leaq 0x50(%rsp), %rdi
callq 0x4e2e8
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x3794c
movq (%rax), %r8
jmp 0x37953
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %rdi
callq 0x4e2e8
leaq 0x38b16(%rip), %rdx     # 0x703d4
leaq 0x36841(%rip), %rcx     # 0x6e106
leaq 0x36840(%rip), %r8      # 0x6e10c
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
callq 0x48021
movq 0x50(%rsp), %r8
leaq 0x39993(%rip), %rdx     # 0x71278
leaq 0x38(%rsp), %rdi
movl $0x2, %esi
movl $0x46, %ecx
callq 0x4a84c
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x481aa
leaq 0x38(%rsp), %rdi
callq 0x4a8b8
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3792d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3793d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x379a5
movq %r14, %rdi
jmp 0x379a0
leaq 0x396a5(%rip), %r8      # 0x70ff8
leaq 0x3991e(%rip), %rdx     # 0x71278
movq %rsp, %rdi
movl $0x1, %esi
movl $0x47, %ecx
callq 0x4a84c
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
callq 0x481aa
movq %rsp, %rdi
callq 0x4a8b8
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x37991
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x379a5
leaq 0x40(%rsp), %rdi
callq 0x156d0
cmpb $0x1, 0x98(%rsp)
jne 0x379bc
leaq 0xa0(%rsp), %rdi
callq 0x20fca
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x379d9
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0xe0, %r14d
leaq (%rsp,%r14), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x21caa
leaq (%rsp,%r14), %rdi
addq $0xe8, %rdi
callq 0x21cda
leaq (%rsp,%r14), %rbx
addq $0xd0, %rbx
movq %rbx, %rdi
callq 0x21d0a
movq -0x10(%rbx), %rax
testq %rax, %rax
je 0x37a30
leaq (%rsp,%r14), %rdi
addq $0xb0, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $-0x70, %r14
jne 0x379df
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4a8b8
jmp 0x37a57
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x37a67
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x50(%rsp)
jmp 0x37a75
movq %rax, %rbx
movq 0x40(%rsp), %rsi
testq %rsi, %rsi
je 0x37a89
leaq 0x40(%rsp), %rdi
callq 0x156d0
movq $0x0, 0x40(%rsp)
jmp 0x37c01
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20fca
jmp 0x37ab8
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4a8b8
jmp 0x37ac5
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20fca
jmp 0x37ae5
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x37b12
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x37b12
movq %rax, %rbx
xorl %r13d, %r13d
movq 0x70(%rsp,%r13), %rdi
leaq (%r12,%r13), %rax
cmpq %rdi, %rax
je 0x37b01
movq (%rax), %rsi
incq %rsi
callq 0xd530
addq $-0x20, %r13
cmpq $-0x40, %r13
jne 0x37ae8
movb $0x1, %al
jmp 0x37b5c
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x37b22
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x20(%rsp)
jmp 0x37b39
movq %rax, %rbx
xorl %eax, %eax
jmp 0x37b5c
jmp 0x37ba3
movq %rax, %rbx
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x37c01
movq %r14, %rdi
callq 0x156d0
jmp 0x37c01
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r14
cmpq %r14, %r15
sete %cl
orb %al, %cl
jne 0x37c01
addq $-0x10, %r14
leaq 0x50(%rsp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x37b87
movq (%r14), %rsi
incq %rsi
callq 0xd530
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x37b73
jmp 0x37c01
jmp 0x37bb2
jmp 0x37bce
jmp 0x37ba3
jmp 0x37bb2
jmp 0x37bce
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4a8b8
jmp 0x37bb5
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x37bc4
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
jmp 0x37bd1
movq %rax, %rbx
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
je 0x37be5
leaq 0x58(%rsp), %rdi
callq 0x156d0
movq $0x0, 0x58(%rsp)
jmp 0x37c01
jmp 0x37ce6
jmp 0x37ce6
jmp 0x37bfe
jmp 0x37bfe
movq %rax, %rbx
cmpb $0x1, 0x98(%rsp)
jne 0x37c18
leaq 0xa0(%rsp), %rdi
callq 0x20fca
movb $0x0, 0x98(%rsp)
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0x37c3d
movq 0xd8(%rsp), %rsi
subq %rdi, %rsi
callq 0xd530
movl $0x70, %r14d
leaq (%rsp,%r14), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x20f42
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x37c43
movq %rbx, %rdi
callq 0xda70
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x20fca
jmp 0x37c20
movq %rax, %rbx
jmp 0x37c3d
movq %rax, %rbx
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0x37ca2
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x37ca2
jmp 0x37ce6
movq %rax, %rbx
movq 0x110(%rsp), %rax
testq %rax, %rax
je 0x37cc1
leaq 0x100(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x120(%rsp), %r15
cmpq %r14, %r15
je 0x37c5d
addq $-0x70, %r14
movq %r14, %rdi
callq 0x20f42
cmpq %r15, %r14
jne 0x37cce
jmp 0x37c5d
jmp 0x37ce6
movq %rax, %rdi
callq 0x15674