LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x3c49f
movb %al, 0x18(%rbx)
movq $0x0, 0x38(%rbx)
cmpb $0x1, %al
jne 0x3e1b0
movq %r14, %rdi
callq 0x2070
leaq 0x1(%rax), %rdi
callq 0x298d9
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2040
jmp 0x3e1b4
movq %r14, 0x8(%rbx)
leaq 0x2a3cd(%rip), %rdi     # 0x68588
callq 0x29cce
testq %rax, %rax
je 0x3e227
movq %rax, %r15
leaq 0x1c(%rbx), %r12
leaq 0x2a3b5(%rip), %r13     # 0x68588
xorl %ebp, %ebp
movq (%r15), %rax
testq %rax, %rax
je 0x3e212
cmpq $0x0, 0x8(%r15)
je 0x3e212
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq *%rax
movl %eax, %ebp
cmpb $0x1, %al
jne 0x3e212
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rax, 0x20(%rbx)
movq %r15, (%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq *0x8(%r15)
movl %eax, %ebp
cmpb $0x1, %al
je 0x3e229
movq %r13, %rdi
movq %r15, %rsi
callq 0x29dfb
movq %rax, %r15
testq %rax, %rax
jne 0x3e1d5
jmp 0x3e229
xorl %ebp, %ebp
testb %bpl, %bpl
jne 0x3e240
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
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_O1/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 0x3e2af
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x3e298
movq %rbx, %rsi
callq *%rax
cmpb $0x1, 0x18(%rbx)
jne 0x3e2af
movq 0x8(%rbx), %rdi
callq 0x29984
movq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x2a123(%rip), %r14     # 0x685a0
cmpq $0x0, (%r14)
je 0x3e492
xorl %edi, %edi
callq 0x3e52c
movq (%r14), %rdi
callq 0x29984
movzwl %bx, %r15d
shll $0x3, %r15d
leaq (%r15,%r15,8), %rdi
callq 0x298d9
movq %rax, (%r14)
movq %rax, %rdi
callq 0x80d4
movq (%r14), %rsi
testb %al, %al
je 0x3e50f
testq %rsi, %rsi
je 0x3e51d
movw %bx, 0x33633(%rip)      # 0x71af4
testw %bx, %bx
je 0x3e526
leaq (%r15,%r15,8), %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq (%r14), %rdx
movups %xmm0, 0x30(%rdx,%rcx)
movups %xmm0, 0x20(%rdx,%rcx)
movups %xmm0, 0x10(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
movq (%r14), %rdx
movups %xmm0, 0x30(%rdx,%rcx)
movups %xmm0, 0x20(%rdx,%rcx)
movups %xmm0, 0x10(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
movq $0x0, 0x40(%rdx,%rcx)
addq $0x48, %rcx
cmpq %rcx, %rax
jne 0x3e4cf
jmp 0x3e526
leaq 0xb2a(%rip), %rdi       # 0x3f040
callq 0x829e
jmp 0x3e51b
movw $0x0, 0x335ce(%rip)     # 0x71af4
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpw $0x0, 0x335c0(%rip)     # 0x71af4
je 0x3e5a2
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x2a05b(%rip), %rax     # 0x685a0
movq (%rax), %r14
xorl %r15d, %r15d
testq %rbx, %rbx
setne %cl
movq 0x8(%r14), %rax
cmpq %rbx, %rax
setne %dl
testb %dl, %cl
jne 0x3e58a
testq %rax, %rax
je 0x3e56c
movq %r14, %rdi
callq 0x3e27e
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
movq $0x0, 0x40(%r14)
incq %r15
movzwl 0x33560(%rip), %eax     # 0x71af4
addq $0x48, %r14
cmpq %rax, %r15
jb 0x3e54b
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x4ad8(%rip), %rdi      # 0x4346a
movl $0x2, %esi
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 0x3ea1c
movl $0x703, %esi            # imm = 0x703
movl %ebp, %edi
movl $0x48, %edx
xorl %eax, %eax
callq 0x20b0
testl %eax, %eax
js 0x3ea1c
leaq 0xe(%rsp), %r15
movw $0x0, (%r15)
movb %r14b, (%r15)
movl $0x1, %edx
movl %ebp, %edi
movq %r15, %rsi
callq 0x2060
movl $0x2, %edx
movl %ebp, %edi
movq %r15, %rsi
callq 0x20d0
movzbl (%r15), %r12d
movzbl 0x1(%r15), %r14d
movl %ebp, %edi
callq 0x20c0
testl %eax, %eax
js 0x3ea1c
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_O1/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
cmpq $0x0, 0x331c8(%rip)     # 0x71c00
jne 0x3ea80
leaq 0x4a34(%rip), %rdi      # 0x43475
movl $0x2, %esi
xorl %eax, %eax
callq 0x2100
testl %eax, %eax
js 0x3ea9e
movl %eax, %ebp
movl $0x400, %esi            # imm = 0x400
movl $0x10000000, %r9d       # imm = 0x10000000
xorl %edi, %edi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
callq 0x2080
movq %rax, 0x33187(%rip)     # 0x71c00
movl %ebp, %edi
callq 0x20c0
movq 0x33179(%rip), %rax     # 0x71c00
movq 0xc40(%rax), %rcx
xorl %eax, %eax
btq %rbx, %rcx
setb %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3ea97
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x28, %edi
callq 0x2220
movq %rax, %r14
testq %r15, %r15
je 0x2457
movq %r15, %rdi
callq 0x2100
incl %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x2220
movq %rax, 0x8(%r14)
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2090
jmp 0x245f
movq $0x0, 0x8(%r14)
movl %ebp, 0x4(%r14)
movl $0x0, 0x18(%r14)
movq %rbx, 0x10(%r14)
movq $0x0, 0x20(%r14)
movb $0x1, (%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x240c
movq %rax, %r14
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x24af
movl 0x18(%rbx), %esi
incl %esi
shlq $0x3, %rsi
callq 0x2230
jmp 0x24b9
movl $0x8, %edi
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_O1/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
cmpl $0x0, 0x18(%rbx)
je 0x2506
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x24d5
incq %r14
movl 0x18(%rbx), %eax
cmpq %rax, %r14
jb 0x24ee
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2514
callq 0x2060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq 0x8(%rdi), %rsi
movslq %edx, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2090
movq 0x10(%r15), %r13
testq %r13, %r13
je 0x25a9
movq %rsp, %r15
leaq 0x1a92(%rip), %r12      # 0x4004
cmpl $0x0, 0x4(%r13)
je 0x25a9
movl $0x1000, %edx           # imm = 0x1000
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2090
movq 0x8(%r13), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %r8
xorl %eax, %eax
callq 0x2140
movq 0x10(%r13), %r13
testq %r13, %r13
jne 0x2572
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_O1/kobolt[P]curses-collection/difftree/node.c
// Function: diff_node_dump
void diff_node_dump(diff_node_t *node)
{
  int i;
  int depth;

  depth = diff_node_depth(node);
  while (depth-- > 1)
    printf("  ");

  switch (node->type) {
  case DIFF_TYPE_FILE_EQUAL:
  case DIFF_TYPE_DIR_EQUAL:
    printf("=");
    break;

  case DIFF_TYPE_FILE_DIFFERS:
  case DIFF_TYPE_DIR_DIFFERS:
    printf("*");
    break;

  case DIFF_TYPE_FILE_ADDED:
  case DIFF_TYPE_DIR_ADDED:
    printf("+");
    break;

  case DIFF_TYPE_FILE_MISSING:
  case DIFF_TYPE_DIR_MISSING:
    printf("-");
    break;

  default:
    break;
  }

  printf("%s", node->name);

  switch (node->type) {
  case DIFF_TYPE_DIR_EQUAL:
  case DIFF_TYPE_DIR_DIFFERS:
  case DIFF_TYPE_DIR_ADDED:
  case DIFF_TYPE_DIR_MISSING:
    printf("/");
    break;

  default:
    break;
  }

  printf("\n");

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rdi, %rax
cmpl $0x0, 0x4(%rax)
je 0x25da
movq 0x10(%rax), %rax
incl %ebp
testq %rax, %rax
jne 0x25c9
cmpl $0x2, %ebp
jl 0x25f9
incl %ebp
leaq 0x1a22(%rip), %r14      # 0x400a
movq %r14, %rdi
xorl %eax, %eax
callq 0x2130
decl %ebp
cmpl $0x2, %ebp
jg 0x25e8
movl 0x4(%rbx), %eax
decl %eax
cmpl $0x7, %eax
ja 0x2614
movl %eax, %eax
leaq 0x1a04(%rip), %rcx      # 0x4010
movl (%rcx,%rax,4), %edi
callq 0x2070
movq 0x8(%rbx), %rsi
leaq 0x19e8(%rip), %rdi      # 0x4007
xorl %eax, %eax
callq 0x2130
movl 0x4(%rbx), %eax
addl $-0x5, %eax
cmpl $0x3, %eax
ja 0x263b
movl $0x2f, %edi
callq 0x2070
movl $0xa, %edi
callq 0x2070
cmpl $0x0, 0x18(%rbx)
je 0x2666
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x25bd
incq %r14
movl 0x18(%rbx), %eax
cmpq %rax, %r14
jb 0x264e
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2679
testl %eax, %eax
jne 0x2680
jmp 0x2689
movl $0x6, 0x4(%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0x266b
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x33(%rip), %rcx        # 0x26d2
movl $0x8, %edx
callq 0x20b0
cmpl $0x0, 0x18(%rbx)
je 0x26ca
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x268a
incq %r14
movl 0x18(%rbx), %eax
cmpq %rax, %r14
jb 0x26b2
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2700
cmpl $0x0, 0x18(%rbx)
je 0x2700
movb $0x0, (%rbx)
cmpl $0x0, 0x18(%rbx)
je 0x2721
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x26e5
incq %r14
movl 0x18(%rbx), %eax
cmpq %rax, %r14
jb 0x2709
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x2d5e
movq %rax, %r15
movq %rax, %rdi
callq 0x2200
testq %rax, %rax
je 0x2d44
movq %rax, %r12
leaq 0x90(%rsp), %r13
movq %rsp, %rbp
cmpb $0x2e, 0x13(%r12)
je 0x2d11
addq $0x13, %r12
movl $0x1000, %esi           # imm = 0x1000
movq %r13, %rdi
leaq 0x1356(%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 0x2d27
movl 0x18(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movl %eax, %ecx
negw %cx
jo 0x2d01
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x2d11
movq %r14, %rdi
movq %r12, %rsi
movl $0x7, %edx
callq 0x2487
movq %r13, %rdi
movq %rax, %rsi
callq 0x2c4c
jmp 0x2d11
movq %r14, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq 0x2487
movq %r15, %rdi
callq 0x2200
movq %rax, %r12
testq %rax, %rax
jne 0x2c93
jmp 0x2d44
movq 0x32ca(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x131f(%rip), %rsi      # 0x4057
movq %r13, %rdx
xorl %eax, %eax
callq 0x21e0
jmp 0x2d11
movq %r15, %rdi
callq 0x21a0
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3293(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x12c1(%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_O1/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 0x2e9c
movq %rax, %r15
movq %rax, %rdi
callq 0x2200
testq %rax, %rax
je 0x2e82
movq %rax, %r12
leaq 0x90(%rsp), %r13
movq %rsp, %rbp
cmpb $0x2e, 0x13(%r12)
je 0x2e4f
addq $0x13, %r12
movl $0x1000, %esi           # imm = 0x1000
movq %r13, %rdi
leaq 0x1218(%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 0x2e65
movl 0x18(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
movl %eax, %ecx
negw %cx
jo 0x2e3f
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x2e4f
movq %r14, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x2487
movq %r13, %rdi
movq %rax, %rsi
callq 0x2d8a
jmp 0x2e4f
movq %r14, %rdi
movq %r12, %rsi
movl $0x4, %edx
callq 0x2487
movq %r15, %rdi
callq 0x2200
movq %rax, %r12
testq %rax, %rax
jne 0x2dd1
jmp 0x2e82
movq 0x318c(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x11e1(%rip), %rsi      # 0x4057
movq %r13, %rdx
xorl %eax, %eax
callq 0x21e0
jmp 0x2e4f
movq %r15, %rdi
callq 0x21a0
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3155(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1183(%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_O1/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 0x338e
movl 0x18(%rdi), %r14d
testq %r14, %r14
je 0x338e
movq 0x20(%rdi), %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x3355
addl %eax, %ebx
incq %r12
cmpq %r12, %r14
jne 0x337b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r14
callq 0x3355
movl %eax, %r15d
movq 0x2c1c(%rip), %r13      # 0x5fd8
movq (%r13), %rdi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x33d5
movswl 0x4(%rdi), %ebp
incl %ebp
testq %rdi, %rdi
je 0x33e0
movswl 0x6(%rdi), %ebx
incl %ebx
callq 0x2050
testl %ebp, %ebp
jle 0x3424
xorl %r12d, %r12d
movl 0x2d9e(%rip), %eax      # 0x6190
leal (%r12,%rax), %ecx
cmpl %r15d, %ecx
jge 0x3424
movl 0x2d8b(%rip), %edx      # 0x618c
subl %eax, %edx
xorl %ecx, %ecx
cmpl %edx, %r12d
sete %cl
leal (%r12,%rax), %edx
incl %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x3551
incl %r12d
cmpl %r12d, %ebp
jne 0x33ec
cvtsi2sd %r15d, %xmm2
movl %ebp, %r12d
cmpl %ebp, %r15d
jle 0x3446
cvtsi2sd %ebp, %xmm0
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %r12d
movsd %xmm2, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x2d35(%rip), %xmm0 # 0x618c
movsd %xmm0, 0x8(%rsp)
movq (%r13), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x21c0
testl %r12d, %r12d
js 0x34c4
movsd 0x8(%rsp), %xmm1
divsd 0x10(%rsp), %xmm1
movl %ebp, %eax
subl %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %r14d
leal -0x1(%rbx), %r15d
incl %r12d
movq (%r13), %rdi
movl %r14d, %esi
movl %r15d, %edx
callq 0x2270
cmpl $-0x1, %eax
je 0x34bc
movq (%r13), %rdi
movl $0x20, %esi
callq 0x2290
incl %r14d
decl %r12d
jne 0x349a
movq (%r13), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x22e0
movq (%r13), %rdi
leal -0x2(%rbx), %edx
xorl %esi, %esi
callq 0x2270
cmpl $-0x1, %eax
je 0x34f4
movq (%r13), %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x2260
movq (%r13), %rdi
movl 0x2c8e(%rip), %esi      # 0x618c
subl 0x2c8c(%rip), %esi      # 0x6190
addl $-0x3, %ebx
movl %ebx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2270
// File: /workspace/github_c_makefile_star2_O1/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)
je 0x38e3
incl (%r14)
cmpl %ebp, (%r14)
je 0x391a
cmpb $0x1, (%rbx)
jne 0x3918
cmpl $0x0, 0x18(%rbx)
je 0x3918
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x38cb
testq %rax, %rax
jne 0x3928
incq %r15
movl 0x18(%rbx), %eax
cmpq %rax, %r15
jb 0x38f6
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x391a
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x39a4
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x240c
movq %rax, %r14
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq %rax, %rdx
callq 0x272c
movq %r14, %rdi
callq 0x268a
movq %r14, %rdi
callq 0x26e5
movl $0x1, %edi
callq 0x20c0
testl %eax, %eax
je 0x398a
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0x2ec8
jmp 0x3992
movq %r14, %rdi
callq 0x25bd
movq %r14, %rdi
callq 0x24d5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2300
movl $0x1, %eax
jmp 0x399c
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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:
movb (%rdi), %al
testb %al, %al
je 0x120f
incq %rdi
xorl %ecx, %ecx
rolw $0x5, %cx
movzbl %al, %eax
addl %ecx, %eax
movl %eax, %ecx
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x11f7
movzwl %cx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movb (%rdi), %cl
testb %cl, %cl
je 0x123e
incq %rdi
xorl %edx, %edx
movl %edx, %eax
shll $0x5, %eax
shrl $0x13, %edx
orl %eax, %edx
movzbl %cl, %eax
addl %edx, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movb (%rdi), %cl
incq %rdi
movl %eax, %edx
testb %cl, %cl
jne 0x121d
jmp 0x1240
xorl %eax, %eax
cmpl $0x1, %eax
adcl $0x0, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movb (%rdi), %cl
testb %cl, %cl
je 0x1284
xorl %edx, %edx
xorl %eax, %eax
movsbl %cl, %esi
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
movb 0x1(%rdi,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x1251
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x12b0
movq (%r14), %rsi
leaq 0xd59(%rip), %rdi       # 0x2004
jmp 0x13eb
movq 0x8(%r14), %rdi
leaq 0xd79(%rip), %rsi       # 0x2034
callq 0x10d0
testq %rax, %rax
je 0x13d4
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 0xd5e(%rip), %rsi       # 0x2058
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10e0
leaq 0xd56(%rip), %rsi       # 0x2064
movq %r15, %rdi
callq 0x10d0
testq %rax, %rax
je 0x13e1
movq %rax, %r14
movq %rsp, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x10a0
testq %rax, %rax
je 0x13b4
movq %rsp, %r15
leaq 0xd49(%rip), %r13       # 0x208a
cmpw $0x2f2f, (%rsp)         # imm = 0x2F2F
jne 0x1356
movq %r15, %rdi
movq %r14, %rsi
callq 0x1070
jmp 0x139f
movq %r15, %rdi
leaq 0xd27(%rip), %rsi       # 0x2087
callq 0x1090
movb $0x0, (%rsp,%rax)
movq %r15, %rdi
callq 0x11ec
movl %eax, %ebp
movq %r15, %rdi
callq 0x1212
movl %eax, %r12d
movq %r15, %rdi
callq 0x1247
movzwl %bp, %ecx
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %r12d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x10b0
movq %r15, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
callq 0x10a0
testq %rax, %rax
jne 0x1341
movq %rbx, %rdi
callq 0x1040
movq %r14, %rdi
callq 0x1040
leaq 0xcd5(%rip), %rdi       # 0x20a0
callq 0x1030
xorl %eax, %eax
jmp 0x13f7
movq 0x8(%r14), %rsi
leaq 0xc57(%rip), %rdi       # 0x2036
jmp 0x13eb
leaq 0xc7e(%rip), %rdi       # 0x2066
movq %r15, %rsi
xorl %eax, %eax
callq 0x1060
movl $0x1, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x150f(%rip), %rsi      # 0x4212
callq 0x2230
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x2e53
movq %rax, %r14
movl $0x8, %edi
callq 0x21d0
movq %rax, 0x34d6(%rip)      # 0x6200
testq %rax, %rax
je 0x2e16
movl $0x0, 0x34cb(%rip)      # 0x6208
leaq -0x1030(%rbp), %r15
movq %r15, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x2160
testq %rax, %rax
je 0x2e20
movq %r15, %rcx
movzbl (%rcx), %eax
testl %eax, %eax
je 0x2d78
cmpl $0xd, %eax
je 0x2d75
cmpl $0xa, %eax
jne 0x2e0e
movb $0x0, (%rcx)
movq %r15, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdi
callq 0x21d0
movq 0x3470(%rip), %r12      # 0x6200
movslq 0x3471(%rip), %rbx      # 0x6208
movq %rax, (%r12,%rbx,8)
testq %rax, %rax
je 0x2e46
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, 0x343f(%rip)     # 0x6208
leaq 0x10(,%rbx,8), %rsi
movq %r12, %rdi
callq 0x21f0
movq %rax, 0x3420(%rip)      # 0x6200
testq %rax, %rax
je 0x2e46
movslq %r13d, %rcx
movq $0x0, (%rax,%rcx,8)
movq %r15, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x2160
movq %r15, %rcx
testq %rax, %rax
jne 0x2d60
jmp 0x2e20
incq %rcx
jmp 0x2d60
movq %r14, %rdi
callq 0x20d0
jmp 0x2e53
movq %r14, %rdi
callq 0x20d0
movq 0x33d1(%rip), %rax      # 0x6200
movq %rax, 0x33da(%rip)      # 0x6210
movl 0x33cc(%rip), %eax      # 0x6208
movl %eax, 0x33d6(%rip)      # 0x6218
xorl %ebx, %ebx
jmp 0x2e53
movq %r14, %rdi
callq 0x20d0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
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_O1/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 0x2e9e
movl %edi, %ebx
cmpl %edi, 0x339f(%rip)      # 0x6218
jle 0x2e9e
callq 0x337e
movl %ebx, 0x3312(%rip)      # 0x6198
movq 0x3383(%rip), %rax      # 0x6210
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x33fd
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x336d(%rip), %eax      # 0x6218
decl %eax
cmpl %eax, 0x32e5(%rip)      # 0x6198
jge 0x2ee1
pushq %rbp
movq %rsp, %rbp
callq 0x337e
movslq 0x32d3(%rip), %rax      # 0x6198
leaq 0x1(%rax), %rcx
movl %ecx, 0x32c9(%rip)      # 0x6198
movq 0x333a(%rip), %rcx      # 0x6210
movq 0x8(%rcx,%rax,8), %rdi
popq %rbp
jmp 0x33fd
movl $0xffffffff, 0x32ad(%rip) # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x32a4(%rip)      # 0x6198
sete %al
movl %eax, (%rsi)
xorl %eax, %eax
testl %edi, %edi
js 0x2f3a
cmpl %edi, 0x3313(%rip)      # 0x6218
jle 0x2f3a
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x32fc(%rip), %rax      # 0x6210
movl %edi, %ecx
movq (%rax,%rcx,8), %rbx
movq %rbx, %rdi
movl $0x2f, %esi
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_O1/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:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %esi, %ecx
orl %edi, %ecx
js 0x2fb8
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movl %edi, %ebx
movl 0x32b4(%rip), %ecx      # 0x6218
cmpl %edi, %ecx
setle %dl
cmpl %esi, %ecx
setle %cl
orb %dl, %cl
jne 0x2fb4
callq 0x3505
movq 0x3292(%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 0x31ff(%rip), %eax      # 0x6198
cmpl %ebx, %eax
jne 0x2fa2
movl %r14d, %ebx
jmp 0x2fa7
cmpl %r14d, %eax
jne 0x2fad
movl %ebx, 0x31eb(%rip)      # 0x6198
callq 0x3543
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %edi, %edi
callq 0x21a0
movl %eax, %edi
callq 0x2070
callq 0x3505
cmpl $0x0, 0x323f(%rip)      # 0x6218
jle 0x302d
xorl %ebx, %ebx
callq 0x21c0
movslq 0x322f(%rip), %rcx      # 0x6218
cqto
idivq %rcx
movq 0x321b(%rip), %rax      # 0x6210
movq (%rax,%rbx,8), %rcx
movq (%rax,%rdx,8), %rsi
movq %rsi, (%rax,%rbx,8)
movq %rcx, (%rax,%rdx,8)
movl 0x318d(%rip), %eax      # 0x6198
cmpl %edx, %eax
jne 0x3013
movl %ebx, %edx
jmp 0x3018
cmpq %rax, %rbx
jne 0x301e
movl %edx, 0x317a(%rip)      # 0x6198
incq %rbx
movslq 0x31f0(%rip), %rax      # 0x6218
cmpq %rax, %rbx
jl 0x2fdd
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3543
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
callq 0x2240
leaq 0x1(%rax), %r15
testq %rax, %rax
cmoveq %r14, %r15
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
cmpb $0x0, (%r15)
je 0x32c5
movq %rbx, %rdi
callq 0x20e0
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21e0
testl %eax, %eax
je 0x32c2
cmpb $0x0, 0x1(%r15)
leaq 0x1(%r15), %r15
jne 0x32a3
jmp 0x32c5
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2f1e(%rip), %rbx      # 0x6200
testq %rbx, %rbx
je 0x331a
movslq 0x2f1a(%rip), %r14      # 0x6208
testq %r14, %r14
jle 0x3307
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2050
incq %r15
cmpq %r15, %r14
jne 0x32f6
movq %rbx, %rdi
callq 0x2050
movq $0x0, 0x2ee6(%rip) # 0x6200
movq 0x2eff(%rip), %rbx      # 0x6220
testq %rbx, %rbx
je 0x3359
movslq 0x2efb(%rip), %r14      # 0x6228
testq %r14, %r14
jle 0x3346
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2050
incq %r15
cmpq %r15, %r14
jne 0x3335
movq %rbx, %rdi
callq 0x2050
movq $0x0, 0x2ec7(%rip) # 0x6220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x2ebb(%rip)      # 0x6240
je 0x33fc
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
leaq -0xa8(%rbp), %rbx
movq $0x1, -0x8(%rbx)
movq %rbx, %rdi
callq 0x2170
xorl %r14d, %r14d
movl %r14d, 0x80(%rbx)
leaq -0xb0(%rbp), %rsi
movl $0x11, %edi
xorl %edx, %edx
callq 0x20a0
movl 0x2e71(%rip), %edi      # 0x6240
movl $0x2, %esi
callq 0x2190
movl 0x2e61(%rip), %edi      # 0x6240
leaq -0x14(%rbp), %rsi
xorl %edx, %edx
callq 0x2210
movl %r14d, 0x2e4f(%rip)     # 0x6240
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x2e33(%rip)      # 0x6238
je 0x34cd
cmpl $0x0, 0x2e2e(%rip)      # 0x6240
jg 0x34cd
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x9e(%rip), %rax        # 0x34ce
leaq -0xa0(%rbp), %r14
movq %rax, -0x8(%r14)
movq %r14, %rdi
callq 0x2170
movl $0x0, 0x80(%r14)
leaq -0xa8(%rbp), %rsi
movl $0x11, %edi
xorl %edx, %edx
callq 0x20a0
callq 0x22e0
movl %eax, 0x2dd4(%rip)      # 0x6240
testl %eax, %eax
jne 0x34c2
xorl %edi, %edi
callq 0x2130
movl $0x1, %edi
callq 0x2130
movl $0x2, %edi
callq 0x2130
leaq 0xd82(%rip), %rdi       # 0x4214
movl $0x2, %esi
xorl %eax, %eax
callq 0x2220
xorl %edi, %edi
callq 0x2110
xorl %edi, %edi
callq 0x2110
movq 0x2d85(%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_O1/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 0x2d64(%rip), %edi      # 0x6240
leaq -0x4(%rbp), %rsi
xorl %edx, %edx
callq 0x2210
movl $0x0, 0x2d4f(%rip)      # 0x6240
movq 0x2d38(%rip), %rax      # 0x6230
testq %rax, %rax
je 0x34ff
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/pipde[P]deos-songlib/lib/wave.c
// Function: readWave
WAVE *
readWave(const char *fileName)
    {
    WAVE *w;

    w = readWaveFP(OpenFile(fileName,"r"));
    w->inName = StringDup(fileName);

    fprintf(stderr,"file name is %s\n",w->inName);

    return w;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x21ce(%rip), %rsi      # 0x3470
callq 0x2136
movq %rax, %rdi
callq 0x293d
movq %rax, %r14
movq %rbx, %rdi
callq 0x21ac
movq %rax, 0x90(%r14)
movq 0x4d30(%rip), %rcx      # 0x5ff8
movq (%rcx), %rdi
leaq 0x234e(%rip), %rsi      # 0x3620
movq %rax, %rdx
xorl %eax, %eax
callq 0x1100
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq