// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/options.c
// Function: parseOptions
static struct hash *parseOptions(int *pArgc, char *argv[], boolean justFirst,
                                 struct optionSpec *optionSpecs)
/* Parse and optionally validate options */
{
int i, origArgc, newArgc = 1;
char **rdPt = argv+1, **wrPt = argv+1;
struct hash *hash = newHash(6);

origArgc = *pArgc;

/* parse arguments */
for (i=1; i<origArgc; ++i)
    {
    if (sameString(*rdPt, "--"))
        {
        rdPt++;
        i++;
        break;
        }
    if (!parseAnOption(hash, *rdPt, optionSpecs))
        {
        /* not an option */
        if (justFirst)
            break;
        *wrPt++ = *rdPt;
        newArgc++;
        }
    rdPt++;
    }

/* copy any remaining positional args */
for (; i<origArgc; ++i)
    {
    *wrPt++ = *rdPt++;
    newArgc++;
    }

*pArgc = newArgc;
*wrPt = NULL; 
return hash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq %rsi, %r13
movq %rdi, %rbx
addq $0x8, %r13
pushq $0x6
popq %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0xb010
movq %rbx, 0x40(%rsp)
movl (%rbx), %esi
cmpl $0x2, %esi
movl %ebp, %ecx
cmovgel %esi, %ecx
movl %ecx, 0x30(%rsp)
movq %rax, %r12
movq %r13, %rdi
movl %ebp, 0x24(%rsp)
movl %esi, 0x8(%rsp)
cmpl %esi, %ebp
jge 0xf107
movq %r12, %r14
movq (%r13), %rbx
movb (%rbx), %r12b
cmpb $0x2d, %r12b
jne 0xedc3
cmpb $0x2d, 0x1(%rbx)
jne 0xedc3
cmpb $0x0, 0x2(%rbx)
je 0xf124
movl %ebp, 0xc(%rsp)
movq %rdi, 0x28(%rsp)
movq %r13, 0x10(%rsp)
movq %rbx, %rdi
pushq $0x3d
popq %rsi
callq 0x3260
movq %rax, %r15
testq %rax, %rax
je 0xedef
cmpb $0x2d, %r12b
je 0xedf5
xorl %r12d, %r12d
jmp 0xee1c
cmpb $0x2d, %r12b
jne 0xee4a
movsbq 0x1(%rbx), %r12
testq %r12, %r12
je 0xee4a
callq 0x37a0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
jne 0xee4a
pushq $0x1
popq %r12
testq %r15, %r15
je 0xef20
movq %rbx, %r13
cmpq %r15, %r13
jae 0xee76
movzbl (%r13), %eax
cmpl $0x2d, %eax
je 0xee45
cmpl $0x5f, %eax
je 0xee45
movsbq %al, %rbp
callq 0x37a0
movq (%rax), %rax
testb $0x8, (%rax,%rbp,2)
je 0xee4a
incq %r13
jmp 0xee1f
cmpl $0x0, 0x34(%rsp)
jne 0xf10d
movq 0x28(%rsp), %rdi
movq %rbx, (%rdi)
addq $0x8, %rdi
incl 0x24(%rsp)
movq %r14, %r12
movq 0x10(%rsp), %r13
movl 0x8(%rsp), %esi
jmp 0xf0ab
movb $0x0, (%r15)
leaq 0x1(%r15), %r13
addq %r12, %rbx
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0xef07
movq %rbx, %rdi
callq 0xf24f
testq %rax, %rax
movq %r14, %r12
jne 0xeeb3
movq %rbx, %rdi
leaq 0x1770b(%rip), %rsi     # 0x265b0
callq 0xf24f
testq %rax, %rax
je 0xf16a
movl 0x8(%rax), %ecx
movl %ecx, %edx
andb $-0x49, %dl
negb %dl
jo 0xf017
andl $0xb7, %ecx
cmpl $0x2, %ecx
je 0xefff
cmpl $0x4, %ecx
je 0xef28
cmpl $0x10, %ecx
je 0xefb6
cmpl $0x20, %ecx
je 0xef6f
cmpl $0x1, %ecx
jne 0xeff3
testq %r13, %r13
je 0xf05f
leaq 0x9d1d(%rip), %rdi      # 0x18c1f
jmp 0xf00b
testq %r13, %r13
leaq 0xb0c4(%rip), %rax      # 0x19fd5
cmoveq %rax, %r13
movq %r14, %r12
movq %r14, %rdi
jmp 0xf089
xorl %r13d, %r13d
jmp 0xee7e
testq %r13, %r13
jne 0xef3e
leaq 0x9d36(%rip), %rdi      # 0x18c6a
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x3490
cmpb $0x0, (%r13)
je 0xef63
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
je 0xf05f
leaq 0x9afe(%rip), %rdi      # 0x18a68
jmp 0xf052
testq %r13, %r13
jne 0xef85
leaq 0x9cef(%rip), %rdi      # 0x18c6a
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x3460
cmpb $0x0, (%r13)
je 0xefaa
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
je 0xf05f
leaq 0x9b53(%rip), %rdi      # 0x18b04
jmp 0xf052
testq %r13, %r13
jne 0xefcc
leaq 0x9cc9(%rip), %rdi      # 0x18c8b
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
callq 0x3160
cmpb $0x0, (%r13)
je 0xefea
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
je 0xf05f
leaq 0x9b3f(%rip), %rdi      # 0x18b30
jmp 0xf052
movq (%rax), %rsi
leaq 0x9cd5(%rip), %rdi      # 0x18cd2
jmp 0xf00e
testq %r13, %r13
jne 0xf05f
leaq 0x9c3b(%rip), %rdi      # 0x18c46
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f
jmp 0xf05f
testq %r13, %r13
jne 0xf02d
leaq 0x9c8b(%rip), %rdi      # 0x18cae
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
callq 0x3160
cmpb $0x0, (%r13)
je 0xf04b
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
je 0xf05f
leaq 0x9b64(%rip), %rdi      # 0x18bb6
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0xa61f
testq %r13, %r13
leaq 0xaf6c(%rip), %rax      # 0x19fd5
cmoveq %rax, %r13
movq %rbx, %rdi
movq 0x38(%rsp), %rsi
callq 0xf24f
testq %rax, %rax
je 0xf086
movl 0x8(%rax), %eax
testb $0x40, %al
jne 0xf0ba
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0xad17
movq 0x10(%rsp), %r13
testq %r15, %r15
je 0xf0a2
movb $0x3d, (%r15)
movl 0x8(%rsp), %esi
movq 0x28(%rsp), %rdi
movl 0xc(%rsp), %ebp
addq $0x8, %r13
incl %ebp
jmp 0xed9b
andl $0xb7, %eax
cmpl $0x2, %eax
jne 0xf0ec
movq %r12, %rdi
movq %rbx, %rsi
callq 0xaf0d
movq %rax, %r14
movq %r13, %rdi
callq 0x6692
testq %r14, %r14
je 0xf0fc
movq %r14, %rdi
movq %rax, %rsi
callq 0x60da
jmp 0xf094
leaq 0x9c0e(%rip), %rdi      # 0x18d01
xorl %eax, %eax
callq 0xa61f
jmp 0xf094
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
jmp 0xf08f
movl 0x30(%rsp), %ebp
jmp 0xf12d
movl 0xc(%rsp), %ebp
movq %r14, %r12
movq 0x10(%rsp), %r13
movl 0x8(%rsp), %esi
movq 0x28(%rsp), %rdi
jmp 0xf12d
addq $0x8, %r13
incl %ebp
movq %r14, %r12
movl %ebp, %ecx
xorl %eax, %eax
leal (%rcx,%rax), %edx
cmpl %esi, %edx
jge 0xf146
movq (%r13,%rax,8), %rdx
movq %rdx, (%rdi,%rax,8)
incq %rax
jmp 0xf131
movl 0x24(%rsp), %edx
addl %eax, %edx
movq 0x40(%rsp), %rcx
movl %edx, (%rcx)
andq $0x0, (%rdi,%rax,8)
movq %r12, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9a94(%rip), %rdi      # 0x18c05
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa61f