// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movq %rdi, %r14
addq $0x8, %rbx
movl $0x1, 0x8(%rsp)
movl $0x6, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, 0x20(%rsp)
movq %r14, 0x40(%rsp)
movl (%r14), %ebp
cmpl $0x2, %ebp
jl 0x10b62
movl $0x1, %r13d
movq %rbx, %r14
movl $0x1, 0x8(%rsp)
movl %ebp, 0x1c(%rsp)
movq (%r14), %r12
movq %r12, %rdi
leaq 0xa435(%rip), %rsi      # 0x1abf5
callq 0x3440
testl %eax, %eax
je 0x10b6d
movl %r13d, 0xc(%rsp)
movq %r14, 0x28(%rsp)
movq %r12, %rdi
movl $0x3d, %esi
callq 0x3260
movq %rax, %r14
testq %rax, %rax
jne 0x107f3
cmpb $0x2d, (%r12)
jne 0x10861
movb (%r12), %r15b
cmpb $0x2d, %r15b
jne 0x10818
movsbq 0x1(%r12), %r13
testq %r13, %r13
je 0x10861
callq 0x37a0
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r13,2)
jne 0x10861
cmpq %r12, %r14
jbe 0x10849
movq %r12, %r13
movzbl (%r13), %eax
cmpl $0x2d, %eax
je 0x10841
cmpl $0x5f, %eax
je 0x10841
movsbq %al, %rbp
callq 0x37a0
movq (%rax), %rax
testb $0x8, (%rax,%rbp,2)
je 0x10861
incq %r13
cmpq %r14, %r13
jne 0x10820
xorl %eax, %eax
cmpb $0x2d, %r15b
sete %cl
testq %r14, %r14
je 0x1088d
movb $0x0, (%r14)
leaq 0x1(%r14), %rbp
jmp 0x1088f
cmpl $0x0, 0x34(%rsp)
movl 0x1c(%rsp), %ebp
jne 0x10b7b
movq 0x28(%rsp), %r14
movq (%r14), %rax
movq %rax, (%rbx)
addq $0x8, %rbx
incl 0x8(%rsp)
movl 0xc(%rsp), %r13d
jmp 0x10aff
xorl %ebp, %ebp
movl 0xc(%rsp), %r13d
movb %cl, %al
addq %rax, %r12
movq 0x38(%rsp), %r15
testq %r15, %r15
je 0x10a97
movq (%r15), %rdi
testq %rdi, %rdi
je 0x108c5
movq %r12, %rsi
callq 0x3440
testl %eax, %eax
je 0x108c8
movq 0x10(%r15), %rdi
addq $0x10, %r15
jmp 0x108aa
xorl %r15d, %r15d
testq %r15, %r15
jne 0x108ef
leaq 0xa418(%rip), %rdi      # 0x1acec
movq %r12, %rsi
callq 0x3440
testl %eax, %eax
movl $0x0, %r15d
leaq 0x16445(%rip), %rax     # 0x26d30
cmoveq %rax, %r15
testq %r15, %r15
jne 0x10905
leaq 0xa2fd(%rip), %rdi      # 0x1abf8
movq %r12, %rsi
xorl %eax, %eax
callq 0xb8d7
movl 0x8(%r15), %eax
movl $0xb7, %ecx
andl %ecx, %eax
cmpl $0xf, %eax
jg 0x10978
cmpl $0x1, %eax
je 0x109d4
cmpl $0x2, %eax
je 0x10a2e
cmpl $0x4, %eax
jne 0x10a22
testq %rbp, %rbp
jne 0x10946
leaq 0xa321(%rip), %rdi      # 0x1ac5d
movq %r12, %rsi
xorl %eax, %eax
callq 0xb8d7
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
movl $0xa, %edx
callq 0x3490
cmpb $0x0, (%rbp)
je 0x1096c
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x10a92
leaq 0xa0e5(%rip), %rdi      # 0x1aa58
jmp 0x10a85
cmpl $0x10, %eax
je 0x109e6
cmpl $0x20, %eax
je 0x10a46
cmpl $0x80, %eax
jne 0x10a22
testq %rbp, %rbp
jne 0x109a7
leaq 0xa304(%rip), %rdi      # 0x1aca1
movq %r12, %rsi
xorl %eax, %eax
callq 0xb8d7
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3160
cmpb $0x0, (%rbp)
je 0x109c8
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x10a92
leaq 0xa1d7(%rip), %rdi      # 0x1aba6
jmp 0x10a85
testq %rbp, %rbp
je 0x10a92
leaq 0xa22e(%rip), %rdi      # 0x1ac12
jmp 0x10a3a
testq %rbp, %rbp
jne 0x109fc
leaq 0xa28c(%rip), %rdi      # 0x1ac7e
movq %r12, %rsi
xorl %eax, %eax
callq 0xb8d7
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x3160
cmpb $0x0, (%rbp)
je 0x10a19
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x10a92
leaq 0xa100(%rip), %rdi      # 0x1ab20
jmp 0x10a85
movq (%r15), %rsi
leaq 0xa299(%rip), %rdi      # 0x1acc5
jmp 0x10a3d
testq %rbp, %rbp
jne 0x10a92
leaq 0xa1ff(%rip), %rdi      # 0x1ac39
movq %r12, %rsi
xorl %eax, %eax
callq 0xb8d7
jmp 0x10a92
testq %rbp, %rbp
jne 0x10a5c
leaq 0xa20b(%rip), %rdi      # 0x1ac5d
movq %r12, %rsi
xorl %eax, %eax
callq 0xb8d7
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
movl $0xa, %edx
callq 0x3460
cmpb $0x0, (%rbp)
je 0x10a7e
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x10a92
leaq 0xa06f(%rip), %rdi      # 0x1aaf4
movq %r12, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0xb8d7
movq 0x38(%rsp), %r15
testq %rbp, %rbp
leaq 0xb527(%rip), %rax      # 0x1bfc8
cmoveq %rax, %rbp
testq %r15, %r15
movq 0x20(%rsp), %rdi
je 0x10ae2
movq (%r15), %rdi
testq %rdi, %rdi
je 0x10acd
movq %r12, %rsi
callq 0x3440
testl %eax, %eax
je 0x10ad0
movq 0x10(%r15), %rdi
addq $0x10, %r15
jmp 0x10ab2
xorl %r15d, %r15d
testq %r15, %r15
je 0x10add
movl 0x8(%r15), %eax
testb $0x40, %al
jne 0x10b11
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0xc04f
testq %r14, %r14
je 0x10af6
movb $0x3d, (%r14)
movl 0x1c(%rsp), %ebp
movq 0x28(%rsp), %r14
addq $0x8, %r14
incl %r13d
cmpl %ebp, %r13d
jne 0x107b3
jmp 0x10b76
andl $0xb7, %eax
cmpl $0x2, %eax
jne 0x10b45
movq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0xc2ba
movq %rax, %r15
movq %rbp, %rdi
callq 0x6d49
testq %r15, %r15
je 0x10b55
movq %r15, %rdi
movq %rax, %rsi
callq 0x66cd
jmp 0x10aed
leaq 0xa1a8(%rip), %rdi      # 0x1acf4
xorl %eax, %eax
callq 0xb8d7
jmp 0x10aed
movq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
jmp 0x10ae8
movq %rbx, %r14
movl $0x1, %r13d
jmp 0x10b85
addq $0x8, %r14
incl %r13d
jmp 0x10b85
movl %ebp, %r13d
jmp 0x10b85
movq 0x28(%rsp), %r14
movl 0xc(%rsp), %r13d
movl %ebp, %eax
subl %r13d, %eax
jle 0x10bad
movl 0x8(%rsp), %ecx
addl %ebp, %ecx
subl %r13d, %ecx
movl %ecx, 0x8(%rsp)
xorl %ecx, %ecx
movq (%r14,%rcx,8), %rdx
movq %rdx, (%rbx)
addq $0x8, %rbx
incq %rcx
cmpl %ecx, %eax
jne 0x10b9b
movq 0x40(%rsp), %rax
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
movq $0x0, (%rbx)
movq 0x20(%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq