LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r13
movq (%rsi), %r15
movq (%rdx), %rax
movq %rax, (%rsp)
testq %r15, %r15
jne 0x136fe
movl $0x6, %edi
movl $0x1, %esi
callq 0xc3f1
movq %rax, %r15
movq %rsp, %rdi
callq 0x673b
testq %r13, %r13
je 0x137e1
cmpb $0x0, (%r13)
je 0x137e1
movq %r13, %rdi
movl $0x3d, %esi
callq 0x3260
movq %rax, %rbp
testq %rax, %rax
jne 0x13740
leaq 0x8072(%rip), %rdi      # 0x1b7a8
movq %r13, %rsi
xorl %eax, %eax
callq 0xb8d7
movq %rbp, %rax
incq %rbp
movb $0x0, (%rax)
movq %rbp, %rdi
movl $0x26, %esi
callq 0x3260
movq %rax, %r12
testq %rax, %rax
jne 0x1376e
movq %rbp, %rdi
movl $0x3b, %esi
callq 0x3260
movq %rax, %r12
testq %r12, %r12
je 0x1377d
movb $0x0, (%r12)
incq %r12
jmp 0x13780
xorl %r12d, %r12d
movq %r13, %rdi
callq 0x3200
movq %r13, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x13805
movq %rbp, %rdi
callq 0x3200
movq %rbp, %rdi
movq %rbp, %rsi
movl %eax, %edx
callq 0x13805
movl $0x20, %edi
callq 0xf07d
movq %rbp, 0x10(%rax)
movq (%rsp), %rcx
movq %rcx, (%rax)
movq %rax, (%rsp)
leaq 0x8(%rax), %rcx
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0xc1a7
movq %r12, %r13
testq %r12, %r12
jne 0x1370f
movq %rsp, %r12
movq %r12, %rdi
callq 0x673b
movq (%r12), %rax
movq %rax, (%r14)
movq %r15, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiDecode
void cgiDecode(char *in, char *out, int inLength)
/* Decode from cgi pluses-for-spaces format to normal.
 * Out will be a little shorter than in typically, and
 * can be the same buffer. */
{
char c;
int i;
for (i=0; i<inLength;++i)
    {
    c = *in++;
    if (c == '+')
	*out++ = ' ';
    else if (c == '%')
	{
	int code;
        if (sscanf(in, "%2x", &code) != 1)
	    code = '?';
	in += 2;
	i += 2;
	*out++ = code;
	}
    else
	*out++ = c;
    }
*out++ = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testl %edx, %edx
jle 0x13881
movl %edx, %ebp
movq %rdi, %r12
leaq 0x7fcc(%rip), %r14      # 0x1b7ef
leaq 0x4(%rsp), %r15
xorl %r13d, %r13d
leaq 0x1(%r12), %rdi
movzbl (%r12), %eax
cmpl $0x25, %eax
je 0x13844
cmpl $0x2b, %eax
jne 0x13871
movb $0x20, (%rbx)
jmp 0x13873
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3530
cmpl $0x1, %eax
je 0x1385e
movl $0x3f, 0x4(%rsp)
addq $0x3, %r12
addl $0x2, %r13d
movb 0x4(%rsp), %al
movb %al, (%rbx)
movq %r12, %rdi
jmp 0x13873
movb %al, (%rbx)
incq %rbx
incl %r13d
movq %rdi, %r12
cmpl %ebp, %r13d
jl 0x1382b
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiParseInput
boolean cgiParseInput(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 and returns FALSE if there's an error.
 * To clean up - slFreeList, hashFree, and only then free input. */
{
boolean ok = TRUE;
int status = setjmp(cgiParseRecover);
if (status == 0)    /* Always true except after long jump. */
    {
    pushAbortHandler(cgiParseAbort);
    cgiParseInputAbort(input, retHash, retList);
    }
else    /* They long jumped here because of an error. */
    {
    ok = FALSE;
    }
popAbortHandler();
return ok;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x14958(%rip), %rdi     # 0x28200
callq 0x3410
xorl %ecx, %ecx
testl %eax, %eax
jne 0x138d2
leaq 0x2232(%rip), %rdi      # 0x15aec
callq 0xbab9
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x136c9
movl $0x1, %ecx
movl %ecx, %ebx
xorl %eax, %eax
callq 0xbb0c
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: initSigHandlers
void initSigHandlers(boolean dumpStack)
/* set handler for various terminal signals for logging purposes.
 * if dumpStack is TRUE, attempt to dump the stack. */
{
if (cgiIsOnWeb())
    {
    // SIGKILL is not trappable or ignorable
    signal(SIGTERM, catchSignal);
    signal(SIGHUP, catchSignal);
    signal(SIGABRT, catchSignal);
    signal(SIGSEGV, catchSignal);
    signal(SIGFPE, catchSignal);
    signal(SIGBUS, catchSignal);
    dumpStackOnSignal = dumpStack;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x7dc2(%rip), %rdi      # 0x1b6b2
callq 0x3040
testq %rax, %rax
je 0x13955
leaq -0x10090(%rip), %r14    # 0x3871
movl $0xf, %edi
movq %r14, %rsi
callq 0x3450
movl $0x1, %edi
movq %r14, %rsi
callq 0x3450
movl $0x6, %edi
movq %r14, %rsi
callq 0x3450
movl $0xb, %edi
movq %r14, %rsi
callq 0x3450
movl $0x8, %edi
movq %r14, %rsi
callq 0x3450
movl $0x7, %edi
movq %r14, %rsi
callq 0x3450
movl %ebx, 0x14973(%rip)     # 0x282c8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiEncode
char *cgiEncode(char *inString)
/* Return a cgi-encoded version of inString.
 * Alphanumerics kept as is, space translated to plus,
 * and all other characters translated to %hexVal. */
{
char c;
int outSize = 0;
char *outString, *out, *in;

if (inString == NULL)
    return(cloneString(""));

/* Count up how long it will be */
in = inString;
while ((c = *in++) != 0)
    {
    if (isalnum(c) || c == ' ' || c == '.' || c == '_')
        outSize += 1;
    else
        outSize += 3;
    }
outString = needMem(outSize+1);

/* Encode string */
in = inString;
out = outString;
while ((c = *in++) != 0)
    {
    if (isalnum(c) || c == '.' || c == '_')
        *out++ = c;
    else if (c == ' ')
        *out++ = '+';
    else
        {
        unsigned char uc = c;
        char buf[4];
        *out++ = '%';
        safef(buf, sizeof(buf), "%02X", uc);
        *out++ = buf[0];
        *out++ = buf[1];
        }
    }
*out++ = 0;
return outString;
}

// Assembly:
testq %rdi, %rdi
je 0x13a90
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x13a9c
callq 0x37a0
movq (%rax), %rax
leaq 0x1(%rbx), %rcx
xorl %edi, %edi
movabsq $-0x7fffffffffffbfff, %rdx # imm = 0x8000000000004001
movsbq %bpl, %rsi
movzwl (%rax,%rsi,2), %r8d
movl $0x1, %esi
testb $0x8, %r8b
jne 0x13a7f
movzbl %bpl, %r8d
addl $-0x20, %r8d
cmpl $0x3f, %r8d
ja 0x13a7a
btq %r8, %rdx
jb 0x13a7f
movl $0x3, %esi
addl %esi, %edi
movb (%rcx), %bpl
incq %rcx
testb %bpl, %bpl
jne 0x13a52
incl %edi
jmp 0x13aa1
leaq 0x622b(%rip), %rdi      # 0x19cc2
jmp 0x647e
movl $0x1, %edi
callq 0xf07d
movq %rax, %r14
movb (%rbx), %r12b
movq %rax, %rbp
testb %r12b, %r12b
je 0x13b32
callq 0x37a0
movq %rax, %r15
incq %rbx
leaq 0x4(%rsp), %r13
movq %r14, %rbp
movq (%r15), %rax
movsbq %r12b, %rcx
movzwl (%rax,%rcx,2), %eax
testb $0x8, %al
jne 0x13aea
cmpb $0x20, %r12b
je 0x13afe
movzbl %r12b, %ecx
cmpl $0x5f, %ecx
je 0x13aea
cmpl $0x2e, %ecx
jne 0x13b04
movb %r12b, (%rbp)
incq %rbp
movb (%rbx), %r12b
incq %rbx
testb %r12b, %r12b
jne 0x13ac7
jmp 0x13b32
movb $0x2b, (%rbp)
jmp 0x13aee
movb $0x25, (%rbp)
movq %r13, %rdi
movl $0x4, %esi
leaq 0x7cdc(%rip), %rdx      # 0x1b7f3
xorl %eax, %eax
callq 0xa2ce
movb 0x4(%rsp), %al
movb %al, 0x1(%rbp)
movb 0x5(%rsp), %al
movb %al, 0x2(%rbp)
addq $0x3, %rbp
jmp 0x13af1
movb $0x0, (%rbp)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiEncodeFull
char *cgiEncodeFull(char *inString)
/* Return a cgi-encoded version of inString (no + for space!).
 * Alphanumerics/./_ kept as is and all other characters translated to
 * %hexVal. */
{
char c;
int outSize = 0;
char *outString, *out, *in;

if (inString == NULL)
    return(cloneString(""));

/* Count up how long it will be */
in = inString;
while ((c = *in++) != 0)
    {
    if (isalnum(c) || c == '.' || c == '_')
        outSize += 1;
    else
        outSize += 3;
    }
outString = needMem(outSize+1);

/* Encode string */
in = inString;
out = outString;
while ((c = *in++) != 0)
    {
    if (isalnum(c) || c == '.' || c == '_')
        *out++ = c;
    else
        {
        unsigned char uc = c;
        char buf[4];
        *out++ = '%';
        safef(buf, sizeof(buf), "%02X", uc);
        *out++ = buf[0];
        *out++ = buf[1];
        }
    }
*out++ = 0;
return outString;
}

// Assembly:
testq %rdi, %rdi
je 0x13bb1
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x13bbd
callq 0x37a0
movq (%rax), %rax
leaq 0x1(%rbx), %rcx
xorl %edi, %edi
movl $0x1, %edx
movsbq %bpl, %rsi
xorl %r8d, %r8d
cmpb $0x2e, %sil
setne %r8b
addl %r8d, %r8d
orl %edx, %r8d
cmpb $0x5f, %sil
cmovel %edx, %r8d
movzwl (%rax,%rsi,2), %esi
testb $0x8, %sil
cmovnel %edx, %r8d
addl %r8d, %edi
movb (%rcx), %bpl
incq %rcx
testb %bpl, %bpl
jne 0x13b76
incl %edi
jmp 0x13bc2
leaq 0x610a(%rip), %rdi      # 0x19cc2
jmp 0x647e
movl $0x1, %edi
callq 0xf07d
movq %rax, %r14
movb (%rbx), %r12b
movq %rax, %rbp
testb %r12b, %r12b
je 0x13c48
callq 0x37a0
movq %rax, %r15
incq %rbx
leaq 0x4(%rsp), %r13
movq %r14, %rbp
movq (%r15), %rax
movsbq %r12b, %rcx
movzwl (%rax,%rcx,2), %eax
testb $0x8, %al
jne 0x13c06
cmpb $0x5f, %r12b
je 0x13c06
movzbl %r12b, %ecx
cmpl $0x2e, %ecx
jne 0x13c1a
movb %r12b, (%rbp)
incq %rbp
movb (%rbx), %r12b
incq %rbx
testb %r12b, %r12b
jne 0x13be8
jmp 0x13c48
movb $0x25, (%rbp)
movq %r13, %rdi
movl $0x4, %esi
leaq 0x7bc6(%rip), %rdx      # 0x1b7f3
xorl %eax, %eax
callq 0xa2ce
movb 0x4(%rsp), %al
movb %al, 0x1(%rbp)
movb 0x5(%rsp), %al
movb %al, 0x2(%rbp)
addq $0x3, %rbp
jmp 0x13c0d
movb $0x0, (%rbp)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: mustFindVarData
static char *mustFindVarData(char *varName)
/* Find variable and associated data or die trying. */
{
char *res = findVarData(varName);
if (res == NULL)
    cgiBadVar(varName);
return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x13c60
movq %rax, %rbx
testq %rax, %rax
jne 0x13cb9
testq %r14, %r14
leaq 0x601b(%rip), %rsi      # 0x19cc2
cmovneq %r14, %rsi
leaq 0x7b12(%rip), %rdi      # 0x1b7c4
xorl %eax, %eax
callq 0xb8d7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiStringList
struct slName *cgiStringList(char *varName)
/* Find list of cgi variables with given name.  This
 * may be empty.  Free result with slFreeList(). */
{
struct hashEl *hel;
struct slName *stringList = NULL, *string;

initCgiInput();
for (hel = hashLookup(inputHash, varName); hel != NULL; hel = hel->next)
    {
    if (sameString(hel->name, varName))
        {
	struct cgiVar *var = hel->val;
	string = newSlName(var->val);
	slAddHead(&stringList, string);
	}
    }
return stringList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x15afe
movq 0x145ee(%rip), %rdi     # 0x282d8
movq %rbx, %rsi
callq 0xbd98
testq %rax, %rax
je 0x13d2a
movq %rax, %r14
xorl %r15d, %r15d
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x3440
testl %eax, %eax
jne 0x13d20
movq 0x10(%r14), %rax
movq 0x10(%rax), %rdi
callq 0x6d49
movq %r15, (%rax)
movq %rax, %r15
movq (%r14), %r14
testq %r14, %r14
jne 0x13cfd
jmp 0x13d2d
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiInt
int cgiInt(char *varName)
/* Return int value of cgi variable. */
{
char *data;
char c;

data = mustFindVarData(varName);
data = skipLeadingSpaces(data);
c = data[0];
if (!(isdigit(c) || (c == '-' && isdigit(data[1]))))
     errAbort("Expecting number in %s, got \"%s\"\n", varName, data);
return atoi(data);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x13c89
movq %rax, %rdi
callq 0x7cb1
movq %rax, %r14
movsbq (%rax), %r15
callq 0x37a0
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r15,2)
jne 0x13d88
cmpb $0x2d, %r15b
jne 0x13d74
movsbq 0x1(%r14), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x13d88
leaq 0x7a7d(%rip), %rdi      # 0x1b7f8
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb8d7
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x36a0
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiOptionalInt
int cgiOptionalInt(char *varName, int defaultVal)
/* This returns integer value of varName if it exists in cgi environment
 * and it's not just the empty string otherwise it returns defaultVal. */
{
char *s = cgiOptionalString(varName);
s = skipLeadingSpaces(s);
if (isEmpty(s))
    return defaultVal;
return cgiInt(varName);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x13c60
movq %rax, %rdi
callq 0x7cb1
testq %rax, %rax
je 0x13dd3
cmpb $0x0, (%rax)
je 0x13dd3
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x13d36
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiDouble
double cgiDouble(char *varName)
/* Returns double value. */
{
char *data;
double x;

data = mustFindVarData(varName);
if (sscanf(data, "%lf", &x)<1)
     errAbort("Expecting real number in %s, got \"%s\"\n", varName, data);
return x;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x13c89
movq %rax, %r14
leaq 0x7a27(%rip), %rsi      # 0x1b81a
movq %rsp, %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x3530
testl %eax, %eax
jg 0x13e18
leaq 0x7a13(%rip), %rdi      # 0x1b81e
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb8d7
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiOneChoice
int cgiOneChoice(char *varName, struct cgiChoice *choices, int choiceSize)
/* Returns value associated with string variable in choice table. */
{
char *key = cgiString(varName);
int i;
int val = -1;

for (i=0; i<choiceSize; ++i)
    {
    if (sameWord(choices[i].name, key))
        {
        val =  choices[i].value;
        return val;
        }
    }
errAbort("Unknown key %s for variable %s\n", key, varName);
return val;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x13c89
movq %rax, %r15
testl %ebp, %ebp
jle 0x13eef
movl %ebp, %r12d
shlq $0x4, %r12
xorl %r13d, %r13d
movq (%r14,%r13), %rdi
movq %r15, %rsi
callq 0x6f18
testl %eax, %eax
je 0x13f0a
addq $0x10, %r13
cmpq %r13, %r12
jne 0x13ed6
leaq 0x794f(%rip), %rdi      # 0x1b845
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xb8d7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x13f0f
movl 0x8(%r14,%r13), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeOptionalButton
void cgiMakeOptionalButton(char *name, char *value, boolean disabled)
/* Make 'submit' type button that can be disabled. */
{
printf("<INPUT TYPE=SUBMIT NAME=\"%s\" VALUE=\"%s\"", name, value);
if (disabled)
    printf(" DISABLED");
printf(">");
}

// Assembly:
pushq %rbx
movl %edx, %ebx
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x7946(%rip), %rdi      # 0x1b9b2
xorl %eax, %eax
callq 0x3270
testl %ebx, %ebx
je 0x14085
leaq 0x795c(%rip), %rdi      # 0x1b9da
xorl %eax, %eax
callq 0x3270
movl $0x3e, %edi
popq %rbx
jmp 0x3080
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeCheckBoxUtil
void cgiMakeCheckBoxUtil(char *name, boolean checked, char *msg, char *id)
/* Make check box - can be called directly, though it was originally meant
 * as the common code for all lower level checkbox routines.
 * However, it's util functionality has been taken over by
 * cgiMakeCheckBoxWithIdAndOptionalHtml() */
{
char buf[256];

if (msg)
    safef(buf, sizeof(buf), "TITLE=\"%s\"", msg);
else
    buf[0] = 0;

cgiMakeCheckBox2Bool(name, checked, TRUE, id, buf);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rcx, %rbx
movl %esi, %ebp
movq %rdi, %r14
testq %rdx, %rdx
je 0x14236
movq %rdx, %rcx
leaq 0x7883(%rip), %rdx      # 0x1baa8
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0xa2ce
jmp 0x1423a
movb $0x0, (%rsp)
movq %rsp, %rcx
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x14256
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeCheckBox2Bool
static void cgiMakeCheckBox2Bool(char *name, boolean checked, boolean enabled,
                                 char *id, char *moreHtml)
/* Make check box - designed to be called by the variously overloaded
 * cgiMakeCheckBox functions, and should NOT be called directly.
 * moreHtml: optional additional html like javascript call or mouseover msg (may be NULL)
 * id: button id (may be NULL)
 * Also make a shadow hidden variable and support 2 boolean states:
 *    checked/unchecked and enabled/disabled. */
{
char buf[256], idBuf[256];

if(id)
    safef(idBuf, sizeof(idBuf), " id=\"%s\"", id);
else
    idBuf[0] = 0;

printf("<INPUT TYPE=CHECKBOX NAME=\"%s\"%s VALUE=on %s%s%s>", name, idBuf,
        (moreHtml ? moreHtml : ""),
        (checked ? " CHECKED" : ""),
        (enabled ? "" : " DISABLED"));
safef(buf, sizeof(buf), "%s%s", cgiBooleanShadowPrefix(), name);
cgiMakeHiddenVarWithExtra(buf, ( enabled ? "0" : (checked ? "-1" : "-2")),BOOLSHAD_EXTRA);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %rbx
testq %rdx, %rdx
je 0x14289
movq %rdx, %rcx
leaq 0x8137(%rip), %rdx      # 0x1c3af
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0xa2ce
jmp 0x1428d
movb $0x0, (%rsp)
testq %r14, %r14
leaq 0x5a2b(%rip), %r9       # 0x19cc2
cmoveq %r9, %r14
testl %ebp, %ebp
leaq 0x7837(%rip), %r8       # 0x1badb
cmoveq %r9, %r8
leaq 0x8109(%rip), %rdi      # 0x1c3b8
movq %rsp, %rdx
movq %rbx, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3270
leaq 0x5ed1(%rip), %rdx      # 0x1a197
leaq 0x77d1(%rip), %rcx      # 0x1ba9e
leaq 0x100(%rsp), %r14
movq %r14, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %r8
xorl %eax, %eax
callq 0xa2ce
leaq 0x7c9a(%rip), %rdi      # 0x1bf88
leaq 0x6f70(%rip), %rdx      # 0x1b265
movq %r14, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x7b3e(%rip), %rdi      # 0x1be44
leaq 0x77f2(%rip), %rsi      # 0x1baff
xorl %eax, %eax
callq 0x3270
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeCheckBoxFourWay
void cgiMakeCheckBoxFourWay(char *name, boolean checked, boolean enabled, char *id,
                            char *classes, char *moreHtml)
/* Make check box - with fourWay functionality (checked/unchecked by enabled/disabled)
 * Also makes a shadow hidden variable that supports the 2 boolean states. */
{
char shadName[256];

printf("<INPUT TYPE=CHECKBOX NAME='%s'", name);
if (id)
    printf(" id='%s'", id);
if (checked)
    printf(" CHECKED");
if (!enabled)
    {
    if (findWordByDelimiter("disabled",' ', classes) == NULL) // fauxDisabled ?
        printf(" DISABLED");
    }
if (classes)
    printf(" class='%s'",classes);
if (moreHtml)
    printf(" %s",moreHtml);
printf(">");

// The hidden var needs to hold the 4way state
safef(shadName, sizeof(shadName), "%s%s", cgiBooleanShadowPrefix(), name);
cgiMakeHiddenVarWithExtra(shadName, ( enabled ? "0" : (checked ? "-1" : "-2")),BOOLSHAD_EXTRA);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x7703(%rip), %rdi      # 0x1bab3
movq %r14, %rsi
xorl %eax, %eax
callq 0x3270
testq %r13, %r13
je 0x143d0
leaq 0x770c(%rip), %rdi      # 0x1bad2
movq %r13, %rsi
xorl %eax, %eax
callq 0x3270
testl %ebp, %ebp
je 0x143e2
leaq 0x7700(%rip), %rdi      # 0x1badb
xorl %eax, %eax
callq 0x3270
testl %ebx, %ebx
jne 0x1440d
leaq 0x76f7(%rip), %rdi      # 0x1bae4
movl $0x20, %esi
movq %r12, %rdx
callq 0x82ec
testq %rax, %rax
jne 0x1440d
leaq 0x75d4(%rip), %rdi      # 0x1b9da
xorl %eax, %eax
callq 0x3270
testq %r12, %r12
je 0x14423
leaq 0x76d4(%rip), %rdi      # 0x1baed
movq %r12, %rsi
xorl %eax, %eax
callq 0x3270
testq %r15, %r15
je 0x14439
leaq 0x5a1c(%rip), %rdi      # 0x19e4b
movq %r15, %rsi
xorl %eax, %eax
callq 0x3270
movl $0x3e, %edi
callq 0x3080
leaq 0x5d4d(%rip), %rdx      # 0x1a197
leaq 0x764d(%rip), %rcx      # 0x1ba9e
movq %rsp, %r15
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %r8
xorl %eax, %eax
callq 0xa2ce
testl %ebp, %ebp
leaq 0x768d(%rip), %rax      # 0x1bafc
leaq 0x7683(%rip), %rcx      # 0x1baf9
cmoveq %rax, %rcx
testl %ebx, %ebx
leaq 0x6de2(%rip), %rdx      # 0x1b265
cmoveq %rcx, %rdx
leaq 0x7afa(%rip), %rdi      # 0x1bf88
movq %r15, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x79a5(%rip), %rdi      # 0x1be44
leaq 0x7659(%rip), %rsi      # 0x1baff
xorl %eax, %eax
callq 0x3270
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeHiddenVarWithExtra
void cgiMakeHiddenVarWithExtra(char *varName, char *string,char *extra)
/* Store string in hidden input for next time around. */
{
printf("<INPUT TYPE=HIDDEN NAME='%s' VALUE='%s'", varName, string);
if (extra)
    printf(" %s>\n",extra);
else
    puts(">");
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x7ab8(%rip), %rdi      # 0x1bf88
xorl %eax, %eax
callq 0x3270
testq %rbx, %rbx
je 0x144ee
leaq 0x7961(%rip), %rdi      # 0x1be44
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x3270
leaq 0x73a5(%rip), %rdi      # 0x1b89a
popq %rbx
jmp 0x3100
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeHiddenBoolean
void cgiMakeHiddenBoolean(char *name, boolean on)
/* Make hidden boolean variable. Also make a shadow hidden variable so we
 * can distinguish between variable not present and
 * variable set to false. */
{
char buf[256];
cgiMakeHiddenVar(name, on ? "on" : "off");
safef(buf, sizeof(buf), "%s%s", cgiBooleanShadowPrefix(), name);
cgiMakeHiddenVarWithExtra(buf, "1",BOOLSHAD_EXTRA);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, %rbx
testl %esi, %esi
leaq 0x75fd(%rip), %rax      # 0x1bb10
leaq 0x7aae(%rip), %rdx      # 0x1bfc8
cmoveq %rax, %rdx
leaq 0x7a63(%rip), %r14      # 0x1bf88
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x7361(%rip), %rdi      # 0x1b89a
callq 0x3100
leaq 0x5c52(%rip), %rdx      # 0x1a197
leaq 0x7552(%rip), %rcx      # 0x1ba9e
movq %rsp, %r15
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %r8
xorl %eax, %eax
callq 0xa2ce
leaq 0x7592(%rip), %rdx      # 0x1bafa
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x78c8(%rip), %rdi      # 0x1be44
leaq 0x757c(%rip), %rsi      # 0x1baff
xorl %eax, %eax
callq 0x3270
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeOnKeypressTextVar
void cgiMakeOnKeypressTextVar(char *varName, char *initialVal, int charSize,
			      char *script)
/* Make a text control filled with initial value, with a (java)script
 * to execute every time a key is pressed.  If charSize is zero it's
 * calculated from initialVal size. */
{
if (initialVal == NULL)
    initialVal = "";
if (charSize == 0) charSize = strlen(initialVal);
if (charSize == 0) charSize = 8;

printf("<INPUT TYPE=TEXT NAME=\"%s\" SIZE=%d VALUE=\"%s\"", varName,
        charSize, initialVal);
if (isNotEmpty(script))
    printf(" onkeypress=\"%s\"", script);
printf(">\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r15
testq %rsi, %rsi
leaq 0x56c4(%rip), %r14      # 0x19cc2
cmovneq %rsi, %r14
testl %edx, %edx
jne 0x14611
movq %r14, %rdi
callq 0x3200
movq %rax, %rdx
testl %edx, %edx
movl $0x8, %eax
cmovnel %edx, %eax
leaq 0x7527(%rip), %rdi      # 0x1bb49
movq %r15, %rsi
movl %eax, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3270
testq %rbx, %rbx
je 0x1464c
cmpb $0x0, (%rbx)
je 0x1464c
leaq 0x7535(%rip), %rdi      # 0x1bb77
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x7247(%rip), %rdi      # 0x1b89a
popq %rbx
popq %r14
popq %r15
jmp 0x3100
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeTextVarWithExtraHtml
void cgiMakeTextVarWithExtraHtml(char *varName, char *initialVal, int width, char *extra)
/* Make a text control filled with initial value. */
{
if (initialVal == NULL)
    initialVal = "";
if (width==0)
    width=strlen(initialVal)*10;
if (width==0)
    width = 100;

printf("<INPUT TYPE=TEXT class='inputBox' NAME=\"%s\" style='width: %dpx' VALUE=\"%s\"",
       varName,width, initialVal);
if (isNotEmpty(extra))
    printf(" %s",extra);
printf(">\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r15
testq %rsi, %rsi
leaq 0x5649(%rip), %r14      # 0x19cc2
cmovneq %rsi, %r14
testl %edx, %edx
jne 0x1468e
movq %r14, %rdi
callq 0x3200
addl %eax, %eax
leal (%rax,%rax,4), %edx
testl %edx, %edx
movl $0x64, %eax
cmovnel %edx, %eax
leaq 0x74e9(%rip), %rdi      # 0x1bb88
movq %r15, %rsi
movl %eax, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3270
testq %rbx, %rbx
je 0x146c9
cmpb $0x0, (%rbx)
je 0x146c9
leaq 0x578c(%rip), %rdi      # 0x19e4b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x71ca(%rip), %rdi      # 0x1b89a
popq %rbx
popq %r14
popq %r15
jmp 0x3100
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeIntVarInRange
void cgiMakeIntVarInRange(char *varName, int initialVal, char *title, int width,
                          char *min, char *max)
/* Make a integer control filled with initial value.
   If min and/or max are non-NULL will enforce range
   Requires utils.js jQuery.js and inputBox class */
{
if (width==0)
    {
    if (max)
        width=strlen(max)*10;
    else
        {
        int sz=initialVal+1000;
        if (min)
            sz=atoi(min) + 1000;
        width = 10;
        while (sz/=10)
            width+=10;
        }
    }
if (width < 65)
    width = 65;

printf("<INPUT TYPE=TEXT class='inputBox' name=\"%s\" style='width: %dpx' value=%d",
       varName,width,initialVal);
printf(" onChange='return validateInt(this,%s,%s);'",
       (min ? min : "\"null\""),(max ? max : "\"null\""));
if (title)
    printf(" title='%s'",title);
printf(">\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r12
testl %ecx, %ecx
jne 0x1476d
testq %r14, %r14
je 0x14725
movq %r14, %rdi
callq 0x3200
addl %eax, %eax
leal (%rax,%rax,4), %ecx
jmp 0x1476d
movl %ebp, %eax
testq %r15, %r15
je 0x14734
movq %r15, %rdi
callq 0x36a0
leal 0x3f1(%rax), %edx
movl $0xa, %ecx
cmpl $0x13, %edx
jb 0x1476d
addl $0x3e8, %eax            # imm = 0x3E8
cltq
imulq $0x66666667, %rax, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
leal (%rdx,%rsi), %eax
addl $0xa, %ecx
addl %esi, %edx
addl $0x9, %edx
cmpl $0x12, %edx
ja 0x14749
cmpl $0x42, %ecx
movl $0x41, %edx
cmovgel %ecx, %edx
leaq 0x7481(%rip), %rdi      # 0x1bc00
movq %r12, %rsi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3270
testq %r15, %r15
leaq 0x74e0(%rip), %rax      # 0x1bc75
cmoveq %rax, %r15
testq %r14, %r14
cmoveq %rax, %r14
leaq 0x74a2(%rip), %rdi      # 0x1bc49
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3270
testq %rbx, %rbx
je 0x147ca
leaq 0x74bc(%rip), %rdi      # 0x1bc7c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x70c9(%rip), %rdi      # 0x1b89a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3100
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeIntVarWithLimits
void cgiMakeIntVarWithLimits(char *varName, int initialVal, char *title, int width,
                             int min, int max)
{
char minLimit[20];
char maxLimit[20];
char *minStr=NULL;
char *maxStr=NULL;
if (min != NO_VALUE)
    {
    safef(minLimit,sizeof(minLimit),"%d",min);
    minStr = minLimit;
    }
if (max != NO_VALUE)
    {
    safef(maxLimit,sizeof(maxLimit),"%d",max);
    maxStr = maxLimit;
    }
cgiMakeIntVarInRange(varName,initialVal,title,width,minStr,maxStr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r13d
movl %ecx, 0xc(%rsp)
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
cmpl $0xfffe8663, %r8d       # imm = 0xFFFE8663
jne 0x14809
xorl %r12d, %r12d
jmp 0x14827
leaq 0x6d10(%rip), %rdx      # 0x1b520
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movl $0x14, %esi
movl %r8d, %ecx
xorl %eax, %eax
callq 0xa2ce
cmpl $0xfffe8663, %r13d      # imm = 0xFFFE8663
jne 0x14834
xorl %ebx, %ebx
jmp 0x14852
leaq 0x6ce5(%rip), %rdx      # 0x1b520
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl $0x14, %esi
movl %r13d, %ecx
xorl %eax, %eax
callq 0xa2ce
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl 0xc(%rsp), %ecx
movq %r12, %r8
movq %rbx, %r9
callq 0x146f7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeIntVarWithMin
void cgiMakeIntVarWithMin(char *varName, int initialVal, char *title, int width, int min)
{
char minLimit[20];
char *minStr=NULL;
if (min != NO_VALUE)
    {
    safef(minLimit,sizeof(minLimit),"%d",min);
    minStr = minLimit;
    }
cgiMakeIntVarInRange(varName,initialVal,title,width,minStr,NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
cmpl $0xfffe8663, %r8d       # imm = 0xFFFE8663
jne 0x1489c
xorl %r12d, %r12d
jmp 0x148b8
leaq 0x6c7d(%rip), %rdx      # 0x1b520
movq %rsp, %r12
movq %r12, %rdi
movl $0x14, %esi
movl %r8d, %ecx
xorl %eax, %eax
callq 0xa2ce
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl %ebx, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x146f7
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeIntVarWithMax
void cgiMakeIntVarWithMax(char *varName, int initialVal, char *title, int width, int max)
{
char maxLimit[20];
char *maxStr=NULL;
if (max != NO_VALUE)
    {
    safef(maxLimit,sizeof(maxLimit),"%d",max);
    maxStr = maxLimit;
    }
cgiMakeIntVarInRange(varName,initialVal,title,width,NULL,maxStr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
cmpl $0xfffe8663, %r8d       # imm = 0xFFFE8663
jne 0x148fe
xorl %r12d, %r12d
jmp 0x1491a
leaq 0x6c1b(%rip), %rdx      # 0x1b520
movq %rsp, %r12
movq %r12, %rdi
movl $0x14, %esi
movl %r8d, %ecx
xorl %eax, %eax
callq 0xa2ce
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl %ebx, %ecx
xorl %r8d, %r8d
movq %r12, %r9
callq 0x146f7
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeDoubleVarInRange
void cgiMakeDoubleVarInRange(char *varName, double initialVal, char *title, int width,
                             char *min, char *max)
/* Make a floating point control filled with initial value.
   If min and/or max are non-NULL will enforce range
   Requires utils.js jQuery.js and inputBox class */
{
if (width==0)
    {
    if (max)
        width=strlen(max)*10;
    }
if (width < 65)
    width = 65;

printf("<INPUT TYPE=TEXT class='inputBox' name=\"%s\" style='width: %dpx' value=%g",
       varName,width,initialVal);
printf(" onChange='return validateFloat(this,%s,%s);'",
       (min ? min : "\"null\""),(max ? max : "\"null\""));
if (title)
    printf(" title='%s'",title);
printf(">\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r12
testl %edx, %edx
setne %al
testq %r8, %r8
sete %cl
orb %al, %cl
jne 0x14994
movq %r15, %rdi
movsd %xmm0, (%rsp)
callq 0x3200
movsd (%rsp), %xmm0
addl %eax, %eax
leal (%rax,%rax,4), %edx
cmpl $0x42, %edx
movl $0x41, %eax
cmovgel %edx, %eax
leaq 0x730f(%rip), %rdi      # 0x1bcb5
movq %r12, %rsi
movl %eax, %edx
movb $0x1, %al
callq 0x3270
testq %r14, %r14
leaq 0x72b9(%rip), %rdx      # 0x1bc75
cmoveq %rdx, %r14
testq %r15, %r15
cmovneq %r15, %rdx
leaq 0x7330(%rip), %rdi      # 0x1bcfe
movq %r14, %rsi
xorl %eax, %eax
callq 0x3270
testq %rbx, %rbx
je 0x149ee
leaq 0x7298(%rip), %rdi      # 0x1bc7c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x6ea5(%rip), %rdi      # 0x1b89a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3100
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeDoubleVarWithLimits
void cgiMakeDoubleVarWithLimits(char *varName, double initialVal, char *title, int width,
                                double min, double max)
{
char minLimit[20];
char maxLimit[20];
char *minStr=NULL;
char *maxStr=NULL;
if ((int)min != NO_VALUE)
    {
    safef(minLimit,sizeof(minLimit),"%g",min);
    minStr = minLimit;
    }
if ((int)max != NO_VALUE)
    {
    safef(maxLimit,sizeof(maxLimit),"%g",max);
    maxStr = maxLimit;
    }
cgiMakeDoubleVarInRange(varName,initialVal,title,width,minStr,maxStr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebx
movq %rsi, %r14
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r15
cvttsd2si %xmm1, %eax
cmpl $0xfffe8663, %eax       # imm = 0xFFFE8663
jne 0x14a30
xorl %r12d, %r12d
jmp 0x14a59
leaq 0x72c4(%rip), %rdx      # 0x1bcfb
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movl $0x14, %esi
movapd %xmm1, %xmm0
movb $0x1, %al
movsd %xmm2, (%rsp)
callq 0xa2ce
movsd (%rsp), %xmm2
cvttsd2si %xmm2, %eax
cmpl $0xfffe8663, %eax       # imm = 0xFFFE8663
jne 0x14a69
xorl %r13d, %r13d
jmp 0x14a88
leaq 0x728b(%rip), %rdx      # 0x1bcfb
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl $0x14, %esi
movapd %xmm2, %xmm0
movb $0x1, %al
callq 0xa2ce
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
movq %r13, %r8
callq 0x1495a
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeDoubleVarWithMin
void cgiMakeDoubleVarWithMin(char *varName, double initialVal, char *title, int width, double min)
{
char minLimit[20];
char *minStr=NULL;
if ((int)min != NO_VALUE)
    {
    safef(minLimit,sizeof(minLimit),"%g",min);
    minStr = minLimit;
    }
cgiMakeDoubleVarInRange(varName,initialVal,title,width,minStr,NULL);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cvttsd2si %xmm1, %eax
cmpl $0xfffe8663, %eax       # imm = 0xFFFE8663
jne 0x14ad2
xorl %r12d, %r12d
jmp 0x14afd
leaq 0x7222(%rip), %rdx      # 0x1bcfb
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x14, %esi
movsd %xmm0, 0x8(%rsp)
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0xa2ce
movsd 0x8(%rsp), %xmm0
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x1495a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeDoubleVarWithMax
void cgiMakeDoubleVarWithMax(char *varName, double initialVal, char *title, int width, double max)
{
char maxLimit[20];
char *maxStr=NULL;
if ((int)max != NO_VALUE)
    {
    safef(maxLimit,sizeof(maxLimit),"%g",max);
    maxStr = maxLimit;
    }
cgiMakeDoubleVarInRange(varName,initialVal,title,width,NULL,maxStr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cvttsd2si %xmm1, %eax
cmpl $0xfffe8663, %eax       # imm = 0xFFFE8663
jne 0x14b3f
xorl %r12d, %r12d
jmp 0x14b6a
leaq 0x71b5(%rip), %rdx      # 0x1bcfb
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x14, %esi
movsd %xmm0, 0x8(%rsp)
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0xa2ce
movsd 0x8(%rsp), %xmm0
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x1495a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeDropListClassWithStyleAndJavascript
void cgiMakeDropListClassWithStyleAndJavascript(char *name, char *menu[],
        int menuSize, char *checked, char *class, char *style,char *javascript)
/* Make a drop-down list with names, text class, style and javascript. */
{
int i;
char *selString;
if (checked == NULL) checked = menu[0];
printf("<SELECT");
if (name)
    printf(" NAME='%s'", name);
if (class)
    printf(" class='%s'", class);
if (style)
    printf(" style='%s'", style);
if (javascript)
    printf(" %s", javascript);
printf(">\n");
for (i=0; i<menuSize; ++i)
    {
    if (sameWord(menu[i], checked))
        selString = " SELECTED";
    else
        selString = "";
    printf("<OPTION%s>%s</OPTION>\n", selString, menu[i]);
    }
printf("</SELECT>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r13
movl %edx, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %rbp
testq %rcx, %rcx
jne 0x14bab
movq (%r14), %rcx
movq %rcx, %rbx
movq 0x40(%rsp), %r12
leaq 0x7172(%rip), %rdi      # 0x1bd2c
xorl %eax, %eax
callq 0x3270
testq %rbp, %rbp
je 0x14bd7
leaq 0x6efa(%rip), %rdi      # 0x1bac7
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3270
testq %r13, %r13
je 0x14bed
leaq 0x6f0a(%rip), %rdi      # 0x1baed
movq %r13, %rsi
xorl %eax, %eax
callq 0x3270
testq %r15, %r15
je 0x14c03
leaq 0x713b(%rip), %rdi      # 0x1bd34
movq %r15, %rsi
xorl %eax, %eax
callq 0x3270
testq %r12, %r12
je 0x14c19
leaq 0x523c(%rip), %rdi      # 0x19e4b
movq %r12, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x6c7a(%rip), %rdi      # 0x1b89a
callq 0x3100
movl 0x4(%rsp), %eax
testl %eax, %eax
jle 0x14c75
movq %rbx, %r13
movl %eax, %r12d
leaq 0x5088(%rip), %rbp      # 0x19cc2
leaq 0x7109(%rip), %r15      # 0x1bd4a
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rdi
movq %r13, %rsi
callq 0x6f18
testl %eax, %eax
movq %rbp, %rsi
leaq 0x70e5(%rip), %rax      # 0x1bd40
cmoveq %rax, %rsi
movq (%r14,%rbx,8), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x3270
incq %rbx
cmpq %rbx, %r12
jne 0x14c43
leaq 0x777c(%rip), %rdi      # 0x1c3f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3100
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeMultList
void cgiMakeMultList(char *name, char *menu[], int menuSize, struct slName *checked, int length)
/* Make a list of names with window height equalt to length,
 * which can have multiple selections. Same as drop-down list
 * except "multiple" is added to select tag. */
{
int i;
char *selString;
if (checked == NULL) checked = slNameNew(menu[0]);
printf("<SELECT MULTIPLE SIZE=%d ALIGN=CENTER NAME=\"%s\">\n", length, name);
for (i=0; i<menuSize; ++i)
    {
    if (slNameInList(checked, menu[i]))
        selString = " SELECTED";
    else
        selString = "";
    printf("<OPTION%s>%s</OPTION>\n", selString, menu[i]);
    }
printf("</SELECT>\n");
char buf[512];
safef(buf, sizeof(buf), "%s%s", cgiMultListShadowPrefix(), name);
cgiMakeHiddenVar(buf, "1");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %r8d, %r12d
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
testq %rcx, %rcx
jne 0x14d0c
movq (%r14), %rdi
callq 0x6d49
movq %rax, %r15
leaq 0x706f(%rip), %rdi      # 0x1bd82
movl %r12d, %esi
movq %rbx, 0x8(%rsp)
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3270
testl %ebp, %ebp
jle 0x14d6e
movl %ebp, %r13d
leaq 0x700d(%rip), %rbx      # 0x1bd40
leaq 0x7010(%rip), %r12      # 0x1bd4a
xorl %ebp, %ebp
movq (%r14,%rbp,8), %rsi
movq %r15, %rdi
callq 0x6edf
testl %eax, %eax
movq %rbx, %rsi
leaq 0x4f6e(%rip), %rax      # 0x19cc2
cmoveq %rax, %rsi
movq (%r14,%rbp,8), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x3270
incq %rbp
cmpq %rbp, %r13
jne 0x14d3c
leaq 0x7683(%rip), %rdi      # 0x1c3f8
callq 0x3100
leaq 0x5416(%rip), %rdx      # 0x1a197
leaq 0x6fef(%rip), %rcx      # 0x1bd77
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
movq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0xa2ce
leaq 0x71e0(%rip), %rdi      # 0x1bf88
leaq 0x6d4b(%rip), %rdx      # 0x1bafa
movq %r14, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x6ada(%rip), %rdi      # 0x1b89a
callq 0x3100
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeCheckboxGroupWithVals
void cgiMakeCheckboxGroupWithVals(char *name, char *menu[], char *values[], int menuSize,
				  struct slName *checked, int tableColumns)
/* Make a table of checkboxes that have the same variable name but different
 * values (same behavior as a multi-select input), with nice labels in menu[]. */
{
int i;
if (values == NULL) values = menu;
if (menu == NULL) menu = values;
puts("<TABLE BORDERWIDTH=0><TR>");
for (i = 0;  i < menuSize;  i++)
    {
    if (i > 0 && (i % tableColumns) == 0)
	printf("</TR><TR>");
    printf("<TD><INPUT TYPE=CHECKBOX NAME=\"%s\" VALUE=\"%s\" %s></TD>"
	   "<TD>%s</TD>\n",
	   name, values[i], (slNameInList(checked, values[i]) ? "CHECKED" : ""),
	   menu[i]);
    }
if ((i % tableColumns) != 0)
    while ((i++ % tableColumns) != 0)
	printf("<TD></TD>");
puts("</TR></TABLE>");
char buf[512];
safef(buf, sizeof(buf), "%s%s", cgiMultListShadowPrefix(), name);
cgiMakeHiddenVar(buf, "0");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %r9d, %ebp
movq %r8, %r15
movl %ecx, %r14d
movq %rsi, %r12
testq %rdx, %rdx
movq %rdx, %rbx
cmoveq %rsi, %rbx
movq %rdi, 0x8(%rsp)
testq %rsi, %rsi
cmoveq %rdx, %r12
leaq 0x6fa3(%rip), %rdi      # 0x1bdb4
callq 0x3100
testl %r14d, %r14d
jle 0x14e8f
movl %ebp, 0x4(%rsp)
movl %r14d, %ebp
xorl %r14d, %r14d
testq %r14, %r14
je 0x14e44
movl %r14d, %eax
cltd
idivl 0x4(%rsp)
testl %edx, %edx
jne 0x14e44
leaq 0x6f91(%rip), %rdi      # 0x1bdce
xorl %eax, %eax
callq 0x3270
movq (%rbx,%r14,8), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x6edf
testl %eax, %eax
leaq 0x6c80(%rip), %rcx      # 0x1badc
leaq 0x4e5f(%rip), %rax      # 0x19cc2
cmoveq %rax, %rcx
movq (%r12,%r14,8), %r8
leaq 0x6f66(%rip), %rdi      # 0x1bdd8
movq 0x8(%rsp), %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3270
incq %r14
cmpq %r14, %rbp
jne 0x14e25
movl 0x4(%rsp), %ebp
jmp 0x14e92
xorl %r14d, %r14d
movl %r14d, %eax
cltd
idivl %ebp
testl %edx, %edx
je 0x14ec7
movl %r14d, %eax
cltd
idivl %ebp
testl %edx, %edx
je 0x14ec7
incl %r14d
leaq 0x6f6b(%rip), %r15      # 0x1be1b
movq %r15, %rdi
xorl %eax, %eax
callq 0x3270
movl %r14d, %eax
cltd
idivl %ebp
incl %r14d
testl %edx, %edx
jne 0x14eb0
leaq 0x6f57(%rip), %rdi      # 0x1be25
callq 0x3100
leaq 0x52bd(%rip), %rdx      # 0x1a197
leaq 0x6e96(%rip), %rcx      # 0x1bd77
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
movq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0xa2ce
leaq 0x7087(%rip), %rdi      # 0x1bf88
leaq 0x635d(%rip), %rdx      # 0x1b265
movq %r14, %rsi
xorl %eax, %eax
callq 0x3270
leaq 0x6981(%rip), %rdi      # 0x1b89a
callq 0x3100
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiMakeDropListFull
void cgiMakeDropListFull(char *name, char *menu[], char *values[],
                         int menuSize, char *checked, char *extraAttribs)
/* Make a drop-down list with names and values. */
{
int i;
char *selString;
if (checked == NULL) checked = menu[0];

if (NULL != extraAttribs)
    {
    printf("<SELECT NAME=\"%s\" %s>\n", name, extraAttribs);
    }
else
    {
    printf("<SELECT NAME=\"%s\">\n", name);
    }

for (i=0; i<menuSize; ++i)
    {
    if (sameWord(values[i], checked))
        selString = " SELECTED";
    else
        selString = "";
    printf("<OPTION%s VALUE=\"%s\">%s</OPTION>\n", selString, values[i], menu[i]);
    }
printf("</SELECT>\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rsi
testq %r8, %r8
jne 0x14f60
movq (%r15), %rbx
testq %r9, %r9
je 0x14f78
leaq 0x6ec7(%rip), %rdi      # 0x1be33
movq %r9, %rdx
xorl %eax, %eax
callq 0x3270
jmp 0x14f86
leaq 0x6ecb(%rip), %rdi      # 0x1be4a
xorl %eax, %eax
callq 0x3270
testl %ebp, %ebp
jle 0x14fd0
movl %ebp, %r13d
leaq 0x6eca(%rip), %r12      # 0x1be5e
xorl %ebp, %ebp
movq (%r14,%rbp,8), %rdi
movq %rbx, %rsi
callq 0x6f18
testl %eax, %eax
leaq 0x4d17(%rip), %rsi      # 0x19cc2
leaq 0x6d8e(%rip), %rax      # 0x1bd40
cmoveq %rax, %rsi
movq (%r14,%rbp,8), %rdx
movq (%r15,%rbp,8), %rcx
movq %r12, %rdi
xorl %eax, %eax
callq 0x3270
incq %rbp
cmpq %rbp, %r13
jne 0x14f96
leaq 0x7421(%rip), %rdi      # 0x1c3f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3100