LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/NedFreed[P]msglint/md5c.c
// Function: MD5Final
void MD5Final(unsigned char digest[16], MD5_CTX *context)
{
    unsigned char bits[8];
    unsigned int index, padLen;
    
    /* Save number of bits */
    Encode (bits, context->count, 8);
    
    /* Pad out to 56 mod 64.
     */
    index = (unsigned int)((context->count[0] >> 3) & 0x3f);
    padLen = (index < 56) ? (56 - index) : (120 - index);
    MD5Update (context, PADDING, padLen);
    
    /* Append length (before padding) */
    MD5Update (context, bits, 8);
    
    /* Store state in digest */
    Encode (digest, context->state, 16);
    
    /* Zeroize sensitive information.
     */
    memset(context, 0, sizeof (*context));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
movl $0x8, %edx
callq 0xdda0
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
shrq $0x3, %rax
andq $0x3f, %rax
movl %eax, -0x1c(%rbp)
cmpl $0x38, -0x1c(%rbp)
jae 0xdd3c
movl $0x38, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xdd47
movl $0x78, %eax
subl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x20(%rbp), %edx
leaq 0x6f15(%rip), %rsi      # 0x14c70
callq 0xc730
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x8, %edx
callq 0xc730
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x10, %edx
callq 0xdda0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x70, %edx
callq 0x20f0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/NedFreed[P]msglint/md5c.c
// Function: Encode
static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
{
    unsigned int i, j;
    
    for (i = 0, j = 0; j < len; i++, j += 4) {
	output[j] = (unsigned char)(input[i] & 0xff);
	output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
	output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
	output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0xde6f
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
andq $0xff, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x8, %rax
andq $0xff, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x10, %rax
andq $0xff, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movq (%rax,%rcx,8), %rax
shrq $0x18, %rax
andq $0xff, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0xddbd
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/NedFreed[P]msglint/md5c.c
// Function: Decode
static void Decode(UINT4 *output,
		   const unsigned char *input, unsigned int len)
{
    unsigned int i, j;
    
    for (i = 0, j = 0; j < len; i++, j += 4)
	output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
	    (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0xdf16
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shlq $0x8, %rax
orq %rax, %rdx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shlq $0x10, %rax
orq %rax, %rdx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
shlq $0x18, %rax
orq %rax, %rdx
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
jmp 0xde9d
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/eric-lo[P]3150/12-VirtualMemory/same_addr.c
// Function: main
int main(void) {
	int pid;
	pid = fork();
	printf("PID %d: %p.\n", getpid(), &pid);
	if(pid)
		wait(NULL);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
callq 0x1060
movl %eax, -0x8(%rbp)
callq 0x1030
movl %eax, %esi
leaq 0xe6f(%rip), %rdi       # 0x2004
leaq -0x8(%rbp), %rdx
movb $0x0, %al
callq 0x1040
cmpl $0x0, -0x8(%rbp)
je 0x11af
xorl %eax, %eax
movl %eax, %edi
callq 0x1050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_init
exq_data *exq_init()
{
	int i;
	exq_data *pExq;

	pExq = (exq_data*)malloc(sizeof(exq_data));
	
	for(i = 0; i < EXQ_HASH_SIZE; i++)
		pExq->pHash[i] = NULL;

	pExq->numColors = 0;
	pExq->optimized = 0;
	pExq->transparency = 1;
	pExq->numBitsPerChannel = 8;

	return pExq;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x86810, %edi          # imm = 0x86810
callq 0x11d0
movq %rax, -0x10(%rbp)
movl $0x0, -0x4(%rbp)
cmpl $0x10000, -0x4(%rbp)    # imm = 0x10000
jge 0x13e1
movq -0x10(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x13bd
movq -0x10(%rbp), %rax
movl $0x0, 0x86800(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x86808(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x8680c(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x86804(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_free
void exq_free(exq_data *pExq)
{
	int i;
	exq_histogram *pCur, *pNext;

	for(i = 0; i < EXQ_HASH_SIZE; i++)
		for(pCur = pExq->pHash[i]; pCur != NULL; pCur = pNext)
		{
			pNext = pCur->pNextInHash;
			free(pCur);
		}

	free(pExq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x10000, -0xc(%rbp)    # imm = 0x10000
jge 0x14af
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x14a2
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1040
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x147c
jmp 0x14a4
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1463
movq -0x8(%rbp), %rdi
callq 0x1040
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_make_hash
static unsigned int exq_make_hash(unsigned int rgba)
{
	rgba -= (rgba >> 13) | (rgba << 19);
	rgba -= (rgba >> 13) | (rgba << 19);
	rgba -= (rgba >> 13) | (rgba << 19);
	rgba -= (rgba >> 13) | (rgba << 19);
	rgba -= (rgba >> 13) | (rgba << 19);
	rgba &= EXQ_HASH_SIZE - 1;
	return rgba;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %ecx
shrl $0xd, %ecx
movl -0x4(%rbp), %eax
shll $0x13, %eax
orl %eax, %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %ecx
shrl $0xd, %ecx
movl -0x4(%rbp), %eax
shll $0x13, %eax
orl %eax, %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %ecx
shrl $0xd, %ecx
movl -0x4(%rbp), %eax
shll $0x13, %eax
orl %eax, %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %ecx
shrl $0xd, %ecx
movl -0x4(%rbp), %eax
shll $0x13, %eax
orl %eax, %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %ecx
shrl $0xd, %ecx
movl -0x4(%rbp), %eax
shll $0x13, %eax
orl %eax, %ecx
movl -0x4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_optimize_palette
void exq_optimize_palette(exq_data *pExq, int iter)
{
	int n, i, j;
	exq_histogram *pCur;

	pExq->optimized = 1;

	for(n = 0; n < iter; n++)
	{
		for(i = 0; i < pExq->numColors; i++)
			pExq->node[i].pHistogram = NULL;

		for(i = 0; i < EXQ_HASH_SIZE; i++)
			for(pCur = pExq->pHash[i]; pCur != NULL; pCur = pCur->pNextInHash)
			{
				j = exq_find_nearest_color(pExq, &pCur->color);
				pCur->pNext = pExq->node[j].pHistogram;
				pExq->node[j].pHistogram = pCur;
			}

		for(i = 0; i < pExq->numColors; i++)
			exq_sum_node(&pExq->node[i]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0x86808(%rax)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2aa4
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x86800(%rcx), %eax
jge 0x29be
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x14(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x58(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2987
movl $0x0, -0x14(%rbp)
cmpl $0x10000, -0x14(%rbp)   # imm = 0x10000
jge 0x2a58
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x2a48
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3180
movzbl %al, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x18(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movq 0x58(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x18(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x58(%rax)
movq -0x20(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x29e2
jmp 0x2a4a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x29c5
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x86800(%rcx), %eax
jge 0x2a94
movq -0x8(%rbp), %rdi
addq $0x80000, %rdi          # imm = 0x80000
movslq -0x14(%rbp), %rax
imulq $0x68, %rax, %rax
addq %rax, %rdi
callq 0x1c40
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2a5f
jmp 0x2a96
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2974
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_get_mean_error
exq_float exq_get_mean_error(exq_data *pExq)
{
	int i, n;
	exq_float err;

	n = 0;
	err = 0;
	for(i = 0; i < pExq->numColors; i++)
	{
		n += pExq->node[i].num;
		err += pExq->node[i].err;
	}

	return sqrt(err / n) * 256;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x86800(%rcx), %eax
jge 0x2b2e
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0xc(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movl 0x50(%rax), %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0xc(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movsd 0x48(%rax), %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2ad2
movsd -0x18(%rbp), %xmm0
cvtsi2sdl -0x10(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x1280
movsd 0x1e4df(%rip), %xmm1    # 0x21028
mulsd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_set_palette
void exq_set_palette(exq_data *pExq, unsigned char *pPal, int nColors)
{
	int i;

	pExq->numColors = nColors;

	for(i = 0; i < nColors; i++)
	{
		pExq->node[i].avg.r = *pPal++ * SCALE_R / 255.9f;
		pExq->node[i].avg.g = *pPal++ * SCALE_G / 255.9f;
		pExq->node[i].avg.b = *pPal++ * SCALE_B / 255.9f;
		pExq->node[i].avg.a = *pPal++ * SCALE_A / 255.9f;
	}

	pExq->optimized = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x86800(%rax)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x2f0d
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x1e217(%rip), %xmm1    # 0x21004
mulss %xmm1, %xmm0
movss 0x1e21b(%rip), %xmm1    # 0x21014
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x18(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x1e1d7(%rip), %xmm1    # 0x21010
mulss %xmm1, %xmm0
movss 0x1e1cf(%rip), %xmm1    # 0x21014
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x18(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x1e187(%rip), %xmm1    # 0x2100c
mulss %xmm1, %xmm0
movss 0x1e183(%rip), %xmm1    # 0x21014
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x18(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
cvtsi2ss %eax, %xmm0
movss 0x1e133(%rip), %xmm1    # 0x21004
mulss %xmm1, %xmm0
movss 0x1e137(%rip), %xmm1    # 0x21014
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x18(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x38(%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2dc3
movq -0x8(%rbp), %rax
movl $0x1, 0x86808(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_sort
void exq_sort(exq_histogram **ppHist, exq_float (*sortfunc)(const exq_histogram *pHist))
{
	exq_histogram *pLow, *pHigh, *pCur, *pNext;
	int n = 0;
	exq_float sum = 0;

	for(pCur = *ppHist; pCur != NULL; pCur = pCur->pNext)
	{
		n++;
		sum += sortfunc(pCur);
	}

	if(n < 2)
		return;

	sum /= n;

	pLow = pHigh = NULL;
	for(pCur = *ppHist; pCur != NULL; pCur = pNext)
	{
		pNext = pCur->pNext;
		if(sortfunc(pCur) < sum)
		{
			pCur->pNext = pLow;
			pLow = pCur;
		}
		else
		{
			pCur->pNext = pHigh;
			pHigh = pCur;
		}
	}

	if(pLow == NULL)
	{
		*ppHist = pHigh;
		return;
	}
	if(pHigh == NULL)
	{
		*ppHist = pLow;
		return;
	}

	exq_sort(&pLow, sortfunc);
	exq_sort(&pHigh, sortfunc);

	*ppHist = pLow;
	while(pLow->pNext != NULL)
		pLow = pLow->pNext;

	pLow->pNext = pHigh;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x34(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2f7c
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rdi
callq *%rax
addsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2f4a
cmpl $0x2, -0x34(%rbp)
jge 0x2f87
jmp 0x3088
cvtsi2sdl -0x34(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x3016
movq -0x28(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rdi
callq *%rax
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2ff6
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x300a
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x300c
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2fb5
cmpq $0x0, -0x18(%rbp)
jne 0x302a
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x3088
cmpq $0x0, -0x20(%rbp)
jne 0x303e
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x3088
movq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x2f20
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x2f20
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x307c
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x3063
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x60(%rax)
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_sort_by_dir
exq_float exq_sort_by_dir(const exq_histogram *pHist)
{
	return pHist->color.r * exq_sort_dir.r +
		pHist->color.g * exq_sort_dir.g +
		pHist->color.b * exq_sort_dir.b +
		pHist->color.a * exq_sort_dir.a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x25600(%rip), %xmm2    # 0x28728
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm1
mulsd 0x255f7(%rip), %xmm1    # 0x28730
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movsd 0x10(%rax), %xmm1
movsd 0x255e6(%rip), %xmm2    # 0x28738
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq -0x8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x255d5(%rip), %xmm2    # 0x28740
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_find_nearest_color
unsigned char exq_find_nearest_color(exq_data *pExq, exq_color *pColor)
{
	exq_float bestv;
	int besti, i;
	exq_color dif;

	bestv = 16;
	besti = 0;
	for(i = 0; i < pExq->numColors; i++)
	{
		dif.r = pColor->r - pExq->node[i].avg.r;
		dif.g = pColor->g - pExq->node[i].avg.g;
		dif.b = pColor->b - pExq->node[i].avg.b;
		dif.a = pColor->a - pExq->node[i].avg.a;
		if(dif.r*dif.r + dif.g*dif.g + dif.b*dif.b + dif.a*dif.a < bestv)
		{
			bestv = dif.r*dif.r + dif.g*dif.g + dif.b*dif.b + dif.a*dif.a;
			besti = i;
		}
	}

	return (unsigned char)besti;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd 0x1deb4(%rip), %xmm0    # 0x21048
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x86800(%rcx), %eax
jge 0x32ff
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x20(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
subsd 0x20(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x20(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x20(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
addq $0x80000, %rax          # imm = 0x80000
movslq -0x20(%rbp), %rcx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
subsd 0x38(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x40(%rbp), %xmm1
movsd -0x40(%rbp), %xmm2
movsd -0x38(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
movsd -0x30(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x28(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x32ef
movsd -0x40(%rbp), %xmm0
movsd -0x40(%rbp), %xmm2
movsd -0x38(%rbp), %xmm1
mulsd -0x38(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
movsd -0x28(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x32f1
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x31a7
movl -0x1c(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_find_histogram
exq_histogram *exq_find_histogram(exq_data *pExq, unsigned char *pCol)
{
	unsigned int hash;
	int r, g, b, a;
	exq_histogram *pCur;

	r = *pCol++; g = *pCol++; b = *pCol++; a = *pCol++;
	hash = exq_make_hash(((unsigned int)r) | (((unsigned int)g) << 8) | (((unsigned int)b) << 16) | (((unsigned int)a) << 24));

	pCur = pExq->pHash[hash];
	while(pCur != NULL && (pCur->ored != r || pCur->ogreen != g ||
		pCur->oblue != b || pCur->oalpha != a))
		pCur = pCur->pNextInHash;

	return pCur;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %eax
shll $0x8, %eax
orl %eax, %edi
movl -0x20(%rbp), %eax
shll $0x10, %eax
orl %eax, %edi
movl -0x24(%rbp), %eax
shll $0x18, %eax
orl %eax, %edi
callq 0x1840
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0x31(%rbp)
je 0x35ff
movq -0x30(%rbp), %rax
movzbl 0x20(%rax), %ecx
movb $0x1, %al
cmpl -0x18(%rbp), %ecx
movb %al, -0x32(%rbp)
jne 0x35f9
movq -0x30(%rbp), %rax
movzbl 0x21(%rax), %ecx
movb $0x1, %al
cmpl -0x1c(%rbp), %ecx
movb %al, -0x32(%rbp)
jne 0x35f9
movq -0x30(%rbp), %rax
movzbl 0x22(%rax), %ecx
movb $0x1, %al
cmpl -0x20(%rbp), %ecx
movb %al, -0x32(%rbp)
jne 0x35f9
movq -0x30(%rbp), %rax
movzbl 0x23(%rax), %eax
cmpl -0x24(%rbp), %eax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x3608
jmp 0x3616
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x35a6
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: read_s16_be
int read_s16_be(unsigned char *buf)
{
   unsigned tmp = read_u16_be(buf);
   int ret;
   if (tmp > 0x7FFF) {
      ret = -((int)0x10000 - (int)tmp);
   } else {
      ret = (int)tmp;
   }
   return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0xc(%rbp)
cmpl $0x7fff, -0xc(%rbp)     # imm = 0x7FFF
jbe 0x3ef9
movl $0x10000, %ecx          # imm = 0x10000
subl -0xc(%rbp), %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0x3eff
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: fprint_hex
void fprint_hex(FILE *fp, const unsigned char *buf, int length)
{
   int i;
   for (i = 0; i < length; i++) {
      fprint_byte(fp, buf[i]);
      fputc(' ', fp);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x4082
jmp 0x3fc8
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
cmpl $0xa, %eax
jge 0x3ff3
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
addl $0x30, %eax
movl %eax, -0x1c(%rbp)
jmp 0x400b
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
addl $0x41, %eax
subl $0xa, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x1140
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
cmpl $0xa, %eax
jge 0x4042
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
addl $0x30, %eax
movl %eax, -0x20(%rbp)
jmp 0x405a
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
addl $0x41, %eax
subl $0xa, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x1140
movq -0x8(%rbp), %rsi
movl $0x20, %edi
callq 0x1140
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x3fba
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: fprint_hex_source
void fprint_hex_source(FILE *fp, const unsigned char *buf, int length)
{
   int i;
   for (i = 0; i < length; i++) {
      if (i > 0) fputs(", ", fp);
      fputs("0x", fp);
      fprint_byte(fp, buf[i]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x418a
cmpl $0x0, -0x18(%rbp)
jle 0x40cc
movq -0x8(%rbp), %rsi
leaq 0x1cfb9(%rip), %rdi     # 0x21080
callq 0x1100
movq -0x8(%rbp), %rsi
leaq 0x1cfac(%rip), %rdi     # 0x21083
callq 0x1100
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
cmpl $0xa, %eax
jge 0x4107
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
addl $0x30, %eax
movl %eax, -0x1c(%rbp)
jmp 0x411f
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
addl $0x41, %eax
subl $0xa, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x1140
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
cmpl $0xa, %eax
jge 0x4156
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
addl $0x30, %eax
movl %eax, -0x20(%rbp)
jmp 0x416e
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
addl $0x41, %eax
subl $0xa, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
movq -0x8(%rbp), %rsi
callq 0x1140
jmp 0x417c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x40aa
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: swap_bytes
void swap_bytes(unsigned char *data, long length)
{
   long i;
   unsigned char tmp;
   for (i = 0; i < length; i += 2) {
      tmp = data[i];
      data[i] = data[i+1];
      data[i+1] = tmp;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x4220
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb 0x1(%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
movb -0x19(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x41d4
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: reverse_endian
void reverse_endian(unsigned char *data, long length)
{
   long i;
   unsigned char tmp;
   for (i = 0; i < length; i += 4) {
      tmp = data[i];
      data[i] = data[i+3];
      data[i+3] = tmp;
      tmp = data[i+1];
      data[i+1] = data[i+2];
      data[i+2] = tmp;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0x42c9
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb 0x3(%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, (%rax,%rcx)
movb -0x19(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, 0x3(%rax,%rcx)
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb 0x2(%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, 0x1(%rax,%rcx)
movb -0x19(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movb %dl, 0x2(%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x4244
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: touch_file
void touch_file(const char *filename)
{
   int fd;
   //fd = open(filename, O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666);
   fd = open(filename, O_WRONLY|O_CREAT, 0666);
   if (fd >= 0) {
      utime(filename, NULL);
      close(fd);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x41, %esi
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x1210
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x435f
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1030
movl -0xc(%rbp), %edi
callq 0x1120
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: read_file
long read_file(const char *file_name, unsigned char **data)
{
   FILE *in;
   unsigned char *in_buf = NULL;
   long file_size;
   long bytes_read;
   in = fopen(file_name, "rb");
   if (in == NULL) {
      return -1;
   }

   // allocate buffer to read from offset to end of file
   fseek(in, 0, SEEK_END);
   file_size = ftell(in);

   // sanity check
   if (file_size > 256*MB) {
      return -2;
   }

   in_buf = malloc(file_size);
   fseek(in, 0, SEEK_SET);

   // read bytes
   bytes_read = fread(in_buf, 1, file_size, in);
   if (bytes_read != file_size) {
      return -3;
   }

   fclose(in);
   *data = in_buf;
   return bytes_read;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1ccf3(%rip), %rsi     # 0x21086
callq 0x1220
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x43b0
movq $-0x1, -0x8(%rbp)
jmp 0x4449
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x11e0
movq -0x20(%rbp), %rdi
callq 0x1180
movq %rax, -0x30(%rbp)
cmpq $0x10000000, -0x30(%rbp) # imm = 0x10000000
jle 0x43e3
movq $-0x2, -0x8(%rbp)
jmp 0x4449
movq -0x30(%rbp), %rdi
callq 0x11d0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x11e0
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %esi
callq 0x1090
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x442d
movq $-0x3, -0x8(%rbp)
jmp 0x4449
movq -0x20(%rbp), %rdi
callq 0x10a0
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: write_file
long write_file(const char *file_name, unsigned char *data, long length)
{
   FILE *out;
   long bytes_written;
   // open output file
   out = fopen(file_name, "wb");
   if (out == NULL) {
      perror(file_name);
      return -1;
   }
   bytes_written = fwrite(data, 1, length, out);
   fclose(out);
   return bytes_written;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1cc0a(%rip), %rsi     # 0x21089
callq 0x1220
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x44a2
movq -0x10(%rbp), %rdi
callq 0x1230
movq $-0x1, -0x8(%rbp)
jmp 0x44cd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x1, %esi
callq 0x1270
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10a0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: generate_filename
void generate_filename(const char *in_name, char *out_name, char *extension)
{
   char tmp_name[FILENAME_MAX];
   int len;
   int i;
   strcpy(tmp_name, in_name);
   len = strlen(tmp_name);
   for (i = len - 1; i > 0; i--) {
      if (tmp_name[i] == '.') {
         break;
      }
   }
   if (i <= 0) {
      i = len;
   }
   tmp_name[i] = '\0';
   sprintf(out_name, "%s.%s", tmp_name, extension);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1030, %rsp           # imm = 0x1030
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x1020(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x1070
leaq -0x1020(%rbp), %rdi
callq 0x10c0
movl %eax, -0x1024(%rbp)
movl -0x1024(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1028(%rbp)
cmpl $0x0, -0x1028(%rbp)
jle 0x455a
movslq -0x1028(%rbp), %rax
movsbl -0x1020(%rbp,%rax), %eax
cmpl $0x2e, %eax
jne 0x4547
jmp 0x455a
jmp 0x4549
movl -0x1028(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1028(%rbp)
jmp 0x4528
cmpl $0x0, -0x1028(%rbp)
jg 0x456f
movl -0x1024(%rbp), %eax
movl %eax, -0x1028(%rbp)
movslq -0x1028(%rbp), %rax
movb $0x0, -0x1020(%rbp,%rax)
movq -0x10(%rbp), %rdi
leaq -0x1020(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0x1caf8(%rip), %rsi     # 0x2108c
movb $0x0, %al
callq 0x1250
addq $0x1030, %rsp           # imm = 0x1030
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: basename
char *basename(const char *name)
{
   const char *base = name;
   while (*name) {
      if (*name++ == '/') {
         base = name;
      }
   }
   return (char *)base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x45ea
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x45e8
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x45c0
movq -0x10(%rbp), %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: copy_file
long copy_file(const char *src_name, const char *dst_name)
{
   unsigned char *buf;
   long bytes_written;
   long bytes_read;

   bytes_read = read_file(src_name, &buf);

   if (bytes_read > 0) {
      bytes_written = write_file(dst_name, buf, bytes_read);
      if (bytes_written != bytes_read) {
         bytes_read = -1;
      }
      free(buf);
   }

   return bytes_read;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x4370
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jle 0x4698
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x4460
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x468f
movq $-0x1, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1040
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: dir_list_ext
void dir_list_ext(const char *dir, const char *extension, dir_list *list)
{
   char *pool;
   char *pool_ptr;
   struct dirent *entry;
   DIR *dfd;
   int idx;

   dfd = opendir(dir);
   if (dfd == NULL) {
      ERROR("Can't open '%s'\n", dir);
      exit(1);
   }

   pool = malloc(FILENAME_MAX * MAX_DIR_FILES);
   pool_ptr = pool;

   idx = 0;
   while ((entry = readdir(dfd)) != NULL && idx < MAX_DIR_FILES) {
      if (!extension || str_ends_with(entry->d_name, extension)) {
         sprintf(pool_ptr, "%s/%s", dir, entry->d_name);
         list->files[idx] = pool_ptr;
         pool_ptr += strlen(pool_ptr) + 1;
         idx++;
      }
   }
   list->count = idx;

   closedir(dfd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x46fe
movq 0x23911(%rip), %rax     # 0x27ff0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x1c9a5(%rip), %rsi     # 0x21092
movb $0x0, %al
callq 0x1170
movl $0x1, %edi
callq 0x1260
movl $0x80000, %edi          # imm = 0x80000
callq 0x11d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
callq 0x11c0
movq %rax, %rcx
movq %rcx, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x3d(%rbp)
je 0x4743
cmpl $0x80, -0x3c(%rbp)
setl %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0x474c
jmp 0x47ba
cmpq $0x0, -0x10(%rbp)
je 0x4769
movq -0x30(%rbp), %rdi
addq $0x13, %rdi
movq -0x10(%rbp), %rsi
callq 0x47e0
cmpl $0x0, %eax
je 0x47b5
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rdx
movq -0x30(%rbp), %rcx
addq $0x13, %rcx
leaq 0x1c923(%rip), %rsi     # 0x210a3
movb $0x0, %al
callq 0x1250
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rdi
callq 0x10c0
addq $0x1, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x471b
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x400(%rax)
movq -0x38(%rbp), %rdi
callq 0x1130
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/utils.c
// Function: str_ends_with
int str_ends_with(const char *str, const char *suffix)
{
   if (!str || !suffix) {
      return 0;
   }
   size_t len_str = strlen(str);
   size_t len_suffix = strlen(suffix);
   if (len_suffix > len_str) {
      return 0;
   }
   return (0 == strncmp(str + len_str - len_suffix, suffix, len_suffix));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x47fe
cmpq $0x0, -0x18(%rbp)
jne 0x4807
movl $0x0, -0x4(%rbp)
jmp 0x4863
movq -0x10(%rbp), %rdi
callq 0x10c0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x4834
movl $0x0, -0x4(%rbp)
jmp 0x4863
movq -0x10(%rbp), %rdi
addq -0x20(%rbp), %rdi
xorl %eax, %eax
subq -0x28(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1060
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/./stb/stb_image_write.h
// Function: stbi_write_hdr_core
static int stbi_write_hdr_core(stbi__write_context *s, int x, int y, int comp, float *data)
{
   if (y <= 0 || x <= 0 || data == NULL)
      return 0;
   else {
      // Each component is stored separately. Allocate scratch space for full output scanline.
      unsigned char *scratch = (unsigned char *) STBIW_MALLOC(x*4);
      int i, len;
      char buffer[128];
      char header[] = "#?RADIANCE\n# Written by stb_image_write.h\nFORMAT=32-bit_rle_rgbe\n";
      s->func(s->context, header, sizeof(header)-1);

#ifdef STBI_MSC_SECURE_CRT
      len = sprintf_s(buffer, "EXPOSURE=          1.0000000000000\n\n-Y %d +X %d\n", y, x);
#else
      len = sprintf(buffer, "EXPOSURE=          1.0000000000000\n\n-Y %d +X %d\n", y, x);
#endif
      s->func(s->context, buffer, len);

      for(i=0; i < y; i++)
         stbiw__write_hdr_scanline(s, x, comp, scratch, data + comp*x*(stbi__flip_vertically_on_write ? y-1-i : i)*x);
      STBIW_FREE(scratch);
      return 1;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
cmpl $0x0, -0x18(%rbp)
jle 0x6d7f
cmpl $0x0, -0x14(%rbp)
jle 0x6d7f
cmpq $0x0, -0x28(%rbp)
jne 0x6d8b
movl $0x0, -0x4(%rbp)
jmp 0x6ee3
movl -0x14(%rbp), %eax
shll $0x2, %eax
movslq %eax, %rdi
callq 0x11d0
movq %rax, -0x30(%rbp)
leaq -0x110(%rbp), %rdi
leaq 0x1d175(%rip), %rsi     # 0x23f20
movl $0x42, %edx
callq 0x11b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
leaq -0x110(%rbp), %rsi
movl $0x41, %edx
callq *%rax
leaq -0xc0(%rbp), %rdi
movl -0x18(%rbp), %edx
movl -0x14(%rbp), %ecx
leaq 0x1ce02(%rip), %rsi     # 0x23be8
movb $0x0, %al
callq 0x1250
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
leaq -0xc0(%rbp), %rsi
movl -0x38(%rbp), %edx
callq *%rax
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x6ed3
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x130(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x12c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x1c(%rbp), %eax
imull -0x14(%rbp), %eax
movl %eax, -0x114(%rbp)
cmpl $0x0, 0x218ff(%rip)     # 0x28764
je 0x6e78
movl -0x18(%rbp), %eax
subl $0x1, %eax
subl -0x34(%rbp), %eax
movl %eax, -0x13c(%rbp)
jmp 0x6e81
movl -0x34(%rbp), %eax
movl %eax, -0x13c(%rbp)
movq -0x128(%rbp), %rcx
movl -0x12c(%rbp), %edx
movl -0x130(%rbp), %esi
movq -0x138(%rbp), %rdi
movq -0x120(%rbp), %r8
movl -0x114(%rbp), %eax
movl -0x13c(%rbp), %r9d
imull %r9d, %eax
imull -0x14(%rbp), %eax
cltq
shlq $0x2, %rax
addq %rax, %r8
callq 0x6910
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6e12
movq -0x30(%rbp), %rdi
callq 0x1040
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/./stb/stb_image_write.h
// Function: stbi_write_png
STBIWDEF int stbi_write_png(char const *filename, int x, int y, int comp, const void *data, int stride_bytes)
{
   FILE *f;
   int len;
   unsigned char *png = stbi_write_png_to_mem((unsigned char *) data, stride_bytes, x, y, comp, &len);
   if (png == NULL) return 0;
#ifdef STBI_MSC_SECURE_CRT
   if (fopen_s(&f, filename, "wb"))
      f = NULL;
#else
   f = fopen(filename, "wb");
#endif
   if (!f) { STBIW_FREE(png); return 0; }
   fwrite(png, 1, len, f);
   fclose(f);
   STBIW_FREE(png);
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
leaq -0x3c(%rbp), %r9
callq 0x7dd0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x896b
movl $0x0, -0x4(%rbp)
jmp 0x89c7
movq -0x10(%rbp), %rdi
leaq 0x18713(%rip), %rsi     # 0x21089
callq 0x1220
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x8998
movq -0x48(%rbp), %rdi
callq 0x1040
movl $0x0, -0x4(%rbp)
jmp 0x89c7
movq -0x48(%rbp), %rdi
movslq -0x3c(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x1, %esi
callq 0x1270
movq -0x38(%rbp), %rdi
callq 0x10a0
movq -0x48(%rbp), %rdi
callq 0x1040
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/DavidSM64[P]n64graphics_ci/n64graphics_ci.c
// Function: rgba2png
int rgba2png(const char *png_filename, const rgba *img, int width, int height)
{
    int ret = 0;
    INFO("Saving RGBA %dx%d to \"%s\"\n", width, height, png_filename);

    // convert to format stb_image_write expects
    uint8_t *data = malloc(4 * width*height);
    if (data) {
        for (int j = 0; j < height; j++) {
            for (int i = 0; i < width; i++) {
                int idx = j*width + i;
                data[4 * idx] = img[idx].red;
                data[4 * idx + 1] = img[idx].green;
                data[4 * idx + 2] = img[idx].blue;
                data[4 * idx + 3] = img[idx].alpha;
            }
        }

        ret = stbi_write_png(png_filename, width, height, 4, data, 0);

        free(data);
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq 0x1e804(%rip), %rax     # 0x28748
cmpl $0x0, (%rax)
je 0x9f61
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rcx
leaq 0x18fea(%rip), %rdi     # 0x22f44
movb $0x0, %al
callq 0x10d0
movl -0x14(%rbp), %eax
shll $0x2, %eax
imull -0x18(%rbp), %eax
movslq %eax, %rdi
callq 0x11d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xa072
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xa04b
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xa03b
movl -0x2c(%rbp), %eax
imull -0x14(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb (%rax,%rcx,4), %dl
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb 0x1(%rax,%rcx,4), %dl
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb 0x2(%rax,%rcx,4), %dl
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movslq -0x34(%rbp), %rcx
movb 0x3(%rax,%rcx,4), %dl
movq -0x28(%rbp), %rax
movl -0x34(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x9f9c
jmp 0xa03d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x9f89
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %r8
movl $0x4, %ecx
xorl %r9d, %r9d
callq 0x8920
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1040
movl -0x1c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)