LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: getSAlms_DA
void getSAlms_DA(uint_t *SA, int_t* DA,
  int_t *s, 
  uint_t *s1, uint_t n, 
  uint_t n1, int level, int cs, uint_t separator) {
  uint_t i, j, cur_t, succ_t;

/**/
  int_t k=0;
  for(i=n-2; i>0; i--) if(chr(i)==separator)k++;
  DA[n1-1]=k;
/**/
  
  j=n1-1; s1[j--]=n-1;
  succ_t=0; // s[n-2] must be L-type
  for(i=n-2; i>0; i--) {
	  
	if(chr(i)==separator)k--;

    cur_t=(chr(i-1)<chr(i) ||
          (chr(i-1)==chr(i) && succ_t==1))?1:0;
    if(cur_t==0 && succ_t==1){//LMS-suffix
		s1[j]=i;
		DA[j]=k;
		j--;
	}
    succ_t=cur_t;
  }
  
}

// Assembly:
movq %r8, %rax
addq $-0x2, %rax
je 0x8d1e
pushq %r15
pushq %r14
pushq %rbx
movq 0x30(%rsp), %rdi
movl 0x28(%rsp), %r10d
xorl %r11d, %r11d
movq %rax, %rbx
cmpl $0x8, %r10d
jne 0x8c83
movq (%rdx,%rbx,8), %r14
jmp 0x8c88
movzbl (%rdx,%rbx), %r14d
xorl %r15d, %r15d
cmpq %rdi, %r14
sete %r15b
addq %r15, %r11
decq %rbx
jne 0x8c77
decq %r8
movq %r11, -0x8(%rsi,%r9,8)
movq %r8, -0x8(%rcx,%r9,8)
testq %rax, %rax
je 0x8d18
addq $-0x2, %r9
xorl %r8d, %r8d
cmpl $0x8, %r10d
jne 0x8cd6
movq -0x8(%rdx,%rax,8), %r15
movq (%rdx,%rax,8), %r14
xorl %ebx, %ebx
cmpq %rdi, %r14
sete %bl
subq %rbx, %r11
movb $0x1, %bl
cmpq %r14, %r15
jge 0x8cf3
jmp 0x8d10
movzbl (%rdx,%rax), %r14d
xorl %ebx, %ebx
cmpq %rdi, %r14
sete %bl
subq %rbx, %r11
movzbl -0x1(%rdx,%rax), %r15d
movb $0x1, %bl
cmpb %r14b, %r15b
jb 0x8d10
cmpq %r14, %r15
sete %bl
andb %r8b, %bl
andb $0x1, %r8b
cmpb %bl, %r8b
je 0x8d10
movq %rax, (%rcx,%r9,8)
movq %r11, (%rsi,%r9,8)
decq %r9
movl %ebx, %r8d
decq %rax
jne 0x8cb3
popq %rbx
popq %r14
popq %r15
retq
movq $0x0, -0x8(%rsi,%r9,8)
decq %r8
movq %r8, -0x8(%rcx,%r9,8)
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: gsacak
int gsacak(unsigned char *s, uint_t *SA, int_t *LCP, int_t *DA, uint_t n){
  if((s == NULL) || (SA == NULL) || (n < 0)) return -1;

  if((LCP == NULL) && (DA == NULL))
	return gSACA_K((uint_t*)s, SA, n, 256, sizeof(char), 1, 0);
  else if (DA == NULL)
	return gSACA_K_LCP((uint_t*)s, SA, LCP, n, 256, sizeof(char), 1, 0);
  else if (LCP == NULL)
	return gSACA_K_DA((uint_t*)s, SA, DA, n, 256, sizeof(char), 1, 0);
  else
	return gSACA_K_LCP_DA((uint_t*)s, SA, LCP, DA, n, 256, sizeof(char), 1, 0);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %r9b
orb %al, %r9b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x9f14
pushq %rax
movq %rdx, %rax
orq %rcx, %rax
jne 0x9eb2
subq $0x8, %rsp
movl $0x1, %r9d
movq %r8, %rdx
movl $0x100, %ecx            # imm = 0x100
movl $0x1, %r8d
pushq $0x0
callq 0x90f8
jmp 0x9f0c
testq %rcx, %rcx
je 0x9ed7
testq %rdx, %rdx
je 0x9ef1
subq $0x8, %rsp
movl $0x100, %r9d            # imm = 0x100
pushq $0x0
pushq $0x1
pushq $0x1
callq 0x9a5e
addq $0x20, %rsp
jmp 0x9f10
movq %r8, %rcx
movl $0x100, %r8d            # imm = 0x100
movl $0x1, %r9d
pushq $0x0
pushq $0x1
callq 0x939f
jmp 0x9f0c
movq %rcx, %rdx
movq %r8, %rcx
movl $0x100, %r8d            # imm = 0x100
movl $0x1, %r9d
pushq $0x0
pushq $0x1
callq 0x96e5
addq $0x10, %rsp
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: gsacak_int
int gsacak_int(uint_t *s, uint_t *SA, int_t *LCP, int_t *DA, uint_t n, uint_t k){
  if((s == NULL) || (SA == NULL) || (n < 0)) return -1;
  
  if((LCP == NULL) && (DA == NULL))
	return gSACA_K((uint_t*)s, SA, n, k, sizeof(int_t), 1, 0);
  else if (DA == NULL)
	return gSACA_K_LCP((uint_t*)s, SA, LCP, n, k, sizeof(int_t), 1, 0);
  else if (LCP == NULL)
	return gSACA_K_DA((uint_t*)s, SA, DA, n, k, sizeof(int_t), 1, 0);
  else
	return gSACA_K_LCP_DA((uint_t*)s, SA, LCP, DA, n, k, sizeof(int_t), 1, 0);
}

// Assembly:
movq %r9, %r10
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %r9b
orb %al, %r9b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x9fb4
pushq %rax
movq %rdx, %rax
orq %rcx, %rax
jne 0x9f5b
subq $0x8, %rsp
movl $0x1, %r9d
movq %r8, %rdx
movl %r10d, %ecx
movl $0x8, %r8d
pushq $0x0
callq 0x90f8
jmp 0x9fac
testq %rcx, %rcx
je 0x9f7d
testq %rdx, %rdx
je 0x9f94
subq $0x8, %rsp
movl %r10d, %r9d
pushq $0x0
pushq $0x1
pushq $0x8
callq 0x9a5e
addq $0x20, %rsp
jmp 0x9fb0
movq %r8, %rcx
movl %r10d, %r8d
movl $0x8, %r9d
pushq $0x0
pushq $0x1
callq 0x939f
jmp 0x9fac
movq %rcx, %rdx
movq %r8, %rcx
movl %r10d, %r8d
movl $0x8, %r9d
pushq $0x0
pushq $0x1
callq 0x96e5
addq $0x10, %rsp
addq $0x8, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/malloc_count.c
// Function: free
extern void free(void* ptr)
{
    size_t size;

    if (!ptr) return;   /* free(NULL) is no operation */

    if ((char*)ptr >= init_heap &&
        (char*)ptr <= init_heap + init_heap_use)
    {
        if (log_operations_init_heap) {
            fprintf(stderr, PPREFIX "free(%p)   on init heap\n", ptr);
        }
        return;
    }

    if (!real_free) {
        fprintf(stderr, PPREFIX
                "free(%p) outside init heap and without real_free !!!\n", ptr);
        return;
    }

    ptr = (char*)ptr - alignment;

    if (*(size_t*)((char*)ptr + alignment - sizeof(size_t)) != sentinel) {
        fprintf(stderr, PPREFIX
                "free(%p) has no sentinel !!! memory corruption?\n", ptr);
    }

    size = *(size_t*)ptr;
    dec_count(size);

    if (log_operations && size >= log_operations_threshold) {
        fprintf(stderr, PPREFIX "free(%p) -> %'lld   (current %'lld)\n",
                ptr, (long long)size, curr);
    }

    (*real_free)(ptr);
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0xa0be
movq %rdi, %rdx
leaq 0x50f3(%rip), %rax      # 0xf1a0
cmpq %rax, %rdi
jb 0xa0c0
addq 0x50df(%rip), %rax      # 0xf198
cmpq %rdx, %rax
jb 0xa0c0
popq %rbx
retq
cmpq $0x0, 0x1050d8(%rip)    # 0x10f1a0
je 0xa109
leaq -0x10(%rdx), %rbx
movl $0xdeadc0de, %eax       # imm = 0xDEADC0DE
cmpq %rax, -0x8(%rdx)
jne 0xa122
movq 0x5090(%rip), %rsi      # 0xf170
subq (%rbx), %rsi
movq %rsi, 0x5086(%rip)      # 0xf170
movq 0x508f(%rip), %rax      # 0xf180
testq %rax, %rax
je 0xa0ff
movq 0x508b(%rip), %rdi      # 0xf188
callq *%rax
movq %rbx, %rdi
popq %rbx
jmpq *0x105097(%rip)         # 0x10f1a0
movq 0x4ee8(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x1a36(%rip), %rsi      # 0xbb50
xorl %eax, %eax
popq %rbx
jmp 0x2190
movq 0x4ecf(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x1a64(%rip), %rsi      # 0xbb97
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2190
jmp 0xa0d9
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/malloc_count.c
// Function: calloc
extern void* calloc(size_t nmemb, size_t size)
{
    void* ret;
    size *= nmemb;
    if (!size) return NULL;
    ret = malloc(size);
    memset(ret, 0, size);
    return ret;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
imulq %rsi, %rbx
testq %rbx, %rbx
je 0xa162
movq %rbx, %rdi
callq 0x9fe6
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x2150
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/malloc_count.c
// Function: init
static __attribute__((constructor)) void init(void)
{
    char *error;

    setlocale(LC_NUMERIC, ""); /* for better readable numbers */

    dlerror();

    real_malloc = (malloc_type)dlsym(RTLD_NEXT, "malloc");
    if ((error = dlerror()) != NULL) {
        fprintf(stderr,  PPREFIX "error %s\n", error);
        exit(EXIT_FAILURE);
    }

    real_realloc = (realloc_type)dlsym(RTLD_NEXT, "realloc");
    if ((error = dlerror()) != NULL) {
        fprintf(stderr,  PPREFIX "error %s\n", error);
        exit(EXIT_FAILURE);
    }

    real_free = (free_type)dlsym(RTLD_NEXT, "free");
    if ((error = dlerror()) != NULL) {
        fprintf(stderr,  PPREFIX "error %s\n", error);
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rax
leaq 0x17fb(%rip), %rsi      # 0xbaaa
movl $0x1, %edi
callq 0x21f0
callq 0x2030
leaq 0x1959(%rip), %rsi      # 0xbc1e
movq $-0x1, %rdi
callq 0x2230
movq %rax, 0x4eb8(%rip)      # 0xf190
callq 0x2030
testq %rax, %rax
jne 0xa32c
leaq 0x1957(%rip), %rsi      # 0xbc40
movq $-0x1, %rdi
callq 0x2230
movq %rax, 0x104eac(%rip)    # 0x10f1a8
callq 0x2030
testq %rax, %rax
jne 0xa334
leaq 0x193b(%rip), %rsi      # 0xbc48
movq $-0x1, %rdi
callq 0x2230
movq %rax, 0x104e80(%rip)    # 0x10f1a0
callq 0x2030
testq %rax, %rax
jne 0xa33c
popq %rax
retq
movq %rax, %rdi
callq 0x2777
movq %rax, %rdi
callq 0x279b
movq %rax, %rdi
callq 0x27bf
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/aegis256/ref/encrypt.c
// Function: aegis256_tag_generation
void aegis256_tag_generation(unsigned long long msglen, unsigned long long adlen, unsigned char maclen, unsigned char *mac, unsigned char *state)
{
        int i;

        unsigned char tmp[16];
        unsigned char msgtmp[16];

        ((unsigned long long*)msgtmp)[0] = adlen << 3;
        ((unsigned long long*)msgtmp)[1] = msglen << 3;

        XOR128(msgtmp, msgtmp, state+48);

        for (i = 0; i < 7; i++) {
             //state update function
             memcpy(tmp, state+80, 16);

             AESROUND(state+80, state+64, state+80);
             AESROUND(state+64, state+48, state+64);
             AESROUND(state+48, state+32, state+48);
             AESROUND(state+32, state+16, state+32);
             AESROUND(state+16, state+0,  state+16);
             AESROUND(state+0,  tmp,      state+0);

             //xor "msg" with state[0]
             XOR128(state, state, msgtmp);
        }

        XOR128(state+80, state+80, state+64);
        XOR128(state+80, state+80, state+48);
        XOR128(state+80, state+80, state+32);
        XOR128(state+80, state+80, state+16);
        XOR128(state+80, state+80, state+0);

        //in this program, the mac length is assumed to be multiple of bytes
        memcpy(mac, state+80, maclen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rcx, 0x18(%rsp)
movl %edx, 0xc(%rsp)
vmovq %rdi, %xmm0
vmovq %rsi, %xmm1
vpunpcklqdq %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[0],xmm0[0]
vpsllq $0x3, %xmm0, %xmm0
leaq 0x30(%r8), %r12
vpxor 0x30(%r8), %xmm0, %xmm0
vmovdqa %xmm0, 0x20(%rsp)
leaq 0x50(%r8), %rax
movq %rax, 0x10(%rsp)
leaq 0x40(%r8), %rbp
leaq 0x20(%r8), %rbx
leaq 0x10(%r8), %r13
movl $0x7, %r14d
movq 0x10(%rsp), %rdi
vmovups (%rdi), %xmm0
vmovaps %xmm0, 0x30(%rsp)
movq %rbp, %rsi
movq %rdi, %rdx
callq 0x1040
movq %rbp, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x1040
movq %r12, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1040
movq %rbx, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1040
movq %r13, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1040
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
movq %r15, %rdx
callq 0x1040
vmovdqa 0x20(%rsp), %xmm0
vpxor (%r15), %xmm0, %xmm0
vmovdqu %xmm0, (%r15)
decl %r14d
jne 0x12ac
vmovdqu (%rbp), %xmm1
movq 0x10(%rsp), %rsi
vpxor (%rsi), %xmm1, %xmm1
vmovdqu (%r12), %xmm2
vpternlogq $0x96, (%rbx), %xmm1, %xmm2
vpternlogq $0x96, (%r13), %xmm2, %xmm0
vmovdqu %xmm0, (%rsi)
movzbl 0xc(%rsp), %edx
movq 0x18(%rsp), %rdi
callq 0x1090
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.11/job-queue2.c
// Function: thread_function
void* thread_function (void* arg)
{
  while (1) {
    struct job* next_job;

    /* Lock the mutex on the job queue.  */
    pthread_mutex_lock (&job_queue_mutex);
    /* Now it's safe to check if the queue is empty.  */
    if (job_queue == NULL)
      next_job = NULL;
    else {
      /* Get the next available job.  */
      next_job = job_queue;
      /* Remove this job from the list.  */
      job_queue = job_queue->next;
    }
    /* Unlock the mutex on the job queue, since we're done with the
       queue for now.  */
    pthread_mutex_unlock (&job_queue_mutex);

    /* Was the queue empty?  If so, end the thread.  */
    if (next_job == NULL)
      break;

    /* Carry out the work.  */
    process_job (next_job);
    /* Clean up.  */
    free (next_job);
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2ea8(%rip), %rdi      # 0x4068
callq 0x1090
movq 0x2ec4(%rip), %r15      # 0x4090
testq %r15, %r15
je 0x1217
leaq 0x2e90(%rip), %rbx      # 0x4068
leaq 0xe25(%rip), %r14       # 0x2004
movq (%r15), %rax
movq %rax, 0x2ea7(%rip)      # 0x4090
movq %rbx, %rdi
callq 0x1050
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1090
movq 0x2e7e(%rip), %r15      # 0x4090
testq %r15, %r15
jne 0x11df
leaq 0x2e4a(%rip), %rdi      # 0x4068
callq 0x1050
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.11/job-queue2.c
// Function: main
int main(void){
  struct job* trabajo = (struct job*) malloc(sizeof(struct job));
  trabajo->next = NULL;
  job_queue = trabajo;
  pthread_t hilo;
  pthread_create(&hilo, NULL, &thread_function, NULL);
  pthread_join(hilo, NULL);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x8, %edi
callq 0x1060
movq $0x0, (%rax)
movq %rax, 0x2e42(%rip)      # 0x4090
leaq -0xa6(%rip), %rdx       # 0x11af
leaq -0x10(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1070
movq (%rbx), %rdi
xorl %esi, %esi
callq 0x1080
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/msglint.c
// Function: tokcomp
static int tokcomp(const char *instr, int len, msgtoken *tok)
{
    int tlen;
    const unsigned char *str = (const unsigned char *) instr;
    const unsigned char *tokstr;

    if (tok == NULL || tok->type == tok_error) return (-1);
    tlen = tok->len;
    tokstr = (const unsigned char *) tok->data;
    while (tlen > 0 || (len != 0 && *str != '\0')) {
	if (tlen == 0) return ((int) *str);
	if (len == 0 || *str == '\0') return (- (int) *tokstr);
	if (*str != TOLOWER(*tokstr)) return ((int) *str - *tokstr);
	++str, ++tokstr, --len, --tlen;
    }
    
    return (0);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x65a1
cmpl $0x0, 0x10(%rdx)
je 0x65a1
pushq %rbx
movl 0x14(%rdx), %r8d
movq 0x8(%rdx), %rcx
movl %esi, %edx
movl %r8d, %esi
negl %esi
xorl %r9d, %r9d
leaq 0x5653(%rip), %r10      # 0xbba0
testl %r8d, %r8d
jle 0x6562
cmpl %r9d, %edx
je 0x6591
movb (%rdi,%r9), %r11b
testb %r11b, %r11b
jne 0x657e
jmp 0x6591
xorl %eax, %eax
cmpl %r9d, %edx
je 0x65a0
movzbl (%rdi,%r9), %r11d
testl %r11d, %r11d
je 0x65a0
leaq (%rsi,%r9), %rbx
movl %r11d, %eax
testl %ebx, %ebx
je 0x65a0
movzbl (%rcx,%r9), %ebx
cmpb (%rbx,%r10), %r11b
jne 0x659a
decl %r8d
incq %r9
jmp 0x654d
movzbl (%rcx,%r9), %eax
negl %eax
jmp 0x65a0
movzbl %r11b, %eax
subl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/msglint.c
// Function: tokprint
static void tokprint(const char *label, msgtoken *cur)
{
    if (silent) return;
    for (; cur != NULL; cur = cur->next) {
	wprintf(NULL, label, " Token type %13s: %t",
		toktypemap[cur->type], cur);
    }
}

// Assembly:
testq %rsi, %rsi
je 0x9aa9
cmpl $0x0, 0x807c(%rip)      # 0x11ad8
jne 0x9aa9
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x27b5(%rip), %r12      # 0xc228
leaq 0x4c77(%rip), %r15      # 0xe6f1
movl 0x10(%rbx), %eax
movslq (%r12,%rax,4), %rcx
addq %r12, %rcx
xorl %edi, %edi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %r8
xorl %eax, %eax
callq 0x3267
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x9a7a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/msglint.c
// Function: newmsgtoken
static msgtoken *newmsgtoken(msgtoken ***ptr, toktype type,
			     const char *dat, int len, int toknum)
{
    msgtoken *result = msgfree;
    const static char uninit[] = "uninitialized token";
    
    if (result != NULL) {
	msgfree = result->next;
    } else {
	result = malloc(sizeof (msgtoken));
	if (result == NULL) {
	    perror("malloc");
	    exit(1);
	}
    }
    if (type == tok_error) {
	result->type = tok_error;
	result->data = uninit;
	result->len = sizeof (uninit) - 1;
    } else {
	result->type = type;
	result->data = dat;
	result->len = len;
    }
    result->whiteafter = 0;
    result->flags = 0;
    result->toknum = toknum;
    result->next = NULL;
    if (ptr != NULL) {
	**ptr = result;
	*ptr = &result->next;
    } 

    return (result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %rbx
movq 0x8258(%rip), %rax      # 0x11d20
testq %rax, %rax
je 0x9ad9
movq (%rax), %rcx
movq %rcx, 0x8249(%rip)      # 0x11d20
jmp 0x9ae8
movl $0x28, %edi
callq 0x2150
testq %rax, %rax
je 0x9b17
movl %r12d, 0x10(%rax)
movq %r15, 0x8(%rax)
movl %r14d, 0x14(%rax)
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movl %ebp, 0x18(%rax)
movq %rcx, (%rax)
testq %rbx, %rbx
je 0x9b0e
movq (%rbx), %rcx
movq %rax, (%rcx)
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2318
// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/msglint.c
// Function: whtupdate
static void whtupdate(whtwarn_ctx *wht, msgtoken *cur, dbinfo *db)
{
    if (wht->last != NULL) {
	wprintf(db, w_warn, "%s after %T is obsolete", wht->lasttype,
	       wht->last);
    }
    warnupdate(wht, db);
    wht->lastdphrase = wht->curdphrase;
    wht->curdphrase = 0;
    wht->last = NULL;
    if (wht->cur != NULL) {
	wht->last = wht->cur;
	wht->lasttype = wht->curtype;
	wht->cur = NULL;
    }
    if (cur != NULL) {
	if (cur->whiteafter & 2) {
	    wht->cur = cur;
	    wht->curtype = comment_str;
	} else if (cur->whiteafter & 1) {
	    wht->cur = cur;
	    wht->curtype = whitespace_str;
	}
    }
    if (wht->last == wht->cur) {
	wht->last = NULL;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r8
testq %r8, %r8
je 0x9b4f
movq 0x20(%rbx), %rcx
leaq 0x2283(%rip), %rsi      # 0xbdc1
leaq 0x4a02(%rip), %rdx      # 0xe547
movq %r15, %rdi
xorl %eax, %eax
callq 0x3267
cmpl $0x0, 0x34(%rbx)
je 0x9b6d
leaq 0x2265(%rip), %rsi      # 0xbdc1
leaq 0x49fc(%rip), %rdx      # 0xe55f
movq %r15, %rdi
xorl %eax, %eax
callq 0x3267
movl 0x30(%rbx), %eax
movl %eax, 0x34(%rbx)
movl $0x0, 0x30(%rbx)
movq $0x0, 0x8(%rbx)
movq (%rbx), %rax
testq %rax, %rax
je 0x9b9d
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rcx
movq %rcx, 0x20(%rbx)
movq $0x0, (%rbx)
testq %r14, %r14
je 0x9bb0
movl 0x20(%r14), %ecx
testb $0x2, %cl
jne 0x9bb5
testb $0x1, %cl
jne 0x9bbe
xorl %r14d, %r14d
jmp 0x9bcc
leaq 0x2688(%rip), %rcx      # 0xc244
jmp 0x9bc5
leaq 0x264b(%rip), %rcx      # 0xc210
movq %r14, (%rbx)
movq %rcx, 0x18(%rbx)
cmpq %r14, %rax
jne 0x9bd9
movq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/msglint.c
// Function: skipvalseg
const static char *skipvalseg(const char *scan)
{
    int level = 0;

    while (*scan != '\0' &&
	   (*scan != '|' || level > 0) &&
	   (*scan != '}' || level-- > 0)) {
	if (*scan == '{') ++level;
	++scan;
    }

    if (*scan == '|') return (scan + 1);

    return (scan);
}

// Assembly:
movq %rdi, %rax
movb (%rdi), %dl
xorl %ecx, %ecx
testb %dl, %dl
je 0x9db3
xorl %esi, %esi
cmpb $0x7c, %dl
setne %dil
testl %esi, %esi
setg %r8b
orb %dil, %r8b
cmpb $0x1, %r8b
jne 0x9dae
cmpb $0x7d, %dl
jne 0x9d97
testl %esi, %esi
jle 0x9db3
decl %esi
xorl %edi, %edi
cmpb $0x7b, %dl
sete %dil
addl %edi, %esi
movb 0x1(%rax), %dl
incq %rax
testb %dl, %dl
jne 0x9d76
jmp 0x9db3
movl $0x1, %ecx
addq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/msglint.c
// Function: vcreset
static int vcreset(int *pstack, vcstack *vs, const char **pdata,
	const char **ptmpl)
{
    int stack = *pstack;
    const char *next;

    while (stack >= 0) {
	if (*vs[stack].type == 'O' ||
	    *vs[stack].type == '*' ||
	    (*vs[stack].type == 'R' && vs[stack].count >= vs[stack].minc)) {
	    *ptmpl = skipvalgroup(vs[stack].tmpl);
	    *pdata = vs[stack].data;
	    *pstack = stack - 1;
	    return (1);
	}
	if (*vs[stack].type == 'A') {
	    next = vs[stack].tmpl = skipvalseg(vs[stack].tmpl);
	    if (*next != '}' && *next != '\0') {
		*ptmpl = next;
		*pdata = vs[stack].data;
		*pstack = stack;
		return (1);
	    }
	}
	--stack;
    }
    
    return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq (%rdi), %r12
xorl %ebp, %ebp
testq %r12, %r12
js 0x9e8e
movq %rcx, %r15
movq %rdx, %r14
movq %rdi, %rbx
leaq (%r12,%r12,4), %rax
leaq (%rsi,%rax,8), %r13
addq $0x1c, %r13
movq -0x1c(%r13), %rax
movzbl (%rax), %eax
cmpl $0x4e, %eax
jg 0x9e14
cmpl $0x41, %eax
jne 0x9e25
movq -0x14(%r13), %rdi
callq 0x9d69
movq %rax, -0x14(%r13)
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x9e31
cmpl $0x7d, %ecx
je 0x9e31
jmp 0x9e9f
cmpl $0x52, %eax
jne 0x9e2c
movl -0x4(%r13), %eax
cmpl (%r13), %eax
jl 0x9e31
jmp 0x9e44
cmpl $0x2a, %eax
jne 0x9e31
jmp 0x9e44
cmpl $0x4f, %eax
je 0x9e44
leaq -0x1(%r12), %rax
addq $-0x28, %r13
testq %r12, %r12
movq %rax, %r12
jg 0x9de5
jmp 0x9e8e
movq -0x14(%r13), %rax
xorl %ecx, %ecx
movzbl (%rax), %edx
cmpl $0x7d, %edx
je 0x9e58
testl %edx, %edx
jne 0x9e5e
jmp 0x9e6e
testl %ecx, %ecx
jle 0x9e6e
decl %ecx
xorl %esi, %esi
cmpb $0x7b, %dl
sete %sil
addl %esi, %ecx
incq %rax
jmp 0x9e4a
xorl %ecx, %ecx
cmpb $0x7d, %dl
sete %cl
addq %rcx, %rax
movq %rax, (%r15)
movq -0xc(%r13), %rax
movq %rax, (%r14)
decl %r12d
movl %r12d, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%r15)
movq -0xc(%r13), %rax
movq %rax, (%r14)
jmp 0x9e86
nop
// File: /workspace/github_c_makefile_star2_O3/NedFreed[P]msglint/md5c.c
// Function: MD5Update
void MD5Update(MD5_CTX *context,
	       const unsigned char *input, unsigned int inputLen)
{
    unsigned int i, index, partLen;
    
    /* Compute number of bytes mod 64 */
    index = (unsigned int)((context->count[0] >> 3) & 0x3F);
    
    /* Update number of bits */
    if ((context->count[0] += ((UINT4)inputLen << 3))
	< ((UINT4)inputLen << 3))
	context->count[1]++;
    context->count[1] += ((UINT4)inputLen >> 29);
    
    partLen = 64 - index;
    
    /* Transform as many times as possible.
     */
    if (inputLen >= partLen) {
	memcpy(&context->in[index], input, partLen);
	MD5Transform (context->state, context->in);
	
	for (i = partLen; i + 63 < inputLen; i += 64)
	    MD5Transform (context->state, &input[i]);
	
	index = 0;
    }
    else
	i = 0;
    
    /* Buffer remaining input */
    memcpy(&context->in[index], &input[i], inputLen-i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movq 0x20(%rdi), %rax
movl %eax, %r13d
shrl $0x3, %r13d
andl $0x3f, %r13d
movl %edx, %ecx
shlq $0x3, %rcx
shrl $0x1d, %edx
addq %rax, %rcx
movq %rcx, 0x20(%rdi)
adcq %rdx, 0x28(%rdi)
movq %rsi, %r15
movl $0x40, %ebp
subl %r13d, %ebp
cmpl %ebx, %ebp
jbe 0xa0f4
movl %r13d, %eax
xorl %ebp, %ebp
jmp 0xa146
leaq 0x30(%r14), %r12
movl %r13d, %eax
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movl %ebp, %edx
movq %r15, %rsi
callq 0x2130
movq %r14, %rdi
movq %r12, %rsi
callq 0xa16e
xorl $0x7f, %r13d
cmpl %ebx, %r13d
jae 0xa144
leal -0x3f(%r13), %esi
addq %r15, %rsi
movq %r14, %rdi
callq 0xa16e
addl $0x40, %r13d
cmpl %ebx, %r13d
jb 0xa121
addl $-0x3f, %r13d
xorl %eax, %eax
movl %r13d, %ebp
jmp 0xa146
xorl %eax, %eax
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movl %ebp, %eax
addq %rax, %r15
subl %ebp, %ebx
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
movl 0x20(%rbx,%rax,8), %ecx
movl %ecx, (%rsp,%rax,4)
incq %rax
cmpq $0x2, %rax
jne 0xae06
movl 0x20(%rbx), %eax
shrl $0x3, %eax
andl $0x3f, %eax
xorl %edx, %edx
cmpl $0x38, %eax
setae %dl
shll $0x6, %edx
orl $0x38, %edx
subl %eax, %edx
leaq 0x6c2a(%rip), %rsi      # 0x11a60
movq %rbx, %rdi
callq 0xa0ab
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0xa0ab
xorl %eax, %eax
movb (%rbx,%rax,8), %cl
movb %cl, (%r14,%rax,4)
movb 0x1(%rbx,%rax,8), %cl
movb %cl, 0x1(%r14,%rax,4)
movb 0x2(%rbx,%rax,8), %cl
movb %cl, 0x2(%r14,%rax,4)
movb 0x3(%rbx,%rax,8), %cl
movb %cl, 0x3(%r14,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0xae50
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
movl $0x86810, %edi          # imm = 0x86810
callq 0x11d0
movq %rax, %rbx
movl $0x80000, %edx          # imm = 0x80000
movq %rax, %rdi
xorl %esi, %esi
callq 0x1110
movaps 0x10b2b(%rip), %xmm0    # 0x12010
movups %xmm0, 0x86800(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x1530
movq 0x68(%rdi), %r15
callq 0x1040
movq %r15, %rdi
testq %r15, %r15
jne 0x151f
incq %r14
cmpq $0x10000, %r14          # imm = 0x10000
jne 0x1516
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x1, 0x86808(%rdi)
movl %esi, -0x2c(%rbp)
testl %esi, %esi
jle 0x200a
movq %rdi, %r14
leaq 0x80000(%rdi), %r12
movl 0x86800(%rdi), %ebx
xorl %eax, %eax
movq %rax, -0x38(%rbp)
testl %ebx, %ebx
jle 0x1f94
movl %ebx, %eax
imulq $0x68, %rax, %rax
xorl %ecx, %ecx
movq $0x0, 0x80058(%r14,%rcx)
addq $0x68, %rcx
cmpq %rcx, %rax
jne 0x1f7f
xorl %r13d, %r13d
movq (%r14,%r13,8), %r15
testq %r15, %r15
je 0x1fc6
movq %r14, %rdi
movq %r15, %rsi
callq 0x2406
movzbl %al, %eax
imulq $0x68, %rax, %rax
movq 0x58(%r12,%rax), %rcx
movq %rcx, 0x60(%r15)
movq %r15, 0x58(%r12,%rax)
movq 0x68(%r15), %r15
jmp 0x1f9b
incq %r13
cmpq $0x10000, %r13          # imm = 0x10000
jne 0x1f97
testl %ebx, %ebx
movq -0x38(%rbp), %rax
jle 0x1fff
movq %r12, %r15
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x18fc
incq %r13
movslq 0x86800(%r14), %rbx
addq $0x68, %r15
cmpq %rbx, %r13
jl 0x1fe0
movq -0x38(%rbp), %rax
incl %eax
cmpl -0x2c(%rbp), %eax
jne 0x1f6f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq 0x86800(%rdi), %rax
testq %rax, %rax
jle 0x2054
imulq $0x68, %rax, %rax
xorl %ecx, %ecx
xorpd %xmm0, %xmm0
xorl %edx, %edx
addl 0x80050(%rdi,%rcx), %edx
addsd 0x80048(%rdi,%rcx), %xmm0
addq $0x68, %rcx
cmpq %rcx, %rax
jne 0x2031
cvtsi2sd %edx, %xmm1
divsd %xmm1, %xmm0
jmp 0x205c
movsd 0xfffc(%rip), %xmm0     # 0x12058
pushq %rbp
movq %rsp, %rbp
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2070
sqrtsd %xmm0, %xmm0
jmp 0x2075
callq 0x1290
mulsd 0xffe3(%rip), %xmm0     # 0x12060
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_get_palette
void exq_get_palette(exq_data *pExq, unsigned char *pPal, int nColors)
{
	int i, j;
	exq_float r, g, b, a;
	unsigned char channelMask = 0xff00 >> pExq->numBitsPerChannel;

	if(nColors > pExq->numColors)
		nColors = pExq->numColors;

	if(!pExq->optimized)
		exq_optimize_palette(pExq, 4);

	for(i = 0; i < nColors; i++)
	{
		r = pExq->node[i].avg.r;
		g = pExq->node[i].avg.g;
		b = pExq->node[i].avg.b;
		a = pExq->node[i].avg.a;

		if(pExq->transparency == 1 && a != 0)
		{
			r /= a; g/= a; b/= a;
		}

		pPal[0] = (unsigned char)(r / SCALE_R * 255.9f);
		pPal[1] = (unsigned char)(g / SCALE_G * 255.9f);
		pPal[2] = (unsigned char)(b / SCALE_B * 255.9f);
		pPal[3] = (unsigned char)(a / SCALE_A * 255.9f);

		for(j = 0; j < 3; j++)
			pPal[j] = (pPal[j] + (1 << (8 - pExq->numBitsPerChannel)) / 2) & channelMask;
		pPal += 4;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movb 0x86804(%rdi), %cl
movl $0xff00, %r12d          # imm = 0xFF00
shrl %cl, %r12d
movl %edx, %r15d
movq %rsi, %r14
movl 0x86800(%rdi), %eax
cmpl %edx, %eax
cmovll %eax, %r15d
cmpl $0x0, 0x86808(%rdi)
jne 0x20c4
movq %rbx, %rdi
movl $0x4, %esi
callq 0x1f37
testl %r15d, %r15d
jle 0x21b8
leaq 0x80000(%rbx), %rax
movl %r15d, %edx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd 0xff83(%rip), %xmm1     # 0x12068
movsd 0xff83(%rip), %xmm2     # 0x12070
movsd 0xff83(%rip), %xmm3     # 0x12078
imulq $0x68, %rsi, %rcx
movsd 0x20(%rax,%rcx), %xmm7
movsd 0x28(%rax,%rcx), %xmm6
movsd 0x30(%rax,%rcx), %xmm5
cmpl $0x1, 0x8680c(%rbx)
movsd 0x38(%rax,%rcx), %xmm4
sete %cl
ucomisd %xmm0, %xmm4
setp %dil
setne %r8b
orb %dil, %r8b
testb %r8b, %cl
je 0x213b
divsd %xmm4, %xmm7
divsd %xmm4, %xmm6
divsd %xmm4, %xmm5
mulsd %xmm1, %xmm7
cvttsd2si %xmm7, %ecx
divsd %xmm2, %xmm6
mulsd %xmm1, %xmm6
cvttsd2si %xmm6, %edi
movb %cl, (%r14)
movb %dil, 0x1(%r14)
divsd %xmm3, %xmm5
mulsd %xmm1, %xmm5
cvttsd2si %xmm5, %ecx
movb %cl, 0x2(%r14)
mulsd %xmm1, %xmm4
cvttsd2si %xmm4, %ecx
movb %cl, 0x3(%r14)
xorl %edi, %edi
movzbl (%r14,%rdi), %r8d
movb $0x8, %cl
subb 0x86804(%rbx), %cl
movl $0x1, %r9d
shll %cl, %r9d
movl %r9d, %ecx
shrl $0x1f, %ecx
addl %r9d, %ecx
shrl %ecx
addl %r8d, %ecx
andl %r12d, %ecx
movb %cl, (%r14,%rdi)
incq %rdi
cmpq $0x3, %rdi
jne 0x2174
addq $0x4, %r14
incq %rsi
cmpq %rdx, %rsi
jne 0x20f5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl %edx, 0x86800(%rdi)
testl %edx, %edx
jle 0x2275
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
leaq 0x80038(%rdi), %rcx
xorl %edx, %edx
movss 0xfe66(%rip), %xmm0     # 0x1204c
movss 0xfe56(%rip), %xmm1     # 0x12044
movss 0xfe52(%rip), %xmm2     # 0x12048
movzbl (%rsi,%rdx,4), %r8d
xorps %xmm3, %xmm3
cvtsi2ss %r8d, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x18(%rcx)
movzbl 0x1(%rsi,%rdx,4), %r8d
xorps %xmm3, %xmm3
cvtsi2ss %r8d, %xmm3
mulss %xmm1, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x10(%rcx)
movzbl 0x2(%rsi,%rdx,4), %r8d
xorps %xmm3, %xmm3
cvtsi2ss %r8d, %xmm3
mulss %xmm2, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x8(%rcx)
movzbl 0x3(%rsi,%rdx,4), %r8d
xorps %xmm3, %xmm3
cvtsi2ss %r8d, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, (%rcx)
incq %rdx
addq $0x68, %rcx
cmpq %rdx, %rax
jne 0x21f6
popq %rbp
movl $0x1, 0x86808(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %r15
testq %r15, %r15
je 0x2382
movq %rsi, %r14
movq %rdi, %rbx
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
movsd %xmm1, -0x30(%rbp)
incl %r12d
movq %r15, %rdi
callq *%r14
movsd -0x30(%rbp), %xmm1
addsd %xmm0, %xmm1
movq 0x60(%r15), %r15
testq %r15, %r15
jne 0x22aa
cmpl $0x1, %r12d
je 0x2382
movq (%rbx), %r15
testq %r15, %r15
je 0x2376
movq %rbx, -0x38(%rbp)
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
divsd %xmm0, %xmm1
xorl %r12d, %r12d
xorl %r13d, %r13d
movsd %xmm1, -0x30(%rbp)
movq 0x60(%r15), %rbx
movq %r15, %rdi
callq *%r14
movsd -0x30(%rbp), %xmm1
ucomisd %xmm0, %xmm1
movq %r12, %rax
cmovaq %r13, %rax
cmovaq %r15, %r13
cmovbeq %r15, %r12
movq %rax, 0x60(%r15)
movq %rbx, %r15
testq %rbx, %rbx
jne 0x22fb
movq %r12, -0x40(%rbp)
movq %r13, -0x48(%rbp)
testq %r13, %r13
je 0x237b
testq %r12, %r12
movq -0x38(%rbp), %rbx
je 0x2391
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2280
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x2280
movq (%r15), %rax
movq %rax, (%rbx)
movq %rax, %rcx
movq 0x60(%rax), %rax
testq %rax, %rax
jne 0x2360
movq -0x40(%rbp), %rax
movq %rax, 0x60(%rcx)
jmp 0x2382
xorl %r12d, %r12d
jmp 0x237f
movq -0x38(%rbp), %rbx
movq %r12, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, (%rbx)
jmp 0x2382
// File: /workspace/github_c_makefile_star2_O3/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
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
mulsd 0x16dda(%rip), %xmm1    # 0x191b0
mulsd 0x16dca(%rip), %xmm0    # 0x191a8
addsd %xmm1, %xmm0
movsd 0x10(%rdi), %xmm1
mulsd 0x16dc9(%rip), %xmm1    # 0x191b8
addsd %xmm0, %xmm1
movsd 0x18(%rdi), %xmm0
mulsd 0x16dc0(%rip), %xmm0    # 0x191c0
addsd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq 0x86800(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
jle 0x24a2
pushq %rbp
movq %rsp, %rbp
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
movsd 0x18(%rsi), %xmm3
addq $0x80038, %rdi          # imm = 0x80038
movsd 0xfc42(%rip), %xmm4     # 0x12080
xorl %edx, %edx
movapd %xmm0, %xmm5
subsd -0x18(%rdi), %xmm5
movapd %xmm1, %xmm6
subsd -0x10(%rdi), %xmm6
movapd %xmm2, %xmm7
subsd -0x8(%rdi), %xmm7
movapd %xmm3, %xmm8
subsd (%rdi), %xmm8
mulsd %xmm6, %xmm6
mulsd %xmm5, %xmm5
addsd %xmm6, %xmm5
mulsd %xmm7, %xmm7
addsd %xmm5, %xmm7
mulsd %xmm8, %xmm8
addsd %xmm7, %xmm8
ucomisd %xmm8, %xmm4
cmoval %edx, %eax
minsd %xmm4, %xmm8
incq %rdx
addq $0x68, %rdi
movapd %xmm8, %xmm4
cmpq %rdx, %rcx
jne 0x2440
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/DavidSM64[P]n64graphics_ci/exoquant/exoquant.c
// Function: exq_map_image
void exq_map_image(exq_data *pExq, int nPixels, unsigned char *pIn,
				   unsigned char *pOut)
{
	int i;
	exq_color c;
	exq_histogram *pHist;

	if(!pExq->optimized)
		exq_optimize_palette(pExq, 4);

	for(i = 0; i < nPixels; i++)
	{
		pHist = exq_find_histogram(pExq, pIn);
		if(pHist != NULL && pHist->palIndex != -1)
		{
			*pOut++ = (unsigned char)pHist->palIndex;
			pIn += 4;
		}
		else
		{
			c.r = *pIn++ / 255.0f * SCALE_R;
			c.g = *pIn++ / 255.0f * SCALE_G;
			c.b = *pIn++ / 255.0f * SCALE_B;
			c.a = *pIn++ / 255.0f * SCALE_A;

			if(pExq->transparency)
			{
				c.r *= c.a; c.g *= c.a; c.b *= c.a;
			}

			*pOut = exq_find_nearest_color(pExq, &c);
			if(pHist != NULL)
				pHist->palIndex = *pOut;
			pOut++;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x30(%rbp)
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
cmpl $0x0, 0x86808(%rdi)
jne 0x24d7
movq %r15, %rdi
movl $0x4, %esi
callq 0x1f37
testl %r12d, %r12d
jle 0x25dc
movl %r12d, %r12d
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x25eb
movq %rax, %r13
testq %rax, %rax
je 0x250d
movl 0x24(%r13), %eax
cmpl $-0x1, %eax
je 0x250d
movq -0x30(%rbp), %rcx
movb %al, (%rcx,%rbx)
jmp 0x25cc
movzbl (%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0xfb20(%rip), %xmm4     # 0x12040
divss %xmm4, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
movzbl 0x1(%r14), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
divss %xmm4, %xmm1
mulss 0xfaff(%rip), %xmm1     # 0x12044
cvtss2sd %xmm1, %xmm1
movsd %xmm1, -0x48(%rbp)
movzbl 0x2(%r14), %eax
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
divss %xmm4, %xmm2
mulss 0xfae2(%rip), %xmm2     # 0x12048
cvtss2sd %xmm2, %xmm2
movsd %xmm2, -0x40(%rbp)
movzbl 0x3(%r14), %eax
xorps %xmm3, %xmm3
cvtsi2ss %eax, %xmm3
divss %xmm4, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x38(%rbp)
cmpl $0x0, 0x8680c(%r15)
je 0x25ad
mulsd %xmm3, %xmm0
movsd %xmm0, -0x50(%rbp)
mulsd %xmm3, %xmm1
movsd %xmm1, -0x48(%rbp)
mulsd %xmm3, %xmm2
movsd %xmm2, -0x40(%rbp)
movq %r15, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2406
movq -0x30(%rbp), %rcx
movb %al, (%rcx,%rbx)
testq %r13, %r13
je 0x25cc
movzbl %al, %eax
movl %eax, 0x24(%r13)
addq $0x4, %r14
incq %rbx
cmpl %ebx, %r12d
jne 0x24e5
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movzbl (%rsi), %ecx
movzbl 0x1(%rsi), %edx
movzbl 0x2(%rsi), %r8d
movzbl 0x3(%rsi), %esi
movl %edx, %eax
shll $0x8, %eax
movl %r8d, %r9d
shll $0x10, %r9d
movl %esi, %r10d
shll $0x18, %r10d
orl %ecx, %eax
orl %r9d, %eax
orl %r10d, %eax
movl %eax, %r9d
roll $0x13, %r9d
subl %r9d, %eax
movl %eax, %r9d
roll $0x13, %r9d
subl %r9d, %eax
movl %eax, %r9d
roll $0x13, %r9d
subl %r9d, %eax
movl %eax, %r9d
roll $0x13, %r9d
subl %r9d, %eax
movl %eax, %r9d
shrl $0xd, %r9d
subl %r9d, %eax
movzwl %ax, %eax
movq (%rdi,%rax,8), %rax
testq %rax, %rax
je 0x267b
pushq %rbp
movq %rsp, %rbp
cmpb %cl, 0x20(%rax)
jne 0x266e
cmpb %dl, 0x21(%rax)
jne 0x266e
cmpb %r8b, 0x22(%rax)
jne 0x266e
cmpb %sil, 0x23(%rax)
je 0x2679
movq 0x68(%rax), %rax
testq %rax, %rax
jne 0x2658
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testl %edx, %edx
jle 0x2c9e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
movzbl (%rbx,%r12), %eax
movl %eax, %edi
shrl $0x4, %edi
leal 0x30(%rdi), %ecx
addl $0x37, %edi
cmpl $0xa0, %eax
cmovbl %ecx, %edi
movq %r14, %rsi
callq 0x1140
movzbl (%rbx,%r12), %eax
andl $0xf, %eax
leal 0x30(%rax), %ecx
movl %eax, %edi
addl $0x37, %edi
cmpb $0xa, %al
cmovbl %ecx, %edi
movq %r14, %rsi
callq 0x1140
movl $0x20, %edi
movq %r14, %rsi
callq 0x1140
incq %r12
cmpq %r12, %r15
jne 0x2c44
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testl %edx, %edx
jle 0x2d3a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r13d
xorl %r12d, %r12d
leaq 0xf3fb(%rip), %r15      # 0x120c3
testq %r12, %r12
je 0x2cdc
leaq 0xf3ec(%rip), %rdi      # 0x120c0
movq %r14, %rsi
callq 0x1100
movq %r15, %rdi
movq %r14, %rsi
callq 0x1100
movzbl (%rbx,%r12), %eax
movl %eax, %edi
shrl $0x4, %edi
leal 0x30(%rdi), %ecx
addl $0x37, %edi
cmpl $0xa0, %eax
cmovbl %ecx, %edi
movq %r14, %rsi
callq 0x1140
movzbl (%rbx,%r12), %eax
andl $0xf, %eax
leal 0x30(%rax), %ecx
movl %eax, %edi
addl $0x37, %edi
cmpb $0xa, %al
cmovbl %ecx, %edi
movq %r14, %rsi
callq 0x1140
incq %r12
cmpq %r12, %r13
jne 0x2cc8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
testq %rsi, %rsi
jle 0x2d97
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb 0x3(%rdi,%rax), %dl
movb %dl, (%rdi,%rax)
movb %cl, 0x3(%rdi,%rax)
rolw $0x8, 0x1(%rdi,%rax)
addq $0x4, %rax
cmpq %rsi, %rax
jl 0x2d7a
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x41, %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x1220
testl %eax, %eax
js 0x2e04
movl %eax, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1030
movl %r14d, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0x1120
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
leaq 0xf2a8(%rip), %rsi      # 0x120c6
callq 0x1230
testq %rax, %rax
je 0x2e9e
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x11f0
movq %r14, %rdi
callq 0x1180
movq %rax, %r15
movq $-0x2, %rax
cmpq $0x10000000, %r15       # imm = 0x10000000
jg 0x2ea5
movq %r15, %rdi
callq 0x11d0
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11f0
movl $0x1, %esi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x10a0
movq %rax, %rcx
movq $-0x3, %rax
cmpq %r15, %rcx
jne 0x2ea5
movq %r14, %rdi
callq 0x10b0
movq %r12, (%rbx)
movq %r15, %rax
jmp 0x2ea5
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0xf200(%rip), %rsi      # 0x120c9
callq 0x1230
testq %rax, %rax
je 0x2f00
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1280
movq %rax, %rbx
movq %r15, %rdi
callq 0x10b0
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x1240
movq $-0x1, %rax
jmp 0x2ef7