LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcPathToUrl
char *udcPathToUrl(const char *path, char *buf, size_t size, char *cacheDir)
/* Translate path into an URL, store in buf, return pointer to buf if successful
 * and NULL if not. */
{
if (cacheDir == NULL)
    cacheDir = udcDefaultDir();
int offset = 0;
if (startsWith(cacheDir, (char *)path))
    offset = strlen(cacheDir);
if (path[offset] == '/')
    offset++;
char protocol[16];
strncpy(protocol, path+offset, sizeof(protocol));
protocol[ArraySize(protocol)-1] = '\0';
char *p = strchr(protocol, '/');
if (p == NULL)
    {
    errAbort("unable to parse protocol (first non-'%s' directory) out of path '%s'\n",
	     cacheDir, path);
    return NULL;
    }
*p++ = '\0';
char afterProtocol[4096];
qDecode(path+1+strlen(protocol)+1, afterProtocol, sizeof(afterProtocol));
safef(buf, size, "%s://%s", protocol, afterProtocol);
return buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1038, %rsp           # imm = 0x1038
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
jne 0x40e71
movq 0x7fe27(%rip), %r12     # 0xc0c98
movq %r12, %rdi
movq %r15, %rsi
callq 0x217c8
testl %eax, %eax
je 0x40e8a
movq %r12, %rdi
callq 0x62d0
jmp 0x40e8c
xorl %eax, %eax
cltq
xorl %ecx, %ecx
cmpb $0x2f, (%r15,%rax)
sete %cl
addl %ecx, %eax
movslq %eax, %rsi
addq %r15, %rsi
leaq 0x20(%rsp), %rbx
movl $0x10, %edx
movq %rbx, %rdi
callq 0x6380
movb $0x0, 0xf(%rbx)
movq %rbx, %rdi
movl $0x2f, %esi
callq 0x6270
testq %rax, %rax
je 0x40f92
movq %r13, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movb $0x0, (%rax)
leaq 0x20(%rsp), %rdi
callq 0x62d0
addq %rax, %r15
addq $0x2, %r15
leaq 0x30(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %r15, %rdx
callq 0x21264
leaq 0x541e7(%rip), %r12     # 0x950ed
leaq 0xc(%rsp), %r13
movq %r14, %rbp
leaq 0x1(%r14), %rbx
movzbl (%r14), %eax
cmpl $0x51, %eax
je 0x40f2a
testl %eax, %eax
je 0x40f67
movb %al, (%rbp)
incq %rbp
movq %rbx, %r14
jmp 0x40f0e
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x66d0
testl %eax, %eax
je 0x40f4e
movb 0xc(%rsp), %al
movb %al, (%rbp)
incq %rbp
addq $0x3, %r14
jmp 0x40f0e
leaq 0x54421(%rip), %rdi     # 0x95376
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x26b6f
movq %rbx, %r14
jmp 0x40f0e
movb $0x0, (%rbp)
leaq 0x53ed5(%rip), %rdx     # 0x94e47
leaq 0x20(%rsp), %rcx
leaq 0x30(%rsp), %r8
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x23c18
jmp 0x40fa8
leaq 0x53e68(%rip), %rdi     # 0x94e01
xorl %ebx, %ebx
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x26b6f
movq %rbx, %rax
addq $0x1038, %rsp           # imm = 0x1038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcSizeFromCache
long long int udcSizeFromCache(char *url, char *cacheDir)
/* Look up the file size from the local cache bitmap file, or -1 if there
 * is no cache for url. */
{
long long int ret = -1;
if (cacheDir == NULL)
    cacheDir = udcDefaultDir();
struct slName *sl, *slList = udcFileCacheFiles(url, cacheDir);
for (sl = slList;  sl != NULL;  sl = sl->next)
    if (endsWith(sl->name, bitmapName))
	{
	ret = udcSizeAndModTimeFromBitmap(sl->name, NULL);
	break;
	}
slNameFreeList(&slList);
return ret;
}

// Assembly:
testq %rsi, %rsi
jne 0x40fc9
movq 0x7fccf(%rip), %rsi     # 0xc0c98
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x40b99
movq %rax, (%rsp)
movq $-0x1, %rbx
testq %rax, %rax
je 0x4101a
movq %rax, %r14
leaq 0x54102(%rip), %r15     # 0x950f2
leaq 0x8(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x21aed
testl %eax, %eax
jne 0x4100d
movq (%r14), %r14
testq %r14, %r14
jne 0x40ff0
jmp 0x4101a
movq %r12, %rdi
xorl %esi, %esi
callq 0x41031
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1fcd6
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcSizeAndModTimeFromBitmap
static long long int udcSizeAndModTimeFromBitmap(char *bitmapFileName, time_t *retTime)
/* Look up the file size from the local cache bitmap file, or -1 if there
 * is no cache for url. If retTime is non-null, store the remote update time in it. */
{
long long int ret = -1;
struct udcBitmap *bits = udcBitmapOpen(bitmapFileName);
if (bits != NULL)
    {
    ret = bits->fileSize;
    if (retTime)
	*retTime = bits->remoteUpdate;
    }
udcBitmapClose(&bits);
return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x411b6
movq %rax, (%rsp)
testq %rax, %rax
je 0x41058
movq 0x18(%rax), %rbx
testq %r14, %r14
je 0x4105f
movq 0x10(%rax), %rax
movq %rax, (%r14)
jmp 0x4105f
movq $-0x1, %rbx
movq %rsp, %rdi
callq 0x40e28
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcTimeFromCache
time_t udcTimeFromCache(char *url, char *cacheDir)
/* Look up the file datetime from the local cache bitmap file, or 0 if there
 * is no cache for url. */
{
time_t t = 0;
long long int ret = -1;
if (cacheDir == NULL)
    cacheDir = udcDefaultDir();
struct slName *sl, *slList = udcFileCacheFiles(url, cacheDir);
for (sl = slList;  sl != NULL;  sl = sl->next)
    if (endsWith(sl->name, bitmapName))
	{
	ret = udcSizeAndModTimeFromBitmap(sl->name, &t);
	if (ret == -1)
	    t = 0;
	break;
	}
slNameFreeList(&slList);
return t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq $0x0, (%rsp)
testq %rsi, %rsi
jne 0x4108f
movq 0x7fc09(%rip), %rsi     # 0xc0c98
callq 0x40b99
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x410de
movq %rax, %rbx
leaq 0x5404a(%rip), %r14     # 0x950f2
leaq 0x8(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x21aed
testl %eax, %eax
jne 0x410c5
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x410a8
jmp 0x410de
movq %rsp, %rsi
movq %r15, %rdi
callq 0x41031
cmpq $-0x1, %rax
jne 0x410de
movq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x1fcd6
movq (%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcCheckCacheBits
boolean udcCheckCacheBits(struct udcFile *file, int startBlock, int endBlock)
/* Warn and return TRUE if any bit in (startBlock,endBlock] is not set. */
{
boolean gotUnset = FALSE;
struct udcBitmap *bitmap = udcBitmapOpen(file->bitmapFileName);
int partOffset;
Bits *bits;
readBitsIntoBuf(file, bitmap->fd, udcBitmapHeaderSize, startBlock, endBlock, &bits, &partOffset);

int partBitStart = startBlock - partOffset;
int partBitEnd = endBlock - partOffset;
int nextClearBit = bitFindClear(bits, partBitStart, partBitEnd);
while (nextClearBit < partBitEnd)
    {
    int clearBlock = nextClearBit + partOffset;
    warn("... udcFile 0x%04lx: bit for block %d (%lld..%lld] is not set",
	 (unsigned long)file, clearBlock,
	 ((long long)clearBlock * udcBlockSize), (((long long)clearBlock+1) * udcBlockSize));
    gotUnset = TRUE;
    int nextSetBit = bitFindSet(bits, nextClearBit, partBitEnd);
    nextClearBit = bitFindClear(bits, nextSetBit, partBitEnd);
    }
return gotUnset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %r13d
movq %rdi, %r14
movq 0x40(%rdi), %rdi
callq 0x411b6
movl 0x3c(%rax), %esi
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movq %r14, %rdi
movl %r13d, %edx
movl %ebx, %ecx
movq %r15, %r8
movq %r12, %r9
callq 0x412f8
movl (%r12), %ebp
subl %ebp, %r13d
subl %ebp, %ebx
movq (%r15), %r15
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x1bad0
movl %eax, %r13d
xorl %eax, %eax
cmpl %ebx, %r13d
jge 0x411a7
leaq 0x53cf0(%rip), %r12     # 0x94e4f
leal (%r13,%rbp), %eax
movslq %eax, %rdx
movq %rdx, %rcx
shlq $0xd, %rcx
leaq 0x2000(%rcx), %r8
movq %r12, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x268ca
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x1bac4
movq %r15, %rdi
movl %eax, %esi
movl %ebx, %edx
callq 0x1bad0
movl %eax, %r13d
cmpl %ebx, %eax
jl 0x4115f
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: readBitsIntoBuf
static void readBitsIntoBuf(struct udcFile *file, int fd, int headerSize, int bitStart, int bitEnd,
	Bits **retBits, int *retPartOffset)
/* Do some bit-to-byte offset conversions and read in all the bytes that
 * have information in the bits we're interested in. */
{
int byteStart = bitStart/8;
int byteEnd = bitToByteSize(bitEnd);
int byteSize = byteEnd - byteStart;
Bits *bits = needLargeMem(byteSize);
ourMustLseek(&file->ios.bit,fd, headerSize + byteStart, SEEK_SET);
ourMustRead(&file->ios.bit, fd, bits, byteSize);
*retBits = bits;
*retPartOffset = byteStart*8;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
leal 0x7(%rdx), %r14d
testl %edx, %edx
cmovnsl %edx, %r14d
movl %esi, %ebp
movl %r14d, %ebx
sarl $0x3, %ebx
leal 0x7(%rcx), %eax
addl $0xe, %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
movq %rdi, %r15
sarl $0x3, %ecx
subl %ebx, %ecx
movslq %ecx, %r12
movq %r12, %rdi
callq 0x2da9d
movq %rax, %r13
addl $0x40, %ebx
movslq %ebx, %rsi
incq 0xb8(%r15)
movl %ebp, %edi
xorl %edx, %edx
callq 0x23232
incq 0xc0(%r15)
addq %r12, 0xc8(%r15)
movl %ebp, %edi
movq %r13, %rsi
movq %r12, %rdx
callq 0x23186
movq 0x8(%rsp), %rax
movq %r13, (%rax)
andl $-0x8, %r14d
movq 0x10(%rsp), %rax
movl %r14d, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcReadBits64
bits64 udcReadBits64(struct udcFile *file, boolean isSwapped)
/* Read and optionally byte-swap 64 bit entity. */
{
bits64 val;
udcMustRead(file, &val, sizeof(val));
if (isSwapped)
    val = byteSwap64(val);
return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x3fef4
testl %ebx, %ebx
je 0x41747
movq 0x8(%rsp), %rdi
callq 0x23653
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcReadBits32
bits32 udcReadBits32(struct udcFile *file, boolean isSwapped)
/* Read and optionally byte-swap 32 bit entity. */
{
bits32 val;
udcMustRead(file, &val, sizeof(val));
if (isSwapped)
    val = byteSwap32(val);
return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x3fef4
testl %ebx, %ebx
je 0x41779
movl 0xc(%rsp), %edi
callq 0x236d8
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcReadBits16
bits16 udcReadBits16(struct udcFile *file, boolean isSwapped)
/* Read and optionally byte-swap 16 bit entity. */
{
bits16 val;
udcMustRead(file, &val, sizeof(val));
if (isSwapped)
    val = byteSwap16(val);
return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0xe(%rsp), %rsi
movl $0x2, %edx
callq 0x3fef4
testl %ebx, %ebx
je 0x417ac
movzwl 0xe(%rsp), %edi
callq 0x2374f
movw %ax, 0xe(%rsp)
movzwl 0xe(%rsp), %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcReadFloat
float udcReadFloat(struct udcFile *file, boolean isSwapped)
/* Read and optionally byte-swap floating point number. */
{
float val;
udcMustRead(file, &val, sizeof(val));
if (isSwapped)
    val = byteSwapFloat(val);
return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0xc(%rsp), %rsi
movl $0x4, %edx
callq 0x3fef4
testl %ebx, %ebx
je 0x417e2
movss 0xc(%rsp), %xmm0
callq 0x23826
movss %xmm0, 0xc(%rsp)
movss 0xc(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcReadDouble
double udcReadDouble(struct udcFile *file, boolean isSwapped)
/* Read and optionally byte-swap double-precision floating point number. */
{
double val;
udcMustRead(file, &val, sizeof(val));
if (isSwapped)
    val = byteSwapDouble(val);
return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0x3fef4
testl %ebx, %ebx
je 0x41819
movsd 0x8(%rsp), %xmm0
callq 0x237c5
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcReadLine
char *udcReadLine(struct udcFile *file)
/* Fetch next line from udc cache or NULL. */
{
char shortBuf[2], *longBuf = NULL, *buf = shortBuf;
int i, bufSize = sizeof(shortBuf);
for (i=0; ; ++i)
    {
    /* See if need to expand buffer, which is initially on stack, but if it gets big goes into 
     * heap. */
    if (i >= bufSize)
        {
	int newBufSize = bufSize*2;
	char *newBuf = needLargeMem(newBufSize);
	memcpy(newBuf, buf, bufSize);
	freeMem(longBuf);
	buf = longBuf = newBuf;
	bufSize = newBufSize;
	}

    char c;
    bits64 sizeRead = udcRead(file, &c, 1);
    if (sizeRead == 0)
	return NULL;
    buf[i] = c;
    if (c == '\n')
	{
	buf[i] = 0;
	break;
	}
    }
char *retString = cloneString(buf);
freeMem(longBuf);
return retString;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbp
leaq 0x26(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, %r12d
leaq 0xf(%rsp), %r14
xorl %ebx, %ebx
movq $0x0, 0x18(%rsp)
movslq %r12d, %r13
cmpq %r13, %rbx
jl 0x4189b
leal (,%r13,2), %r12d
movslq %r12d, %rdi
callq 0x2da9d
movq %rbp, %r15
movq %rax, %rbp
movq %rax, %rdi
movq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x6570
movq 0x18(%rsp), %rdi
callq 0x2dd41
movq %rbp, 0x10(%rsp)
movq %rbp, 0x18(%rsp)
movq %r15, %rbp
movl $0x1, %edx
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3fcac
testq %rax, %rax
je 0x418d6
movzbl 0xf(%rsp), %ecx
movq 0x10(%rsp), %rsi
movb %cl, (%rsi,%rbx)
xorl %eax, %eax
cmpb $0xa, 0xf(%rsp)
sete %al
movl $0x0, %edx
cmovel %edx, %ecx
movb %cl, (%rsi,%rbx)
addl %eax, %eax
jmp 0x418db
movl $0x1, %eax
testl %eax, %eax
jne 0x418e7
incq %rbx
jmp 0x41856
cmpl $0x2, %eax
jne 0x41905
movq 0x10(%rsp), %rdi
callq 0x1f9f6
movq %rax, %rbx
movq 0x18(%rsp), %rdi
callq 0x2dd41
jmp 0x41907
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcReadStringAndZero
char *udcReadStringAndZero(struct udcFile *file)
/* Read in zero terminated string from file.  Do a freeMem of result when done. */
{
char shortBuf[2], *longBuf = NULL, *buf = shortBuf;
int i, bufSize = sizeof(shortBuf);
for (i=0; ; ++i)
    {
    /* See if need to expand buffer, which is initially on stack, but if it gets big goes into 
     * heap. */
    if (i >= bufSize)
        {
	int newBufSize = bufSize*2;
	char *newBuf = needLargeMem(newBufSize);
	memcpy(newBuf, buf, bufSize);
	freeMem(longBuf);
	buf = longBuf = newBuf;
	bufSize = newBufSize;
	}
    char c = udcGetChar(file);
    buf[i] = c;
    if (c == 0)
        break;
    }
char *retString = cloneString(buf);
freeMem(longBuf);
return retString;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbp
leaq 0x16(%rsp), %r15
movl $0x2, %ebx
xorl %r14d, %r14d
leaq 0x7(%rsp), %r12
movq $0x0, 0x8(%rsp)
movslq %ebx, %r13
cmpq %r13, %r14
jl 0x4198f
leal (,%r13,2), %ebx
movslq %ebx, %rdi
callq 0x2da9d
movq %r15, %rsi
movq %r12, %r15
movq %rbp, %r12
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rdx
callq 0x6570
movq 0x8(%rsp), %rdi
callq 0x2dd41
movq %rbp, %rax
movq %rbp, 0x8(%rsp)
movq %r12, %rbp
movq %r15, %r12
movq %rax, %r15
movl $0x1, %edx
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3fef4
movb 0x7(%rsp), %al
movb %al, (%r15,%r14)
incq %r14
testb %al, %al
jne 0x41945
movq %r15, %rdi
callq 0x1f9f6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x2dd41
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_O1/icebert[P]pblat/lib/udc.c
// Function: udcFileReadAll
char *udcFileReadAll(char *url, char *cacheDir, size_t maxSize, size_t *retSize)
/* Read a complete file via UDC. The cacheDir may be null in which case udcDefaultDir()
 * will be used.  If maxSize is non-zero, check size against maxSize
 * and abort if it's bigger.  Returns file data (with an extra terminal for the
 * common case where it's treated as a C string).  If retSize is non-NULL then
 * returns size of file in *retSize. Do a freeMem or freez of the returned buffer
 * when done. */
{
struct udcFile  *file = udcFileOpen(url, cacheDir);
size_t size = file->size;
if (maxSize != 0 && size > maxSize)
    errAbort("%s is %lld bytes, but maxSize to udcFileReadAll is %lld",
    	url, (long long)size, (long long)maxSize);
char *buf = needLargeMem(size+1);
udcMustRead(file, buf, size);
buf[size] = 0;	// add trailing zero for string processing
udcFileClose(&file);
if (retSize != NULL)
    *retSize = size;
return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, %r12
callq 0x40b69
movq %rax, (%rsp)
movq 0x28(%rax), %r14
testq %r15, %r15
setne %al
cmpq %r15, %r14
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x41a1d
leaq 0x534cb(%rip), %rdi     # 0x94ed8
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x26b6f
movq %r14, %rdi
incq %rdi
callq 0x2da9d
movq %rax, %r15
movq %rsp, %r12
movq (%r12), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3fef4
movb $0x0, (%r15,%r14)
movq %r12, %rdi
callq 0x40c8a
testq %rbx, %rbx
je 0x41a52
movq %r14, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcSeekCur
void udcSeekCur(struct udcFile *file, bits64 offset)
/* Seek to a particular position in file. */
{
file->ios.udc.numSeeks++;
file->offset += offset;
if (udcCacheEnabled())
    ourMustLseek(&file->ios.sparse,file->fdSparse, offset, SEEK_CUR);
}

// Assembly:
incq 0x108(%rdi)
addq %rsi, 0x30(%rdi)
cmpq $0x0, 0x7f1fc(%rip)     # 0xc0c98
je 0x41ab4
movl 0x58(%rdi), %eax
incq 0xe0(%rdi)
movl %eax, %edi
movl $0x1, %edx
jmp 0x23232
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcSeek
void udcSeek(struct udcFile *file, bits64 offset)
/* Seek to a particular position in file. */
{
file->ios.udc.numSeeks++;
file->offset = offset;
if (udcCacheEnabled())
    ourMustLseek(&file->ios.sparse,file->fdSparse, offset, SEEK_SET);
}

// Assembly:
incq 0x108(%rdi)
movq %rsi, 0x30(%rdi)
cmpq $0x0, 0x7f1d0(%rip)     # 0xc0c98
je 0x41add
movl 0x58(%rdi), %eax
incq 0xe0(%rdi)
movl %eax, %edi
xorl %edx, %edx
jmp 0x23232
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcCleanup
bits64 udcCleanup(char *cacheDir, double maxDays, boolean testOnly)
/* Remove cached files older than maxDays old. If testOnly is set
 * no clean up is done, but the size of the files that would be
 * cleaned up is still. */

{
time_t maxSeconds = maxDays * 24 * 60 * 60;
char *curPath = cloneString(getCurrentDir());
setCurrentDir(cacheDir);
time_t deleteTime = time(NULL) - maxSeconds;
bits64 result = rCleanup(deleteTime, testOnly);
setCurrentDir(curPath);
return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
mulsd 0x52f10(%rip), %xmm0    # 0x94a08
movsd 0x52f10(%rip), %xmm1    # 0x94a10
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %r12
xorl %eax, %eax
callq 0x3449c
movq %rax, %rdi
callq 0x1f9f6
movq %rax, %r15
movq %r14, %rdi
callq 0x344ca
xorl %edi, %edi
callq 0x6660
subq %r12, %rax
movq %rax, %rdi
movl %ebx, %esi
callq 0x41b55
movq %rax, %rbx
movq %r15, %rdi
callq 0x344ca
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcUpdateTime
time_t udcUpdateTime(struct udcFile *udc)
/* return udc->updateTime */
{
if (sameString("transparent", udc->protocol))
    {
    struct stat status;
    int ret = stat(udc->url, &status);
    if (ret < 0)
	return 0;
    else
	return  status.st_mtime;
    }
return udc->updateTime;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
leaq 0x52fde(%rip), %rdi     # 0x94d4f
callq 0x6a50
testl %eax, %eax
je 0x41d80
movq 0x20(%rbx), %rax
jmp 0x41d99
movq 0x8(%rbx), %rdi
movq %rsp, %rsi
callq 0x6d00
testl %eax, %eax
js 0x41d97
movq 0x58(%rsp), %rax
jmp 0x41d99
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcFileSize
off_t udcFileSize(char *url)
/* fetch file size from given URL or local path 
 * returns -1 if not found. */
{
if (udcIsLocal(url))
    return fileSize(url);

// don't go to the network if we can avoid it
int cacheSize = udcSizeFromCache(url, NULL);
if (cacheSize!=-1)
    return cacheSize;

off_t ret = -1;
struct udcRemoteFileInfo info;

if (startsWith("http://",url) || startsWith("https://",url))
    {
    if (udcInfoViaHttp(url, &info))
	ret = info.size;
    }
else if (startsWith("ftp://",url))
    {
    if (udcInfoViaFtp(url, &info))
	ret = info.size;
    }
else
    errAbort("udc/udcFileSize: invalid protocol for url %s, can only do http/https/ftp", url);

return ret;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x41e4d
testl %eax, %eax
je 0x41dc0
movq %rbx, %rdi
addq $0x30, %rsp
popq %rbx
jmp 0x34368
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40fbd
cmpl $-0x1, %eax
jne 0x41e0b
leaq 0x4f7e2(%rip), %rdi     # 0x915b8
movq %rbx, %rsi
callq 0x217c8
testl %eax, %eax
jne 0x41df5
leaq 0x4f7d7(%rip), %rdi     # 0x915c0
movq %rbx, %rsi
callq 0x217c8
testl %eax, %eax
je 0x41e0f
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3f8cf
testl %eax, %eax
je 0x41e40
movq 0x8(%rsp), %rax
jmp 0x41e47
cltq
jmp 0x41e47
leaq 0x4f7b3(%rip), %rdi     # 0x915c9
movq %rbx, %rsi
callq 0x217c8
testl %eax, %eax
je 0x41e2f
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3fbd0
jmp 0x41e00
leaq 0x530da(%rip), %rdi     # 0x94f10
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26b6f
movq $-0x1, %rax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcIsLocal
boolean udcIsLocal(char *url) 
/* return true if file is not a http or ftp file, just a local file */
{
// copied from above
char *protocol = NULL, *afterProtocol = NULL, *colon;
udcParseUrl(url, &protocol, &afterProtocol, &colon);
freez(&protocol);
freez(&afterProtocol);
return colon==NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %r12d, %r12d
leaq 0x10(%rsp), %rbx
movq %r12, (%rbx)
leaq 0x8(%rsp), %r14
movq %r12, (%r14)
movq %rsp, %r15
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x3ff2f
movq %rbx, %rdi
callq 0x2dd51
movq %r14, %rdi
callq 0x2dd51
xorl %eax, %eax
cmpq %r12, (%r15)
sete %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcMMap
void udcMMap(struct udcFile *file)
/* Enable access to underlying file as memory using mmap.  udcMMapFetch
 * must be called to actually access regions of the file. */
{
if (file->mmapBase != NULL)
    errAbort("File is already mmaped: %s", file->url);
file->mmapBase = mmap(NULL, file->size, PROT_READ, MAP_SHARED, file->fdSparse, 0);
if (file->mmapBase == MAP_FAILED)
    errnoAbort("mmap() failed for %s", file->url);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0xb0(%rdi)
je 0x41ed6
movq 0x8(%rbx), %rsi
leaq 0x5308a(%rip), %rdi     # 0x94f59
xorl %eax, %eax
callq 0x26b6f
movq 0x28(%rbx), %rsi
movl 0x58(%rbx), %r8d
xorl %edi, %edi
movl $0x1, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0x66c0
movq %rax, 0xb0(%rbx)
cmpq $-0x1, %rax
je 0x41f01
popq %rbx
retq
movq 0x8(%rbx), %rsi
leaq 0x53068(%rip), %rdi     # 0x94f74
xorl %eax, %eax
popq %rbx
jmp 0x26c9f
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcMMapFetch
void *udcMMapFetch(struct udcFile *file, bits64 offset, bits64 size)
/* Return pointer to a region of the file in memory, ensuring that regions is
 * cached. udcMMap must have been called to enable access.  This must be
 * called for first access to a range of the file or erroneous (zeros) data
 * maybe returned.  Maybe called multiple times on a range or overlapping
 * returns. */
{
if (file->mmapBase == NULL)
    errAbort("udcMMap() has not been called for: %s", file->url);
if ((offset + size) > file->size)
    errAbort("udcMMapFetch on offset %lld for %lld bytes exceeds length of file %lld on %s",
             offset, size, file->size, file->url);
if (udcCacheEnabled() && !sameString(file->protocol, "transparent"))
    udcCachePreload(file, offset, size);
return ((char*)file->mmapBase) + offset;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0xb0(%rdi)
jne 0x41f3e
movq 0x8(%r14), %rsi
leaq 0x53052(%rip), %rdi     # 0x94f89
xorl %eax, %eax
callq 0x26b6f
leaq (%r15,%rbx), %rax
movq 0x28(%r14), %rcx
cmpq %rcx, %rax
jbe 0x41f63
movq 0x8(%r14), %r8
leaq 0x53059(%rip), %rdi     # 0x94faf
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x26b6f
cmpq $0x0, 0x7ed2d(%rip)     # 0xc0c98
je 0x41f8f
movq 0x10(%r14), %rdi
leaq 0x52dd7(%rip), %rsi     # 0x94d4f
callq 0x6a50
testl %eax, %eax
je 0x41f8f
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x41397
addq 0xb0(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: addElementToDy
static void addElementToDy(struct dyString *dy, char *name)
/* add one element of a path to a dyString, hashing it if it's longer 
 * than MAXNAMLEN */
{
if (strlen(name) > MAXNAMLEN)
    {
    unsigned char hash[SHA_DIGEST_LENGTH];
    char newName[(SHA_DIGEST_LENGTH + 1) * 2];

    SHA1((const unsigned char *)name, strlen(name), hash);
    hexBinaryString(hash,  SHA_DIGEST_LENGTH, newName, (SHA_DIGEST_LENGTH + 1) * 2);
    
    dyStringAppend(dy, newName);
    }
else
    dyStringAppend(dy, name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x62d0
cmpq $0x100, %rax            # imm = 0x100
jb 0x42040
movq %rsp, %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x6120
leaq 0x20(%rsp), %r14
movq %r15, %rdi
movl $0x14, %esi
movq %r14, %rdx
movl $0x2a, %ecx
callq 0x47a44
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26425
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x26425
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcDataViaLocal
static int udcDataViaLocal(char *url, bits64 offset, int size, void *buffer, struct udcFile *file)
/* Fetch a block of data of given size into buffer using the http: protocol.
* Returns number of bytes actually read.  Does an errAbort on
* error.  Typically will be called with size in the 8k - 64k range. */
{
/* Need to check time stamp here. */
verbose(4, "reading remote data - %d bytes at %lld - on %s\n", size, offset, url);
url = assertLocalUrl(url);
FILE *f = mustOpen(url, "rb");
fseek(f, offset, SEEK_SET);
int sizeRead = ourFread(&file->ios.net, buffer, 1, size, f);
if (ferror(f))
    {
    warn("udcDataViaLocal failed to fetch %d bytes at %lld", size, offset);
    errnoAbort("file %s", url);
    }
carefulClose(&f);
return sizeRead;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x53154(%rip), %rsi     # 0x951c9
movl $0x4, %edi
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x4246e
movq %r14, %rdi
callq 0x4237d
movq %rax, %r14
leaq 0x4c36d(%rip), %rsi     # 0x8e406
movq %rax, %rdi
callq 0x22d5a
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x67d0
movq 0x8(%rsp), %rcx
incq 0x138(%r12)
movslq %ebp, %rdx
addq %rdx, 0x140(%r12)
movl $0x1, %esi
movq %r15, %rdi
callq 0x6b20
movq %rax, %r15
movq 0x8(%rsp), %rdi
callq 0x6e00
testl %eax, %eax
je 0x4210d
leaq 0x5304c(%rip), %rdi     # 0x9513c
movl %ebp, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x268ca
leaq 0x553fe(%rip), %rdi     # 0x97501
movq %r14, %rsi
xorl %eax, %eax
callq 0x26c9f
leaq 0x8(%rsp), %rdi
callq 0x23400
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcInfoViaLocal
static boolean udcInfoViaLocal(char *url, struct udcRemoteFileInfo *retInfo)
/* Fill in *retTime with last modified time for file specified in url.
 * Return FALSE if file does not even exist. */
{
verbose(4, "checking remote info on %s\n", url);
url = assertLocalUrl(url);
struct stat status;
int ret = stat(url, &status);
if (ret < 0)
    return FALSE;
retInfo->updateTime = status.st_mtime;
retInfo->size = status.st_size;
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x53105(%rip), %rsi     # 0x95244
xorl %ebp, %ebp
movl $0x4, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4246e
movq %r14, %rdi
callq 0x4237d
movq %rsp, %rsi
movq %rax, %rdi
callq 0x6d00
testl %eax, %eax
js 0x4217d
movq 0x58(%rsp), %rax
movq %rax, (%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: udcDataViaSlow
static int udcDataViaSlow(char *url, bits64 offset, int size, void *buffer, struct udcFile *file)
/* Fetch a block of data of given size into buffer using the http: protocol.
* Returns number of bytes actually read.  Does an errAbort on
* error.  Typically will be called with size in the 8k - 64k range. */
{
verbose(4, "slow reading remote data - %d bytes at %lld - on %s\n", size, offset, url);
sleep1000(500);
char *fileName = url + 5;  /* skip over 'slow:' */
FILE *f = mustOpen(fileName, "rb");
fseek(f, offset, SEEK_SET);
char *pt = buffer;
int i, step=1024;
int sizeRead = 0;
for (i=0; i<size; i += step)
    {
    sleep1000(250);
    int readChunk = size - i;
    if (readChunk > step)
        readChunk = step;
    int oneReadSize = ourFread(&file->ios.net, pt, 1, readChunk, f);
    verbose(4, "slowly read %d bytes\n", oneReadSize);
    if (ferror(f))
	{
	warn("udcDataViaSlow failed to fetch %d bytes at %lld", size, offset);
	errnoAbort("file %s", fileName);
	}
    pt += step;
    sizeRead += oneReadSize;
    }
carefulClose(&f);
return sizeRead;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %rbx
movq %rcx, 0x20(%rsp)
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r15
leaq 0x53013(%rip), %rsi     # 0x951c4
xorl %r13d, %r13d
movl $0x4, %edi
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x4246e
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x34440
addq $0x5, %r15
leaq 0x4c22b(%rip), %rsi     # 0x8e406
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0x22d5a
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %r14, 0x18(%rsp)
movq %r14, %rsi
xorl %edx, %edx
callq 0x67d0
testl %r12d, %r12d
jle 0x422ba
movl %r12d, %ebp
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x20(%rsp), %rax
leaq (%rax,%r14), %r15
movl $0xfa, %edi
callq 0x34440
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %ebp
cmovll %ebp, %eax
movq 0x8(%rsp), %rcx
incq 0x138(%rbx)
movslq %eax, %rdx
addq %rdx, 0x140(%rbx)
movl $0x1, %esi
movq %r15, %rdi
callq 0x6b20
movq %rax, %r15
movl $0x4, %edi
leaq 0x52f99(%rip), %rsi     # 0x951f9
movl %r15d, %edx
xorl %eax, %eax
callq 0x4246e
movq 0x8(%rsp), %rdi
callq 0x6e00
testl %eax, %eax
je 0x422a1
leaq 0x52f90(%rip), %rdi     # 0x9520f
movl %r12d, %esi
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x268ca
leaq 0x5526c(%rip), %rdi     # 0x97501
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x26c9f
addl %r15d, %r13d
addq $0x400, %r14            # imm = 0x400
addl $0xfffffc00, %ebp       # imm = 0xFFFFFC00
cmpl %r12d, %r14d
jl 0x42211
leaq 0x8(%rsp), %rdi
callq 0x23400
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_O1/icebert[P]pblat/lib/udc.c
// Function: udcInfoViaSlow
static boolean udcInfoViaSlow(char *url, struct udcRemoteFileInfo *retInfo)
/* Fill in *retTime with last modified time for file specified in url.
 * Return FALSE if file does not even exist. */
{
char *fileName = url + 5;  /* skip over 'slow:' */
verbose(4, "slow checking remote info on %s\n", url);
sleep1000(500);
struct stat status;
int ret = stat(fileName, &status);
if (ret < 0)
    return FALSE;
retInfo->updateTime = status.st_mtime;
retInfo->size = status.st_size;
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
movq %rdi, %rdx
leaq 0x5(%rdi), %r14
leaq 0x52f4d(%rip), %rsi     # 0x9523f
xorl %ebp, %ebp
movl $0x4, %edi
xorl %eax, %eax
callq 0x4246e
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x34440
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6d00
testl %eax, %eax
js 0x4232f
movq 0x58(%rsp), %rax
movq %rax, (%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/udc.c
// Function: assertLocalUrl
static char *assertLocalUrl(char *url)
/* Make sure that url is local and return bits past the protocol. */
{
if (startsWith("local:", url))
    url += 6;
if (url[0] != '/')
    errAbort("Local urls must start at /");
if (stringIn("..", url) || stringIn("~", url) || stringIn("//", url) ||
    stringIn("/./", url) || endsWith("/.", url))
    {
    errAbort("relative paths not allowed in local urls (%s)", url);
    }
return url;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x52de2(%rip), %rdi     # 0x9516d
movq %r14, %rsi
callq 0x217c8
leaq 0x6(%r14), %rbx
testl %eax, %eax
cmoveq %r14, %rbx
cmpb $0x2f, (%rbx)
je 0x423b0
leaq 0x52dcb(%rip), %rdi     # 0x95174
xorl %eax, %eax
callq 0x26b6f
leaq 0x51347(%rip), %rsi     # 0x936fe
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x42411
movq %rbx, %rdi
movl $0x7e, %esi
callq 0x6270
testq %rax, %rax
jne 0x42411
leaq 0x57d19(%rip), %rsi     # 0x9a0f6
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x42411
leaq 0x52d9e(%rip), %rsi     # 0x9518f
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x42411
leaq 0x52d8e(%rip), %rdi     # 0x95193
movq %rbx, %rsi
callq 0x21aed
testl %eax, %eax
je 0x42422
leaq 0x52d7e(%rip), %rdi     # 0x95196
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26b6f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/wildcmp.c
// Function: wildExpandList
struct slName *wildExpandList(struct slName *allList, struct slName *wildList, boolean abortMissing)
/* Wild list is a list of names, possibly including * and ? wildcard characters.  This 
 * function returns names taken from allList that match patterns in wildList.  Works much
 * like wildcard expansion over a file system but expands over allList instead. */
{
/* Build hash of allList */
struct hash *allHash = hashNew(0);
struct slName *name;
for (name = allList; name != NULL; name = name->next)
    hashAdd(allHash, name->name, NULL);

/* Expand any field names with wildcards. */
struct slName *expandedList = NULL;
struct slName *field;
for (field = wildList; field != NULL; field = field->next)
    {
    char *name = field->name;
    if (anyWild(name))
        {
	int addCount = addMatching(name, allList, &expandedList);
	if (addCount == 0 && abortMissing)
	    errAbort("No match for %s", name);
	}
    else
        {
	if (abortMissing && !hashLookup(allHash, name))
	    errAbort("No match for %s", name);
	slNameAddHead(&expandedList, name);
	}
    }
hashFree(&allHash);
slReverse(&expandedList);
return expandedList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r13
xorl %edi, %edi
movl $0x1, %esi
callq 0x29160
movq %rax, 0x8(%rsp)
testq %r13, %r13
je 0x4290f
movq %r13, %rbx
movq 0x8(%rsp), %rdi
leaq 0x8(%rbx), %rsi
xorl %edx, %edx
callq 0x28dbe
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x428f7
movq $0x0, 0x18(%rsp)
testq %r14, %r14
je 0x42a03
leaq 0x18(%rsp), %r12
movl %r15d, 0x14(%rsp)
movq %r13, 0x20(%rsp)
leaq 0x8(%r14), %rbp
movq %rbp, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x429a3
cmpl $0x3f, %ecx
je 0x4294b
incq %rax
cmpl $0x2a, %ecx
jne 0x42937
testl %ecx, %ecx
je 0x429a3
testq %r13, %r13
je 0x429d8
xorl %r15d, %r15d
movq %r13, %rbx
leaq 0x8(%rbx), %r13
movq %rbp, %rdi
movq %r13, %rsi
movl $0x3f, %edx
movl $0x2a, %ecx
callq 0x42789
testl %eax, %eax
je 0x42989
movq %r12, %rdi
movq %r13, %rsi
callq 0x20698
incl %r15d
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x4295e
testl %r15d, %r15d
sete %al
movl 0x14(%rsp), %r15d
movq 0x20(%rsp), %r13
jmp 0x429da
testl %r15d, %r15d
je 0x429cb
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x28b2c
testq %rax, %rax
jne 0x429cb
leaq 0x52b04(%rip), %rdi     # 0x954c5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26b6f
movq %r12, %rdi
movq %rbp, %rsi
callq 0x20698
jmp 0x429f7
movb $0x1, %al
testl %r15d, %r15d
sete %cl
xorb $0x1, %al
orb %cl, %al
jne 0x429f7
leaq 0x52ad8(%rip), %rdi     # 0x954c5
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26b6f
movq (%r14), %r14
testq %r14, %r14
jne 0x42930
leaq 0x8(%rsp), %rdi
callq 0x29565
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x1fcb3
movq (%rbx), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/base64.c
// Function: base64Encode
char *base64Encode(char *input, size_t inplen)
/* Use base64 to encode a string.  Returns one long encoded
 * string which need to be freeMem'd. Note: big-endian algorithm.
 * For some applications you may need to break the base64 output
 * of this function into lines no longer than 76 chars.
 */
{
char b64[] = B64CHARS;
int words = (inplen+2)/3;
int remains = inplen % 3;
char *result = (char *)needMem(4*words+1);
size_t i=0, j=0;
int word = 0;
unsigned char *p = (unsigned char*) input;  
/* p must be unsigned char*,  because without "unsigned",
sign extend messes up last group outputted
when the value of the chars following last in input
happens to be char 0x80 or higher */
for(i=1; i<=words; i++)
    {
    word = 0;
    word |= *p++;
    word <<= 8;
    word |= *p++;
    word <<= 8;
    word |= *p++;
    if (i==words && remains>0)
	{
	word &= 0x00FFFF00;
    	if (remains==1)
    	    word &= 0x00FF0000;
	}
    result[j++]=b64[word >> 18 & 0x3F];
    result[j++]=b64[word >> 12 & 0x3F];
    result[j++]=b64[word >> 6 & 0x3F];
    result[j++]=b64[word & 0x3F];
    }
result[j] = 0;
if (remains >0) result[j-1] = '=';    
if (remains==1) result[j-2] = '=';    
return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x2(%rsi), %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
movq %rdx, %r15
movq %rdi, %r14
shrq %r15
movq %rsi, %rax
mulq %rcx
shrq %rdx
leaq (%rdx,%rdx,2), %rax
subq %rax, %rbx
leal 0x1(,%r15,4), %eax
movslq %eax, %rdi
callq 0x2dc95
movq %r15, %rcx
shlq $0x20, %rcx
je 0x42b29
movslq %r15d, %rdx
leaq 0x1(%rdx), %rcx
cmpq $0x3, %rcx
movl $0x2, %esi
cmovaeq %rcx, %rsi
movl $0x1, %edi
xorl %ecx, %ecx
leaq 0x52a43(%rip), %r8      # 0x954e0
movzbl (%r14), %r10d
movzbl 0x1(%r14), %r9d
shll $0x10, %r10d
shll $0x8, %r9d
orl %r10d, %r9d
movzbl 0x2(%r14), %r11d
orl %r9d, %r11d
cmpq $0x1, %rbx
cmovel %r10d, %r9d
cmpq %rdi, %rdx
cmovnel %r11d, %r9d
testq %rbx, %rbx
cmovel %r11d, %r9d
movl %r9d, %r10d
shrl $0x12, %r10d
movb (%r10,%r8), %r10b
movb %r10b, (%rax,%rcx)
movl %r9d, %r10d
shrl $0xc, %r10d
andl $0x3f, %r10d
movb (%r10,%r8), %r10b
movb %r10b, 0x1(%rax,%rcx)
movl %r9d, %r10d
shrl $0x6, %r10d
andl $0x3f, %r10d
movb (%r10,%r8), %r10b
movb %r10b, 0x2(%rax,%rcx)
andl $0x3f, %r9d
movb (%r9,%r8), %r9b
movb %r9b, 0x3(%rax,%rcx)
addq $0x4, %rcx
incq %rdi
addq $0x3, %r14
cmpq %rdi, %rsi
jne 0x42a9d
jmp 0x42b2b
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
testq %rbx, %rbx
je 0x42b44
movb $0x3d, -0x1(%rax,%rcx)
cmpq $0x1, %rbx
jne 0x42b44
movb $0x3d, -0x2(%rax,%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/base64.c
// Function: base64Validate
boolean base64Validate(char *input)
/* Return true if input is valid base64.
 * Note that the input string is changed by 
 * eraseWhiteSpace(). */
{
size_t i = 0, l = 0;
char *p = input;
boolean validB64 = TRUE;

/* remove whitespace which is unnecessary and  */
eraseWhiteSpace(input);  

l = strlen(p);
for(i=0;i<l;i++)
    {
    char c = ' ';
    if (!strchr(B64CHARS,c=*p++))
        {
        if (c != '=')
            {
            validB64 = FALSE;
            break;
            }
        }
    }
if (l%4)
    validB64 = FALSE;
return validB64;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x22673
movq %r14, %rdi
callq 0x62d0
movq %rax, %rbx
movl $0x1, %r12d
testq %rax, %rax
je 0x42bbb
movl $0x1, %r13d
xorl %r15d, %r15d
movb -0x1(%r14,%r13), %al
movsbl %al, %ebp
movl $0x41, %edx
leaq 0x52950(%rip), %rdi     # 0x954e0
movl %ebp, %esi
callq 0x67e0
testq %rax, %rax
setne %al
cmpb $0x3d, %bpl
sete %cl
orb %al, %cl
cmovel %r15d, %r12d
cmpb $0x1, %cl
jne 0x42bbb
leaq 0x1(%r13), %rax
cmpq %rbx, %r13
movq %rax, %r13
jb 0x42b7c
xorl %eax, %eax
testb $0x3, %bl
cmovel %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/base64.c
// Function: base64Decode
char *base64Decode(char *input, size_t *returnSize)
/* Use base64 to decode a string.  Return decoded
 * string which will be freeMem'd. Note: big-endian algorithm.
 * Call eraseWhiteSpace() and check for invalid input 
 * before passing in input if needed.  
 * Optionally set return size for use with binary data.
 */
{
static int *map=NULL;
char b64[] = B64CHARS;
size_t inplen = strlen(input);
int words = (inplen+3)/4;
char *result = (char *)needMem(3*words+1);
size_t i=0, j=0;
int word = 0;
char *p = input;

if (!map)
    {
    int i = 0;
    map = needMem(256*sizeof(int));
    for (i = 0; i < 256; ++i)
	{
	map[i]=0;
	}
    for (i = 0; i < 64; ++i)
	{
	map[(int)b64[i]]=i;
	}
    }
for(i=0; i<words; i++)
    {
    word = 0;
    word |= map[(int)*p++];
    word <<= 6;
    word |= map[(int)*p++];
    word <<= 6;
    word |= map[(int)*p++];
    word <<= 6;
    word |= map[(int)*p++];
    result[j++]=word >> 16 & 0xFF;
    result[j++]=word >> 8 & 0xFF;
    result[j++]=word & 0xFF;
    }
result[j] = 0;
if (returnSize)
    *returnSize = j;
     
return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %r14
callq 0x62d0
movq %rax, %r15
addq $0x3, %r15
shrq $0x2, %r15
leaq (%r15,%r15,2), %rax
incl %eax
movslq %eax, %rdi
callq 0x2dc95
movq %rax, %rbp
cmpq $0x0, 0x81613(%rip)     # 0xc4220
jne 0x42c4d
movl $0x400, %edi            # imm = 0x400
callq 0x2dc95
movq %rax, %r12
movq %rax, 0x815fd(%rip)     # 0xc4220
xorl %ebx, %ebx
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x63b0
leaq 0x528a5(%rip), %rax     # 0x954e0
movsbq (%rbx,%rax), %rcx
movl %ebx, (%r12,%rcx,4)
incq %rbx
cmpq $0x40, %rbx
jne 0x42c3b
shlq $0x20, %r15
je 0x42cb8
sarq $0x20, %r15
movq 0x815c2(%rip), %rcx     # 0xc4220
cmpq $0x1, %r15
adcq $0x0, %r15
xorl %eax, %eax
xorl %edx, %edx
movsbq (%r14,%rdx,4), %rsi
movl (%rcx,%rsi,4), %esi
movsbq 0x1(%r14,%rdx,4), %rdi
movl (%rcx,%rdi,4), %ebx
shll $0xc, %esi
shll $0x6, %ebx
orl %esi, %ebx
movsbq 0x2(%r14,%rdx,4), %rsi
orl (%rcx,%rsi,4), %ebx
shll $0x6, %ebx
movsbq 0x3(%r14,%rdx,4), %rsi
orl (%rcx,%rsi,4), %ebx
movl %ebx, %esi
shrl $0x10, %esi
movb %sil, (%rbp,%rax)
movb %bh, 0x1(%rbp,%rax)
movb %bl, 0x2(%rbp,%rax)
addq $0x3, %rax
incq %rdx
cmpq %rdx, %r15
jne 0x42c6a
jmp 0x42cba
xorl %eax, %eax
movb $0x0, (%rbp,%rax)
testq %r13, %r13
je 0x42cc8
movq %rax, (%r13)
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/bPlusTree.c
// Function: bptFileAttach
struct bptFile *bptFileAttach(char *fileName, struct udcFile *udc)
/* Open up index file on previously open file, with header at current file position. */
{
/* Open file and allocate structure to hold info from header etc. */
struct bptFile *bpt = needMem(sizeof(*bpt));
bpt->fileName = fileName;
bpt->udc = udc;

/* Read magic number at head of file and use it to see if we are proper file type, and
 * see if we are byte-swapped. */
bits32 magic;
boolean isSwapped = FALSE;
udcMustReadOne(udc, magic);
if (magic != bptSig)
    {
    magic = byteSwap32(magic);
    isSwapped = bpt->isSwapped = TRUE;
    if (magic != bptSig)
       errAbort("%s is not a bpt b-plus tree index file", fileName);
    }

/* Read rest of defined bits of header, byte swapping as needed. */
bpt->blockSize = udcReadBits32(udc, isSwapped);
bpt->keySize = udcReadBits32(udc, isSwapped);
bpt->valSize = udcReadBits32(udc, isSwapped);
bpt->itemCount = udcReadBits64(udc, isSwapped);

/* Skip over reserved bits of header. */
bits32 reserved32;
udcMustReadOne(udc, reserved32);
udcMustReadOne(udc, reserved32);

/* Save position of root block of b+ tree. */
bpt->rootOffset = udcTell(udc);

return bpt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x40, %edi
callq 0x2dc95
movq %rax, %r14
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x8(%rsp), %r12
movl $0x4, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3fef4
movl (%r12), %edi
xorl %ebp, %ebp
cmpl $0x78ca8c91, %edi       # imm = 0x78CA8C91
je 0x42d54
callq 0x236d8
movl %eax, 0x8(%rsp)
movl $0x1, 0x30(%r14)
movl $0x1, %ebp
cmpl $0x78ca8c91, %eax       # imm = 0x78CA8C91
je 0x42d54
leaq 0x527d7(%rip), %rdi     # 0x95521
movq %r15, %rsi
xorl %eax, %eax
callq 0x26b6f
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41752
movl %eax, 0x18(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41752
movl %eax, 0x1c(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41752
movl %eax, 0x20(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4171e
movq %rax, 0x28(%r14)
leaq 0xc(%rsp), %r15
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3fef4
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3fef4
movq %rbx, %rdi
callq 0x41ade
movq %rax, 0x38(%r14)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/icebert[P]pblat/lib/bPlusTree.c
// Function: bptFileClose
void bptFileClose(struct bptFile **pBpt)
/* Close down and deallocate index file. */
{
struct bptFile *bpt = *pBpt;
if (bpt != NULL)
    {
    udcFileClose(&bpt->udc);
    freeMem(bpt->fileName);
    bptFileDetach(pBpt);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x42e35
movq %rdi, %rbx
leaq 0x10(%r14), %rdi
callq 0x40c8a
movq 0x8(%r14), %rdi
callq 0x2dd41
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2dd51
addq $0x8, %rsp
popq %rbx
popq %r14
retq