// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/test_run.cc
// Function: run_mandatory_Test::TestBody()
TEST(run, mandatory) {
    bool m = false, a = false;
    to::option opts[] = {
        { to::set(m), "-m", to::flag, to::mandatory },
        { to::set(a), "-a", to::flag }
    };

    mockargs M1("-a\0-m\0");
    auto r1 = to::run(opts, M1.argc, M1.argv);
    EXPECT_TRUE(r1);
    EXPECT_TRUE(a);
    EXPECT_TRUE(m);

    mockargs M2("-a\0");
    EXPECT_THROW(to::run(opts, M2.argc, M2.argv), to::missing_mandatory_option);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
xorl %eax, %eax
leaq 0x1f(%rsp), %rcx
movb %al, (%rcx)
movb %al, 0xf(%rsp)
leaq 0xf0(%rsp), %rsi
movq $0x1, 0x8(%rsi)
movq %rcx, (%rsi)
leaq 0x420f(%rip), %rbx      # 0x3422c
movq %rbx, 0x18(%rsi)
leaq 0x4210(%rip), %r12      # 0x34238
movq %r12, 0x10(%rsi)
leaq 0xa8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x60(%rsp), %r8
movl $0x8, (%r8)
leaq 0x293b8(%rip), %rdx     # 0x59405
leaq 0x130(%rsp), %r14
movq %r14, %rdi
callq 0x333c0
leaq 0x1a0(%rsp), %r15
leaq 0xd0(%rsp), %rsi
movq $0x1, 0x8(%rsi)
leaq 0xf(%rsp), %rax
movq %rax, (%rsi)
movq %rbx, 0x18(%rsi)
movq %r12, 0x10(%rsi)
leaq 0x88(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x2734f(%rip), %rdx     # 0x573e9
movq %r15, %rdi
callq 0x32ff6
leaq 0xd0(%rsp), %rdi
callq 0x1367e
leaq 0xf0(%rsp), %rdi
callq 0x1367e
leaq 0x29756(%rip), %rsi     # 0x59819
leaq 0xa8(%rsp), %rdi
callq 0x2488e
leaq 0xa8(%rsp), %rdx
movq 0x8(%rdx), %rcx
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r8
movaps %xmm0, (%r8)
andq $0x0, 0x10(%r8)
leaq 0x88(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x33094
leaq 0x60(%rsp), %rdi
callq 0x1cc42
movb 0x88(%rsp), %al
leaq 0x48(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
jne 0x301a1
leaq 0x20(%rsp), %rdi
callq 0x3d5f6
leaq 0x29212(%rip), %rdx     # 0x59347
leaq 0x25fd3(%rip), %rcx     # 0x5610f
leaq 0x25fd2(%rip), %r8      # 0x56115
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x399e5
movq 0x60(%rsp), %r8
leaq 0x2918c(%rip), %rdx     # 0x592ea
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x7b
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
leaq 0x60(%rsp), %rdi
callq 0xdbe8
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x301a1
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
movb 0xf(%rsp), %al
leaq 0x48(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
jne 0x3023b
leaq 0x20(%rsp), %rdi
callq 0x3d5f6
leaq 0x2721b(%rip), %rdx     # 0x573ea
leaq 0x25f39(%rip), %rcx     # 0x5610f
leaq 0x25f38(%rip), %r8      # 0x56115
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x399e5
movq 0x60(%rsp), %r8
leaq 0x290f2(%rip), %rdx     # 0x592ea
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x7c
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
leaq 0x60(%rsp), %rdi
callq 0xdbe8
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3023b
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
movb 0x1f(%rsp), %al
leaq 0x48(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
jne 0x302d5
leaq 0x20(%rsp), %rdi
callq 0x3d5f6
leaq 0x2919d(%rip), %rdx     # 0x59406
leaq 0x25e9f(%rip), %rcx     # 0x5610f
leaq 0x25e9e(%rip), %r8      # 0x56115
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x399e5
movq 0x60(%rsp), %r8
leaq 0x29058(%rip), %rdx     # 0x592ea
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x7d
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
leaq 0x60(%rsp), %rdi
callq 0xdbe8
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x302d5
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
leaq 0x29657(%rip), %rsi     # 0x5993b
leaq 0x60(%rsp), %rdi
callq 0x2488e
leaq 0x50(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
callq 0x3d5f3
testb %al, %al
je 0x30351
leaq 0x60(%rsp), %rdx
movq 0x8(%rdx), %rcx
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r8
movaps %xmm0, (%r8)
andq $0x0, 0x10(%r8)
leaq 0x110(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x33094
leaq 0x110(%rsp), %rdi
callq 0x34214
leaq 0x20(%rsp), %rdi
callq 0x1cc42
leaq 0x291b3(%rip), %rsi     # 0x5950b
leaq 0x40(%rsp), %rdi
callq 0xdb70
leaq 0x20(%rsp), %rdi
callq 0x3d5f6
movq 0x40(%rsp), %r8
leaq 0x28f72(%rip), %rdx     # 0x592ea
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0x80, %ecx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x303b3
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x40(%rsp), %rdi
callq 0xdbe8
leaq 0x70(%rsp), %rdi
callq 0x25080
leaq 0x88(%rsp), %rdi
callq 0x34214
leaq 0xb8(%rsp), %rdi
callq 0x25080
pushq $0x70
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0x1cbe0
addq $-0x70, %rbx
cmpq $-0x70, %rbx
jne 0x303e4
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1cc42
jmp 0x304ab
jmp 0x30430
jmp 0x30441
jmp 0x30450
jmp 0x30430
jmp 0x30465
jmp 0x30441
jmp 0x30450
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3b616
jmp 0x30444
jmp 0x30465
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xdbe8
jmp 0x30453
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x30468
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x30468
movq %rax, %rbx
movq %r14, %rdi
callq 0x13646
jmp 0x305ba
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3b616
jmp 0x30487
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x305a1
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x305a1
jmp 0x3059e
movq %rdx, %r14
movq %rax, %rbx
movq %rbx, %rdi
cmpl $0x3, %r14d
jne 0x304c3
callq 0xd210
callq 0xda40
jmp 0x303b3
callq 0xd210
cmpl $0x2, %r14d
jne 0x30552
movq %rax, %rbx
leaq 0x28fb6(%rip), %rsi     # 0x59492
leaq 0x40(%rsp), %rdi
callq 0xdb70
movq (%rbx), %rax
movq -0x8(%rax), %rsi
leaq 0x20(%rsp), %rdi
callq 0x1d219
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xdb90
leaq 0x20(%rsp), %rdi
callq 0xdbe8
leaq 0x2d150(%rip), %rsi     # 0x5d667
leaq 0x40(%rsp), %rdi
callq 0xdb60
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0xdb60
leaq 0x272ad(%rip), %rsi     # 0x577eb
leaq 0x40(%rsp), %rdi
callq 0xdb60
callq 0xda40
jmp 0x30362
leaq 0x28eaf(%rip), %rsi     # 0x59408
leaq 0x40(%rsp), %rdi
callq 0xdb70
callq 0xda40
jmp 0x30362
jmp 0x3059e
movq %rax, %rbx
callq 0xda40
jmp 0x305a1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xdbe8
jmp 0x3058f
jmp 0x3058c
jmp 0x3059e
movq %rax, %rbx
callq 0xda40
jmp 0x305a1
movq %rax, %rdi
callq 0x135af
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xdbe8
leaq 0x70(%rsp), %rdi
callq 0x25080
jmp 0x305ba
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x34214
leaq 0xb8(%rsp), %rdi
callq 0x25080
pushq $0x70
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x130, %rdi            # imm = 0x130
callq 0x1cbe0
addq $-0x70, %r14
cmpq $-0x70, %r14
jne 0x305d8
movq %rbx, %rdi
callq 0xdaa0
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x1cc42
jmp 0x305c7
movq %rax, %rbx
jmp 0x305d4
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x1367e
jmp 0x30626
movq %rax, %rbx
movq %r14, %r15
leaq 0xf0(%rsp), %rdi
callq 0x1367e
cmpq %r15, %r14
je 0x305f2
leaq 0x130(%rsp), %r14
addq $-0x70, %r15
movq %r15, %rdi
callq 0x1cbe0
cmpq %r14, %r15
jne 0x30640
jmp 0x305f2
nop