LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/sqlList.c
// Function: sqlStringDynamicArray
void sqlStringDynamicArray(char *s, char ***retArray, int *retSize)
/* Convert comma separated list of strings to an dynamically allocated
 * array, which should be freeMem()'d when done. As a speed option all
 * of the elements in the array are needMem()'d at the same time. This 
 * means that all the entries are free()'d by calling freeMem() on the
 * first element. For example:
 * sqlStringDynamicArray(s, &retArray, &retSize);
 * DoSomeFunction(retArray, retSize);
 * freeMem(retArray[0]);
 * freeMem(retArray);
 * Thread-safe. */
{
char **array = NULL;
int count = 0;
if (s)
    {
    count = countSeparatedItems(s, ',');
    if (count > 0)
	{
	AllocArray(array, count);
	count = 0;
	s = cloneString(s);
	for (;;)
	    {
	    char *e;
	    if (s == NULL || s[0] == 0)
		break;
	    e = strchr(s, ',');
	    if (e != NULL)
		*e++ = 0;
	    array[count++] = s;
	    s = e;
	    }
	}
    }
*retArray = array;
*retSize = count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x3d584
movq %rdi, %r12
movl $0x2c, %esi
callq 0x22578
xorl %r13d, %r13d
testl %eax, %eax
jle 0x3d58c
movl %eax, %edi
shlq $0x3, %rdi
callq 0x2de63
movq %rax, %r15
movq %r12, %rdi
callq 0x1feba
testq %rax, %rax
je 0x3d59b
movq %rax, %r12
cmpb $0x0, (%rax)
je 0x3d587
xorl %r13d, %r13d
movq %r12, %rdi
movl $0x2c, %esi
callq 0x6270
testq %rax, %rax
je 0x3d594
movb $0x0, (%rax)
movq %r12, (%r15,%r13,8)
movq %rax, %r12
incq %r12
incq %r13
cmpb $0x0, 0x1(%rax)
jne 0x3d55a
jmp 0x3d59b
xorl %r15d, %r15d
xorl %r13d, %r13d
jmp 0x3d59b
xorl %r15d, %r15d
movl %eax, %r13d
jmp 0x3d59b
movq %r12, (%r15,%r13,8)
incq %r13
movq %r15, (%r14)
movl %r13d, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/sqlList.c
// Function: sqlDoubleArrayToString
char *sqlDoubleArrayToString( double *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%f,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d5f8
movq %rax, %r14
movl %ebp, %r12d
xorl %r13d, %r13d
leaq 0x57225(%rip), %r15     # 0x94802
movsd (%rbx,%r13,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d5dd
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlFloatArrayToString
char *sqlFloatArrayToString( float *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%f,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d65f
movq %rax, %r14
movl %ebp, %r12d
xorl %r13d, %r13d
leaq 0x571c1(%rip), %r15     # 0x94802
xorps %xmm0, %xmm0
cvtss2sd (%rbx,%r13,4), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d641
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlUnsignedArrayToString
char *sqlUnsignedArrayToString( unsigned *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%u,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d6c1
movq %rax, %r14
movl %ebp, %r12d
leaq 0x57161(%rip), %r15     # 0x94806
xorl %r13d, %r13d
movl (%rbx,%r13,4), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d6a8
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlSignedArrayToString
char *sqlSignedArrayToString( int *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%d,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d723
movq %rax, %r14
movl %ebp, %r12d
leaq 0x50be0(%rip), %r15     # 0x8e2e7
xorl %r13d, %r13d
movl (%rbx,%r13,4), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d70a
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlShortArrayToString
char *sqlShortArrayToString( short *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%d,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d786
movq %rax, %r14
movl %ebp, %r12d
leaq 0x50b7e(%rip), %r15     # 0x8e2e7
xorl %r13d, %r13d
movswl (%rbx,%r13,2), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d76c
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlUshortArrayToString
char *sqlUshortArrayToString( unsigned short *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%u,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d7e9
movq %rax, %r14
movl %ebp, %r12d
leaq 0x5703a(%rip), %r15     # 0x94806
xorl %r13d, %r13d
movzwl (%rbx,%r13,2), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d7cf
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlByteArrayToString
char *sqlByteArrayToString( signed char *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%d,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d84c
movq %rax, %r14
movl %ebp, %r12d
leaq 0x50ab8(%rip), %r15     # 0x8e2e7
xorl %r13d, %r13d
movsbl (%rbx,%r13), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d832
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlUbyteArrayToString
char *sqlUbyteArrayToString( unsigned char *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%u,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d8af
movq %rax, %r14
movl %ebp, %r12d
leaq 0x56f74(%rip), %r15     # 0x94806
xorl %r13d, %r13d
movzbl (%rbx,%r13), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d895
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlCharArrayToString
char *sqlCharArrayToString( char *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%c,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d912
movq %rax, %r14
movl %ebp, %r12d
leaq 0x56f15(%rip), %r15     # 0x9480a
xorl %r13d, %r13d
movsbl (%rbx,%r13), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d8f8
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlLongLongArrayToString
char *sqlLongLongArrayToString( long long *array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%lld,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d974
movq %rax, %r14
movl %ebp, %r12d
leaq 0x56eb6(%rip), %r15     # 0x9480e
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d95b
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlStringArrayToString
char *sqlStringArrayToString( char **array, int arraySize)
{
int i;
struct dyString *string = newDyString(256);
for( i = 0 ; i < arraySize; i++ )
    {
    dyStringPrintf(string, "%s,", array[i]);
    }
return dyStringCannibalize(&string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x264e0
movq %rax, (%rsp)
testl %ebp, %ebp
jle 0x3d9d6
movq %rax, %r14
movl %ebp, %r12d
leaq 0x50fd7(%rip), %r15     # 0x8e991
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26883
incq %r13
cmpq %r13, %r12
jne 0x3d9bd
movq %rsp, %rdi
callq 0x2653c
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/sqlList.c
// Function: sqlGetOptQuoteString
static char *sqlGetOptQuoteString(char **pS)
/* Return string at *pS.  (Either quoted or not.)  Advance *pS. */
{
char *s = *pS;
char *e;
char c = *s;

if (c  == '"' || c == '\'')
    {
    s += 1;
    e = findStringEnd(s, c);
    *e++ = 0;
    if (*e++ != ',')
	errAbort("Expecting comma after string");
    }
else
    {
    e = strchr(s, ',');
    *e++ = 0;
    }
*pS = e;
return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movzbl (%r14), %ebp
cmpl $0x27, %ebp
je 0x3db51
cmpl $0x22, %ebp
jne 0x3dba7
movb 0x1(%r14), %al
incq %r14
movq %r14, %r12
cmpb %bpl, %al
je 0x3db85
leaq 0x56cef(%rip), %r15     # 0x94856
movq %r14, %r12
testb %al, %al
jne 0x3db78
movq %r15, %rdi
xorl %eax, %eax
callq 0x26e94
movb 0x1(%r12), %al
incq %r12
cmpb %bpl, %al
jne 0x3db6a
movb $0x0, (%r12)
leaq 0x2(%r12), %r15
cmpb $0x2c, 0x1(%r12)
je 0x3dbbd
leaq 0x56c9b(%rip), %rdi     # 0x94839
xorl %eax, %eax
callq 0x26e94
jmp 0x3dbbd
movq %r14, %rdi
movl $0x2c, %esi
callq 0x6270
movq %rax, %r15
movb $0x0, (%rax)
incq %r15
movq %r15, (%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/sqlList.c
// Function: buildSymHash
static struct hash *buildSymHash(char **values, boolean isEnum)
/* build a hash of values for either enum or set symbolic column */
{
struct hash *valHash = hashNew(0);
unsigned setVal = 1; /* not used for enum */
int iVal;
for (iVal = 0; values[iVal] != NULL; iVal++)
    {
    if (isEnum)
        hashAddInt(valHash, values[iVal], iVal);
    else
        {
        hashAddInt(valHash, values[iVal], setVal);
        setVal = setVal << 1;
        }
    }
return valHash;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %ebp
xorl %edi, %edi
movl $0x1, %esi
callq 0x294ea
movq %rax, %r15
movq (%r14), %rsi
testq %rsi, %rsi
je 0x3dc9e
xorl %r12d, %r12d
movq %r15, %rdi
testl %ebx, %ebx
je 0x3dc88
movl %r12d, %edx
callq 0x2941f
jmp 0x3dc91
movl %ebp, %edx
callq 0x2941f
addl %ebp, %ebp
movq 0x8(%r14,%r12,8), %rsi
incq %r12
testq %rsi, %rsi
jne 0x3dc77
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/sqlList.c
// Function: sqlSetParse
unsigned sqlSetParse(char *valStr, char **values, struct hash **valHashPtr)
/* parse a set column value */
{
if (*valHashPtr == NULL)
    *valHashPtr = buildSymHash(values, FALSE);
/* parse comma separated string */
unsigned value = 0;
char *val = strtok(valStr, ",");
while (val != NULL)
    {
    value |= hashIntVal(*valHashPtr, val);
    val = strtok(NULL, ",");
    }

return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
cmpq $0x0, (%rdx)
jne 0x3dcfd
movq %rsi, %rdi
xorl %esi, %esi
callq 0x3dc4b
movq %rax, (%rbx)
leaq 0x51da3(%rip), %rsi     # 0x8faa7
movq %r14, %rdi
callq 0x6be0
xorl %r14d, %r14d
testq %rax, %rax
je 0x3dd38
leaq 0x51d8c(%rip), %r15     # 0x8faa7
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x29352
orl %eax, %r14d
xorl %edi, %edi
movq %r15, %rsi
callq 0x6be0
testq %rax, %rax
jne 0x3dd1b
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/sqlList.c
// Function: sqlSetPrint
void sqlSetPrint(FILE *f, unsigned value, char **values)
/* print a set column value */
{
int iVal;
unsigned curVal = 1;
int cnt = 0;
for (iVal = 0; values[iVal] != NULL; iVal++, curVal = curVal << 1)
    {
    if (curVal & value)
        {
        if (cnt > 0)
            fputc(',', f);
        fputs(values[iVal], f);
        cnt++;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x3ddbf
movq %rdx, %rbx
movl %esi, %ebp
addq $0x8, %rbx
movl $0x1, %r15d
xorl %r12d, %r12d
testl %ebp, %r15d
je 0x3ddb0
testl %r12d, %r12d
jle 0x3dda5
movl $0x2c, %edi
movq %r14, %rsi
callq 0x6930
movq -0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x6810
incl %r12d
addl %r15d, %r15d
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x3dd8a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitWriteOne
void twoBitWriteOne(struct twoBit *twoBit, FILE *f)
/* Write out one twoBit sequence to binary file. 
 * Note this does not include the name, which is
 * stored only in index. */
{
writeOne(f, twoBit->size);
writeOne(f, twoBit->nBlockCount);
if (twoBit->nBlockCount > 0)
    {
    fwrite(twoBit->nStarts, sizeof(twoBit->nStarts[0]), 
    	twoBit->nBlockCount, f);
    fwrite(twoBit->nSizes, sizeof(twoBit->nSizes[0]), 
    	twoBit->nBlockCount, f);
    }
writeOne(f, twoBit->maskBlockCount);
if (twoBit->maskBlockCount > 0)
    {
    fwrite(twoBit->maskStarts, sizeof(twoBit->maskStarts[0]), 
    	twoBit->maskBlockCount, f);
    fwrite(twoBit->maskSizes, sizeof(twoBit->maskSizes[0]), 
    	twoBit->maskBlockCount, f);
    }
writeOne(f, twoBit->reserved);
mustWrite(f, twoBit->data, packedSize(twoBit->size));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x23138
leaq 0x1c(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x23138
movl 0x1c(%r14), %edx
testq %rdx, %rdx
je 0x3e0d8
movq 0x20(%r14), %rdi
movl $0x4, %esi
movq %rbx, %rcx
callq 0x6e70
movq 0x28(%r14), %rdi
movl 0x1c(%r14), %edx
movl $0x4, %esi
movq %rbx, %rcx
callq 0x6e70
leaq 0x30(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x23138
movl 0x30(%r14), %edx
testq %rdx, %rdx
je 0x3e118
movq 0x38(%r14), %rdi
movl $0x4, %esi
movq %rbx, %rcx
callq 0x6e70
movq 0x40(%r14), %rdi
movl 0x30(%r14), %edx
movl $0x4, %esi
movq %rbx, %rcx
callq 0x6e70
leaq 0x48(%r14), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x23138
movq 0x10(%r14), %rsi
movl 0x18(%r14), %eax
addl $0x3, %eax
sarl $0x2, %eax
movslq %eax, %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x23138
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitClose
void twoBitClose(struct twoBitFile **pTbf)
/* Free up resources associated with twoBitFile. */
{
struct twoBitFile *tbf = *pTbf;
if (tbf != NULL)
    {
    twoBitFree(&tbf->seqCache);
    freez(&tbf->fileName);
    (*tbf->ourClose)(&tbf->f);
    hashFree(&tbf->hash);
    /* The indexList is allocated out of the hash's memory pool. */
    bptFileClose(&tbf->bpt);
    freez(pTbf);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x3e35b
movq %rdi, %rbx
leaq 0x40(%r14), %rdi
callq 0x3e363
leaq 0x8(%r14), %rdi
callq 0x2e0b0
leaq 0x10(%r14), %rdi
callq *0x78(%r14)
leaq 0x30(%r14), %rdi
callq 0x298bd
addq $0x38, %r14
movq %r14, %rdi
callq 0x43155
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/twoBit.c
// Function: twoBitFree
void twoBitFree(struct twoBit **pTwoBit)
/* Free up a two bit structure. */
{
struct twoBit *twoBit = *pTwoBit;
if (twoBit != NULL)
    {
    freeMem(twoBit->nStarts);
    freeMem(twoBit->nSizes);
    freeMem(twoBit->maskStarts);
    freeMem(twoBit->maskSizes);
    freeMem(twoBit->data);
    freez(pTwoBit);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
testq %r14, %r14
je 0x3e3ae
movq %rdi, %rbx
movq 0x20(%r14), %rdi
callq 0x2e0a0
movq 0x28(%r14), %rdi
callq 0x2e0a0
movq 0x38(%r14), %rdi
callq 0x2e0a0
movq 0x40(%r14), %rdi
callq 0x2e0a0
movq 0x10(%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/twoBit.c
// Function: twoBitSigRead
boolean twoBitSigRead(struct twoBitFile *tbf, boolean *isSwapped)
/* read twoBit signature, return FALSE if not good 
 * set isSwapped to TRUE if twoBit file is byte swapped */
{
bits32 sig;

*isSwapped = FALSE;
(*tbf->ourMustRead)(tbf->f, &sig, sizeof(sig));
if (sig == twoBitSwapSig)
    *isSwapped = TRUE;
else if (sig != twoBitSig)
    return FALSE;

return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rax
movl $0x0, (%rsi)
movq 0x10(%rdi), %rdi
leaq 0x4(%rsp), %r14
movl $0x4, %edx
movq %r14, %rsi
callq *0x88(%rax)
movl (%r14), %ecx
cmpl $0x1a412743, %ecx       # imm = 0x1A412743
je 0x3e3f8
xorl %eax, %eax
cmpl $0x4327411a, %ecx       # imm = 0x4327411A
jne 0x3e3fd
movl $0x1, (%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitOpen
struct twoBitFile *twoBitOpen(char *fileName)
/* Open file, read in header and index.  
 * Squawk and die if there is a problem. */
{
boolean useUdc = FALSE;
if (hasProtocol(fileName))
    useUdc = TRUE;
struct twoBitFile *tbf = twoBitOpenReadHeader(fileName, useUdc);
struct twoBitIndex *index;
boolean isSwapped = tbf->isSwapped;
int i;
struct hash *hash;
void *f = tbf->f;

/* Read in index. */
hash = tbf->hash = hashNew(digitsBaseTwo(tbf->seqCount));
for (i=0; i<tbf->seqCount; ++i)
    {
    char name[256];
    if (!(*tbf->ourFastReadString)(f, name))
        errAbort("%s is truncated", fileName);
    lmAllocVar(hash->lm, index);
    if (tbf->version == 1)
        index->offset = (*tbf->ourReadBits64)(f, isSwapped);
    else
        index->offset = (*tbf->ourReadBits32)(f, isSwapped);
    hashAddSaveName(hash, name, index, &index->name);
    slAddHead(&tbf->indexList, index);
    }
slReverse(&tbf->indexList);
return tbf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
callq 0x31591
xorl %esi, %esi
testl %eax, %eax
setne %sil
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x3e517
movq %rax, %r14
movl 0x18(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x10(%r14), %r15
movl 0x20(%r14), %edi
callq 0x32789
movl %eax, %edi
movl $0x1, %esi
callq 0x294ea
movq %rax, 0x30(%r14)
cmpl $0x0, 0x20(%r14)
je 0x3e4f6
movq %rax, %r12
leaq 0x10(%rsp), %r13
xorl %ebp, %ebp
movq %r15, %rdi
movq %r13, %rsi
callq *0x80(%r14)
testl %eax, %eax
jne 0x3e493
leaq 0x56495(%rip), %rdi     # 0x9491c
movq 0x8(%rsp), %rsi
xorl %eax, %eax
callq 0x26e94
movq 0x20(%r12), %rdi
movl $0x18, %esi
callq 0x2c325
movq %rax, %rbx
cmpl $0x1, 0x1c(%r14)
jne 0x3e4b9
movq %r15, %rdi
movl 0x4(%rsp), %esi
callq *0x70(%r14)
jmp 0x3e4c6
movq %r15, %rdi
movl 0x4(%rsp), %esi
callq *0x68(%r14)
movl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rbx, %rcx
addq $0x8, %rcx
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x2929a
movq 0x28(%r14), %rax
movq %rax, (%rbx)
movq %rbx, 0x28(%r14)
incl %ebp
cmpl 0x20(%r14), %ebp
jb 0x3e46f
movq %r14, %rdi
addq $0x28, %rdi
callq 0x20173
movq %r14, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitOpenReadHeader
static struct twoBitFile *twoBitOpenReadHeader(char *fileName, boolean useUdc)
/* Open file, read in header but not index.  
 * Squawk and die if there is a problem. */
{
struct twoBitFile *tbf;
boolean isSwapped = FALSE;

tbf = getTbfAndOpen(fileName, useUdc);

/* Allocate header verify signature, and read in
 * the constant-length bits. */

if (!twoBitSigRead(tbf, &isSwapped))
    errAbort("%s doesn't have a valid twoBitSig", fileName);

tbf->isSwapped = isSwapped;
tbf->fileName = cloneString(fileName);
tbf->version = (*tbf->ourReadBits32)(tbf->f, isSwapped);
if ((tbf->version != 0) && (tbf->version != 1))
    {
    errAbort("Can only handle version 0 or version 1 of this file. This is version %d",
    	(int)tbf->version);
    }
tbf->seqCount = (*tbf->ourReadBits32)(tbf->f, isSwapped);
tbf->reserved = (*tbf->ourReadBits32)(tbf->f, isSwapped);
return tbf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3f042
movq %rax, %rbx
movq 0x10(%rax), %rdi
leaq 0x4(%rsp), %r15
movl $0x4, %edx
movq %r15, %rsi
callq *0x88(%rax)
movl (%r15), %eax
cmpl $0x4327411a, %eax       # imm = 0x4327411A
je 0x3e555
cmpl $0x1a412743, %eax       # imm = 0x1A412743
jne 0x3e55c
xorl %ebp, %ebp
jmp 0x3e56f
movl $0x1, %ebp
jmp 0x3e56f
leaq 0x564d0(%rip), %rdi     # 0x94a33
xorl %ebp, %ebp
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
movl %ebp, 0x18(%rbx)
movq %r14, %rdi
callq 0x1feba
movq %rax, 0x8(%rbx)
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq *0x68(%rbx)
movl %eax, 0x1c(%rbx)
cmpl $0x2, %eax
jb 0x3e59f
leaq 0x564bf(%rip), %rdi     # 0x94a55
movl %eax, %esi
xorl %eax, %eax
callq 0x26e94
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq *0x68(%rbx)
movl %eax, 0x20(%rbx)
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq *0x68(%rbx)
movl %eax, 0x24(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitOpenExternalBptIndex
struct twoBitFile *twoBitOpenExternalBptIndex(char *twoBitName, char *bptName)
/* Open file, read in header, but not regular index.  Instead use
 * bpt index.   Beware if you use this the indexList field will be NULL
 * as will the hash. */
{
struct twoBitFile *tbf = twoBitOpenReadHeader(twoBitName, FALSE);
tbf->bpt = bptFileOpen(bptName);
if (tbf->seqCount != tbf->bpt->itemCount)
    errAbort("%s and %s don't have same number of sequences!", twoBitName, bptName);
return tbf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
xorl %esi, %esi
callq 0x3e517
movq %rax, %r14
movq %rbx, %rdi
callq 0x43122
movq %rax, 0x38(%r14)
movl 0x20(%r14), %ecx
cmpq %rcx, 0x28(%rax)
je 0x3e604
leaq 0x56335(%rip), %rdi     # 0x9492c
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x26e94
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitOneFromFile
struct twoBit *twoBitOneFromFile(struct twoBitFile *tbf, char *name)
/* Get single sequence as two bit. */
{
struct twoBit *twoBit = readTwoBitSeqHeader(tbf, name);
bits32 packByteCount;
void *f = tbf->f;

/* Read in data. */
packByteCount = packedSize(twoBit->size);
twoBit->data = needLargeMem(packByteCount);
(*tbf->ourMustRead)(f, twoBit->data, packByteCount);

return twoBit;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3e65a
movq %rax, %r14
movq 0x10(%rbx), %r15
movl 0x18(%rax), %r12d
addl $0x3, %r12d
sarl $0x2, %r12d
movq %r12, %rdi
callq 0x2ddfc
movq %rax, 0x10(%r14)
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq *0x88(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: readTwoBitSeqHeader
static struct twoBit *readTwoBitSeqHeader(struct twoBitFile *tbf, char *name)
/* read a sequence header, nBlocks and maskBlocks from a twoBit file,
 * leaving file pointer at data block */
{
boolean isSwapped = tbf->isSwapped;
struct twoBit *twoBit;
AllocVar(twoBit);
twoBit->name = cloneString(name);
void *f = tbf->f;

/* Find offset in index and seek to it */
twoBitSeekTo(tbf, name);

/* Read in seqSize. */
twoBit->size = (*tbf->ourReadBits32)(f, isSwapped);

/* Read in blocks of N. */
readBlockCoords(tbf, isSwapped, &(twoBit->nBlockCount),
		&(twoBit->nStarts), &(twoBit->nSizes));

/* Read in masked blocks. */
readBlockCoords(tbf, isSwapped, &(twoBit->maskBlockCount),
		&(twoBit->maskStarts), &(twoBit->maskSizes));

/* Reserved word. */
twoBit->reserved = (*tbf->ourReadBits32)(f, isSwapped);

return twoBit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %rbx
movl 0x18(%rdi), %ebp
movl $0x50, %edi
callq 0x2dff4
movq %rax, %r14
movq %r12, %rdi
callq 0x1feba
movq %rax, 0x8(%r14)
movq 0x10(%rbx), %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3ec2d
movq %r15, %rdi
movl %ebp, %esi
callq *0x68(%rbx)
movl %eax, 0x18(%r14)
leaq 0x1c(%r14), %rdx
leaq 0x20(%r14), %rcx
leaq 0x28(%r14), %r8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f719
leaq 0x30(%r14), %rdx
leaq 0x38(%r14), %rcx
leaq 0x40(%r14), %r8
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f719
movq %r15, %rdi
movl %ebp, %esi
callq *0x68(%rbx)
movl %eax, 0x48(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitFromOpenFile
struct twoBit *twoBitFromOpenFile(struct twoBitFile *tbf)
/* Get twoBit list of all sequences in twoBit file. */
{
struct twoBitIndex *index;
struct twoBit *twoBitList = NULL;

for (index = tbf->indexList; index != NULL; index = index->next)
    {
    struct twoBit *twoBit = twoBitOneFromFile(tbf, index->name);
    slAddHead(&twoBitList, twoBit);
    }

twoBitClose(&tbf);
slReverse(&twoBitList);
return twoBitList;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
movq $0x0, (%rsp)
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0x3e726
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x3e60d
movq %r15, (%rax)
movq %rax, (%rsp)
movq (%r14), %r14
movq %rax, %r15
testq %r14, %r14
jne 0x3e708
leaq 0x8(%rsp), %rdi
callq 0x3e30e
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x20173
movq (%rbx), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/twoBit.c
// Function: twoBitFreeList
void twoBitFreeList(struct twoBit **pList)
/* Free a list of dynamically allocated twoBit's */
{
struct twoBit *el, *next;

for (el = *pList; el != NULL; el = next)
    {
    next = el->next;
    twoBitFree(&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 0x3e78a
leaq 0x8(%rsp), %r14
movq (%r15), %r15
movq %r14, %rdi
callq 0x3e363
movq %r15, 0x8(%rsp)
testq %r15, %r15
jne 0x3e775
movq $0x0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3ec97
movq %r14, %rdi
callq 0x62d0
leaq 0xc(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
movl $0x4, %r8d
callq 0x4325c
testl %eax, %eax
jne 0x3ec82
movq 0x38(%rbx), %rax
movq 0x8(%rax), %rdx
leaq 0x55e25(%rip), %rdi     # 0x94a9d
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
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 0x293ad
movq %rax, %r15
testq %rax, %rax
jne 0x3ecc0
movq 0x8(%rbx), %rdx
leaq 0x55de7(%rip), %rdi     # 0x94a9d
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
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_O3/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 0x28(%rdi), %r15
testq %r15, %r15
je 0x3ed11
movq %rdi, %r14
xorl %ebx, %ebx
movq 0x10(%r14), %rdi
movq 0x10(%r15), %rsi
callq *0x50(%r14)
movq 0x10(%r14), %rdi
movl 0x18(%r14), %esi
callq *0x68(%r14)
movl %eax, %eax
addq %rax, %rbx
movq (%r15), %r15
testq %r15, %r15
jne 0x3ecea
jmp 0x3ed13
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3edef
movq %rax, %r14
movq %rax, 0x18(%rsp)
movq (%rax), %rdi
callq 0x3e405
movq %rax, %rbx
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x3ed89
xorl %r15d, %r15d
movq 0x8(%r14), %rsi
movl 0x10(%r14), %edx
movl 0x14(%r14), %ecx
movq %rbx, %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x3e79b
movq %r15, (%rax)
movq %rax, 0x8(%rsp)
movq (%r14), %r14
movq %rax, %r15
testq %r14, %r14
jne 0x3ed57
jmp 0x3edc1
movq 0x28(%rbx), %r14
testq %r14, %r14
je 0x3edc1
xorl %r15d, %r15d
movq 0x8(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x3e79b
movq %r15, (%rax)
movq %rax, 0x8(%rsp)
movq (%r14), %r14
movq %rax, %r15
testq %r14, %r14
jne 0x3ed95
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x20173
leaq 0x10(%rsp), %rdi
callq 0x3e30e
leaq 0x18(%rsp), %rdi
callq 0x3eef9
movq (%rbx), %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x10, %edi
callq 0x2dff4
movq %rax, %rbx
movq %rax, (%rsp)
movq %r14, %rdi
callq 0x1feba
movq %rax, %r15
movq %rax, (%rbx)
movq %rax, %rdi
movl $0x2f, %esi
callq 0x67c0
leaq 0x1(%rax), %rdi
testq %rax, %rax
cmoveq %r15, %rdi
movl $0x3a, %esi
callq 0x6270
testq %rax, %rax
je 0x3eed1
movq %rax, %r14
movb $0x0, (%rax)
movq (%rbx), %rdi
callq 0x3efc9
testl %eax, %eax
je 0x3eedd
incq %r14
leaq 0x50c40(%rip), %r12     # 0x8faa7
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x22667
movl %eax, %ebp
movslq %eax, %r13
leaq (,%r13,8), %rdi
callq 0x2de63
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
movl %r13d, %ecx
callq 0x22667
testl %r13d, %r13d
jle 0x3eec3
movl %ebp, %r14d
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x3f2ba
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x8(%rbx)
incq %r12
cmpq %r12, %r14
jne 0x3eea7
movq %rbx, %rdi
addq $0x8, %rdi
callq 0x20173
jmp 0x3eee7
movq %r15, %rdi
callq 0x3efc9
testl %eax, %eax
jne 0x3eee7
movq %rsp, %rdi
callq 0x3eef9
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_O3/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 0x3ef59
movq %rdi, %rbx
leaq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x2011b
testq %rax, %rax
je 0x3ef42
movq %rax, %r12
movq 0x8(%r12), %rdi
callq 0x2e0a0
movq %r12, %rdi
callq 0x2e0a0
movq %r15, %rdi
callq 0x2011b
movq %rax, %r12
testq %rax, %rax
jne 0x3ef20
movq (%r14), %rdi
callq 0x2e0a0
movq %r14, %rdi
callq 0x2e0a0
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3e405
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x28(%rax), %rbx
testq %rbx, %rbx
je 0x3efa7
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
callq 0x20830
movq %r14, (%rax)
movq %rax, 0x8(%rsp)
movq (%rbx), %rbx
movq %rax, %r14
testq %rbx, %rbx
jne 0x3ef8b
leaq 0x10(%rsp), %rdi
callq 0x3e30e
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x20173
movq (%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x31591
movl $0x1, %ebp
testl %eax, %eax
jne 0x3efef
movq %rbx, %rdi
callq 0x355cf
xorl %ebp, %ebp
testl %eax, %eax
je 0x3f035
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f042
movq %rax, %rbx
leaq 0x10(%rax), %r14
movq 0x10(%rax), %rdi
leaq 0x4(%rsp), %r15
movl $0x4, %edx
movq %r15, %rsi
callq *0x88(%rax)
movl (%r15), %eax
cmpl $0x4327411a, %eax       # imm = 0x4327411A
sete %cl
cmpl $0x1a412743, %eax       # imm = 0x1A412743
sete %al
orb %cl, %al
movzbl %al, %ebp
movq %r14, %rdi
callq *0x78(%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2dff4
movq %rax, %rbx
testl %ebp, %ebp
je 0x3f096
leaq 0x7a4(%rip), %rax       # 0x3f807
leaq 0x798(%rip), %rcx       # 0x3f802
leaq 0x78c(%rip), %rdx       # 0x3f7fd
leaq 0x780(%rip), %rsi       # 0x3f7f8
leaq 0x774(%rip), %rdi       # 0x3f7f3
leaq 0x768(%rip), %r8        # 0x3f7ee
leaq 0x75c(%rip), %r9        # 0x3f7e9
leaq 0x750(%rip), %r10       # 0x3f7e4
jmp 0x3f0ce
leaq 0x799(%rip), %rax       # 0x3f836
leaq 0x78d(%rip), %rcx       # 0x3f831
leaq 0x781(%rip), %rdx       # 0x3f82c
leaq 0x775(%rip), %rsi       # 0x3f827
leaq 0x769(%rip), %rdi       # 0x3f822
leaq 0x75d(%rip), %r8        # 0x3f81d
leaq 0x74f(%rip), %r9        # 0x3f816
leaq 0x73e(%rip), %r10       # 0x3f80c
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 0x3f104
movq %r14, %rdi
xorl %esi, %esi
callq 0x40ee5
jmp 0x3f113
leaq 0x4f33b(%rip), %rsi     # 0x8e446
movq %r14, %rdi
callq 0x23072
movq %rax, 0x10(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3f13f
movq %r12, (%rsi)
testq %r15, %r15
je 0x3f14b
movq $0x0, (%r15)
testq %r14, %r14
je 0x3f157
movl $0x0, (%r14)
testq %rbx, %rbx
je 0x3f162
movl $0x0, (%rbx)
movq %r12, %rdi
movl $0x2f, %esi
callq 0x67c0
leaq 0x1(%rax), %rdi
testq %rax, %rax
cmoveq %r12, %rdi
movl $0x3a, %esi
callq 0x6270
testq %rax, %rax
je 0x3f210
movq %rax, %rcx
incq %rax
movb $0x0, (%rcx)
testq %r15, %r15
je 0x3f19e
movq %rax, (%r15)
movq %rax, %rdi
movl $0x3a, %esi
callq 0x6270
movl $0x1, %ebp
testq %rax, %rax
je 0x3f21b
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 0x3f21b
testq %r14, %r14
je 0x3f1df
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 0x3f214
movb %cl, %bpl
jmp 0x3f21b
xorl %ebp, %ebp
jmp 0x3f21b
movl %eax, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/icebert[P]pblat/lib/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 0x1feba
movq %rax, %rbx
movq %rsp, %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rax, %rdi
callq 0x3f11f
testl %eax, %eax
je 0x3f263
movq (%rsp), %rdi
callq 0x3efc9
movl %eax, %ebp
jmp 0x3f265
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x2e0a0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3edef
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
xorl %ebx, %ebx
testq %rax, %rax
setne %bl
callq 0x3eef9
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movl $0x18, %edi
callq 0x2dff4
movq %rax, %rbx
movq %r14, %rdi
callq 0x1feba
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movl $0x3a, %esi
callq 0x6270
testq %rax, %rax
je 0x3f347
movq %rax, %rdi
incq %rdi
movb $0x0, (%rax)
leaq 0x8(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x6a60
movl %eax, 0x10(%rbx)
movq (%r15), %rdi
cmpb $0x2d, (%rdi)
jne 0x3f336
incq %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x6a60
movl %eax, 0x14(%rbx)
movq (%r15), %rcx
cmpb $0x0, (%rcx)
jne 0x3f336
cmpl %eax, 0x10(%rbx)
jbe 0x3f347
leaq 0x55770(%rip), %rdi     # 0x94aad
movq %r14, %rsi
xorl %eax, %eax
callq 0x26e94
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x10, %rsp
movq %rdi, %r15
movq %rsi, %rdi
movl $0x1, %esi
callq 0x2a550
movq %rax, %r14
movq %rax, 0x8(%rsp)
movl $0x10, %edi
callq 0x2dff4
movq %rax, %rbx
movq %r15, %rdi
callq 0x1feba
movq %rax, (%rbx)
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2b2c6
testl %eax, %eax
je 0x3f3ca
movq %rsp, %r15
movq (%rsp), %rdi
callq 0x22a74
movq %rax, %rdi
callq 0x3f2ba
movq 0x8(%rbx), %rcx
movq %rcx, (%rax)
movq %rax, 0x8(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2b2c6
testl %eax, %eax
jne 0x3f39f
movq %rbx, %rdi
addq $0x8, %rdi
callq 0x20173
leaq 0x8(%rsp), %rdi
callq 0x2ae73
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq