LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/maf.c
// Function: mafCompClone
struct mafComp *mafCompClone(struct mafComp *srcComp)
/* clone a mafComp */
{
struct mafComp *comp;
AllocVar(comp);
comp->src = cloneString(srcComp->src);
comp->srcSize = srcComp->srcSize;
comp->strand = srcComp->strand;
comp->start = srcComp->start;
comp->size = srcComp->size;
comp->text = cloneString(srcComp->text);
comp->quality = cloneString(srcComp->quality);
comp->leftStatus = srcComp->leftStatus;
comp->leftLen = srcComp->leftLen;
comp->rightStatus = srcComp->rightStatus;
comp->rightLen = srcComp->rightLen;
return comp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x40, %edi
callq 0x2dff4
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x1feba
movq %rax, 0x8(%r14)
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movb 0x14(%rbx), %al
movb %al, 0x14(%r14)
movq 0x18(%rbx), %rax
movq %rax, 0x18(%r14)
movq 0x20(%rbx), %rdi
callq 0x1feba
movq %rax, 0x20(%r14)
movq 0x28(%rbx), %rdi
callq 0x1feba
movq %rax, 0x28(%r14)
movb 0x30(%rbx), %al
movb %al, 0x30(%r14)
movl 0x34(%rbx), %eax
movl %eax, 0x34(%r14)
movb 0x38(%rbx), %al
movb %al, 0x38(%r14)
movl 0x3c(%rbx), %eax
movl %eax, 0x3c(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/maf.c
// Function: mafAliClone
struct mafAli *mafAliClone(struct mafAli *srcAli)
/* clone a mafAli */
{
struct mafAli *ali;
AllocVar(ali);
ali->score = srcAli->score;
struct mafComp *srcComp;
for (srcComp = srcAli->components; srcComp != NULL; srcComp = srcComp->next)
    slAddHead(&ali->components, mafCompClone(srcComp));
slReverse(&ali->components);
ali->textSize = srcAli->textSize;
if (srcAli->regDef != NULL)
    ali->regDef = mafRegDefClone(srcAli->regDef);
return ali;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x28, %edi
callq 0x2dff4
movq %rax, %rbx
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x8(%rax)
movq 0x10(%r14), %r15
testq %r15, %r15
je 0x2daf4
movq %r15, %rdi
callq 0x2da3b
movq 0x10(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x10(%rbx)
movq (%r15), %r15
jmp 0x2dad7
movq %rbx, %rdi
addq $0x10, %rdi
callq 0x20173
movl 0x18(%r14), %eax
movl %eax, 0x18(%rbx)
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x2db23
movq (%rax), %rdi
movl 0x8(%rax), %esi
movq 0x10(%rax), %rdx
callq 0x2d9c2
movq %rax, 0x20(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/mafFromAxt.c
// Function: mafFromAxt
struct mafAli *mafFromAxt(struct axt *axt, int tSize, 
	char *tPrefix, int qSize, char *qPrefix)
/* Make up a maf file from axt.  Slower than mafFromAxtTemp,
 * but the axt and maf are independent afterwards. */
{
struct mafAli *maf;
struct mafComp *mc;
char name[256];
AllocVar(maf);
maf->score = axt->score;
maf->textSize = axt->symCount;
AllocVar(mc);
if (qPrefix == NULL)
    mc->src = cloneString(axt->qName);
else
    {
    safef(name, sizeof(name), "%s.%s", qPrefix, axt->qName);
    mc->src = cloneString(name);
    }
mc->srcSize = qSize;
mc->strand = axt->qStrand;
mc->start = axt->qStart;
mc->size = axt->qEnd - axt->qStart;
mc->text = cloneStringZ(axt->qSym, axt->symCount);
slAddHead(&maf->components, mc);
AllocVar(mc);
if (tPrefix == NULL)
    mc->src = cloneString(axt->tName);
else
    {
    safef(name, sizeof(name), "%s.%s", tPrefix, axt->tName);
    mc->src = cloneString(name);
    }
mc->srcSize = tSize;
mc->strand = axt->tStrand;
mc->start = axt->tStart;
mc->size = axt->tEnd - axt->tStart;
mc->text = cloneStringZ(axt->tSym, axt->symCount);
slAddHead(&maf->components, mc);
return maf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %r8, %rbp
movl %ecx, %r13d
movq %rdx, 0x8(%rsp)
movl %esi, 0x4(%rsp)
movq %rdi, %r14
movl $0x28, %edi
callq 0x2dff4
cvtsi2sdl 0x34(%r14), %xmm0
movq %rax, %rbx
movsd %xmm0, 0x8(%rax)
movl 0x38(%r14), %eax
movl %eax, 0x18(%rbx)
movl $0x40, %edi
callq 0x2dff4
movq %rax, %r12
movq 0x8(%r14), %r8
testq %rbp, %rbp
je 0x2dca8
leaq 0x63e3a(%rip), %rdx     # 0x91ac6
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbp, %rcx
xorl %eax, %eax
callq 0x23f33
movq %r15, %rdi
jmp 0x2dcab
movq %r8, %rdi
callq 0x1feba
movq %rax, 0x8(%r12)
movl %r13d, 0x10(%r12)
movb 0x18(%r14), %al
movb %al, 0x14(%r12)
movl 0x10(%r14), %eax
movl %eax, 0x18(%r12)
movl 0x14(%r14), %ecx
subl %eax, %ecx
movl %ecx, 0x1c(%r12)
movq 0x40(%r14), %rdi
movl 0x38(%r14), %esi
callq 0x1fe6b
movq %rax, 0x20(%r12)
movq 0x10(%rbx), %rax
movq %rax, (%r12)
movq %r12, 0x10(%rbx)
movl $0x40, %edi
callq 0x2dff4
movq %rax, %r12
movq 0x20(%r14), %r8
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
je 0x2dd30
leaq 0x63daf(%rip), %rdx     # 0x91ac6
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x23f33
movq %r15, %rdi
jmp 0x2dd33
movq %r8, %rdi
callq 0x1feba
movq %rax, 0x8(%r12)
movl 0x4(%rsp), %eax
movl %eax, 0x10(%r12)
movb 0x30(%r14), %al
movb %al, 0x14(%r12)
movl 0x28(%r14), %eax
movl %eax, 0x18(%r12)
movl 0x2c(%r14), %ecx
subl %eax, %ecx
movl %ecx, 0x1c(%r12)
movq 0x48(%r14), %rdi
movl 0x38(%r14), %esi
callq 0x1fe6b
movq %rax, 0x20(%r12)
movq 0x10(%rbx), %rax
movq %rax, (%r12)
movq %r12, 0x10(%rbx)
movq %rbx, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/memalloc.c
// Function: carefulCheckHeap
void carefulCheckHeap()
/* Walk through allocated memory and make sure that all cookies are
 * in place. */
{
int maxPieces = 10000000;    /* Assume no more than this many pieces allocated. */
struct carefulMemBlock *cmb;
char *pEndCookie;
size_t size;
char errMsg[1024];
boolean errFound = FALSE;

if (carefulParent == NULL)
    return;

pthread_mutex_lock( &carefulMutex );
for (cmb = (struct carefulMemBlock *)(cmbAllocedList->head); cmb->next != NULL; cmb = cmb->next)
    {
    size = cmb->size;
    pEndCookie = (((char *)(cmb+1)) + size);
    if (cmb->startCookie != cmbStartCookie)
	{
        safef(errMsg, sizeof errMsg, "Bad start cookie %x checking %llx\n", cmb->startCookie,
                 ptrToLL(cmb+1));
	errFound = TRUE;
	break;
	}
    if (memcmp(pEndCookie, cmbEndCookie, sizeof(cmbEndCookie)) != 0)
	{
        safef(errMsg, sizeof errMsg, "Bad end cookie %x%x%x%x checking %llx\n", 
                 pEndCookie[0], pEndCookie[1], pEndCookie[2], pEndCookie[3],
                 ptrToLL(cmb+1));
	errFound = TRUE;
	break;
	}
    if (--maxPieces == 0)
	{
        safef(errMsg, sizeof errMsg, "Loop or more than 10000000 pieces in memory list");
	errFound = TRUE;
	break;
	}
    }
pthread_mutex_unlock( &carefulMutex );
if (errFound)
    errAbort("%s", errMsg);
}

// Assembly:
subq $0x408, %rsp            # imm = 0x408
cmpq $0x0, 0x955bc(%rip)     # 0xc3698
je 0x2e1ca
leaq 0x955b7(%rip), %rdi     # 0xc36a0
callq 0x6ae0
movq 0x955d3(%rip), %rax     # 0xc36c8
movq (%rax), %r10
movl $0xff676980, %eax       # imm = 0xFF676980
movl 0x92b2d(%rip), %edx     # 0xc0c30
movq (%r10), %rsi
testq %rsi, %rsi
je 0x2e143
movl 0x14(%r10), %ecx
cmpl %edx, %ecx
jne 0x2e156
movslq 0x10(%r10), %rdi
movl 0x18(%r10,%rdi), %ecx
cmpl 0x92b12(%rip), %ecx     # 0xc0c34
jne 0x2e174
movq %rsi, %r10
incl %eax
jne 0x2e103
leaq 0x63c2b(%rip), %rdx     # 0x91d5d
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
callq 0x23f33
jmp 0x2e1ad
leaq 0x95556(%rip), %rdi     # 0xc36a0
addq $0x408, %rsp            # imm = 0x408
jmp 0x64f0
incq %r10
leaq 0x63bb3(%rip), %rdx     # 0x91d13
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r10, %r8
xorl %eax, %eax
callq 0x23f33
jmp 0x2e1ad
movsbl 0x18(%r10,%rdi), %ecx
movsbl 0x19(%r10,%rdi), %r8d
movsbl 0x1a(%r10,%rdi), %r9d
movsbl 0x1b(%r10,%rdi), %r11d
incq %r10
leaq 0x63ba0(%rip), %rdx     # 0x91d36
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x23f33
addq $0x10, %rsp
leaq 0x954ec(%rip), %rdi     # 0xc36a0
callq 0x64f0
leaq 0x62099(%rip), %rdi     # 0x90259
movq %rsp, %rsi
xorl %eax, %eax
callq 0x26e94
addq $0x408, %rsp            # imm = 0x408
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/memalloc.c
// Function: carefulCountBlocksAllocated
int carefulCountBlocksAllocated()
/* How many memory items are allocated? */
{
pthread_mutex_lock( &carefulMutex );
int result = dlCount(cmbAllocedList);
pthread_mutex_unlock( &carefulMutex );
return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x954c4(%rip), %rbx     # 0xc36a0
movq %rbx, %rdi
callq 0x6ae0
movq 0x954dd(%rip), %rdi     # 0xc36c8
callq 0x24b65
movl %eax, %ebp
movq %rbx, %rdi
callq 0x64f0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/memalloc.c
// Function: carefulTotalAllocated
size_t carefulTotalAllocated()
/* Return total bases allocated */
{
pthread_mutex_lock( &carefulMutex );
size_t result = carefulAlloced;
pthread_mutex_unlock( &carefulMutex );
return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x95492(%rip), %rbx     # 0xc36a0
movq %rbx, %rdi
callq 0x6ae0
movq 0x954b3(%rip), %r14     # 0xc36d0
movq %rbx, %rdi
callq 0x64f0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/memalloc.c
// Function: carefulFree
static void carefulFree(void *vpt)
/* Check cookies and free. */
{
pthread_mutex_lock( &carefulMutex );
struct carefulMemBlock *cmb = ((struct carefulMemBlock *)vpt)-1;
size_t size = cmb->size;
char *pEndCookie;

carefulAlloced -= size;
pEndCookie = (((char *)(cmb+1)) + size);
if (cmb->startCookie != cmbStartCookie)
    {
    pthread_mutex_unlock( &carefulMutex );
    errAbort("Bad start cookie %x freeing %llx\n", cmb->startCookie,
             ptrToLL(vpt));
    }
if (memcmp(pEndCookie, cmbEndCookie, sizeof(cmbEndCookie)) != 0)
    {
    pthread_mutex_unlock( &carefulMutex );
    errAbort("Bad end cookie %x%x%x%x freeing %llx\n", 
        pEndCookie[0], pEndCookie[1], pEndCookie[2], pEndCookie[3],
             ptrToLL(vpt));
    }
dlRemove((struct dlNode *)cmb);
carefulParent->free(cmb);
pthread_mutex_unlock( &carefulMutex );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x95151(%rip), %rdi     # 0xc36a0
callq 0x6ae0
movslq -0x8(%rbx), %r14
subq %r14, 0x95171(%rip)     # 0xc36d0
movl -0x4(%rbx), %eax
cmpl 0x926c8(%rip), %eax     # 0xc0c30
je 0x2e58a
leaq 0x9512f(%rip), %rdi     # 0xc36a0
callq 0x64f0
movl -0x4(%rbx), %esi
leaq 0x63895(%rip), %rdi     # 0x91e15
movq %rbx, %rdx
xorl %eax, %eax
callq 0x26e94
movl (%rbx,%r14), %eax
cmpl 0x926a0(%rip), %eax     # 0xc0c34
je 0x2e5ca
leaq 0x95103(%rip), %rdi     # 0xc36a0
callq 0x64f0
movsbl (%rbx,%r14), %esi
movsbl 0x1(%rbx,%r14), %edx
movsbl 0x2(%rbx,%r14), %ecx
movsbl 0x3(%rbx,%r14), %r8d
leaq 0x63877(%rip), %rdi     # 0x91e37
movq %rbx, %r9
xorl %eax, %eax
callq 0x26e94
addq $-0x18, %rbx
movq %rbx, %rdi
callq 0x24abc
movq 0x950bb(%rip), %rax     # 0xc3698
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x950b6(%rip), %rdi     # 0xc36a0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x64f0
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: setReadWriteTimeouts
int setReadWriteTimeouts(int sd, int seconds)
/* Set read and write timeouts on socket sd 
 * Return -1 if there are any errors, 0 if successful. */
{
struct timeval timeout;      
timeout.tv_sec = seconds;
timeout.tv_usec = 0;

if (setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)) < 0)
    {
    warn("setsockopt failed setting socket receive timeout\n");
    return -1;
    }

if (setsockopt(sd, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout)) < 0)
    {
    warn("setsockopt failed setting socket send timeout\n");
    return -1;
    }
return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
movslq %esi, %rax
movq %rsp, %rcx
movq %rax, (%rcx)
movq $0x0, 0x8(%rcx)
movl $0x1, %esi
movl $0x14, %edx
movl $0x10, %r8d
callq 0x6d80
testl %eax, %eax
js 0x2e68c
movq %rsp, %rcx
movl %ebx, %edi
movl $0x1, %esi
movl $0x15, %edx
movl $0x10, %r8d
callq 0x6d80
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jns 0x2e69f
leaq 0x63805(%rip), %rdi     # 0x91e8f
jmp 0x2e693
leaq 0x637ca(%rip), %rdi     # 0x91e5d
xorl %eax, %eax
callq 0x26bea
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netMustConnect
int netMustConnect(char *hostName, int port)
/* Start connection with server or die. */
{
int sd = netConnect(hostName, port);
if (sd < 0)
   noWarnAbort();
return sd;
}

// Assembly:
pushq %rbx
callq 0x2e6a5
movl %eax, %ebx
testl %eax, %eax
jns 0x2e9cc
xorl %eax, %eax
callq 0x26f4f
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netAcceptingSocketFrom
int netAcceptingSocketFrom(int port, int queueSize, char *host)
/* Create a socket that can accept connections from a 
 * IP address on the current machine if the current machine
 * has multiple IP addresses. */
{
struct sockaddr_in sai;
int sd;
int flag = 1;

netBlockBrokenPipes();
if ((sd = netStreamSocket()) < 0)
    return sd;
if (!internetFillInAddress(host, port, &sai))
    return -1;
if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(int)))
    return -1;
if (bind(sd, (struct sockaddr*)&sai, sizeof(sai)) == -1)
    {
    warn("Couldn't bind socket to %d: %s", port, strerror(errno));
    close(sd);
    return -1;
    }
listen(sd, queueSize);
return sd;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %ebx
movl $0x1, 0x4(%rsp)
cmpb $0x0, 0x94cb8(%rip)     # 0xc3700
jne 0x2ea60
movl $0x1, %esi
movl $0xd, %edi
callq 0x6890
movb $0x1, 0x94ca0(%rip)     # 0xc3700
callq 0x31626
movl %eax, %ebp
testl %eax, %eax
js 0x2eac4
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x4a9ce
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x2eac7
leaq 0x4(%rsp), %rcx
movl %ebp, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x6d80
testl %eax, %eax
jne 0x2eac7
leaq 0x8(%rsp), %rsi
movl %ebp, %edi
movl $0x10, %edx
callq 0x6140
cmpl $-0x1, %eax
je 0x2ead5
movl %ebp, %edi
movl %r15d, %esi
callq 0x6820
movl %ebp, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x6060
movl (%rax), %edi
callq 0x6230
leaq 0x63404(%rip), %rdi     # 0x91eec
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x26bea
movl %ebp, %edi
callq 0x6e80
jmp 0x2eac7
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netAcceptFrom
int netAcceptFrom(int acceptor, unsigned char subnet[4])
/* Wait for incoming connection from socket descriptor
 * from IP address in subnet.  Subnet is something
 * returned from netParseSubnet or internetParseDottedQuad. 
 * Subnet may be NULL. */
{
struct sockaddr_in sai;		/* Some system socket info. */
ZeroVar(&sai);
sai.sin_family = AF_INET;
for (;;)
    {
    socklen_t addrSize = sizeof(sai);
    int sd = accept(acceptor, (struct sockaddr *)&sai, &addrSize);
    if (sd >= 0)
	{
	if (subnet == NULL)
	    return sd;
	else
	    {
	    unsigned char unpacked[4]; 
	    internetUnpackIp(ntohl(sai.sin_addr.s_addr), unpacked);
	    if (internetIpInSubnet(unpacked, subnet))
		{
		return sd;
		}
	    else
		{
		close(sd);
		}
	    }
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movw $0x2, (%r14)
leaq 0x8(%rsp), %r15
leaq 0xc(%rsp), %r12
movl $0x10, 0x8(%rsp)
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x61f0
testl %eax, %eax
js 0x2eb42
movl %eax, %r13d
testq %rbx, %rbx
je 0x2eb8a
movl 0x14(%rsp), %edi
bswapl %edi
movq %r12, %rsi
callq 0x4aac1
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4aad4
testl %eax, %eax
jne 0x2eb8a
movl %r13d, %edi
callq 0x6e80
jmp 0x2eb42
movl %r13d, %eax
addq $0x28, %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/net.c
// Function: netFileFromSocket
FILE *netFileFromSocket(int socket)
/* Wrap a FILE around socket.  This should be fclose'd
 * and separately the socket close'd. */
{
FILE *f;
if ((socket = dup(socket)) < 0)
   errnoAbort("Couldn't dupe socket in netFileFromSocket");
f = fdopen(socket, "r+");
if (f == NULL)
   errnoAbort("Couldn't fdopen socket in netFileFromSocket");
return f;
}

// Assembly:
pushq %rbx
callq 0x6b60
movl %eax, %ebx
testl %eax, %eax
jns 0x2ebb6
leaq 0x6335c(%rip), %rdi     # 0x91f0b
xorl %eax, %eax
callq 0x26fc7
leaq 0x63378(%rip), %rsi     # 0x91f35
movl %ebx, %edi
callq 0x6760
movq %rax, %rbx
testq %rax, %rax
jne 0x2ebda
leaq 0x63365(%rip), %rdi     # 0x91f38
xorl %eax, %eax
callq 0x26fc7
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netReadAll
ssize_t netReadAll(int sd, void *vBuf, ssize_t size)
/* Read given number of bytes into buffer.
 * Don't give up on first read! */
{
char *buf = vBuf;
ssize_t totalRead = 0;
int oneRead;

if (!plumberInstalled)
    netBlockBrokenPipes();
while (totalRead < size)
    {
    oneRead = read(sd, buf + totalRead, size - totalRead);
    if (oneRead < 0)
	return oneRead;
    if (oneRead == 0)
        break;
    totalRead += oneRead;
    }
return totalRead;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
cmpb $0x0, 0x94ae6(%rip)     # 0xc3700
jne 0x2ec32
movl $0x1, %esi
movl $0xd, %edi
callq 0x6890
movb $0x1, 0x94ace(%rip)     # 0xc3700
xorl %r15d, %r15d
testq %rbx, %rbx
jle 0x2ec63
leaq (%r14,%r15), %rsi
movq %rbx, %rdx
subq %r15, %rdx
movl %ebp, %edi
callq 0x6aa0
testl %eax, %eax
js 0x2ec60
je 0x2ec63
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq %rax, %r15
cmpq %rbx, %r15
jl 0x2ec3a
jmp 0x2ec63
movslq %eax, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netMustReadAll
ssize_t netMustReadAll(int sd, void *vBuf, ssize_t size)
/* Read given number of bytes into buffer or die.
 * Don't give up if first read is short! */
{
ssize_t ret = netReadAll(sd, vBuf, size);
if (ret < 0)
    errnoAbort("Couldn't finish netReadAll");
return ret;
}

// Assembly:
pushq %rbx
callq 0x2ec04
movq %rax, %rbx
testq %rax, %rax
jns 0x2ec8d
leaq 0x632de(%rip), %rdi     # 0x91f64
xorl %eax, %eax
callq 0x26fc7
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netParseSubnet
void netParseSubnet(char *in, unsigned char out[4])
/* Parse subnet, which is a prefix of a normal dotted quad form.
 * Out will contain 255's for the don't care bits. */
{
out[0] = out[1] = out[2] = out[3] = 255;
if (in != NULL)
    {
    char *snsCopy = strdup(in);
    char *words[5];
    int wordCount, i;
    wordCount = chopString(snsCopy, ".", words, ArraySize(words));
    if (wordCount > 3 || wordCount < 1)
        notGoodSubnet(in);
    for (i=0; i<wordCount; ++i)
	{
	char *s = words[i];
	int x;
	if (!isdigit(s[0]))
	    notGoodSubnet(in);
	x = atoi(s);
	if (x > 255)
	    notGoodSubnet(in);
	out[i] = x;
	}
    freez(&snsCopy);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, (%rsp)
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x2ed6a
movq %rdi, %r14
callq 0x6dd0
movq %rax, 0x8(%rsp)
leaq 0x61cb1(%rip), %rsi     # 0x90978
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
movl $0x5, %ecx
callq 0x22667
movl %eax, %r12d
leal -0x4(%r12), %eax
cmpl $-0x4, %eax
ja 0x2ecfc
leaq 0x63b8b(%rip), %rdi     # 0x92878
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
testl %r12d, %r12d
jle 0x2ed60
callq 0x6790
movq %rax, %r15
movl %r12d, %r12d
xorl %ebx, %ebx
movq 0x10(%rsp,%rbx,8), %r13
movq (%r15), %rax
movsbq (%r13), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x2ed2e
leaq 0x63b54(%rip), %rdi     # 0x92878
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
movq %r13, %rdi
callq 0x6bd0
movl %eax, %ebp
cmpl $0x100, %eax            # imm = 0x100
jl 0x2ed50
leaq 0x63b32(%rip), %rdi     # 0x92878
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
movq (%rsp), %rax
movb %bpl, (%rax,%rbx)
incq %rbx
cmpq %rbx, %r12
jne 0x2ed09
leaq 0x8(%rsp), %rdi
callq 0x2e0b0
addq $0x38, %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/net.c
// Function: parseByteRange
static void parseByteRange(char *url, ssize_t *rangeStart, ssize_t *rangeEnd, boolean terminateAtByteRange)
/* parse the byte range information from url */
{
char *x;
/* default to no byte range specified */
*rangeStart = -1;
*rangeEnd = -1;
x = strrchr(url, ';');
if (x)
    {
    if (startsWith(";byterange=", x))
	{
	char *y=strchr(x, '=');
	++y;
	char *z=strchr(y, '-');
	if (z)
	    {
	    ++z;
	    if (terminateAtByteRange)
		*x = 0;
	    // TODO: use something better than atoll() ?
	    *rangeStart = atoll(y); 
	    if (z[0] != '\0')
		*rangeEnd = atoll(z);
	    }    
	}
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq $-0x1, %rax
movq %rax, (%rsi)
movq %rax, (%rdx)
movl $0x3b, %esi
callq 0x67c0
testq %rax, %rax
je 0x2f188
movq %rax, %r15
leaq 0x62f7c(%rip), %rdi     # 0x920a8
movq %rax, %rsi
callq 0x21b23
testl %eax, %eax
je 0x2f188
movq %r15, %rdi
movl $0x3d, %esi
callq 0x6270
movq %rax, %r13
incq %r13
movq %r13, %rdi
movl $0x2d, %esi
callq 0x6270
testq %rax, %rax
je 0x2f188
movq %rax, %r12
incq %r12
testl %ebp, %ebp
je 0x2f16b
movb $0x0, (%r15)
movq %r13, %rdi
callq 0x6520
movq %rax, (%r14)
cmpb $0x0, (%r12)
je 0x2f188
movq %r12, %rdi
callq 0x6520
movq %rax, (%rbx)
addq $0x8, %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/net.c
// Function: netWaitForData
int netWaitForData(int sd, int microseconds)
/* Wait for descriptor to have some data to read, up to given number of
 * microseconds.  Returns amount of data there or zero if timed out. */
{
struct timeval tv;
fd_set set;
int readyCount;

for (;;)
    {
    if (microseconds >= 1000000)
	{
	tv.tv_sec = microseconds/1000000;
	tv.tv_usec = microseconds%1000000;
	}
    else
	{
	tv.tv_sec = 0;
	tv.tv_usec = microseconds;
	}
    FD_ZERO(&set);
    FD_SET(sd, &set);
    readyCount = select(sd+1, &set, NULL, NULL, &tv);
    if (readyCount < 0) 
	{
	if (errno == EINTR)	/* Select interrupted, not timed out. */
	    continue;
    	else 
    	    warn("select failure %s", strerror(errno));
    	}
    else
	{
    	return readyCount;	/* Zero readyCount indicates time out */
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edi, %ebx
leal 0x3f(%rbx), %eax
testl %edi, %edi
cmovnsl %edi, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %edi, %ecx
subl %edx, %ecx
movl $0x1, %r13d
shlq %cl, %r13
sarl $0x6, %eax
movslq %eax, %rbp
incl %ebx
movl %esi, %eax
imulq $0x431bde83, %rax, %r12 # imm = 0x431BDE83
shrq $0x32, %r12
imull $0xf4240, %r12d, %eax   # imm = 0xF4240
movl %esi, %r14d
subl %eax, %r14d
xorl %eax, %eax
cmpl $0xf4240, %esi          # imm = 0xF4240
movslq %esi, %rcx
cmovll %eax, %r12d
cmovlq %rcx, %r14
movq %rsp, %r15
movq %r12, (%rsp)
movq %r14, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x80(%rsp)
orq %r13, 0x10(%rsp,%rbp,8)
movl %ebx, %edi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x66b0
testl %eax, %eax
jns 0x2f44e
callq 0x6060
movl (%rax), %edi
cmpl $0x4, %edi
je 0x2f3d7
callq 0x6230
leaq 0x62ba0(%rip), %rdi     # 0x91fe2
movq %rax, %rsi
xorl %eax, %eax
callq 0x26bea
jmp 0x2f3d7
addq $0x98, %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/net.c
// Function: openFtpControlSocket
static int openFtpControlSocket(char *host, int port, char *user, char *password)
/* Open a socket to host,port; authenticate anonymous ftp; set type to I; 
 * return socket desc or -1 if there was an error. */
{
int sd = netConnect(host, port);
if (sd < 0)
    return -1;

/* First read the welcome msg */
if (readReadyWait(sd, NET_FTP_TIMEOUT))
    sendFtpCommand(sd, "", NULL, NULL);

char cmd[256];
int retCode = 0;
safef(cmd,sizeof(cmd),"USER %s\r\n", user);
if (!sendFtpCommand(sd, cmd, NULL, &retCode))
    {
    close(sd);
    return -1;
    }

if (retCode == 331)
    {
    safef(cmd,sizeof(cmd),"PASS %s\r\n", password);
    if (!sendFtpCommand(sd, cmd, NULL, NULL))
	{
	close(sd);
	return -1;
	}
    }

if (!sendFtpCommand(sd, "TYPE I\r\n", NULL, NULL))
    {
    close(sd);
    return -1;
    }
/* 200 Type set to I */
/* (send the data as binary, so can support compressed files) */
return sd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rcx, %r14
movq %rdx, %r15
callq 0x2e6a5
testl %eax, %eax
js 0x2f803
movl %eax, %ebx
movl %eax, %edi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x2f372
testl %eax, %eax
je 0x2f76e
leaq 0x68cf1(%rip), %rsi     # 0x98454
movl %ebx, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2f81b
leaq 0xc(%rsp), %r12
movl $0x0, (%r12)
leaq 0x6316d(%rip), %rdx     # 0x928ef
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r15, %rcx
xorl %eax, %eax
callq 0x23f33
movl %ebx, %edi
movq %r13, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x2f81b
testl %eax, %eax
je 0x2f7fc
cmpl $0x14b, 0xc(%rsp)       # imm = 0x14B
jne 0x2f7e6
leaq 0x6313c(%rip), %rdx     # 0x928f9
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rcx
xorl %eax, %eax
callq 0x23f33
movl %ebx, %edi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2f81b
testl %eax, %eax
je 0x2f7fc
leaq 0x63116(%rip), %rsi     # 0x92903
movl %ebx, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2f81b
testl %eax, %eax
jne 0x2f808
movl %ebx, %edi
callq 0x6e80
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: connectNpu
int connectNpu(struct netParsedUrl npu, char *url, boolean noProxy)
/* Connect using NetParsedUrl. */
{
int sd = -1;
if (sameString(npu.protocol, "http"))
    {
    sd = netConnect(npu.host, atoi(npu.port));
    }
else if (sameString(npu.protocol, "https"))
    {
    sd = netConnectHttps(npu.host, atoi(npu.port), noProxy);
    }
else
    {
    errAbort("netHttpConnect: url (%s) is not for http.", url);
    return -1;  /* never gets here, fixes compiler complaint */
    }
return sd;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %rsi
leaq 0x20(%rsp), %rdi
movl $0x70747468, %eax       # imm = 0x70747468
movl (%rdi), %ecx
xorl %eax, %ecx
movzbl 0x4(%rdi), %edx
orl %ecx, %edx
je 0x2f89d
xorl (%rdi), %eax
movzwl 0x4(%rdi), %ecx
xorl $0x73, %ecx
orl %eax, %ecx
je 0x2f8bc
leaq 0x627a1(%rip), %rdi     # 0x92030
xorl %eax, %eax
callq 0x26e94
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2f8db
leaq 0x1010(%rdi), %rbx
addq $0x1810, %rdi           # imm = 0x1810
callq 0x6bd0
movq %rbx, %rdi
movl %eax, %esi
callq 0x2e6a5
jmp 0x2f8db
leaq 0x1010(%rdi), %r14
addq $0x1810, %rdi           # imm = 0x1810
callq 0x6bd0
movq %r14, %rdi
movl %eax, %esi
movl %ebx, %edx
callq 0x4a7c0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: setAuthorization
void setAuthorization(struct netParsedUrl npu, char *authHeader, struct dyString *dy)
/* Set the specified authorization header with BASIC auth base64-encoded user and password */
{
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, "%s: Basic %s\r\n", authHeader, b64up);
    freez(&b64up);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
cmpb $0x0, 0x140(%rsp)
je 0x2f96b
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x130(%rsp), %r8
leaq 0x140(%rsp), %rcx
addq $0x810, %r8             # imm = 0x810
leaq 0x6319c(%rip), %rdx     # 0x92ab9
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
xorl %eax, %eax
callq 0x23f33
movq %r15, %rdi
callq 0x62d0
movq %r15, %rdi
movq %rax, %rsi
callq 0x42d88
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x62707(%rip), %rsi     # 0x9205a
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x26883
movq %r15, %rdi
callq 0x2e0b0
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: checkNoProxy
boolean checkNoProxy(char *host)
/* See if host endsWith element on no_proxy list. Elements are comma-separated. */
{
char *list = cloneString(getenv("no_proxy"));
if (!list)
    return FALSE;
replaceChar(list, ',', ' ');
char *word;
while((word=nextWord(&list)))
    {
    if (endsWith(host, word))
	return TRUE;
    }
return FALSE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x626df(%rip), %rdi     # 0x92069
callq 0x68f0
movq %rax, %rdi
callq 0x1feba
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
testq %rax, %rax
je 0x2f9db
movq %rax, %rdi
movl $0x2c, %esi
movl $0x20, %edx
callq 0x220a3
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x22cf1
testq %rax, %rax
je 0x2f9db
movq %rbx, %rdi
movq %rax, %rsi
callq 0x21e4c
testl %eax, %eax
je 0x2f9ba
movl $0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netUrlHeadExt
int netUrlHeadExt(char *url, char *method, struct hash *hash)
/* Go get head and return status.  Return negative number if
 * can't get head. If hash is non-null, fill it with header
 * lines with upper cased keywords for case-insensitive lookup, 
 * including hopefully CONTENT-TYPE: . */
{
int sd = netOpenHttpExt(url, method, NULL);
int status = EIO;
if (sd >= 0)
    {
    char *line, *word;
    struct lineFile *lf = lineFileAttach(url, TRUE, sd);

    if (lineFileNext(lf, &line, NULL))
	{
	if (startsWith("HTTP/", line))
	    {
	    word = nextWord(&line);
	    word = nextWord(&line);
	    if (word != NULL && isdigit(word[0]))
	        {
		status = atoi(word);
		if (hash != NULL)
		    {
		    while (lineFileNext(lf, &line, NULL))
		        {
			word = nextWord(&line);
			if (word == NULL)
			    break;
			hashAdd(hash, strUpper(word), cloneString(skipLeadingSpaces(line)));
			}
		    }
		}
	    }
	}
    lineFileClose(&lf);
    }
else
    status = errno;
return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x62397(%rip), %rdx     # 0x9212e
leaq 0x62399(%rip), %rcx     # 0x92137
xorl %r8d, %r8d
callq 0x2f9e6
testl %eax, %eax
js 0x2fea0
movq %r14, %rdi
movl $0x1, %esi
movl %eax, %edx
callq 0x2a145
movq %rax, %r14
movq %rax, 0x8(%rsp)
movq %rsp, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x2a7a9
movl $0x5, %ebp
testl %eax, %eax
je 0x2fe94
movq (%rsp), %rsi
leaq 0x61708(%rip), %rdi     # 0x914f2
callq 0x21b23
testl %eax, %eax
je 0x2fe94
movq %rsp, %r15
movq %r15, %rdi
callq 0x22cf1
movq %r15, %rdi
callq 0x22cf1
testq %rax, %rax
je 0x2fe94
movq %rax, %r15
callq 0x6790
movq (%rax), %rax
movsbq (%r15), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x2fe94
movq %r15, %rdi
callq 0x6bd0
movl %eax, %ebp
testq %rbx, %rbx
je 0x2fe94
movq %rsp, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2a7a9
testl %eax, %eax
je 0x2fe94
movq %rsp, %r15
movq %r15, %rdi
callq 0x22cf1
testq %rax, %rax
je 0x2fe94
movq %rax, %rdi
callq 0x2206a
movq %rax, %r12
movq (%rsp), %rdi
callq 0x215d4
movq %rax, %rdi
callq 0x1feba
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x29142
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2a7a9
testl %eax, %eax
jne 0x2fe4c
leaq 0x8(%rsp), %rdi
callq 0x2ae73
jmp 0x2fea7
callq 0x6060
movl (%rax), %ebp
movl %ebp, %eax
addq $0x10, %rsp
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: netSlurpFile
struct dyString *netSlurpFile(int sd)
/* Slurp file into dynamic string and return. */
{
char buf[4*1024];
int readSize;
struct dyString *dy = newDyString(4*1024);

/* Slurp file into dy and return. */
while ((readSize = read(sd, buf, sizeof(buf))) > 0)
    dyStringAppendN(dy, buf, readSize);
return dy;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movl %edi, %ebx
movl $0x1000, %edi           # imm = 0x1000
callq 0x264e0
movq %rax, %r14
movq %rsp, %rsi
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
callq 0x6aa0
testl %eax, %eax
jle 0x303f7
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x265ea
movl $0x1000, %edx           # imm = 0x1000
movl %ebx, %edi
movq %r15, %rsi
callq 0x6aa0
testl %eax, %eax
jg 0x303d7
movq %r14, %rax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netSlurpUrl
struct dyString *netSlurpUrl(char *url)
/* Go grab all of URL and return it as dynamic string. */
{
int sd = netUrlOpen(url);
if (sd < 0)
    errAbort("netSlurpUrl: failed to open socket for [%s]", url);
struct dyString *dy = netSlurpFile(sd);
close(sd);
return dy;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %esi, %esi
callq 0x2ff0b
movl %eax, %ebx
testl %eax, %eax
jns 0x3042c
leaq 0x61d84(%rip), %rdi     # 0x921a6
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
movl %ebx, %edi
callq 0x303a6
movq %rax, %r14
movl %ebx, %edi
callq 0x6e80
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: transferParamsToRedirectedUrl
char *transferParamsToRedirectedUrl(char *url, char *newUrl)
/* Transfer password, byteRange, and any other parameters from url to newUrl and return result.
 * freeMem result. */
{
struct netParsedUrl npu, newNpu;
/* Parse the old URL to make parts available for graft onto the redirected url. */
/* This makes redirection work with byterange urls and user:password@ */
netParseUrl(url, &npu);
netParseUrl(newUrl, &newNpu);
if (npu.byteRangeStart != -1)
    {
    newNpu.byteRangeStart = npu.byteRangeStart;
    newNpu.byteRangeEnd = npu.byteRangeEnd;
    }
if ((npu.user[0] != 0) && (newNpu.user[0] == 0))
    {
    safecpy(newNpu.user,     sizeof newNpu.user,     npu.user);
    safecpy(newNpu.password, sizeof newNpu.password, npu.password);
    }
return urlFromNetParsedUrl(&newNpu);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x5060, %rsp           # imm = 0x5060
movq %rsi, %r15
leaq 0x2830(%rsp), %rbx
movq %rbx, %rsi
callq 0x2ed79
movq %rsp, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ed79
movq 0x2820(%rbx), %rax
cmpq $-0x1, %rax
je 0x30a6a
movq %rax, 0x2820(%rsp)
movq 0x5058(%rsp), %rax
movq %rax, 0x2828(%rsp)
cmpb $0x0, 0x2840(%rsp)
je 0x30aad
cmpb $0x0, 0x10(%rsp)
jne 0x30aad
leaq 0x2840(%rsp), %rdx
leaq 0x10(%rsp), %rdi
movl $0x800, %esi            # imm = 0x800
callq 0x21600
movl $0x810, %eax            # imm = 0x810
addq %rax, %r14
addq %rax, %rbx
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rbx, %rdx
callq 0x21600
movq %rsp, %rdi
callq 0x2f197
addq $0x5060, %rsp           # imm = 0x5060
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netLineFileMayOpen
struct lineFile *netLineFileMayOpen(char *url)
/* Return a lineFile attached to url. http skips header.
 * Supports some compression formats.  Prints warning message, but
 * does not abort, just returning NULL if there's a problem. */
{
int sd = netUrlOpen(url);
if (sd < 0)
    {
    warn("Couldn't open %s", url);
    return NULL;
    }
else
    {
    struct lineFile *lf = NULL;
    char *newUrl = NULL;
    int newSd = 0;
    if (startsWith("http://",url) || startsWith("https://",url))
	{  
	if (!netSkipHttpHeaderLinesHandlingRedirect(sd, url, &newSd, &newUrl))
	    {
	    return NULL;
	    }
	if (newUrl != NULL)
	    {
    	    /*  Update sd with newSd, replace it with newUrl, etc. */
	    sd = newSd;
	    url = newUrl;
	    }
	}
    char *urlDecoded = cloneString(url);
    cgiDecode(url, urlDecoded, strlen(url));
    boolean isCompressed =
	(endsWith(urlDecoded,".gz") ||
   	 endsWith(urlDecoded,".Z")  ||
	 endsWith(urlDecoded,".bz2"));
    freeMem(urlDecoded);
    if (isCompressed)
	{
	lf = lineFileDecompressFd(url, TRUE, sd);
           /* url needed only for compress type determination */
	}
    else
	{
	lf = lineFileAttach(url, TRUE, sd);
	}
    if (newUrl) 
	freeMem(newUrl); 
    return lf;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %esi, %esi
callq 0x2ff0b
testl %eax, %eax
js 0x30cc0
movl %eax, %ebp
movq $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
leaq 0x60a32(%rip), %rdi     # 0x916a8
movq %rbx, %rsi
callq 0x21b23
testl %eax, %eax
jne 0x30c95
leaq 0x60a27(%rip), %rdi     # 0x916b0
movq %rbx, %rsi
callq 0x21b23
testl %eax, %eax
je 0x30cdb
leaq 0x4(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x30ac2
testl %eax, %eax
je 0x30cd6
movq 0x8(%rsp), %r14
testq %r14, %r14
je 0x30cde
movl 0x4(%rsp), %ebp
movq %r14, %rbx
jmp 0x30cde
leaq 0x617b9(%rip), %rdi     # 0x92480
xorl %r15d, %r15d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26bea
jmp 0x30d4b
xorl %r15d, %r15d
jmp 0x30d4b
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x1feba
movq %rax, %r15
movq %rbx, %rdi
callq 0x62d0
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x44c6c
leaq 0x67a03(%rip), %rsi     # 0x98708
movq %r15, %rdi
callq 0x21e4c
testl %eax, %eax
jne 0x30d24
leaq 0x5d398(%rip), %rsi     # 0x8e0b0
movq %r15, %rdi
callq 0x21e4c
testl %eax, %eax
je 0x30d5b
movq %r15, %rdi
callq 0x2e0a0
movq %rbx, %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x2a198
movq %rax, %r15
testq %r14, %r14
je 0x30d4b
movq %r14, %rdi
callq 0x2e0a0
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5d351(%rip), %rsi     # 0x8e0b3
movq %r15, %rdi
callq 0x21e4c
movl %eax, %r12d
movq %r15, %rdi
callq 0x2e0a0
testl %r12d, %r12d
jne 0x30d2c
movq %rbx, %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x2a145
jmp 0x30d3b
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netUrlMustOpenPastHeader
int netUrlMustOpenPastHeader(char *url)
/* Get socket descriptor for URL.  Process header, handling any forwarding and
 * the like.  Do errAbort if there's a problem, which includes anything but a 200
 * return from http after forwarding. */
{
int sd = netUrlOpen(url);
if (sd < 0)
    noWarnAbort();
int newSd = 0;
if (startsWith("http://",url) || startsWith("https://",url))
    {  
    char *newUrl = NULL;
    if (!netSkipHttpHeaderLinesHandlingRedirect(sd, url, &newSd, &newUrl))
	noWarnAbort();
    if (newUrl != NULL)
	{
	sd = newSd;
	freeMem(newUrl); 
	}
    }
return sd;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
xorl %esi, %esi
callq 0x2ff0b
movl %eax, %ebx
testl %eax, %eax
jns 0x30da9
xorl %eax, %eax
callq 0x26f4f
movl $0x0, 0xc(%rsp)
leaq 0x608f0(%rip), %rdi     # 0x916a8
movq %r14, %rsi
callq 0x21b23
testl %eax, %eax
jne 0x30dd7
leaq 0x608e5(%rip), %rdi     # 0x916b0
movq %r14, %rsi
callq 0x21b23
testl %eax, %eax
je 0x30e10
leaq 0x10(%rsp), %rcx
movq $0x0, (%rcx)
leaq 0xc(%rsp), %rdx
movl %ebx, %edi
movq %r14, %rsi
callq 0x30ac2
testl %eax, %eax
jne 0x30dfd
xorl %eax, %eax
callq 0x26f4f
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x30e10
movl 0xc(%rsp), %ebx
callq 0x2e0a0
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netLineFileSilentOpen
struct lineFile *netLineFileSilentOpen(char *url)
/* Open a lineFile on a URL.  Just return NULL without any user
 * visible warning message if there's a problem. */
{
pushSilentWarnHandler();
struct lineFile *lf = netLineFileMayOpen(url);
popWarnHandler();
return lf;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
callq 0x2714b
movq %rbx, %rdi
callq 0x30c42
movq %rax, %rbx
xorl %eax, %eax
callq 0x26f14
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netReadTextFileIfExists
char *netReadTextFileIfExists(char *url)
/* Read entire URL and return it as a string.  URL should be text (embedded zeros will be
 * interpreted as end of string).  If the url doesn't exist or has other problems,
 * returns NULL. */
{
struct lineFile *lf = netLineFileSilentOpen(url);
if (lf == NULL)
    return NULL;
char *text = lineFileReadAll(lf);
lineFileClose(&lf);
return text;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %eax, %eax
callq 0x2714b
movq %rbx, %rdi
callq 0x30c42
movq %rax, %rbx
xorl %eax, %eax
callq 0x26f14
movq %rbx, 0x8(%rsp)
testq %rbx, %rbx
je 0x30e81
movq %rbx, %rdi
callq 0x2bb87
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2ae73
movq %rbx, %rax
jmp 0x30e83
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netLineFileOpen
struct lineFile *netLineFileOpen(char *url)
/* Return a lineFile attached to url.  This one
 * will skip any headers.   Free this with
 * lineFileClose(). */
{
struct lineFile *lf = netLineFileMayOpen(url);
if (lf == NULL)
    noWarnAbort();
return lf;
}

// Assembly:
pushq %rbx
callq 0x30c42
movq %rax, %rbx
testq %rax, %rax
jne 0x30e9e
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: netSendString
boolean netSendString(int sd, char *s)
/* Send a string down a socket - length byte first. */
{
int length = strlen(s);
UBYTE len;

if (length > 255)
    errAbort("Trying to send a string longer than 255 bytes (%d bytes)", length);
len = length;
if (write(sd, &len, 1)<0)
    {
    warn("Couldn't send string to socket");
    return FALSE;
    }
if (write(sd, s, length)<0)
    {
    warn("Couldn't send string to socket");
    return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq %rsi, %rdi
callq 0x62d0
movq %rax, %r14
cmpl $0x100, %r14d           # imm = 0x100
jl 0x30ed5
leaq 0x615c6(%rip), %rdi     # 0x92491
movl %r14d, %esi
xorl %eax, %eax
callq 0x26e94
leaq 0xf(%rsp), %rsi
movb %r14b, (%rsi)
movl $0x1, %edx
movl %ebp, %edi
callq 0x6260
testq %rax, %rax
js 0x30f05
movslq %r14d, %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x6260
movl $0x1, %ebx
testq %rax, %rax
jns 0x30f15
leaq 0x615be(%rip), %rdi     # 0x924ca
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x26bea
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netSendLongString
boolean netSendLongString(int sd, char *s)
/* Send a long string down socket: two bytes for length. */
{
unsigned length = strlen(s);
UBYTE b[2];

if (length >= 64*1024)
    {
    warn("Trying to send a string longer than 64k bytes (%d bytes)", length);
    return FALSE;
    }
b[0] = (length>>8);
b[1] = (length&0xff);
if (write(sd, b, 2) < 0)
    {
    warn("Couldn't send long string to socket");
    return FALSE;
    }
if (write(sd, s, length)<0)
    {
    warn("Couldn't send long string to socket");
    return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq %rsi, %rdi
callq 0x62d0
movq %rax, %r14
cmpl $0x10000, %r14d         # imm = 0x10000
jb 0x30f56
leaq 0x615a1(%rip), %rdi     # 0x924e9
xorl %ebx, %ebx
movl %r14d, %esi
xorl %eax, %eax
callq 0x26bea
jmp 0x30f9e
movl %r14d, %eax
rolw $0x8, %ax
leaq 0xe(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
movl %ebp, %edi
callq 0x6260
testq %rax, %rax
js 0x30f8e
movzwl %r14w, %edx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x6260
movl $0x1, %ebx
testq %rax, %rax
jns 0x30f9e
leaq 0x6158d(%rip), %rdi     # 0x92522
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x26bea
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netSendHugeString
boolean netSendHugeString(int sd, char *s)
/* Send a long string down socket: four bytes for length. */
{
unsigned long length = strlen(s);
unsigned long l = length;
UBYTE b[4];
int i;
for (i=3; i>=0; --i)
    {
    b[i] = l & 0xff;
    l >>= 8;
    }
if (write(sd, b, 4) < 0)
    {
    warn("Couldn't send huge string to socket");
    return FALSE;
    }
if (write(sd, s, length) < 0)
    {
    warn("Couldn't send huge string to socket");
    return FALSE;
    }
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq %rsi, %rdi
callq 0x62d0
movq %rax, %r14
movl $0x4, %eax
movq %r14, %rcx
movb %cl, 0xb(%rsp,%rax)
shrq $0x8, %rcx
decq %rax
jne 0x30fc9
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
movl %ebp, %edi
callq 0x6260
testq %rax, %rax
js 0x31003
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6260
movl $0x1, %ebx
testq %rax, %rax
jns 0x31013
leaq 0x6153c(%rip), %rdi     # 0x92546
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x26bea
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/net.c
// Function: netGetString
char *netGetString(int sd, char buf[256])
/* Read string into buf and return it.  If buf is NULL
 * an internal buffer will be used. Print warning message
 * and return NULL if any problem. */
{
static char sbuf[256];
UBYTE len = 0;
int length;
int sz;
if (buf == NULL) buf = sbuf;
sz = netReadAll(sd, &len, 1);
if (sz == 0)
    return NULL;
if (sz < 0)
    {
    warn("Couldn't read string length");
    return NULL;
    }
length = len;
if (length > 0)
    if (netReadAll(sd, buf, length) < 0)
	{
	warn("Couldn't read string body");
	return NULL;
	}
buf[length] = 0;
return buf;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebp
leaq 0xf(%rsp), %rax
movb $0x0, (%rax)
testq %rsi, %rsi
leaq 0x926d6(%rip), %rbx     # 0xc3710
cmovneq %rsi, %rbx
movl $0x1, %edx
movq %rax, %rsi
callq 0x2ec04
testl %eax, %eax
je 0x31077
js 0x3107b
movzbl 0xf(%rsp), %r14d
testq %r14, %r14
je 0x3108d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2ec04
testq %rax, %rax
jns 0x31090
leaq 0x61511(%rip), %rdi     # 0x92586
jmp 0x31082
xorl %ebx, %ebx
jmp 0x31095
leaq 0x614e8(%rip), %rdi     # 0x9256a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x26bea
jmp 0x31095
xorl %r14d, %r14d
movb $0x0, (%rbx,%r14)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq