LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x42226
movq 0x8(%rbx), %rsi
leaq 0x52e22(%rip), %rdi     # 0x95041
xorl %eax, %eax
callq 0x26e94
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 0x42251
popq %rbx
retq
movq 0x8(%rbx), %rsi
leaq 0x52e00(%rip), %rdi     # 0x9505c
xorl %eax, %eax
popq %rbx
jmp 0x26fc7
// File: /workspace/github_c_makefile_star2_O3/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 0x4228e
movq 0x8(%r14), %rsi
leaq 0x52dea(%rip), %rdi     # 0x95071
xorl %eax, %eax
callq 0x26e94
leaq (%r15,%rbx), %rax
movq 0x28(%r14), %rcx
cmpq %rcx, %rax
jbe 0x422b3
movq 0x8(%r14), %r8
leaq 0x52df1(%rip), %rdi     # 0x95097
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x26e94
cmpq $0x0, 0x7e9dd(%rip)     # 0xc0c98
je 0x422df
movq 0x10(%r14), %rdi
leaq 0x52b6f(%rip), %rsi     # 0x94e37
callq 0x6a50
testl %eax, %eax
je 0x422df
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4171d
addq 0xb0(%r14), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x42390
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 0x47df0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2674f
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 0x2674f
// File: /workspace/github_c_makefile_star2_O3/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 0x52eed(%rip), %rsi     # 0x952b1
movl $0x4, %edi
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x427e5
movq %r14, %rdi
callq 0x426fa
movq %rax, %r14
leaq 0x4c05e(%rip), %rsi     # 0x8e446
movq %rax, %rdi
callq 0x23072
movq %rax, %r13
movq %rax, (%rsp)
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x67d0
movslq %ebp, %rdx
movdqu 0x138(%r12), %xmm0
movq %rdx, %xmm1
movdqa 0x526c2(%rip), %xmm2    # 0x94ae0
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x138(%r12)
movl $0x1, %esi
movq %r15, %rdi
movq %r13, %rcx
callq 0x6b20
movq %rax, %r15
movq %r13, %rdi
callq 0x6e00
testl %eax, %eax
je 0x42473
leaq 0x52dce(%rip), %rdi     # 0x95224
movl %ebp, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x26bea
leaq 0x55178(%rip), %rdi     # 0x975e1
movq %r14, %rsi
xorl %eax, %eax
callq 0x26fc7
movq %rsp, %rdi
callq 0x2371e
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_O3/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 0x52e87(%rip), %rsi     # 0x9532c
xorl %ebp, %ebp
movl $0x4, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x427e5
movq %r14, %rdi
callq 0x426fa
movq %rsp, %rsi
movq %rax, %rdi
callq 0x6d00
testl %eax, %eax
js 0x424e3
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_O3/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, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x52d94(%rip), %rsi     # 0x952ac
xorl %r13d, %r13d
movl $0x4, %edi
movq %r14, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x427e5
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x34769
addq $0x5, %r15
leaq 0x4bf04(%rip), %rsi     # 0x8e446
movq %r15, (%rsp)
movq %r15, %rdi
callq 0x23072
movq %rax, %r15
movq %rax, 0x20(%rsp)
movq %rax, %rdi
movq %r14, 0x8(%rsp)
movq %r14, %rsi
xorl %edx, %edx
callq 0x67d0
testl %ebx, %ebx
jle 0x42637
movl %ebx, %ebp
xorl %r14d, %r14d
xorl %r13d, %r13d
movq 0x18(%rsp), %rax
leaq (%rax,%r14), %r12
movl $0xfa, %edi
callq 0x34769
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %ebp
cmovll %ebp, %eax
movslq %eax, %rdx
movq 0x10(%rsp), %rax
movdqu 0x138(%rax), %xmm0
movq %rdx, %xmm1
movdqa 0x5252e(%rip), %xmm2    # 0x94ae0
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
paddq %xmm0, %xmm2
movdqu %xmm2, 0x138(%rax)
movl $0x1, %esi
movq %r12, %rdi
movq %r15, %rcx
callq 0x6b20
movq %rax, %r12
movl $0x4, %edi
leaq 0x52d00(%rip), %rsi     # 0x952e1
movl %r12d, %edx
xorl %eax, %eax
callq 0x427e5
movq %r15, %rdi
callq 0x6e00
testl %eax, %eax
je 0x4261e
leaq 0x52cf9(%rip), %rdi     # 0x952f7
movl %ebx, %esi
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x26bea
leaq 0x54fce(%rip), %rdi     # 0x975e1
movq (%rsp), %rsi
xorl %eax, %eax
callq 0x26fc7
addl %r12d, %r13d
addq $0x400, %r14            # imm = 0x400
addl $0xfffffc00, %ebp       # imm = 0xFFFFFC00
cmpl %ebx, %r14d
jl 0x42578
leaq 0x20(%rsp), %rdi
callq 0x2371e
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/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 0x52cb8(%rip), %rsi     # 0x95327
xorl %ebp, %ebp
movl $0x4, %edi
xorl %eax, %eax
callq 0x427e5
movl $0x1f4, %edi            # imm = 0x1F4
callq 0x34769
movq %rsp, %rsi
movq %r14, %rdi
callq 0x6d00
testl %eax, %eax
js 0x426ac
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_O3/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 0x52b4d(%rip), %rdi     # 0x95255
movq %r14, %rsi
callq 0x21b23
leaq 0x6(%r14), %rbx
testl %eax, %eax
cmoveq %r14, %rbx
cmpb $0x2f, (%rbx)
je 0x4272d
leaq 0x52b36(%rip), %rdi     # 0x9525c
xorl %eax, %eax
callq 0x26e94
leaq 0x51097(%rip), %rsi     # 0x937cb
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x4278e
movq %rbx, %rdi
movl $0x7e, %esi
callq 0x6270
testq %rax, %rax
jne 0x4278e
leaq 0x57bcc(%rip), %rsi     # 0x9a326
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x4278e
leaq 0x52b09(%rip), %rsi     # 0x95277
movq %rbx, %rdi
callq 0x6180
testq %rax, %rax
jne 0x4278e
leaq 0x52af9(%rip), %rdi     # 0x9527b
movq %rbx, %rsi
callq 0x21e4c
testl %eax, %eax
je 0x4279f
leaq 0x52ae9(%rip), %rdi     # 0x9527e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26e94
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x294ea
movq %rax, 0x18(%rsp)
testq %r13, %r13
je 0x42c75
movq %rax, %r12
movq %r13, %rbx
leaq 0x8(%rbx), %rsi
movq %r12, %rdi
xorl %edx, %edx
callq 0x29142
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x42c5f
movq $0x0, 0x10(%rsp)
testq %r14, %r14
je 0x42d5e
leaq 0x10(%rsp), %r12
movl %r15d, 0xc(%rsp)
movq %r13, 0x20(%rsp)
leaq 0x8(%r14), %rbp
movq %rbp, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x42cfe
cmpl $0x3f, %ecx
je 0x42cb1
incq %rax
cmpl $0x2a, %ecx
jne 0x42c9d
testq %r13, %r13
je 0x42d33
xorl %ebx, %ebx
movq %r13, %r15
leaq 0x8(%r15), %r13
movq %rbp, %rdi
movq %r13, %rsi
movl $0x3f, %edx
movl $0x2a, %ecx
callq 0x42b01
testl %eax, %eax
je 0x42ce5
movq %r12, %rdi
movq %r13, %rsi
callq 0x20b24
incl %ebx
movq (%r15), %r15
testq %r15, %r15
jne 0x42cbb
testl %ebx, %ebx
sete %al
movl 0xc(%rsp), %r15d
movq 0x20(%rsp), %r13
jmp 0x42d35
testl %r15d, %r15d
je 0x42d26
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0x28eb0
testq %rax, %rax
jne 0x42d26
leaq 0x52891(%rip), %rdi     # 0x955ad
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26e94
movq %r12, %rdi
movq %rbp, %rsi
callq 0x20b24
jmp 0x42d52
movb $0x1, %al
testl %r15d, %r15d
sete %cl
xorb $0x1, %al
orb %cl, %al
jne 0x42d52
leaq 0x52865(%rip), %rdi     # 0x955ad
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26e94
movq (%r14), %r14
testq %r14, %r14
jne 0x42c96
leaq 0x18(%rsp), %rdi
callq 0x298bd
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20173
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_O3/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 0x2dff4
movq %r15, %rcx
shlq $0x20, %rcx
je 0x42e85
movslq %r15d, %rdx
leaq 0x1(%rdx), %rcx
cmpq $0x3, %rcx
movl $0x2, %esi
cmovaeq %rcx, %rsi
movl $0x1, %edi
xorl %ecx, %ecx
leaq 0x527c7(%rip), %r8      # 0x955c0
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 0x42df9
jmp 0x42e87
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
testq %rbx, %rbx
je 0x42ea0
movb $0x3d, -0x1(%rax,%rcx)
cmpq $0x1, %rbx
jne 0x42ea0
movb $0x3d, -0x2(%rax,%rcx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x229b5
movq %r14, %rdi
callq 0x62d0
movq %rax, %rbx
movl $0x1, %r12d
testq %rax, %rax
je 0x42f0d
xorl %r13d, %r13d
leaq 0x526e7(%rip), %r15     # 0x955c0
movb (%r14,%r13), %al
movsbl %al, %ebp
movl $0x41, %edx
movq %r15, %rdi
movl %ebp, %esi
callq 0x67e0
testq %rax, %rax
sete %al
cmpb $0x3d, %bpl
setne %cl
testb %cl, %al
jne 0x42f0a
incq %r13
cmpq %r13, %rbx
jne 0x42ed9
jmp 0x42f0d
xorl %r12d, %r12d
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_O3/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, %rbx
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 0x2dff4
movq %rax, %rbp
movq 0x812c2(%rip), %r12     # 0xc4220
testq %r12, %r12
jne 0x42fa3
movl $0x400, %edi            # imm = 0x400
callq 0x2dff4
movq %rax, %r12
movq %rax, 0x812a9(%rip)     # 0xc4220
xorl %r13d, %r13d
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x63b0
leaq 0x52630(%rip), %rax     # 0x955c0
movsbq (%r13,%rax), %rcx
movl %r13d, (%r12,%rcx,4)
incq %r13
cmpq $0x40, %r13
jne 0x42f90
shlq $0x20, %r15
je 0x4300b
sarq $0x20, %r15
cmpq $0x1, %r15
adcq $0x0, %r15
xorl %eax, %eax
xorl %ecx, %ecx
movsbq (%r14,%rcx,4), %rdx
movl (%r12,%rdx,4), %esi
movsbq 0x1(%r14,%rcx,4), %rdx
movl (%r12,%rdx,4), %edx
shll $0xc, %esi
shll $0x6, %edx
orl %esi, %edx
movsbq 0x2(%r14,%rcx,4), %rsi
orl (%r12,%rsi,4), %edx
shll $0x6, %edx
movsbq 0x3(%r14,%rcx,4), %rsi
orl (%r12,%rsi,4), %edx
movl %edx, %esi
shrl $0x10, %esi
movb %sil, (%rbp,%rax)
movb %dh, 0x1(%rbp,%rax)
movb %dl, 0x2(%rbp,%rax)
addq $0x3, %rax
incq %rcx
cmpq %rcx, %r15
jne 0x42fb9
jmp 0x4300d
xorl %eax, %eax
movb $0x0, (%rbp,%rax)
testq %rbx, %rbx
je 0x4301a
movq %rax, (%rbx)
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/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 0x2dff4
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 0x40215
movl (%r12), %edi
xorl %ebp, %ebp
cmpl $0x78ca8c91, %edi       # imm = 0x78CA8C91
je 0x430a4
callq 0x239ea
movl %eax, 0x8(%rsp)
movl $0x1, 0x30(%r14)
movl $0x1, %ebp
cmpl $0x78ca8c91, %eax       # imm = 0x78CA8C91
je 0x430a4
leaq 0x52567(%rip), %rdi     # 0x95601
movq %r15, %rsi
xorl %eax, %eax
callq 0x26e94
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41ad9
movl %eax, 0x18(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41ad9
movl %eax, 0x1c(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41ad9
movl %eax, 0x20(%r14)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41aac
movq %rax, 0x28(%r14)
leaq 0xc(%rsp), %r15
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40215
movl $0x4, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x40215
movq %rbx, %rdi
callq 0x41e25
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_O3/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 0x43185
movq %rdi, %rbx
leaq 0x10(%r14), %rdi
callq 0x40ff7
movq 0x8(%r14), %rdi
callq 0x2e0a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e0b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/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 0x43347
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 0x432bd
movq %rsi, %r12
jmp 0x432eb
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 0x4330f
movq 0x8(%r14), %rdx
leaq 0x523d3(%rip), %rdi     # 0x956d2
movl %r13d, %esi
xorl %eax, %eax
movl %r8d, %ebx
callq 0x26e94
movl %ebx, %r8d
movq 0x38(%r14), %rsi
testl %r8d, %r8d
je 0x43335
movq 0x10(%rbp), %rbx
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x43c5f
xorl %eax, %eax
cmpq $0x0, (%rbx)
setne %al
jmp 0x43344
movq %r14, %rdi
movq %r12, %rdx
movq -0x40(%rbp), %rcx
callq 0x43e59
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_O3/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
movq $0x0, (%rbx)
movq %rbx, (%rsp)
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x43275
movq %rbx, %rdi
callq 0x20173
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/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 $0x38, %rsp
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %rdi, %r15
movq 0x10(%rdi), %rdi
callq 0x41dfc
movq 0x10(%r15), %rdi
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x40215
movq 0x10(%r15), %rdi
leaq -0x2a(%rbp), %rsi
movl $0x1, %edx
callq 0x40215
movl 0x30(%r15), %r14d
movq 0x10(%r15), %rdi
movl %r14d, %esi
callq 0x41b07
movl %eax, %r12d
movq %rsp, -0x50(%rbp)
movl 0x1c(%r15), %eax
movq %rsp, %r13
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %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 0x43476
testw %r12w, %r12w
movq -0x38(%rbp), %r14
je 0x43503
movq 0x10(%r15), %rdi
movl 0x1c(%r15), %edx
movq %r13, %rsi
callq 0x40215
movq 0x10(%r15), %rdi
movl 0x20(%r15), %edx
movq %rbx, %rsi
callq 0x40215
movl 0x1c(%r15), %edx
movl 0x20(%r15), %r8d
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq *-0x40(%rbp)
decw %r12w
jne 0x43437
jmp 0x43503
movq %rsp, -0x48(%rbp)
movzwl %r12w, %ecx
leal 0xf(,%rcx,8), %eax
andl $-0x10, %eax
movq %rsp, %rsi
subq %rax, %rsi
movq %rsi, %rsp
testw %r12w, %r12w
je 0x434ff
xorl %ebx, %ebx
movl %r14d, -0x30(%rbp)
movq %r13, -0x58(%rbp)
movq 0x10(%r15), %rdi
movl 0x1c(%r15), %edx
movq %rsi, %r13
movq -0x58(%rbp), %rsi
movq %rcx, %r14
callq 0x40215
movq 0x10(%r15), %rdi
movl -0x30(%rbp), %esi
callq 0x41aac
movq %r13, %rsi
movq %r14, %rcx
movq %rax, (%r13,%rbx,8)
incq %rbx
cmpq %rbx, %r14
jne 0x434a1
testw %r12w, %r12w
movq -0x40(%rbp), %r12
je 0x434ff
xorl %ebx, %ebx
movq (%r13,%rbx,8), %rsi
movq %r15, %rdi
movq -0x38(%rbp), %rdx
movq %r12, %rcx
callq 0x43396
incq %rbx
cmpq %rbx, %r14
jne 0x434e3
movq -0x48(%rbp), %rsp
movq -0x50(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/bPlusTree.c
// Function: bptFileBulkIndexToOpenFile
void bptFileBulkIndexToOpenFile(void *itemArray, int itemSize, bits64 itemCount, bits32 blockSize,
	void (*fetchKey)(const void *va, char *keyBuf), bits32 keySize,
	void* (*fetchVal)(const void *va), bits32 valSize, FILE *f)
/* Create a b+ tree index from a sorted array, writing output starting at current position
 * of an already open file.  See bptFileCreate for explanation of parameters. */
{
bits32 magic = bptSig;
bits32 reserved = 0;
writeOne(f, magic);
writeOne(f, blockSize);
writeOne(f, keySize);
writeOne(f, valSize);
writeOne(f, itemCount);
writeOne(f, reserved);
writeOne(f, reserved);
bits64 indexOffset = ftell(f);

/* Write non-leaf nodes. */
int levels = bptCountLevels(blockSize, itemCount);
int i;
for (i=levels-1; i > 0; --i)
    {
    bits32 endLevelOffset = writeIndexLevel(blockSize, itemArray, itemSize, itemCount, indexOffset, 
    	i, fetchKey, keySize, valSize, f);
    indexOffset = ftell(f);
    if (endLevelOffset != indexOffset)
        internalErr();
    }

/* Write leaf nodes */
writeLeafLevel(blockSize, itemArray, itemSize, itemCount, 
	fetchKey, keySize, fetchVal, valSize, f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x18(%rsp)
movl %esi, %ebp
movq %rdi, %r15
movq 0x70(%rsp), %r14
leaq 0x10(%rsp), %rax
movq %rdx, (%rax)
leaq 0xc(%rsp), %rbx
movl %ecx, (%rbx)
leaq 0x8(%rsp), %r13
movl %r9d, (%r13)
leaq 0x24(%rsp), %rsi
movl $0x78ca8c91, (%rsi)     # imm = 0x78CA8C91
leaq 0x20(%rsp), %r12
movl $0x0, (%r12)
movl $0x4, %edx
movq %r14, %rdi
callq 0x23138
movl $0x4, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x23138
movl $0x4, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x23138
leaq 0x68(%rsp), %rsi
movl $0x4, %edx
movq %r14, %rdi
callq 0x23138
movl $0x8, %edx
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
callq 0x23138
movl $0x4, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x23138
movl $0x4, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x23138
movq %r14, %rdi
callq 0x6030
movq %rax, %r12
movl (%rbx), %ecx
leaq 0x10(%rsp), %rax
movq (%rax), %rax
cmpl %eax, %ecx
jge 0x43675
leal -0x1(%rcx), %esi
movl $0x2, %ebx
addl %esi, %eax
cltd
idivl %ecx
incl %ebx
cmpl %ecx, %eax
jg 0x435f9
leal -0x2(%rbx), %r9d
movzwl 0xc(%rsp), %edi
movq 0x10(%rsp), %rcx
movl 0x8(%rsp), %eax
movl 0x68(%rsp), %r10d
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %r8d
pushq %r14
pushq %r10
pushq %rax
pushq 0x30(%rsp)
callq 0x436b1
addq $0x20, %rsp
movl %eax, %r13d
movq %r14, %rdi
callq 0x6030
movq %rax, %r12
movl %r13d, %eax
cmpq %rax, %r12
je 0x43665
leaq 0x4a5b9(%rip), %rdi     # 0x8dc0b
leaq 0x51fec(%rip), %rsi     # 0x95645
movl $0x23c, %edx            # imm = 0x23C
xorl %eax, %eax
callq 0x26e94
decl %ebx
cmpl $0x2, %ebx
jg 0x43604
movl 0xc(%rsp), %ecx
movq 0x10(%rsp), %rax
movq 0x60(%rsp), %rbx
movl 0x8(%rsp), %r9d
movl 0x68(%rsp), %r10d
subq $0x8, %rsp
movzwl %cx, %edi
movq %r15, %rsi
movl %ebp, %edx
movq %rax, %rcx
movq 0x20(%rsp), %r8
pushq %r14
pushq %r10
pushq %rbx
callq 0x43962
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/bPlusTree.c
// Function: bptFileCreate
void bptFileCreate(
	void *itemArray, 	/* Sorted array of things to index. */
	int itemSize, 		/* Size of each element in array. */
	bits64 itemCount, 	/* Number of elements in array. */
	bits32 blockSize,	/* B+ tree block size - # of children for each node. */
	void (*fetchKey)(const void *va, char *keyBuf),  /* Given item, copy key to keyBuf */ 
	bits32 keySize,					 /* Size of key */
	void* (*fetchVal)(const void *va), 		 /* Given item, return pointer to value */
	bits32 valSize, 				 /* Size of value */
	char *fileName)                                  /* Name of output file. */
/* Create a b+ tree index file from a sorted array. */

{
/* Open file and write header. */
FILE *f = mustOpen(fileName, "wb");
bptFileBulkIndexToOpenFile(itemArray, itemSize, itemCount, blockSize, fetchKey, keySize, 
	fetchVal, valSize, f);
carefulClose(&f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
movq 0x50(%rsp), %rdi
leaq 0x4f104(%rip), %rsi     # 0x92c46
callq 0x23072
movq %rsp, %rcx
movq %rax, (%rcx)
subq $0x8, %rsp
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl %ebp, %ecx
movq %r14, %r8
movl %ebx, %r9d
pushq %rax
movl 0x58(%rsp), %eax
pushq %rax
pushq 0x58(%rsp)
callq 0x43516
addq $0x20, %rsp
movq %rsp, %rdi
callq 0x2371e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/bPlusTree.c
// Function: bptDataStart
static bits64 bptDataStart(struct bptFile *bpt)
/* Return offset of first bit of data (as opposed to index) in file.  In hind sight I wish
 * this were stored in the header, but fortunately it's not that hard to compute. */
{
bits64 offset = bpt->rootOffset;
for (;;)
    {
    /* Seek to block start */
    udcSeek(bpt->udc, offset);

    /* Read block header,  break if we are leaf. */
    UBYTE isLeaf;
    UBYTE reserved;
    udcMustReadOne(bpt->udc, isLeaf);
    if (isLeaf)
         break;
    udcMustReadOne(bpt->udc, reserved);
    boolean isSwapped = bpt->isSwapped;
    udcReadBits16(bpt->udc, isSwapped);  // childCount

    /* Read and discard first key. */
    char keyBuf[bpt->keySize];
    udcMustRead(bpt->udc, keyBuf, bpt->keySize);

    /* Get file offset of sub-block. */
    offset = udcReadBits64(bpt->udc, isSwapped);
    }
return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x38(%rbx), %r12
movq %r12, %rsi
callq 0x41dfc
movq 0x10(%rbx), %rdi
leaq -0x29(%rbp), %r14
movl $0x1, %edx
movq %r14, %rsi
callq 0x40215
cmpb $0x0, (%r14)
jne 0x43c4d
leaq -0x2a(%rbp), %r14
leaq -0x29(%rbp), %r15
movq 0x10(%rbx), %rdi
movl $0x1, %edx
movq %r14, %rsi
callq 0x40215
movl 0x30(%rbx), %r12d
movq 0x10(%rbx), %rdi
movl %r12d, %esi
callq 0x41b07
movq %rsp, %r13
movl 0x1c(%rbx), %eax
movq %rsp, %rsi
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %rsi
movq %rsi, %rsp
movq 0x10(%rbx), %rdi
movl 0x1c(%rbx), %edx
callq 0x40215
movq 0x10(%rbx), %rdi
movl %r12d, %esi
callq 0x41aac
movq %rax, %r12
movq %r13, %rsp
movq 0x10(%rbx), %rdi
movq %rax, %rsi
callq 0x41dfc
movq 0x10(%rbx), %rdi
movl $0x1, %edx
movq %r15, %rsi
callq 0x40215
cmpb $0x0, -0x29(%rbp)
je 0x43bd4
movq %r12, %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: jsInlineF
void jsInlineF(char *format, ...)
/* Add javascript text to output file or memory structure */
{
jsInlineInit(); // init if needed
va_list args;
va_start(args, format);
dyStringVaPrintf(jsInlineLines, format, args);
va_end(args);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
testb %al, %al
je 0x44081
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
cmpq $0x0, 0x8018e(%rip)     # 0xc4230
jne 0x440b5
movl $0x400, %edi            # imm = 0x400
callq 0x264e0
movq %rax, 0x8017b(%rip)     # 0xc4230
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rdx)
movq 0x8014f(%rip), %rdi     # 0xc4230
movq %rbx, %rsi
callq 0x267c2
addq $0xd0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: jsInlineFinish
void jsInlineFinish()
/* finish outputting accumulated inline javascript */
{
if (jsInlineFinishCalled)
    {
    // jsInlineFinish can be called multiple times when generating framesets or genomeSpace.
    warn("jsInlineFinish() called already.");
    }
jsInlineInit(); // init if needed
printf("<script type='text/javascript' nonce='%s'>\n%s</script>\n", getNonce(), jsInlineLines->string);
dyStringClear(jsInlineLines);
jsInlineFinishCalled = TRUE;
}

// Assembly:
pushq %rax
cmpl $0x0, 0x8013e(%rip)     # 0xc4238
je 0x4410a
leaq 0x5177c(%rip), %rdi     # 0x9587f
xorl %eax, %eax
callq 0x26bea
cmpq $0x0, 0x8011e(%rip)     # 0xc4230
jne 0x44125
movl $0x400, %edi            # imm = 0x400
callq 0x264e0
movq %rax, 0x8010b(%rip)     # 0xc4230
xorl %eax, %eax
callq 0x48dd7
movq 0x800fd(%rip), %rcx     # 0xc4230
movq 0x8(%rcx), %rdx
leaq 0x51762(%rip), %rdi     # 0x958a0
movq %rax, %rsi
xorl %eax, %eax
callq 0x6070
movq 0x800e1(%rip), %rax     # 0xc4230
movl $0x0, 0x14(%rax)
movq 0x8(%rax), %rax
movb $0x0, (%rax)
movl $0x1, 0x800d1(%rip)     # 0xc4238
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: findJsEvent
boolean findJsEvent(char *event)
/* see if it is in the list */
{
int i = 0;
while (TRUE)
    {
    const char *w = jsEvents[i];
    if (sameString(w, event))
	return TRUE;
    if (sameString(w, ""))
	return FALSE;
    ++i;
    }
return FALSE; // should never get here
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x51752(%rip), %rdi     # 0x958d8
movq %r14, %rsi
callq 0x6a50
movl $0x1, %ebx
testl %eax, %eax
je 0x441c1
movl $0x1, %r15d
leaq 0x7a6dc(%rip), %r12     # 0xbe880
cmpq $0x55, %r15
je 0x441bf
movq (%r12,%r15,8), %rdi
movq %r14, %rsi
callq 0x6a50
incq %r15
testl %eax, %eax
jne 0x441a4
jmp 0x441c1
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: checkValidEvent
void checkValidEvent(char *event)
/* check if it is lowercase and a known valid event name */
{
char *temp = cloneString(event);
tolowers(temp);
if (!sameString(temp, event))
    warn("jsInline: javascript event %s should be given in lower-case", event);
event = temp; 
if (!findJsEvent(event))
    warn("jsInline: unknown javascript event %s", event);
freeMem (event);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1feba
movq %rax, %rbx
movq %rax, %rdi
callq 0x22305
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6a50
testl %eax, %eax
je 0x44206
leaq 0x51995(%rip), %rdi     # 0x95b91
movq %r14, %rsi
xorl %eax, %eax
callq 0x26bea
movq %rbx, %rdi
callq 0x44174
testl %eax, %eax
jne 0x44223
leaq 0x519b4(%rip), %rdi     # 0x95bcd
movq %rbx, %rsi
xorl %eax, %eax
callq 0x26bea
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e0a0
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: jsOnEventByIdF
void jsOnEventByIdF(char *eventName, char *idText, char *format, ...)
/* Add js mapping for inline event with printf formatting */
{
checkValidEvent(eventName);
jsInlineF("document.getElementById('%s').on%s = function(event) {if (!event) {event=window.event}; ", idText, eventName);
va_list args;
va_start(args, format);
dyStringVaPrintf(jsInlineLines, format, args);
va_end(args);
jsInlineF("};\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rsp), %r12
movq %rcx, 0x18(%r12)
movq %r8, 0x20(%r12)
movq %r9, 0x28(%r12)
testb %al, %al
je 0x442c7
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0x441cf
leaq 0x5197e(%rip), %rdi     # 0x95c51
movq %r14, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4403b
movq %rsp, %rdx
movq %r12, 0x10(%rdx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rdx)
movq 0x7ff29(%rip), %rdi     # 0xc4230
movq %rbx, %rsi
callq 0x267c2
leaq 0x52b8a(%rip), %rdi     # 0x96ea0
xorl %eax, %eax
callq 0x4403b
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiScriptDirUrl
char *cgiScriptDirUrl()
/* Return the absolute cgi-bin directory on this webserver.
 * This is not the local directory but the <path> part after the server
 * in external URLs to this webserver.
 * e.g. if CGI is called http://localhost/subdir/cgi-bin/cgiTest
 * then returned value is /subdir/
 * return value must be free'd. */
{
char* cgiPath = cloneString(cgiScriptName());
char dir[PATH_LEN];
splitPath(cgiPath, dir, NULL, NULL);
char* dirStr = needMem(PATH_LEN);
safecpy(dirStr, PATH_LEN, dir);
return dirStr;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
leaq 0x5190b(%rip), %rdi     # 0x95ce0
callq 0x68f0
testq %rax, %rax
leaq 0x51908(%rip), %rdi     # 0x95cec
cmovneq %rax, %rdi
callq 0x1feba
movq %rsp, %rbx
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x288ae
movl $0x200, %edi            # imm = 0x200
callq 0x2dff4
movq %rax, %r14
movl $0x200, %esi            # imm = 0x200
movq %rax, %rdi
movq %rbx, %rdx
callq 0x21600
movq %r14, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiDictionaryFromEncodedString
struct cgiDictionary *cgiDictionaryFromEncodedString(char *encodedString)
/* Giving a this=that&this=that string,  return cgiDictionary parsed out from it. 
 * This does *not* destroy input like the lower level cgiParse functions do. */
{
struct cgiDictionary *d;
AllocVar(d);
d->stringData = cloneString(encodedString);
cgiParseInputAbort(d->stringData, &d->hash, &d->list);
return d;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x20, %edi
callq 0x2dff4
movq %rax, %r14
movq %rbx, %rdi
callq 0x1feba
movq %rax, 0x8(%r14)
leaq 0x10(%r14), %rsi
leaq 0x18(%r14), %rdx
movq %rax, %rdi
callq 0x449e1
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiDictionaryFree
void cgiDictionaryFree(struct cgiDictionary **pD)
/* Free up resources associated with dictionary. */
{
struct cgiDictionary *d = *pD;
if (d != NULL)
    {
    slFreeList(&d->list);
    hashFree(&d->hash);
    freez(&d->stringData);
    freez(pD);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x44b56
movq %rdi, %rbx
leaq 0x18(%r14), %rdi
callq 0x20196
leaq 0x10(%r14), %rdi
callq 0x298bd
addq $0x8, %r14
movq %r14, %rdi
callq 0x2e0b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2e0b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiDictionaryFreeList
void cgiDictionaryFreeList(struct cgiDictionary **pList)
/* Free up a whole list of cgiDictionaries */
{
struct cgiDictionary *el, *next;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
movq %r15, 0x8(%rsp)
testq %r15, %r15
je 0x44b91
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x44b1a
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x44b7c
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/cheapcgi.c
// Function: cgiParseNext
boolean cgiParseNext(char **pInput, char **retVar, char **retVal)
/* Parse out next var/val in a var=val&var=val... cgi formatted string 
 * This will insert zeroes and other things into string. 
 * Usage:
 *     char *pt = cgiStringStart;
 *     char *var, *val
 *     while (cgiParseNext(&pt, &var, &val))
 *          printf("%s\t%s\n", var, val); */
{
char *var = *pInput;
if (var == NULL || var[0] == 0)
    return FALSE;
char *val = strchr(var, '=');
if (val == NULL)
    errAbort("Mangled CGI input string %s", var);
*val++ = 0;
char *end = strchr(val, '&');
if (end == NULL)
    end = strchr(val, ';');  // For DAS
if (end == NULL)
    {
    end = val + strlen(val);
    *pInput = NULL;
    }
else
    {
    *pInput = end+1;
    *end = 0;
    }
*retVar = var;
*retVal = val;
cgiDecode(val,val,end-val);
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r15
xorl %eax, %eax
testq %r15, %r15
je 0x44c48
cmpb $0x0, (%r15)
je 0x44c48
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %r15, %rdi
movl $0x3d, %esi
callq 0x6270
movq %rax, %r13
movq %rax, %rbp
testq %rax, %rax
jne 0x44bf7
leaq 0x511c9(%rip), %rdi     # 0x95db6
movq %r15, %rsi
xorl %eax, %eax
callq 0x26e94
incq %r13
movb $0x0, (%rbp)
movq %r13, %rdi
movl $0x26, %esi
callq 0x6270
testq %rax, %rax
jne 0x44c22
movq %r13, %rdi
movl $0x3b, %esi
callq 0x6270
testq %rax, %rax
je 0x44c57
leaq 0x1(%rax), %rcx
movq %rcx, (%r12)
movb $0x0, (%rax)
movq %r15, (%r14)
movq %r13, (%rbx)
subl %r13d, %eax
movq %r13, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x44c6c
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x62d0
addq %r13, %rax
movq $0x0, (%r12)
jmp 0x44c2d