LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_get_info
lv_res_t lv_img_decoder_get_info(const char * src, lv_img_header_t * header)
{
    header->always_zero = 0;

    lv_res_t res = LV_RES_INV;
    lv_img_decoder_t * d;
    LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d)
    {
        res = LV_RES_INV;
        if(d->info_cb) {
            res = d->info_cb(d, src, header);
            if(res == LV_RES_OK) break;
        }
    }

    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
andb $0x1f, (%rsi)
leaq 0x2c04f(%rip), %r15     # 0x66588
movq %r15, %rdi
callq 0x27db9
movq %rax, %r12
xorl %ebp, %ebp
testq %r12, %r12
je 0x3a57c
movq (%r12), %rax
testq %rax, %rax
je 0x3a567
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *%rax
movl %eax, %ebp
cmpb $0x1, %al
jne 0x3a569
jmp 0x3a579
xorl %ebp, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x27e93
movq %rax, %r12
jmp 0x3a546
movb $0x1, %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_open
lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const lv_style_t * style)
{
    dsc->style     = style;
    dsc->src_type  = lv_img_src_get_type(src);
    dsc->user_data = NULL;

    if(dsc->src_type == LV_IMG_SRC_FILE) {
        size_t fnlen = strlen(src);
        dsc->src = lv_mem_alloc(fnlen + 1);
        strcpy((char *)dsc->src, src);
    } else {
        dsc->src       = src;
    }

    lv_res_t res = LV_RES_INV;

    lv_img_decoder_t * d;
    LV_LL_READ(LV_GC_ROOT(_lv_img_defoder_ll), d)
    {
        /*Info an Open callbacks are required*/
        if(d->info_cb == NULL || d->open_cb == NULL) continue;

        res = d->info_cb(d, src, &dsc->header);
        if(res != LV_RES_OK) continue;

        dsc->error_msg = NULL;
        dsc->img_data  = NULL;
        dsc->decoder   = d;

        res = d->open_cb(d, dsc);

        /*Opened successfully. It is a good decoder to for this image source*/
        if(res == LV_RES_OK) break;
    }

    if(res == LV_RES_INV) {
        memset(dsc, 0, sizeof(lv_img_decoder_dsc_t));
    }

    return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, 0x10(%rdi)
movq %rsi, %rdi
callq 0x389cd
movb %al, 0x18(%rbx)
andq $0x0, 0x38(%rbx)
cmpb $0x1, %al
jne 0x3a5d2
movq %r14, %rdi
callq 0x2070
leaq 0x1(%rax), %rdi
callq 0x279f9
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2040
jmp 0x3a5d6
movq %r14, 0x8(%rbx)
leaq 0x2bfab(%rip), %r15     # 0x66588
movq %r15, %rdi
callq 0x27db9
movq %rax, %r13
leaq 0x1c(%rbx), %r12
xorl %ebp, %ebp
testq %r13, %r13
je 0x3a63f
movq (%r13), %rax
testq %rax, %rax
je 0x3a62f
cmpq $0x0, 0x8(%r13)
je 0x3a62f
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *%rax
cmpb $0x1, %al
jne 0x3a62d
andq $0x0, 0x30(%rbx)
andq $0x0, 0x20(%rbx)
movq %r13, (%rbx)
movq %r13, %rdi
movq %rbx, %rsi
callq *0x8(%r13)
cmpb $0x1, %al
je 0x3a65a
movl %eax, %ebp
movq %r15, %rdi
movq %r13, %rsi
callq 0x27e93
movq %rax, %r13
jmp 0x3a5ee
testb %bpl, %bpl
jne 0x3a65d
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %ebp, %ebp
jmp 0x3a65d
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_decoder.c
// Function: lv_img_decoder_close
void lv_img_decoder_close(lv_img_decoder_dsc_t * dsc)
{
    if(dsc->decoder) {
        if(dsc->decoder->close_cb) dsc->decoder->close_cb(dsc->decoder, dsc);

        if(dsc->src_type == LV_IMG_SRC_FILE) {
            lv_mem_free(dsc->src);
            dsc->src = NULL;
        }
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x3a6c9
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3a6b5
movq %rbx, %rsi
callq *%rax
cmpb $0x1, 0x18(%rbx)
jne 0x3a6c9
movq 0x8(%rbx), %rdi
callq 0x27a7a
andq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_cache.c
// Function: lv_img_cache_set_size
void lv_img_cache_set_size(uint16_t new_entry_cnt)
{
    if(LV_GC_ROOT(_lv_img_cache_array) != NULL) {
        /*Clean the cache before free it*/
        lv_img_cache_invalidate_src(NULL);
        lv_mem_free(LV_GC_ROOT(_lv_img_cache_array));
    }

    /*Reallocate the cache*/
    LV_GC_ROOT(_lv_img_cache_array) = lv_mem_alloc(sizeof(lv_img_cache_entry_t) * new_entry_cnt);
    LV_ASSERT_MEM(LV_GC_ROOT(_lv_img_cache_array));
    if(LV_GC_ROOT(_lv_img_cache_array) == NULL) {
        entry_cnt = 0;
        return;
    }
    entry_cnt = new_entry_cnt;

    /*Clean the cache*/
    uint16_t i;
    for(i = 0; i < entry_cnt; i++) {
        memset(&LV_GC_ROOT(_lv_img_cache_array)[i].dec_dsc, 0, sizeof(lv_img_decoder_dsc_t));
        memset(&LV_GC_ROOT(_lv_img_cache_array)[i], 0, sizeof(lv_img_cache_entry_t));
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %ebp
leaq 0x2bd22(%rip), %r14     # 0x665a0
cmpq $0x0, (%r14)
je 0x3a893
xorl %edi, %edi
callq 0x3a91d
movq (%r14), %rdi
callq 0x27a7a
movzwl %bp, %eax
imulq $0x48, %rax, %rbx
movq %rbx, %rdi
callq 0x279f9
movq %rax, (%r14)
movq %rax, %rdi
callq 0x7994
movq (%r14), %rsi
testb %al, %al
je 0x3a902
testq %rsi, %rsi
je 0x3a910
movw %bp, 0x35234(%rip)      # 0x6faf4
xorl %eax, %eax
xorps %xmm0, %xmm0
cmpq %rax, %rbx
je 0x3a918
movq (%r14), %rcx
movups %xmm0, 0x30(%rcx,%rax)
movups %xmm0, 0x20(%rcx,%rax)
movups %xmm0, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
movq (%r14), %rcx
movups %xmm0, 0x30(%rcx,%rax)
movups %xmm0, 0x20(%rcx,%rax)
movups %xmm0, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
andq $0x0, 0x40(%rcx,%rax)
addq $0x48, %rax
jmp 0x3a8c5
leaq 0x737(%rip), %rdi       # 0x3b040
callq 0x7b01
jmp 0x3a90e
andw $0x0, 0x351dc(%rip)     # 0x6faf4
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lvgl/src/lv_draw/lv_img_cache.c
// Function: lv_img_cache_invalidate_src
void lv_img_cache_invalidate_src(const void * src)
{

    lv_img_cache_entry_t * cache = LV_GC_ROOT(_lv_img_cache_array);

    uint16_t i;
    for(i = 0; i < entry_cnt; i++) {
        if(cache[i].dec_dsc.src == src || src == NULL) {
            if(cache[i].dec_dsc.src != NULL) {
                lv_img_decoder_close(&cache[i].dec_dsc);
            }

            memset(&cache[i].dec_dsc, 0, sizeof(lv_img_decoder_dsc_t));
            memset(&cache[i], 0, sizeof(lv_img_cache_entry_t));
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2bc74(%rip), %rax     # 0x665a0
movq (%rax), %r14
movzwl 0x351be(%rip), %eax     # 0x6faf4
xorl %r15d, %r15d
movzwl %ax, %ecx
cmpq %rcx, %r15
jae 0x3a98f
testq %rbx, %rbx
setne %dl
movq 0x8(%r14), %rcx
cmpq %rbx, %rcx
setne %sil
testb %sil, %dl
jne 0x3a986
testq %rcx, %rcx
je 0x3a96b
movq %r14, %rdi
callq 0x3a69b
movzwl 0x35189(%rip), %eax     # 0x6faf4
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
andq $0x0, 0x40(%r14)
incq %r15
addq $0x48, %r14
jmp 0x3a939
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lv_drivers/indev/XPT7603.c
// Function: om_i2c_read
uint16_t om_i2c_read(int addr) {
    int 	status, size;
// 	char 	pathname[255];
	int     numBytes = 2;
	int     devAddr = 0x48;
	int     fd;
    uint8_t buffer[2];
    uint16_t ret = 0;

	//// define the path to open
	//status = sprintf(pathname, I2C_DEV_PATH);
    fd = open(I2C_DEV_PATH, O_RDWR);
    
    //// set the device address
    // set to 7-bit addr
	if ( ioctl(fd, I2C_TENBIT, 0) < 0 ) {
		return EXIT_FAILURE;
	}

	//// write the  address
	if ( ioctl(fd, I2C_SLAVE, devAddr) < 0 ) {
		return EXIT_FAILURE;
	}
	
	//// set addr
	// clear the buffer
	memset( buffer, 0, numBytes );
	// push the address and data values into the buffer
	buffer[0]	= (addr & 0xff);
	size 		= 1;

	// write to the i2c device
	status = write(fd, buffer, size);
	
	// read from the i2c device
	size 	= numBytes;
	status 	= read(fd, &buffer, size);
	
	ret = (buffer[0] & 0xff) << 8;
	ret += buffer[1] & 0xff;
	
	// release the device file handle
	if ( close(fd) < 0 ) {
		return EXIT_FAILURE;
	}
	
	return ret;
 }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %r14d
leaq 0x47d8(%rip), %rdi      # 0x3f4e2
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x2100
movl %eax, %ebp
movl $0x704, %esi            # imm = 0x704
movl %eax, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x20b0
movw $0xffff, %bx            # imm = 0xFFFF
testl %eax, %eax
js 0x3ad8b
pushq $0x48
popq %rdx
movl $0x703, %esi            # imm = 0x703
movl %ebp, %edi
xorl %eax, %eax
callq 0x20b0
testl %eax, %eax
js 0x3ad8b
leaq 0xe(%rsp), %r15
andw $0x0, (%r15)
movb %r14b, (%r15)
pushq $0x1
popq %rdx
movl %ebp, %edi
movq %r15, %rsi
callq 0x2060
pushq $0x2
popq %rdx
movl %ebp, %edi
movq %r15, %rsi
callq 0x20d0
movzbl (%r15), %r12d
movzbl 0x1(%r15), %r14d
movl %ebp, %edi
callq 0x20c0
testl %eax, %eax
js 0x3ad8b
movzwl %r12w, %eax
shll $0x8, %eax
movzwl %r14w, %ebx
orl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/OnionIoT[P]lv_example/lv_drivers/indev/XPT7603.c
// Function: om_read_gpio
int om_read_gpio(int gpioNumber) {
    int  m_mfd;
    int regAddrOffset = GPIO_REG_DATA0_OFFSET;
    unsigned long int 	value = 0x0;
    int gpioVal;

    if (regAddress == NULL){
	    if ((m_mfd = open("/dev/mem", O_RDWR)) < 0)
	    {
		    return EXIT_FAILURE;	// maybe return -1
	    }
	    regAddress = (unsigned long int*)mmap(NULL, 
						  1024, 
						  PROT_READ|PROT_WRITE, 
						  MAP_FILE|MAP_SHARED, 
						  m_mfd, 
						  GPIO_REG_BLOCK_ADDR
						 );
	    close(m_mfd);
    }
    
	// read the value 
	value = *(regAddress + regAddrOffset);
// 	printf("GPIO_DATA_0 = 0x%08x\n", value);
	
	gpioVal = ((value >> gpioNumber) & 0x1);
// 	printf("gpioVal = %d\n", gpioVal);
	
	return gpioVal;
 }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movq 0x34e5a(%rip), %rax     # 0x6fc00
testq %rax, %rax
jne 0x3adf2
leaq 0x473b(%rip), %rdi      # 0x3f4ed
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x3ae09
movl %eax, %ebp
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
movl $0x400, %esi            # imm = 0x400
movl $0x10000000, %r9d       # imm = 0x10000000
xorl %edi, %edi
movl %eax, %r8d
callq 0x2080
movq %rax, 0x34e1c(%rip)     # 0x6fc00
movl %ebp, %edi
callq 0x20c0
movq 0x34e0e(%rip), %rax     # 0x6fc00
movq 0xc40(%rax), %rcx
xorl %eax, %eax
btq %rbx, %rcx
setb %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
pushq $-0x1
popq %rax
jmp 0x3ae02
// File: /workspace/github_c_makefile_star2_O2/diaxen[P]fft-garden/./ct_bf.h
// Function: ct_dit_bf2_0
static inline void
ct_dit_bf2_0(unsigned so, unsigned si,
	 complex double * out,
         const complex double * in)
{
  complex double a = in[0];
  complex double b = in[si];
  out[0] = a + b;
  out[so] = a - b;
}

// Assembly:
movl %edi, %eax
shlq $0x4, %rax
movupd (%rdx), %xmm0
movupd (%rdx,%rax), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rsi)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_new
diff_node_t *diff_node_new(diff_node_t *parent, char *name, diff_type_t type)
{
  int len;
  diff_node_t *new;

  new = (diff_node_t *)malloc(sizeof(diff_node_t));

  if (name == NULL) {
    new->name = NULL;
  } else {
    len = strlen(name) + 1;
    new->name = (char *)malloc(len);
    strncpy(new->name, name, len);
  }
  new->type = type;
  new->no_of_subnodes = 0;
  new->parent = parent;
  new->subnode = NULL;
  new->expanded = true;

  return new;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x2220
movq %rax, %r14
testq %r15, %r15
je 0x2437
movq %r15, %rdi
callq 0x2100
incl %eax
movslq %eax, %r13
movq %r13, %rdi
callq 0x2220
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2090
jmp 0x243a
xorl %r12d, %r12d
movq %r12, 0x8(%r14)
movl %ebp, 0x4(%r14)
andl $0x0, 0x18(%r14)
movq %rbx, 0x10(%r14)
andq $0x0, 0x20(%r14)
movb $0x1, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_add
diff_node_t *diff_node_add(diff_node_t *current, char *name, diff_type_t type)
{
  diff_node_t *new;

  new = diff_node_new(current, name, type);

  if (current->subnode == NULL) {
    current->subnode = malloc(sizeof(diff_node_t *));
  } else {
    current->subnode = realloc(current->subnode, sizeof(diff_node_t *) * (current->no_of_subnodes + 1));
  }

  current->subnode[current->no_of_subnodes] = new;
  current->no_of_subnodes++;

  return new;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x23ec
movq %rax, %r14
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x248e
movl 0x18(%rbx), %esi
incl %esi
shlq $0x3, %rsi
callq 0x2230
jmp 0x2496
pushq $0x8
popq %rdi
callq 0x2220
movq %rax, 0x20(%rbx)
movl 0x18(%rbx), %ecx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x18(%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_remove
void diff_node_remove(diff_node_t *node)
{
  int i;
  free(node->name);
  for (i = 0; i < node->no_of_subnodes; i++) {
    diff_node_remove(node->subnode[i]);
  }
  if (node->subnode != NULL) {
    free(node->subnode);
  }
  free(node);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2060
xorl %r14d, %r14d
movl 0x18(%rbx), %eax
movq 0x20(%rbx), %rdi
cmpq %rax, %r14
jae 0x24df
movq (%rdi,%r14,8), %rdi
callq 0x24b2
incq %r14
jmp 0x24c5
callq 0x2060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_path
char *diff_node_path(diff_node_t *node, char *path, int path_len)
{
  char temp[PATH_MAX];

  strncpy(path, node->name, path_len);

  node = node->parent;
  while (node != NULL) {
    if (node->type == DIFF_TYPE_ROOT) {
      break;
    }
    strncpy(temp, path, PATH_MAX);
    snprintf(path, path_len, "%s/%s", node->name, temp);
    node = node->parent;
  }

  return path;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rsi
movslq %edx, %r15
movq %rbx, %rdi
movq %r15, %rdx
callq 0x2090
movq %rsp, %r12
leaq 0x1acb(%rip), %r13      # 0x4004
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x2572
cmpl $0x0, 0x4(%r14)
je 0x2572
movl $0x1000, %edx           # imm = 0x1000
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2090
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %r8
xorl %eax, %eax
callq 0x2140
jmp 0x2539
movq %rbx, %rax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_parents_differ
void diff_node_parents_differ(diff_node_t *node)
{
  do {
    if (node->type == DIFF_TYPE_ROOT) {
      break;
    } else if (node->type == DIFF_TYPE_DIR_EQUAL) {
      node->type = DIFF_TYPE_DIR_DIFFERS;
    }
    
    node = node->parent;
  } while (node != NULL);
}

// Assembly:
movl 0x4(%rdi), %eax
cmpl $0x5, %eax
je 0x2626
testl %eax, %eax
jne 0x262d
jmp 0x2636
movl $0x6, 0x4(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0x2618
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_sort
void diff_node_sort(diff_node_t *node)
{
  int i;
  qsort(node->subnode, node->no_of_subnodes, sizeof(diff_node_t *), diff_node_compare);
  for (i = 0; i < node->no_of_subnodes; i++) {
    diff_node_sort(node->subnode[i]);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movl 0x18(%rbx), %esi
leaq 0x2d(%rip), %rcx        # 0x2679
pushq $0x8
popq %rdx
callq 0x20b0
xorl %r14d, %r14d
movl 0x18(%rbx), %eax
cmpq %rax, %r14
jae 0x2671
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2637
incq %r14
jmp 0x2657
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_unexpand_all
void diff_node_unexpand_all(diff_node_t *node)
{
  int i;

  switch (node->type) {
  case DIFF_TYPE_DIR_EQUAL:
  case DIFF_TYPE_DIR_DIFFERS:
  case DIFF_TYPE_DIR_ADDED:
  case DIFF_TYPE_DIR_MISSING:
    if (node->no_of_subnodes > 0) {
      node->expanded = false;
    }
    break;

  default:
    break;
  }

  for (i = 0; i < node->no_of_subnodes; i++) {
    diff_node_unexpand_all(node->subnode[i]);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
addl $-0x5, %eax
cmpl $0x3, %eax
ja 0x26a7
cmpl $0x0, 0x18(%rbx)
je 0x26a7
movb $0x0, (%rbx)
xorl %r14d, %r14d
movl 0x18(%rbx), %eax
cmpq %rax, %r14
jae 0x26c4
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x268c
incq %r14
jmp 0x26aa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/tree.c
// Function: diff_tree_added_dir
static void diff_tree_added_dir(char *path, diff_node_t *current)
{
  DIR *dh;
  struct dirent *entry;
  struct stat st;
  char fullpath[PATH_MAX];
  diff_node_t *subnode;

  dh = opendir(path);
  if (dh == NULL) {
    fprintf(stderr, "Warning: Unable to open directory: %s\n", path);
    return;
  }

  while ((entry = readdir(dh))) {
    if (entry->d_name[0] == '.')
      continue; /* Ignore files with leading dot. */

    snprintf(fullpath, PATH_MAX, "%s/%s", path, entry->d_name);

    if (stat(fullpath, &st) == -1) {
      fprintf(stderr, "Warning: Unable to stat() path: %s\n", fullpath);
      continue;
    }

    if (S_ISDIR(st.st_mode)) {
      subnode = diff_node_add(current, entry->d_name, DIFF_TYPE_DIR_ADDED);
      diff_tree_added_dir(fullpath, subnode);
    } else if (S_ISREG(st.st_mode)) {
      diff_node_add(current, entry->d_name, DIFF_TYPE_FILE_ADDED);
    }
  }
  closedir(dh);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1098, %rsp           # imm = 0x1098
movq %rsi, %r14
movq %rdi, %rbx
callq 0x20f0
testq %rax, %rax
je 0x2cbf
movq %rax, %r15
leaq 0x90(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
callq 0x2200
testq %rax, %rax
je 0x2ca5
movq %rax, %r12
cmpb $0x2e, 0x13(%rax)
je 0x2bf4
addq $0x13, %r12
movl $0x1000, %esi           # imm = 0x1000
movq %r13, %rdi
leaq 0x13e3(%rip), %rdx      # 0x4004
movq %rbx, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x2140
movq %r13, %rdi
movq %rbp, %rsi
callq 0x21f0
cmpl $-0x1, %eax
je 0x2c85
movl 0x18(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movl %eax, %ecx
negw %cx
jo 0x2c72
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x2bf4
movq %r14, %rdi
movq %r12, %rsi
pushq $0x7
popq %rdx
callq 0x2466
movq %r13, %rdi
movq %rax, %rsi
callq 0x2bc1
jmp 0x2bf4
movq %r14, %rdi
movq %r12, %rsi
pushq $0x3
popq %rdx
callq 0x2466
jmp 0x2bf4
movq 0x336c(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x13c1(%rip), %rsi      # 0x4057
movq %r13, %rdx
xorl %eax, %eax
callq 0x21e0
jmp 0x2bf4
movq %r15, %rdi
callq 0x21a0
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3332(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1360(%rip), %rsi      # 0x4030
movq %rbx, %rdx
xorl %eax, %eax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/tree.c
// Function: diff_tree_missing_dir
static void diff_tree_missing_dir(char *path, diff_node_t *current)
{
  DIR *dh;
  struct dirent *entry;
  struct stat st;
  char fullpath[PATH_MAX];
  diff_node_t *subnode;

  dh = opendir(path);
  if (dh == NULL) {
    fprintf(stderr, "Warning: Unable to open directory: %s\n", path);
    return;
  }

  while ((entry = readdir(dh))) {
    if (entry->d_name[0] == '.')
      continue; /* Ignore files with leading dot. */

    snprintf(fullpath, PATH_MAX, "%s/%s", path, entry->d_name);

    if (stat(fullpath, &st) == -1) {
      fprintf(stderr, "Warning: Unable to stat() path: %s\n", fullpath);
      continue;
    }

    if (S_ISDIR(st.st_mode)) {
      subnode = diff_node_add(current, entry->d_name, DIFF_TYPE_DIR_MISSING);
      diff_tree_missing_dir(fullpath, subnode);
    } else if (S_ISREG(st.st_mode)) {
      diff_node_add(current, entry->d_name, DIFF_TYPE_FILE_MISSING);
    }
  }
  closedir(dh);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1098, %rsp           # imm = 0x1098
movq %rsi, %r14
movq %rdi, %rbx
callq 0x20f0
testq %rax, %rax
je 0x2de9
movq %rax, %r15
leaq 0x90(%rsp), %r13
movq %rsp, %rbp
movq %r15, %rdi
callq 0x2200
testq %rax, %rax
je 0x2dcf
movq %rax, %r12
cmpb $0x2e, 0x13(%rax)
je 0x2d1e
addq $0x13, %r12
movl $0x1000, %esi           # imm = 0x1000
movq %r13, %rdi
leaq 0x12b9(%rip), %rdx      # 0x4004
movq %rbx, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x2140
movq %r13, %rdi
movq %rbp, %rsi
callq 0x21f0
cmpl $-0x1, %eax
je 0x2daf
movl 0x18(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movl %eax, %ecx
negw %cx
jo 0x2d9c
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x2d1e
movq %r14, %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x2466
movq %r13, %rdi
movq %rax, %rsi
callq 0x2ceb
jmp 0x2d1e
movq %r14, %rdi
movq %r12, %rsi
pushq $0x4
popq %rdx
callq 0x2466
jmp 0x2d1e
movq 0x3242(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1297(%rip), %rsi      # 0x4057
movq %r13, %rdx
xorl %eax, %eax
callq 0x21e0
jmp 0x2d1e
movq %r15, %rdi
callq 0x21a0
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3208(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1236(%rip), %rsi      # 0x4030
movq %rbx, %rdx
xorl %eax, %eax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/navi.c
// Function: diff_navi_list_size
static int diff_navi_list_size(diff_node_t *node)
{
  int i, size;

  if (node->type == DIFF_TYPE_ROOT) {
    size = 0;
  } else {
    size = 1;
  }

  if (node->expanded) {
    for (i = 0; i < node->no_of_subnodes; i++) {
      size += diff_navi_list_size(node->subnode[i]);
    }
  }

  return size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x0, 0x4(%rdi)
setne %bl
cmpb $0x1, (%rdi)
jne 0x3298
movq %rdi, %r14
movl 0x18(%rdi), %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x3298
movq 0x20(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x325f
addl %eax, %ebx
incq %r12
jmp 0x327f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/navi.c
// Function: diff_navi_update_screen
static void diff_navi_update_screen(diff_node_t *node)
{
  int n, i, maxy, maxx;
  int scrollbar_size, scrollbar_pos;
  int list_size;

  list_size = diff_navi_list_size(node);

  getmaxyx(stdscr, maxy, maxx);
  erase();

  /* Draw text lines. */
  for (n = 0; n < maxy; n++) {
    if ((n + scroll_offset) >= list_size)
      break;

    if (n == (selected_entry - scroll_offset)) {
      diff_navi_list_draw(node, n, n + scroll_offset + 1, 1);
    } else {
      diff_navi_list_draw(node, n, n + scroll_offset + 1, 0);
    }
  }

  /* Draw scrollbar. */
  if (list_size <= maxy)
    scrollbar_size = maxy;
  else
    scrollbar_size = maxy / (list_size / (double)maxy);

  scrollbar_pos = selected_entry / (double)list_size * (maxy - scrollbar_size);
  attron(A_REVERSE);
  for (i = 0; i <= scrollbar_size; i++)
    mvaddch(i + scrollbar_pos, maxx - 1, ' ');
  attroff(A_REVERSE);

  mvvline(0, maxx - 2, 0, maxy);

  /* Place cursor at end of selected line. */
  move(selected_entry - scroll_offset, maxx - 3);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
callq 0x325f
movl %eax, %r14d
movq 0x2d12(%rip), %r13      # 0x5fd8
movq (%r13), %rdi
testq %rdi, %rdi
je 0x32dd
movswl 0x4(%rdi), %ebp
incl %ebp
movswl 0x6(%rdi), %eax
incl %eax
jmp 0x32e2
pushq $-0x1
popq %rbp
movl %ebp, %eax
movq %rax, 0x8(%rsp)
callq 0x2050
xorl %r12d, %r12d
testl %ebp, %ebp
movl $0x0, %ebx
cmovgl %ebp, %ebx
cmpl %r12d, %ebx
je 0x3333
movl 0x2e8c(%rip), %eax      # 0x6190
leal (%r12,%rax), %ecx
cmpl %r14d, %ecx
jge 0x3333
movl 0x2e79(%rip), %edx      # 0x618c
subl %eax, %edx
xorl %ecx, %ecx
cmpl %edx, %r12d
sete %cl
leal (%r12,%rax), %edx
incl %edx
movq %r15, %rdi
movl %r12d, %esi
callq 0x3455
incl %r12d
jmp 0x32f9
cmpl %ebp, %r14d
jle 0x3354
cvtsi2sd %ebp, %xmm1
cvtsi2sd %r14d, %xmm0
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
divsd %xmm2, %xmm1
cvttsd2si %xmm1, %r12d
jmp 0x335c
cvtsi2sd %r14d, %xmm0
movl %ebp, %r12d
cvtsi2sdl 0x2e28(%rip), %xmm1 # 0x618c
divsd %xmm0, %xmm1
movl %ebp, 0x14(%rsp)
movl %ebp, %eax
subl %r12d, %eax
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ebx
movq (%r13), %rdi
xorl %ebp, %ebp
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x21c0
movq 0x8(%rsp), %rax
leal -0x1(%rax), %r14d
pushq $0x20
popq %r15
movq (%r13), %rdi
cmpl %r12d, %ebp
jg 0x33c5
leal (%rbx,%rbp), %esi
movl %r14d, %edx
callq 0x2270
cmpl $-0x1, %eax
je 0x33c1
movq (%r13), %rdi
movl %r15d, %esi
callq 0x2290
incl %ebp
jmp 0x339c
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x22e0
movq (%r13), %rdi
movq 0x8(%rsp), %rax
leal -0x2(%rax), %edx
xorl %esi, %esi
callq 0x2270
cmpl $-0x1, %eax
je 0x33f8
movq (%r13), %rdi
xorl %esi, %esi
movl 0x14(%rsp), %edx
callq 0x2260
movq (%r13), %rdi
movl 0x2d8a(%rip), %esi      # 0x618c
subl 0x2d88(%rip), %esi      # 0x6190
movq 0x8(%rsp), %rdx
addl $-0x3, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/navi.c
// Function: diff_navi_node_get
static diff_node_t *diff_navi_node_get(diff_node_t *node, int node_no, int *size)
{
  diff_node_t *found;
  int i;

  if (node->type != DIFF_TYPE_ROOT) {
    *size = *size + 1;
  }

  if (*size == node_no) {
    return node; /* Match found, return self. */
  }

  if (node->expanded) {
    for (i = 0; i < node->no_of_subnodes; i++) {
      found = diff_navi_node_get(node->subnode[i], node_no, size);
      if (found != NULL)
        return found;
    }
  }

  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
movl (%rdx), %eax
je 0x37ab
incl %eax
movl %eax, (%r14)
cmpl %ebp, %eax
je 0x37e0
cmpb $0x1, (%rbx)
jne 0x37de
xorl %r15d, %r15d
movl 0x18(%rbx), %eax
cmpq %rax, %r15
jae 0x37de
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x378f
incq %r15
testq %rax, %rax
je 0x37b7
movq %rax, %rbx
jmp 0x37e0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/difftree/main.c
// Function: main
int main(int argc, char *argv[])
{
  diff_node_t *root;

  if (argc < 3) {
    fprintf(stderr, "Usage: %s <directory 1> <directory 2>\n", argv[0]);
    return 1;
  }

  root = diff_node_new(NULL, NULL, DIFF_TYPE_ROOT);

  diff_tree_compare_dir(argv[1], argv[2], root);
  diff_node_sort(root);
  diff_node_unexpand_all(root);

  if (isatty(STDOUT_FILENO)) {
    diff_navi_loop(root, argv[1], argv[2]); /* Curses interface. */
  } else {
    diff_node_dump(root); /* Use text-dump when being piped. */
  }

  diff_node_remove(root);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x2, %edi
jle 0x3862
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x23ec
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rax, %rdx
callq 0x26cc
movq %r14, %rdi
callq 0x2637
movq %r14, %rdi
callq 0x268c
pushq $0x1
popq %rdi
callq 0x20c0
testl %eax, %eax
je 0x3848
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0x2e18
jmp 0x3850
movq %r14, %rdi
callq 0x2586
movq %r14, %rdi
callq 0x24b2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x278f(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0x888(%rip), %rsi       # 0x40fe
xorl %eax, %eax
callq 0x21e0
pushq $0x1
popq %rax
jmp 0x385a
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/strcode/strcode.c
// Function: StrCode16
unsigned int StrCode16( char *string )
{
	unsigned char c;
	unsigned char *p = (unsigned char *)string;
	unsigned short id = 0;
	
	while (( c = *p++ ))
	{
		id = (( id >> 11 ) | ( id << 5 ));
		id += c;
	}
	return id;
}

// Assembly:
xorl %eax, %eax
movzbl (%rdi), %ecx
testw %cx, %cx
je 0x1206
rolw $0x5, %ax
incq %rdi
movzwl %cx, %ecx
addl %eax, %ecx
movl %ecx, %eax
jmp 0x11ee
movzwl %ax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/strcode/strcode.c
// Function: StrCode24
unsigned int StrCode24( char *string )
{
	unsigned char c;
	unsigned char *p = (unsigned char *)string;
	unsigned int id = 0, mask = 0x00FFFFFF;
	
	while (( c = *p++ ))
	{
		id = (( id << 5 ) | ( id >> 19 ));
		id += c;
		id &= mask;
	}
	return ( !id ) ? 1 : id;
}

// Assembly:
xorl %eax, %eax
movzbl (%rdi), %ecx
testl %ecx, %ecx
je 0x1229
incq %rdi
movl %eax, %edx
shll $0x5, %edx
shrl $0x13, %eax
orl %edx, %eax
addl %ecx, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
jmp 0x120c
cmpl $0x1, %eax
adcl $0x0, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/strcode/strcode.c
// Function: StrCode32
unsigned int StrCode32( char *string )
{
	unsigned int c;
	signed   int n  = 0;
	unsigned int id = 0;
	
	while (( c = *string++ ))
	{
		id += (( id << ( c & 0x0F )) | (( id >> 3 ) + ( c << ( n & 0x0F )) + c ));
		n++;
	}
	return id;
}

// Assembly:
xorl %edx, %edx
xorl %eax, %eax
movsbl (%rdi,%rdx), %esi
testl %esi, %esi
je 0x1265
movl %esi, %ecx
andb $0xf, %cl
movl %eax, %r8d
shll %cl, %r8d
movl %eax, %r9d
shrl $0x3, %r9d
movl %edx, %ecx
andb $0xf, %cl
addl %esi, %r9d
shll %cl, %esi
addl %r9d, %esi
orl %r8d, %esi
addl %esi, %eax
incq %rdx
jmp 0x1234
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/simple-hash-list.c
// Function: main
int main( int argc, char** argv ) {
	
	if ( argc < 2 )
	{
		printf( "Not enough arguments given!\nUsage: %s textlist\n", argv[0] );
		return 1;
	}
	
	uint16_t hash1;
	uint32_t hash2;
	uint32_t hash3;
	FILE *tin, *tout;
	
	if( !(tin = fopen( argv[1], "r" ))) {
		printf("Couldnt open file %s as textlist\n", argv[1]);
		return 1;
	}
	
	char scanname[512] = {0}, *outtext = malloc(strlen(argv[1])+5+4+1);
	sprintf(outtext, "%s-hash.txt", argv[1]);
	
	if( !(tout = fopen( outtext, "w" ))) {
		printf("Couldnt open file %s as outtext\n", outtext);
		return 1;
	}
	
	while(fgets(scanname, 512, tin)) {
		if(!(strncmp(scanname, "//", 2))) fprintf(tout, "%s", scanname);
		else {
			scanname[strcspn(scanname,"\r\n")] = 0;
			hash1 = StrCode16(scanname);
			hash2 = StrCode24(scanname);
			hash3 = StrCode32(scanname);
			fprintf(tout, "%-21s %04x %08x %08x\n", scanname, hash1, hash2, hash3);
		}
	}
	
	fclose(tin);
	fclose(tout);
	printf("Done.\n");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
cmpl $0x1, %edi
jg 0x1290
movq (%r14), %rsi
leaq 0xd79(%rip), %rdi       # 0x2004
jmp 0x13b8
movq 0x8(%r14), %rdi
leaq 0xd99(%rip), %rsi       # 0x2034
callq 0x10d0
testq %rax, %rax
je 0x13a1
movq %rax, %rbx
movq %rsp, %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x1080
movq 0x8(%r14), %r14
movq %r14, %rdi
callq 0x1050
leaq 0xa(%rax), %rdi
callq 0x10c0
movq %rax, %r15
leaq 0xd7e(%rip), %rsi       # 0x2058
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10e0
leaq 0xd76(%rip), %rsi       # 0x2064
movq %r15, %rdi
callq 0x10d0
testq %rax, %rax
je 0x13ae
movq %rax, %r14
movq %rsp, %r15
leaq 0xd7e(%rip), %r13       # 0x208a
movq %r15, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x10a0
testq %rax, %rax
je 0x1381
cmpw $0x2f2f, (%rsp)         # imm = 0x2F2F
jne 0x1336
movq %r15, %rdi
movq %r14, %rsi
callq 0x1070
jmp 0x130c
movq %r15, %rdi
leaq 0xd47(%rip), %rsi       # 0x2087
callq 0x1090
movb $0x0, (%rsp,%rax)
movq %r15, %rdi
callq 0x11ec
movl %eax, %ebp
movq %r15, %rdi
callq 0x120a
movl %eax, %r12d
movq %r15, %rdi
callq 0x1230
movzwl %bp, %ecx
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %r12d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x10b0
jmp 0x130c
movq %rbx, %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1040
leaq 0xd08(%rip), %rdi       # 0x20a0
callq 0x1030
xorl %eax, %eax
jmp 0x13c2
movq 0x8(%r14), %rsi
leaq 0xc8a(%rip), %rdi       # 0x2036
jmp 0x13b8
leaq 0xcb1(%rip), %rdi       # 0x2066
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
pushq $0x1
popq %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_import_file
int list_import_file(char *path)
{
  char line[PATH_MAX];
  char *p;
  FILE *fh;

  fh = fopen(path, "r");
  if (fh == NULL)
    return -1;

  list_original = (char **)malloc(sizeof(char *));
  if (list_original == NULL) {
    fclose(fh);
    return -1;
  }
  list_original_size = 0;

  while (fgets(line, PATH_MAX, fh) != NULL) {
    for (p = line; *p != '\0'; p++) {
      if ((*p == '\r') || (*p == '\n')) {
        *p = '\0';
        break;
      }
    }

    list_original[list_original_size] = (char *)malloc(sizeof(char) * 
      (strlen(line) + 1));
    if (list_original[list_original_size] == NULL) {
      fclose(fh);
      return -1;
    }
    strncpy(list_original[list_original_size], line, strlen(line) + 1);

    list_original_size++;
    list_original = (char **)realloc(list_original, sizeof(char *) * 
      (list_original_size + 1));
    if (list_original == NULL) {
      fclose(fh);
      return -1;
    }
    list_original[list_original_size] = NULL;
  }

  fclose(fh);

  /* Set original list as the one to use right after loading the file. */
  list = list_original;
  list_size = list_original_size;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
leaq 0x158b(%rip), %rsi      # 0x4212
callq 0x2230
pushq $-0x1
popq %rbx
testq %rax, %rax
je 0x2da7
movq %rax, %r14
pushq $0x8
popq %rdi
callq 0x21d0
movq %rax, 0x3556(%rip)      # 0x6200
testq %rax, %rax
je 0x2d79
andl $0x0, 0x354e(%rip)      # 0x6208
leaq -0x1030(%rbp), %r15
movq %r15, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x2160
testq %rax, %rax
je 0x2d83
movq %r15, %rax
movzbl (%rax), %ecx
testl %ecx, %ecx
je 0x2cf6
cmpl $0xd, %ecx
je 0x2cf3
cmpl $0xa, %ecx
je 0x2cf3
incq %rax
jmp 0x2cdd
movb $0x0, (%rax)
movq %r15, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdi
callq 0x21d0
movq 0x34f2(%rip), %r12      # 0x6200
movslq 0x34f3(%rip), %rbx      # 0x6208
movq %rax, (%r12,%rbx,8)
testq %rax, %rax
je 0x2d6c
movq %rax, %r13
movq %r15, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0x2080
leal 0x1(%rbx), %r13d
movl %r13d, 0x34c5(%rip)     # 0x6208
leaq 0x10(,%rbx,8), %rsi
movq %r12, %rdi
callq 0x21f0
movq %rax, 0x34a6(%rip)      # 0x6200
testq %rax, %rax
je 0x2d6c
movslq %r13d, %rcx
andq $0x0, (%rax,%rcx,8)
jmp 0x2cc1
movq %r14, %rdi
callq 0x20d0
pushq $-0x1
popq %rbx
jmp 0x2da7
movq %r14, %rdi
callq 0x20d0
jmp 0x2da7
movq %r14, %rdi
callq 0x20d0
movq 0x346e(%rip), %rax      # 0x6200
movq %rax, 0x3477(%rip)      # 0x6210
movl 0x3469(%rip), %eax      # 0x6208
movl %eax, 0x3473(%rip)      # 0x6218
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_request
void list_request(int no)
{
  if (no >= 0 && no < list_size) {
    play_cancel();
    list_current = no;
    play_execute(list[list_current]);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
js 0x2df2
movl %edi, %ebx
cmpl %edi, 0x344b(%rip)      # 0x6218
jle 0x2df2
callq 0x32a6
movl %ebx, 0x33be(%rip)      # 0x6198
movq 0x342f(%rip), %rax      # 0x6210
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x331a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_request_next
void list_request_next(void)
{
  if (list_current >= (list_size - 1)) {
    /* If triggered by last in list, show that nothing is currently playing. */
    list_current = -1;
    return;
  }
  play_cancel(); /* Will most likely be ignored, since called after done. */
  list_current++;
  play_execute(list[list_current]);
}

// Assembly:
movl 0x3419(%rip), %eax      # 0x6218
decl %eax
cmpl %eax, 0x3391(%rip)      # 0x6198
jge 0x2e35
pushq %rbp
movq %rsp, %rbp
callq 0x32a6
movslq 0x337f(%rip), %rax      # 0x6198
leaq 0x1(%rax), %rcx
movl %ecx, 0x3375(%rip)      # 0x6198
movq 0x33e6(%rip), %rcx      # 0x6210
movq 0x8(%rcx,%rax,8), %rdi
popq %rbp
jmp 0x331a
orl $-0x1, 0x335c(%rip)     # 0x6198
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_get
char *list_get(int no, int *playing)
{
  char *basename;

  if (no == list_current)
    *playing = 1;
  else
    *playing = 0;

  if (no >= 0 && no < list_size) {
    basename = rindex(list[no], '/');
    if (basename == NULL) {
      return list[no];
    } else {
      return basename + 1;
    }
  } else {
    return NULL;
  }
}

// Assembly:
xorl %eax, %eax
cmpl %edi, 0x3353(%rip)      # 0x6198
sete %al
movl %eax, (%rsi)
xorl %eax, %eax
testl %edi, %edi
js 0x2e89
cmpl %edi, 0x33c2(%rip)      # 0x6218
jle 0x2e89
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x33ab(%rip), %rax      # 0x6210
movl %edi, %ecx
movq (%rax,%rcx,8), %rbx
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x2240
movq %rax, %rcx
incq %rax
testq %rcx, %rcx
cmoveq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_swap
int list_swap(int no_a, int no_b)
{
  char *temp;

  if (no_a < 0 || 
      no_b < 0 ||
      no_a >= list_size ||
      no_b >= list_size)
    return -1;

  play_block();

  temp = list[no_b];
  list[no_b] = list[no_a];
  list[no_a] = temp;

  if (no_a == list_current)
    list_current = no_b;
  else if (no_b == list_current)
    list_current = no_a;

  play_unblock();

  return 0;
}

// Assembly:
pushq $-0x1
popq %rax
movl %esi, %ecx
orl %edi, %ecx
js 0x2f05
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movl %edi, %ebx
movl 0x3367(%rip), %ecx      # 0x6218
cmpl %edi, %ecx
setle %dl
cmpl %esi, %ecx
setle %cl
orb %dl, %cl
jne 0x2f01
callq 0x3418
movq 0x3345(%rip), %rax      # 0x6210
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdx
movl %ebx, %esi
movq (%rax,%rsi,8), %rdi
movq %rdi, (%rax,%rcx,8)
movq %rdx, (%rax,%rsi,8)
movl 0x32b2(%rip), %eax      # 0x6198
cmpl %ebx, %eax
jne 0x2eef
movl %r14d, %ebx
jmp 0x2ef4
cmpl %r14d, %eax
jne 0x2efa
movl %ebx, 0x329e(%rip)      # 0x6198
callq 0x3454
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_shuffle
void list_shuffle(void)
{
  char *temp;
  int i, r;

  srandom(time(NULL));

  play_block();

  for (i = 0; i < list_size; i++) {
    r = random() % list_size;

    temp = list[i];
    list[i] = list[r];
    list[r] = temp;

    if (r == list_current)
      list_current = i;
    else if (i == list_current)
      list_current = r;
  }

  play_unblock();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x21a0
movl %eax, %edi
callq 0x2070
callq 0x3418
movl 0x32f1(%rip), %ecx      # 0x6218
movslq %ecx, %rax
cmpq %rax, %rbx
jge 0x2f75
callq 0x21c0
movslq 0x32dd(%rip), %rcx      # 0x6218
cqto
idivq %rcx
movq 0x32c9(%rip), %rax      # 0x6210
movq (%rax,%rbx,8), %rsi
movq (%rax,%rdx,8), %rdi
movq %rdi, (%rax,%rbx,8)
movq %rsi, (%rax,%rdx,8)
movl 0x323b(%rip), %eax      # 0x6198
cmpl %edx, %eax
jne 0x2f65
movl %ebx, %edx
jmp 0x2f6a
cmpq %rax, %rbx
jne 0x2f70
movl %edx, 0x3228(%rip)      # 0x6198
incq %rbx
jmp 0x2f27
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3454
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_cmp
static int list_cmp(char *filter, char *original)
{
  char *basename;

  basename = rindex(original, '/');
  if (basename == NULL)
    basename = original;
  else
    basename++; /* Remove leading slash. */

  while (*basename != '\0') {
    if (strncasecmp(filter, basename, strlen(filter)) == 0)
      return 0;
    basename++;
  }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x2f
popq %rsi
movq %r14, %rdi
callq 0x2240
leaq 0x1(%rax), %r15
testq %rax, %rax
cmoveq %r14, %r15
pushq $-0x1
popq %r14
cmpb $0x0, (%r15)
je 0x31e9
movq %rbx, %rdi
callq 0x20e0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x21e0
incq %r15
testl %eax, %eax
jne 0x31c3
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/list.c
// Function: list_destroy
void list_destroy(void)
{
  int i;

  if (list_original != NULL) {
    for (i = 0; i < list_original_size; i++) {
      free(list_original[i]);
    }
    free(list_original);
    list_original = NULL;
  }

  if (list_filtered != NULL) {
    for (i = 0; i < list_filtered_size; i++) {
      free(list_filtered[i]);
    }
    free(list_filtered);
    list_filtered = NULL;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x2ff8(%rip), %rbx      # 0x6200
testq %rbx, %rbx
je 0x3241
movl 0x2ff4(%rip), %r14d     # 0x6208
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x3231
movq (%rbx,%r15,8), %rdi
callq 0x2050
incq %r15
jmp 0x321e
movq %rbx, %rdi
callq 0x2050
andq $0x0, 0x2fbf(%rip)      # 0x6200
movq 0x2fd8(%rip), %rbx      # 0x6220
testq %rbx, %rbx
je 0x3281
movl 0x2fd4(%rip), %r14d     # 0x6228
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
cmpq %r15, %r14
je 0x3271
movq (%rbx,%r15,8), %rdi
callq 0x2050
incq %r15
jmp 0x325e
movq %rbx, %rdi
callq 0x2050
andq $0x0, 0x2f9f(%rip)      # 0x6220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/play.c
// Function: play_cancel
void play_cancel(void)
{
  int status;
  struct sigaction sa;

  if (play_pid == 0)
    return; /* Nothing is executing, cannot cancel. */

  sa.sa_handler = SIG_IGN;
  sigemptyset(&sa.sa_mask);
  sa.sa_flags = 0;
  sigaction(SIGCHLD, &sa, NULL);

  kill(play_pid, SIGINT);

  waitpid(play_pid, &status, 0);
  play_pid = 0;
}

// Assembly:
cmpl $0x0, 0x2f93(%rip)      # 0x6240
je 0x3319
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xa8, %rsp
leaq -0xa0(%rbp), %rbx
movq $0x1, -0x8(%rbx)
movq %rbx, %rdi
callq 0x2170
andl $0x0, 0x80(%rbx)
pushq $0x11
popq %rdi
leaq -0xa8(%rbp), %rsi
xorl %edx, %edx
callq 0x20a0
movl 0x2f50(%rip), %edi      # 0x6240
pushq $0x2
popq %rsi
callq 0x2190
movl 0x2f42(%rip), %edi      # 0x6240
leaq -0xc(%rbp), %rsi
xorl %edx, %edx
callq 0x2210
andl $0x0, 0x2f30(%rip)      # 0x6240
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/play.c
// Function: play_execute
void play_execute(char *arg)
{
  struct sigaction sa;
  int fd0, fd1, fd2;

  if (play_program == NULL)
    return;

  if (play_pid > 0)
    return; /* Already running, cannot execute. */

  sa.sa_handler = play_finished;
  sigemptyset(&sa.sa_mask);
  sa.sa_flags = 0;
  sigaction(SIGCHLD, &sa, NULL);

  play_pid = fork();
  if (play_pid == 0) {
    /* Redirect standard I/O to prevent child program writing to the TTY. */
    close(0);
    close(1);
    close(2);
    fd0 = open("/dev/null", O_RDWR);
    fd1 = dup(0);
    fd2 = dup(0);

    execlp(play_program, play_program, arg, NULL);
  }
}

// Assembly:
cmpq $0x0, 0x2f16(%rip)      # 0x6238
je 0x33e3
cmpl $0x0, 0x2f11(%rip)      # 0x6240
jg 0x33e3
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x97(%rip), %rax        # 0x33e4
leaq -0xa0(%rbp), %r14
movq %rax, -0x8(%r14)
movq %r14, %rdi
callq 0x2170
andl $0x0, 0x80(%r14)
pushq $0x11
popq %rdi
leaq -0xa8(%rbp), %rsi
xorl %edx, %edx
callq 0x20a0
callq 0x22e0
movl %eax, 0x2ebc(%rip)      # 0x6240
testl %eax, %eax
jne 0x33d8
xorl %edi, %edi
callq 0x2130
pushq $0x1
popq %rdi
callq 0x2130
pushq $0x2
popq %r14
movl %r14d, %edi
callq 0x2130
leaq 0xe6a(%rip), %rdi       # 0x4214
movl %r14d, %esi
xorl %eax, %eax
callq 0x2220
xorl %edi, %edi
callq 0x2110
xorl %edi, %edi
callq 0x2110
movq 0x2e6f(%rip), %rdi      # 0x6238
movq %rdi, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x22a0
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/playlist/play.c
// Function: play_finished
static void play_finished(int signo)
{
  int status;

  waitpid(play_pid, &status, 0);
  play_pid = 0;

  if (play_finished_handler != NULL)
    (play_finished_handler)();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0x2e4e(%rip), %edi      # 0x6240
leaq -0x4(%rbp), %rsi
xorl %edx, %edx
callq 0x2210
andl $0x0, 0x2e3c(%rip)      # 0x6240
movq 0x2e25(%rip), %rax      # 0x6230
testq %rax, %rax
je 0x3412
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/lib/wave.c
// Function: freeWave
void
freeWave(WAVE *w)
    {
    int i;

    free(w->ID);
    free(w->Format);
    free(w->Subchunk1ID);
    free(w->Subchunk2ID);
    free(w->inName);
    free(w->outName);
    for (i = 0; i < w->NumChannels; ++i)
        freeIntArray(w->channels[i]);

    free(w);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
callq 0x1030
movq 0x10(%rbx), %rdi
callq 0x1030
movq 0x18(%rbx), %rdi
callq 0x1030
movq 0x90(%rbx), %rdi
callq 0x1030
movq 0xa0(%rbx), %rdi
callq 0x1030
xorl %r14d, %r14d
movslq 0x34(%rbx), %rax
cmpq %rax, %r14
jge 0x1ce3
movq 0x50(%rbx,%r14,8), %rdi
callq 0x1cf2
incq %r14
jmp 0x1ccb
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030