// File: 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 %rbp
movq %rsp, %rbp
subq $0x3f0, %rsp            # imm = 0x3F0
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movb $0x0, -0xa(%rbp)
movb $0x1, -0x155(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x9(%rbp), %rsi
callq 0x6df00
jmp 0x689de
movl $0x1, -0x128(%rbp)
movl $0x8, -0x12c(%rbp)
leaq 0x62cb6(%rip), %rdx     # 0xcb6af
leaq -0xf0(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x128(%rbp), %rcx
leaq -0x12c(%rbp), %r8
callq 0x6e820
jmp 0x68a1c
leaq -0x80(%rbp), %rax
movq %rax, -0x360(%rbp)
movq %rax, -0xf8(%rbp)
leaq -0x150(%rbp), %rdi
leaq -0xa(%rbp), %rsi
callq 0x6df00
jmp 0x68a40
movq -0x360(%rbp), %rdi
movl $0x1, -0x154(%rbp)
leaq 0x60c28(%rip), %rdx     # 0xc9680
leaq -0x150(%rbp), %rsi
leaq -0x154(%rbp), %rcx
callq 0x6df30
jmp 0x68a6d
movb $0x0, -0x155(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x1d540
leaq -0x118(%rbp), %rdi
callq 0x1d540
leaq 0x63030(%rip), %rsi     # 0xcbac3
leaq -0x180(%rbp), %rdi
callq 0x4bfe0
jmp 0x68aa1
movq -0x178(%rbp), %rax
movq %rax, -0x370(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x1c0(%rbp)
movq $0x0, -0x1b0(%rbp)
leaq -0x1c0(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x611a0
movq -0x370(%rbp), %rcx
movq -0x368(%rbp), %r8
leaq -0x1a0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x6e040
jmp 0x68b01
leaq -0x1c0(%rbp), %rdi
callq 0x61330
xorl %eax, %eax
movl %eax, %edx
leaq -0x1d0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x6e4b0
jmp 0x68b26
leaq -0x1d0(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x371(%rbp)
jmp 0x68b3a
movb -0x371(%rbp), %al
testb $0x1, %al
jne 0x68b49
jmp 0x68c65
jmp 0x68d66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68ba0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68b94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x1d540
leaq -0x118(%rbp), %rdi
callq 0x1d540
testb $0x1, -0x155(%rbp)
jne 0x68bab
jmp 0x68bf8
movq -0xf8(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x380(%rbp)
je 0x68bf6
movq -0x380(%rbp), %rdi
addq $-0x70, %rdi
movq %rdi, -0x388(%rbp)
callq 0x38ed0
movq -0x388(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x380(%rbp)
jne 0x68bc5
jmp 0x68bf8
jmp 0x69534
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x694e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x61330
jmp 0x694da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x694ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68dad
leaq -0x1d8(%rbp), %rdi
callq 0x84210
jmp 0x68c73
leaq 0x60151(%rip), %rdx     # 0xc8dcb
leaq 0x5f7ce(%rip), %rcx     # 0xc844f
leaq 0x5f7cd(%rip), %r8      # 0xc8455
leaq -0x200(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x7d210
jmp 0x68c9d
leaq -0x200(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0x628e7(%rip), %rdx     # 0xcb59a
leaq -0x1e0(%rbp), %rdi
movl $0x1, %esi
movl $0x7b, %ecx
callq 0x80580
jmp 0x68ccb
leaq -0x1e0(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x7d370
jmp 0x68ce0
leaq -0x1e0(%rbp), %rdi
callq 0x80600
leaq -0x200(%rbp), %rdi
callq 0x10fc8
leaq -0x1d8(%rbp), %rdi
callq 0x1d500
jmp 0x68d66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68d58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68d4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x80600
leaq -0x200(%rbp), %rdi
callq 0x10fc8
leaq -0x1d8(%rbp), %rdi
callq 0x1d500
jmp 0x68dad
leaq -0x1d0(%rbp), %rdi
callq 0x1d520
xorl %eax, %eax
movl %eax, %edx
leaq -0x210(%rbp), %rdi
leaq -0xa(%rbp), %rsi
callq 0x1d4a0
jmp 0x68d88
leaq -0x210(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x389(%rbp)
jmp 0x68d9c
movb -0x389(%rbp), %al
testb $0x1, %al
jne 0x68da8
jmp 0x68dd5
jmp 0x68ed6
leaq -0x1d0(%rbp), %rdi
callq 0x1d520
jmp 0x694ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68f1d
leaq -0x218(%rbp), %rdi
callq 0x84210
jmp 0x68de3
leaq 0x60897(%rip), %rdx     # 0xc9681
leaq 0x5f65e(%rip), %rcx     # 0xc844f
leaq 0x5f65d(%rip), %r8      # 0xc8455
leaq -0x240(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x7d210
jmp 0x68e0d
leaq -0x240(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0x62777(%rip), %rdx     # 0xcb59a
leaq -0x220(%rbp), %rdi
movl $0x1, %esi
movl $0x7c, %ecx
callq 0x80580
jmp 0x68e3b
leaq -0x220(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x7d370
jmp 0x68e50
leaq -0x220(%rbp), %rdi
callq 0x80600
leaq -0x240(%rbp), %rdi
callq 0x10fc8
leaq -0x218(%rbp), %rdi
callq 0x1d500
jmp 0x68ed6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68ec8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x68ebc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x80600
leaq -0x240(%rbp), %rdi
callq 0x10fc8
leaq -0x218(%rbp), %rdi
callq 0x1d500
jmp 0x68f1d
leaq -0x210(%rbp), %rdi
callq 0x1d520
xorl %eax, %eax
movl %eax, %edx
leaq -0x250(%rbp), %rdi
leaq -0x9(%rbp), %rsi
callq 0x1d4a0
jmp 0x68ef8
leaq -0x250(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x38a(%rbp)
jmp 0x68f0c
movb -0x38a(%rbp), %al
testb $0x1, %al
jne 0x68f18
jmp 0x68f45
jmp 0x69049
leaq -0x210(%rbp), %rdi
callq 0x1d520
jmp 0x694ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x69151
leaq -0x258(%rbp), %rdi
callq 0x84210
jmp 0x68f53
leaq 0x62756(%rip), %rdx     # 0xcb6b0
leaq 0x5f4ee(%rip), %rcx     # 0xc844f
leaq 0x5f4ed(%rip), %r8      # 0xc8455
leaq -0x280(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x7d210
jmp 0x68f7d
leaq -0x280(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0x62607(%rip), %rdx     # 0xcb59a
leaq -0x260(%rbp), %rdi
movl $0x1, %esi
movl $0x7d, %ecx
callq 0x80580
jmp 0x68fab
leaq -0x260(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x7d370
jmp 0x68fc0
leaq -0x260(%rbp), %rdi
callq 0x80600
leaq -0x280(%rbp), %rdi
callq 0x10fc8
leaq -0x258(%rbp), %rdi
callq 0x1d500
jmp 0x69049
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x69038
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x6902c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x260(%rbp), %rdi
callq 0x80600
leaq -0x280(%rbp), %rdi
callq 0x10fc8
leaq -0x258(%rbp), %rdi
callq 0x1d500
jmp 0x69151
leaq -0x250(%rbp), %rdi
callq 0x1d520
leaq 0x62b8b(%rip), %rsi     # 0xcbbe7
leaq -0x2a8(%rbp), %rdi
callq 0x4bfe0
jmp 0x6906a
xorps %xmm0, %xmm0
movaps %xmm0, -0x2c0(%rbp)
movaps %xmm0, -0x2d0(%rbp)
leaq -0x2d0(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x39af0
movq -0x398(%rbp), %rdi
callq 0x39b10
movb %al, -0x38b(%rbp)
jmp 0x690a2
movb -0x38b(%rbp), %al
testb $0x1, %al
jne 0x690b1
jmp 0x69381
movb $0x0, -0x2d1(%rbp)
callq 0x841d0
movb %al, -0x399(%rbp)
jmp 0x690c5
movb -0x399(%rbp), %al
testb $0x1, %al
jne 0x690d4
jmp 0x69313
movq -0x2a0(%rbp), %rax
movq %rax, -0x3b0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x310(%rbp)
movq $0x0, -0x300(%rbp)
leaq -0x310(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x611a0
movq -0x3b0(%rbp), %rcx
movq -0x3a8(%rbp), %r8
leaq -0x2f8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x6e040
jmp 0x69134
leaq -0x2f8(%rbp), %rdi
callq 0x6e5d0
leaq -0x310(%rbp), %rdi
callq 0x61330
jmp 0x69315
leaq -0x250(%rbp), %rdi
callq 0x1d520
jmp 0x694ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x694b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x691ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x310(%rbp), %rdi
callq 0x61330
movl -0x124(%rbp), %eax
movl %eax, -0x3b4(%rbp)
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x6920a
movq -0x120(%rbp), %rdi
callq 0x102b0
movq %rax, -0x348(%rbp)
movb $0x1, -0x2d1(%rbp)
callq 0x10d40
jmp 0x691e1
jmp 0x691e3
testb $0x1, -0x2d1(%rbp)
jne 0x6937c
leaq 0x625be(%rip), %rsi     # 0xcb7b5
leaq -0x2d0(%rbp), %rdi
callq 0x10b40
jmp 0x69205
jmp 0x69383
movl -0x3b4(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x692e1
movq -0x120(%rbp), %rdi
callq 0x102b0
movq %rax, -0x320(%rbp)
leaq 0x62505(%rip), %rsi     # 0xcb73c
leaq -0x2d0(%rbp), %rdi
callq 0x10b40
jmp 0x69245
movq -0x320(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rax), %rsi
leaq -0x340(%rbp), %rdi
callq 0x39c70
jmp 0x69261
leaq -0x2d0(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0x10a70
jmp 0x69276
leaq -0x340(%rbp), %rdi
callq 0x10fc8
leaq 0x66e78(%rip), %rsi     # 0xd0101
leaq -0x2d0(%rbp), %rdi
callq 0x10700
jmp 0x69297
movq -0x320(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
leaq -0x2d0(%rbp), %rdi
callq 0x10700
jmp 0x692b8
leaq 0x607c3(%rip), %rsi     # 0xc9a82
leaq -0x2d0(%rbp), %rdi
callq 0x10700
jmp 0x692cd
movl $0x2, -0x314(%rbp)
callq 0x10d40
jmp 0x6936e
movq -0x120(%rbp), %rdi
callq 0x102b0
leaq 0x623be(%rip), %rsi     # 0xcb6b2
leaq -0x2d0(%rbp), %rdi
callq 0x10b40
jmp 0x69302
movl $0x2, -0x314(%rbp)
callq 0x10d40
jmp 0x69333
jmp 0x69315
jmp 0x691e3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
callq 0x10d40
jmp 0x69335
jmp 0x69383
jmp 0x694b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x69370
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x10fc8
jmp 0x69370
jmp 0x69383
callq 0x10d40
jmp 0x69377
jmp 0x694b6
jmp 0x69431
jmp 0x69383
leaq -0x350(%rbp), %rdi
callq 0x84210
jmp 0x69391
leaq -0x2d0(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0x621f3(%rip), %rdx     # 0xcb59a
leaq -0x358(%rbp), %rdi
movl $0x1, %esi
movl $0x80, %ecx
callq 0x80580
jmp 0x693bf
leaq -0x358(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0x7d370
jmp 0x693d4
leaq -0x358(%rbp), %rdi
callq 0x80600
leaq -0x350(%rbp), %rdi
callq 0x1d500
jmp 0x69431
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
jmp 0x69420
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x120(%rbp)
movl %eax, -0x124(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x80600
leaq -0x350(%rbp), %rdi
callq 0x1d500
jmp 0x694b6
leaq -0x2d0(%rbp), %rdi
callq 0x39ed0
leaq -0x2a8(%rbp), %rdi
callq 0x4c380
leaq -0x1a0(%rbp), %rdi
callq 0x6e5d0
leaq -0x180(%rbp), %rdi
callq 0x4c380
leaq -0xf0(%rbp), %rax
movq %rax, -0x3c8(%rbp)
addq $0xe0, %rax
movq %rax, -0x3c0(%rbp)
movq -0x3c0(%rbp), %rdi
addq $-0x70, %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x38ed0
movq -0x3c8(%rbp), %rcx
movq -0x3d0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3c0(%rbp)
jne 0x6947c
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbp
retq
leaq -0x2d0(%rbp), %rdi
callq 0x39ed0
leaq -0x2a8(%rbp), %rdi
callq 0x4c380
leaq -0x1a0(%rbp), %rdi
callq 0x6e5d0
leaq -0x180(%rbp), %rdi
callq 0x4c380
leaq -0xf0(%rbp), %rax
movq %rax, -0x3e0(%rbp)
addq $0xe0, %rax
movq %rax, -0x3d8(%rbp)
movq -0x3d8(%rbp), %rdi
addq $-0x70, %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x38ed0
movq -0x3e0(%rbp), %rcx
movq -0x3e8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3d8(%rbp)
jne 0x69501
jmp 0x69534
movq -0x120(%rbp), %rdi
callq 0x10e00
movq %rax, %rdi
callq 0x1dfc0
nopl (%rax,%rax)