// File: Alcaro[P]bridges/arlib/argparse.cpp
// Function: argparse::single_arg(argparse::arg_base&, char const*, argparse::arglevel_t, bool*)
void argparse::single_arg(arg_base& arg, const char * value, arglevel_t arglevel, bool* used_value)
{
	if (!arg.can_use)
	{
		if (arg.name) error("can't use --"+arg.name+" more than once");
		else error("can't use more than one non-argument");
	}
	if (!arg.can_use_multi) arg.can_use = false;
	arg.must_use = false;
	
	if (used_value) *used_value = false;
	
	if (!value && !arg.accept_no_value) error("missing argument for --"+arg.name);
	if (arglevel == al_mandatory && !arg.accept_value) error("--"+arg.name+" doesn't allow an argument");
	
	if (value && arg.accept_value && (!arg.accept_no_value || arglevel > al_loose))
	{
		if (!arg.parse(true, value)) error("invalid value for --"+arg.name);
		if (used_value) *used_value = true;
	}
	else
	{
		arg.parse(false, "");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x10(%rbp), %rax
testb $0x1, 0x1c(%rax)
jne 0x4c08
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x5720
testb $0x1, %al
jne 0x4b6a
jmp 0x4be2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
leaq -0x58(%rbp), %rdi
leaq 0x5e480(%rip), %rsi     # 0x63011
callq 0x57e0
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq 0x5e479(%rip), %rdx     # 0x6301e
callq 0x5790
movq -0x140(%rbp), %rdi
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x4a90
leaq -0x48(%rbp), %rdi
callq 0x5870
leaq -0x58(%rbp), %rdi
callq 0x5870
jmp 0x4c06
leaq -0x78(%rbp), %rdi
leaq 0x5e441(%rip), %rsi     # 0x6302e
callq 0x5890
movq -0x140(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x4a90
jmp 0x4c08
movq -0x10(%rbp), %rax
testb $0x1, 0x1d(%rax)
jne 0x4c1a
movq -0x10(%rbp), %rax
movb $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x1b(%rax)
cmpq $0x0, -0x28(%rbp)
je 0x4c30
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0x18(%rbp)
jne 0x4cbc
movq -0x10(%rbp), %rax
testb $0x1, 0x19(%rax)
jne 0x4cbc
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0xa8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0xa8(%rbp), %rdx
movq -0xa0(%rbp), %rcx
leaq -0x98(%rbp), %rdi
leaq 0x5e3d8(%rip), %rsi     # 0x63053
callq 0x57e0
movq -0x140(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0x4a90
leaq -0x98(%rbp), %rdi
callq 0x5870
cmpl $0x3, -0x1c(%rbp)
jne 0x4d77
movq -0x10(%rbp), %rax
testb $0x1, 0x1a(%rax)
jne 0x4d77
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0xe8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0xe8(%rbp), %rdx
movq -0xe0(%rbp), %rcx
leaq -0xd8(%rbp), %rdi
leaq 0x5e3a3(%rip), %rsi     # 0x630ad
callq 0x57e0
leaq -0xc8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq 0x5e347(%rip), %rdx     # 0x6306b
callq 0x5790
movq -0x140(%rbp), %rdi
movq -0xc8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
callq 0x4a90
leaq -0xc8(%rbp), %rdi
callq 0x5870
leaq -0xd8(%rbp), %rdi
callq 0x5870
cmpq $0x0, -0x18(%rbp)
je 0x4e6f
movq -0x10(%rbp), %rax
testb $0x1, 0x1a(%rax)
je 0x4e6f
movq -0x10(%rbp), %rax
testb $0x1, 0x19(%rax)
je 0x4da4
cmpl $0x1, -0x1c(%rbp)
jle 0x4e6f
movq -0x10(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x18(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x58c0
movq -0x148(%rbp), %rdi
movq -0xf8(%rbp), %rdx
movq -0xf0(%rbp), %rcx
movq (%rdi), %rax
movl $0x1, %esi
callq *(%rax)
testb $0x1, %al
jne 0x4e5f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x128(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x120(%rbp)
movq -0x128(%rbp), %rdx
movq -0x120(%rbp), %rcx
leaq -0x118(%rbp), %rdi
leaq 0x5e26e(%rip), %rsi     # 0x63086
callq 0x57e0
movq -0x140(%rbp), %rdi
movq -0x118(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0x4a90
leaq -0x118(%rbp), %rdi
callq 0x5870
cmpq $0x0, -0x28(%rbp)
je 0x4e6d
movq -0x28(%rbp), %rax
movb $0x1, (%rax)
jmp 0x4ea9
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0x138(%rbp), %rdi
leaq 0x615c1(%rip), %rsi     # 0x66449
callq 0x58c0
movq -0x150(%rbp), %rdi
movq -0x138(%rbp), %rdx
movq -0x130(%rbp), %rcx
movq (%rdi), %rax
xorl %esi, %esi
callq *(%rax)
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw %cs:(%rax,%rax)