LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
andq $0x0, (%rsp)
testq %rsi, %rsi
jne 0x3b1ee
movq 0x79aca(%rip), %rsi     # 0xb4cb8
callq 0x3ad22
movq %rax, %rbx
movq %rax, 0x8(%rsp)
leaq 0x48ed8(%rip), %r14     # 0x840da
testq %rbx, %rbx
je 0x3b235
leaq 0x8(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1de0f
testl %eax, %eax
jne 0x3b21f
movq (%rbx), %rbx
jmp 0x3b202
movq %rsp, %rsi
movq %r15, %rdi
callq 0x3b197
cmpq $-0x1, %rax
jne 0x3b235
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x1c583
movq (%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3b30a
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 0x3b444
movl (%r12), %ebp
subl %ebp, %r13d
subl %ebp, %ebx
movq (%r15), %r15
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x186dd
movl %eax, %r13d
pushq $0x1
popq %r12
xorl %eax, %eax
cmpl %ebx, %r13d
jge 0x3b2fb
leal (%r13,%rbp), %eax
movslq %eax, %rdx
movq %rdx, %rcx
shlq $0xd, %rcx
leaq 0x2000(%rcx), %r8
leaq 0x48b67(%rip), %rdi     # 0x83e37
movq %r14, %rsi
xorl %eax, %eax
callq 0x22186
movq %r15, %rdi
movl %r13d, %esi
movl %ebx, %edx
callq 0x186d3
movq %r15, %rdi
movl %eax, %esi
movl %ebx, %edx
callq 0x186dd
movl %eax, %r13d
movl %r12d, %eax
jmp 0x3b2ae
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %r9, (%rsp)
movq %r8, %r14
movl %edx, %eax
movl %esi, %ebp
movq %rdi, %r12
pushq $0x8
popq %rsi
cltd
idivl %esi
movl %eax, %r15d
leal 0x7(%rcx), %eax
cltd
idivl %esi
subl %r15d, %eax
movslq %eax, %r13
movq %r13, %rdi
callq 0x289b8
movq %rax, %rbx
addq $0xb8, %r12
leal 0x40(%r15), %eax
movslq %eax, %rdx
movq %r12, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x3b4c4
movq %r12, %rdi
movl %ebp, %esi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x3b7f8
movq %rbx, (%r14)
shll $0x3, %r15d
movq (%rsp), %rax
movl %r15d, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rsp, %r14
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x3a0ac
movq (%r14), %rax
testl %ebx, %ebx
je 0x3b865
movq %rax, %rdi
callq 0x1f529
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x3a0ac
movl (%r14), %eax
testl %ebx, %ebx
je 0x3b891
movl %eax, %edi
callq 0x1f5a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leaq 0x6(%rsp), %r14
pushq $0x2
popq %rdx
movq %r14, %rsi
callq 0x3a0ac
movzwl (%r14), %eax
testl %ebx, %ebx
je 0x3b8bf
movzwl %ax, %edi
callq 0x1f60f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rdx
movq %r14, %rsi
callq 0x3a0ac
movss (%r14), %xmm0
testl %ebx, %ebx
je 0x3b8eb
callq 0x1f6ea
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rsp, %r14
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x3a0ac
movsd (%r14), %xmm0
testl %ebx, %ebx
je 0x3b915
callq 0x1f689
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x18, %rsp
movq %rdi, %r12
leaq 0x16(%rsp), %r14
pushq $0x2
popq %r15
xorl %r13d, %r13d
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
movslq %r15d, %rbp
cmpq %rbp, %rbx
jl 0x3b989
leal (,%rbp,2), %r15d
movslq %r15d, %rdi
callq 0x289b8
movq %r12, %r13
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x6570
movq 0x8(%rsp), %rdi
callq 0x28c2d
movq %r12, %r14
movq %r12, 0x8(%rsp)
movq %r13, %r12
xorl %r13d, %r13d
movq %r12, %rdi
leaq 0x7(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x39e97
testq %rax, %rax
je 0x3b9b4
movzbl 0x7(%rsp), %eax
cmpb $0xa, %al
cmovel %r13d, %eax
movb %al, (%r14,%rbx)
je 0x3b9b8
incq %rbx
jmp 0x3b945
xorl %ebx, %ebx
jmp 0x3b9cd
movq %r14, %rdi
callq 0x1c306
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x28c2d
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_O2/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, %r14
leaq 0x16(%rsp), %r15
pushq $0x2
popq %rbx
xorl %ebp, %ebp
movq $0x0, 0x8(%rsp)
movslq %ebx, %r12
cmpq %r12, %rbp
jl 0x3ba3a
leal (%r12,%r12), %ebx
movslq %ebx, %rdi
callq 0x289b8
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6570
movq 0x8(%rsp), %rdi
callq 0x28c2d
movq %r13, %r15
movq %r13, 0x8(%rsp)
movq %r14, %rdi
callq 0x3b824
movb %al, (%r15,%rbp)
incq %rbp
testl %eax, %eax
jne 0x3ba03
movq %r15, %rdi
callq 0x1c306
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x28c2d
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_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rdi, %r13
callq 0x3acf2
movq %rax, %r15
movq %rax, 0x8(%rsp)
movq 0x28(%rax), %r14
testq %r12, %r12
setne %al
cmpq %r12, %r14
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x3bac5
leaq 0x4840b(%rip), %rdi     # 0x83ec0
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x223fb
movq %r14, %rdi
incq %rdi
callq 0x289b8
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x3a0ac
movb $0x0, (%r12,%r14)
leaq 0x8(%rsp), %rdi
callq 0x3adfd
testq %rbx, %rbx
je 0x3baf8
movq %r14, (%rbx)
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x79176(%rip)     # 0xb4cb8
je 0x3bb59
movq %rsi, %rdx
movl 0x58(%rdi), %esi
addq $0xe0, %rdi
pushq $0x1
popq %rcx
jmp 0x3b4c4
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0x7914b(%rip)     # 0xb4cb8
je 0x3bb83
movq %rsi, %rdx
movl 0x58(%rdi), %esi
addq $0xe0, %rdi
xorl %ecx, %ecx
jmp 0x3b4c4
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x47e52(%rip), %xmm0    # 0x839f0
movsd 0x47e52(%rip), %xmm1    # 0x839f8
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %r12
xorl %eax, %eax
callq 0x2ee65
movq %rax, %rdi
callq 0x1c306
movq %rax, %r15
movq %r14, %rdi
callq 0x2ee93
xorl %edi, %edi
callq 0x6660
subq %r12, %rax
movq %rax, %rdi
movl %ebx, %esi
callq 0x3bbfb
movq %rax, %rbx
movq %r15, %rdi
callq 0x2ee93
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x47f24(%rip), %rdi     # 0x83d37
callq 0x6a50
testl %eax, %eax
je 0x3be22
movq 0x20(%rbx), %rax
jmp 0x3be3b
movq 0x8(%rbx), %rdi
movq %rsp, %rsi
callq 0x6d00
testl %eax, %eax
js 0x3be39
movq 0x58(%rsp), %rax
jmp 0x3be3b
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3beeb
testl %eax, %eax
je 0x3be62
movq %rbx, %rdi
addq $0x30, %rsp
popq %rbx
jmp 0x2ed50
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3b12c
cmpl $-0x1, %eax
jne 0x3bead
leaq 0x44730(%rip), %rdi     # 0x805a8
movq %rbx, %rsi
callq 0x1db41
testl %eax, %eax
jne 0x3be97
leaq 0x44725(%rip), %rdi     # 0x805b0
movq %rbx, %rsi
callq 0x1db41
testl %eax, %eax
je 0x3beb1
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x39b36
testl %eax, %eax
je 0x3bee2
movq 0x8(%rsp), %rax
jmp 0x3bee5
cltq
jmp 0x3bee5
leaq 0x44701(%rip), %rdi     # 0x805b9
movq %rbx, %rsi
callq 0x1db41
testl %eax, %eax
je 0x3bed1
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x39dc1
jmp 0x3bea2
leaq 0x48020(%rip), %rdi     # 0x83ef8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x223fb
pushq $-0x1
popq %rax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rbx
subq $0x20, %rsp
leaq 0x18(%rsp), %rbx
andq $0x0, (%rbx)
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
leaq 0x8(%rsp), %r15
movq %rbx, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x3a284
movq %rbx, %rdi
callq 0x28c3d
movq %r14, %rdi
callq 0x28c3d
xorl %ecx, %ecx
xorl %eax, %eax
cmpq %rcx, (%r15)
sete %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3bf70
movq 0x8(%rbx), %rsi
leaq 0x47fd8(%rip), %rdi     # 0x83f41
xorl %eax, %eax
callq 0x223fb
movq 0x28(%rbx), %rsi
movl 0x58(%rbx), %r8d
pushq $0x1
popq %rcx
xorl %edi, %edi
movl %ecx, %edx
xorl %r9d, %r9d
callq 0x66c0
movq %rax, 0xb0(%rbx)
cmpq $-0x1, %rax
je 0x3bf96
popq %rbx
retq
movq 0x8(%rbx), %rsi
leaq 0x47fbb(%rip), %rdi     # 0x83f5c
xorl %eax, %eax
popq %rbx
jmp 0x22504
// File: /workspace/github_c_makefile_star2_O2/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 0x3bfd3
movq 0x8(%r14), %rsi
leaq 0x47fa5(%rip), %rdi     # 0x83f71
xorl %eax, %eax
callq 0x223fb
leaq (%r15,%rbx), %rax
movq 0x28(%r14), %rcx
cmpq %rcx, %rax
jbe 0x3bff8
movq 0x8(%r14), %r8
leaq 0x47fac(%rip), %rdi     # 0x83f97
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x223fb
cmpq $0x0, 0x78cb8(%rip)     # 0xb4cb8
je 0x3c024
movq 0x10(%r14), %rdi
leaq 0x47d2a(%rip), %rsi     # 0x83d37
callq 0x6a50
testl %eax, %eax
je 0x3c024
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3b4d3
addq 0xb0(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3c0cf
movq %rsp, %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x6120
pushq $0x14
popq %rsi
leaq 0x20(%rsp), %r14
pushq $0x2a
popq %rcx
movq %r15, %rdi
movq %r14, %rdx
callq 0x415e8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21dda
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 0x21dda
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x480ae(%rip), %rsi     # 0x841b1
pushq $0x4
popq %rdi
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x3c521
movq %r14, %rdi
callq 0x3c3e1
movq %rax, %r14
leaq 0x412c1(%rip), %rsi     # 0x7d3e6
movq %rax, %rdi
callq 0x1ec79
movq %rax, %r13
movq %rax, (%rsp)
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x67d0
addq $0x130, %r12            # imm = 0x130
movslq %ebp, %rdx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x3c48f
movq %rax, %r15
movq %r13, %rdi
callq 0x6e00
testl %eax, %eax
je 0x3c18c
leaq 0x47fb5(%rip), %rdi     # 0x84124
movl %ebp, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22186
leaq 0x4a35f(%rip), %rdi     # 0x864e1
movq %r14, %rsi
xorl %eax, %eax
callq 0x22504
movq %rsp, %rdi
callq 0x1f2ea
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x4806e(%rip), %rsi     # 0x8422c
xorl %ebp, %ebp
pushq $0x4
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3c521
movq %r14, %rdi
callq 0x3c3e1
movq %rsp, %rsi
movq %rax, %rdi
callq 0x6d00
testl %eax, %eax
js 0x3c1f8
movq 0x58(%rsp), %rax
movq %rax, (%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14
movq %rcx, 0x10(%rsp)
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x47f81(%rip), %rsi     # 0x841ac
pushq $0x4
popq %rdi
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x3c521
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x2ee13
addq $0x5, %r12
leaq 0x41196(%rip), %rsi     # 0x7d3e6
movq %r12, (%rsp)
movq %r12, %rdi
callq 0x1ec79
movq %rax, %r13
movq %rax, 0x20(%rsp)
movq %rax, %rdi
movq %r15, 0x8(%rsp)
movq %r15, %rsi
xorl %edx, %edx
callq 0x67d0
addq $0x130, %r14            # imm = 0x130
movq %r14, 0x18(%rsp)
xorl %r14d, %r14d
movl %ebx, %ebp
xorl %r15d, %r15d
cmpl %ebx, %r14d
jge 0x3c322
movq 0x10(%rsp), %rax
leaq (%rax,%r14), %r12
movl $0xfa, %edi
callq 0x2ee13
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %ebp
cmovll %ebp, %eax
movslq %eax, %rdx
movq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0x3c48f
movq %rax, %r12
pushq $0x4
popq %rdi
leaq 0x47f11(%rip), %rsi     # 0x841e1
movl %r12d, %edx
xorl %eax, %eax
callq 0x3c521
movq %r13, %rdi
callq 0x6e00
testl %eax, %eax
je 0x3c30d
leaq 0x47f0a(%rip), %rdi     # 0x841f7
movl %ebx, %esi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x22186
leaq 0x4a1df(%rip), %rdi     # 0x864e1
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x22504
addl %r12d, %r15d
addl $0xfffffc00, %ebp       # imm = 0xFFFFFC00
addq $0x400, %r14            # imm = 0x400
jmp 0x3c28a
leaq 0x20(%rsp), %rdi
callq 0x1f2ea
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x47ecd(%rip), %rsi     # 0x84227
xorl %ebp, %ebp
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x3c521
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x2ee13
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6d00
testl %eax, %eax
js 0x3c393
movq 0x58(%rsp), %rax
movq %rax, (%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x47d66(%rip), %rdi     # 0x84155
movq %r14, %rsi
callq 0x1db41
leaq 0x6(%r14), %rbx
testl %eax, %eax
cmoveq %r14, %rbx
cmpb $0x2f, (%rbx)
je 0x3c414
leaq 0x47d4f(%rip), %rdi     # 0x8415c
xorl %eax, %eax
callq 0x223fb
leaq 0x462b0(%rip), %rsi     # 0x826cb
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x3c473
pushq $0x7e
popq %rsi
movq %rbx, %rdi
callq 0x6270
testq %rax, %rax
jne 0x3c473
leaq 0x4cc67(%rip), %rsi     # 0x890a6
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x3c473
leaq 0x47d24(%rip), %rsi     # 0x84177
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x3c473
leaq 0x47d14(%rip), %rdi     # 0x8417b
movq %rbx, %rsi
callq 0x1de0f
testl %eax, %eax
je 0x3c484
leaq 0x47d04(%rip), %rdi     # 0x8417e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x223fb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0xc(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x245c9
movq %rax, %r12
movq %rax, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
testq %rbx, %rbx
je 0x3c94e
leaq 0x8(%rbx), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x242d0
movq (%rbx), %rbx
jmp 0x3c936
leaq 0x20(%rsp), %r12
andq $0x0, (%r12)
testq %r14, %r14
je 0x3ca06
leaq 0x8(%r14), %rbp
movq %rbp, %rdi
callq 0x3c800
testl %eax, %eax
je 0x3c9c9
xorl %r15d, %r15d
movq 0x18(%rsp), %rbx
testq %rbx, %rbx
je 0x3c9a4
leaq 0x8(%rbx), %r13
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3c81b
testl %eax, %eax
je 0x3c99f
movq %r12, %rdi
movq %r13, %rsi
callq 0x1ce5e
incl %r15d
movq (%rbx), %rbx
jmp 0x3c979
cmpl $0x0, 0xc(%rsp)
sete %al
testl %r15d, %r15d
setne %cl
orb %al, %cl
jne 0x3c9fe
leaq 0x47af0(%rip), %rdi     # 0x844ad
movq %rbp, %rsi
xorl %eax, %eax
callq 0x223fb
jmp 0x3c9fe
cmpl $0x0, 0xc(%rsp)
je 0x3c9f3
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x24088
testq %rax, %rax
jne 0x3c9f3
leaq 0x47ac4(%rip), %rdi     # 0x844ad
movq %rbp, %rsi
xorl %eax, %eax
callq 0x223fb
movq %r12, %rdi
movq %rbp, %rsi
callq 0x1ce5e
movq (%r14), %r14
jmp 0x3c958
leaq 0x10(%rsp), %rdi
callq 0x2494c
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x1c567
movq (%rbx), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %rdi, %rbx
leaq 0x2(%rsi), %rax
pushq $0x3
popq %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %r15
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r14
leal 0x1(,%r15,4), %eax
movslq %eax, %rdi
callq 0x28bb0
movslq %r15d, %rdx
pushq $0x1
popq %rcx
leaq 0x47a51(%rip), %rsi     # 0x844c0
cmpq %rdx, %rcx
ja 0x3caf8
movzbl (%rbx), %r8d
movzbl 0x1(%rbx), %edi
shll $0x10, %r8d
shll $0x8, %edi
orl %r8d, %edi
movzbl 0x2(%rbx), %r9d
orl %edi, %r9d
cmpq $0x1, %r14
cmovel %r8d, %edi
cmpq %rcx, %rdx
cmovnel %r9d, %edi
testq %r14, %r14
cmovel %r9d, %edi
movl %edi, %r8d
shrl $0x12, %r8d
movb (%r8,%rsi), %r8b
movb %r8b, -0x4(%rax,%rcx,4)
movl %edi, %r8d
shrl $0xc, %r8d
andl $0x3f, %r8d
movb (%r8,%rsi), %r8b
movb %r8b, -0x3(%rax,%rcx,4)
movl %edi, %r8d
shrl $0x6, %r8d
andl $0x3f, %r8d
movb (%r8,%rsi), %r8b
movb %r8b, -0x2(%rax,%rcx,4)
andl $0x3f, %edi
movb (%rdi,%rsi), %dil
movb %dil, -0x1(%rax,%rcx,4)
incq %rcx
addq $0x3, %rbx
jmp 0x3ca6f
movb $0x0, -0x4(%rax,%rcx,4)
testq %r14, %r14
je 0x3cb12
movb $0x3d, -0x5(%rax,%rcx,4)
cmpq $0x1, %r14
jne 0x3cb12
movb $0x3d, -0x6(%rax,%rcx,4)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1e7f0
movq %r14, %rdi
callq 0x62d0
movq %rax, %rbx
xorl %r13d, %r13d
leaq 0x47980(%rip), %r15     # 0x844c0
pushq $0x41
popq %r12
cmpq %r13, %rbx
je 0x3cb73
movb (%r14,%r13), %al
movsbl %al, %ebp
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x67e0
testq %rax, %rax
sete %al
cmpb $0x3d, %bpl
setne %cl
testb %cl, %al
jne 0x3cb78
incq %r13
jmp 0x3cb44
pushq $0x1
popq %rcx
jmp 0x3cb7a
xorl %ecx, %ecx
xorl %eax, %eax
testb $0x3, %bl
cmovel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r14
callq 0x62d0
movq %rax, %r15
addq $0x3, %r15
shrq $0x2, %r15
movabsq $0x300000000, %rax      # imm = 0x300000000
imulq %r15, %rax
movabsq $0x100000000, %rdi      # imm = 0x100000000
addq %rax, %rdi
sarq $0x20, %rdi
callq 0x28bb0
movq %rax, %rbp
movq 0x7b663(%rip), %rax     # 0xb8240
testq %rax, %rax
je 0x3cc52
movslq %r15d, %rdx
xorl %esi, %esi
xorl %ecx, %ecx
cmpq %rsi, %rdx
je 0x3cc38
movsbq (%r14,%rsi,4), %rdi
movl (%rax,%rdi,4), %edi
movsbq 0x1(%r14,%rsi,4), %r8
movl (%rax,%r8,4), %ebx
shll $0xc, %edi
shll $0x6, %ebx
orl %edi, %ebx
movsbq 0x2(%r14,%rsi,4), %rdi
orl (%rax,%rdi,4), %ebx
shll $0x6, %ebx
movsbq 0x3(%r14,%rsi,4), %rdi
orl (%rax,%rdi,4), %ebx
movl %ebx, %edi
shrl $0x10, %edi
movb %dil, (%rbp,%rcx)
movb %bh, 0x1(%rbp,%rcx)
movb %bl, 0x2(%rbp,%rcx)
addq $0x3, %rcx
incq %rsi
jmp 0x3cbe9
movb $0x0, (%rbp,%rcx)
testq %r12, %r12
je 0x3cc46
movq %rcx, (%r12)
movq %rbp, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x400, %edi            # imm = 0x400
callq 0x28bb0
movq %rax, 0x7b5dd(%rip)     # 0xb8240
xorl %ecx, %ecx
cmpq $0x100, %rcx            # imm = 0x100
je 0x3cc77
andl $0x0, (%rax,%rcx,4)
incq %rcx
jmp 0x3cc65
xorl %ecx, %ecx
leaq 0x47840(%rip), %rdx     # 0x844c0
cmpq $0x40, %rcx
je 0x3cbe2
movsbq (%rcx,%rdx), %rsi
movl %ecx, (%rax,%rsi,4)
incq %rcx
jmp 0x3cc80
nop
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x40
popq %rdi
callq 0x28bb0
movq %rax, %r14
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
leaq 0x8(%rsp), %r12
pushq $0x4
popq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3a0ac
movl (%r12), %edi
xorl %ebp, %ebp
cmpl $0x78ca8c91, %edi       # imm = 0x78CA8C91
je 0x3cd0a
callq 0x1f5a0
movl %eax, 0x8(%rsp)
movl $0x1, 0x30(%r14)
pushq $0x1
popq %rbp
cmpl $0x78ca8c91, %eax       # imm = 0x78CA8C91
je 0x3cd0a
leaq 0x47801(%rip), %rdi     # 0x84501
movq %r15, %rsi
xorl %eax, %eax
callq 0x223fb
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3b86d
movl %eax, 0x18(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3b86d
movl %eax, 0x1c(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3b86d
movl %eax, 0x20(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3b842
movq %rax, 0x28(%r14)
leaq 0xc(%rsp), %r15
pushq $0x4
popq %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3a0ac
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3a0ac
movq %rbx, %rdi
callq 0x3bb84
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_O2/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 0x3cdeb
movq %rdi, %rbx
leaq 0x10(%r14), %rdi
callq 0x3adfd
movq 0x8(%r14), %rdi
callq 0x28c2d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x28c3d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/bPlusTree.c
// Function: bptFileFindMaybeMulti
static boolean bptFileFindMaybeMulti(struct bptFile *bpt, void *key, int keySize, int valSize,
    boolean multi, void *singleVal, struct slRef **multiVal)
/* Do either a single or multiple find depending in multi parameter.  Only one of singleVal
 * or multiVal should be non-NULL, depending on the same parameter. */
{
/* Check key size vs. file key size, and act appropriately.  If need be copy key to a local
 * buffer and zero-extend it. */
if (keySize > bpt->keySize)
    return FALSE;
char keyBuf[bpt->keySize];
if (keySize != bpt->keySize)
    {
    memcpy(keyBuf, key, keySize);
    memset(keyBuf+keySize, 0, bpt->keySize - keySize);
    key = keyBuf;
    }

/* Make sure the valSize matches what's in file. */
if (valSize != bpt->valSize)
    errAbort("Value size mismatch between bptFileFind (valSize=%d) and %s (valSize=%d)",
    	valSize, bpt->fileName, bpt->valSize);

if (multi)
    {
    rFindMulti(bpt, bpt->rootOffset, key, multiVal);
    return *multiVal != NULL;
    }
else
    return rFind(bpt, bpt->rootOffset, key, singleVal);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r13d
movl 0x1c(%rdi), %ecx
xorl %eax, %eax
cmpl %edx, %ecx
jb 0x3cfaa
movq %rdi, %r14
movq %r9, -0x40(%rbp)
movq %rsp, %r15
movq %rsp, %r12
addq $0xf, %rcx
andq $-0x10, %rcx
subq %rcx, %r12
movq %r12, %rsp
movl 0x1c(%rdi), %ebx
subl %edx, %ebx
jne 0x3cf20
movq %rsi, %r12
jmp 0x3cf4e
movq %r15, -0x38(%rbp)
movslq %edx, %r15
movq %r12, %rdi
movq %r15, %rdx
movl %r8d, -0x2c(%rbp)
callq 0x6570
addq %r12, %r15
movq %r15, %rdi
movq -0x38(%rbp), %r15
xorl %esi, %esi
movq %rbx, %rdx
callq 0x63b0
movl -0x2c(%rbp), %r8d
movl 0x20(%r14), %ecx
cmpl %r13d, %ecx
je 0x3cf72
movq 0x8(%r14), %rdx
leaq 0x47670(%rip), %rdi     # 0x845d2
movl %r13d, %esi
xorl %eax, %eax
movl %r8d, %ebx
callq 0x223fb
movl %ebx, %r8d
movq 0x38(%r14), %rsi
testl %r8d, %r8d
je 0x3cf98
movq 0x10(%rbp), %rbx
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x3d7e5
xorl %eax, %eax
cmpq $0x0, (%rbx)
setne %al
jmp 0x3cfa7
movq %r14, %rdi
movq %r12, %rdx
movq -0x40(%rbp), %rcx
callq 0x3d9f3
movq %r15, %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/bPlusTree.c
// Function: bptFileFindMultiple
struct slRef *bptFileFindMultiple(struct bptFile *bpt, void *key, int keySize, int valSize)
/* Find all values associated with key.  Store this in ->val item of returned list. 
 * Do a slRefFreeListAndVals() on list when done. */
{
struct slRef *list = NULL;
bptFileFindMaybeMulti(bpt, key, keySize, valSize, TRUE, NULL, &list);
slReverse(&list);
return list;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
andq $0x0, (%rbx)
movq %rbx, (%rsp)
pushq $0x1
popq %r8
xorl %r9d, %r9d
callq 0x3ced8
movq %rbx, %rdi
callq 0x1c567
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/bPlusTree.c
// Function: rTraverse
static void rTraverse(struct bptFile *bpt, bits64 blockStart, void *context, 
    void (*callback)(void *context, void *key, int keySize, void *val, int valSize) )
/* Recursively go across tree, calling callback at leaves. */
{
/* Seek to start of block. */
udcSeek(bpt->udc, blockStart);

/* Read block header. */
UBYTE isLeaf;
UBYTE reserved;
bits16 i, childCount;
udcMustReadOne(bpt->udc, isLeaf);
udcMustReadOne(bpt->udc, reserved);
boolean isSwapped = bpt->isSwapped;
childCount = udcReadBits16(bpt->udc, isSwapped);

char keyBuf[bpt->keySize], valBuf[bpt->valSize];
if (isLeaf)
    {
    for (i=0; i<childCount; ++i)
        {
	udcMustRead(bpt->udc, keyBuf, bpt->keySize);
	udcMustRead(bpt->udc, valBuf, bpt->valSize);
	callback(context, keyBuf, bpt->keySize, valBuf, bpt->valSize);
	}
    }
else
    {
    bits64 fileOffsets[childCount];
    /* Loop through to get file offsets of children. */
    for (i=0; i<childCount; ++i)
	{
	udcMustRead(bpt->udc, keyBuf, bpt->keySize);
	fileOffsets[i] = udcReadBits64(bpt->udc, isSwapped);
	}
    /* Loop through recursing on child offsets. */
    for (i=0; i<childCount; ++i)
	rTraverse(bpt, fileOffsets[i], context, callback);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, -0x38(%rbp)
movq %rdi, %r15
movq 0x10(%rdi), %rdi
callq 0x3bb5a
movq 0x10(%r15), %rdi
leaq -0x29(%rbp), %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x3a0ac
movq 0x10(%r15), %rdi
leaq -0x2a(%rbp), %rsi
movq %rbx, %rdx
callq 0x3a0ac
movl 0x30(%r15), %esi
movq 0x10(%r15), %rdi
movl %esi, -0x30(%rbp)
callq 0x3b899
movl %eax, %r13d
movq %rsp, -0x48(%rbp)
movl 0x1c(%r15), %eax
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movl 0x20(%r15), %eax
movq %rsp, %rbx
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
leaq -0x29(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3d0c7
subw $0x1, %r13w
jb 0x3d139
movq 0x10(%r15), %rdi
movl 0x1c(%r15), %edx
movq %r12, %rsi
callq 0x3a0ac
movq 0x10(%r15), %rdi
movl 0x20(%r15), %edx
movq %rbx, %rsi
callq 0x3a0ac
movl 0x1c(%r15), %edx
movl 0x20(%r15), %r8d
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq *%r14
jmp 0x3d085
movq %r14, -0x50(%rbp)
movq %rsp, -0x40(%rbp)
movzwl %r13w, %r13d
leal 0xf(,%r13,8), %eax
andl $-0x10, %eax
movq %rsp, %rbx
subq %rax, %rbx
movq %rbx, %rsp
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x3d114
movq 0x10(%r15), %rdi
movl 0x1c(%r15), %edx
movq %r12, %rsi
callq 0x3a0ac
movq 0x10(%r15), %rdi
movl -0x30(%rbp), %esi
callq 0x3b842
movq %rax, (%rbx,%r14,8)
incq %r14
jmp 0x3d0ea
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x3d135
movq (%rbx,%r14,8), %rsi
movq %r15, %rdi
movq -0x38(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq 0x3cff4
incq %r14
jmp 0x3d117
movq -0x40(%rbp), %rsp
movq -0x48(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq