LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0xa0aa
movq %rdi, %rdx
leaq 0x5107(%rip), %rax      # 0xf1a0
cmpq %rax, %rdi
jb 0xa0ac
addq 0x50f3(%rip), %rax      # 0xf198
cmpq %rdx, %rax
jb 0xa0ac
popq %rbx
retq
cmpq $0x0, 0x1050ec(%rip)    # 0x10f1a0
je 0xa0f5
leaq -0x10(%rdx), %rbx
movl $0xdeadc0de, %eax       # imm = 0xDEADC0DE
cmpq %rax, -0x8(%rdx)
jne 0xa10e
movq 0x50a4(%rip), %rsi      # 0xf170
subq (%rbx), %rsi
movq %rsi, 0x509a(%rip)      # 0xf170
movq 0x50a3(%rip), %rax      # 0xf180
testq %rax, %rax
je 0xa0eb
movq 0x509f(%rip), %rdi      # 0xf188
callq *%rax
movq %rbx, %rdi
popq %rbx
jmpq *0x1050ab(%rip)         # 0x10f1a0
movq 0x4efc(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x1a1a(%rip), %rsi      # 0xbb20
xorl %eax, %eax
popq %rbx
jmp 0x2190
movq 0x4ee3(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x1a48(%rip), %rsi      # 0xbb67
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2190
jmp 0xa0c5
// File: /workspace/github_c_makefile_star2_O1/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 0xa14e
movq %rbx, %rdi
callq 0x9fd2
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_O1/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 0x180d(%rip), %rsi      # 0xbaa8
movl $0x1, %edi
callq 0x21f0
callq 0x2030
leaq 0x193d(%rip), %rsi      # 0xbbee
movq $-0x1, %rdi
callq 0x2230
movq %rax, 0x4ecc(%rip)      # 0xf190
callq 0x2030
testq %rax, %rax
jne 0xa318
leaq 0x193b(%rip), %rsi      # 0xbc10
movq $-0x1, %rdi
callq 0x2230
movq %rax, 0x104ec0(%rip)    # 0x10f1a8
callq 0x2030
testq %rax, %rax
jne 0xa320
leaq 0x191f(%rip), %rsi      # 0xbc18
movq $-0x1, %rdi
callq 0x2230
movq %rax, 0x104e94(%rip)    # 0x10f1a0
callq 0x2030
testq %rax, %rax
jne 0xa328
popq %rax
retq
movq %rax, %rdi
callq 0x27da
movq %rax, %rdi
callq 0x27fe
movq %rax, %rdi
callq 0x2822
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x7, %r15d
movq 0x10(%rsp), %rdi
vmovups (%rdi), %xmm0
vmovaps %xmm0, 0x30(%rsp)
movq %r13, %rsi
movq %rdi, %rdx
callq 0x1040
movq %r13, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1040
movq %r12, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1040
movq %rbx, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1040
movq %rbp, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1040
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
movq %r14, %rdx
callq 0x1040
vmovdqa 0x20(%rsp), %xmm0
vpxor (%r14), %xmm0, %xmm0
vmovdqu %xmm0, (%r14)
decl %r15d
jne 0x12ac
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 0x1090
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x11e7
movq (%r15), %rax
movq %rax, 0x2eab(%rip)      # 0x4090
jmp 0x11ea
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x1050
testq %r15, %r15
je 0x120b
movq %r14, %rdi
xorl %eax, %eax
callq 0x1040
movq %r15, %rdi
callq 0x1030
jmp 0x11c7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x2e5a(%rip)      # 0x4090
leaq -0x8e(%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_O1/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 0x64e2
cmpl $0x0, 0x10(%rdx)
je 0x64e2
pushq %r14
pushq %rbx
movl 0x14(%rdx), %r8d
movq 0x8(%rdx), %rcx
movl %esi, %esi
leaq (%rcx,%rsi), %rdx
movl %r8d, %r9d
negl %r9d
xorl %r10d, %r10d
leaq 0x5785(%rip), %r11      # 0xbc10
movl %r8d, %ebx
testl %ebx, %ebx
jg 0x64a0
xorl %eax, %eax
cmpl %r10d, %esi
je 0x64df
cmpb $0x0, (%rdi,%r10)
je 0x64df
leaq (%r9,%r10), %rax
testl %eax, %eax
je 0x64c8
cmpl %r10d, %esi
je 0x64d5
movzbl (%rdi,%r10), %eax
testl %eax, %eax
je 0x64cf
movzbl (%rcx,%r10), %r14d
cmpb (%r14,%r11), %al
jne 0x64dc
decl %ebx
incq %r10
jmp 0x648e
movzbl (%rdi,%r8), %eax
jmp 0x64df
addq %r10, %rcx
movq %rcx, %rdx
movzbl (%rdx), %eax
negl %eax
jmp 0x64df
subl %r14d, %eax
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9879
cmpl $0x0, 0x829c(%rip)      # 0x11ac8
jne 0x9879
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2a55(%rip), %r12      # 0xc298
leaq 0x4f1b(%rip), %r15      # 0xe765
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 0x4ae3
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x984a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x8478(%rip), %rax      # 0x11d10
testq %rax, %rax
je 0x98a9
movq (%rax), %rcx
movq %rcx, 0x8469(%rip)      # 0x11d10
jmp 0x98b8
movl $0x28, %edi
callq 0x2140
testq %rax, %rax
je 0x98e7
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 0x98de
movq (%rbx), %rcx
movq %rax, (%rcx)
movq %rax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2308
// File: /workspace/github_c_makefile_star2_O1/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 0x991f
movq 0x20(%rbx), %rcx
leaq 0x2523(%rip), %rsi      # 0xbe31
leaq 0x4ca6(%rip), %rdx      # 0xe5bb
movq %r15, %rdi
xorl %eax, %eax
callq 0x4ae3
cmpl $0x0, 0x34(%rbx)
je 0x9944
leaq 0x2505(%rip), %rsi      # 0xbe31
leaq 0x4ca0(%rip), %rdx      # 0xe5d3
movq %r15, %rdi
xorl %eax, %eax
callq 0x4ae3
movl $0x0, 0x34(%rbx)
movl 0x30(%rbx), %eax
movl %eax, 0x34(%rbx)
movl $0x0, 0x30(%rbx)
movq $0x0, 0x8(%rbx)
movq (%rbx), %rax
testq %rax, %rax
je 0x9974
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %rax
movq %rax, 0x20(%rbx)
movq $0x0, (%rbx)
testq %r14, %r14
je 0x999c
movl 0x20(%r14), %eax
testb $0x2, %al
jne 0x998e
testb $0x1, %al
je 0x999c
leaq 0x28f4(%rip), %rax      # 0xc280
jmp 0x9995
leaq 0x291f(%rip), %rax      # 0xc2b4
movq %r14, (%rbx)
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rax
cmpq (%rbx), %rax
jne 0x99ad
movq $0x0, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9b8e
xorl %esi, %esi
cmpb $0x7c, %dl
setne %dil
testl %esi, %esi
setg %r8b
orb %dil, %r8b
cmpb $0x1, %r8b
jne 0x9b89
cmpb $0x7d, %dl
jne 0x9b72
testl %esi, %esi
jle 0x9b8e
decl %esi
xorl %edi, %edi
cmpb $0x7b, %dl
sete %dil
addl %edi, %esi
movb 0x1(%rax), %dl
incq %rax
testb %dl, %dl
jne 0x9b51
jmp 0x9b8e
movl $0x1, %ecx
addq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x9c6a
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
movb (%rax), %al
movzbl %al, %ecx
cmpl $0x4e, %ecx
jg 0x9bda
cmpl $0x41, %ecx
je 0x9bed
cmpl $0x2a, %ecx
jne 0x9c0d
jmp 0x9c20
cmpl $0x52, %ecx
jne 0x9c08
movl -0x4(%r13), %ecx
cmpl (%r13), %ecx
jge 0x9c20
cmpb $0x41, %al
jne 0x9c0d
movq -0x14(%r13), %rdi
callq 0x9b44
movq %rax, -0x14(%r13)
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x9c0d
cmpl $0x7d, %ecx
je 0x9c0d
jmp 0x9c7b
cmpl $0x4f, %ecx
je 0x9c20
leaq -0x1(%r12), %rax
addq $-0x28, %r13
testq %r12, %r12
movq %rax, %r12
jg 0x9bc0
jmp 0x9c6a
movq -0x14(%r13), %rax
xorl %ecx, %ecx
movzbl (%rax), %edx
cmpl $0x7d, %edx
je 0x9c34
testl %edx, %edx
jne 0x9c3a
jmp 0x9c4a
testl %ecx, %ecx
jle 0x9c4a
decl %ecx
xorl %esi, %esi
cmpb $0x7b, %dl
sete %sil
addl %esi, %ecx
incq %rax
jmp 0x9c26
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 0x9c62
nop
// File: /workspace/github_c_makefile_star2_O1/NedFreed[P]msglint/md5c.c
// Function: MD5Init
void MD5Init(MD5_CTX *context)
{
    context->count[0] = context->count[1] = 0;
    /* Load magic initialization constants.
     */
    context->state[0] = 0x67452301;
    context->state[1] = 0xefcdab89;
    context->state[2] = 0x98badcfe;
    context->state[3] = 0x10325476;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movq $0x67452301, (%rdi)     # imm = 0x67452301
movl $0x98badcfe, %eax       # imm = 0x98BADCFE
leaq 0x5712ce8b(%rax), %rcx
movq %rcx, 0x8(%rdi)
movq %rax, 0x10(%rdi)
movq $0x10325476, 0x18(%rdi) # imm = 0x10325476
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rsi, %r14
movq %rdi, %r15
movq 0x20(%rdi), %rcx
movl %ecx, %r13d
shrl $0x3, %r13d
andl $0x3f, %r13d
movl %edx, %eax
leaq (,%rax,8), %rdx
addq %rcx, %rdx
movq %rdx, 0x20(%rdi)
jae 0x9ea4
incq 0x28(%r15)
shrl $0x1d, %eax
addq %rax, 0x28(%r15)
movl $0x40, %ebp
subl %r13d, %ebp
cmpl %ebx, %ebp
jbe 0x9ebe
movl %r13d, %eax
xorl %ebp, %ebp
jmp 0x9f10
leaq 0x30(%r15), %r12
movl %r13d, %eax
leaq (%r15,%rax), %rdi
addq $0x30, %rdi
movl %ebp, %edx
movq %r14, %rsi
callq 0x2120
movq %r15, %rdi
movq %r12, %rsi
callq 0x9f38
xorl $0x7f, %r13d
cmpl %ebx, %r13d
jae 0x9f0e
leal -0x3f(%r13), %esi
addq %r14, %rsi
movq %r15, %rdi
callq 0x9f38
addl $0x40, %r13d
cmpl %ebx, %r13d
jb 0x9eeb
addl $-0x3f, %r13d
xorl %eax, %eax
movl %r13d, %ebp
jmp 0x9f10
xorl %eax, %eax
leaq (%r15,%rax), %rdi
addq $0x30, %rdi
movl %ebp, %eax
addq %rax, %r14
subl %ebp, %ebx
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2120
// File: /workspace/github_c_makefile_star2_O1/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 0xabd0
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 0x6e50(%rip), %rsi      # 0x11a50
movq %rbx, %rdi
callq 0x9e6b
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x9e6b
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 0xac1a
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_O1/eric-lo[P]3150/12-VirtualMemory/same_addr.c
// Function: main
int main(void) {
	int pid;
	pid = fork();
	printf("PID %d: %p.\n", getpid(), &pid);
	if(pid)
		wait(NULL);
	return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
callq 0x1060
leaq 0xc(%rsp), %rbx
movl %eax, (%rbx)
callq 0x1030
leaq 0xe7b(%rip), %rdi       # 0x2004
movl %eax, %esi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1040
cmpl $0x0, (%rbx)
je 0x11a1
xorl %edi, %edi
callq 0x1050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/DavidSM64[P]n64graphics_ci/n64graphics_ci.c
// Function: print_usage
static void print_usage(void)
{
    ERROR("Usage: n64graphics_ci -e/-i BIN_FILE -g PNG_FILE [-o offset] [-f FORMAT] [-w WIDTH] [-h HEIGHT] [-V]\n"
        "\n"
        "n64graphics v" N64GRAPHICS_VERSION ": N64 graphics manipulator\n"
        "\n"
        "Required arguments:\n"
        " -e BIN_FILE  export from BIN_FILE to PNG_FILE\n"
        " -i BIN_FILE  import from PNG_FILE to BIN_FILE\n"
        " -g PNG_FILE  graphics file to import/export (.png)\n"
        "Optional arguments:\n"
        " -o OFFSET    starting offset in BIN_FILE (prevents truncation during import)\n"
        " -f FORMAT    texture format: ci4, ci8 (default: %s)\n"
        " -w WIDTH     export texture width (default: %d)\n"
        " -h HEIGHT    export texture height (default: %d)\n"
        " -v           verbose logging\n"
        " -V           print version information\n",
        format2str(default_config.format, default_config.depth),
        default_config.width,
        default_config.height);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18d0e(%rip), %rax     # 0x19ff0
movq (%rax), %rdi
xorl %eax, %eax
leaq 0x18ac2(%rip), %rcx     # 0x19db0
leaq 0x151b8(%rip), %rdx     # 0x164ad
cmpl $0x0, 0x8(%rax,%rcx)
jne 0x1303
cmpl $0x8, 0xc(%rax,%rcx)
je 0x130f
addq $0x10, %rax
cmpq $0x10, %rax
je 0x12f5
jmp 0x1313
movq (%rax,%rcx), %rdx
leaq 0x14f09(%rip), %rsi     # 0x16223
movl $0x20, %ecx
movl %ecx, %r8d
xorl %eax, %eax
popq %rbp
jmp 0x1160
// File: /workspace/github_c_makefile_star2_O1/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 0x11c0
movq %rax, %rbx
movl $0x80000, %edx          # imm = 0x80000
movq %rax, %rdi
xorl %esi, %esi
callq 0x1110
movaps 0x11b0b(%rip), %xmm0    # 0x13010
movups %xmm0, 0x86800(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1550
movq 0x68(%rdi), %r15
callq 0x1040
movq %r15, %rdi
testq %r15, %r15
jne 0x153f
incq %r14
cmpq $0x10000, %r14          # imm = 0x10000
jne 0x1536
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
movl $0x1, 0x86808(%rdi)
movl %esi, -0x2c(%rbp)
testl %esi, %esi
jle 0x2062
movq %rdi, %r14
leaq 0x80000(%rdi), %r12
xorl %r13d, %r13d
movslq 0x86800(%r14), %rax
testq %rax, %rax
jle 0x1fee
imulq $0x68, %rax, %rax
xorl %ecx, %ecx
movq $0x0, 0x80058(%r14,%rcx)
addq $0x68, %rcx
cmpq %rcx, %rax
jne 0x1fd9
xorl %ebx, %ebx
movq (%r14,%rbx,8), %r15
testq %r15, %r15
je 0x201f
movq %r14, %rdi
movq %r15, %rsi
callq 0x2471
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 0x1ff4
incq %rbx
cmpq $0x10000, %rbx          # imm = 0x10000
jne 0x1ff0
cmpl $0x0, 0x86800(%r14)
jle 0x2055
movq %r12, %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x1912
incq %rbx
movslq 0x86800(%r14), %rax
addq $0x68, %r15
cmpq %rax, %rbx
jl 0x203a
incl %r13d
cmpl -0x2c(%rbp), %r13d
jne 0x1fc7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x20ac
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 0x2089
cvtsi2sd %edx, %xmm1
divsd %xmm1, %xmm0
jmp 0x20b4
movsd 0x10fa4(%rip), %xmm0    # 0x13058
pushq %rbp
movq %rsp, %rbp
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x20c8
sqrtsd %xmm0, %xmm0
jmp 0x20cd
callq 0x1280
mulsd 0x10f8b(%rip), %xmm0    # 0x13060
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x211c
movq %rbx, %rdi
movl $0x4, %esi
callq 0x1f97
testl %r15d, %r15d
jle 0x2210
leaq 0x80000(%rbx), %rax
movl %r15d, %edx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd 0x10f2b(%rip), %xmm1    # 0x13068
movsd 0x10f2b(%rip), %xmm2    # 0x13070
movsd 0x10f2b(%rip), %xmm3    # 0x13078
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 0x2193
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 0x21cc
addq $0x4, %r14
incq %rsi
cmpq %rdx, %rsi
jne 0x214d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x22cd
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
leaq 0x80038(%rdi), %rcx
xorl %edx, %edx
movss 0x10e0e(%rip), %xmm0    # 0x1304c
movss 0x10dfe(%rip), %xmm1    # 0x13044
movss 0x10dfa(%rip), %xmm2    # 0x13048
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 0x224e
popq %rbp
movl $0x1, 0x86808(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/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
movq (%rdi), %r15
testq %r15, %r15
je 0x2320
xorl %r13d, %r13d
xorpd %xmm1, %xmm1
movsd %xmm1, -0x38(%rbp)
incl %r13d
movq %r15, %rdi
callq *%r14
movsd -0x38(%rbp), %xmm1
addsd %xmm0, %xmm1
movq 0x60(%r15), %r15
testq %r15, %r15
jne 0x22fe
jmp 0x2327
xorpd %xmm1, %xmm1
xorl %r13d, %r13d
cmpl $0x2, %r13d
jb 0x23f2
xorl %r12d, %r12d
movq %r12, -0x40(%rbp)
movq %r12, -0x48(%rbp)
movq %rbx, -0x30(%rbp)
movq (%rbx), %r15
movl $0x0, %ebx
testq %r15, %r15
je 0x2391
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
divsd %xmm0, %xmm1
xorl %ebx, %ebx
xorl %r12d, %r12d
movsd %xmm1, -0x38(%rbp)
movq 0x60(%r15), %r13
movq %r15, %rdi
callq *%r14
movsd -0x38(%rbp), %xmm1
ucomisd %xmm0, %xmm1
movq %rbx, %rax
cmovaq %r12, %rax
cmovaq %r15, %r12
cmovbeq %r15, %rbx
movq %rax, 0x60(%r15)
movq %r13, %r15
testq %r13, %r13
jne 0x2363
movq %rbx, -0x40(%rbp)
movq %r12, -0x48(%rbp)
testq %r12, %r12
je 0x23e2
testq %rbx, %rbx
je 0x23eb
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x22d8
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x22d8
movq (%r15), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq %rcx, %rax
movq 0x60(%rcx), %rcx
testq %rcx, %rcx
jne 0x23c8
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, 0x60(%rax)
jmp 0x23f2
movq -0x30(%rbp), %rax
movq %rbx, (%rax)
jmp 0x23f2
movq -0x30(%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_O1/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 0x17d7f(%rip), %xmm1    # 0x1a1c0
mulsd 0x17d6f(%rip), %xmm0    # 0x1a1b8
addsd %xmm1, %xmm0
movsd 0x10(%rdi), %xmm1
mulsd 0x17d6e(%rip), %xmm1    # 0x1a1c8
addsd %xmm0, %xmm1
movsd 0x18(%rdi), %xmm0
mulsd 0x17d65(%rip), %xmm0    # 0x1a1d0
addsd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x250d
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 0x10bd7(%rip), %xmm4    # 0x13080
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 0x24ab
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2542
movq %r15, %rdi
movl $0x4, %esi
callq 0x1f97
testl %r12d, %r12d
jle 0x2647
movl %r12d, %r12d
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2656
movq %rax, %r13
testq %rax, %rax
je 0x2578
movl 0x24(%r13), %eax
cmpl $-0x1, %eax
je 0x2578
movq -0x30(%rbp), %rcx
movb %al, (%rcx,%rbx)
jmp 0x2637
movzbl (%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0x10ab5(%rip), %xmm4    # 0x13040
divss %xmm4, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
movzbl 0x1(%r14), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
divss %xmm4, %xmm1
mulss 0x10a94(%rip), %xmm1    # 0x13044
cvtss2sd %xmm1, %xmm1
movsd %xmm1, -0x48(%rbp)
movzbl 0x2(%r14), %eax
xorps %xmm2, %xmm2
cvtsi2ss %eax, %xmm2
divss %xmm4, %xmm2
mulss 0x10a77(%rip), %xmm2    # 0x13048
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 0x2618
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 0x2471
movq -0x30(%rbp), %rcx
movb %al, (%rcx,%rbx)
testq %r13, %r13
je 0x2637
movzbl %al, %eax
movl %eax, 0x24(%r13)
addq $0x4, %r14
incq %rbx
cmpl %ebx, %r12d
jne 0x2550
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x26e3
pushq %rbp
movq %rsp, %rbp
cmpb %cl, 0x20(%rax)
jne 0x26d9
cmpb %dl, 0x21(%rax)
jne 0x26d9
cmpb %r8b, 0x22(%rax)
jne 0x26d9
cmpb %sil, 0x23(%rax)
je 0x26e2
movq 0x68(%rax), %rax
testq %rax, %rax
jne 0x26c3
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2cea
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 0x2c90
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2d86
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 0x103af(%rip), %r15     # 0x130c3
testq %r12, %r12
je 0x2d28
leaq 0x103a0(%rip), %rdi     # 0x130c0
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 0x2d14
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2de3
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 0x2dc6
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1210
testl %eax, %eax
js 0x2e50
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_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x10259(%rip), %rsi     # 0x130c6
callq 0x1220
testq %rax, %rax
je 0x2eed
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x11e0
movq %r14, %rdi
callq 0x1170
movq %rax, %r15
movq $-0x2, %rax
cmpq $0x10000000, %r15       # imm = 0x10000000
jg 0x2ef4
movq %r15, %rdi
callq 0x11c0
movq %rax, %r12
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11e0
movl $0x1, %esi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x10a0
movq %rax, %r13
movq $-0x3, %rax
cmpq %r15, %r13
jne 0x2ef4
movq %r14, %rdi
callq 0x10b0
movq %r12, (%rbx)
movq %r13, %rax
jmp 0x2ef4
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x101ab(%rip), %rsi     # 0x130c9
callq 0x1220
testq %rax, %rax
je 0x2f55
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x1270
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 0x1230
movq $-0x1, %rax
jmp 0x2f4c
// File: /workspace/github_c_makefile_star2_O1/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
testl %eax, %eax
movl $0x1, %ecx
cmovlel %eax, %ecx
movl %eax, %edi
leal -0x1(%rcx), %esi
decq %rdi
movl %eax, %edx
cmpl $0x2, %edx
jl 0x2fc7
movl %edi, %r8d
decl %edx
decq %rdi
cmpb $0x2e, -0x1020(%rbp,%r8)
jne 0x2faa
leal 0x1(%rdx), %ecx
jmp 0x2fc9
movl %esi, %edx
cmpl $0x2, %ecx
cmovll %eax, %edx
movslq %edx, %rax
movb $0x0, -0x1020(%rbp,%rax)
leaq 0x100eb(%rip), %rsi     # 0x130cc
leaq -0x1020(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1250
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq %rdi, %rax
movb (%rdi), %cl
testb %cl, %cl
je 0x3025
pushq %rbp
movq %rsp, %rbp
leaq 0x1(%rax), %rdx
cmpb $0x2f, %cl
cmoveq %rdx, %rax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x3014
popq %rbp
retq