LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineExec
static void pipelineExec(struct pipeline* pl, int stdinFd, int stdoutFd, int stderrFd,
                         void *otherEndBuf, size_t otherEndBufSize)
/* Fork the group leader, which then launches all all processes in a pipeline,
 * stdinFd and stdoutFd are the ends of the pipeline, stderrFd is applied to
 * all processes, including group leader */
{
assert(pl->groupLeader < 0);  // should not be set
if ((pl->groupLeader = fork()) < 0)
    errnoAbort("can't fork");
if (pl->groupLeader == 0)
    {
    groupLeaderRun(pl, stdinFd, stdoutFd, stderrFd, otherEndBuf, otherEndBufSize);
    exit(1); // doesn't return to here
    }
else
    {
    // parent also must also setpgid to prevent race condition
    if (setpgid(pl->groupLeader, pl->groupLeader) != 0)
        errnoAbort("error from parent setpgid(%d, %d)", pl->groupLeader, pl->groupLeader);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0xc(%rdi)
jns 0x10b36
movq %r9, %r14
movq %r8, %r15
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
callq 0x3750
movl %eax, 0xc(%rbx)
testl %eax, %eax
jns 0x10af5
leaq 0x87d8(%rip), %rdi      # 0x192c3
xorl %eax, %eax
callq 0xa721
movl 0xc(%rbx), %eax
testl %eax, %eax
je 0x10b55
movl %eax, %edi
movl %eax, %esi
callq 0x36c0
testl %eax, %eax
je 0x10b27
movl 0xc(%rbx), %edx
leaq 0x87be(%rip), %rdi      # 0x192ce
movl %edx, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa721
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8723(%rip), %rdi      # 0x19260
leaq 0x8730(%rip), %rsi      # 0x19274
leaq 0x8734(%rip), %rcx      # 0x1927f
movl $0x1b0, %edx            # imm = 0x1B0
callq 0x32e0
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %ebp, %ecx
movq %r15, %r8
movq %r14, %r9
callq 0x10b6b
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/pipeline.c
// Function: groupLeaderRun
static void groupLeaderRun(struct pipeline* pl, int stdinFd, int stdoutFd, int stderrFd,
                           void *otherEndBuf, size_t otherEndBufSize)
/* group leader process */
{
pl->groupLeader = getpid();
if (setpgid(pl->groupLeader, pl->groupLeader) != 0)
    errnoAbort("error from child setpgid(%d, %d)", pl->groupLeader, pl->groupLeader);
pipelineGroupExec(pl, stdinFd, stdoutFd, stderrFd, otherEndBuf, otherEndBufSize);

// only keep stderr open
close(STDIN_FILENO);
close(STDOUT_FILENO);
closeNonStdDescriptors();
groupWait(pl);
exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
callq 0x31b0
movl %eax, 0xc(%rbx)
movl %eax, %edi
movl %eax, %esi
callq 0x36c0
testl %eax, %eax
je 0x10baf
movl 0xc(%rbx), %edx
leaq 0x874a(%rip), %rdi      # 0x192f0
movl %edx, %esi
xorl %eax, %eax
callq 0xa721
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %ebp, %ecx
movq %r15, %r8
movq %r14, %r9
callq 0x10be8
xorl %edi, %edi
callq 0x3350
pushq $0x1
popq %rdi
callq 0x3350
callq 0x10db0
movq %rbx, %rdi
callq 0x10de5
xorl %edi, %edi
callq 0x36e0
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/pipeline.c
// Function: pipelineGroupExec
static void pipelineGroupExec(struct pipeline* pl, int stdinFd, int stdoutFd, int stderrFd,
                              void *otherEndBuf, size_t otherEndBufSize)
/* Start all processes in a pipeline, stdinFd and stdoutFd are the ends of
 * the pipeline, stderrFd is applied to all processed */
{
struct plProc *proc;
int prevStdoutFd = -1;
for (proc = pl->procs; proc != NULL; proc = proc->next)
    {
    prevStdoutFd = pipelineExecProc(pl, proc, prevStdoutFd,
                                    stdinFd, stdoutFd, stderrFd,
                                    otherEndBuf, otherEndBufSize);
    otherEndBuf = NULL;  /* only for first process (read pipes) */
    otherEndBufSize = 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movl %ecx, 0x14(%rsp)
movl %edx, 0x18(%rsp)
movl %esi, %r14d
movq %rdi, %rbp
pushq $-0x1
popq %r12
movq %rdi, %r15
movl %esi, 0xc(%rsp)
movq (%r15), %r15
testq %r15, %r15
je 0x10d92
movq %r9, 0x20(%rsp)
cmpq %r15, (%rbp)
movl %r12d, %r13d
cmovel %r14d, %r13d
movl %r13d, 0x1c(%rsp)
cmpq $0x0, (%r15)
je 0x10c48
leaq 0x10(%rsp), %rdi
callq 0x10a82
movl %eax, %r12d
jmp 0x10c50
movl 0x18(%rsp), %eax
movl %eax, 0x10(%rsp)
callq 0x3750
movl %eax, 0x18(%r15)
testl %eax, %eax
jns 0x10c6f
leaq 0x865f(%rip), %rdi      # 0x192c3
xorl %eax, %eax
callq 0xa721
movl 0x18(%r15), %eax
testl %eax, %eax
jne 0x10d5a
movl 0x10(%rsp), %r14d
pushq $0xd
popq %rdi
pushq $0x1
popq %rsi
callq 0x3450
cmpq $-0x1, %rax
jne 0x10c9b
leaq 0x867d(%rip), %rdi      # 0x19311
xorl %eax, %eax
callq 0xa721
callq 0x31b0
movl 0xc(%rbp), %esi
movl %eax, %edi
callq 0x36c0
testl %eax, %eax
je 0x10cc6
callq 0x31b0
movl 0xc(%rbp), %edx
leaq 0x866b(%rip), %rdi      # 0x19328
movl %eax, %esi
xorl %eax, %eax
callq 0xa721
testq %rbx, %rbx
je 0x10d15
xorl %edi, %edi
movl %r14d, %esi
movl 0x14(%rsp), %edx
callq 0x10f93
pushq $0x1
popq %rdi
movq %rbx, %rsi
movq 0x20(%rsp), %rbx
movq %rbx, %rdx
callq 0x31a0
testq %rax, %rax
js 0x10d47
cmpq %rbx, %rax
movl 0xc(%rsp), %r14d
je 0x10da1
leaq 0x8660(%rip), %rdi      # 0x19366
movq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa61f
jmp 0x10d5a
movl %r13d, %edi
movl %r14d, %esi
movl 0x14(%rsp), %edx
callq 0x10f93
movq 0x10(%r15), %rsi
movq (%rsi), %rdi
callq 0x3690
movq 0x10(%r15), %rax
movq (%rax), %rsi
leaq 0x8345(%rip), %rdi      # 0x19083
xorl %eax, %eax
callq 0xa721
jmp 0x10d55
leaq 0x85f5(%rip), %rdi      # 0x19343
xorl %eax, %eax
callq 0xa721
movl 0xc(%rsp), %r14d
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x10f64
incl 0x8(%rbp)
cmpq %r15, (%rbp)
je 0x10d78
leaq 0x1c(%rsp), %rdi
callq 0x10660
cmpq $0x0, (%r15)
je 0x10d88
leaq 0x10(%rsp), %rdi
callq 0x10660
xorl %ebx, %ebx
xorl %r9d, %r9d
jmp 0x10c12
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x3350
xorl %edi, %edi
callq 0x36e0
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/pipeline.c
// Function: closeNonStdDescriptors
static void closeNonStdDescriptors(void)
/* close non-standard file descriptors */
{
long maxFd = sysconf(_SC_OPEN_MAX);
if (maxFd < 0)
    maxFd = 4096;  // shouldn't really happen
int fd;
for (fd = STDERR_FILENO+1; fd < maxFd; fd++)
    close(fd);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x4
popq %rdi
callq 0x3650
testq %rax, %rax
movl $0x1000, %r14d          # imm = 0x1000
cmovnsq %rax, %r14
pushq $0x3
popq %rbx
cmpq %rbx, %r14
jle 0x10ddd
movl %ebx, %edi
callq 0x3350
incq %rbx
jmp 0x10dcc
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/pipeline.c
// Function: plProcSetup
static void plProcSetup(struct plProc* proc, int stdinFd, int stdoutFd, int stderrFd)
/* setup signal, error handling, and file descriptors after fork */
{
/* treat a closed pipe as an EOF rather than getting SIGPIPE */
struct sigaction sigAct;
ZeroVar(&sigAct);
sigAct.sa_handler = SIG_IGN;
if (sigaction(SIGPIPE, &sigAct, NULL) != 0)
    errnoAbort("failed to set SIGPIPE to SIG_IGN");

/* child, first setup stdio files */
if (stdinFd != STDIN_FILENO)
    {
    if (dup2(stdinFd, STDIN_FILENO) < 0)
        errnoAbort("can't dup2 to stdin");
    }
    
if (stdoutFd != STDOUT_FILENO)
    {
    if (dup2(stdoutFd, STDOUT_FILENO) < 0)
        errnoAbort("can't dup2 to stdout");
    }
    
if (stderrFd != STDERR_FILENO)
    {
    if (dup2(stderrFd, STDERR_FILENO) < 0)
        errnoAbort("can't dup2 to stderr");
    }
closeNonStdDescriptors();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %edx, %ebx
movl %esi, %ebp
movl %edi, %r14d
leaq 0x8(%rsp), %r15
movl $0x90, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3300
movq $0x1, -0x8(%r15)
pushq $0xd
popq %rdi
movq %rsp, %rsi
xorl %edx, %edx
callq 0x3140
testl %eax, %eax
je 0x10fe2
leaq 0x83c1(%rip), %rdi      # 0x1939c
xorl %eax, %eax
callq 0xa721
testl %r14d, %r14d
je 0x11003
movl %r14d, %edi
xorl %esi, %esi
callq 0x3240
testl %eax, %eax
jns 0x11003
leaq 0x83c1(%rip), %rdi      # 0x193bd
xorl %eax, %eax
callq 0xa721
cmpl $0x1, %ebp
je 0x11024
pushq $0x1
popq %rsi
movl %ebp, %edi
callq 0x3240
testl %eax, %eax
jns 0x11024
leaq 0x83b4(%rip), %rdi      # 0x193d1
xorl %eax, %eax
callq 0xa721
cmpl $0x2, %ebx
je 0x11045
pushq $0x2
popq %rsi
movl %ebx, %edi
callq 0x3240
testl %eax, %eax
jns 0x11045
leaq 0x83a8(%rip), %rdi      # 0x193e6
xorl %eax, %eax
callq 0xa721
callq 0x10db0
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/pipeline.c
// Function: joinCmd
static char* joinCmd(char **cmd)
/* join an cmd vector into a space separated string */
{
struct dyString *str = dyStringNew(512);
int i;
for (i = 0; cmd[i] != NULL; i++)
    {
    if (i > 0)
        dyStringAppend(str, " ");
    dyStringAppend(str, cmd[i]);
    }
return dyStringCannibalize(&str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x200, %edi            # imm = 0x200
callq 0x9df0
movq %rax, %r14
movq %rax, (%rsp)
xorl %r12d, %r12d
leaq 0x8863(%rip), %r15      # 0x198e1
movq (%rbx,%r12), %rsi
testq %rsi, %rsi
je 0x110a9
testq %r12, %r12
je 0x1109b
movq %r14, %rdi
movq %r15, %rsi
callq 0x9ffe
movq (%rbx,%r12), %rsi
movq %r14, %rdi
callq 0x9ffe
addq $0x8, %r12
jmp 0x1107e
movq %rsp, %rdi
callq 0x9e4a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/verbose.c
// Function: verboseVa
void verboseVa(int verbosity, char *format, va_list args)
/* Log with at given verbosity vprintf formatted args. */
{
if (verbosity <= logVerbosity)
    {
    if (logFile == NULL)
        logFile = stderr;
    vfprintf(logFile, format, args);
    fflush(logFile);
    }
}

// Assembly:
cmpl %edi, 0x1551a(%rip)     # 0x265e0
jge 0x110c9
retq
movq 0x16108(%rip), %rdi     # 0x271d8
testq %rdi, %rdi
jne 0x110e6
movq 0x14f1c(%rip), %rax     # 0x25ff8
movq (%rax), %rdi
movq %rdi, 0x160f2(%rip)     # 0x271d8
pushq %rax
callq 0x3670
movq 0x160e5(%rip), %rdi     # 0x271d8
popq %rax
jmp 0x3520
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/verbose.c
// Function: verboseTime
void verboseTime(int verbosity, char *label, ...)
/* Print label and how long it's been since last call.  Start time can be
 * initialized with verboseTimeInit, otherwise the elapsed time will be
 * zero. */
{
assert(label != NULL);  // original version allowed this, but breaks some GCCs
if (lastTime < 0)
    verboseTimeInit();
long time = clock1000();
va_list args;
va_start(args, label);
verboseVa(verbosity, label, args);
verbose(verbosity, ": %ld millis\n", time - lastTime);
lastTime = time;
va_end(args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x111e9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rsi, %rsi
je 0x11269
movq %rsi, %r14
movl %edi, %ebx
cmpq $0x0, 0x153ed(%rip)     # 0x265e8
jns 0x11202
callq 0x1117d
xorl %eax, %eax
callq 0xf58e
movq %rax, %r15
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movl %ebx, %edi
movq %r14, %rsi
callq 0x110c0
movq %r15, %rdx
subq 0x153a3(%rip), %rdx     # 0x265e8
leaq 0x844e(%rip), %rsi      # 0x1969a
movl %ebx, %edi
xorl %eax, %eax
callq 0x110f9
movq %r15, 0x1538c(%rip)     # 0x265e8
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x83ef(%rip), %rdi      # 0x1965f
leaq 0x83f6(%rip), %rsi      # 0x1966d
leaq 0x83f9(%rip), %rcx      # 0x19677
pushq $0x34
popq %rdx
callq 0x32e0
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/verbose.c
// Function: verboseDotsEnabled
boolean verboseDotsEnabled()
/* check if outputting of happy dots are enabled.  They will be enabled if the
 * verbosity is > 0, stderr is a tty and we don't appear to be running an
 * emacs shell. */
{
if (!checkedDotsEnabled)
    {
    if (logFile == NULL)
        logFile = stderr;
    dotsEnabled = (logVerbosity > 0) && isatty(fileno(logFile));
    if (dotsEnabled)
        {
        /* check for an possible emacs shell */
        char *emacs = getenv("emacs");
        char *term = getenv("TERM");
        if ((emacs != NULL) && (emacs[0] == 't'))
            dotsEnabled = FALSE;
        else if ((term != NULL) && sameString(term, "dumb"))
            dotsEnabled = FALSE;
        }
    checkedDotsEnabled = TRUE;
    }
return dotsEnabled;
}

// Assembly:
pushq %rbx
cmpb $0x1, 0x15f52(%rip)     # 0x271e0
jne 0x1129b
movl 0x15f4e(%rip), %ebx     # 0x271e4
jmp 0x1132c
movq 0x15f36(%rip), %rdi     # 0x271d8
testq %rdi, %rdi
jne 0x112b8
movq 0x14d4a(%rip), %rax     # 0x25ff8
movq (%rax), %rdi
movq %rdi, 0x15f20(%rip)     # 0x271d8
cmpl $0x0, 0x15321(%rip)     # 0x265e0
jle 0x1131c
callq 0x34e0
movl %eax, %edi
callq 0x3130
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0x15f0a(%rip)     # 0x271e4
je 0x11323
leaq 0x83c5(%rip), %rdi      # 0x196a8
callq 0x3040
movq %rax, %rbx
leaq 0x8ddc(%rip), %rdi      # 0x1a0ce
callq 0x3040
testq %rbx, %rbx
je 0x11301
cmpb $0x74, (%rbx)
je 0x1131c
pushq $0x1
popq %rbx
testq %rax, %rax
je 0x11325
leaq 0x839e(%rip), %rsi      # 0x196ae
movq %rax, %rdi
callq 0x3440
testl %eax, %eax
jne 0x11325
andl $0x0, 0x15ec1(%rip)     # 0x271e4
xorl %ebx, %ebx
movb $0x1, 0x15eb4(%rip)     # 0x271e0
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/verbose.c
// Function: verboseSetLogFile
void verboseSetLogFile(char *name)
/* Set logFile for verbose messages overrides stderr. */
{
if (sameString(name, "stdout"))
    logFile = stdout;
else if (sameString(name, "stderr"))
    logFile = stderr;
else
    logFile = mustOpen(name, "w");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x8071(%rip), %rsi      # 0x193df
callq 0x3440
testl %eax, %eax
je 0x1139b
leaq 0x8076(%rip), %rsi      # 0x193f4
movq %rbx, %rdi
callq 0x3440
testl %eax, %eax
je 0x113a4
leaq 0x66a2(%rip), %rsi      # 0x17a33
movq %rbx, %rdi
callq 0x8645
jmp 0x113ae
movq 0x14c26(%rip), %rax     # 0x25fc8
jmp 0x113ab
movq 0x14c4d(%rip), %rax     # 0x25ff8
movq (%rax), %rax
movq %rax, 0x15e23(%rip)     # 0x271d8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/wildcmp.c
// Function: globMatch
static boolean globMatch(const char *wildCard, const char *string, char single, char multi)
/* does a case sensitive wild card match with a string.
 * * matches any string or no character.
 * ? matches any single character.
 * anything else etc must match the character exactly. */
{
boolean matchStar = 0;
int starMatchSize;
char c;

for(;;)
    {
NEXT_WILD:
    c = *wildCard;
    if (c == 0)
	{
	if(matchStar)
	    {
	    while(*string++)
		;
	    return TRUE;
	    }
	else if(*string)
	    return FALSE;
	else
	    return TRUE;
	}
    else if (c == multi)
	{
	matchStar = TRUE;
	}
    else if (c == single)
	{
	if(*string == 0)
	    return FALSE; /* out of string, no match for ? */
	++string;
	}
    else
	{
	if(matchStar)
	    {
	    for(;;)
		{
		if(*string == 0) /* if out of string no match */
		    return FALSE;

		/* note matchStar is re-used here for substring
		 * after star match length */
		if((starMatchSize = subMatch(string,wildCard,single,multi)) != 0)
		    {
		    string += starMatchSize;
		    wildCard += starMatchSize;
		    matchStar = FALSE;
		    goto NEXT_WILD;
		    }
		++string;
		}
	    }

	/* default: they must be equal or no match */
	if(toupper(*string) != toupper(*wildCard))
	    return FALSE;
	++string;
	}
    ++wildCard;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
xorl %eax, %eax
movsbq (%rdi), %r13
testq %r13, %r13
je 0x114af
movq %rdi, %r12
cmpb %bl, %r13b
jne 0x11429
pushq $0x1
popq %rax
jmp 0x114a4
cmpb %bpl, %r13b
jne 0x1143d
cmpb $0x0, (%r14)
je 0x114b8
incq %r14
jmp 0x114a4
testl %eax, %eax
je 0x1148a
movq %r14, %r15
cmpb $0x0, (%r15)
je 0x114b8
callq 0x3030
movq (%rax), %rcx
movl %r13d, %edx
movq %r12, %rdi
movq %r15, %r14
movsbq (%r14), %rax
movl (%rcx,%rax,4), %eax
movsbq %dl, %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x11485
incq %r14
movb 0x1(%rdi), %dl
incq %rdi
xorl %eax, %eax
cmpb %bl, %dl
je 0x1140f
testb %dl, %dl
je 0x1140f
cmpb %bpl, %dl
jne 0x1145b
jmp 0x1140f
incq %r15
jmp 0x11444
callq 0x3030
movq (%rax), %rax
movsbq (%r14), %rcx
movl (%rax,%rcx,4), %ecx
cmpl (%rax,%r13,4), %ecx
jne 0x114b8
incq %r14
xorl %eax, %eax
incq %r12
movq %r12, %rdi
jmp 0x1140f
testl %eax, %eax
je 0x114bc
pushq $0x1
popq %rax
jmp 0x114c5
xorl %eax, %eax
jmp 0x114c5
xorl %eax, %eax
cmpb $0x0, (%r14)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/cheapcgi.c
// Function: cgiServerNamePort
char *cgiServerNamePort()
/* Return name of server with port if different than 80 */
{
char *port = cgiServerPort();
char *name = cgiServerName();
struct dyString *result = newDyString(256);
char *defaultPort = "80";
if (cgiServerHttpsIsOn())
    defaultPort = "443";

if (name)
    {
    dyStringPrintf(result,"%s",name);
    if (differentString(port, defaultPort))
	dyStringPrintf(result,":%s",port);
    return dyStringCannibalize(&result);
    }
else
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x11570
movq %rax, %rbx
callq 0x11564
movq %rax, %r15
movl $0x100, %edi            # imm = 0x100
callq 0x9df0
movq %rax, %r14
movq %rax, (%rsp)
callq 0x1158d
testq %r15, %r15
je 0x11642
testl %eax, %eax
leaq 0x8117(%rip), %rax      # 0x1970d
leaq 0x8119(%rip), %r12      # 0x19716
cmoveq %rax, %r12
leaq 0x5fb4(%rip), %rsi      # 0x175bc
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xa0eb
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3440
testl %eax, %eax
je 0x11638
leaq 0x8f14(%rip), %rsi      # 0x1a53f
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa0eb
movq %rsp, %rdi
callq 0x9e4a
jmp 0x11644
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/cheapcgi.c
// Function: findCookieData
char *findCookieData(char *varName)
/* Get the string associated with varName from the cookie string. */
{
struct hashEl *hel;
char *firstResult;

/* make sure that the cookie hash table has been created */
parseCookies(&cookieHash, &cookieList);
if (cookieHash == NULL)
    return NULL;
/* Watch out for multiple cookies with the same name (hel is a list) --
 * warn if we find them. */
hel = hashLookup(cookieHash, varName);
if (hel == NULL)
    return NULL;
else
    firstResult = ((struct cgiVar *)hel->val)->val;
hel = hel->next;
while (hel != NULL)
    {
    char *val = ((struct cgiVar *)(hel->val))->val;
    if (sameString(varName, hel->name) && !sameString(firstResult, val))
	{
	/* This is too early to call warn -- it will mess up html output. */
	fprintf(stderr,
		"findCookieData: Duplicate cookie value from IP=%s: "
		"%s has both %s and %s\n",
		cgiRemoteAddr(),
		varName, firstResult, val);
	}
    hel = hel->next;
    }
return firstResult;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x11910
movq 0x15998(%rip), %rdi     # 0x27218
testq %rdi, %rdi
je 0x118fb
movq %rbx, %rsi
callq 0xaaa4
testq %rax, %rax
je 0x118fb
movq %rax, %r15
movq 0x10(%rax), %rax
movq 0x10(%rax), %r14
movq 0x14754(%rip), %rbp     # 0x25ff8
movq (%r15), %r15
testq %r15, %r15
je 0x118fe
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rax
movq 0x10(%rax), %r13
movq %rbx, %rdi
callq 0x3440
testl %eax, %eax
jne 0x118a4
movq %r14, %rdi
movq %r13, %rsi
callq 0x3440
testl %eax, %eax
je 0x118a4
movq (%rbp), %r12
callq 0x11650
movq %r12, %rdi
leaq 0x7e85(%rip), %rsi      # 0x1976b
movq %rax, %rdx
movq %rbx, %rcx
movq %r14, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0x3470
jmp 0x118a4
xorl %r14d, %r14d
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_O2/JimKent[P]linearSat/lib/cheapcgi.c
// Function: parseCookies
static void parseCookies(struct hash **retHash, struct cgiVar **retList)
/* parses any cookies and puts them into the given hash and list */
{
char* str;
char *namePt, *dataPt, *nextNamePt;
struct hash *hash;
struct cgiVar *list = NULL, *el;

/* don't build the hash table again */
if(haveCookiesHash == TRUE)
	return;

str = cloneString(getenv("HTTP_COOKIE"));
if(str == NULL) /* don't have a cookie */
	return;

hash = newHash(6);

namePt = str;
while (isNotEmpty(namePt))
    {
    dataPt = strchr(namePt, '=');
    if (dataPt == NULL)
	errAbort("Mangled Cookie input string: no = in '%s' (offset %d in complete cookie string: '%s')",
		 namePt, (int)(namePt - str), getenv("HTTP_COOKIE"));
    *dataPt++ = 0;
    nextNamePt = strchr(dataPt, ';');
    if (nextNamePt != NULL)
	{
         *nextNamePt++ = 0;
	 if (*nextNamePt == ' ')
	     nextNamePt++;
	}
    cgiDecode(dataPt,dataPt,strlen(dataPt));
    AllocVar(el);
    el->val = dataPt;
    slAddHead(&list, el);
    hashAddSaveName(hash, namePt, el, &el->name);
    namePt = nextNamePt;
    }

haveCookiesHash = TRUE;

slReverse(&list);
*retList = list;
*retHash = hash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
andq $0x0, 0x8(%rsp)
cmpb $0x0, 0x25bd5(%rip)     # 0x37500
jne 0x11a5a
leaq 0x8731(%rip), %rdi      # 0x1a069
callq 0x3040
movq %rax, %rdi
callq 0x5ede
testq %rax, %rax
je 0x11a5a
movq %rax, %r12
pushq $0x6
popq %rdi
pushq $0x1
popq %rsi
callq 0xb010
movq %rax, %r14
xorl %r15d, %r15d
movq %r12, 0x10(%rsp)
testq %r12, %r12
je 0x11a35
cmpb $0x0, (%r12)
je 0x11a35
movq %r12, %rdi
pushq $0x3d
popq %rsi
callq 0x3260
movq %rax, %rbp
testq %rax, %rax
jne 0x119b9
movl %r12d, %r13d
subl 0x10(%rsp), %r13d
leaq 0x86cc(%rip), %rdi      # 0x1a069
callq 0x3040
leaq 0x86cc(%rip), %rdi      # 0x1a075
movq %r12, %rsi
movl %r13d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xa61f
movq %rbp, %rax
incq %rbp
movb $0x0, (%rax)
movq %rbp, %rdi
pushq $0x3b
popq %rsi
callq 0x3260
testq %rax, %rax
je 0x119ea
leaq 0x1(%rax), %rcx
movb $0x0, (%rax)
movq %rax, %rbx
addq $0x2, %rbx
cmpb $0x20, 0x1(%rax)
cmovneq %rcx, %rbx
jmp 0x119ec
xorl %ebx, %ebx
movq %rbp, %rdi
callq 0x3200
movq %rbp, %rdi
movq %rbp, %rsi
movl %eax, %edx
callq 0x11ba5
pushq $0x20
popq %rdi
callq 0xd87c
movq %rax, %r13
movq %rbp, 0x10(%rax)
movq %r15, (%rax)
movq %rax, 0x8(%rsp)
leaq 0x8(%rax), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xae3b
movq %r13, %r15
movq %rbx, %r12
jmp 0x11967
movb $0x1, 0x25ac4(%rip)     # 0x37500
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x613f
movq (%rbx), %rax
movq %rax, 0x1579d(%rip)     # 0x271f0
movq %r14, 0x157be(%rip)     # 0x27218
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
subq $0x18, %rsp
movq %rdi, %rbp
movq %rsi, 0x10(%rsp)
movq (%rsi), %r15
movq %rdx, 0x8(%rsp)
movq (%rdx), %rax
movq %rax, (%rsp)
testq %r15, %r15
jne 0x11aa1
pushq $0x6
popq %rdi
pushq $0x1
popq %rsi
callq 0xb010
movq %rax, %r15
movq %rsp, %rdi
callq 0x613f
pushq $0x26
popq %rbx
pushq $0x20
popq %r13
testq %rbp, %rbp
je 0x11b78
cmpb $0x0, (%rbp)
je 0x11b78
movq %rbp, %rdi
pushq $0x3d
popq %rsi
callq 0x3260
movq %rax, %r14
testq %rax, %rax
jne 0x11ae7
leaq 0x7cd8(%rip), %rdi      # 0x197b5
movq %rbp, %rsi
xorl %eax, %eax
callq 0xa61f
movq %r14, %rax
incq %r14
movb $0x0, (%rax)
movq %r14, %rdi
movl %ebx, %esi
callq 0x3260
testq %rax, %rax
jne 0x11b0f
movq %r14, %rdi
pushq $0x3b
popq %rsi
callq 0x3260
testq %rax, %rax
je 0x11b73
movq %rax, %r12
movb $0x0, (%rax)
incq %r12
movq %rbp, %rdi
callq 0x3200
movq %rbp, %rdi
movq %rbp, %rsi
movl %eax, %edx
callq 0x11ba5
movq %r14, %rdi
callq 0x3200
movq %r14, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x11ba5
movq %r13, %rdi
callq 0xd87c
movq %r14, 0x10(%rax)
movq (%rsp), %rcx
movq %rcx, (%rax)
movq %rax, (%rsp)
leaq 0x8(%rax), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0xae3b
movq %r12, %rbp
jmp 0x11ab0
xorl %r12d, %r12d
jmp 0x11b18
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x613f
movq (%rbx), %rax
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0x10(%rsp), %rax
movq %r15, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x4(%rsp), %r15
pushq $0x3f
popq %r13
xorl %r14d, %r14d
cmpl %ebp, %r14d
jge 0x11c1b
leaq 0x1(%r12), %rdi
movzbl (%r12), %eax
cmpl $0x25, %eax
je 0x11be2
cmpl $0x2b, %eax
jne 0x11c0e
movb $0x20, (%rbx)
jmp 0x11c10
leaq 0x7c13(%rip), %rsi      # 0x197fc
movq %r15, %rdx
xorl %eax, %eax
callq 0x3530
movl %r13d, %ecx
cmpl $0x1, %eax
jne 0x11bff
movl 0x4(%rsp), %ecx
addq $0x3, %r12
addl $0x2, %r14d
movb %cl, (%rbx)
movq %r12, %rdi
jmp 0x11c10
movb %al, (%rbx)
incq %rbx
incl %r14d
movq %rdi, %r12
jmp 0x11bc4
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_O2/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 0x155de(%rip), %rdi     # 0x27220
callq 0x3410
xorl %ecx, %ecx
testl %eax, %eax
jne 0x11c6a
leaq 0x2103(%rip), %rdi      # 0x13d57
callq 0xa7da
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x11a69
pushq $0x1
popq %rcx
movl %ecx, %ebx
xorl %eax, %eax
callq 0xa828
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
callq 0x1151b
testl %eax, %eax
je 0x11cd9
leaq 0x50(%rip), %r14        # 0x11ce1
pushq $0xf
popq %rdi
movq %r14, %rsi
callq 0x3450
pushq $0x1
popq %rdi
movq %r14, %rsi
callq 0x3450
pushq $0x6
popq %rdi
movq %r14, %rsi
callq 0x3450
pushq $0xb
popq %rdi
movq %r14, %rsi
callq 0x3450
pushq $0x8
popq %rdi
movq %r14, %rsi
callq 0x3450
pushq $0x7
popq %rdi
movq %r14, %rsi
callq 0x3450
movl %ebx, 0x1560f(%rip)     # 0x272e8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/cheapcgi.c
// Function: catchSignal
static void catchSignal(int sigNum)
/* handler for various terminal signals for logging purposes */
{
char *sig = NULL;
switch (sigNum)
    {
    case SIGTERM:  // after timing out for not producing any stdout or stderr output for too long,
		   //  apache gives you 3 seconds to clean up and exit or it then sends SIGKILL.
      sig = "SIGTERM";
      break;
    case SIGHUP:   // apache sends this when it is doing a graceful restart or a log rotate.
      sig = "SIGHUP";
      break;
    case SIGABRT:
      sig = "SIGABRT";
      break;
    case SIGSEGV:
      sig = "SIGSEGV";
      break;
    case SIGFPE:
      sig = "SIGFPE";
      break;
    case SIGBUS:
      sig = "SIGBUS";
      break;
    }
    logCgiToStderr();

    // apache closes STDERR on the CGI before it sends the SIGTERM and SIGKILL signals
    //  which means that stderr output after that point will not be visible in error_log.
    fprintf(stderr, "Received signal %s\n", sig);
    if (dumpStackOnSignal)
        dumpStack("Stack for signal %s\n", sig);

if (sigNum == SIGTERM || sigNum == SIGHUP) 
    exit(1);   // so that atexit cleanup get called

raise(SIGKILL);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leal -0x1(%rbx), %eax
cmpl $0xe, %eax
ja 0x11cfe
movl %eax, %eax
leaq 0x14058(%rip), %rcx     # 0x25d50
movq (%rcx,%rax,8), %r14
jmp 0x11d01
xorl %r14d, %r14d
callq 0x13b52
movq 0x142eb(%rip), %rax     # 0x25ff8
movq (%rax), %rdi
leaq 0x83e1(%rip), %rsi      # 0x1a0f8
movq %r14, %rdx
xorl %eax, %eax
callq 0x3470
cmpl $0x0, 0x155c0(%rip)     # 0x272e8
je 0x11d3b
leaq 0x83db(%rip), %rdi      # 0x1a10c
movq %r14, %rsi
xorl %eax, %eax
callq 0x1013e
cmpl $0xf, %ebx
je 0x11d54
cmpl $0x1, %ebx
je 0x11d54
pushq $0x9
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3060
pushq $0x1
popq %rdi
callq 0x36e0
// File: /workspace/github_c_makefile_star2_O2/JimKent[P]linearSat/lib/cheapcgi.c
// Function: javaScriptLiteralEncode
char *javaScriptLiteralEncode(char *inString)
/* Use backslash escaping on newline
 * and quote chars, backslash and others.
 * Intended that the encoded string will be
 * put between quotes at a higher level and
 * then interpreted by Javascript. */
{
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 (c == '\''
     || c == '\"'
     || c == '&'
     || c == '\\'
     || c == '\n'
     || c == '\r'
     || c == '\t'
     || c == '\b'
     || c == '\f'
	)
        outSize += 2;
    else
        outSize += 1;
    }
outString = needMem(outSize+1);

/* Encode string */
in = inString;
out = outString;
while ((c = *in++) != 0)
    {
    if (c == '\''
     || c == '\"'
     || c == '&'
     || c == '\\'
     || c == '\n'
     || c == '\r'
     || c == '\t'
     || c == '\b'
     || c == '\f'
	)
        *out++ = '\\';
    *out++ = c;
    }
*out++ = 0;
return outString;

}

// Assembly:
testq %rdi, %rdi
je 0x11e18
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
pushq $0x2
popq %rax
pushq $0x1
popq %rcx
movabsq $0xc400003700, %r14     # imm = 0xC400003700
movq %rbx, %rdx
movzbl (%rdx), %esi
cmpq $0x27, %rsi
ja 0x11dcb
btq %rsi, %r14
movl %eax, %r8d
jae 0x11dc6
incq %rdx
addl %r8d, %edi
jmp 0x11dac
testq %rsi, %rsi
je 0x11dd8
movl %eax, %r8d
cmpl $0x5c, %esi
je 0x11dbe
movl %ecx, %r8d
jmp 0x11dbe
incl %edi
callq 0xd87c
movq %rax, %rcx
movzbl (%rbx), %edx
cmpq $0x27, %rdx
ja 0x11e06
btq %rdx, %r14
jae 0x11e01
movb $0x5c, (%rcx)
incq %rcx
incq %rbx
movb %dl, (%rcx)
incq %rcx
jmp 0x11de2
testq %rdx, %rdx
je 0x11e0d
cmpl $0x5c, %edx
je 0x11df1
jmp 0x11df7
movb $0x0, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5eb3(%rip), %rdi      # 0x17cd2
jmp 0x5ede
// File: /workspace/github_c_makefile_star2_O2/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 0x11f2c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movabsq $-0x7fffffffffffbfff, %r12 # imm = 0x8000000000004001
movq %rdi, %r13
movsbq (%r13), %r15
testq %r15, %r15
je 0x11e8b
callq 0x37a0
movq (%rax), %rax
movzwl (%rax,%r15,2), %ecx
movl %ebp, %eax
testb $0x8, %cl
jne 0x11e83
movzbl %r15b, %eax
addl $-0x20, %eax
cmpl $0x3f, %eax
ja 0x11e80
btq %rax, %r12
movl %ebp, %eax
jb 0x11e83
pushq $0x3
popq %rax
incq %r13
addl %eax, %r14d
jmp 0x11e4e
incl %r14d
movq %r14, %rdi
callq 0xd87c
movq %rax, %r14
leaq 0x4(%rsp), %r12
pushq $0x4
popq %rbp
movq %rax, %r13
movsbq (%rbx), %r15
testq %r15, %r15
je 0x11f15
incq %rbx
callq 0x37a0
movq (%rax), %rax
movzwl (%rax,%r15,2), %eax
testb $0x8, %al
jne 0x11ed4
movzbl %r15b, %ecx
cmpl $0x20, %ecx
je 0x11edd
cmpl $0x5f, %ecx
je 0x11ed4
cmpl $0x2e, %ecx
jne 0x11ee7
movb %r15b, (%r13)
incq %r13
jmp 0x11ea4
movb $0x2b, (%r13)
incq %r13
jmp 0x11ea4
movb $0x25, (%r13)
movq %r12, %rdi
movl %ebp, %esi
leaq 0x7908(%rip), %rdx      # 0x19800
xorl %eax, %eax
callq 0x939d
movb 0x4(%rsp), %al
movb %al, 0x1(%r13)
movb 0x5(%rsp), %al
movb %al, 0x2(%r13)
addq $0x3, %r13
jmp 0x11ea4
movb $0x0, (%r13)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5d9f(%rip), %rdi      # 0x17cd2
jmp 0x5ede
// File: /workspace/github_c_makefile_star2_O2/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 0x1202d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movq %rdi, %r15
movsbq (%r15), %r12
testq %r12, %r12
je 0x11f94
callq 0x37a0
movq (%rax), %rax
movzwl (%rax,%r12,2), %ecx
xorl %eax, %eax
cmpb $0x2e, %r12b
setne %al
addl %eax, %eax
orl %ebp, %eax
cmpb $0x5f, %r12b
cmovel %ebp, %eax
testb $0x8, %cl
je 0x11f8c
movl %ebp, %eax
incq %r15
addl %eax, %r14d
jmp 0x11f5b
incl %r14d
movq %r14, %rdi
callq 0xd87c
leaq 0x785a(%rip), %r15      # 0x19800
leaq 0xc(%rsp), %r12
pushq $0x4
popq %rbp
movq %rax, 0x10(%rsp)
movq %rax, %r13
movsbq (%rbx), %r14
testq %r14, %r14
je 0x12014
incq %rbx
callq 0x37a0
movq (%rax), %rax
movzwl (%rax,%r14,2), %eax
testb $0x8, %al
jne 0x11fe1
movzbl %r14b, %ecx
cmpl $0x5f, %ecx
je 0x11fe1
cmpl $0x2e, %ecx
jne 0x11fea
movb %r14b, (%r13)
incq %r13
jmp 0x11fb6
movb $0x25, (%r13)
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x939d
movb 0xc(%rsp), %al
movb %al, 0x1(%r13)
movb 0xd(%rsp), %al
movb %al, 0x2(%r13)
addq $0x3, %r13
jmp 0x11fb6
movb $0x0, (%r13)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5c9e(%rip), %rdi      # 0x17cd2
jmp 0x5ede
// File: /workspace/github_c_makefile_star2_O2/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, %rbx
callq 0x1203b
movq %rax, %r14
testq %rax, %rax
jne 0x12080
movq %rbx, %rdi
callq 0x11d6b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x13d67
movq 0x15247(%rip), %rdi     # 0x272f8
movq %rbx, %rsi
callq 0xaaa4
movq %rax, %r14
xorl %r15d, %r15d
testq %r14, %r14
je 0x120ec
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x3440
testl %eax, %eax
jne 0x120e7
movq 0x10(%r14), %rax
movq 0x10(%rax), %rdi
callq 0x6692
movq %r15, (%rax)
movq %rax, %r15
movq (%r14), %r14
jmp 0x120bf
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x12064
movq %rax, %rdi
callq 0x722d
movq %rax, %r14
movsbq (%rax), %r15
callq 0x37a0
movq (%rax), %rax
testb $0x8, 0x1(%rax,%r15,2)
jne 0x12147
cmpb $0x2d, %r15b
jne 0x12133
movsbq 0x1(%r14), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x12147
leaq 0x76cb(%rip), %rdi      # 0x19805
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xa61f
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x36a0
// File: /workspace/github_c_makefile_star2_O2/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 0x1203b
movq %rax, %rdi
callq 0x722d
testq %rax, %rax
je 0x12192
cmpb $0x0, (%rax)
je 0x12192
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x120f5
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x12064
movq %rax, %r14
leaq 0x7675(%rip), %rsi      # 0x19827
movq %rsp, %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x3530
testl %eax, %eax
jg 0x121d7
leaq 0x7661(%rip), %rdi      # 0x1982b
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xa61f
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
callq 0x12064
movq %rax, %r12
xorl %ecx, %ecx
testl %r15d, %r15d
cmovlel %ecx, %r15d
shlq $0x4, %r15
addq $0x10, %r15
leaq 0x10(%rcx), %r13
cmpq %r13, %r15
je 0x1228b
movq (%r14,%rcx), %rdi
movq %r12, %rsi
callq 0x682f
movq %r13, %rcx
testl %eax, %eax
jne 0x12268
movl -0x8(%r14,%r13), %eax
jmp 0x122a2
leaq 0x75c0(%rip), %rdi      # 0x19852
movq %r12, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xa61f
pushq $-0x1
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x75fe(%rip), %rdi      # 0x199bf
xorl %eax, %eax
callq 0x3270
testl %ebx, %ebx
je 0x123da
leaq 0x7614(%rip), %rdi      # 0x199e7
xorl %eax, %eax
callq 0x3270
pushq $0x3e
popq %rdi
popq %rbx
jmp 0x3080
// File: /workspace/github_c_makefile_star2_O2/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 0x12573
movq %rdx, %rcx
leaq 0x7553(%rip), %rdx      # 0x19ab5
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x939d
jmp 0x12577
movb $0x0, (%rsp)
movq %rsp, %rcx
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x12593
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x125c6
movq %rdx, %rcx
leaq 0x7e07(%rip), %rdx      # 0x1a3bc
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x939d
jmp 0x125ca
movb $0x0, (%rsp)
testq %r14, %r14
leaq 0x56fe(%rip), %r9       # 0x17cd2
cmoveq %r9, %r14
testl %ebp, %ebp
leaq 0x7507(%rip), %r8       # 0x19ae8
cmoveq %r9, %r8
leaq 0x7dd9(%rip), %rdi      # 0x1a3c5
movq %rsp, %rdx
movq %rbx, %rsi
movq %r14, %rcx
xorl %eax, %eax
callq 0x3270
leaq 0x5ba4(%rip), %rdx      # 0x181a7
leaq 0x74a1(%rip), %rcx      # 0x19aab
leaq 0x100(%rsp), %r14
movq %r14, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %r8
xorl %eax, %eax
callq 0x939d
leaq 0x6c47(%rip), %rsi      # 0x19272
leaq 0x74da(%rip), %rdx      # 0x19b0c
movq %r14, %rdi
callq 0x127ca
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq