// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/options.c
// Function: validateOption
static void validateOption(char *name, char *val, struct optionSpec *optionSpecs)
/* validate an option against a list of values */
{
char *valEnd;
struct optionSpec *optionSpec = matchingOption(name, optionSpecs);
if (optionSpec == NULL)
    optionSpec = matchingOption(name, commonOptions);
if (optionSpec == NULL)
    errAbort("-%s is not a valid option", name);

switch (optionSpec->flags & OPTION_TYPE_MASK) {
case OPTION_BOOLEAN:
    if (val != NULL)
        errAbort("boolean option -%s must not have value", name);
    break;
case OPTION_STRING:
    if (val == NULL)
        errAbort("string option -%s must have a value", name);
    break;
case OPTION_INT:
    if (val == NULL)
        errAbort("int option -%s must have a value", name);
    (void) strtol(val, &valEnd, 10);  // ignore return
    if ((*val == '\0') || (*valEnd != '\0'))
        errAbort("value of -%s is not a valid integer: \"%s\"",
                 name, val);
    break;
case OPTION_LONG_LONG:
    if (val == NULL)
        errAbort("int option -%s must have a value", name);
    (void) strtoll(val, &valEnd, 10);  // ignore return
    if ((*val == '\0') || (*valEnd != '\0'))
        errAbort("value of -%s is not a valid long long: \"%s\"",
                 name, val);
    break;
case OPTION_FLOAT:
    if (val == NULL)
        errAbort("float option -%s must have a value", name);
    (void) (long long)strtod(val, &valEnd);  // ignore return
    if ((*val == '\0') || (*valEnd != '\0'))
        errAbort("value of -%s is not a valid float: \"%s\"",
                 name, val);
    break;
case OPTION_DOUBLE:
    if (val == NULL)
        errAbort("double option -%s must have a value", name);
    (void) (long long)strtod(val, &valEnd);  // ignore return
    if ((*val == '\0') || (*valEnd != '\0'))
        errAbort("value of -%s is not a valid double: \"%s\"",
                 name, val);
    break;
default:
    errAbort("bug: invalid type in optionSpec for %s", optionSpec->name);
}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x499c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4a100
movq -0x8(%rbp), %rdi
leaq 0xbcca9(%rip), %rsi     # 0x106da0
callq 0x499c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4a119
movq -0x8(%rbp), %rsi
leaq 0x92eeb(%rip), %rdi     # 0xdcffd
movb $0x0, %al
callq 0x35d40
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
andl $0xb7, %eax
movl %eax, -0x2c(%rbp)
subl $0x1, %eax
je 0x4a172
jmp 0x4a12f
movl -0x2c(%rbp), %eax
subl $0x2, %eax
je 0x4a190
jmp 0x4a139
movl -0x2c(%rbp), %eax
subl $0x4, %eax
je 0x4a1ae
jmp 0x4a143
movl -0x2c(%rbp), %eax
subl $0x10, %eax
je 0x4a26a
jmp 0x4a151
movl -0x2c(%rbp), %eax
subl $0x20, %eax
je 0x4a20c
jmp 0x4a15f
movl -0x2c(%rbp), %eax
subl $0x80, %eax
je 0x4a2c0
jmp 0x4a316
cmpq $0x0, -0x10(%rbp)
je 0x4a18b
movq -0x8(%rbp), %rsi
leaq 0x92e93(%rip), %rdi     # 0xdd017
movb $0x0, %al
callq 0x35d40
jmp 0x4a32b
cmpq $0x0, -0x10(%rbp)
jne 0x4a1a9
movq -0x8(%rbp), %rsi
leaq 0x92e9c(%rip), %rdi     # 0xdd03e
movb $0x0, %al
callq 0x35d40
jmp 0x4a32b
cmpq $0x0, -0x10(%rbp)
jne 0x4a1c7
movq -0x8(%rbp), %rsi
leaq 0x92ea2(%rip), %rdi     # 0xdd062
movb $0x0, %al
callq 0x35d40
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x6a50
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a1f1
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a207
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x92c5d(%rip), %rdi     # 0xdce5d
movb $0x0, %al
callq 0x35d40
jmp 0x4a32b
cmpq $0x0, -0x10(%rbp)
jne 0x4a225
movq -0x8(%rbp), %rsi
leaq 0x92e44(%rip), %rdi     # 0xdd062
movb $0x0, %al
callq 0x35d40
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x6130
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a24f
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a265
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x92c9b(%rip), %rdi     # 0xdcef9
movb $0x0, %al
callq 0x35d40
jmp 0x4a32b
cmpq $0x0, -0x10(%rbp)
jne 0x4a283
movq -0x8(%rbp), %rsi
leaq 0x92e07(%rip), %rdi     # 0xdd083
movb $0x0, %al
callq 0x35d40
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6500
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a2a8
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a2be
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x92c6e(%rip), %rdi     # 0xdcf25
movb $0x0, %al
callq 0x35d40
jmp 0x4a32b
cmpq $0x0, -0x10(%rbp)
jne 0x4a2d9
movq -0x8(%rbp), %rsi
leaq 0x92dd4(%rip), %rdi     # 0xdd0a6
movb $0x0, %al
callq 0x35d40
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6500
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a2fe
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x4a314
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x92c9e(%rip), %rdi     # 0xdcfab
movb $0x0, %al
callq 0x35d40
jmp 0x4a32b
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0x92da6(%rip), %rdi     # 0xdd0ca
movb $0x0, %al
callq 0x35d40
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)