LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiMakeDropListFullExt
void cgiMakeDropListFullExt(char *name, char *menu[], char *values[],
                         int menuSize, char *checked, char *event, char *javascript, char *style, char *class)
/* Make a drop-down list with names and values.
 * Optionally include values for style and class */
{
int i;
char *selString;
if (checked == NULL) checked = menu[0];

printf("<SELECT NAME='%s'", name);
if (class)
    printf(" class='%s'", class);
if (javascript)
    {
    printf(" id='%s'", name);
    jsOnEventById(event, name, javascript);
    }
if (style)
    printf(" style='%s'", style);
printf(">\n");

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
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x6627d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x7a076(%rip), %rdi     # 0xe02fe
movb $0x0, %al
callq 0x6070
cmpq $0x0, 0x20(%rbp)
je 0x662a8
movq 0x20(%rbp), %rsi
leaq 0x79cac(%rip), %rdi     # 0xdff4d
movb $0x0, %al
callq 0x6070
cmpq $0x0, 0x10(%rbp)
je 0x662d2
movq -0x8(%rbp), %rsi
leaq 0x79cd3(%rip), %rdi     # 0xdff8d
movb $0x0, %al
callq 0x6070
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq 0x10(%rbp), %rdx
callq 0x627b0
cmpq $0x0, 0x18(%rbp)
je 0x662eb
movq 0x18(%rbp), %rsi
leaq 0x79f1b(%rip), %rdi     # 0xe01ff
movb $0x0, %al
callq 0x6070
leaq 0x7b0a9(%rip), %rdi     # 0xe139b
movb $0x0, %al
callq 0x6070
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x6636f
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rsi
callq 0x2b9f0
cmpl $0x0, %eax
jne 0x6632f
leaq 0x79ee2(%rip), %rax     # 0xe020b
movq %rax, -0x40(%rbp)
jmp 0x6633a
leaq 0x7f0d0(%rip), %rax     # 0xe5406
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x79fb3(%rip), %rdi     # 0xe0310
movb $0x0, %al
callq 0x6070
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x66300
leaq 0x79eb6(%rip), %rdi     # 0xe022c
movb $0x0, %al
callq 0x6070
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiParsedVarsFreeList
void cgiParsedVarsFreeList(struct cgiParsedVars **pList)
/* Free up list of cgiParsedVars */
{
struct cgiParsedVars *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    cgiParsedVarsFree(&el);
    }
*pList = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6730c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x639e0
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x672e7
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiEncodeHash
void cgiEncodeHash(struct hash *hash, struct dyString *dy)
/* Put a cgi-encoding of a string valued hash into dy.  Tags are always
 * alphabetical to make it easier to compare if two hashes are same. */
{
struct hashEl *el, *elList = hashElListHash(hash);
slSort(&elList, hashElCmp);
boolean firstTime = TRUE;
char *s = NULL;
for (el = elList; el != NULL; el = el->next)
    {
    if (firstTime)
	firstTime = FALSE;
    else
	dyStringAppendC(dy, '&');
    dyStringAppend(dy, el->name);
    dyStringAppendC(dy, '=');
    s = cgiEncode(el->val);
    dyStringAppend(dy, s);
    freez(&s);
    }
hashElFreeList(&elList);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x39d50
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x2d748(%rip), %rsi    # 0x39c00
callq 0x2ab90
movl $0x1, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x673db
cmpl $0x0, -0x24(%rbp)
je 0x6737a
movl $0x0, -0x24(%rbp)
jmp 0x67388
movq -0x10(%rbp), %rdi
movl $0x26, %esi
callq 0x352a0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x353b0
movq -0x10(%rbp), %rdi
movl $0x3d, %esi
callq 0x352a0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x63e90
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x353b0
leaq -0x30(%rbp), %rdi
callq 0x40d70
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x67364
leaq -0x20(%rbp), %rdi
callq 0x39e40
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/hex.c
// Function: hexToByte
unsigned char hexToByte(char *hex)
/* convert hexidecimal characters to unsigned char. */
{
unsigned char n = hexToNibble(*hex++);
n <<= 4;
n += hexToNibble(*hex++);
return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edi
callq 0x67fa0
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
shll $0x4, %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edi
callq 0x67fa0
movsbl %al, %ecx
movzbl -0x9(%rbp), %eax
addl %ecx, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/hex.c
// Function: hexBinaryString
void hexBinaryString(unsigned char *in, int inSize, char *out, int outSize)
/* Convert possibly long binary string to hex string.
 * Out size needs to be at least 2x inSize+1 */
{
assert(inSize * 2 +1 <= outSize);
while (--inSize >= 0)
    {
    unsigned char c = *in++;
    *out++ = hexTab[c>>4];
    *out++ = hexTab[c&0xf];
    }
*out = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0xc(%rbp), %eax
shll %eax
addl $0x1, %eax
cmpl -0x1c(%rbp), %eax
jg 0x68055
jmp 0x68074
leaq 0x78859(%rip), %rdi     # 0xe08b5
leaq 0x7886b(%rip), %rsi     # 0xe08ce
movl $0x3c, %edx
leaq 0x78869(%rip), %rcx     # 0xe08d8
callq 0x6450
jmp 0x68076
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jl 0x680e4
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %al
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %eax
sarl $0x4, %eax
movslq %eax, %rcx
leaq 0x9edf7(%rip), %rax     # 0x106ea0
movb (%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movzbl -0x1d(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x9edd2(%rip), %rax     # 0x106ea0
movb (%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x68076
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlVaEncodeErrorText
void htmlVaEncodeErrorText(char *format, va_list args)
/* Write an error message encoded against XSS. */
{
va_list argscp;
va_copy(argscp, args);
char warning[1024];

struct dyString *ds = newDyString(1024);
vaHtmlDyStringPrintf(ds, format, args);
int n = ds->stringSize;
int nLimit = sizeof(warning) - 1;
if (ds->stringSize > nLimit)
    n = nLimit;
safencpy(warning, sizeof warning, ds->string, n);
if (ds->stringSize > nLimit)
    strcpy(warning+n-5,"[...]");  // indicated trucation
freeDyString(&ds);

fprintf(stdout, "%s\n", warning);
/* write warning/error message to stderr so they get logged. */
vfprintf(stderr, format, argscp);
fprintf(stderr, "\n");
fflush(stderr);
va_end(argscp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movl $0x400, %edi            # imm = 0x400
callq 0x35020
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x68290
movq -0x438(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x43c(%rbp)
movl $0x3ff, -0x440(%rbp)    # imm = 0x3FF
movq -0x438(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0x440(%rbp), %eax
jle 0x681b6
movl -0x440(%rbp), %eax
movl %eax, -0x43c(%rbp)
leaq -0x430(%rbp), %rdi
movq -0x438(%rbp), %rax
movq 0x8(%rax), %rdx
movslq -0x43c(%rbp), %rcx
movl $0x400, %esi            # imm = 0x400
callq 0x31130
movq -0x438(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0x440(%rbp), %eax
jle 0x6820c
leaq -0x430(%rbp), %rdi
movslq -0x43c(%rbp), %rax
addq %rax, %rdi
addq $-0x5, %rdi
leaq 0x7877d(%rip), %rsi     # 0xe0984
callq 0x6680
leaq -0x438(%rbp), %rdi
callq 0x35080
movq 0x9cd91(%rip), %rax     # 0x104fb0
movq (%rax), %rdi
leaq -0x430(%rbp), %rdx
leaq 0x72a60(%rip), %rsi     # 0xdac90
movb $0x0, %al
callq 0x6a80
movq 0x9cd92(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x69d0
movq 0x9cd7b(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
leaq 0x70dba(%rip), %rsi     # 0xd9019
movb $0x0, %al
callq 0x6a80
movq 0x9cd63(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
callq 0x6850
leaq -0x30(%rbp), %rax
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: vaHtmlDyStringPrintf
void vaHtmlDyStringPrintf(struct dyString *ds, char *format, va_list args)
/* VarArgs Printf append to dyString
 * Strings are escaped according to format type. */
{
/* attempt to format the string in the current space.  If there
 * is not enough room, increase the buffer size and try again */
int avail, sz;
while (TRUE)
    {
    va_list argscp;
    va_copy(argscp, args);
    avail = ds->bufSize - ds->stringSize;
    if (avail <= 0)
        {
        /* Don't pass zero sized buffers to vsnprintf, because who knows
         * if the library function will handle it. */
        dyStringBumpBufSize(ds, ds->bufSize+ds->bufSize);
        avail = ds->bufSize - ds->stringSize;
        }
    sz = vaHtmlSafefNoAbort(ds->string + ds->stringSize, avail, format, argscp, FALSE, TRUE);
    va_end(argscp);
    /* note that some version return -1 if too small */
    if ((sz < 0) || (sz >= avail))
	{
        dyStringBumpBufSize(ds, ds->bufSize+ds->bufSize);
	}
    else
        {
        ds->stringSize += sz;
        break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jg 0x682f9
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x8(%rbp), %rax
addl 0x10(%rax), %esi
callq 0x35170
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rax
addq %rax, %rdi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0x40(%rbp), %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x6ac20
movl %eax, -0x20(%rbp)
leaq -0x40(%rbp), %rax
cmpl $0x0, -0x20(%rbp)
jl 0x6833a
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x68353
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x8(%rbp), %rax
addl 0x10(%rax), %esi
callq 0x35170
jmp 0x68362
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x14(%rax), %ecx
movl %ecx, 0x14(%rax)
jmp 0x68367
jmp 0x682a4
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmTextOut
void htmTextOut(FILE *f, char *s)
/* Print out string to file, if necessary replacing > with &gt; and the like */
{
char c;
if (NoEscape)
    {
    fputs(s, f);
    return;
    }

while ((c = *s++) != 0)
    {
    switch (c)
        {
	case '>':
	    fputs("&gt;", f);
	    break;
	case '<':
	    fputs("&lt;", f);
	    break;
	case '&':
	    fputs("&amp;", f);
	    break;
	case '"':
	    fputs("&quot;", f);
	    break;
	default:
	    fputc(c, f);
	    break;
	}
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpb $0x0, 0xb239e(%rip)     # 0x11a9b5
je 0x6862b
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x67f0
jmp 0x686cd
jmp 0x6862d
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movb %al, -0x11(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x686cd
movsbl -0x11(%rbp), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x1c, %eax
ja 0x686bb
movq -0x20(%rbp), %rax
leaq 0x782a6(%rip), %rcx     # 0xe0910
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rsi
leaq 0x78344(%rip), %rdi     # 0xe09c2
callq 0x67f0
jmp 0x686c8
movq -0x8(%rbp), %rsi
leaq 0x78337(%rip), %rdi     # 0xe09c7
callq 0x67f0
jmp 0x686c8
movq -0x8(%rbp), %rsi
leaq 0x7832a(%rip), %rdi     # 0xe09cc
callq 0x67f0
jmp 0x686c8
movq -0x8(%rbp), %rsi
leaq 0x7831e(%rip), %rdi     # 0xe09d2
callq 0x67f0
jmp 0x686c8
movsbl -0x11(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x6910
jmp 0x6862d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlTextStripTags
char *htmlTextStripTags(char *s)
/* Returns a cloned string with all html tags stripped out */
{
if (s == NULL)
    return NULL;
char *scrubbed = needMem(strlen(s));
char *from=s;
char *to=scrubbed;
while (*from!='\0')
    {
    if (*from == '<')
        {
        from++;
        while (*from!='\0' && *from != '>')
            from++;
        if (*from == '\0')  // The last open tag was never closed!
            break;
        from++;
        }
    else
        *to++ = *from++;
    }
return scrubbed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x68730
movq $0x0, -0x8(%rbp)
jmp 0x68800
movq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, %rdi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x687f8
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x687d1
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
je 0x6879e
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x687a7
jmp 0x687b5
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6877d
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x687c3
jmp 0x687f8
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x687f3
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x68755
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlTextReplaceTagsWithChar
char *htmlTextReplaceTagsWithChar(char *s, char ch)
/* Returns a cloned string with all html tags replaced with given char (useful for tokenizing) */
{
if (s == NULL)
    return NULL;
char *scrubbed = needMem(strlen(s) + 1);
char *from=s;
char *to=scrubbed;
while(*from!='\0')
    {
    if (*from == '<')
        {
        from++;
        *to++ = ch;
        while (*from!='\0' && *from != '>')
            from++;
        if (*from == '\0')  // The last open tag was never closed!
            break;
        from++;
        }
    else
        *to++ = *from++;
    }
*to = '\0';
return scrubbed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x68a86
movq $0x0, -0x8(%rbp)
jmp 0x68b75
movq -0x10(%rbp), %rdi
callq 0x62c0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x40c50
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x68b66
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x68b3f
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movb -0x11(%rbp), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x31(%rbp)
je 0x68b0c
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3e, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x68b15
jmp 0x68b23
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x68aeb
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x68b31
jmp 0x68b66
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x68b61
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0x68aaf
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlWarnEncode
char *htmlWarnEncode(char *s)
/* Returns a cloned string with newlines replaced by BR tag.
   Meant to be displayed with warn popup box. */
{
int size = strlen(s);
size += countChars(s,'\n') * 4;
char *cleanQuote = needMem(size+1);
safecpy(cleanQuote,size+1,s);

strSwapStrs(cleanQuote, size,"\n","<BR>" ); // use BR tag for new lines

return cleanQuote;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x62c0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movl $0xa, %esi
callq 0x2e520
shll $0x2, %eax
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x8(%rbp), %rdx
callq 0x2caf0
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq 0x70434(%rip), %rdx     # 0xd9019
leaq 0x77e0f(%rip), %rcx     # 0xe09fb
callq 0x2dfe0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlEncode
char *htmlEncode(char *s)
/* Returns a cloned string with quotes replaced by html codes.
   Changes ',",\n and >,<,& to code equivalents.
   This differs from cgiEncode as it handles text that will
   be displayed in an html page or tooltip style title.  */
{
int size = htmlEncodeTextSize(s);
char *out = needMem(size+1);
htmlEncodeTextExtended(s, out, size+1);
return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x68d80
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
addl $0x1, %edx
callq 0x68c00
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: nonAlphaNumericHexDecodeText
void nonAlphaNumericHexDecodeText(char *s, char *prefix, char *postfix)
/* For html tag attributes, it decodes non-alphanumeric characters
 * with <prefix>HH<postfix> hex codes.
 * Decoding happens in-place, changing the input string s.
 * prefix must not be empty string or null, but postfix can be empty string.
 * Because the decoded string is always equal to or shorter than the input string,
 * the decoding is just done in-place modifying the input string.
 * Accepts upper and lower case values in entities.
 */
{
char *d = s;  // where are we decoding to right now
int pfxLen = strlen(prefix);
int postLen = strlen(postfix);
while (isNotEmpty(s))
    {
    char h;
    if (startsWithNoCase(prefix, s) &&
        decodeTwoHexChars(s+pfxLen, &h) &&
        startsWithNoCase(postfix, s+pfxLen+2))
        {
        *d++ = h;
        s += pfxLen + 2 + postLen;
        }
    else
        *d++ = *s++;
    }
*d = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x62c0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
callq 0x62c0
movl %eax, -0x28(%rbp)
movb $0x1, %al
cmpq $0x0, -0x8(%rbp)
movb %al, -0x2a(%rbp)
je 0x69050
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6905e
jmp 0x690fa
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x2d440
cmpl $0x0, %eax
je 0x690d3
movq -0x8(%rbp), %rdi
movslq -0x24(%rbp), %rax
addq %rax, %rdi
leaq -0x29(%rbp), %rsi
callq 0x69110
cmpl $0x0, %eax
je 0x690d3
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movslq -0x24(%rbp), %rax
addq %rax, %rsi
addq $0x2, %rsi
callq 0x2d440
cmpl $0x0, %eax
je 0x690d3
movb -0x29(%rbp), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x24(%rbp), %ecx
addl $0x2, %ecx
addl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x690f5
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x69034
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: decodeTwoHexChars
static boolean decodeTwoHexChars(char *s, char *h)
/* Return true if hex char */
{
*h = 0;
if (decodeOneHexChar(*s++, h)
&& (decodeOneHexChar(*s  , h)))
    return TRUE;
return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movq -0x18(%rbp), %rsi
movsbl %al, %edi
callq 0x6b1a0
cmpl $0x0, %eax
je 0x69169
movq -0x10(%rbp), %rax
movb (%rax), %al
movq -0x18(%rbp), %rsi
movsbl %al, %edi
callq 0x6b1a0
cmpl $0x0, %eax
je 0x69169
movl $0x1, -0x4(%rbp)
jmp 0x69170
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: cssEncode
char *cssEncode(char *s)
/* Returns a cloned string with non-alphanumeric characters replaced by escape codes. */
{
int size = cssEncodeTextSize(s);
char *out = needMem(size+1);
cssEncodeTextExtended(s, out, size+1);
return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x692b0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
addl $0x1, %edx
callq 0x69270
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: javascriptEncode
char *javascriptEncode(char *s)
/* Returns a cloned string with non-alphanumeric characters replaced by escape codes. */
{
int size = javascriptEncodeTextSize(s);
char *out = needMem(size+1);
javascriptEncodeTextExtended(s, out, size+1);
return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x693a0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
addl $0x1, %edx
callq 0x69360
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlVaBadRequestAbort
void htmlVaBadRequestAbort(char *format, va_list args)
/* Print out an HTTP header 400 status code (Bad Request) and message, then exit with error.
 * NOTE: This must be installed using pushWarnHandler (pushAbortHandler optional) because
 * vaErrAbort calls vaWarn and then noWarnAbort.  So if the defaut warn handler is used, then
 * the error message will be printed out by defaultVaWarn before this prints out the header. */
{
puts("Status: 400\r");
puts("Content-Type: text/plain; charset=UTF-8\r");
puts("\r");
if (format != NULL && &args != NULL)
    {
    vfprintf(stdout, format, args);
    fprintf(stdout, "\n");
    }
exit(-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x77654(%rip), %rdi     # 0xe0e5b
callq 0x6bb0
leaq 0x77655(%rip), %rdi     # 0xe0e68
callq 0x6bb0
leaq 0x77647(%rip), %rdi     # 0xe0e66
callq 0x6bb0
cmpq $0x0, -0x8(%rbp)
je 0x6985a
movq 0x9b77e(%rip), %rax     # 0x104fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x69d0
movq 0x9b767(%rip), %rax     # 0x104fb0
movq (%rax), %rdi
leaq 0x6f7c6(%rip), %rsi     # 0xd9019
movb $0x0, %al
callq 0x6a80
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x68b0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: earlyWarningHandler
static void earlyWarningHandler(char *format, va_list args)
/* Write an error message so user can see it before page is really started. */
{
static boolean initted = FALSE;
if (!initted && !errorsNoHeader)
    {
    htmlStart("Very Early Error");
    initted = TRUE;
    }
printf("%s", htmlWarnStartPattern());
fputs("<P>", stdout);
htmlVaEncodeErrorText(format,args);
fputs("</P>\n", stdout);
printf("%s", htmlWarnEndPattern());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, 0xb11d1(%rip)     # 0x11aab8
jne 0x69908
cmpb $0x0, 0xb10c4(%rip)     # 0x11a9b4
jne 0x69908
leaq 0x77e2e(%rip), %rdi     # 0xe1727
callq 0x6a270
movl $0x1, 0xb11b0(%rip)     # 0x11aab8
callq 0x69540
movq %rax, %rsi
leaq 0x706fa(%rip), %rdi     # 0xda011
movb $0x0, %al
callq 0x6070
movq 0x9b68b(%rip), %rax     # 0x104fb0
movq (%rax), %rsi
leaq 0x7705b(%rip), %rdi     # 0xe098a
callq 0x67f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x68130
movq 0x9b668(%rip), %rax     # 0x104fb0
movq (%rax), %rsi
leaq 0x7703c(%rip), %rdi     # 0xe098e
callq 0x67f0
callq 0x69550
movq %rax, %rsi
leaq 0x706ab(%rip), %rdi     # 0xda011
movb $0x0, %al
callq 0x6070
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlSetCookie
void htmlSetCookie(char* name, char* value, char* expires, char* path, char* domain, boolean isSecure)
/* create a cookie with the given stats */
{
char* encoded_name;
char* encoded_value;
char* encoded_path = NULL;

encoded_name = cgiEncode(name);
encoded_value = cgiEncode(value);
if(path != NULL)
	encoded_path = cgiEncode(path);

printf("Set-Cookie: %s=%s; ", encoded_name, encoded_value);

if(expires != NULL)
    printf("expires=%s; ", expires);

if(path != NULL)
    printf("path=%s; ", encoded_path);

if(domain != NULL)
    printf("domain=%s; ", domain);

if(isSecure == TRUE)
    printf("secure");

printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x63e90
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x63e90
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x69a96
movq -0x20(%rbp), %rdi
callq 0x63e90
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq 0x7743f(%rip), %rdi     # 0xe0ee4
movb $0x0, %al
callq 0x6070
cmpq $0x0, -0x18(%rbp)
je 0x69ac5
movq -0x18(%rbp), %rsi
leaq 0x7743a(%rip), %rdi     # 0xe0ef8
movb $0x0, %al
callq 0x6070
cmpq $0x0, -0x20(%rbp)
je 0x69ade
movq -0x48(%rbp), %rsi
leaq 0x7742e(%rip), %rdi     # 0xe0f05
movb $0x0, %al
callq 0x6070
cmpq $0x0, -0x28(%rbp)
je 0x69af7
movq -0x28(%rbp), %rsi
leaq 0x7741f(%rip), %rdi     # 0xe0f0f
movb $0x0, %al
callq 0x6070
cmpl $0x1, -0x2c(%rbp)
jne 0x69b0b
leaq 0x77417(%rip), %rdi     # 0xe0f1b
movb $0x0, %al
callq 0x6070
leaq 0x6f507(%rip), %rdi     # 0xd9019
movb $0x0, %al
callq 0x6070
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: printBodyTag
void printBodyTag(FILE *f)
{
// print starting BODY tag, including any appropriate attributes (class, background and bgcolor). 
fprintf(f, "<BODY");
struct slName *classes = NULL;

slNameAddHead(&classes, "cgi");
char *scriptName = cgiScriptName();
if(isNotEmpty(scriptName))
    {
    char buf[FILENAME_LEN];
    splitPath(scriptName, NULL, buf, NULL);
    slNameAddHead(&classes, cloneString(buf));
}
if (htmlFormClass != NULL )
    slNameAddHead(&classes, htmlFormClass);
fprintf(f, " CLASS=\"%s\"", slNameListToString(classes, ' '));

if (htmlBackground != NULL )
    fprintf(f, " BACKGROUND=\"%s\"", htmlBackground);
if (gotBgColor)
    fprintf(f, " BGCOLOR=\"#%X\"", htmlBgColor);
fputs(">\n",f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x773e8(%rip), %rsi     # 0xe0f22
movb $0x0, %al
callq 0x6a80
movq $0x0, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
leaq 0x78292(%rip), %rsi     # 0xe1de6
callq 0x2bc40
movb $0x0, %al
callq 0x629b0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x69ba6
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x69ba6
movq -0x18(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
callq 0x385d0
leaq -0xa0(%rbp), %rdi
callq 0x2a450
movq %rax, %rsi
leaq -0x10(%rbp), %rdi
callq 0x2bc40
cmpq $0x0, 0xb0ee2(%rip)     # 0x11aa90
je 0x69bc0
movq 0xb0ed9(%rip), %rsi     # 0x11aa90
leaq -0x10(%rbp), %rdi
callq 0x2bc40
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0x2bfb0
movq -0xa8(%rbp), %rdi
movq %rax, %rdx
leaq 0x7733e(%rip), %rsi     # 0xe0f28
movb $0x0, %al
callq 0x6a80
cmpq $0x0, 0xb0ea7(%rip)     # 0x11aaa0
je 0x69c14
movq -0x8(%rbp), %rdi
movq 0xb0e9a(%rip), %rdx     # 0x11aaa0
leaq 0x77327(%rip), %rsi     # 0xe0f34
movb $0x0, %al
callq 0x6a80
cmpl $0x0, 0xb0e8d(%rip)     # 0x11aaa8
je 0x69c35
movq -0x8(%rbp), %rdi
movl 0x9d299(%rip), %edx     # 0x106ec0
leaq 0x77317(%rip), %rsi     # 0xe0f45
movb $0x0, %al
callq 0x6a80
movq -0x8(%rbp), %rsi
leaq 0x7775b(%rip), %rdi     # 0xe139b
callq 0x67f0
addq $0xb0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: makeRandomKey
char *makeRandomKey(int numBits)
/* Generate base64 encoding of a random key of at least size numBits returning string to be freed when done */
{
int numBytes = (numBits + 7) / 8;  // round up to nearest whole byte.
numBytes = ((numBytes+2)/3)*3;  // round up to the nearest multiple of 3 to avoid equals-char padding in base64 output
FILE *f = mustOpen("/dev/urandom", "r");   // open random system device for read-only access.
char *binaryString = needMem(numBytes);
mustRead(f, binaryString, numBytes);
carefulClose(&f);
char * result = base64Encode(binaryString, numBytes); // converts 3 binary bytes into 4 printable characters
int len = strlen(result);
memSwapChar(result, len, '+', 'A'); // replace + and / with characters that are URL-friendly.
memSwapChar(result, len, '/', 'a');
freeMem(binaryString);
return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $0x7, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
addl $0x2, %eax
movl $0x3, %ecx
cltd
idivl %ecx
imull $0x3, %eax, %eax
movl %eax, -0x8(%rbp)
leaq 0x772cd(%rip), %rdi     # 0xe0f54
leaq 0x76108(%rip), %rsi     # 0xdfd96
callq 0x2f780
movq %rax, -0x10(%rbp)
movslq -0x8(%rbp), %rdi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x8(%rbp), %rdx
callq 0x2f920
leaq -0x10(%rbp), %rdi
callq 0x301d0
movq -0x18(%rbp), %rdi
movslq -0x8(%rbp), %rsi
callq 0x608c0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x62c0
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movl $0x2b, %edx
movl $0x41, %ecx
callq 0x2e210
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movl $0x2f, %edx
movl $0x61, %ecx
callq 0x2e210
movq -0x18(%rbp), %rdi
callq 0x40d40
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: getCspMetaHeader
char *getCspMetaHeader()
/* return meta CSP header string */
{
char *policy = getCspPolicyString();
char *meta = getCspMetaString(policy);
freeMem(policy);
return meta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x69da0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x69f40
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x40d40
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmEmptyShell
void htmEmptyShell(void (*doMiddle)(), char *method)
/* Wrap error recovery and and input processing around call to doMiddle. */
{
int status;

/* Set up error recovery (for out of memory and the like)
 * so that we finish web page regardless of problems. */
pushAbortHandler(htmlAbort);
pushWarnHandler(htmlVaWarn);
status = setjmp(htmlRecover);

/* Do your main thing. */
if (status == 0)
    {
    doMiddle();
    }

popWarnHandler();
popAbortHandler();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xbf7(%rip), %rdi      # 0x69870
callq 0x35fd0
leaq -0xe63(%rip), %rdi      # 0x69610
callq 0x35cc0
leaq 0xb0541(%rip), %rdi     # 0x11a9c0
callq 0x6aa0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x6a492
movb $0x0, %al
callq *-0x8(%rbp)
movb $0x0, %al
callq 0x35de0
movb $0x0, %al
callq 0x36050
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmShell
void htmShell(char *title, void (*doMiddle)(), char *method)
{
/* Preamble. */
dnaUtilOpen();
htmlStart(title);

/* Call wrapper for error handling. */
htmEmptyShell(doMiddle, method);

/* Post-script. */
htmlEnd();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, %al
callq 0x34580
movq -0x8(%rbp), %rdi
callq 0x6a270
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6a450
callq 0x6a3b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmShellWithHead
void htmShellWithHead( char *title, char *head, void (*doMiddle)(), char *method)
{
/* Preamble. */
dnaUtilOpen();

puts("Content-Type:text/html");
puts("\n");

puts("<HTML>");
printf("<HEAD>%s<TITLE>%s</TITLE>\n</HEAD>\n\n", head, title);
printBodyTag(stdout);

htmlWarnBoxSetup(stdout);// Sets up a warning box which can be filled with errors as they occur

/* Call wrapper for error handling. */
htmEmptyShell(doMiddle, method);

/* Post-script. */
htmlEnd();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb $0x0, %al
callq 0x34580
leaq 0x76eff(%rip), %rdi     # 0xe1415
callq 0x6bb0
leaq 0x6eaf7(%rip), %rdi     # 0xd9019
callq 0x6bb0
leaq 0x76f66(%rip), %rdi     # 0xe1494
callq 0x6bb0
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rdx
leaq 0x76f59(%rip), %rdi     # 0xe149b
movb $0x0, %al
callq 0x6070
movq 0x9aa60(%rip), %rax     # 0x104fb0
movq (%rax), %rdi
callq 0x69b20
movq 0x9aa51(%rip), %rax     # 0x104fb0
movq (%rax), %rdi
callq 0x69560
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6a450
callq 0x6a3b0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlIncludeFile
void htmlIncludeFile(char *path)
{
char *str = NULL;
size_t len = 0;

if (path == NULL)
    errAbort("Program error: including null file");
if (!fileExists(path))
    errAbort("Missing file %s", path);
readInGulp(path, &str, &len);

if (len <= 0)
    errAbort("Error reading included file: %s", path);

puts(str);
freeMem(str);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x6a5b1
leaq 0x76f15(%rip), %rdi     # 0xe14bf
movb $0x0, %al
callq 0x35d40
movq -0x8(%rbp), %rdi
callq 0x30cb0
cmpl $0x0, %eax
jne 0x6a5d1
movq -0x8(%rbp), %rsi
leaq 0x76f18(%rip), %rdi     # 0xe14e2
movb $0x0, %al
callq 0x35d40
movq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x476d0
cmpq $0x0, -0x18(%rbp)
ja 0x6a5fb
movq -0x8(%rbp), %rsi
leaq 0x76efe(%rip), %rdi     # 0xe14f2
movb $0x0, %al
callq 0x35d40
movq -0x10(%rbp), %rdi
callq 0x6bb0
movq -0x10(%rbp), %rdi
callq 0x40d40
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: htmlSafefAbort
int htmlSafefAbort(boolean noAbort, int errCode, char *format, ...)
/* handle noAbort stderror logging and errAbort */
{
va_list args;
va_start(args, format);
if (noAbort)
    {
    vfprintf(stderr, format, args);
    fprintf(stderr, "\n");
    fflush(stderr);
    }
else
    {
    vaErrAbort(format, args);
    }
va_end(args);
return errCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x6a6b8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
cmpl $0x0, -0x4(%rbp)
je 0x6a741
movq 0x9a8c8(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x69d0
movq 0x9a8b1(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
leaq 0x6e8f0(%rip), %rsi     # 0xd9019
movb $0x0, %al
callq 0x6a80
movq 0x9a899(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
callq 0x6850
jmp 0x6a74e
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x35e80
movl -0x8(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: vaHtmlFprintf
void vaHtmlFprintf(FILE *f, char *format, va_list args)
/* fprintf using html encoding types */
{
struct dyString *ds = newDyString(1024);
vaHtmlDyStringPrintf(ds, format, args);
fputs(ds->string, f);  // does not append newline
freeDyString(&ds);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0x35020
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x68290
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x67f0
leaq -0x20(%rbp), %rdi
callq 0x35080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/htmshell.c
// Function: decodeOneHexChar
static boolean decodeOneHexChar(char c, char *h)
/* Return true if c is a hex char and decode it to h. */
{
*h = *h << 4;
if (c >= '0' && c <= '9')
    *h += (c - '0');	    
else if (c >= 'A' && c <= 'F')
    *h += (c - 'A' + 10);	    
else if (c >= 'a' && c <= 'f')
    *h += (c - 'a' + 10);
else
    return FALSE;
return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
shll $0x4, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movsbl -0x5(%rbp), %eax
cmpl $0x30, %eax
jl 0x6b1e6
movsbl -0x5(%rbp), %eax
cmpl $0x39, %eax
jg 0x6b1e6
movsbl -0x5(%rbp), %edx
subl $0x30, %edx
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
jmp 0x6b245
movsbl -0x5(%rbp), %eax
cmpl $0x41, %eax
jl 0x6b20f
movsbl -0x5(%rbp), %eax
cmpl $0x46, %eax
jg 0x6b20f
movsbl -0x5(%rbp), %edx
subl $0x41, %edx
addl $0xa, %edx
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
jmp 0x6b243
movsbl -0x5(%rbp), %eax
cmpl $0x61, %eax
jl 0x6b238
movsbl -0x5(%rbp), %eax
cmpl $0x66, %eax
jg 0x6b238
movsbl -0x5(%rbp), %edx
subl $0x61, %edx
addl $0xa, %edx
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
jmp 0x6b241
movl $0x0, -0x4(%rbp)
jmp 0x6b24c
jmp 0x6b243
jmp 0x6b245
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/https.c
// Function: openssl_pthread_setup
void openssl_pthread_setup(void)
{
int i;
int numLocks = CRYPTO_num_locks();
AllocArray(mutexes, numLocks);
for (i = 0;  i < numLocks;  i++)
    pthread_mutex_init(&mutexes[i], NULL);
CRYPTO_set_id_callback(openssl_id_callback);
CRYPTO_set_locking_callback(openssl_locking_callback);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, -0x8(%rbp)
movslq -0x8(%rbp), %rax
imulq $0x28, %rax, %rdi
callq 0x409d0
movq %rax, 0xaf81d(%rip)     # 0x11aac0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x6b2d8
movq 0xaf807(%rip), %rdi     # 0x11aac0
movslq -0x4(%rbp), %rax
imulq $0x28, %rax, %rax
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6b10
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x6b2aa
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/https.c
// Function: openSslInit
void openSslInit()
/* do only once */
{
static boolean done = FALSE;
static pthread_mutex_t osiMutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock( &osiMutex );
if (!done)
    {
    SSL_library_init();
    ERR_load_crypto_strings();
    ERR_load_SSL_strings();
    OpenSSL_add_all_algorithms();
    openssl_pthread_setup();
    done = TRUE;
    }
pthread_mutex_unlock( &osiMutex );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xaf7e5(%rip), %rdi     # 0x11aad0
callq 0x6ae0
cmpl $0x0, 0xaf7d1(%rip)     # 0x11aac8
jne 0x6b335
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x6620
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x6330
callq 0x63d0
movl $0xc, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x6330
callq 0x6b280
movl $0x1, 0xaf793(%rip)     # 0x11aac8
leaq 0xaf794(%rip), %rdi     # 0x11aad0
callq 0x64e0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/https.c
// Function: netConnectHttps
int netConnectHttps(char *hostName, int port, boolean noProxy)
/* Return socket for https connection with server or -1 if error. */
{

fflush(stdin);
fflush(stdout);
fflush(stderr);

struct netConnectHttpsParams *params;
AllocVar(params);
params->hostName = cloneString(hostName);
params->port = port;
params->noProxy = noProxy;

socketpair(AF_UNIX, SOCK_STREAM, 0, params->sv);

// netBlockBrokenPipes(); works, but is heavy handed 
//  and ignores SIGPIPE on all connections for all threads in the entire application. 
// We are trying something more subtle and library and thread-friendly instead.

int rc;
rc = pthread_create(&params->thread, NULL, netConnectHttpsThread, (void *)params);
if (rc)
    {
    errAbort("Unexpected error %d from pthread_create(): %s",rc,strerror(rc));
    }

/* parent */

return params->sv[0];

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq 0x98eaf(%rip), %rax     # 0x104fc8
movq (%rax), %rdi
callq 0x6850
movq 0x98e88(%rip), %rax     # 0x104fb0
movq (%rax), %rdi
callq 0x6850
movq 0x98e99(%rip), %rax     # 0x104fd0
movq (%rax), %rdi
callq 0x6850
movl $0x20, %edi
callq 0x40c50
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a450
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rcx
addq $0x18, %rcx
movl $0x1, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x65e0
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0xe4e(%rip), %rdx      # 0x6b350
callq 0x6dc0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x6c1ce
movl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edi
callq 0x6220
movl -0x20(%rbp), %esi
movq %rax, %rdx
leaq 0x70755(%rip), %rdi     # 0xdc91c
movb $0x0, %al
callq 0x35d40
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/internet.c
// Function: internetIsDottedQuad
boolean internetIsDottedQuad(char *s)
/* Returns TRUE if it looks like s is a dotted quad. */
{
int i;
if (!isdigit(s[0]))
    return FALSE;
for (i=0; i<3; ++i)
    {
    s = strchr(s, '.');
    if (s == NULL)
        return FALSE;
    s += 1;
    if (!isdigit(s[0]))
        return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
callq 0x6780
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x6c215
movl $0x0, -0x4(%rbp)
jmp 0x6c28d
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0x6c286
movq -0x10(%rbp), %rdi
movl $0x2e, %esi
callq 0x6260
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6c244
movl $0x0, -0x4(%rbp)
jmp 0x6c28d
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
callq 0x6780
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x6c279
movl $0x0, -0x4(%rbp)
jmp 0x6c28d
jmp 0x6c27b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6c21c
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)