// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiParseInputAbort
void cgiParseInputAbort(char *input, struct hash **retHash,
        struct cgiVar **retList)
/* Parse cgi-style input into a hash table and list.  This will alter
 * the input data.  The hash table will contain references back
 * into input, so please don't free input until you're done with
 * the hash. Prints message aborts if there's an error.
 * To clean up - slFreeList, hashFree, and only then free input. */
{
char *namePt, *dataPt, *nextNamePt;
struct hash *hash = *retHash;
struct cgiVar *list = *retList, *el;

if (!hash)
  hash = newHash(6);
slReverse(&list);

namePt = input;
while (namePt != NULL && namePt[0] != 0)
    {
    dataPt = strchr(namePt, '=');
    if (dataPt == NULL)
	{
	errAbort("Mangled CGI input string %s", namePt);
	}
    *dataPt++ = 0;
    nextNamePt = strchr(dataPt, '&');
    if (nextNamePt == NULL)
	nextNamePt = strchr(dataPt, ';');	/* Accomodate DAS. */
    if (nextNamePt != NULL)
         *nextNamePt++ = 0;
    cgiDecode(namePt,namePt,strlen(namePt));	/* for unusual ct names */
    cgiDecode(dataPt,dataPt,strlen(dataPt));
    AllocVar(el);
    el->val = dataPt;
    slAddHead(&list, el);
    hashAddSaveName(hash, namePt, el, &el->name);
    namePt = nextNamePt;
    }
slReverse(&list);
*retList = list;
*retHash = hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1bde4
movl $0x6, %edi
movl $0x1, %esi
callq 0x10f70
movq %rax, -0x38(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7bb0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x49(%rbp)
je 0x1be11
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x1be1d
jmp 0x1bf3b
movq -0x20(%rbp), %rdi
movl $0x3d, %esi
callq 0x3250
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1be48
movq -0x20(%rbp), %rsi
leaq 0xa9c5(%rip), %rdi      # 0x26806
movb $0x0, %al
callq 0xfd50
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x28(%rbp), %rdi
movl $0x26, %esi
callq 0x3250
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x1be85
movq -0x28(%rbp), %rdi
movl $0x3b, %esi
callq 0x3250
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1be9e
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0x31f0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movl %eax, %edx
callq 0x1bf60
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x31f0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movl %eax, %edx
callq 0x1bf60
movl $0x20, %edi
callq 0x152f0
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x1c050
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x48(%rbp), %rcx
addq $0x8, %rcx
callq 0x10b20
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x1bdf5
leaq -0x40(%rbp), %rdi
callq 0x7bb0
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
addq $0x70, %rsp
popq %rbp
retq