LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0x150f(%rip), %rsi      # 0xaaa2
pushq $0x1
popq %rdi
callq 0x21f0
callq 0x2030
leaq 0x163f(%rip), %rsi      # 0xabe6
pushq $-0x1
popq %rdi
callq 0x2230
movq %rax, 0x4bda(%rip)      # 0xe190
callq 0x2030
testq %rax, %rax
jne 0x9602
leaq 0x1641(%rip), %rsi      # 0xac08
pushq $-0x1
popq %rdi
callq 0x2230
movq %rax, 0x104bd2(%rip)    # 0x10e1a8
callq 0x2030
testq %rax, %rax
jne 0x9602
leaq 0x1629(%rip), %rsi      # 0xac10
pushq $-0x1
popq %rdi
callq 0x2230
movq %rax, 0x104baa(%rip)    # 0x10e1a0
callq 0x2030
testq %rax, %rax
jne 0x9602
popq %rax
retq
movq 0x49ef(%rip), %rcx      # 0xdff8
movq (%rcx), %rdi
leaq 0x15da(%rip), %rsi      # 0xabed
movq %rax, %rdx
xorl %eax, %eax
callq 0x2190
pushq $0x1
popq %rdi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O2/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, %r14
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), %r13
leaq 0x20(%r8), %rbx
leaq 0x10(%r8), %rbp
pushq $0x7
popq %r15
subl $0x1, %r15d
jb 0x1344
movq 0x10(%rsp), %rdi
vmovups (%rdi), %xmm0
vmovaps %xmm0, 0x30(%rsp)
movq %r13, %rsi
movq %rdi, %rdx
callq 0x1050
movq %r13, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1050
movq %r12, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1050
movq %rbx, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1050
movq %rbp, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1050
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %r14, %rdx
callq 0x1050
vmovdqa 0x20(%rsp), %xmm0
vpxor (%r14), %xmm0, %xmm0
vmovdqu %xmm0, (%r14)
jmp 0x12ca
vmovdqu 0x10(%r14), %xmm0
vmovdqu 0x30(%r14), %xmm1
vmovdqu 0x40(%r14), %xmm2
vpxor 0x50(%r14), %xmm2, %xmm2
vpternlogq $0x96, 0x20(%r14), %xmm1, %xmm2
vpternlogq $0x96, (%r14), %xmm0, %xmm2
vmovdqu %xmm2, 0x50(%r14)
movzbl 0xc(%rsp), %edx
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x10b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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), %rbx      # 0x4068
leaq 0xe3d(%rip), %r14       # 0x2004
movq %rbx, %rdi
callq 0x1090
movq 0x2eba(%rip), %r15      # 0x4090
testq %r15, %r15
je 0x1201
movq (%r15), %rax
movq %rax, 0x2eab(%rip)      # 0x4090
movq %rbx, %rdi
callq 0x1050
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x1030
jmp 0x11c7
leaq 0x2e60(%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_O2/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
pushq $0x8
popq %rdi
callq 0x1060
andq $0x0, (%rax)
movq %rax, 0x2e5d(%rip)      # 0x4090
leaq -0x8b(%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_O2/NedFreed[P]msglint/msglint.c
// Function: disposeminfo
static void disposeminfo(MIMEinfo *minfo)
{
    msgtoken *cur;
    int j;

    for (j = 0; j < 10; ++j) {
	if ((cur = minfo->keep[j]) != NULL) {
	    cur->next = msgfree;
	    msgfree = cur;
	}
    }
    free(minfo);
}

// Assembly:
movq 0xccb5(%rip), %rcx      # 0x12d20
xorl %eax, %eax
cmpq $0xa, %rax
je 0x2040
movq (%rdi,%rax,8), %rdx
testq %rdx, %rdx
je 0x608d
movq %rcx, (%rdx)
movq %rdx, 0xcc96(%rip)      # 0x12d20
movq %rdx, %rcx
incq %rax
jmp 0x606d
// File: /workspace/github_c_makefile_star2_O2/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 0x6110
cmpl $0x0, 0x10(%rdx)
je 0x6110
pushq %rbx
movl 0x14(%rdx), %r8d
movq 0x8(%rdx), %rcx
movl %esi, %edx
movl %r8d, %esi
negl %esi
xorl %r9d, %r9d
leaq 0x5b04(%rip), %r10      # 0xbbc0
testl %r8d, %r8d
jle 0x60d1
cmpl %r9d, %edx
je 0x6100
movb (%rdi,%r9), %r11b
testb %r11b, %r11b
jne 0x60ed
jmp 0x6100
xorl %eax, %eax
cmpl %r9d, %edx
je 0x610f
movzbl (%rdi,%r9), %r11d
testl %r11d, %r11d
je 0x610f
leaq (%rsi,%r9), %rbx
movl %r11d, %eax
testl %ebx, %ebx
je 0x610f
movzbl (%rcx,%r9), %ebx
cmpb (%rbx,%r10), %r11b
jne 0x6109
decl %r8d
incq %r9
jmp 0x60bc
movzbl (%rcx,%r9), %eax
negl %eax
jmp 0x610f
movzbl %r11b, %eax
subl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x90cb
cmpl $0x0, 0x9a5a(%rip)      # 0x12ad8
jne 0x90cb
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x31b3(%rip), %r12      # 0xc248
leaq 0x5675(%rip), %r15      # 0xe711
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 0x48c0
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x909c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9c36(%rip), %rax      # 0x12d20
testq %rax, %rax
je 0x90fb
movq (%rax), %rcx
movq %rcx, 0x9c27(%rip)      # 0x12d20
jmp 0x9108
pushq $0x28
popq %rdi
callq 0x2150
testq %rax, %rax
je 0x9137
movl %r12d, 0x10(%rax)
movq %r15, 0x8(%rax)
movl %r14d, 0x14(%rax)
andq $0x0, 0x20(%rax)
movl %ebp, 0x18(%rax)
andq $0x0, (%rax)
testq %rbx, %rbx
je 0x912e
movq (%rbx), %rcx
movq %rax, (%rcx)
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4097(%rip), %rdi      # 0xd1d5
callq 0x21a0
pushq $0x1
popq %rdi
callq 0x21e0
// File: /workspace/github_c_makefile_star2_O2/NedFreed[P]msglint/msglint.c
// Function: skipvalgroup
const static char *skipvalgroup(const char *scan)
{
    int level = 0;

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

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

    return (scan);
}

// Assembly:
movq %rdi, %rax
xorl %ecx, %ecx
movzbl (%rax), %edx
cmpl $0x7d, %edx
je 0x915e
testl %edx, %edx
jne 0x9164
jmp 0x9174
testl %ecx, %ecx
jle 0x9174
decl %ecx
xorl %esi, %esi
cmpb $0x7b, %dl
sete %sil
addl %esi, %ecx
incq %rax
jmp 0x9150
xorl %ecx, %ecx
cmpb $0x7d, %dl
sete %cl
addq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x91b3
movq 0x20(%rbx), %rcx
leaq 0x2c3f(%rip), %rsi      # 0xbde1
leaq 0x53be(%rip), %rdx      # 0xe567
movq %r15, %rdi
xorl %eax, %eax
callq 0x48c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9224
movl 0x30(%rbx), %eax
movl %eax, 0x34(%rbx)
andl $0x0, 0x30(%rbx)
andq $0x0, 0x8(%rbx)
movq (%rbx), %rax
testq %rax, %rax
je 0x91e5
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rcx
movq %rcx, 0x20(%rbx)
andq $0x0, (%rbx)
testq %r14, %r14
je 0x91f8
movl 0x20(%r14), %ecx
testb $0x2, %cl
jne 0x91fd
testb $0x1, %cl
jne 0x9206
xorl %r14d, %r14d
jmp 0x9214
leaq 0x3060(%rip), %rcx      # 0xc264
jmp 0x920d
leaq 0x3023(%rip), %rcx      # 0xc230
movq %r14, (%rbx)
movq %rcx, 0x18(%rbx)
cmpq %r14, %rax
jne 0x921e
andq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/NedFreed[P]msglint/msglint.c
// Function: valreset
static int valreset(int *pstack, vstack *vs, msgtoken **cur,
		    const char **tmpl, whtwarn_ctx *wht, best_ctx *best)
{
    int stack = *pstack;
    const char *next;

    /* remember best token */
    if (*cur == NULL ||
	(best->tok != NULL && (*cur)->toknum > best->tok->toknum)) {
	best->tok = *cur;
	best->tmpl = *tmpl;
    }

    /* try to back up */
    while (stack >= 0) {
	/* don't allow reset outside a matched enumerated type */
	if (*vs[stack].type == 'E' || *vs[stack].type == 'e') break;

	/* skip an optional, repeat or successful repeat-at-least-once */
	if (*vs[stack].type == 'O' || *vs[stack].type == '*' ||
	    (*vs[stack].type == '1' && vs[stack].count > 0)) {
	    *cur = vs[stack].cur;
	    *wht = vs[stack].wstate;
	    *tmpl = skipvalgroup(vs[stack].vstate);
	    *pstack = stack - 1;
	    return (1);
	}

	/* try a different alternate if available */
	if (*vs[stack].type == 'A') {
	    next = vs[stack].vstate = skipvalseg(vs[stack].vstate);
	    if (*next != '}' && *next != '\0') {
		*cur = vs[stack].cur;
		*wht = vs[stack].wstate;
		*tmpl = next;
		*pstack = stack;
		return (1);
	    }
	}
	--stack;
    }

    /* failed to reset */
    
    return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, (%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movl (%rdi), %ebp
movq (%rdx), %rax
testq %rax, %rax
je 0x9284
movq (%r9), %rcx
testq %rcx, %rcx
je 0x9292
movl 0x18(%rax), %edx
cmpl 0x18(%rcx), %edx
jle 0x9292
movq %rax, (%r9)
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%r9)
xorl %eax, %eax
testl %ebp, %ebp
js 0x9337
movl %ebp, %ecx
imulq $0x60, %rcx, %rcx
leaq (%rcx,%r13), %r14
movq 0x8(%r13,%rcx), %rcx
movzbl (%rcx), %ecx
cmpl $0x31, %ecx
je 0x92e9
cmpl $0x41, %ecx
je 0x92ce
cmpl $0x2a, %ecx
je 0x92f4
cmpl $0x45, %ecx
je 0x9337
cmpl $0x4f, %ecx
je 0x92f4
cmpl $0x65, %ecx
jne 0x92f0
jmp 0x9337
movq 0x10(%r14), %rdi
callq 0x937b
movq %rax, 0x10(%r14)
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x92f0
cmpl $0x7d, %ecx
je 0x92f0
jmp 0x9346
cmpl $0x0, 0x20(%r14)
jg 0x92f4
decl %ebp
jmp 0x9292
movq (%r14), %rax
movq %rax, (%r12)
movq 0x58(%r14), %rax
movq %rax, 0x30(%r15)
movups 0x28(%r14), %xmm0
movups 0x38(%r14), %xmm1
movups 0x48(%r14), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq 0x10(%r14), %rdi
callq 0x914b
movq (%rsp), %rcx
movq %rax, (%rcx)
decl %ebp
movl %ebp, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rcx
movq %rcx, (%r12)
movq 0x58(%r14), %rcx
movq %rcx, 0x30(%r15)
movups 0x28(%r14), %xmm0
movups 0x38(%r14), %xmm1
movups 0x48(%r14), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq (%rsp), %rcx
movq %rax, (%rcx)
jmp 0x9332
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rcx
xorl %edx, %edx
movb (%rax), %sil
testb %sil, %sil
je 0x93bf
cmpb $0x7c, %sil
setne %dil
testl %edx, %edx
setg %r8b
orb %dil, %r8b
cmpb $0x1, %r8b
jne 0x93c1
cmpb $0x7d, %sil
jne 0x93ae
testl %edx, %edx
jle 0x93bf
decl %edx
xorl %edi, %edi
cmpb $0x7b, %sil
sete %dil
addl %edi, %edx
incq %rax
jmp 0x9383
xorl %ecx, %ecx
addq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl (%rdi), %ebp
testl %ebp, %ebp
js 0x9432
movl %ebp, %eax
imulq $0x28, %rax, %rax
leaq (%r12,%rax), %r13
movq (%r12,%rax), %rax
movzbl (%rax), %eax
cmpl $0x41, %eax
je 0x9409
cmpl $0x52, %eax
je 0x9424
cmpl $0x2a, %eax
je 0x9436
cmpl $0x4f, %eax
jne 0x942e
jmp 0x9436
movq 0x8(%r13), %rdi
callq 0x937b
movq %rax, 0x8(%r13)
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x942e
cmpl $0x7d, %ecx
je 0x942e
jmp 0x945f
movl 0x18(%r13), %eax
cmpl 0x1c(%r13), %eax
jge 0x9436
decl %ebp
jmp 0x93de
xorl %eax, %eax
jmp 0x9450
movq 0x8(%r13), %rdi
callq 0x914b
movq %rax, (%r15)
movq 0x10(%r13), %rax
movq %rax, (%r14)
decl %ebp
movl %ebp, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%r15)
movq 0x10(%r13), %rax
movq %rax, (%r14)
jmp 0x944b
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
movq 0x20(%rdi), %rcx
movl %ecx, %eax
shrl $0x3, %eax
andl $0x3f, %eax
movl %edx, %edx
shlq $0x3, %rdx
movl %ebx, %edi
shrl $0x1d, %edi
addq %rcx, %rdx
movq %rdx, 0x20(%r14)
adcq %rdi, 0x28(%r14)
movq %rsi, %r15
pushq $0x40
popq %r13
subl %eax, %r13d
cmpl %ebx, %r13d
jbe 0x96a9
movl %eax, %r12d
xorl %r13d, %r13d
leaq (%r14,%r12), %rdi
addq $0x30, %rdi
movl %r13d, %eax
addq %rax, %r15
subl %r13d, %ebx
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2130
leaq 0x30(%r14), %r12
movl %eax, %eax
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movl %r13d, %edx
movq %r15, %rsi
callq 0x2130
movq %r14, %rdi
movq %r12, %rsi
callq 0x96ec
xorl %r12d, %r12d
leal 0x3f(%r13), %eax
cmpl %ebx, %eax
jae 0x9684
movl %r13d, %esi
addq %r15, %rsi
movq %r14, %rdi
callq 0x96ec
addl $0x40, %r13d
jmp 0x96d0
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x20, %rsi
movq %rsp, %r15
pushq $0x8
popq %rbp
movq %r15, %rdi
movl %ebp, %edx
callq 0xa407
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 0x86a5(%rip), %rsi      # 0x12a60
movq %rbx, %rdi
callq 0x963f
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x963f
pushq $0x10
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa407
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
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
addl $0x3, %edx
shrl $0x2, %edx
xorl %eax, %eax
cmpq %rax, %rdx
je 0xa437
movb (%rsi,%rax,8), %cl
movb %cl, (%rdi,%rax,4)
movb 0x1(%rsi,%rax,8), %cl
movb %cl, 0x1(%rdi,%rax,4)
movb 0x2(%rsi,%rax,8), %cl
movb %cl, 0x2(%rdi,%rax,4)
movb 0x3(%rsi,%rax,8), %cl
movb %cl, 0x3(%rdi,%rax,4)
incq %rax
jmp 0xa40f
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl $0x86810, %edi          # imm = 0x86810
callq 0x11d0
xorl %ecx, %ecx
cmpq $0x10000, %rcx          # imm = 0x10000
je 0x13cf
andq $0x0, (%rax,%rcx,8)
incq %rcx
jmp 0x13bc
movabsq $0x800000000, %rcx      # imm = 0x800000000
movq %rcx, 0x86800(%rax)
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, 0x86808(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
cmpq $0x10000, %r14          # imm = 0x10000
je 0x1435
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x1430
movq 0x68(%rdi), %r15
callq 0x1040
movq %r15, %rdi
jmp 0x141d
incq %r14
jmp 0x1410
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O2/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, %eax
roll $0x13, %eax
subl %eax, %edi
movl %edi, %eax
roll $0x13, %eax
subl %eax, %edi
movl %edi, %eax
roll $0x13, %eax
subl %eax, %edi
movl %edi, %eax
roll $0x13, %eax
subl %eax, %edi
movl %edi, %eax
shrl $0xd, %eax
subl %eax, %edi
movzwl %di, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rdi, %r14
movl $0x1, 0x86808(%rdi)
leaq 0x80000(%rdi), %r12
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
movl %esi, -0x2c(%rbp)
cmpl -0x2c(%rbp), %eax
je 0x1e9e
movq %rax, -0x38(%rbp)
movl 0x86800(%r14), %ebx
testl %ebx, %ebx
movl $0x0, %eax
cmovgl %ebx, %eax
imulq $0x68, %rax, %rax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x1e2a
andq $0x0, 0x80058(%r14,%rcx)
addq $0x68, %rcx
jmp 0x1e16
xorl %r13d, %r13d
cmpq $0x10000, %r13          # imm = 0x10000
je 0x1e6d
leaq (%r14,%r13,8), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x1e68
movq %r14, %rdi
movq %r15, %rsi
callq 0x2277
movzbl %al, %eax
imulq $0x68, %rax, %rax
movq 0x58(%r12,%rax), %rcx
movq %rcx, 0x60(%r15)
movq %r15, 0x58(%r12,%rax)
addq $0x68, %r15
jmp 0x1e3a
incq %r13
jmp 0x1e2d
movq %r12, %r15
xorl %r13d, %r13d
movslq %ebx, %rax
cmpq %rax, %r13
jge 0x1e93
movq %r15, %rdi
callq 0x17ce
incq %r13
movl 0x86800(%r14), %ebx
addq $0x68, %r15
jmp 0x1e73
movq -0x38(%rbp), %rax
incl %eax
jmp 0x1df2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movl 0x86800(%rdi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
imulq $0x68, %rcx, %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq %rax, %rcx
je 0x1edf
addl 0x80050(%rdi,%rax), %edx
addsd 0x80048(%rdi,%rax), %xmm0
addq $0x68, %rax
jmp 0x1ec4
pushq %rbp
movq %rsp, %rbp
cvtsi2sd %edx, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1efb
sqrtsd %xmm0, %xmm0
jmp 0x1f00
callq 0x1290
mulsd 0xf140(%rip), %xmm0     # 0x11048
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %r14d
movq %rsi, %r15
movl 0x86800(%rdi), %eax
cmpl %edx, %eax
cmovll %eax, %r14d
cmpl $0x0, 0x86808(%rdi)
jne 0x1f4d
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x1dc3
leaq 0x80000(%rbx), %rsi
xorl %edi, %edi
testl %r14d, %r14d
cmovlel %edi, %r14d
xorpd %xmm0, %xmm0
movsd 0xf0e7(%rip), %xmm1     # 0x11050
movsd 0xf0e7(%rip), %xmm2     # 0x11058
movsd 0xf0e7(%rip), %xmm3     # 0x11060
pushq $0x1
popq %r8
pushq $0x2
popq %r9
cmpq %r14, %rdi
je 0x203d
imulq $0x68, %rdi, %rax
movsd 0x20(%rsi,%rax), %xmm7
movsd 0x28(%rsi,%rax), %xmm6
movsd 0x30(%rsi,%rax), %xmm5
cmpl $0x1, 0x8680c(%rbx)
movsd 0x38(%rsi,%rax), %xmm4
sete %al
ucomisd %xmm0, %xmm4
setp %cl
setne %dl
orb %cl, %dl
testb %dl, %al
je 0x1fcc
divsd %xmm4, %xmm7
divsd %xmm4, %xmm6
divsd %xmm4, %xmm5
mulsd %xmm1, %xmm7
cvttsd2si %xmm7, %eax
divsd %xmm2, %xmm6
mulsd %xmm1, %xmm6
cvttsd2si %xmm6, %ecx
movb %al, (%r15)
movb %cl, 0x1(%r15)
divsd %xmm3, %xmm5
mulsd %xmm1, %xmm5
cvttsd2si %xmm5, %eax
movb %al, 0x2(%r15)
mulsd %xmm1, %xmm4
cvttsd2si %xmm4, %eax
movb %al, 0x3(%r15)
xorl %r10d, %r10d
cmpq $0x3, %r10
je 0x2031
movzbl (%r15,%r10), %r11d
movb $0x8, %cl
subb 0x86804(%rbx), %cl
movl %r8d, %eax
shll %cl, %eax
cltd
idivl %r9d
addl %r11d, %eax
andl %r12d, %eax
movb %al, (%r15,%r10)
incq %r10
jmp 0x2006
addq $0x4, %r15
incq %rdi
jmp 0x1f81
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl %edx, 0x86800(%rdi)
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
leaq 0x80038(%rdi), %rcx
movss 0xefaa(%rip), %xmm0     # 0x11010
movss 0xef9a(%rip), %xmm1     # 0x11008
movss 0xef96(%rip), %xmm2     # 0x1100c
cmpq %rax, %rdx
je 0x20ea
movzbl (%rsi,%rax,4), %r8d
cvtsi2ss %r8d, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x18(%rcx)
movzbl 0x1(%rsi,%rax,4), %r8d
cvtsi2ss %r8d, %xmm3
mulss %xmm1, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x10(%rcx)
movzbl 0x2(%rsi,%rax,4), %r8d
cvtsi2ss %r8d, %xmm3
mulss %xmm2, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x8(%rcx)
movzbl 0x3(%rsi,%rax,4), %r8d
cvtsi2ss %r8d, %xmm3
divss %xmm0, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, (%rcx)
incq %rax
addq $0x68, %rcx
jmp 0x2076
movl $0x1, 0x86808(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
xorl %r12d, %r12d
movq %rdi, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x2141
incl %r12d
movq %r15, %rdi
callq *%r14
movsd -0x30(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
addq $0x60, %r15
jmp 0x211c
cmpl $0x2, %r12d
jb 0x21f8
cvtsi2sd %r12d, %xmm0
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
movq %rbx, -0x38(%rbp)
movq (%rbx), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
testq %r15, %r15
je 0x219b
movq 0x60(%r15), %rbx
movq %r15, %rdi
callq *%r14
movsd -0x30(%rbp), %xmm1
ucomisd %xmm0, %xmm1
movq %r13, %rax
cmovaq %r12, %rax
cmovaq %r15, %r12
cmovbeq %r15, %r13
movq %rax, 0x60(%r15)
movq %rbx, %r15
jmp 0x216b
movq %r13, -0x40(%rbp)
movq %r12, -0x48(%rbp)
testq %r12, %r12
je 0x21e8
testq %r13, %r13
je 0x21f1
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x20f6
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x20f6
movq (%r15), %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, %rcx
movq 0x60(%rax), %rax
testq %rax, %rax
jne 0x21d2
movq -0x40(%rbp), %rax
movq %rax, 0x60(%rcx)
jmp 0x21f8
movq -0x38(%rbp), %rax
movq %r13, (%rax)
jmp 0x21f8
movq -0x38(%rbp), %rax
movq %r12, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x15f89(%rip), %xmm1    # 0x181d0
mulsd 0x15f79(%rip), %xmm0    # 0x181c8
addsd %xmm1, %xmm0
movsd 0x10(%rdi), %xmm1
mulsd 0x15f78(%rip), %xmm1    # 0x181d8
addsd %xmm0, %xmm1
movsd 0x18(%rdi), %xmm0
mulsd 0x15f6f(%rip), %xmm0    # 0x181e0
addsd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movl 0x86800(%rdi), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
addq $0x80038, %rdi          # imm = 0x80038
movsd 0xedd1(%rip), %xmm0     # 0x11068
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x22f8
movsd (%rsi), %xmm1
movsd 0x8(%rsi), %xmm2
subsd -0x18(%rdi), %xmm1
subsd -0x10(%rdi), %xmm2
movsd 0x10(%rsi), %xmm3
subsd -0x8(%rdi), %xmm3
movsd 0x18(%rsi), %xmm4
subsd (%rdi), %xmm4
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
mulsd %xmm3, %xmm3
addsd %xmm1, %xmm3
mulsd %xmm4, %xmm4
addsd %xmm3, %xmm4
ucomisd %xmm4, %xmm0
cmoval %edx, %eax
minsd %xmm0, %xmm4
incq %rdx
addq $0x68, %rdi
movapd %xmm4, %xmm0
jmp 0x2299
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 $0x38, %rsp
movq %rcx, -0x38(%rbp)
movq %rdx, %r13
movl %esi, %r12d
movq %rdi, -0x30(%rbp)
cmpl $0x0, 0x86808(%rdi)
jne 0x232e
pushq $0x4
popq %rsi
movq -0x30(%rbp), %rdi
callq 0x1dc3
xorl %r15d, %r15d
testl %r12d, %r12d
cmovlel %r15d, %r12d
movq %r13, %r14
cmpl %r15d, %r12d
je 0x2435
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x2444
movq %rax, %rbx
testq %rax, %rax
je 0x236d
movl 0x24(%rbx), %eax
cmpl $-0x1, %eax
je 0x236d
movq -0x38(%rbp), %rcx
movb %al, (%rcx,%r15)
jmp 0x2429
movzbl (%r13,%r15,4), %eax
cvtsi2ss %eax, %xmm0
movss 0xec85(%rip), %xmm4     # 0x11004
divss %xmm4, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
movzbl 0x1(%r13,%r15,4), %eax
cvtsi2ss %eax, %xmm1
divss %xmm4, %xmm1
mulss 0xec66(%rip), %xmm1     # 0x11008
cvtss2sd %xmm1, %xmm1
movsd %xmm1, -0x50(%rbp)
movzbl 0x2(%r13,%r15,4), %eax
cvtsi2ss %eax, %xmm2
divss %xmm4, %xmm2
mulss 0xec4b(%rip), %xmm2     # 0x1100c
cvtss2sd %xmm2, %xmm2
movsd %xmm2, -0x48(%rbp)
movzbl 0x3(%r13,%r15,4), %eax
cvtsi2ss %eax, %xmm3
divss %xmm4, %xmm3
cvtss2sd %xmm3, %xmm3
movsd %xmm3, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x8680c(%rax)
je 0x2409
mulsd %xmm3, %xmm0
movsd %xmm0, -0x58(%rbp)
mulsd %xmm3, %xmm1
movsd %xmm1, -0x50(%rbp)
mulsd %xmm3, %xmm2
movsd %xmm2, -0x48(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2277
movq -0x38(%rbp), %rcx
movb %al, (%rcx,%r15)
testq %rbx, %rbx
je 0x2429
movzbl %al, %eax
movl %eax, 0x24(%rbx)
addq $0x4, %r14
incq %r15
jmp 0x233b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rsi), %r14d
movzbl 0x1(%rsi), %r15d
movzbl 0x2(%rsi), %r12d
movzbl 0x3(%rsi), %r13d
movl %r15d, %edi
shll $0x8, %edi
movl %r12d, %eax
shll $0x10, %eax
movl %r13d, %ecx
shll $0x18, %ecx
orl %r14d, %edi
orl %eax, %edi
orl %ecx, %edi
callq 0x15fd
movl %eax, %eax
leaq (%rbx,%rax,8), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x24b2
cmpb %r14b, 0x20(%rax)
jne 0x24ac
cmpb %r15b, 0x21(%rax)
jne 0x24ac
cmpb %r12b, 0x22(%rax)
jne 0x24ac
cmpb %r13b, 0x23(%rax)
je 0x24b2
addq $0x68, %rax
jmp 0x248c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
testl %edx, %edx
cmovlel %r13d, %ebx
pushq $0x20
popq %r12
cmpq %r13, %rbx
je 0x2ad6
movzbl (%r14,%r13), %eax
movl %eax, %edi
shrl $0x4, %edi
leal 0x30(%rdi), %ecx
addl $0x37, %edi
cmpl $0xa0, %eax
cmovbl %ecx, %edi
movq %r15, %rsi
callq 0x1140
movzbl (%r14,%r13), %eax
andl $0xf, %eax
leal 0x30(%rax), %ecx
movl %eax, %edi
addl $0x37, %edi
cmpb $0xa, %al
cmovbl %ecx, %edi
movq %r15, %rsi
callq 0x1140
movl %r12d, %edi
movq %r15, %rsi
callq 0x1140
incq %r13
jmp 0x2a84
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
testl %edx, %edx
cmovlel %r13d, %ebx
leaq 0xe598(%rip), %r12      # 0x110a3
cmpq %r13, %rbx
je 0x2b71
testq %r13, %r13
je 0x2b24
leaq 0xe584(%rip), %rdi      # 0x110a0
movq %r15, %rsi
callq 0x1100
movq %r12, %rdi
movq %r15, %rsi
callq 0x1100
movzbl (%r14,%r13), %eax
movl %eax, %edi
shrl $0x4, %edi
leal 0x30(%rdi), %ecx
addl $0x37, %edi
cmpl $0xa0, %eax
cmovbl %ecx, %edi
movq %r15, %rsi
callq 0x1140
movzbl (%r14,%r13), %eax
andl $0xf, %eax
leal 0x30(%rax), %ecx
movl %eax, %edi
addl $0x37, %edi
cmpb $0xa, %al
cmovbl %ecx, %edi
movq %r15, %rsi
callq 0x1140
incq %r13
jmp 0x2b0b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorl %eax, %eax
cmpq %rsi, %rax
jge 0x2bd6
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
jmp 0x2bb7
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x41
popq %rsi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x1220
testl %eax, %eax
js 0x2c41
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_O2/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 0xe44b(%rip), %rsi      # 0x110a6
callq 0x1230
testq %rax, %rax
je 0x2c89
movq %rax, %r14
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x11f0
movq %r14, %rdi
callq 0x1180
cmpq $0x10000000, %rax       # imm = 0x10000000
jle 0x2c8d
pushq $-0x2
jmp 0x2ccc
pushq $-0x1
jmp 0x2ccc
movq %rax, %r15
movq %rax, %rdi
callq 0x11d0
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11f0
pushq $0x1
popq %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x10a0
cmpq %r15, %rax
jne 0x2cca
movq %r14, %rdi
callq 0x10b0
movq %r12, (%rbx)
jmp 0x2cce
pushq $-0x3
popq %r15
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xe3b4(%rip), %rsi      # 0x110a9
callq 0x1230
testq %rax, %rax
je 0x2d2a
movq %rax, %r15
pushq $0x1
popq %rsi
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
pushq $-0x1
popq %rax
jmp 0x2d21
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq -0x1020(%rbp), %r15
movq %r15, %rdi
callq 0x1070
movq %r15, %rdi
callq 0x10d0
movl %eax, %ecx
cmpl $0x2, %ecx
jl 0x2d7f
decq %rcx
movl %ecx, %edx
cmpb $0x2e, -0x1020(%rbp,%rdx)
jne 0x2d69
jmp 0x2d82
movq %rax, %rcx
movslq %ecx, %rax
movb $0x0, -0x1020(%rbp,%rax)
leaq 0xe318(%rip), %rsi      # 0x110ac
leaq -0x1020(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1260
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %rax
leaq 0x1(%rdi), %rcx
movb -0x1(%rcx), %dl
testb %dl, %dl
je 0x2dd4
cmpb $0x2f, %dl
cmoveq %rcx, %rax
incq %rcx
jmp 0x2dc1
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
leaq -0x20(%rbp), %rsi
callq 0x2c46
movq %rax, %rbx
testq %rax, %rax
jle 0x2e73
movq -0x20(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2cda
cmpq %rbx, %rax
pushq $-0x1
popq %rax
cmovneq %rax, %rbx
movq %r15, %rdi
callq 0x1040
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq