LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netGetLongString
char *netGetLongString(int sd)
/* Read string and return it.  freeMem
 * the result when done. */
{
UBYTE b[2];
char *s = NULL;
int length = 0;
int sz;
b[0] = b[1] = 0;
sz = netReadAll(sd, b, 2);
if (sz == 0)
    return NULL;
if (sz < 0)
    {
    warn("Couldn't read long string length");
    return NULL;
    }
length = (b[0]<<8) + b[1];
s = needMem(length+1);
if (length > 0)
    if (netReadAll(sd, s, length) < 0)
	{
	warn("Couldn't read long string body");
	return NULL;
	}
s[length] = 0;
return s;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebp
leaq 0xe(%rsp), %rsi
movw $0x0, (%rsi)
movl $0x2, %edx
callq 0x2ec04
testl %eax, %eax
je 0x31102
js 0x31106
movzwl 0xe(%rsp), %eax
rolw $0x8, %ax
movzwl %ax, %r14d
leal 0x1(%r14), %edi
callq 0x2dff4
movq %rax, %rbx
testw %r14w, %r14w
je 0x31118
movl %r14d, %r14d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2ec04
testq %rax, %rax
jns 0x3111b
leaq 0x614c1(%rip), %rdi     # 0x925c1
jmp 0x3110d
xorl %ebx, %ebx
jmp 0x31120
leaq 0x61493(%rip), %rdi     # 0x925a0
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x26bea
jmp 0x31120
xorl %r14d, %r14d
movb $0x0, (%rbx,%r14)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netGetHugeString
char *netGetHugeString(int sd)
/* Read string and return it.  freeMem
 * the result when done. */
{
UBYTE b[4];
char *s = NULL;
unsigned long length = 0;
int sz, i;
sz = netReadAll(sd, b, 4);
if (sz == 0)
    return NULL;
if (sz < 4)
    {
    warn("Couldn't read huge string length");
    return NULL;
    }
for (i=0; i<4; ++i)
    {
    length <<= 8;
    length += b[i];
    }
s = needMem(length+1);
if (length > 0)
    {
    if (netReadAll(sd, s, length) < 0)
	{
	warn("Couldn't read huge string body");
	return NULL;
	}
    }
s[length] = 0;
return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x2ec04
testl %eax, %eax
je 0x31162
cmpl $0x4, %eax
jge 0x31167
leaq 0x6148a(%rip), %rdi     # 0x925e0
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x26bea
jmp 0x311ad
xorl %r14d, %r14d
jmp 0x311ad
xorl %eax, %eax
xorl %r15d, %r15d
movq %r15, %rcx
shlq $0x8, %rcx
movzbl 0xc(%rsp,%rax), %r15d
orq %rcx, %r15
incq %rax
cmpq $0x4, %rax
jne 0x3116c
leaq 0x1(%r15), %rdi
callq 0x2dff4
movq %rax, %r14
testq %r15, %r15
je 0x311a8
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2ec04
testq %rax, %rax
js 0x311ba
movb $0x0, (%r14,%r15)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x61440(%rip), %rdi     # 0x92601
jmp 0x31156
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netRecieveString
char *netRecieveString(int sd, char buf[256])
/* Read string into buf and return it.  If buf is NULL
 * an internal buffer will be used. Abort if any problem. */
{
char *s = netGetString(sd, buf);
if (s == NULL)
     noWarnAbort();   
return s;
}

// Assembly:
pushq %rbx
callq 0x3101e
movq %rax, %rbx
testq %rax, %rax
jne 0x311d8
xorl %eax, %eax
callq 0x26f4f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netRecieveLongString
char *netRecieveLongString(int sd)
/* Read string and return it.  freeMem
 * the result when done. Abort if any problem*/
{
char *s = netGetLongString(sd);
if (s == NULL)
     noWarnAbort();   
return s;
}

// Assembly:
pushq %rbx
callq 0x310a1
movq %rax, %rbx
testq %rax, %rax
jne 0x311f2
xorl %eax, %eax
callq 0x26f4f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netRecieveHugeString
char *netRecieveHugeString(int sd)
/* Read string and return it.  freeMem
 * the result when done. Abort if any problem*/
{
char *s = netGetHugeString(sd);
if (s == NULL)
     noWarnAbort();   
return s;
}

// Assembly:
pushq %rbx
callq 0x3112c
movq %rax, %rbx
testq %rax, %rax
jne 0x3120c
xorl %eax, %eax
callq 0x26f4f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netHttpLineFileMayOpen
struct lineFile *netHttpLineFileMayOpen(char *url, struct netParsedUrl **npu)
/* Parse URL and open an HTTP socket for it but don't send a request yet. */
{
int sd;
struct lineFile *lf;

/* Parse the URL and try to connect. */
AllocVar(*npu);
netParseUrl(url, *npu);
if (!sameString((*npu)->protocol, "http"))
    errAbort("netHttpLineFileMayOpen: url (%s) is not for http.", url);
sd = netConnect((*npu)->host, atoi((*npu)->port));
if (sd < 0)
    return NULL;

/* Return handle. */
lf = lineFileAttach(url, TRUE, sd);
return lf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x2830, %edi           # imm = 0x2830
callq 0x2dff4
movq %rax, (%r14)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2ed79
movq (%r14), %r15
leaq 0x60d54(%rip), %rsi     # 0x91f92
movq %r15, %rdi
callq 0x6a50
testl %eax, %eax
je 0x3125e
leaq 0x613cf(%rip), %rdi     # 0x92620
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26e94
movq (%r14), %r15
leaq 0x1010(%r15), %r14
addq $0x1810, %r15           # imm = 0x1810
movq %r15, %rdi
callq 0x6bd0
movq %r14, %rdi
movl %eax, %esi
callq 0x2e6a5
testl %eax, %eax
js 0x31296
movq %rbx, %rdi
movl $0x1, %esi
movl %eax, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x2a145
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netHttpGet
void netHttpGet(struct lineFile *lf, struct netParsedUrl *npu,
		boolean keepAlive)
/* Send a GET request, possibly with Keep-Alive. */
{
struct dyString *dy = newDyString(512);

/* Ask remote server for the file/query. */
dyStringPrintf(dy, "GET %s HTTP/1.1\r\n", npu->file);
dyStringPrintf(dy, "User-Agent: genome.ucsc.edu/net.c\r\n");
dyStringPrintf(dy, "Host: %s:%s\r\n", npu->host, npu->port);
if (!sameString(npu->user,""))
    {
    char up[256];
    char *b64up = NULL;
    safef(up,sizeof(up), "%s:%s", npu->user, npu->password);
    b64up = base64Encode(up, strlen(up));
    dyStringPrintf(dy, "Authorization: Basic %s\r\n", b64up);
    freez(&b64up);
    }
dyStringAppend(dy, "Accept: */*\r\n");
if (keepAlive)
  {
    dyStringAppend(dy, "Connection: Keep-Alive\r\n");
    dyStringAppend(dy, "Connection: Persist\r\n");
  }
else
    dyStringAppend(dy, "Connection: close\r\n");
dyStringAppend(dy, "\r\n");
mustWriteFd(lf->fd, dy->string, dy->stringSize);
/* Clean up. */
dyStringFree(&dy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x200, %edi            # imm = 0x200
callq 0x264e0
movq %rax, %r14
movq %rax, (%rsp)
leaq 0x1820(%r15), %rdx
leaq 0x6137e(%rip), %rsi     # 0x92652
movq %rax, %rdi
xorl %eax, %eax
callq 0x26883
leaq 0x6137f(%rip), %rsi     # 0x92664
movq %r14, %rdi
xorl %eax, %eax
callq 0x26883
leaq 0x1010(%r15), %rdx
leaq 0x1810(%r15), %rcx
leaq 0x60dcc(%rip), %rsi     # 0x920d0
movq %r14, %rdi
xorl %eax, %eax
callq 0x26883
cmpb $0x0, 0x10(%r15)
je 0x31375
leaq 0x10(%r15), %rcx
addq $0x810, %r15            # imm = 0x810
leaq 0x61792(%rip), %rdx     # 0x92ab9
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r15, %r8
xorl %eax, %eax
callq 0x23f33
movq %r12, %rdi
callq 0x62d0
movq %r12, %rdi
movq %rax, %rsi
callq 0x42d88
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x61328(%rip), %rsi     # 0x92688
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x26883
movq %r15, %rdi
callq 0x2e0b0
leaq 0x60d76(%rip), %rsi     # 0x920f2
movq %r14, %rdi
callq 0x2674f
testl %ebp, %ebp
je 0x313a0
leaq 0x61313(%rip), %rsi     # 0x926a2
movq %r14, %rdi
callq 0x2674f
leaq 0x6131d(%rip), %rsi     # 0x926bb
jmp 0x313a7
leaq 0x6132a(%rip), %rsi     # 0x926d1
movq %r14, %rdi
callq 0x2674f
leaq 0x66939(%rip), %rsi     # 0x97cef
movq %r14, %rdi
callq 0x2674f
movl 0x10(%rbx), %edi
movq 0x8(%r14), %rsi
movslq 0x14(%r14), %rdx
callq 0x23517
movq %rsp, %rdi
callq 0x2651d
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netStreamSocket
static int netStreamSocket()
/* Create a TCP/IP streaming socket.  Complain and return something
 * negative if can't */
{
int sd = socket(AF_INET, SOCK_STREAM, 0);
if (sd < 0)
    warn("Couldn't make AF_INET socket.");
return sd;
}

// Assembly:
pushq %rbx
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x6190
movl %eax, %ebx
testl %eax, %eax
jns 0x3164c
leaq 0x61215(%rip), %rdi     # 0x9285a
xorl %eax, %eax
callq 0x26bea
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: parsePasvPort
static int parsePasvPort(char *rs)
/* parse PASV reply to get the port and return it */
{
char *words[7];
int wordCount;
char *rsStart = strchr(rs,'(');
char *rsEnd = strchr(rs,')');
int result = 0;
rsStart++;
*rsEnd=0;
wordCount = chopString(rsStart, ",", words, ArraySize(words));
if (wordCount != 6)
    errAbort("PASV reply does not parse correctly");
result = atoi(words[4])*256+atoi(words[5]);    
return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl $0x28, %esi
callq 0x6270
movq %rax, %r14
movq %rbx, %rdi
movl $0x29, %esi
callq 0x6270
incq %r14
movb $0x0, (%rax)
leaq 0x5e25b(%rip), %rsi     # 0x8faa7
movq %rsp, %rdx
movq %r14, %rdi
movl $0x7, %ecx
callq 0x22667
cmpl $0x6, %eax
je 0x3186f
leaq 0x6132a(%rip), %rdi     # 0x92b92
xorl %eax, %eax
callq 0x26e94
movq 0x20(%rsp), %rdi
callq 0x6bd0
movl %eax, %ebx
shll $0x8, %ebx
movq 0x28(%rsp), %rdi
callq 0x6bd0
addl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: sendFtpDataToPipeThread
static void *sendFtpDataToPipeThread(void *threadParams)
/* This is to be executed by the child process after the fork in netGetOpenFtpSockets.
 * It keeps the ftp control socket alive while reading from the ftp data socket
 * and writing to the pipe to the parent process, which closes the ftp sockets
 * and reads from the pipe. */
{

struct netConnectFtpParams *params = threadParams;

pthread_detach(params->thread);  // this thread will never join back with it's progenitor

char buf[32768];
int rd = 0;
long long dataPos = 0; 
if (params->npu.byteRangeStart != -1)
    dataPos = params->npu.byteRangeStart;
while((rd = read(params->sdata, buf, 32768)) > 0) 
    {
    if (params->npu.byteRangeEnd != -1 && (dataPos + rd) > params->npu.byteRangeEnd)
	rd = params->npu.byteRangeEnd - dataPos + 1;
    int wt = write(params->pipefd[1], buf, rd);
    if (wt == -1 && params->npu.byteRangeEnd != -1)
	{
	// errAbort in child process is messy; let reader complain if
	// trouble.  If byterange was open-ended, we will hit this point
	// when the parent stops reading and closes the pipe.
	errnoWarn("error writing ftp data to pipe");
	break;
	}
    dataPos += rd;
    if (params->npu.byteRangeEnd != -1 && dataPos >= params->npu.byteRangeEnd)
	break;	    
    }
if (rd == -1)
    // Again, avoid abort in child process.
    errnoWarn("error reading ftp socket");
close(params->pipefd[1]);  /* we are done with it */
close(params->sd);
close(params->sdata);
return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8000, %rsp           # imm = 0x8000
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x64a0
movq 0x2838(%rbx), %rax
xorl %r13d, %r13d
cmpq $-0x1, %rax
cmovneq %rax, %r13
movq %rsp, %r14
movl 0x14(%rbx), %edi
movl $0x8000, %edx           # imm = 0x8000
movq %r14, %rsi
callq 0x6aa0
movq %rax, %r15
testl %r15d, %r15d
jle 0x31947
movq 0x2840(%rbx), %rax
cmpq $-0x1, %rax
je 0x31900
movl %r15d, %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
addq %r13, %rcx
cmpq %rax, %rcx
jle 0x31900
subl %r13d, %eax
incl %eax
movl %eax, %r15d
movl 0xc(%rbx), %edi
movslq %r15d, %r12
movq %r14, %rsi
movq %r12, %rdx
callq 0x6260
cmpl $-0x1, %eax
setne %cl
movq 0x2840(%rbx), %rax
cmpq $-0x1, %rax
sete %dl
orb %cl, %dl
je 0x31939
addq %r12, %r13
cmpq $-0x1, %rax
je 0x318c2
cmpq %rax, %r13
jl 0x318c2
jmp 0x31947
leaq 0x61276(%rip), %rdi     # 0x92bb6
xorl %eax, %eax
callq 0x26d76
cmpl $-0x1, %r15d
jne 0x3195b
leaq 0x61281(%rip), %rdi     # 0x92bd5
xorl %eax, %eax
callq 0x26d76
movl 0xc(%rbx), %edi
callq 0x6e80
movl 0x10(%rbx), %edi
callq 0x6e80
movl 0x14(%rbx), %edi
callq 0x6e80
xorl %eax, %eax
addq $0x8000, %rsp           # imm = 0x8000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibLoadPartMasked
struct dnaSeq *nibLoadPartMasked(int options, char *fileName, int start, int size)
/* Load part of an .nib file, with control over handling of masked positions */
{
struct dnaSeq *seq;
FILE *f;
int seqSize;
nibOpenVerify(fileName, &f, &seqSize);
seq = nibLdPartMasked(options, fileName, f, seqSize, start, size);
fclose(f);
return seq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movl %edi, %r15d
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
movq %rsi, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x31b2d
movq (%r12), %r12
movl (%r13), %ecx
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %r8d
movl %ebx, %r9d
callq 0x31d65
movq %rax, %rbx
movq %r12, %rdi
callq 0x66e0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibLoadAllMasked
struct dnaSeq *nibLoadAllMasked(int options, char *fileName)
/* Load part of a .nib file, with control over handling of masked
 * positions. Subranges of nib files may specified in the file name
 * using the syntax:
 *    /path/file.nib:seqid:start-end
 * or\n"
 *    /path/file.nib:start-end
 * With the first form, seqid becomes the id of the subrange, with the second
 * form, a sequence id of file:start-end will be used.
 */
{
struct dnaSeq *seq;
FILE *f;
int seqSize;
char filePath[PATH_LEN];
char name[PATH_LEN];
unsigned start, end;

nibParseName(options, fileName, filePath, name, &start, &end);
nibOpenVerify(filePath, &f, &seqSize);
if (end == 0)
    end = seqSize;
seq = nibInput(options, fileName, name, f, seqSize, start, end-start);
fclose(f);
return seq;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x220(%rsp), %r14
leaq 0x20(%rsp), %rcx
leaq 0xc(%rsp), %r8
leaq 0x8(%rsp), %r15
movq %r14, %rdx
movq %r15, %r9
callq 0x31988
leaq 0x10(%rsp), %rsi
leaq 0x1c(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
callq 0x31b2d
movl (%r15), %eax
movl (%r12), %r8d
testl %eax, %eax
jne 0x32176
movl %r8d, 0x8(%rsp)
movl %r8d, %eax
movq 0x10(%rsp), %r14
movl 0xc(%rsp), %r9d
subl %r9d, %eax
movl %eax, (%rsp)
leaq 0x20(%rsp), %rdx
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x31dd4
movq %rax, %rbx
movq %r14, %rdi
callq 0x66e0
movq %rbx, %rax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibStreamOpen
struct nibStream *nibStreamOpen(char *fileName)
/* Create a new nib stream.  Open file and stuff. */
{
struct nibStream *ns;
FILE *f;

dnaUtilOpen();
AllocVar(ns);
ns->f = f = mustOpen(fileName, "wb");
ns->fileName = cloneString(fileName);

/* Write header - initially zero.  Will fix it up when we close. */
writeOne(f, ns->size);
writeOne(f, ns->size);

return ns;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %eax, %eax
callq 0x25e47
movl $0x20, %edi
callq 0x2dff4
movq %rax, %rbx
leaq 0x608a3(%rip), %rsi     # 0x92c46
movq %r14, %rdi
callq 0x23072
movq %rax, %r15
movq %rax, 0x10(%rbx)
movq %r14, %rdi
callq 0x1feba
movq %rax, 0x8(%rbx)
leaq 0x18(%rbx), %r14
movl $0x4, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x23138
movl $0x4, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x23138
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibStreamClose
void nibStreamClose(struct nibStream **pNs)
/* Close a nib stream.  Flush last nibble if need be.  Fix up header. */
{
struct nibStream *ns = *pNs;
FILE *f;
bits32 sig = nibSig;
if (ns == NULL)
    return;
f = ns->f;
if (ns->size&1)
    writeOne(f, ns->byte);
fseek(f,  0L, SEEK_SET);
writeOne(f, sig);
writeOne(f, ns->size);
fclose(f);
freeMem(ns->fileName);
freez(pNs);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r12
movl $0x6be93d3a, 0x4(%rsp)  # imm = 0x6BE93D3A
testq %r12, %r12
je 0x32472
movq %rdi, %rbx
movq 0x10(%r12), %r14
leaq 0x18(%r12), %r15
testb $0x1, 0x18(%r12)
je 0x3242a
leaq 0x1c(%r12), %rsi
movl $0x1, %edx
movq %r14, %rdi
callq 0x23138
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x67d0
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x23138
movl $0x4, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x23138
movq %r14, %rdi
callq 0x66e0
movq 0x8(%r12), %rdi
callq 0x2e0a0
movq %rbx, %rdi
callq 0x2e0b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibStreamOne
void nibStreamOne(struct nibStream *ns, DNA base)
/* Write out one base to nibStream. */
{
UBYTE ub = ntVal5[(int)base];

if ((++ns->size&1) == 0)
    {
    ub += ns->byte;
    writeOne(ns->f, ub);
    }
else
    {
    ns->byte = (ub<<4);
    }
}

// Assembly:
movslq %esi, %rax
leaq 0x90408(%rip), %rcx     # 0xc2890
movb (%rcx,%rax,4), %al
movl 0x18(%rdi), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x18(%rdi)
testb $0x1, %cl
jne 0x324a0
shlb $0x4, %al
movb %al, 0x1c(%rdi)
retq
pushq %rax
addb 0x1c(%rdi), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movq 0x10(%rdi), %rdi
movl $0x1, %edx
callq 0x23138
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibIsFile
boolean nibIsFile(char *fileName)
/* Return TRUE if file is a nib file. */
{
boolean isANib;
char *subrange = findNibSubrange(fileName);
if (subrange != NULL)
    *subrange = '\0';
isANib = endsWith(fileName, ".nib") || endsWith(fileName, ".NIB");
if (subrange != NULL)
    *subrange = ':';
return isANib;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x2f, %esi
callq 0x67c0
leaq 0x1(%rax), %rdi
testq %rax, %rax
cmoveq %r14, %rdi
movl $0x3a, %esi
callq 0x6270
movq %rax, %rbx
testq %rax, %rax
je 0x32528
movb $0x0, (%rbx)
leaq 0x60724(%rip), %rsi     # 0x92c53
movq %r14, %rdi
callq 0x21e4c
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x3255a
leaq 0x60700(%rip), %rsi     # 0x92c49
movq %r14, %rdi
callq 0x21e4c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
testq %rbx, %rbx
je 0x32562
movb $0x3a, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibIsRange
boolean nibIsRange(char *fileName)
/* Return TRUE if file specifies a subrange of a nib file. */
{
boolean isANib;
char *subrange = findNibSubrange(fileName);;
if (subrange == NULL)
    return FALSE;
*subrange = '\0';
isANib = endsWith(fileName, ".nib") || endsWith(fileName, ".NIB");
*subrange = ':';
return isANib;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x67c0
leaq 0x1(%rax), %rdi
testq %rax, %rax
cmoveq %rbx, %rdi
movl $0x3a, %esi
callq 0x6270
testq %rax, %rax
je 0x325d3
movq %rax, %r14
movb $0x0, (%rax)
leaq 0x606b1(%rip), %rsi     # 0x92c53
movq %rbx, %rdi
callq 0x21e4c
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x325cd
leaq 0x6068d(%rip), %rsi     # 0x92c49
movq %rbx, %rdi
callq 0x21e4c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
movb $0x3a, (%r14)
jmp 0x325d5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibInfoNew
struct nibInfo *nibInfoNew(char *path)
/* Make a new nibInfo with open nib file. */
{
struct nibInfo *nib;
AllocVar(nib);
nib->fileName = cloneString(path);
nibOpenVerify(path, &nib->f, &nib->size);
return nib;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %edi
callq 0x2dff4
movq %rax, %r14
movq %rbx, %rdi
callq 0x1feba
movq %rax, 0x8(%r14)
leaq 0x18(%r14), %rsi
leaq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x31b2d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibInfoFree
void nibInfoFree(struct nibInfo **pNib)
/* Free up nib info and close file if open. */
{
struct nibInfo *nib = *pNib;
if (nib != NULL)
    {
    carefulClose(&nib->f);
    freeMem(nib->fileName);
    freez(pNib);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x32648
movq %rdi, %rbx
leaq 0x18(%r14), %rdi
callq 0x2371e
movq 0x8(%r14), %rdi
callq 0x2e0a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e0b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/nib.c
// Function: nibInfoFromCache
struct nibInfo *nibInfoFromCache(struct hash *hash, char *nibDir, char *nibName)
/* Get nibInfo on nibDir/nibName.nib from cache, filling cache if need be. */
{
struct nibInfo *nib;
char path[PATH_LEN];
safef(path, sizeof(path), "%s/%s.nib", nibDir, nibName);
nib = hashFindVal(hash, path);
if (nib == NULL)
    {
    nib = nibInfoNew(path);
    hashAdd(hash, path, nib);
    }
return nib;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdx, %r8
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x605e2(%rip), %rdx     # 0x92c4e
movq %rsp, %r14
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
callq 0x23f33
movq %rbx, %rdi
movq %r14, %rsi
callq 0x293ad
movq %rax, %r14
testq %rax, %rax
jne 0x326ad
movq %rsp, %r15
movq %r15, %rdi
callq 0x325dd
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x29142
movq %r14, %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: hashTwoColumnFile
struct hash *hashTwoColumnFile(char *fileName)
/* Given a two column file (key, value) return a hash. */
{
struct lineFile *lf = lineFileOpen(fileName, TRUE);
struct hash *hash = hashNew(16);
char *row[3];
int fields = 0;
while ((fields = lineFileChop(lf, row)) != 0)
    {
    lineFileExpectWords(lf, 2, fields);
    char *name = row[0];
    char *value = lmCloneString(hash->lm, row[1]);
    hashAdd(hash, name, value);
    }
lineFileClose(&lf);
return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0x1, %esi
callq 0x2a550
movq %rax, %rbx
movq %rax, 0x8(%rsp)
movl $0x10, %edi
movl $0x1, %esi
callq 0x294ea
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl $0x3, %edx
callq 0x2b359
testl %eax, %eax
je 0x32b09
leaq 0x10(%rsp), %r15
movq %rbx, %rdi
movl $0x2, %esi
movl %eax, %edx
callq 0x2afa3
movq 0x20(%r14), %rdi
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %rsi
callq 0x2c424
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x29142
movq %rbx, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq 0x2b359
testl %eax, %eax
jne 0x32ac5
leaq 0x8(%rsp), %rdi
callq 0x2ae73
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: slPairTwoColumnFile
struct slPair *slPairTwoColumnFile(char *fileName)
/* Read in a two column file into an slPair list */
{
char *row[2];
struct slPair *list = NULL;
struct lineFile *lf = lineFileOpen(fileName, TRUE);
while (lineFileRow(lf, row))
    slPairAdd(&list, row[0], cloneString(row[1]));
lineFileClose(&lf);
slReverse(&list);
return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq $0x0, 0x8(%rsp)
movl $0x1, %esi
callq 0x2a550
movq %rax, %rbx
movq %rax, 0x20(%rsp)
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
movl $0x2, %edx
callq 0x2b505
testl %eax, %eax
je 0x32b99
leaq 0x8(%rsp), %r14
leaq 0x10(%rsp), %r15
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %rdi
callq 0x1feba
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x210aa
movq %rbx, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x2b505
testl %eax, %eax
jne 0x32b68
leaq 0x20(%rsp), %rdi
callq 0x2ae73
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x20173
movq (%rbx), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: slNameListOfUniqueWords
struct slName *slNameListOfUniqueWords(char *text,boolean respectQuotes)
/* Return list of unique words found by parsing string delimited by whitespace.
 * If respectQuotes then ["Lucy and Ricky" 'Fred and Ethyl'] will yield 2 slNames no quotes */
{
struct slName *list = NULL;
char *word = NULL;
while (text != NULL)
    {
    if (respectQuotes)
        word = nextQuotedWord(&text);
    else
        word = nextWord(&text);
    if (word)
        slNameStore(&list, word);
    else
        break;
    }
slReverse(&list);
return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
movq $0x0, (%rsp)
testq %rdi, %rdi
je 0x32fbc
movl %esi, %ebx
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
testl %ebx, %ebx
je 0x32f9f
callq 0x32f10
jmp 0x32fa4
callq 0x22cf1
testq %rax, %rax
je 0x32fbc
movq %r15, %rdi
movq %rax, %rsi
callq 0x20acd
cmpq $0x0, 0x8(%rsp)
jne 0x32f91
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x20173
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: shuffleArrayOfInts
void shuffleArrayOfInts(int *array, int arraySize)
/* Shuffle array of ints of given size given number of times. */
{
int c;
int i, randIx;

/* Randomly permute an array using the method from Cormen, et al */
for (i=0; i<arraySize; ++i)
    {
    randIx = i + (rand() % (arraySize - i));
    c = array[i];
    array[i] = array[randIx];
    array[randIx] = c;
    }
}

// Assembly:
testl %esi, %esi
jle 0x336af
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
xorl %r15d, %r15d
callq 0x61d0
cltd
idivl %r14d
movl (%rbx,%r15,4), %eax
movslq %edx, %rcx
addq %r15, %rcx
movl (%rbx,%rcx,4), %edx
movl %edx, (%rbx,%r15,4)
movl %eax, (%rbx,%rcx,4)
incq %r15
decq %r14
jne 0x33685
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: slListRandomReduce
void *slListRandomReduce(void *list, double reduceRatio)
/* Reduce list to approximately reduceRatio times original size. Destroys original list. */
{
if (reduceRatio >= 1.0)
    return list;
int threshold = RAND_MAX * reduceRatio;
struct slList *newList = NULL, *next, *el;
for (el = list; el != NULL; el = next)
    {
    next = el->next;
    if (rand() <= threshold)
        {
	slAddHead(&newList, el);
	}
    }
return newList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
ucomisd 0x5a0d3(%rip), %xmm0    # 0x8d878
jae 0x337d6
testq %r14, %r14
je 0x337db
mulsd 0x5f5e4(%rip), %xmm0    # 0x92d98
cvttsd2si %xmm0, %ebp
xorl %ebx, %ebx
movq (%r14), %r15
callq 0x61d0
cmpl %ebp, %eax
jg 0x337cc
movq %rbx, (%r14)
movq %r14, %rbx
movq %r15, %r14
testq %r15, %r15
jne 0x337ba
jmp 0x337dd
movq %r14, %rbx
jmp 0x337dd
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: slListRandomSample
void *slListRandomSample(void *list, int maxCount)
/* Return a sublist of list with at most maxCount. Destroy list in process */
{
if (list == NULL)
    return list;
int initialCount = slCount(list);
if (initialCount <= maxCount)
    return list;
double reduceRatio = (double)maxCount/initialCount;
if (reduceRatio < 0.9)
    {
    double conservativeReduceRatio = reduceRatio * 1.05;
    list = slListRandomReduce(list, conservativeReduceRatio);
    }
int midCount = slCount(list);
if (midCount <= maxCount)
    return list;
shuffleList(list);
struct slList *lastEl = slElementFromIx(list, maxCount-1);
lastEl->next = NULL;
return list;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x3385d
movl %esi, %ebx
movq %rdi, %r15
callq 0x200ac
cmpl %ebx, %eax
jle 0x33862
cvtsi2sd %ebx, %xmm0
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd 0x5ad76(%rip), %xmm1    # 0x8e590
ucomisd %xmm0, %xmm1
jbe 0x33867
mulsd 0x5f578(%rip), %xmm0    # 0x92da0
ucomisd 0x5a048(%rip), %xmm0    # 0x8d878
jae 0x33867
mulsd 0x5f55e(%rip), %xmm0    # 0x92d98
cvttsd2si %xmm0, %ebp
xorl %r14d, %r14d
movq (%r15), %r12
callq 0x61d0
cmpl %ebp, %eax
jg 0x33853
movq %r14, (%r15)
movq %r15, %r14
movq %r12, %r15
testq %r12, %r12
jne 0x33841
jmp 0x3386a
xorl %r14d, %r14d
jmp 0x33891
movq %r15, %r14
jmp 0x33891
movq %r15, %r14
movq %r14, %rdi
callq 0x200ac
cmpl %ebx, %eax
jle 0x33891
movq %r14, %rdi
callq 0x336ef
decl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x200bb
movq $0x0, (%rax)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: currentVmPeak
long long currentVmPeak()
/* return value of peak Vm memory usage (if /proc/ business exists) */
{
long long vmPeak = 0;

pid_t pid = getpid();
char temp[256];
safef(temp, sizeof(temp), "/proc/%d/status", (int) pid);
struct lineFile *lf = lineFileMayOpen(temp, TRUE);
if (lf)
    {
    char *line;
    while (lineFileNextReal(lf, &line))
	{	// typical line: 'VmPeak:     62646196 kB'
		// seems to always be kB
	if (stringIn("VmPeak", line))
	    {
	    char *words[3];
	    chopByWhite(line, words, 3);
	    vmPeak = sqlLongLong(words[1]);	// assume always 2nd word
	    break;
	    }
	}
    lineFileClose(&lf);
    }

return vmPeak;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
callq 0x6ac0
leaq 0x5f5e2(%rip), %rdx     # 0x92f75
xorl %ebx, %ebx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movl $0x100, %esi            # imm = 0x100
movl %eax, %ecx
xorl %eax, %eax
callq 0x23f33
movq %r14, %rdi
movl $0x1, %esi
callq 0x2a603
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x33a1f
movq %rax, %r14
movq %rsp, %r15
xorl %ebx, %ebx
leaq 0x5f5b4(%rip), %r12     # 0x92f85
movq %r14, %rdi
movq %r15, %rsi
callq 0x2b2c6
testl %eax, %eax
je 0x33a15
movq (%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x6180
testq %rax, %rax
je 0x339d1
leaq 0x10(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq 0x226f5
movq 0x8(%rbx), %rdi
callq 0x3be86
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2ae73
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: endsWithWordComma
boolean endsWithWordComma(char *string, char *word)
/* Return TRUE if string ends with word possibly followed by a comma, and the beginning
 * of word within string is the beginning of string or follows a comma. */
{
int stringLen = strlen(string);
int wordLen = strlen(word);
int commaSize = (stringLen > wordLen && string[stringLen-1] == ',') ? 1 : 0;
if (stringLen < wordLen + commaSize)
    return FALSE;
int wordOffset = stringLen - commaSize - wordLen;
if (sameStringN(string + wordOffset, word, wordLen) &&
    (wordOffset == 0 || string[wordOffset-1] == ','))
    return TRUE;
return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x62d0
movq %rax, %r14
movq %r15, %rdi
callq 0x62d0
movq %rax, %rcx
xorl %eax, %eax
movl $0x0, %ebp
cmpl %ecx, %r14d
jle 0x33bbd
movl %r14d, %edx
decl %edx
movslq %edx, %rdx
xorl %ebp, %ebp
cmpb $0x2c, (%rbx,%rdx)
sete %bpl
addl %ecx, %ebp
movl %r14d, %edx
subl %ebp, %edx
jl 0x33bf2
movslq %edx, %rax
addq %rax, %rbx
movslq %ecx, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6330
testl %eax, %eax
je 0x33be2
xorl %eax, %eax
jmp 0x33bf2
movl $0x1, %eax
cmpl %ebp, %r14d
je 0x33bf2
cmpb $0x2c, -0x1(%rbx)
jne 0x33bde
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: ensureNamesCaseUnique
void ensureNamesCaseUnique(struct slName *fieldList)
/* Ensure that there would be no name conflicts in fieldList if all fields were lower-cased. */
{
struct slName *field;
struct hash *hash = hashNew(0);
for (field = fieldList; field != NULL; field = field->next)
    {
    char *s = field->name;
    int len = strlen(s);
    assert(len<512);  // avoid stack overflow
    char lower[len+1];
    strcpy(lower, s);
    strLower(lower);
    char *conflict = hashFindVal(hash, lower);
    if (conflict)
	 {
	 if (sameString(conflict,s))
	     errAbort("Duplicate symbol %s", s);
	 else
	     errAbort("Conflict between symbols with different cases: %s vs %s",
		conflict, s);
	 }
    hashAdd(hash, lower, s);
    }
hashFree(&hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x294ea
movq %rax, -0x30(%rbp)
testq %rbx, %rbx
je 0x33ccb
leaq 0x8(%rbx), %r12
movq %r12, %rdi
callq 0x62d0
cmpl $0x200, %eax            # imm = 0x200
jge 0x33ce3
movq %rsp, %r15
incl %eax
movq %rsp, %r13
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
movq %r13, %rdi
movq %r12, %rsi
callq 0x6680
movq %r13, %rdi
callq 0x22305
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x293ad
testq %rax, %rax
je 0x33cb1
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
callq 0x6a50
testl %eax, %eax
je 0x33ca0
leaq 0x5f374(%rip), %rdi     # 0x93005
movq %r14, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x26e94
jmp 0x33cb1
leaq 0x5f34a(%rip), %rdi     # 0x92ff1
movq %r12, %rsi
xorl %eax, %eax
callq 0x26e94
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x29142
movq %r15, %rsp
movq (%rbx), %rbx
jmp 0x33c1e
leaq -0x30(%rbp), %rdi
callq 0x298bd
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5f2d3(%rip), %rdi     # 0x92fbd
leaq 0x5f25d(%rip), %rsi     # 0x92f4e
leaq 0x5f2cd(%rip), %rcx     # 0x92fc5
movl $0x3ac, %edx            # imm = 0x3AC
callq 0x6460
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/obscure.c
// Function: readAndIgnore
boolean readAndIgnore(char *fileName)
/* Read a byte from fileName, so its access time is updated. */
{
boolean ret = FALSE;
char buf[256];
FILE *f = fopen(fileName, "r");
if ( f && (fread(buf, 1, 1, f) == 1 ) )
    ret = TRUE;
if (f)
    fclose(f);
return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x621f7(%rip), %rsi     # 0x95f09
callq 0x6800
testq %rax, %rax
je 0x33d48
movq %rax, %rbx
movq %rsp, %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x6b20
xorl %ebp, %ebp
cmpq $0x1, %rax
sete %bpl
movq %rbx, %rdi
callq 0x66e0
jmp 0x33d4a
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/osunix.c
// Function: getTempDir
char *getTempDir(void)
/* get temporary directory to use for programs.  This first checks TMPDIR environment
 * variable, then /data/tmp, /scratch/tmp, /var/tmp, /tmp.  Return is static and
 * only set of first call */
{
static char *checkTmpDirs[] = {"/data/tmp", "/scratch/tmp", "/var/tmp", "/tmp", NULL};

static char* tmpDir = NULL;
if (tmpDir == NULL)
    {
    tmpDir = getenv("TMPDIR");
    if (tmpDir != NULL)
        tmpDir = cloneString(tmpDir);  // make sure it's stable
    else
        {
        int i;
        for (i = 0; (checkTmpDirs[i] != NULL) && (tmpDir == NULL); i++)
            {
            if (fileSize(checkTmpDirs[i]) >= 0)
                tmpDir = checkTmpDirs[i];
            }
        }
    }
if (tmpDir == NULL)
    errAbort("BUG: can't find a tmp directory");
return tmpDir;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq 0x8f0d2(%rip), %rbx     # 0xc3ed0
testq %rbx, %rbx
jne 0x34ea6
leaq 0x5e706(%rip), %rdi     # 0x93514
callq 0x68f0
movq %rax, 0x8f0b6(%rip)     # 0xc3ed0
testq %rax, %rax
je 0x34e33
movq %rax, %rdi
callq 0x1feba
movq %rax, %rbx
movq %rax, 0x8f09f(%rip)     # 0xc3ed0
jmp 0x34e8c
xorl %r15d, %r15d
leaq 0x899d3(%rip), %r12     # 0xbe810
leaq 0x8(%rsp), %r14
movq (%r15,%r12), %rbx
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x63b0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6d00
cmpl $-0x1, %eax
je 0x34e76
cmpq $0x0, 0x38(%rsp)
js 0x34e76
movq %rbx, 0x8f05c(%rip)     # 0xc3ed0
jmp 0x34e7d
movq 0x8f053(%rip), %rbx     # 0xc3ed0
cmpq $0x18, %r15
je 0x34e8c
addq $0x8, %r15
testq %rbx, %rbx
je 0x34e42
testq %rbx, %rbx
jne 0x34ea6
leaq 0x5e683(%rip), %rdi     # 0x9351b
xorl %eax, %eax
callq 0x26e94
movq 0x8f02a(%rip), %rbx     # 0xc3ed0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/osunix.c
// Function: maybeTouchFile
boolean maybeTouchFile(char *fileName)
/* If file exists, set its access and mod times to now.  If it doesn't exist, create it.
 * Return FALSE if we have a problem doing so (e.g. when qateam is gdb'ing and code tries 
 * to touch some file owned by www). */
{
if (fileExists(fileName))
    {
    int ret = utime(fileName, NULL);
    if (ret != 0)
	{
	warn("utime(%s) failed (ownership?)", fileName);
	return FALSE;
	}
    }
else
    {
    FILE *f = fopen(fileName, "w");
    if (f == NULL)
	return FALSE;
    else
	carefulClose(&f);
    }
return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x23c5d
testl %eax, %eax
je 0x354ed
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x63a0
testl %eax, %eax
je 0x3550d
leaq 0x5e20d(%rip), %rdi     # 0x936ee
movq %r14, %rsi
xorl %eax, %eax
callq 0x26bea
jmp 0x35516
leaq 0x59855(%rip), %rsi     # 0x8ed49
movq %r14, %rdi
callq 0x6800
movq %rax, (%rsp)
testq %rax, %rax
je 0x35514
movq %rsp, %rdi
callq 0x2371e
movl $0x1, %ebx
jmp 0x35516
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/osunix.c
// Function: touchFileFromFile
void touchFileFromFile(const char *oldFile, const char *newFile)
/* Set access and mod time of newFile from oldFile. */
{
    struct stat buf;
    if (stat(oldFile, &buf) != 0)
        errnoAbort("stat failed on %s", oldFile);
    struct utimbuf puttime;
    puttime.modtime = buf.st_mtime;
    puttime.actime = buf.st_atime;
    if (utime(newFile, &puttime) != 0)
	errnoAbort("utime failed on %s", newFile);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %rsi
callq 0x6d00
testl %eax, %eax
je 0x3554f
leaq 0x5e1c7(%rip), %rdi     # 0x9370c
movq %r14, %rsi
xorl %eax, %eax
callq 0x26fc7
movq 0x60(%rsp), %rax
movq 0x70(%rsp), %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, 0x8(%rsi)
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x63a0
testl %eax, %eax
je 0x3558c
leaq 0x5e1a6(%rip), %rdi     # 0x9371e
movq %rbx, %rsi
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
jmp 0x26fc7
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/osunix.c
// Function: mustReadSymlinkExt
char *mustReadSymlinkExt(char *path, struct stat *sb)
/* Read symlink or abort. FreeMem the returned value. */
{
ssize_t nbytes, bufsiz;
// determine whether the buffer returned was truncated.
bufsiz = sb->st_size + 1;
char *symPath = needMem(bufsiz);
nbytes = readlink(path, symPath, bufsiz);
if (nbytes == -1) 
    errnoAbort("readlink failure on symlink %s", path);
if (nbytes == bufsiz)
    errAbort("readlink returned buffer truncated\n");
return symPath;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x30(%rsi), %r14
incq %r14
movq %r14, %rdi
callq 0x2dff4
movq %rax, %rbx
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x6770
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x3564c
leaq 0x5e0ef(%rip), %rdi     # 0x93731
movq %r15, %rsi
xorl %eax, %eax
callq 0x26fc7
cmpq %r14, %r12
jne 0x3565f
leaq 0x5e0f8(%rip), %rdi     # 0x93750
xorl %eax, %eax
callq 0x26e94
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/osunix.c
// Function: mustReadSymlink
char *mustReadSymlink(char *path)
/* Read symlink or abort. Checks that path is a symlink. 
FreeMem the returned value. */
{
struct stat sb;
if (lstat(path, &sb) == -1)
    errnoAbort("lstat failure on %s", path);
if ((sb.st_mode & S_IFMT) != S_IFLNK)
    errnoAbort("path %s not a symlink.", path);
return mustReadSymlinkExt(path, &sb);
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movq %rsp, %rsi
callq 0x6a70
cmpl $-0x1, %eax
jne 0x35697
leaq 0x5e0e7(%rip), %rdi     # 0x93774
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26fc7
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0xa000, %eax           # imm = 0xA000
je 0x356b8
leaq 0x5e0da(%rip), %rdi     # 0x93788
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26fc7
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x35607
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/pipeline.c
// Function: pipelineClose
int pipelineClose(struct pipeline **pPl)
/* Wait for pipeline to finish and free it. Same as pipelineWait then pipelineClose.
 * Returns pipelineWait result (normally 0). */
{
struct pipeline *pl = *pPl;
int ret = 0;
if (pl != NULL)
    {
    ret = pipelineWait(pl);
    pipelineFree(pPl);
    }
return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x35e52
callq 0x35cc8
movl %eax, %ebp
movq %rbx, %rdi
callq 0x35704
movl %ebp, %eax
jmp 0x35e54
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/pipeline.c
// Function: plProcSetup
static void plProcSetup(struct plProc* proc, int stdinFd, int stdoutFd, int stderrFd)
/* setup signal, error handling, and file descriptors after fork */
{
/* Optionally treat a closed pipe as an EOF rather than getting SIGPIPE */
if (signal(SIGPIPE, ((proc->pl->options & pipelineSigpipe) ? SIG_DFL : SIG_IGN)) == SIG_ERR)
    errnoAbort("error ignoring SIGPIPE");

if (setpgid(getpid(), proc->pl->groupLeader) != 0)
    errnoAbort("error from setpgid(%d, %d)", getpid(), proc->pl->groupLeader);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movq 0x8(%rdi), %rax
xorl %esi, %esi
testb $0x20, 0x1c(%rax)
sete %sil
movl $0xd, %edi
callq 0x6890
cmpq $-0x1, %rax
jne 0x364c3
leaq 0x5d5fd(%rip), %rdi     # 0x93ab9
xorl %eax, %eax
callq 0x26fc7
callq 0x6ac0
movq 0x8(%r15), %rcx
movl 0xc(%rcx), %esi
movl %eax, %edi
callq 0x6ca0
testl %eax, %eax
je 0x364f6
callq 0x6ac0
movq 0x8(%r15), %rcx
movl 0xc(%rcx), %edx
leaq 0x5d5e3(%rip), %rdi     # 0x93ad0
movl %eax, %esi
xorl %eax, %eax
callq 0x26fc7
testl %r14d, %r14d
je 0x36517
movl %r14d, %edi
xorl %esi, %esi
callq 0x6670
testl %eax, %eax
jns 0x36517
leaq 0x5d5db(%rip), %rdi     # 0x93aeb
xorl %eax, %eax
callq 0x26fc7
cmpl $0x1, %ebp
je 0x3653a
movl %ebp, %edi
movl $0x1, %esi
callq 0x6670
testl %eax, %eax
jns 0x3653a
leaq 0x5d5cc(%rip), %rdi     # 0x93aff
xorl %eax, %eax
callq 0x26fc7
cmpl $0x2, %ebx
je 0x3655d
movl %ebx, %edi
movl $0x2, %esi
callq 0x6670
testl %eax, %eax
jns 0x3655d
leaq 0x5d5be(%rip), %rdi     # 0x93b14
xorl %eax, %eax
callq 0x26fc7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x36274
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/psl.c
// Function: pslxLoad
struct psl *pslxLoad(char **row)
/* Load a psl from row fetched with select * from psl
 * from database.  Dispose of this with pslFree(). */
{
struct psl *ret = pslLoad(row);
int retSize;
sqlStringDynamicArray(row[21],&ret->qSequence, &retSize);
sqlStringDynamicArray(row[22],&ret->tSequence, &retSize);
return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x36627
movq %rax, %r14
movq 0xa8(%rbx), %rdi
leaq 0x78(%rax), %rsi
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x3d50c
movq 0xb0(%rbx), %rdi
leaq 0x80(%r14), %rsi
movq %r15, %rdx
callq 0x3d50c
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/psl.c
// Function: pslFree
void pslFree(struct psl **pEl)
/* Free a single dynamically allocated psl such as created
 * with pslLoad(). */
{
struct psl *el;

if ((el = *pEl) == NULL) return;
freeMem(el->qName);
freeMem(el->tName);
freeMem(el->blockSizes);
freeMem(el->qStarts);
freeMem(el->tStarts);
if (el->qSequence)
    {
    freeMem(el->qSequence[0]);
    freeMem(el->qSequence);
    }
if (el->tSequence)
    {
    freeMem(el->tSequence[0]);
    freeMem(el->tSequence);
    }
freez(pEl);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x36b26
movq %rdi, %rbx
movq 0x30(%r14), %rdi
callq 0x2e0a0
movq 0x48(%r14), %rdi
callq 0x2e0a0
movq 0x60(%r14), %rdi
callq 0x2e0a0
movq 0x68(%r14), %rdi
callq 0x2e0a0
movq 0x70(%r14), %rdi
callq 0x2e0a0
movq 0x78(%r14), %rax
testq %rax, %rax
je 0x36af7
movq (%rax), %rdi
callq 0x2e0a0
movq 0x78(%r14), %rdi
callq 0x2e0a0
movq 0x80(%r14), %rax
testq %rax, %rax
je 0x36b17
movq (%rax), %rdi
callq 0x2e0a0
movq 0x80(%r14), %rdi
callq 0x2e0a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e0b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/psl.c
// Function: pslFreeList
void pslFreeList(struct psl **pList)
/* Free a list of dynamically allocated psl's */
{
struct psl *el, *next;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x36b61
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x36aa1
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x36b4c
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/psl.c
// Function: pslLoadAll
struct psl *pslLoadAll(char *fileName)
/* Load all psl's in file. */
{
struct lineFile *lf = pslFileOpen(fileName);
struct psl *pslList = NULL, *psl;
while ((psl = pslNext(lf)) != NULL)
    {
    slAddHead(&pslList, psl);
    }
slReverse(&pslList);
lineFileClose(&lf);
return pslList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq 0x8(%rsp), %r14
leaq 0x1c(%rsp), %rdx
leaq 0x10(%rsp), %r15
movq %r14, %rsi
movq %r15, %rcx
callq 0x379e8
movq (%r15), %rbx
movq %rbx, (%r15)
movq $0x0, (%r14)
movq %rbx, %rdi
callq 0x3766b
testq %rax, %rax
je 0x37624
movq %rax, %r14
xorl %ecx, %ecx
movq %rcx, (%r14)
movq %r14, 0x8(%rsp)
movq %rbx, %rdi
callq 0x3766b
movq %r14, %rcx
movq %rax, %r14
testq %rax, %rax
jne 0x37609
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x20173
leaq 0x10(%rsp), %rdi
callq 0x2ae73
movq (%rbx), %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq