// File: /workspace/github_cpp_makefile_star2_O2/AndreRenaud[P]simple_options/simple_options_test.c
// Function: combined
static void combined(void)
{
	const char *file = NULL;
	int64_t val = 5;
	bool flag = false;
	struct option_entry entries[] = {
		{"file", 'f', "File to load", OPTION_FLAG_string, .string = &file},
		{"number", 'n', "Number", OPTION_FLAG_int, .integer = &val},
		{"bool", 'b', "Boolean", OPTION_FLAG_bool, .boolean = &flag},
		{NULL, 0},
	};
	char input[] = {"program -f fnord --number=4 --bool=on -n7"};
	const char *argv[10];
	int argc;
	argc = opt_parse_split_string(input, argv, 10);
	TEST_CHECK(argc == 6);
	TEST_CHECK(opt_parse(argc, argv, entries) >= 0);
	TEST_CHECK(file && strcmp(file, "fnord") == 0);
	TEST_CHECK(val == 7);
	TEST_CHECK(entries[0].present);
	TEST_CHECK(flag == true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
leaq 0x18(%rsp), %rax
andq $0x0, (%rax)
movq %rax, %rsi
leaq 0x10(%rsp), %rax
movq $0x5, (%rax)
xorl %ebx, %ebx
leaq 0xf(%rsp), %rcx
movb %bl, (%rcx)
leaq 0x2932(%rip), %rdx      # 0x7036
leaq 0xa0(%rsp), %r14
movq %rdx, (%r14)
movb $0x66, 0x8(%r14)
leaq 0x20fa(%rip), %rdx      # 0x6815
movq %rdx, 0x10(%r14)
movl $0x4, 0x18(%r14)
movq %rsi, 0x20(%r14)
movb %bl, 0x28(%r14)
leaq 0x212b(%rip), %rdx      # 0x6861
movq %rdx, 0x30(%r14)
movb $0x6e, 0x38(%r14)
leaq 0x20dc(%rip), %rdx      # 0x6822
movq %rdx, 0x40(%r14)
movl $0x2, 0x48(%r14)
movq %rax, 0x50(%r14)
movb %bl, 0x58(%r14)
leaq 0x2109(%rip), %rax      # 0x686a
movq %rax, 0x60(%r14)
movb $0x62, 0x68(%r14)
leaq 0x20b8(%rip), %rax      # 0x6829
movq %rax, 0x70(%r14)
movl $0x1, 0x78(%r14)
movq %rcx, 0x80(%r14)
movb %bl, 0x88(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%r14)
movaps %xmm0, 0xa0(%r14)
movaps %xmm0, 0xb0(%r14)
movups 0x2bbd(%rip), %xmm0     # 0x736a
leaq 0x20(%rsp), %rdi
movups %xmm0, 0x1a(%rdi)
movaps 0x2ba3(%rip), %xmm0     # 0x7360
movaps %xmm0, 0x10(%rdi)
movaps 0x2b88(%rip), %xmm0     # 0x7350
movaps %xmm0, (%rdi)
leaq 0x50(%rsp), %r15
pushq $0xa
popq %rdx
movq %r15, %rsi
callq 0x2944
movl %eax, %ebp
xorl %edi, %edi
cmpl $0x6, %eax
sete %dil
leaq 0x209a(%rip), %r12      # 0x6887
leaq 0x1861(%rip), %r13      # 0x6055
leaq 0x233a(%rip), %r8       # 0x6b35
pushq $0x57
popq %rdx
movq %r12, %rsi
movq %r13, %rcx
xorl %eax, %eax
callq 0x29b8
movl %ebp, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x253c
notl %eax
shrl $0x1f, %eax
leaq 0x231b(%rip), %r8       # 0x6b3f
pushq $0x58
popq %rdx
movl %eax, %edi
movq %r12, %rsi
movq %r13, %rcx
xorl %eax, %eax
callq 0x29b8
leaq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4856
leaq 0x200f(%rip), %rsi      # 0x6859
callq 0x2190
xorl %ebx, %ebx
testl %eax, %eax
sete %bl
leaq 0x202a(%rip), %r15      # 0x6887
leaq 0x17f1(%rip), %r14      # 0x6055
leaq 0x2054(%rip), %r8       # 0x68bf
pushq $0x59
popq %rdx
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x29b8
xorl %edi, %edi
cmpq $0x7, 0x10(%rsp)
sete %dil
leaq 0x207e(%rip), %r8       # 0x690e
pushq $0x5a
popq %rdx
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x29b8
movzbl 0xc8(%rsp), %edi
leaq 0x22b4(%rip), %r8       # 0x6b63
pushq $0x5b
popq %rdx
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x29b8
movzbl 0xf(%rsp), %edi
leaq 0x215b(%rip), %r8       # 0x6a26
pushq $0x5c
popq %rdx
movq %r15, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x29b8
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq