LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitSeekTo
static void twoBitSeekTo(struct twoBitFile *tbf, char *name)
/* Seek to start of named record.  Abort if can't find it. */
{
if (tbf->bpt)
    {
    bits32 offset;
    if (!bptFileFind(tbf->bpt, name, strlen(name), &offset, sizeof(offset)))
	 errAbort("%s is not in %s", name, tbf->bpt->fileName);
    (*tbf->ourSeek)(tbf->f, offset);
    }
else
    {
    struct twoBitIndex *index = hashFindVal(tbf->hash, name);
    if (index == NULL)
	 errAbort("%s is not in %s", name, tbf->fileName);
    (*tbf->ourSeek)(tbf->f, index->offset);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rdi), %r15
testq %r15, %r15
je 0x38c65
movq %r14, %rdi
callq 0x62d0
leaq 0xc(%rsp), %rcx
pushq $0x4
popq %r8
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x3cec2
testl %eax, %eax
jne 0x38c50
movq 0x38(%rbx), %rax
movq 0x8(%rax), %rdx
leaq 0x4ad57(%rip), %rdi     # 0x8399d
movq %r14, %rsi
xorl %eax, %eax
callq 0x223fb
movq 0x10(%rbx), %rdi
movl 0xc(%rsp), %esi
callq *0x50(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x30(%rbx), %rdi
movq %r14, %rsi
callq 0x244c6
movq %rax, %r15
testq %rax, %rax
jne 0x38c8e
movq 0x8(%rbx), %rdx
leaq 0x4ad19(%rip), %rdi     # 0x8399d
movq %r14, %rsi
xorl %eax, %eax
callq 0x223fb
movq 0x10(%rbx), %rdi
movq 0x50(%rbx), %rax
movq 0x10(%r15), %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitTotalSize
long long twoBitTotalSize(struct twoBitFile *tbf)
/* Return total size of all sequences in two bit file. */
{
struct twoBitIndex *index;
long long totalSize = 0;
for (index = tbf->indexList; index != NULL; index = index->next)
    {
    (*tbf->ourSeek)(tbf->f, index->offset);
    totalSize += (*tbf->ourReadBits32)(tbf->f, tbf->isSwapped);
    }
return totalSize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x28(%rdi), %r15
xorl %r14d, %r14d
movq (%r15), %r15
testq %r15, %r15
je 0x38cd8
movq 0x10(%rbx), %rdi
movq 0x10(%r15), %rsi
callq *0x50(%rbx)
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
callq *0x68(%rbx)
movl %eax, %eax
addq %rax, %r14
jmp 0x38cb4
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitLoadAll
struct dnaSeq *twoBitLoadAll(char *spec)
/* Return list of all sequences matching spec, which is in
 * the form:
 *
 *    file/path/input.2bit[:seqSpec1][,seqSpec2,...]
 *
 * where seqSpec is either
 *     seqName
 *  or
 *     seqName:start-end */
{
struct twoBitSpec *tbs = twoBitSpecNew(spec);
struct twoBitFile *tbf = twoBitOpen(tbs->fileName);
struct dnaSeq *list = NULL;
if (tbs->seqs != NULL)
    {
    struct twoBitSeqSpec *tbss;
    for (tbss = tbs->seqs; tbss != NULL; tbss = tbss->next)
        slSafeAddHead(&list, twoBitReadSeqFrag(tbf, tbss->name,
                                               tbss->start, tbss->end));
    }
else
    {
    struct twoBitIndex *index;
    for (index = tbf->indexList; index != NULL; index = index->next)
	slSafeAddHead(&list, twoBitReadSeqFrag(tbf, index->name, 0, 0));
    }
slReverse(&list);
twoBitClose(&tbf);
twoBitSpecFree(&tbs);
return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
callq 0x38d9f
movq %rax, %r14
movq %rax, 0x18(%rsp)
movq (%rax), %rdi
callq 0x3842b
andq $0x0, 0x8(%rsp)
movq %rax, %rbx
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x38d42
xorl %r15d, %r15d
testq %r14, %r14
je 0x38d71
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movl 0x14(%r14), %ecx
movq %rbx, %rdi
callq 0x38bcf
movq %r15, (%rax)
movq %rax, 0x8(%rsp)
movq (%r14), %r14
movq %rax, %r15
jmp 0x38d19
movq %rbx, %r14
addq $0x28, %r14
xorl %r15d, %r15d
movq (%r14), %r14
testq %r14, %r14
je 0x38d71
movq 0x8(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x38bcf
movq %r15, (%rax)
movq %rax, 0x8(%rsp)
movq %rax, %r15
jmp 0x38d4c
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1c567
leaq 0x10(%rsp), %rdi
callq 0x3833b
leaq 0x18(%rsp), %rdi
callq 0x38ea5
movq (%rbx), %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitSpecNew
struct twoBitSpec *twoBitSpecNew(char *specStr)
/* Parse a .2bit file and sequence spec into an object.
 * The spec is a string in the form:
 *
 *    file/path/input.2bit[:seqSpec1][,seqSpec2,...]
 *
 * where seqSpec is either
 *     seqName
 *  or
 *     seqName:start-end
 *
 * free result with twoBitSpecFree().
 */
{
char *s, *e;
int i, numSeqs;
char **seqSpecs;
struct twoBitSpec *spec;
AllocVar(spec);
spec->fileName = cloneString(specStr);

/* start with final file name  */
s = strrchr(spec->fileName, '/');
if (s == NULL)
    s = spec->fileName;
else
    s++;

/* find end of file name and zero-terminate */
e = strchr(s, ':');
if (e == NULL)
    s = NULL; /* just file name */
else
    {
    *e++ = '\0';
    s = e;
    }

if (!twoBitIsFile(spec->fileName))
    {
    twoBitSpecFree(&spec);
    return NULL; /* not a 2bit file */
    }

if (s != NULL)
    {
    /* chop seqs at commas and parse */
    numSeqs = chopString(s, ",", NULL, 0);
    AllocArray(seqSpecs, numSeqs);
    chopString(s, ",", seqSpecs, numSeqs);
    for (i = 0; i< numSeqs; i++)
        slSafeAddHead(&spec->seqs, parseSeqSpec(seqSpecs[i]));
    slReverse(&spec->seqs);
    }
return spec;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x10
popq %rdi
callq 0x28bb0
movq %rax, %rbx
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x1c306
movq %rax, %r15
movq %rax, (%rbx)
pushq $0x2f
popq %rsi
movq %rax, %rdi
callq 0x67c0
leaq 0x1(%rax), %rdi
testq %rax, %rax
cmoveq %r15, %rdi
pushq $0x3a
popq %rsi
callq 0x6270
testq %rax, %rax
je 0x38dfb
movq %rax, %r14
incq %r14
movb $0x0, (%rax)
movq (%rbx), %r15
jmp 0x38dfe
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x38f60
testl %eax, %eax
je 0x38e89
testq %r14, %r14
je 0x38e93
leaq 0x45bbd(%rip), %r12     # 0x7e9d7
xorl %ebp, %ebp
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1e51d
movslq %eax, %r13
leaq (,%r13,8), %rdi
callq 0x28a1f
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
movl %r13d, %ecx
callq 0x1e51d
movq %rbx, %r14
addq $0x8, %r14
testl %r13d, %r13d
movl $0x0, %r12d
cmovgl %r13d, %r12d
cmpq %rbp, %r12
je 0x38e7f
movq (%r15,%rbp,8), %rdi
callq 0x39212
movq (%r14), %rcx
movq %rcx, (%rax)
movq %rax, (%r14)
incq %rbp
jmp 0x38e63
movq %r14, %rdi
callq 0x1c567
jmp 0x38e93
movq %rsp, %rdi
callq 0x38ea5
xorl %ebx, %ebx
movq %rbx, %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/twoBit.c
// Function: twoBitSpecFree
void twoBitSpecFree(struct twoBitSpec **specPtr)
/* free a twoBitSpec object */
{
struct twoBitSpec *spec = *specPtr;
if (spec != NULL)
    {
    struct twoBitSeqSpec *seq;
    while ((seq = slPopHead(&spec->seqs)) != NULL)
        {
        freeMem(seq->name);
        freeMem(seq);
        }
    freeMem(spec->fileName);
    freeMem(spec);
    *specPtr = NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x38ef3
movq %rdi, %rbx
leaq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x1c515
testq %rax, %rax
je 0x38edf
movq %rax, %r12
movq 0x8(%rax), %rdi
callq 0x28c2d
movq %r12, %rdi
callq 0x28c2d
jmp 0x38ebc
movq (%r14), %rdi
callq 0x28c2d
movq %r14, %rdi
callq 0x28c2d
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitSeqNames
struct slName *twoBitSeqNames(char *fileName)
/* Get list of all sequences in twoBit file. */
{
struct twoBitFile *tbf = twoBitOpen(fileName);
struct twoBitIndex *index;
struct slName *name, *list = NULL;
for (index = tbf->indexList; index != NULL; index = index->next)
    {
    name = slNameNew(index->name);
    slAddHead(&list, name);
    }
twoBitClose(&tbf);
slReverse(&list);
return list;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
callq 0x3842b
andq $0x0, 0x8(%rsp)
movq %rax, %rbx
movq %rax, 0x10(%rsp)
addq $0x28, %rbx
xorl %r14d, %r14d
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x38f3e
movq 0x8(%rbx), %rdi
callq 0x1cb86
movq %r14, (%rax)
movq %rax, 0x8(%rsp)
movq %rax, %r14
jmp 0x38f20
leaq 0x10(%rsp), %rdi
callq 0x3833b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x1c567
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitIsFile
boolean twoBitIsFile(char *fileName)
/* Return TRUE if file is in .2bit format. */
{
boolean useUdc = FALSE;
if (hasProtocol(fileName))
    useUdc = TRUE;
else if (!isRegularFile(fileName))
    return FALSE;

struct twoBitFile *tbf = getTbfAndOpen(fileName, useUdc);
boolean isSwapped;
boolean isTwoBit = twoBitSigRead(tbf, &isSwapped);

(*tbf->ourClose)(&tbf->f);

return isTwoBit;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2bf85
testl %eax, %eax
je 0x38f74
pushq $0x1
popq %rbp
jmp 0x38f82
movq %rbx, %rdi
callq 0x2fbf5
xorl %ebp, %ebp
testl %eax, %eax
je 0x38fa5
movq %rbx, %rdi
movl %ebp, %esi
callq 0x38fae
movq %rax, %rbx
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0x383e3
movl %eax, %ebp
leaq 0x10(%rbx), %rdi
callq *0x78(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: getTbfAndOpen
static struct twoBitFile *getTbfAndOpen(char *fileName, boolean useUdc)
{
struct twoBitFile *tbf;

AllocVar(tbf);
setFileFuncs(tbf, useUdc);

if (useUdc)
    tbf->f = udcFileOpen(fileName, NULL);
else
    tbf->f = mustOpen(fileName, "rb");

return tbf;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x90, %edi
callq 0x28bb0
movq %rax, %rbx
testl %ebp, %ebp
je 0x39002
leaq 0x77a(%rip), %rax       # 0x39749
leaq 0x76e(%rip), %rcx       # 0x39744
leaq 0x762(%rip), %rdx       # 0x3973f
leaq 0x756(%rip), %rsi       # 0x3973a
leaq 0x74a(%rip), %rdi       # 0x39735
leaq 0x73e(%rip), %r8        # 0x39730
leaq 0x732(%rip), %r9        # 0x3972b
leaq 0x726(%rip), %r10       # 0x39726
jmp 0x3903a
leaq 0x76d(%rip), %rax       # 0x39776
leaq 0x761(%rip), %rcx       # 0x39771
leaq 0x755(%rip), %rdx       # 0x3976c
leaq 0x749(%rip), %rsi       # 0x39767
leaq 0x73d(%rip), %rdi       # 0x39762
leaq 0x731(%rip), %r8        # 0x3975d
leaq 0x723(%rip), %r9        # 0x39756
leaq 0x714(%rip), %r10       # 0x3974e
movq %r10, 0x58(%rbx)
movq %r9, 0x50(%rbx)
movq %r8, 0x60(%rbx)
movq %rdi, 0x68(%rbx)
movq %rsi, 0x70(%rbx)
movq %rdx, 0x80(%rbx)
movq %rcx, 0x78(%rbx)
movq %rax, 0x88(%rbx)
testl %ebp, %ebp
je 0x39070
movq %r14, %rdi
xorl %esi, %esi
callq 0x3acf2
jmp 0x3907f
leaq 0x4436f(%rip), %rsi     # 0x7d3e6
movq %r14, %rdi
callq 0x1ec79
movq %rax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitParseRange
boolean twoBitParseRange(char *rangeSpec, char **retFile, 
	char **retSeq, int *retStart, int *retEnd)
/* Parse out something in format
 *    file/path/name:seqName:start-end
 * or
 *    file/path/name:seqName
 * or
 *    file/path/name:seqName1,seqName2,seqName3,...
 * This will destroy the input 'rangeSpec' in the process.  Returns FALSE if
 * it doesn't fit this format, setting retFile to rangeSpec, and retSet to
 * null.  If it is the shorter form then start and end will both be returned
 * as zero, which is ok by twoBitReadSeqFrag.  Any of the return arguments
 * maybe NULL.
 */
{
char *s, *e;
int n;

/* default returns */
if (retFile != NULL)
    *retFile = rangeSpec;
if (retSeq != NULL)
    *retSeq = NULL;
if (retStart != NULL)
    *retStart = 0;
if (retEnd != NULL)
    *retEnd = 0;

/* start with final name  */
s = strrchr(rangeSpec, '/');
if (s == NULL)
    s = rangeSpec;
else
    s++;

/* Grab seqName, zero terminate fileName. */
s = strchr(s, ':');
if (s == NULL)
    return FALSE;
*s++ = 0;
if (retSeq != NULL)
    *retSeq = s;

/* Grab start, zero terminate seqName. */
s = strchr(s, ':');
if (s == NULL)
    return TRUE;  /* no range spec */
*s++ = 0;
n = strtol(s, &e, 0);
if (*e != '-')
    return FALSE; /* not a valid range */
if (retStart != NULL)
    *retStart = n;
s = e+1;

/* Grab end. */
n = strtol(s, &e, 0);
if (*e != '\0')
    return FALSE; /* not a valid range */
if (retEnd != NULL)
    *retEnd = n;
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
testq %rsi, %rsi
je 0x390ab
movq %r12, (%rsi)
testq %r15, %r15
je 0x390b4
andq $0x0, (%r15)
testq %r14, %r14
je 0x390bd
andl $0x0, (%r14)
testq %rbx, %rbx
je 0x390c5
andl $0x0, (%rbx)
pushq $0x2f
popq %rsi
movq %r12, %rdi
callq 0x67c0
leaq 0x1(%rax), %rdi
testq %rax, %rax
cmoveq %r12, %rdi
pushq $0x3a
popq %rsi
callq 0x6270
testq %rax, %rax
je 0x3916c
movq %rax, %rcx
incq %rax
movb $0x0, (%rcx)
testq %r15, %r15
je 0x390fd
movq %rax, (%r15)
pushq $0x3a
popq %rsi
movq %rax, %rdi
callq 0x6270
pushq $0x1
popq %r12
testq %rax, %rax
je 0x39172
movq %rax, %rdi
incq %rdi
movb $0x0, (%rax)
leaq 0x8(%rsp), %r15
xorl %ebp, %ebp
movq %r15, %rsi
xorl %edx, %edx
callq 0x6a60
movq (%r15), %rdi
cmpb $0x2d, (%rdi)
jne 0x39175
testq %r14, %r14
je 0x3913b
movl %eax, (%r14)
testq %rbx, %rbx
sete %r15b
incq %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
xorl %edx, %edx
callq 0x6a60
movq (%r14), %rcx
xorl %ebp, %ebp
cmpb $0x0, (%rcx)
sete %cl
setne %dl
orb %r15b, %dl
je 0x39170
movb %cl, %bpl
jmp 0x39175
xorl %ebp, %ebp
jmp 0x39175
movl %eax, (%rbx)
movl %r12d, %ebp
movl %ebp, %eax
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/twoBit.c
// Function: twoBitIsRange
boolean twoBitIsRange(char *rangeSpec)
/* Return TRUE if it looks like a two bit range specifier. */
{
char *dupe = cloneString(rangeSpec);
char *file, *seq;
int start, end;
boolean isRange = twoBitParseRange(dupe, &file, &seq, &start, &end);
if (isRange)
    isRange = twoBitIsFile(file);
freeMem(dupe);
return isRange;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
callq 0x1c306
movq %rax, %rbx
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rax, %rdi
callq 0x3908b
testl %eax, %eax
je 0x391bd
movq (%rsp), %rdi
callq 0x38f60
movl %eax, %ebp
jmp 0x391bf
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x28c2d
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitIsSpec
boolean twoBitIsSpec(char *spec)
/* Return TRUE spec is a valid 2bit spec (see twoBitSpecNew) */
{
struct twoBitSpec *tbs = twoBitSpecNew(spec);
boolean isSpec = (tbs != NULL);
twoBitSpecFree(&tbs);
return isSpec;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
callq 0x38d9f
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
xorl %ebx, %ebx
testq %rax, %rax
setne %bl
callq 0x38ea5
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: parseSeqSpec
static struct twoBitSeqSpec *parseSeqSpec(char *seqSpecStr)
/* parse one sequence spec */
{
boolean isOk = TRUE;
char *s, *e;
struct twoBitSeqSpec *seq;
AllocVar(seq);
seq->name = cloneString(seqSpecStr);

/* Grab start */
s = strchr(seq->name, ':');
if (s == NULL)
    return seq;  /* no range spec */
*s++ = 0;
seq->start = strtol(s, &e, 0);
if (*e != '-')
    isOk = FALSE;
else
    {
    /* Grab end */
    s = e+1;
    seq->end = strtol(s, &e, 0);
    if (*e != '\0')
        isOk = FALSE;
    }
if (!isOk || (seq->end < seq->start))
    errAbort("invalid twoBit sequence specification: \"%s\"", seqSpecStr);
return seq;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x18
popq %rdi
callq 0x28bb0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1c306
movq %rax, 0x8(%r14)
pushq $0x3a
popq %rsi
movq %rax, %rdi
callq 0x6270
testq %rax, %rax
je 0x3929e
movq %rax, %rdi
incq %rdi
movb $0x0, (%rax)
leaq 0x8(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x6a60
movl %eax, 0x10(%r14)
movq (%r15), %rdi
cmpb $0x2d, (%rdi)
jne 0x3928d
incq %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x6a60
movl %eax, 0x14(%r14)
movq (%r15), %rcx
cmpb $0x0, (%rcx)
jne 0x3928d
cmpl %eax, 0x10(%r14)
jbe 0x3929e
leaq 0x4a719(%rip), %rdi     # 0x839ad
movq %rbx, %rsi
xorl %eax, %eax
callq 0x223fb
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitSpecNewFile
struct twoBitSpec *twoBitSpecNewFile(char *twoBitFile, char *specFile)
/* parse a file containing a list of specifications for sequences in the
 * specified twoBit file. Specifications are one per line in forms:
 *     seqName
 *  or
 *     seqName:start-end
 */
{
struct lineFile *lf = lineFileOpen(specFile, TRUE);
char *line;
struct twoBitSpec *spec;
AllocVar(spec);
spec->fileName = cloneString(twoBitFile);
while (lineFileNextReal(lf, &line))
    slSafeAddHead(&spec->seqs, parseSeqSpec(trimSpaces(line)));
slReverse(&spec->seqs);
lineFileClose(&lf);
return spec;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
movq %rdi, %r15
pushq $0x1
popq %rsi
movq %rax, %rdi
callq 0x25467
movq %rax, %r14
movq %rax, 0x10(%rsp)
pushq $0x10
popq %rdi
callq 0x28bb0
movq %rax, %rbx
movq %r15, %rdi
callq 0x1c306
movq %rax, (%rbx)
movq %rbx, %r15
addq $0x8, %r15
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x26108
testl %eax, %eax
je 0x3931d
movq 0x8(%rsp), %rdi
callq 0x1e897
movq %rax, %rdi
callq 0x39212
movq (%r15), %rcx
movq %rcx, (%rax)
movq %rax, (%r15)
jmp 0x392f1
movq %r15, %rdi
callq 0x1c567
leaq 0x10(%rsp), %rdi
callq 0x25cd8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitOutMaskBeds
void twoBitOutMaskBeds(struct twoBitFile *tbf, char *seqName, FILE *outF)
/* output a series of bed3's that enumerate the number of masked bases in a sequence*/
{
struct twoBit *header = readTwoBitSeqHeader(tbf, seqName);

int ii;
for (ii = 0; ii < header->maskBlockCount; ++ii)
    {
    fprintf(outF, "%s\t%d\t%d\n", seqName, header->maskStarts[ii], header->maskStarts[ii] + header->maskSizes[ii]);
    }

twoBitFree(&header);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
callq 0x38660
movq %rax, %r15
movq %rax, 0x8(%rsp)
leaq 0x4a5c4(%rip), %r12     # 0x83929
xorl %r13d, %r13d
movl 0x30(%r15), %eax
cmpq %rax, %r13
jae 0x39399
movq 0x38(%r15), %rax
movq 0x40(%r15), %rdx
movl (%rax,%r13,4), %ecx
movl (%rdx,%r13,4), %r8d
addl %ecx, %r8d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x6a90
incq %r13
jmp 0x39368
leaq 0x8(%rsp), %rdi
callq 0x38390
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/twoBit.c
// Function: twoBitOutNBeds
void twoBitOutNBeds(struct twoBitFile *tbf, char *seqName, FILE *outF)
/* output a series of bed3's that enumerate the number of N's in a sequence*/
{
int nBlockCount;

twoBitSeekTo(tbf, seqName);

(*tbf->ourReadBits32)(tbf->f, tbf->isSwapped);

/* Read in blocks of N. */
nBlockCount = (*tbf->ourReadBits32)(tbf->f, tbf->isSwapped);

if (nBlockCount > 0)
    {
    bits32 *nStarts = NULL, *nSizes = NULL;
    int i;

    AllocArray(nStarts, nBlockCount);
    AllocArray(nSizes, nBlockCount);
    (*tbf->ourMustRead)(tbf->f, nStarts, sizeof(nStarts[0]) * nBlockCount);
    (*tbf->ourMustRead)(tbf->f, nSizes, sizeof(nSizes[0]) * nBlockCount);
    if (tbf->isSwapped)
	{
	for (i=0; i<nBlockCount; ++i)
	    {
	    nStarts[i] = byteSwap32(nStarts[i]);
	    nSizes[i] = byteSwap32(nSizes[i]);
	    }
	}

    for (i=0; i<nBlockCount; ++i)
	{
	fprintf(outF, "%s\t%d\t%d\n", seqName, nStarts[i], nStarts[i] + nSizes[i]);
	}

    freez(&nStarts);
    freez(&nSizes);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, (%rsp)
movq %rsi, %r14
movq %rdi, %r13
callq 0x38bfd
movq 0x10(%r13), %rdi
movl 0x18(%r13), %esi
callq *0x68(%r13)
movq 0x10(%r13), %rdi
movl 0x18(%r13), %esi
callq *0x68(%r13)
testl %eax, %eax
jle 0x394ab
movl %eax, %ebp
leaq (,%rbp,4), %rbx
movq %rbx, %rdi
callq 0x28a1f
movq %rax, %r15
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
callq 0x28a1f
movq %rax, %r12
movq %rax, 0x8(%rsp)
movq 0x10(%r13), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0x88(%r13)
movq 0x10(%r13), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq *0x88(%r13)
cmpl $0x0, 0x18(%r13)
je 0x39468
xorl %r13d, %r13d
cmpq %r13, %rbp
je 0x39468
movl (%r15,%r13,4), %edi
callq 0x1f5a0
movl %eax, (%r15,%r13,4)
movl (%r12,%r13,4), %edi
callq 0x1f5a0
movl %eax, (%r12,%r13,4)
incq %r13
jmp 0x39444
leaq 0x4a4ba(%rip), %r13     # 0x83929
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x39497
movl (%r15,%rbx,4), %ecx
movl (%r12,%rbx,4), %r8d
addl %ecx, %r8d
movq (%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x6a90
incq %rbx
jmp 0x39471
leaq 0x10(%rsp), %rdi
callq 0x28c3d
leaq 0x8(%rsp), %rdi
callq 0x28c3d
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/twoBit.c
// Function: twoBitSeqSizeNoNs
int twoBitSeqSizeNoNs(struct twoBitFile *tbf, char *seqName)
/* return the size of the sequence, not counting N's*/
{
int nBlockCount;
int size;

twoBitSeekTo(tbf, seqName);

size = (*tbf->ourReadBits32)(tbf->f, tbf->isSwapped);

/* Read in blocks of N. */
nBlockCount = (*tbf->ourReadBits32)(tbf->f, tbf->isSwapped);

if (nBlockCount > 0)
    {
    bits32 *nStarts = NULL, *nSizes = NULL;
    
    int i;

    AllocArray(nStarts, nBlockCount);
    AllocArray(nSizes, nBlockCount);
    (*tbf->ourMustRead)(tbf->f, nStarts, sizeof(nStarts[0]) * nBlockCount);
    (*tbf->ourMustRead)(tbf->f, nSizes, sizeof(nSizes[0]) * nBlockCount);
    if (tbf->isSwapped)
	{
	for (i=0; i<nBlockCount; ++i)
	    {
	    nStarts[i] = byteSwap32(nStarts[i]);
	    nSizes[i] = byteSwap32(nSizes[i]);
	    }
	}

    for (i=0; i<nBlockCount; ++i)
	{
	size -= nSizes[i];
	}

    freez(&nStarts);
    freez(&nSizes);
    }

return(size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
callq 0x38bfd
movq 0x10(%r15), %rdi
movl 0x18(%r15), %esi
callq *0x68(%r15)
movl %eax, %ebx
movq 0x10(%r15), %rdi
movl 0x18(%r15), %esi
callq *0x68(%r15)
testl %eax, %eax
jle 0x39590
movl %eax, %ebp
leaq (,%rbp,4), %r13
movq %r13, %rdi
callq 0x28a1f
movq %rax, %r12
movq %rax, 0x10(%rsp)
movq %r13, %rdi
callq 0x28a1f
movq %rax, %r14
movq %rax, 0x8(%rsp)
movq 0x10(%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x88(%r15)
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq *0x88(%r15)
cmpl $0x0, 0x18(%r15)
je 0x3956c
xorl %r15d, %r15d
cmpq %r15, %rbp
je 0x3956c
movl (%r12,%r15,4), %edi
callq 0x1f5a0
movl %eax, (%r12,%r15,4)
movl (%r14,%r15,4), %edi
callq 0x1f5a0
movl %eax, (%r14,%r15,4)
incq %r15
jmp 0x39548
xorl %eax, %eax
cmpq %rax, %rbp
je 0x3957c
subl (%r14,%rax,4), %ebx
incq %rax
jmp 0x3956e
leaq 0x10(%rsp), %rdi
callq 0x28c3d
leaq 0x8(%rsp), %rdi
callq 0x28c3d
movl %ebx, %eax
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/twoBit.c
// Function: twoBitTotalSizeNoN
long long twoBitTotalSizeNoN(struct twoBitFile *tbf)
/* return the size of the all the sequence in file, not counting N's*/
{
struct twoBitIndex *index;
long long totalSize = 0;
for (index = tbf->indexList; index != NULL; index = index->next)
    {
    int size = twoBitSeqSizeNoNs(tbf, index->name);
    totalSize += size;
    }
return totalSize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x28(%rdi), %r15
xorl %r14d, %r14d
movq (%r15), %r15
testq %r15, %r15
je 0x395cb
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x394ba
cltq
addq %rax, %r14
jmp 0x395b0
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: twoBitChromHash
struct hash *twoBitChromHash(char *fileName)
/* Build a hash of chrom names with their sizes. */
{
struct twoBitFile *tbf = twoBitOpen(fileName);
struct twoBitIndex *index;
struct hash *hash = hashNew(digitsBaseTwo(tbf->seqCount));
for (index = tbf->indexList; index != NULL; index = index->next)
    {
    hashAddInt(hash, index->name, twoBitSeqSize(tbf, index->name));
    }

twoBitClose(&tbf);
return hash;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x3842b
movq %rax, %rbx
movq %rax, (%rsp)
movl 0x20(%rax), %edi
callq 0x2d0c4
pushq $0x1
popq %rsi
movl %eax, %edi
callq 0x245c9
movq %rax, %r14
movq %rbx, %r12
addq $0x28, %r12
movq (%r12), %r12
testq %r12, %r12
je 0x39642
movq 0x8(%r12), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38be6
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x24538
jmp 0x3961a
movq %rsp, %rdi
callq 0x3833b
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/twoBit.c
// Function: readBlockCoords
static void readBlockCoords(struct twoBitFile *tbf, boolean isSwapped, bits32 *retBlockCount,
			    bits32 **retBlockStarts, bits32 **retBlockSizes)
/* Read in blockCount, starts and sizes from file. (Same structure used for
 * both blocks of N's and masked blocks.) */
{
bits32 blkCount = (*tbf->ourReadBits32)(tbf->f, isSwapped);
*retBlockCount = blkCount;
if (blkCount == 0)
    {
    *retBlockStarts = NULL;
    *retBlockSizes = NULL;
    }
else
    {
    bits32 *nStarts, *nSizes;
    AllocArray(nStarts, blkCount);
    AllocArray(nSizes, blkCount);
    (*tbf->ourMustRead)(tbf->f, nStarts, sizeof(nStarts[0]) * blkCount);
    (*tbf->ourMustRead)(tbf->f, nSizes, sizeof(nSizes[0]) * blkCount);
    if (isSwapped)
	{
	int i;
	for (i=0; i<blkCount; ++i)
	    {
	    nStarts[i] = byteSwap32(nStarts[i]);
	    nSizes[i] = byteSwap32(nSizes[i]);
	    }
	}
    *retBlockStarts = nStarts;
    *retBlockSizes = nSizes;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r13
movq 0x10(%rdi), %rdi
callq *0x68(%r13)
movl %eax, (%r15)
testl %eax, %eax
je 0x3970b
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movl %eax, %r14d
leaq (,%r14,4), %rbx
movq %rbx, %rdi
callq 0x28a1f
movq %rax, %r15
movq %rbx, %rdi
callq 0x28a1f
movq %rax, %r12
movq 0x10(%r13), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0x88(%r13)
movq 0x10(%r13), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq *0x88(%r13)
testl %ebp, %ebp
je 0x396ff
xorl %ebx, %ebx
cmpq %rbx, %r14
je 0x396ff
movl (%r15,%rbx,4), %edi
callq 0x1f5a0
movl %eax, (%r15,%rbx,4)
movl (%r12,%rbx,4), %edi
callq 0x1f5a0
movl %eax, (%r12,%rbx,4)
incq %rbx
jmp 0x396db
movq 0x10(%rsp), %rbx
movq 0x8(%rsp), %r14
jmp 0x39711
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %r15, (%r14)
movq %r12, (%rbx)
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: ourRead
static size_t ourRead(struct ioStats *ioStats, int fd, void *buf, size_t size)
{
ioStats->numReads++;
size_t bytesRead = read(fd, buf, size);
ioStats->bytesRead += bytesRead;

return bytesRead;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
incq 0x8(%rdi)
movl %esi, %edi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x6aa0
addq %rax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: udcInfoViaFtp
boolean udcInfoViaFtp(char *url, struct udcRemoteFileInfo *retInfo)
/* Gets size and last modified time of FTP URL */
{
verbose(4, "checking ftp remote info on %s\n", url);
long long size = 0;
time_t t, tUtc;
struct tm *tm = NULL;
// TODO: would be nice to add int *retCtrlSocket to netGetFtpInfo so we can stash 
// in retInfo->connInfo and keep socket open.
boolean ok = netGetFtpInfo(url, &size, &tUtc);
if (!ok)
    return FALSE;
// Convert UTC to localtime
tm = localtime(&tUtc);
t = mktimeFromUtc(tm);
if (t == -1)
    { /* Handle error */;
    errAbort("mktimeFromUtc failed while converting FTP UTC last-modified time %ld to local time", (long) tUtc);
    }
retInfo->size = size;
retInfo->updateTime = t;
return TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x49ed0(%rip), %rsi     # 0x83ca6
xorl %ebp, %ebp
pushq $0x4
popq %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3c521
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %rsp, %rdx
movq %r14, %rdi
callq 0x29edb
testl %eax, %eax
je 0x39e37
movq %rsp, %rdi
callq 0x64d0
movq %rax, %rdi
callq 0x1ffbe
movq %rax, %r14
cmpq $-0x1, %rax
jne 0x39e28
movq (%rsp), %rsi
leaq 0x49ea5(%rip), %rdi     # 0x83cc6
xorl %eax, %eax
callq 0x223fb
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r14, (%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: udcFastReadString
boolean udcFastReadString(struct udcFile *f, char buf[256])
/* Read a string into buffer, which must be long enough
 * to hold it.  String is in 'writeString' format. */
{
UBYTE bLen;
int len;
if (!udcReadOne(f, bLen))
    return FALSE;
if ((len = bLen)> 0)
    udcMustRead(f, buf, len);
buf[len] = 0;
return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
callq 0x39e97
testq %rax, %rax
je 0x39e7e
movzbl 0xf(%rsp), %r15d
testq %r15, %r15
je 0x39e82
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3a0ac
jmp 0x39e85
xorl %eax, %eax
jmp 0x39e8d
xorl %r15d, %r15d
movb $0x0, (%rbx,%r15)
pushq $0x1
popq %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: udcParseUrlFull
void udcParseUrlFull(char *url, char **retProtocol, char **retAfterProtocol, char **retColon,
		     char **retAuth)
/* Parse the URL into components that udc treats separately.
 * *retAfterProtocol is Q-encoded to keep special chars out of filenames.  
 * Free all *ret's except *retColon when done. */
{
char *protocol, *afterProtocol;
char *colon = strchr(url, ':');
if (!colon)
    {
    *retColon = NULL;
    return;
    }
int colonPos = colon - url;
protocol = cloneStringZ(url, colonPos);
afterProtocol = url + colonPos + 1;
while (afterProtocol[0] == '/')
   afterProtocol += 1;
char *userPwd = strchr(afterProtocol, '@');
if (userPwd)
    {
    if (retAuth)
	{
	char auth[1024];
	safencpy(auth, sizeof(auth), afterProtocol, userPwd+1-afterProtocol);
	*retAuth = qEncode(auth);
	}
    char *afterHost = strchr(afterProtocol, '/');
    if (!afterHost)
	{
	afterHost = afterProtocol+strlen(afterProtocol);
	}
    if (userPwd < afterHost)
	afterProtocol = userPwd + 1;
    }
else if (retAuth)
    *retAuth = NULL;
afterProtocol = qEncode(afterProtocol);
*retProtocol = protocol;
*retAfterProtocol = afterProtocol;
*retColon = colon;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %r14
pushq $0x3a
popq %rsi
callq 0x6270
movq %rax, %r12
testq %rax, %rax
je 0x3a1e3
movq %rbp, 0x18(%rsp)
movq %r15, 0x8(%rsp)
movq %r12, %rbp
subq %r14, %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x1c2a3
movq %rax, 0x10(%rsp)
movslq %ebp, %rax
leaq (%r14,%rax), %rbp
leaq (%r14,%rax), %r15
decq %r15
incq %r15
cmpb $0x2f, 0x1(%rbp)
leaq 0x1(%rbp), %rbp
je 0x3a148
pushq $0x40
popq %rsi
movq %rbp, %rdi
callq 0x6270
testq %rax, %rax
je 0x3a1bc
movq %rax, %r14
testq %r13, %r13
je 0x3a194
movq %r14, %rcx
subq %r15, %rcx
leaq 0x20(%rsp), %r15
movl $0x400, %esi            # imm = 0x400
movq %r15, %rdi
movq %rbp, %rdx
callq 0x1fb32
movq %r15, %rdi
callq 0x3a1f8
movq %rax, (%r13)
pushq $0x2f
popq %rsi
movq %rbp, %rdi
callq 0x6270
testq %rax, %rax
jne 0x3a1af
movq %rbp, %rdi
callq 0x62d0
addq %rbp, %rax
leaq 0x1(%r14), %rcx
cmpq %rax, %r14
cmovbq %rcx, %rbp
jmp 0x3a1c6
testq %r13, %r13
je 0x3a1c6
andq $0x0, (%r13)
movq 0x8(%rsp), %r14
movq %rbp, %rdi
callq 0x3a1f8
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rdx
movq %rdx, (%rcx)
movq %rax, (%r14)
movq %r12, (%rbx)
addq $0x428, %rsp            # imm = 0x428
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: qEncode
static char *qEncode(char *input)
/* Do a simple encoding to convert input string into "normal" characters.
 * Abnormal letters, and '!' get converted into Q followed by two hexadecimal digits. */
{
/* First go through and figure out encoded size. */
int size = 0;
char *s, *d, c;
s = input;
while ((c = *s++) != 0)
    {
    if (qEscaped(c))
	size += 3;
    else
	size += 1;
    }

/* Allocate and fill in output. */
char *output = needMem(size+1);
s = input;
d = output;
while ((c = *s++) != 0)
    {
    if (qEscaped(c))
        {
	sprintf(d, "Q%02X", (unsigned)c);
	d += 3;
	}
    else
        *d++ = c;
    }
return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movq %rdi, %r15
movb (%r15), %al
testb %al, %al
je 0x3a22b
incq %r15
movsbl %al, %edi
callq 0x3c034
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal (%r14,%rcx,2), %r14d
incl %r14d
jmp 0x3a209
incl %r14d
movq %r14, %rdi
callq 0x28bb0
movq %rax, %r14
leaq 0x49e94(%rip), %r15     # 0x840d4
movq %rax, %r12
movsbl (%rbx), %ebp
testl %ebp, %ebp
je 0x3a278
incq %rbx
movsbl %bpl, %edi
callq 0x3c034
testl %eax, %eax
je 0x3a26f
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x6170
addq $0x3, %r12
jmp 0x3a243
movb %bpl, (%r12)
incq %r12
jmp 0x3a243
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: udcPathAndFileNames
void udcPathAndFileNames(struct udcFile *file, char *cacheDir, char *protocol, char *afterProtocol)
/* Initialize udcFile path and names */
{
if (cacheDir==NULL)
    return;
char *hashedAfterProtocol = longDirHash(afterProtocol);
int len = strlen(cacheDir) + 1 + strlen(protocol) + 1 + strlen(hashedAfterProtocol) + 1;
file->cacheDir = needMem(len);
safef(file->cacheDir, len, "%s/%s/%s", cacheDir, protocol, hashedAfterProtocol);

/* Create file names for bitmap and data portions. */
file->bitmapFileName = fileNameInCacheDir(file, bitmapName);
file->sparseFileName = fileNameInCacheDir(file, sparseDataName);
file->redirFileName = fileNameInCacheDir(file, redirName);
}

// Assembly:
testq %rsi, %rsi
je 0x3a3c1
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdi, %rbx
movq %rsi, (%rsp)
movq %rdx, 0x8(%rsp)
movq %rcx, %rdi
callq 0x62d0
movl %eax, %edi
callq 0x21bcc
movq %rax, %r13
movq %rax, 0x10(%rsp)
pushq $0x2f
popq %rbp
leaq 0x49ea2(%rip), %r14     # 0x84175
movq %r15, %rdi
movl %ebp, %esi
callq 0x6270
testq %rax, %rax
je 0x3a306
movq %rax, %r12
movb $0x0, (%rax)
movq %r13, %rdi
movq %r15, %rsi
callq 0x3c074
movq %r13, %rdi
movq %r14, %rsi
callq 0x21dda
incq %r12
movq %r12, %r15
jmp 0x3a2d3
movq %r13, %rdi
movq %r15, %rsi
callq 0x3c074
leaq 0x10(%rsp), %rdi
callq 0x21c26
movq %rax, %r12
movq (%rsp), %rbp
movq %rbp, %rdi
callq 0x62d0
movq %rax, %r14
movq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x62d0
movq %rax, %r15
movq %r12, %rdi
callq 0x62d0
addl %r14d, %r15d
addl %r15d, %eax
addl $0x3, %eax
movslq %eax, %r14
movq %r14, %rdi
callq 0x28bb0
movq %rax, 0x38(%rbx)
leaq 0x477a3(%rip), %rdx     # 0x81b07
movq %rax, %rdi
movl %r14d, %esi
movq %rbp, %rcx
movq %r13, %r8
movq %r12, %r9
xorl %eax, %eax
callq 0x1fab2
leaq 0x49d59(%rip), %rsi     # 0x840da
movq %rbx, %rdi
callq 0x3a3c2
movq %rax, 0x40(%rbx)
leaq 0x49d4d(%rip), %rsi     # 0x840e1
movq %rbx, %rdi
callq 0x3a3c2
movq %rax, 0x48(%rbx)
leaq 0x49d45(%rip), %rsi     # 0x840ec
movq %rbx, %rdi
callq 0x3a3c2
movq %rax, 0x50(%rbx)
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: udcProtocolNew
static struct udcProtocol *udcProtocolNew(char *upToColon)
/* Build up a new protocol around a string such as "http" or "local" */
{
struct udcProtocol *prot;
AllocVar(prot);
if (sameString(upToColon, "local"))
    {
    prot->fetchData = udcDataViaLocal;
    prot->fetchInfo = udcInfoViaLocal;
    prot->type = "local";
    }
else if (sameString(upToColon, "slow"))
    {
    prot->fetchData = udcDataViaSlow;
    prot->fetchInfo = udcInfoViaSlow;
    prot->type = "slow";
    }
else if (sameString(upToColon, "http") || sameString(upToColon, "https"))
    {
    prot->fetchData = udcDataViaHttpOrFtp;
    prot->fetchInfo = udcInfoViaHttp;
    prot->type = "http";
    }
else if (sameString(upToColon, "ftp"))
    {
    prot->fetchData = udcDataViaHttpOrFtp;
    prot->fetchInfo = udcInfoViaFtp;
    prot->type = "ftp";
    }
else if (sameString(upToColon, "transparent"))
    {
    prot->fetchData = udcDataViaTransparent;
    prot->fetchInfo = udcInfoViaTransparent;
    prot->type = "transparent";
    }
else
    {
    errAbort("Unrecognized protocol %s in udcProtNew", upToColon);
    }
return prot;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x28bb0
movq %rax, %rbx
leaq 0x4959b(%rip), %r15     # 0x840f2
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a50
testl %eax, %eax
je 0x3abec
leaq 0x49587(%rip), %r15     # 0x840f8
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a50
testl %eax, %eax
je 0x3ac14
leaq 0x46307(%rip), %r15     # 0x80e92
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a50
testl %eax, %eax
je 0x3ac00
leaq 0x462f6(%rip), %rsi     # 0x80e97
movq %r14, %rdi
callq 0x6a50
testl %eax, %eax
je 0x3ac00
leaq 0x49389(%rip), %r15     # 0x83f3d
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a50
testl %eax, %eax
je 0x3ac37
leaq 0x4916d(%rip), %r15     # 0x83d37
movq %r14, %rdi
movq %r15, %rsi
callq 0x6a50
testl %eax, %eax
je 0x3ac4b
leaq 0x4951d(%rip), %rdi     # 0x840fd
movq %r14, %rsi
xorl %eax, %eax
callq 0x223fb
jmp 0x3ac2e
leaq 0x14f0(%rip), %rax      # 0x3c0e3
movq %rax, 0x8(%rbx)
leaq 0x15a8(%rip), %rax      # 0x3c1a6
jmp 0x3ac26
leaq -0x144f(%rip), %rax     # 0x397b8
movq %rax, 0x8(%rbx)
leaq -0x10dc(%rip), %rax     # 0x39b36
jmp 0x3ac26
leaq 0x15eb(%rip), %rax      # 0x3c206
movq %rax, 0x8(%rbx)
leaq 0x1718(%rip), %rax      # 0x3c33e
movq %rax, 0x10(%rbx)
movq %r15, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq -0x1486(%rip), %rax     # 0x397b8
movq %rax, 0x8(%rbx)
leaq -0xe88(%rip), %rax      # 0x39dc1
jmp 0x3ac26
leaq 0x174f(%rip), %rax      # 0x3c3a1
movq %rax, 0x8(%rbx)
leaq 0x1765(%rip), %rax      # 0x3c3c2
jmp 0x3ac26
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: udcCacheAge
unsigned long udcCacheAge(char *url, char *cacheDir)
/* Return the age in seconds of the oldest cache file.  If a cache file is
 * missing, return the current time (seconds since the epoch). */
{
unsigned long now = clock1(), oldestTime = now;
if (cacheDir == NULL)
    cacheDir = udcDefaultDir();
struct slName *sl, *slList = udcFileCacheFiles(url, cacheDir);
if (slList == NULL)
    return now;
for (sl = slList;  sl != NULL;  sl = sl->next)
    if (endsWith(sl->name, bitmapName))
	{
	if (fileExists(sl->name))
	    oldestTime = min(fileModTime(sl->name), oldestTime);
	else
	    return now;
	}
return (now - oldestTime);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
callq 0x2ee4a
movq %rax, %rbx
testq %r14, %r14
jne 0x3ac84
movq 0x7a034(%rip), %r14     # 0xb4cb8
movq %r15, %rdi
movq %r14, %rsi
callq 0x3ad22
testq %rax, %rax
je 0x3ace5
movq %rax, %r14
leaq 0x4943c(%rip), %r15     # 0x840da
movq %rbx, %r12
testq %r14, %r14
je 0x3ace2
leaq 0x8(%r14), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x1de0f
testl %eax, %eax
je 0x3acdd
movq %r13, %rdi
callq 0x1f807
testl %eax, %eax
je 0x3ace5
movq %r13, %rdi
callq 0x2f28f
cmpq %r12, %rax
jae 0x3acdd
movq %r13, %rdi
callq 0x2f28f
movq %rax, %r12
movq (%r14), %r14
jmp 0x3aca1
subq %r12, %rbx
movq %rbx, %rax
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: udcFileOpen
struct udcFile *udcFileOpen(char *url, char *cacheDir)
/* Open up a cached file.  cacheDir may be null in which case udcDefaultDir() will be
 * used.  Abort if file doesn't exist. */
{
struct udcFile *udcFile = udcFileMayOpen(url, cacheDir);
if (udcFile == NULL)
    errAbort("Couldn't open %s", url);
return udcFile;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3a42e
movq %rax, %r14
testq %rax, %rax
jne 0x3ad17
leaq 0x46673(%rip), %rdi     # 0x81380
movq %rbx, %rsi
xorl %eax, %eax
callq 0x223fb
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: udcFileCacheFiles
struct slName *udcFileCacheFiles(char *url, char *cacheDir)
/* Return low-level list of files used in cache. */
{
char *protocol, *afterProtocol, *colon;
struct udcFile *file;
udcParseUrl(url, &protocol, &afterProtocol, &colon);
if (colon == NULL)
    return NULL;
AllocVar(file);
udcPathAndFileNames(file, cacheDir, protocol, afterProtocol);
struct slName *list = NULL;
slAddHead(&list, slNameNew(file->bitmapFileName));
slAddHead(&list, slNameNew(file->sparseFileName));
slAddHead(&list, slNameNew(file->redirFileName));
slReverse(&list);
freeMem(file->cacheDir);
freeMem(file->bitmapFileName);
freeMem(file->sparseFileName);
freeMem(file);
freeMem(protocol);
freeMem(afterProtocol);
return list;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r12
leaq 0x8(%rsp), %rsi
movq %rsp, %rdx
leaq 0x18(%rsp), %rbx
movq %rbx, %rcx
callq 0x3a284
cmpq $0x0, (%rbx)
je 0x3aded
movl $0x168, %edi            # imm = 0x168
callq 0x28bb0
movq %rax, %r15
movq 0x8(%rsp), %r14
movq (%rsp), %rbx
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3a28c
movq 0x40(%r15), %rdi
callq 0x1cb86
movq %rax, %r12
andq $0x0, (%rax)
movq 0x48(%r15), %rdi
callq 0x1cb86
movq %rax, %r13
movq %r12, (%rax)
movq 0x50(%r15), %rdi
callq 0x1cb86
movq %r13, (%rax)
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movq %r12, %rdi
callq 0x1c567
movq 0x38(%r15), %rdi
callq 0x28c2d
movq 0x40(%r15), %rdi
callq 0x28c2d
movq 0x48(%r15), %rdi
callq 0x28c2d
movq %r15, %rdi
callq 0x28c2d
movq %r14, %rdi
callq 0x28c2d
movq %rbx, %rdi
callq 0x28c2d
movq (%r12), %rax
jmp 0x3adef
xorl %eax, %eax
addq $0x20, %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: udcBitmapClose
static void udcBitmapClose(struct udcBitmap **pBits)
/* Free up resources associated with udcBitmap. */
{
struct udcBitmap *bits = *pBits;
if (bits != NULL)
    {
    mustCloseFd(&(bits->fd));
    freez(pBits);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3afb9
addq $0x3c, %rdi
callq 0x1f1b0
movq %rbx, %rdi
popq %rbx
jmp 0x28c3d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: udcPathToUrl
char *udcPathToUrl(const char *path, char *buf, size_t size, char *cacheDir)
/* Translate path into an URL, store in buf, return pointer to buf if successful
 * and NULL if not. */
{
if (cacheDir == NULL)
    cacheDir = udcDefaultDir();
int offset = 0;
if (startsWith(cacheDir, (char *)path))
    offset = strlen(cacheDir);
if (path[offset] == '/')
    offset++;
char protocol[16];
strncpy(protocol, path+offset, sizeof(protocol));
protocol[ArraySize(protocol)-1] = '\0';
char *p = strchr(protocol, '/');
if (p == NULL)
    {
    errAbort("unable to parse protocol (first non-'%s' directory) out of path '%s'\n",
	     cacheDir, path);
    return NULL;
    }
*p++ = '\0';
char afterProtocol[4096];
qDecode(path+1+strlen(protocol)+1, afterProtocol, sizeof(afterProtocol));
safef(buf, size, "%s://%s", protocol, afterProtocol);
return buf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1038, %rsp           # imm = 0x1038
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
testq %rcx, %rcx
jne 0x3afe4
movq 0x79cd4(%rip), %r12     # 0xb4cb8
movq %r12, %rdi
movq %r15, %rsi
callq 0x1db41
testl %eax, %eax
je 0x3affd
movq %r12, %rdi
callq 0x62d0
jmp 0x3afff
xorl %eax, %eax
cltq
xorl %ecx, %ecx
cmpb $0x2f, (%r15,%rax)
sete %cl
addl %ecx, %eax
movslq %eax, %rsi
addq %r15, %rsi
leaq 0x20(%rsp), %rbx
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x6380
movb $0x0, 0xf(%rbx)
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x6270
testq %rax, %rax
je 0x3b101
movq %r13, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movb $0x0, (%rax)
leaq 0x20(%rsp), %rdi
callq 0x62d0
addq %rax, %r15
addq $0x2, %r15
leaq 0x30(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %r15, %rdx
callq 0x1d6d3
leaq 0x49060(%rip), %r12     # 0x840d5
leaq 0xc(%rsp), %r13
movq %r14, %rbp
leaq 0x1(%r14), %rbx
movzbl (%r14), %eax
cmpl $0x51, %eax
je 0x3b099
testl %eax, %eax
je 0x3b0d6
movb %al, (%rbp)
incq %rbp
movq %rbx, %r14
jmp 0x3b07d
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x66d0
testl %eax, %eax
je 0x3b0bd
movb 0xc(%rsp), %al
movb %al, (%rbp)
incq %rbp
addq $0x3, %r14
jmp 0x3b07d
leaq 0x4929a(%rip), %rdi     # 0x8435e
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x223fb
movq %rbx, %r14
jmp 0x3b07d
movb $0x0, (%rbp)
leaq 0x48d4e(%rip), %rdx     # 0x83e2f
leaq 0x20(%rsp), %rcx
leaq 0x30(%rsp), %r8
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1fab2
jmp 0x3b117
leaq 0x48ce1(%rip), %rdi     # 0x83de9
xorl %ebx, %ebx
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x223fb
movq %rbx, %rax
addq $0x1038, %rsp           # imm = 0x1038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/icebert[P]pblat/lib/udc.c
// Function: udcSizeFromCache
long long int udcSizeFromCache(char *url, char *cacheDir)
/* Look up the file size from the local cache bitmap file, or -1 if there
 * is no cache for url. */
{
long long int ret = -1;
if (cacheDir == NULL)
    cacheDir = udcDefaultDir();
struct slName *sl, *slList = udcFileCacheFiles(url, cacheDir);
for (sl = slList;  sl != NULL;  sl = sl->next)
    if (endsWith(sl->name, bitmapName))
	{
	ret = udcSizeAndModTimeFromBitmap(sl->name, NULL);
	break;
	}
slNameFreeList(&slList);
return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
jne 0x3b140
movq 0x79b78(%rip), %rsi     # 0xb4cb8
callq 0x3ad22
movq %rax, %r14
movq %rax, (%rsp)
pushq $-0x1
popq %rbx
leaq 0x48f84(%rip), %r15     # 0x840da
testq %r14, %r14
je 0x3b180
leaq 0x8(%r14), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x1de0f
testl %eax, %eax
jne 0x3b173
movq (%r14), %r14
jmp 0x3b156
movq %r12, %rdi
xorl %esi, %esi
callq 0x3b197
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1c583
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: udcSizeAndModTimeFromBitmap
static long long int udcSizeAndModTimeFromBitmap(char *bitmapFileName, time_t *retTime)
/* Look up the file size from the local cache bitmap file, or -1 if there
 * is no cache for url. If retTime is non-null, store the remote update time in it. */
{
long long int ret = -1;
struct udcBitmap *bits = udcBitmapOpen(bitmapFileName);
if (bits != NULL)
    {
    ret = bits->fileSize;
    if (retTime)
	*retTime = bits->remoteUpdate;
    }
udcBitmapClose(&bits);
return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x3b30a
movq %rax, (%rsp)
testq %rax, %rax
je 0x3b1be
movq 0x18(%rax), %rbx
testq %r14, %r14
je 0x3b1c1
movq 0x10(%rax), %rax
movq %rax, (%r14)
jmp 0x3b1c1
pushq $-0x1
popq %rbx
movq %rsp, %rdi
callq 0x3af9b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq