LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x4e403(%rip), %rdi     # 0x97019
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6e70
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
leaq 0x4f326(%rip), %rsi     # 0x97f61
callq 0x20b24
xorl %eax, %eax
callq 0x443a7
testq %rax, %rax
je 0x48c7a
cmpb $0x0, (%rax)
je 0x48c7a
leaq 0x10(%rsp), %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x288ae
movq %r14, %rdi
callq 0x1feba
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x20b24
movq 0x8b9bf(%rip), %rsi     # 0xd4640
testq %rsi, %rsi
je 0x48c90
leaq 0x8(%rsp), %rdi
callq 0x20b24
movq 0x8(%rsp), %rdi
movl $0x20, %esi
callq 0x20dbd
leaq 0x4e379(%rip), %rsi     # 0x9701f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6a90
movq 0x8b996(%rip), %rdx     # 0xd4650
testq %rdx, %rdx
je 0x48cd0
leaq 0x4e365(%rip), %rsi     # 0x9702b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
cmpl $0x0, 0x8b981(%rip)     # 0xd4658
je 0x48cf0
movl 0x77ff1(%rip), %edx     # 0xc0cd0
leaq 0x4e356(%rip), %rsi     # 0x9703c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6a90
leaq 0x4e79b(%rip), %rdi     # 0x97492
movq %rbx, %rsi
callq 0x6810
addq $0x98, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leal 0x7(%rdi), %eax
addl $0xe, %edi
testl %eax, %eax
cmovnsl %eax, %edi
sarl $0x3, %edi
addl $0x2, %edi
movslq %edi, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal (%rax,%rax,2), %ebx
leaq 0x4e307(%rip), %rdi     # 0x9704b
leaq 0x4d1be(%rip), %rsi     # 0x95f09
callq 0x23072
movq %rax, %r14
movq %rsp, %r15
movq %rax, (%r15)
movslq %ebx, %r12
movq %r12, %rdi
callq 0x2dff4
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x23192
movq %r15, %rdi
callq 0x2371e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x42d88
movq %rax, %r14
movq %rax, %rdi
callq 0x62d0
movq %rax, %r15
movq %r14, %rdi
movl %r15d, %esi
movl $0x2b, %edx
movl $0x41, %ecx
callq 0x2233e
movq %r14, %rdi
movl %r15d, %esi
movl $0x2f, %edx
movl $0x61, %ecx
callq 0x2233e
movq %rbx, %rdi
callq 0x2e0a0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
callq 0x48e4d
movq %rax, %rbx
leaq 0x4e2bb(%rip), %rdx     # 0x9731a
movq %rsp, %r14
movq %r14, %rdi
movl $0x400, %esi            # imm = 0x400
movq %rax, %rcx
xorl %eax, %eax
callq 0x23f33
movq %r14, %rdi
callq 0x1feba
movq %rax, %r14
movq %rbx, %rdi
callq 0x2e0a0
movq %r14, %rax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq %rdi, %rbx
leaq -0x8b0(%rip), %rdi      # 0x48ac8
callq 0x27080
leaq -0x4217b(%rip), %rdi    # 0x7209
callq 0x26e47
leaq 0x8b1e0(%rip), %rdi     # 0xd4570
callq 0x6ab0
testl %eax, %eax
jne 0x4939d
xorl %eax, %eax
callq *%rbx
xorl %eax, %eax
movl %eax, %ebx
callq 0x26f14
movl %ebx, %eax
callq 0x270d0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
callq 0x25e47
movq %r14, %rdi
callq 0x49296
movq %rbx, %rdi
callq 0x4936d
movq 0x75bd9(%rip), %rax     # 0xbefb0
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x49303
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
callq 0x25e47
leaq 0x4e10a(%rip), %rdi     # 0x9750c
callq 0x6bb0
leaq 0x45e53(%rip), %rdi     # 0x8f261
callq 0x6bb0
leaq 0x4e171(%rip), %rdi     # 0x9758b
callq 0x6bb0
leaq 0x4e16c(%rip), %rdi     # 0x97592
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x6070
movq 0x75b76(%rip), %r14     # 0xbefb0
movq (%r14), %rdi
callq 0x48c02
movq (%r14), %rdi
callq 0x489bb
movq %rbx, %rdi
callq 0x4936d
movq (%r14), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x49303
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rdi, %rdi
jne 0x49488
leaq 0x4e135(%rip), %rdi     # 0x975b6
xorl %eax, %eax
callq 0x26e94
movq %rbx, %rdi
callq 0x23c5d
testl %eax, %eax
jne 0x494a5
leaq 0x4e13e(%rip), %rdi     # 0x975d9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26e94
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3280a
cmpq $0x0, (%r14)
jne 0x494d1
leaq 0x4e122(%rip), %rdi     # 0x975e9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26e94
movq 0x8(%rsp), %rdi
callq 0x6bb0
movq 0x8(%rsp), %rdi
callq 0x2e0a0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/htmshell.c
// Function: htmlSpecifierToEncoding
char htmlSpecifierToEncoding(char *format, int *pI, boolean noAbort)
/* translate specifier to encoding type */
{
int i = *pI + 1;
int cnt =  0;
char enc;
char spec[7+1];  // only check for 7 characters after |spec| starts.
spec[0] = 0;
if (format[i] == '|')
    {
    ++i;
    while (TRUE)
	{
	char c = format[i++];
	if ((c == 0) || (cnt >= 7)) // end of format string
	    {
	    i = *pI + 1;
	    spec[0] = 0;
	    break;
	    }
	if (c == '|')
	    {
	    spec[cnt] = 0; // terminate spec
	    if (cnt == 0) // double || escapes itself
		i--;      // retain the last | char
	    break;
	    }
	else
	    {
	    spec[cnt++] = c;
	    }
	}
    }
if (sameString(spec,"js"))
    enc  = (enum htmlSafefEncoding) js;
else if (sameString(spec,"css"))
    enc = (enum htmlSafefEncoding) css;
else if (sameString(spec,"attr"))
    enc = (enum htmlSafefEncoding) attr;
else if (sameString(spec,"url"))
    enc = (enum htmlSafefEncoding) url;
else if (sameString(spec,""))
    enc = (enum htmlSafefEncoding) html;
else if (sameString(spec,"none"))
    enc = (enum htmlSafefEncoding) none;
else
    {
    htmlSafefAbort(noAbort, -2, "Unknown spec [%s] in format string [%s].", spec, format);
    return 0;
    }

*pI = i - 1;
return enc;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r8
movl (%rsi), %eax
movslq %eax, %rcx
movb $0x0, 0x8(%rsp)
cmpb $0x7c, 0x1(%rdi,%rcx)
jne 0x49866
movb 0x2(%r8,%rcx), %r9b
testb %r9b, %r9b
je 0x49861
leal 0x3(%rax), %r10d
cmpb $0x7c, %r9b
jne 0x4981f
addq $0x2, %rcx
xorl %edi, %edi
jmp 0x4984d
movslq %r10d, %r10
leal 0x2(%rax), %ecx
addq %r8, %r10
xorl %edi, %edi
movb %r9b, 0x8(%rsp,%rdi)
movb (%r10,%rdi), %r9b
testb %r9b, %r9b
je 0x49861
cmpq $0x5, %rdi
ja 0x49861
incq %rdi
incl %ecx
cmpb $0x7c, %r9b
jne 0x4982a
leal 0x1(%rcx), %r10d
movb $0x0, 0x8(%rsp,%rdi)
testq %rdi, %rdi
cmovel %ecx, %r10d
decl %r10d
movl %r10d, %eax
jmp 0x49866
movb $0x0, 0x8(%rsp)
movzwl 0x8(%rsp), %ecx
xorl $0x736a, %ecx           # imm = 0x736A
movzbl 0xa(%rsp), %edi
orw %cx, %di
je 0x498db
cmpl $0x737363, 0x8(%rsp)    # imm = 0x737363
je 0x498df
movl $0x72747461, %ecx       # imm = 0x72747461
xorl 0x8(%rsp), %ecx
movzbl 0xc(%rsp), %edi
orl %ecx, %edi
je 0x498e3
cmpl $0x6c7275, 0x8(%rsp)    # imm = 0x6C7275
je 0x498e7
cmpb $0x0, 0x8(%rsp)
je 0x498eb
movl $0x656e6f6e, %ecx       # imm = 0x656E6F6E
xorl 0x8(%rsp), %ecx
movzbl 0xc(%rsp), %edi
orl %ecx, %edi
je 0x498ef
leaq 0x4dec1(%rip), %rax     # 0x97782
xorl %ebx, %ebx
leaq 0x8(%rsp), %rcx
movl %edx, %edi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %rax, %rdx
xorl %eax, %eax
callq 0x49529
jmp 0x498f3
movb $0x3, %bl
jmp 0x498f1
movb $0x4, %bl
jmp 0x498f1
movb $0x5, %bl
jmp 0x498f1
movb $0x6, %bl
jmp 0x498f1
movb $0x2, %bl
jmp 0x498f1
movb $0x1, %bl
movl %eax, (%rsi)
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x400, %edi            # imm = 0x400
callq 0x264e0
movq %rax, %r12
leaq 0x8(%rsp), %r13
movq %rax, (%r13)
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x47e6c
movq 0x8(%r12), %rdi
movq %r15, %rsi
callq 0x6810
movq %r13, %rdi
callq 0x2651d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rax
leaq 0x8a8a7(%rip), %rdi     # 0xd4680
callq 0x6ae0
cmpb $0x0, 0x8a893(%rip)     # 0xd4678
jne 0x49e2f
xorl %edi, %edi
xorl %esi, %esi
callq 0x6620
movl $0x2, %edi
xorl %esi, %esi
callq 0x6340
callq 0x63e0
movl $0xc, %edi
xorl %esi, %esi
callq 0x6340
movl $0x28, %edi
callq 0x2de63
movq %rax, 0x8a852(%rip)     # 0xd4670
movq %rax, %rdi
xorl %esi, %esi
callq 0x6b10
movb $0x1, 0x8a849(%rip)     # 0xd4678
leaq 0x8a84a(%rip), %rdi     # 0xd4680
popq %rax
jmp 0x64f0
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movq 0x747fb(%rip), %rax     # 0xbefd0
movq (%rax), %rdi
callq 0x6870
movq 0x747cc(%rip), %rax     # 0xbefb0
movq (%rax), %rdi
callq 0x6870
movq 0x747e5(%rip), %rax     # 0xbefd8
movq (%rax), %rdi
callq 0x6870
movl $0x20, %edi
callq 0x2dff4
movq %rax, %r15
movq %r14, %rdi
callq 0x1feba
movq %rax, 0x8(%r15)
movl %ebp, 0x10(%r15)
movl %ebx, 0x14(%r15)
leaq 0x18(%r15), %rbx
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x65e0
leaq -0x9ff(%rip), %rdx      # 0x49e3c
movq %r15, %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x6dc0
testl %eax, %eax
je 0x4a868
movl %eax, %ebp
movl %eax, %edi
callq 0x6230
leaq 0x48308(%rip), %rdi     # 0x92b64
movl %ebp, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x26e94
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x6790
movq (%rax), %r15
movsbq (%r14), %rax
xorl %ebx, %ebx
testb $0x8, 0x1(%r15,%rax,2)
je 0x4a8cb
movl $0x3, %ebp
movq %r14, %rdi
movl $0x2e, %esi
callq 0x6270
testq %rax, %rax
je 0x4a8cb
movq %rax, %r14
movsbq 0x1(%rax), %rax
testb $0x8, 0x1(%r15,%rax,2)
je 0x4a8cb
incq %r14
decl %ebp
jne 0x4a89d
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/internet.c
// Function: internetHostIp
bits32 internetHostIp(char *hostName)
/* Get IP v4 address (in host byte order) for hostName.
 * Warn and return 0 if there's a problem. */
{
bits32 ret;
if (internetIsDottedQuad(hostName))
    {
    internetDottedQuadToIp(hostName, &ret);
    }
else
    {
    /* getaddrinfo is thread-safe and widely supported */
    struct addrinfo hints, *res;
    struct in_addr addr;
    int err;

    zeroBytes(&hints, sizeof(hints));
    hints.ai_family = AF_INET;

    if ((err = getaddrinfo(hostName, NULL, &hints, &res)) != 0) 
	{
	warn("getaddrinfo() error on hostName=%s: %s\n", hostName, gai_strerror(err));
	return 0;
	}

    addr = ((struct sockaddr_in *)(res->ai_addr))->sin_addr;

    ret = ntohl((uint32_t)addr.s_addr);

    freeaddrinfo(res);

    }
return ret;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
callq 0x4a878
testl %eax, %eax
je 0x4a900
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4a96d
movl (%r14), %r14d
jmp 0x4a962
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, 0x20(%rdx)
movl $0x2, 0x4(%rdx)
xorl %r14d, %r14d
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6960
testl %eax, %eax
je 0x4a94d
movl %eax, %edi
callq 0x6a30
leaq 0x4d254(%rip), %rdi     # 0x97b92
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x26bea
jmp 0x4a962
movq 0x8(%rsp), %rdi
movq 0x18(%rdi), %rax
movl 0x4(%rax), %r14d
bswapl %r14d
callq 0x69a0
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/internet.c
// Function: internetDottedQuadToIp
boolean internetDottedQuadToIp(char *dottedQuad, bits32 *retIp)
/* Convert dotted quad format address to IP4 address in
 * host byte order.  Warn and return FALSE if there's a 
 * problem. */
{
#ifndef __CYGWIN32__
struct in_addr ia;
if (inet_pton(AF_INET, dottedQuad, &ia) < 0)
    {
    warn("internetDottedQuadToIp problem on %s: %s", dottedQuad, strerror(errno));
    return FALSE;
    }
*retIp = ntohl(ia.s_addr);
return TRUE;
#else
warn("Sorry, internetDottedQuadToIp not supported in Windows.");
return FALSE;
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl $0x2, %edi
movq %rbx, %rsi
callq 0x6e30
testl %eax, %eax
js 0x4a9a1
movl 0xc(%rsp), %eax
bswapl %eax
movl %eax, (%r14)
movl $0x1, %ebp
jmp 0x4a9c3
callq 0x6060
movl (%rax), %edi
callq 0x6230
leaq 0x4d23f(%rip), %rdi     # 0x97bf3
xorl %ebp, %ebp
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x26bea
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/internet.c
// Function: internetIpToDottedQuad
boolean internetIpToDottedQuad(bits32 ip, char dottedQuad[17])
/* Convert IP4 address in host byte order to dotted quad 
 * notation.  Warn and return FALSE if there's a 
 * problem. */
{
#ifndef __CYGWIN32__
struct in_addr ia;
zeroBytes(dottedQuad, 17);
ZeroVar(&ia);
ia.s_addr = htonl(ip);
if (inet_ntop(AF_INET, &ia, dottedQuad, 16) == NULL)
    {
    warn("conversion problem on 0x%x in internetIpToDottedQuad: %s", 
    	ip, strerror(errno));
    return FALSE;
    }
return TRUE;
#else
warn("Sorry, internetIpToDottedQuad not supported in Windows.");
return FALSE;
#endif
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rdx
movl %edi, %ebx
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movb $0x0, 0x10(%rsi)
movl %edi, %eax
bswapl %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl $0x2, %edi
movl $0x10, %ecx
callq 0x6720
movl $0x1, %ebp
testq %rax, %rax
jne 0x4aa62
callq 0x6060
movl (%rax), %edi
callq 0x6230
leaq 0x4d166(%rip), %rdi     # 0x97bba
xorl %ebp, %ebp
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x26bea
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/internet.c
// Function: internetParseDottedQuad
void internetParseDottedQuad(char *dottedQuad, unsigned char quad[4])
/* Parse dotted quads into quad */
{
char *s = dottedQuad;
int i;
if (!internetIsDottedQuad(s))
    errAbort("%s is not a dotted quad", s);
for (i=0; i<4; ++i)
    {
    quad[i] = atoi(s);
    s = strchr(s, '.') + 1;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4a878
testl %eax, %eax
jne 0x4aa90
leaq 0x4d196(%rip), %rdi     # 0x97c1c
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x6bd0
movb %al, (%rbx,%r15)
movq %r14, %rdi
movl $0x2e, %esi
callq 0x6270
movq %rax, %r14
incq %r14
incq %r15
cmpq $0x4, %r15
jne 0x4aa93
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/internet.c
// Function: internetIpInSubnet
boolean internetIpInSubnet(unsigned char unpackedIp[4], unsigned char subnet[4])
/* Return true if unpacked IP address is in subnet. */
{
int i;
for (i=0; i<4; ++i)
    {
    unsigned char c = subnet[i];
    if (c == 255)
        return TRUE;
    if (c != unpackedIp[i])
        return FALSE;
    }
return TRUE;
}

// Assembly:
xorl %ecx, %ecx
movl $0x1, %eax
movb (%rsi,%rcx), %dl
cmpb $-0x1, %dl
je 0x4aaf1
cmpb (%rdi,%rcx), %dl
jne 0x4aaf2
incq %rcx
cmpq $0x4, %rcx
jne 0x4aadb
retq
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/portimpl.c
// Function: pathsInDirAndSubdirs
struct slName *pathsInDirAndSubdirs(char *dir, char *wildcard)
/* Return list of all non-directory files in dir and it's
 * subdirs.  Returns path to files including dir and subdir. */
{
struct slName *list = NULL;
rPathsInDirAndSubdirs(dir, wildcard, &list);
slReverse(&list);
return list;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %rbx, %rdx
callq 0x4c078
movq %rbx, %rdi
callq 0x20173
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/portimpl.c
// Function: rPathsInDirAndSubdirs
static void rPathsInDirAndSubdirs(char *dir, char *wildcard, struct slName **pList)
/* Recursively add directory contents that match wildcard (* for all) to list */
{
struct fileInfo *fi, *fiList = listDirX(dir, wildcard, TRUE);
for (fi = fiList; fi != NULL; fi = fi->next)
   {
   if (fi->isDir)
       rPathsInDirAndSubdirs(fi->name, wildcard, pList);
   else
       slNameAddHead(pList, fi->name);
   }
slFreeList(&fiList);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl $0x1, %edx
callq 0x34c13
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x4c0c9
movq %rax, %r15
leaq 0x20(%r15), %rsi
cmpb $0x0, 0x10(%r15)
je 0x4c0b9
movq %rsi, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4c078
jmp 0x4c0c1
movq %rbx, %rdi
callq 0x20b24
movq (%r15), %r15
testq %r15, %r15
jne 0x4c09e
leaq 0x8(%rsp), %rdi
callq 0x20196
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/portimpl.c
// Function: setupWss
static void setupWss()
{
if (wss == NULL)
    {
    char *s = getenv("SERVER_SOFTWARE");
    wss = &wssDefault;
    if (s == NULL)
        {
	wss = &wssCommandLine;
        }
    else
        {
        if (strncmp(wssMicrosoftII.name, s, strlen(wssMicrosoftII.name)) == 0)
            wss = &wssMicrosoftII;
        else if (strncmp(wssMicrosoftPWS.name, s, strlen(wssMicrosoftPWS.name)) == 0)
            wss = &wssMicrosoftPWS;
	else 
	    {
	    char *t = getenv("HTTP_HOST");
	    if (t != NULL)
		{
		if (sameWord(t, "Crunx"))
		    wss = &wssLinux;
		else if (endsWith(t, "brc.mcw.edu"))
		    wss = &wssBrcMcw;
		}
	    }
        }
    }
}

// Assembly:
cmpq $0x0, 0x885d3(%rip)     # 0xd46b8
je 0x4c0e8
retq
pushq %r15
pushq %r14
pushq %rbx
leaq 0x4c006(%rip), %rdi     # 0x980fa
callq 0x68f0
movq %rax, %rbx
leaq 0x74bfd(%rip), %rax     # 0xc0d00
movq %rax, 0x885ae(%rip)     # 0xd46b8
testq %rbx, %rbx
je 0x4c19e
leaq 0x74c5e(%rip), %r15     # 0xc0d78
movq (%r15), %r14
movq %r14, %rdi
callq 0x62d0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x6330
testl %eax, %eax
je 0x4c1a5
leaq 0x74c62(%rip), %r15     # 0xc0da0
movq (%r15), %r14
movq %r14, %rdi
callq 0x62d0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x6330
testl %eax, %eax
je 0x4c1a5
leaq 0x47360(%rip), %rdi     # 0x934c2
callq 0x68f0
testq %rax, %rax
je 0x4c1ac
movq %rax, %rbx
leaq 0x4bf94(%rip), %rsi     # 0x9810a
movq %rax, %rdi
callq 0x209d6
testl %eax, %eax
je 0x4c1b2
leaq 0x4bf87(%rip), %rsi     # 0x98110
movq %rbx, %rdi
callq 0x21e4c
testl %eax, %eax
je 0x4c1ac
leaq 0x74b3c(%rip), %r15     # 0xc0cd8
jmp 0x4c1a5
leaq 0x74bab(%rip), %r15     # 0xc0d50
movq %r15, 0x8850c(%rip)     # 0xd46b8
popq %rbx
popq %r14
popq %r15
retq
leaq 0x74b6f(%rip), %r15     # 0xc0d28
jmp 0x4c1a5
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/servCrunx.c
// Function: makeTempName
static void _makeTempName(struct tempName *tn, char *base, char *suffix)
/* Figure out a temp name, and how CGI and HTML will access it. */
{
char *tname;
char *tempDirCgi = __trashDir;
char *tempDirHtml = "/trash";
int tlcLen = strlen(tempDirCgi);
int tlhLen = strlen(tempDirHtml);

tname = rTempName(tempDirCgi, base, suffix);
strcpy(tn->forCgi, tname);
memcpy(tn->forHtml, tempDirHtml, tlhLen);
strcpy(tn->forHtml+tlhLen, tn->forCgi+tlcLen);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x4bed0(%rip), %rdi     # 0x9813f
callq 0x34eb8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6680
movl $0x6172742f, 0x1000(%rbx) # imm = 0x6172742F
movw $0x6873, 0x1004(%rbx)   # imm = 0x6873
leaq 0x1006(%rbx), %rdi
addq $0x16, %rbx
movq %rbx, %rsi
popq %rbx
jmp 0x6680
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/servcl.c
// Function: trashDir
static char *_trashDir()
/* Return the path for temporary files: default is "." but env var JKTRASH can override. */
{
static char *__trashDir = NULL;
if (__trashDir == NULL)
    {
    char *jktrashDir = getenv("JKTRASH");
    __trashDir = jktrashDir ? jktrashDir : ".";
    }
return __trashDir;
}

// Assembly:
movq 0x8836e(%rip), %rax     # 0xd46c0
testq %rax, %rax
je 0x4c358
retq
pushq %rax
leaq 0x4be08(%rip), %rdi     # 0x98168
callq 0x68f0
movq %rax, %rcx
testq %rax, %rax
leaq 0x44606(%rip), %rax     # 0x90978
cmovneq %rcx, %rax
movq %rax, 0x88343(%rip)     # 0xd46c0
addq $0x8, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: parse_version
static void
parse_version(htsFormat *fmt, const unsigned char *u, const unsigned char *ulim)
{
    const char *str  = (const char *) u;
    const char *slim = (const char *) ulim;
    const char *s;

    fmt->version.major = fmt->version.minor = -1;

    for (s = str; s < slim; s++) if (!isdigit(*s)) break;
    if (s < slim) {
        fmt->version.major = atoi(str);
        if (*s == '.') {
            str = &s[1];
            for (s = str; s < slim; s++) if (!isdigit(*s)) break;
            if (s < slim)
                fmt->version.minor = atoi(str);
        }
        else
            fmt->version.minor = 0;
    }
}

// Assembly:
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
cmpq %rdx, %rsi
jae 0x4d243
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
callq 0x6790
movq (%rax), %r13
movq %r12, %r15
movsbq (%r15), %rax
testb $0x8, 0x1(%r13,%rax,2)
je 0x4d1f7
incq %r15
cmpq %r14, %r15
jne 0x4d1e1
jmp 0x4d23a
movq %r12, %rdi
callq 0x6bd0
movw %ax, 0x8(%rbx)
cmpb $0x2e, (%r15)
jne 0x4d22a
incq %r15
cmpq %r14, %r15
jae 0x4d23a
movq %r15, %rax
movsbq (%rax), %rcx
testb $0x8, 0x1(%r13,%rcx,2)
je 0x4d22e
incq %rax
cmpq %r14, %rax
jb 0x4d214
jmp 0x4d23a
xorl %eax, %eax
jmp 0x4d236
movq %r15, %rdi
callq 0x6bd0
movw %ax, 0xa(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_open_format
htsFile *hts_open_format(const char *fn, const char *mode, const htsFormat *fmt)
{
    char smode[102], *cp, *cp2, *mode_c;
    htsFile *fp = NULL;
    hFILE *hfile;
    char fmt_code = '\0';

    strncpy(smode, mode, 100);
    smode[100]=0;
    if ((cp = strchr(smode, ',')))
        *cp = '\0';

    // Migrate format code (b or c) to the end of the smode buffer.
    for (cp2 = cp = smode; *cp; cp++) {
        if (*cp == 'b')
            fmt_code = 'b';
        else if (*cp == 'c')
            fmt_code = 'c';
        else
            *cp2++ = *cp;
    }
    mode_c = cp2;
    *cp2++ = fmt_code;
    *cp2++ = 0;
    *cp2++ = 0;

    // Set or reset the format code if opts->format is used
    if (fmt && fmt->format != unknown_format)
        *mode_c = "\0g\0\0b\0c\0\0b\0g\0\0"[fmt->format];

    hfile = hopen(fn, smode);
    if (hfile == NULL) goto error;

    fp = hts_hopen(hfile, fn, smode);
    if (fp == NULL) goto error;

    if (fmt && fmt->specific)
        if (hts_opt_apply(fp, fmt->specific) != 0)
            goto error;

    return fp;

error:
    if (hts_verbose >= 2)
        fprintf(stderr, "[E::%s] fail to open file '%s'\n", __func__, fn);

    if (hfile)
        hclose_abruptly(hfile);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsp, %r15
movl $0x64, %edx
movq %r15, %rdi
callq 0x6380
movb $0x0, 0x64(%r15)
movq %r15, %rdi
movl $0x2c, %esi
callq 0x6270
testq %rax, %rax
je 0x4dbd9
movb $0x0, (%rax)
xorl %ecx, %ecx
movq %r15, %rax
movb (%r15), %dl
movzbl %dl, %esi
leal -0x62(%rsi), %edi
cmpl $0x2, %edi
jae 0x4dbf0
movl %edx, %ecx
jmp 0x4dbf9
testl %esi, %esi
je 0x4dbfe
movb %dl, (%rax)
incq %rax
incq %r15
jmp 0x4dbde
movb %cl, (%rax)
movw $0x0, 0x1(%rax)
testq %r14, %r14
je 0x4dc20
movl 0x4(%r14), %ecx
testq %rcx, %rcx
je 0x4dc20
leaq 0x4a7f5(%rip), %rdx     # 0x98410
movb (%rcx,%rdx), %cl
movb %cl, (%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6b721
movq %rax, %r15
testq %rax, %rax
je 0x4dc6d
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4dcb9
testq %rax, %rax
je 0x4dc6d
movq %rax, %r12
testq %r14, %r14
je 0x4dc86
movq 0x18(%r14), %r14
testq %r14, %r14
je 0x4dc86
movl 0x8(%r14), %esi
movq 0x10(%r14), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x4e48b
testl %eax, %eax
je 0x4dc4e
cmpl $0x2, 0x73154(%rip)     # 0xc0dc8
jge 0x4dc95
testq %r15, %r15
je 0x4dc83
movq %r15, %rdi
callq 0x6b3ed
xorl %r12d, %r12d
movq %r12, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x7133c(%rip), %rax     # 0xbefd8
movq (%rax), %rdi
leaq 0x4a85e(%rip), %rsi     # 0x98504
leaq 0x4a877(%rip), %rdx     # 0x98524
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6a90
jmp 0x4dc76
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_set_opt
int hts_set_opt(htsFile *fp, enum hts_fmt_option opt, ...) {
    int r;
    va_list args;

    if (opt == HTS_OPT_NTHREADS) {
        va_start(args, opt);
        int nthreads = va_arg(args, int);
        va_end(args);
        return hts_set_threads(fp, nthreads);
    }

    if (fp->format.format != cram)
        return 0;

    va_start(args, opt);
    r = cram_set_voption(fp->fp.cram, opt, args);
    va_end(args);

    return r;
}

// Assembly:
subq $0xd8, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x4e4e1
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)
cmpl $0x65, %esi
jne 0x4e528
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movl $0x10, %ecx
cmpq $0x28, %rcx
ja 0x4e560
movl $0x10, %eax
addq 0x10(%rsp), %rax
addl $0x8, %ecx
movl %ecx, (%rsp)
jmp 0x4e56e
xorl %eax, %eax
cmpl $0x6, 0x44(%rdi)
jne 0x4e575
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x38(%rdi), %rdi
callq 0x5d069
jmp 0x4e575
movq 0x8(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movl (%rax), %esi
callq 0x4e88c
addq $0xd8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_parse_format
int hts_parse_format(htsFormat *format, const char *str) {
    const char *cp;

    if (!(cp = strchr(str, ',')))
        cp = str+strlen(str);

    format->version.minor = 0; // unknown
    format->version.major = 0; // unknown

    if (strncmp(str, "sam", cp-str) == 0) {
        format->category          = sequence_data;
        format->format            = sam;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strncmp(str, "bam", cp-str) == 0) {
        format->category          = sequence_data;
        format->format            = bam;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else if (strncmp(str, "cram", cp-str) == 0) {
        format->category          = sequence_data;
        format->format            = cram;
        format->compression       = custom;
        format->compression_level = -1;
    } else if (strncmp(str, "vcf", cp-str) == 0) {
        format->category          = variant_data;
        format->format            = vcf;
        format->compression       = no_compression;;
        format->compression_level = 0;
    } else if (strncmp(str, "bcf", cp-str) == 0) {
        format->category          = variant_data;
        format->format            = bcf;
        format->compression       = bgzf;
        format->compression_level = -1;
    } else {
        return -1;
    }

    return hts_parse_opt_list(format, cp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2c, %esi
callq 0x6270
movq %rax, %r14
testq %rax, %rax
jne 0x4e691
movq %r15, %rdi
callq 0x62d0
movq %rax, %r14
addq %r15, %r14
movl $0x0, 0x8(%rbx)
movq %r14, %r12
subq %r15, %r12
leaq 0x49ffa(%rip), %rsi     # 0x9869f
movq %r15, %rdi
movq %r12, %rdx
callq 0x6330
testl %eax, %eax
je 0x4e72a
leaq 0x49fe8(%rip), %rsi     # 0x986a3
movq %r15, %rdi
movq %r12, %rdx
callq 0x6330
movw $0xffff, %r13w          # imm = 0xFFFF
movl $0x2, %ebp
testl %eax, %eax
je 0x4e739
leaq 0x49fcc(%rip), %rsi     # 0x986a7
movq %r15, %rdi
movq %r12, %rdx
callq 0x6330
testl %eax, %eax
je 0x4e743
leaq 0x4a01c(%rip), %rsi     # 0x9870d
movq %r15, %rdi
movq %r12, %rdx
callq 0x6330
testl %eax, %eax
je 0x4e752
leaq 0x4a00b(%rip), %rsi     # 0x98712
movq %r15, %rdi
movq %r12, %rdx
callq 0x6330
testl %eax, %eax
je 0x4e75c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x49ace(%rip), %xmm0    # 0x98200
xorl %ebp, %ebp
xorl %r13d, %r13d
jmp 0x4e764
movsd 0x49acf(%rip), %xmm0    # 0x98210
jmp 0x4e764
movsd 0x49ad5(%rip), %xmm0    # 0x98220
movl $0x3, %ebp
jmp 0x4e764
movsd 0x49ad6(%rip), %xmm0    # 0x98230
jmp 0x4e732
movsd 0x49adc(%rip), %xmm0    # 0x98240
movlps %xmm0, (%rbx)
movl %ebp, 0xc(%rbx)
movw %r13w, 0x10(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4e5ad
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_close
int hts_close(htsFile *fp)
{
    int ret, save;

    switch (fp->format.format) {
    case binary_format:
    case bam:
    case bcf:
        ret = bgzf_close(fp->fp.bgzf);
        break;

    case cram:
        if (!fp->is_write) {
            switch (cram_eof(fp->fp.cram)) {
            case 2:
                fprintf(stderr, "[W::%s] EOF marker is absent. The input is probably truncated.\n", __func__);
                break;
            case 0:  /* not at EOF, but may not have wanted all seqs */
            default: /* case 1, expected EOF */
                break;
            }
        }
        ret = cram_close(fp->fp.cram);
        break;

    case text_format:
    case sam:
    case vcf:
        if (!fp->is_write) {
        #if KS_BGZF
            BGZF *gzfp = ((kstream_t*)fp->fp.voidp)->f;
            ret = bgzf_close(gzfp);
        #else
            gzFile gzfp = ((kstream_t*)fp->fp.voidp)->f;
            ret = gzclose(gzfp);
        #endif
            ks_destroy((kstream_t*)fp->fp.voidp);
        }
        else if (fp->format.compression != no_compression)
            ret = bgzf_close(fp->fp.bgzf);
        else
            ret = hclose(fp->fp.hfile);
        break;

    default:
        ret = -1;
        break;
    }

    save = errno;
    free(fp->fn);
    free(fp->fn_aux);
    free(fp->line.s);
    free(fp);
    errno = save;
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x44(%rdi), %eax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $0x9, %eax
ja 0x4e80c
movl $0x10c, %ecx            # imm = 0x10C
btl %eax, %ecx
jb 0x4e7b9
movl $0x212, %ecx            # imm = 0x212
btl %eax, %ecx
jae 0x4e7d8
movq 0x38(%rbx), %rdi
jmp 0x4e805
testb $0x2, (%rbx)
jne 0x4e7fb
movq 0x38(%rbx), %rax
movq 0x18(%rax), %rdi
callq 0x68235
movl %eax, %ebp
movq 0x38(%rbx), %rdi
callq 0x4c4e9
jmp 0x4e80c
cmpl $0x6, %eax
jne 0x4e80c
testb $0x2, (%rbx)
jne 0x4e7f0
movq 0x38(%rbx), %rdi
callq 0x5cfde
cmpl $0x2, %eax
je 0x4e851
movq 0x38(%rbx), %rdi
callq 0x5cd58
jmp 0x4e80a
cmpl $0x0, 0x4c(%rbx)
movq 0x38(%rbx), %rdi
je 0x4e84a
callq 0x68235
movl %eax, %ebp
callq 0x6060
movq %rax, %r14
movl (%rax), %r15d
movq 0x28(%rbx), %rdi
callq 0x68a0
movq 0x30(%rbx), %rdi
callq 0x68a0
movq 0x20(%rbx), %rdi
callq 0x68a0
movq %rbx, %rdi
callq 0x68a0
movl %r15d, (%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x6b393
jmp 0x4e80a
callq 0x75f2
jmp 0x4e7f0
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_set_threads
int hts_set_threads(htsFile *fp, int n)
{
    if (fp->format.compression == bgzf) {
        return bgzf_mt(fp->fp.bgzf, n, 256);
    } else if (fp->format.format == cram) {
        return hts_set_opt(fp, CRAM_OPT_NTHREADS, n);
    }
    else return 0;
}

// Assembly:
movl %esi, %edx
cmpl $0x2, 0x4c(%rdi)
jne 0x4e8a4
movq 0x38(%rdi), %rdi
movl %edx, %esi
movl $0x100, %edx            # imm = 0x100
jmp 0x67aaa
cmpl $0x6, 0x44(%rdi)
jne 0x4e8b6
movl $0xe, %esi
xorl %eax, %eax
jmp 0x4e48b
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_useek
int hts_useek(htsFile *fp, long uoffset, int where)
{
    if ( fp->is_bin )
        return bgzf_useek(fp->fp.bgzf, uoffset, where);
    else
    {
        ks_rewind((kstream_t*)fp->fp.voidp);
        ((kstream_t*)fp->fp.voidp)->seek_pos = uoffset;
        return bgzf_useek(((kstream_t*)fp->fp.voidp)->f, uoffset, where);
    }
}

// Assembly:
movq 0x38(%rdi), %rax
testb $0x1, (%rdi)
jne 0x4e961
xorl %ecx, %ecx
movl %ecx, 0x4(%rax)
movq 0x38(%rdi), %rax
movl %ecx, (%rax)
movq 0x38(%rdi), %rax
andl $-0x4, 0x8(%rax)
movq 0x38(%rdi), %rax
movq %rsi, 0x10(%rax)
movq 0x38(%rdi), %rax
movq 0x18(%rax), %rax
movq %rax, %rdi
jmp 0x68ea3
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_getline
int hts_getline(htsFile *fp, int delimiter, kstring_t *str)
{
    int ret, dret;
    ret = ks_getuntil((kstream_t*)fp->fp.voidp, delimiter, str, &dret);
    ++fp->lineno;
    return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
leaq 0xc(%rsp), %rcx
xorl %r8d, %r8d
callq 0x4c505
incq 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_idx_save
int hts_idx_save(const hts_idx_t *idx, const char *fn, int fmt)
{
    int ret, save;
    char *fnidx = (char*)calloc(1, strlen(fn) + 5);
    if (fnidx == NULL) return -1;

    strcpy(fnidx, fn);
    switch (fmt) {
    case HTS_FMT_BAI: strcat(fnidx, ".bai"); break;
    case HTS_FMT_CSI: strcat(fnidx, ".csi"); break;
    case HTS_FMT_TBI: strcat(fnidx, ".tbi"); break;
    default: abort();
    }

    ret = hts_idx_save_as(idx, fn, fnidx, fmt);
    save = errno;
    free(fnidx);
    errno = save;
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movq %rsi, %rdi
callq 0x62d0
leaq 0x5(%rax), %rsi
movl $0x1, %edi
callq 0x6470
testq %rax, %rax
je 0x50928
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x6680
testl %ebx, %ebx
je 0x50941
cmpl $0x2, %ebx
je 0x5092f
cmpl $0x1, %ebx
jne 0x50989
movq %r15, %rdi
callq 0x62d0
movl $0x6961622e, (%r15,%rax) # imm = 0x6961622E
jmp 0x50951
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x50980
movq %r15, %rdi
callq 0x62d0
movl $0x6962742e, (%r15,%rax) # imm = 0x6962742E
jmp 0x50951
movq %r15, %rdi
callq 0x62d0
movl $0x6973632e, (%r15,%rax) # imm = 0x6973632E
movb $0x0, 0x4(%r15,%rax)
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x5098e
movl %eax, %ebx
callq 0x6060
movq %rax, %r14
movl (%rax), %ebp
movq %r15, %rdi
callq 0x68a0
movl %ebp, (%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x63c0
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_idx_save_as
int hts_idx_save_as(const hts_idx_t *idx, const char *fn, const char *fnidx, int fmt)
{
    if (fnidx == NULL) return hts_idx_save(idx, fn, fmt);

    if (fmt == HTS_FMT_CSI) {
        BGZF *fp;
        uint32_t x[3];
        int is_be, i;
        is_be = ed_is_big();
        fp = bgzf_open(fnidx, "w");
        if (fp == NULL) return -1;
        bgzf_write(fp, "CSI\1", 4);
        x[0] = idx->min_shift; x[1] = idx->n_lvls; x[2] = idx->l_meta;
        if (is_be) {
            for (i = 0; i < 3; ++i)
                bgzf_write(fp, ed_swap_4p(&x[i]), 4);
        } else bgzf_write(fp, &x, 12);
        if (idx->l_meta) bgzf_write(fp, idx->meta, idx->l_meta);
        hts_idx_save_core(idx, fp, HTS_FMT_CSI);
        bgzf_close(fp);
    } else if (fmt == HTS_FMT_TBI) {
        BGZF *fp = bgzf_open(fnidx, "w");
        if (fp == NULL) return -1;
        bgzf_write(fp, "TBI\1", 4);
        hts_idx_save_core(idx, fp, HTS_FMT_TBI);
        bgzf_close(fp);
    } else if (fmt == HTS_FMT_BAI) {
        FILE *fp = fopen(fnidx, "w");
        if (fp == NULL) return -1;
        fwrite("BAI\1", 1, 4, fp);
        hts_idx_save_core(idx, fp, HTS_FMT_BAI);
        fclose(fp);
    } else abort();

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testq %rdx, %rdx
je 0x50a38
cmpl $0x2, %ecx
je 0x50a94
cmpl $0x1, %ecx
je 0x50a4a
testl %ecx, %ecx
jne 0x50aeb
leaq 0x3e386(%rip), %rsi     # 0x8ed49
movq %rdx, %rdi
callq 0x66abc
testq %rax, %rax
je 0x50adb
movq %rax, %r14
leaq 0x47a77(%rip), %rsi     # 0x98455
movl $0x4, %edx
movq %rax, %rdi
callq 0x680cf
movq 0x4(%rbx), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movl 0x10(%rbx), %eax
movl %eax, 0x8(%rsi)
movl $0xc, %edx
movq %r14, %rdi
callq 0x680cf
movl 0x10(%rbx), %edx
testq %rdx, %rdx
je 0x50a1c
movq 0x38(%rbx), %rsi
movq %r14, %rdi
callq 0x680cf
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x50af0
movq %r14, %rdi
callq 0x68235
jmp 0x50ae0
movq %rbx, %rdi
movl %ecx, %edx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x508cf
leaq 0x3e2f8(%rip), %rsi     # 0x8ed49
movq %rdx, %rdi
callq 0x6880
testq %rax, %rax
je 0x50adb
movq %rax, %r14
leaq 0x479e8(%rip), %rdi     # 0x98450
movl $0x1, %esi
movl $0x4, %edx
movq %rax, %rcx
callq 0x6e70
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x50af0
movq %r14, %rdi
callq 0x66e0
jmp 0x50ad7
leaq 0x3e2ae(%rip), %rsi     # 0x8ed49
movq %rdx, %rdi
callq 0x66abc
testq %rax, %rax
je 0x50adb
movq %rax, %r14
leaq 0x479a8(%rip), %rsi     # 0x9845a
movl $0x4, %edx
movq %rax, %rdi
callq 0x680cf
movq %rbx, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x50af0
movq %r14, %rdi
callq 0x68235
xorl %ebp, %ebp
jmp 0x50ae0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x63c0
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_parse_reg
const char *hts_parse_reg(const char *s, int *beg, int *end)
{
    char *hyphen;
    const char *colon = strrchr(s, ':');
    if (colon == NULL) {
        *beg = 0; *end = INT_MAX;
        return s + strlen(s);
    }

    *beg = hts_parse_decimal(colon+1, &hyphen, HTS_PARSE_THOUSANDS_SEP) - 1;
    if (*beg < 0) *beg = 0;

    if (*hyphen == '\0') *end = INT_MAX;
    else if (*hyphen == '-') *end = hts_parse_decimal(hyphen+1, NULL, HTS_PARSE_THOUSANDS_SEP);
    else return NULL;

    if (*beg >= *end) return NULL;
    return colon;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movl $0x3a, %esi
callq 0x67c0
testq %rax, %rax
je 0x51a94
movq %rax, %r15
leaq 0x1(%rax), %rdi
movq %rsp, %r12
movq %r12, %rsi
movl $0x1, %edx
callq 0x517ce
movq %rax, %rcx
decl %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
movl %ecx, (%rbx)
movq (%r12), %rdi
movzbl (%rdi), %ecx
testl %ecx, %ecx
je 0x51aae
cmpl $0x2d, %ecx
jne 0x51abe
incq %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x517ce
movq %rax, %rcx
jmp 0x51ab3
movl $0x0, (%rbx)
movl $0x7fffffff, (%r14)     # imm = 0x7FFFFFFF
movq %r12, %rdi
callq 0x62d0
addq %r12, %rax
jmp 0x51abe
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, (%r14)
xorl %eax, %eax
cmpl %ecx, (%rbx)
cmovlq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/htslib/hts.c
// Function: hts_itr_querys
hts_itr_t *hts_itr_querys(const hts_idx_t *idx, const char *reg, hts_name2id_f getid, void *hdr, hts_itr_query_func *itr_query, hts_readrec_func *readrec)
{
    int tid, beg, end;
    const char *q;

    if (strcmp(reg, ".") == 0)
        return itr_query(idx, HTS_IDX_START, 0, 0, readrec);
    else if (strcmp(reg, "*") == 0)
        return itr_query(idx, HTS_IDX_NOCOOR, 0, 0, readrec);

    q = hts_parse_reg(reg, &beg, &end);
    if (q) {
        char *tmp = (char*)alloca(q - reg + 1);
        strncpy(tmp, reg, q - reg);
        tmp[q - reg] = 0;
        tid = getid(hdr, tmp);
    }
    else {
        // not parsable as a region, but possibly a sequence named "foo:a"
        tid = getid(hdr, reg);
        beg = 0; end = INT_MAX;
    }

    if (tid < 0) return NULL;
    return itr_query(idx, tid, beg, end, readrec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %r9
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movzbl (%rsi), %eax
cmpl $0x2a, %eax
je 0x51b0b
cmpl $0x2e, %eax
jne 0x51b16
cmpb $0x0, 0x1(%r13)
jne 0x51b16
movq %r15, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
jmp 0x51bc5
cmpb $0x0, 0x1(%r13)
je 0x51bbd
movq %rcx, -0x38(%rbp)
movq %r9, -0x48(%rbp)
leaq -0x30(%rbp), %rsi
leaq -0x2c(%rbp), %rdx
movq %r13, %rdi
callq 0x51a2b
testq %rax, %rax
je 0x51b79
movq %rax, %rbx
subq %r13, %rbx
leaq 0x10(%rbx), %rax
andq $-0x10, %rax
movq %r12, -0x40(%rbp)
movq %r15, %r12
movq %r14, %r15
movq %rsp, %r14
subq %rax, %r14
movq %r14, %rsp
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x6380
movb $0x0, (%rbx,%r14)
movq -0x38(%rbp), %rdi
movq %r14, %rsi
movq %r15, %r14
movq %r12, %r15
callq *-0x40(%rbp)
jmp 0x51b91
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq *%r12
movl $0x0, -0x30(%rbp)
movl $0x7fffffff, -0x2c(%rbp) # imm = 0x7FFFFFFF
testl %eax, %eax
movq -0x48(%rbp), %r9
js 0x51bac
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
movq %r15, %rdi
movl %eax, %esi
movq %r14, %r8
callq *%r9
jmp 0x51bae
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r9