LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x335d
movl %eax, %r14d
movq 0x2c14(%rip), %r13      # 0x5fd8
movq (%r13), %rdi
testq %rdi, %rdi
je 0x3424
movswl 0x4(%rdi), %r12d
leal 0x1(%r12), %ebp
movswl 0x6(%rdi), %ebx
incl %ebx
callq 0x2050
testl %r12d, %r12d
js 0x3433
xorl %r12d, %r12d
movl 0x2da0(%rip), %eax      # 0x6190
leal (%r12,%rax), %ecx
cmpl %r14d, %ecx
jge 0x3433
movl 0x2d8d(%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 0x3569
incl %r12d
cmpl %r12d, %ebp
jne 0x33ea
jmp 0x3433
callq 0x2050
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl %ebp, %r14d
jle 0x3456
cvtsi2sd %ebp, %xmm0
cvtsi2sd %r14d, %xmm1
movsd %xmm1, 0x8(%rsp)
divsd %xmm0, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %r12d
jmp 0x3464
cvtsi2sd %r14d, %xmm0
movsd %xmm0, 0x8(%rsp)
movl %ebp, %r12d
xorps %xmm0, %xmm0
cvtsi2sdl 0x2d1d(%rip), %xmm0 # 0x618c
movsd %xmm0, 0x10(%rsp)
movq (%r13), %rdi
movl $0x40000, %esi          # imm = 0x40000
xorl %edx, %edx
callq 0x21c0
testl %r12d, %r12d
js 0x34dc
movsd 0x10(%rsp), %xmm1
divsd 0x8(%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 0x34d4
movq (%r13), %rdi
movl $0x20, %esi
callq 0x2290
incl %r14d
decl %r12d
jne 0x34b2
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 0x350c
movq (%r13), %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x2260
movq (%r13), %rdi
movl 0x2c76(%rip), %esi      # 0x618c
subl 0x2c74(%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_O3/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 0x38ff
incl %eax
movl %eax, (%r14)
cmpl %ebp, %eax
je 0x3935
cmpb $0x1, (%rbx)
jne 0x3933
cmpl $0x0, 0x18(%rbx)
je 0x3933
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x38e3
testq %rax, %rax
jne 0x3943
incq %r15
movl 0x18(%rbx), %eax
cmpq %rax, %r15
jb 0x3911
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3935
// File: /workspace/github_c_makefile_star2_O3/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 0x39bc
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 0x2734
movq %r14, %rdi
callq 0x2691
movq %r14, %rdi
callq 0x26ec
movl $0x1, %edi
callq 0x20c0
testl %eax, %eax
je 0x39a2
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0x2ed0
jmp 0x39aa
movq %r14, %rdi
callq 0x25c4
movq %r14, %rdi
callq 0x24dc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x2300
movl $0x1, %eax
jmp 0x39b4
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x14fb(%rip), %rsi      # 0x4212
callq 0x2230
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x2e67
movq %rax, %r14
movl $0x8, %edi
callq 0x21d0
movq %rax, 0x34c2(%rip)      # 0x6200
testq %rax, %rax
je 0x2e2a
movl $0x0, 0x34b7(%rip)      # 0x6208
leaq -0x1030(%rbp), %r15
movq %r15, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x2160
testq %rax, %rax
je 0x2e34
movq %r15, %rcx
movzbl (%rcx), %eax
testl %eax, %eax
je 0x2d8c
cmpl $0xd, %eax
je 0x2d89
cmpl $0xa, %eax
jne 0x2e22
movb $0x0, (%rcx)
movq %r15, %rdi
callq 0x20e0
leaq 0x1(%rax), %rdi
callq 0x21d0
movq 0x345c(%rip), %r12      # 0x6200
movslq 0x345d(%rip), %rbx      # 0x6208
movq %rax, (%r12,%rbx,8)
testq %rax, %rax
je 0x2e5a
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, 0x342b(%rip)     # 0x6208
leaq 0x10(,%rbx,8), %rsi
movq %r12, %rdi
callq 0x21f0
movq %rax, 0x340c(%rip)      # 0x6200
testq %rax, %rax
je 0x2e5a
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 0x2d74
jmp 0x2e34
incq %rcx
jmp 0x2d74
movq %r14, %rdi
callq 0x20d0
jmp 0x2e67
movq %r14, %rdi
callq 0x20d0
movq 0x33bd(%rip), %rax      # 0x6200
movq %rax, 0x33c6(%rip)      # 0x6210
movl 0x33b8(%rip), %eax      # 0x6208
movl %eax, 0x33c2(%rip)      # 0x6218
xorl %ebx, %ebx
jmp 0x2e67
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_O3/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 0x2eb2
movl %edi, %ebx
cmpl %edi, 0x338b(%rip)      # 0x6218
jle 0x2eb2
callq 0x3382
movl %ebx, 0x32fe(%rip)      # 0x6198
movq 0x336f(%rip), %rax      # 0x6210
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3401
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3359(%rip), %eax      # 0x6218
decl %eax
cmpl %eax, 0x32d1(%rip)      # 0x6198
jge 0x2ef5
pushq %rbp
movq %rsp, %rbp
callq 0x3382
movslq 0x32bf(%rip), %rax      # 0x6198
leaq 0x1(%rax), %rcx
movl %ecx, 0x32b5(%rip)      # 0x6198
movq 0x3326(%rip), %rcx      # 0x6210
movq 0x8(%rcx,%rax,8), %rdi
popq %rbp
jmp 0x3401
movl $0xffffffff, 0x3299(%rip) # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x3290(%rip)      # 0x6198
sete %al
movl %eax, (%rsi)
xorl %eax, %eax
testl %edi, %edi
js 0x2f4e
cmpl %edi, 0x32ff(%rip)      # 0x6218
jle 0x2f4e
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x32e8(%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_O3/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 0x2fcc
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movl %edi, %ebx
movl 0x32a0(%rip), %ecx      # 0x6218
cmpl %edi, %ecx
setle %dl
cmpl %esi, %ecx
setle %cl
orb %dl, %cl
jne 0x2fc8
callq 0x3509
movq 0x327e(%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 0x31eb(%rip), %eax      # 0x6198
cmpl %ebx, %eax
jne 0x2fb6
movl %r14d, %ebx
jmp 0x2fbb
cmpl %r14d, %eax
jne 0x2fc1
movl %ebx, 0x31d7(%rip)      # 0x6198
callq 0x3547
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3509
cmpl $0x0, 0x322b(%rip)      # 0x6218
jle 0x303a
xorl %ebx, %ebx
callq 0x21c0
movslq 0x321b(%rip), %rcx      # 0x6218
cqto
idivq %rcx
movq 0x3207(%rip), %rax      # 0x6210
movq (%rax,%rbx,8), %rsi
movq (%rax,%rdx,8), %rdi
movq %rdi, (%rax,%rbx,8)
movq %rsi, (%rax,%rdx,8)
movl 0x3179(%rip), %eax      # 0x6198
cmpl %edx, %eax
jne 0x3027
movl %ebx, %edx
jmp 0x302c
cmpq %rax, %rbx
jne 0x3032
movl %edx, 0x3166(%rip)      # 0x6198
incq %rbx
cmpq %rcx, %rbx
jl 0x2ff1
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3547
// File: /workspace/github_c_makefile_star2_O3/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 0x32c8
movq %rbx, %rdi
callq 0x20e0
movq %rax, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21e0
testl %eax, %eax
je 0x32c5
cmpb $0x0, 0x1(%r15)
leaq 0x1(%r15), %r15
jne 0x32a6
jmp 0x32c8
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2f1b(%rip), %rbx      # 0x6200
testq %rbx, %rbx
je 0x331d
movslq 0x2f17(%rip), %r14      # 0x6208
testq %r14, %r14
jle 0x330a
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2050
incq %r15
cmpq %r15, %r14
jne 0x32f9
movq %rbx, %rdi
callq 0x2050
movq $0x0, 0x2ee3(%rip) # 0x6200
movq 0x2efc(%rip), %rbx      # 0x6220
testq %rbx, %rbx
je 0x335c
movslq 0x2ef8(%rip), %r14      # 0x6228
testq %r14, %r14
jle 0x3349
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
callq 0x2050
incq %r15
cmpq %r15, %r14
jne 0x3338
movq %rbx, %rdi
callq 0x2050
movq $0x0, 0x2ec4(%rip) # 0x6220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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, 0x2eb7(%rip)      # 0x6240
je 0x3400
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 0x2e6d(%rip), %edi      # 0x6240
movl $0x2, %esi
callq 0x2190
movl 0x2e5d(%rip), %edi      # 0x6240
leaq -0x14(%rbp), %rsi
xorl %edx, %edx
callq 0x2210
movl %r14d, 0x2e4b(%rip)     # 0x6240
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x2e2f(%rip)      # 0x6238
je 0x34d1
cmpl $0x0, 0x2e2a(%rip)      # 0x6240
jg 0x34d1
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x9e(%rip), %rax        # 0x34d2
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, 0x2dd0(%rip)      # 0x6240
testl %eax, %eax
jne 0x34c6
xorl %edi, %edi
callq 0x2130
movl $0x1, %edi
callq 0x2130
movl $0x2, %edi
callq 0x2130
leaq 0xd7e(%rip), %rdi       # 0x4214
movl $0x2, %esi
xorl %eax, %eax
callq 0x2220
xorl %edi, %edi
callq 0x2110
xorl %edi, %edi
callq 0x2110
movq 0x2d81(%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_O3/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 0x2d60(%rip), %edi      # 0x6240
leaq -0x4(%rbp), %rsi
xorl %edx, %edx
callq 0x2210
movl $0x0, 0x2d4b(%rip)      # 0x6240
movq 0x2d34(%rip), %rax      # 0x6230
testq %rax, %rax
je 0x3503
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x212a
movq %rax, %rdi
callq 0x28af
movq %rax, %r14
movq %rbx, %rdi
callq 0x2192
movq %rax, 0x90(%r14)
movq 0x4d30(%rip), %rcx      # 0x5ff8
movq (%rcx), %rdi
leaq 0x235e(%rip), %rsi      # 0x3630
movq %rax, %rdx
xorl %eax, %eax
callq 0x1100
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: readWaveMono
WAVE *
readWaveMono(const char *fileName)
    {
    WAVE *w;
    w = readWaveMonoFP(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 0x217b(%rip), %rsi      # 0x3470
callq 0x212a
movq %rax, %rdi
callq 0x2a7f
movq %rax, %r14
movq %rbx, %rdi
callq 0x2192
movq %rax, 0x90(%r14)
movq 0x4cdd(%rip), %rcx      # 0x5ff8
movq (%rcx), %rdi
leaq 0x230b(%rip), %rsi      # 0x3630
movq %rax, %rdx
xorl %eax, %eax
callq 0x1100
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: writeWaveHeader
void
writeWaveHeader(FILE *out,int rate,int channels,int bps,int samples)
    {
    writeByteString(out,"RIFF",4);

    writeByteInt(out,36 + samples * channels * (bps / 8),4);

    writeByteString(out,"WAVE",4);

    writeByteString(out,"fmt ",4);

    writeByteInt(out,16,4); //PCM subchunk

    writeByteInt(out,1,2); //PCM (no compression)

    writeByteInt(out,channels,2);  //1 for mono, 2 for stereo

    writeByteInt(out,rate,4); //sample rate

    writeByteInt(out,rate * channels * (bps / 8),4); //byte rate

    writeByteInt(out,channels * (bps / 8),2); //block align

    writeByteInt(out,bps,2); //bits per sample

    writeByteString(out,"data",4);

    writeByteInt(out,samples * channels * (bps / 8),4); //subchunk 2 size

    fprintf(stderr,"header written\n");
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r15d
movl %ecx, %ebp
movl %ecx, 0xc(%rsp)
movl %edx, %r12d
movl %esi, 0x8(%rsp)
movq %rdi, %r14
leaq 0x2399(%rip), %rdi      # 0x36fb
pushq $0x1
popq %rbx
pushq $0x4
popq %r13
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
pushq $0x8
popq %rcx
movl %ebp, %eax
cltd
idivl %ecx
movl %eax, %ebp
imull %r12d, %ebp
imull %ebp, %r15d
movq %r15, 0x10(%rsp)
leal 0x24(%r15), %eax
leaq 0x4(%rsp), %r15
movl %eax, (%r15)
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
leaq 0x234e(%rip), %rdi      # 0x3700
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
leaq 0x225f(%rip), %rdi      # 0x3626
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
movl $0x10, (%r15)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
movl $0x1, (%r15)
leaq 0x4(%rsp), %r15
pushq $0x2
popq %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
movl %r12d, (%r15)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
movl 0x8(%rsp), %r12d
movl %r12d, (%r15)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x4
popq %rdx
movq %r14, %rcx
callq 0x11a0
movl %r12d, %eax
imull %ebp, %eax
movl %eax, (%r15)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x4
popq %r12
movq %r12, %rdx
movq %r14, %rcx
callq 0x11a0
movl %ebp, (%r15)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
movl 0xc(%rsp), %eax
movl %eax, (%r15)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x11a0
leaq 0x1dfb(%rip), %rdi      # 0x32a5
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x11a0
movq 0x10(%rsp), %rax
movl %eax, (%r15)
leaq 0x4(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x11a0
movq 0x4b1e(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x2221(%rip), %rdi      # 0x3705
pushq $0xf
popq %rsi
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11a0
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: newDoubleArray
double *
newDoubleArray(int size)
    {
    double *a = (double *) New(sizeof(double) * (size+1));

    fprintf(stderr,"newDoubleArray: allocating %d reals at location %p\n",size,a);

    a[0] = size + 0.01;
    return a + 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leal 0x8(,%rbx,8), %edi
callq 0x21af
movq %rax, %r14
movq 0x4adf(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x21f2(%rip), %rsi      # 0x3715
movl %ebx, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x1100
cvtsi2sd %ebx, %xmm0
addsd 0x2015(%rip), %xmm0     # 0x3550
movsd %xmm0, (%r14)
addq $0x8, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
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
cmpl $0x0, 0x34(%rbx)
jg 0x23a3
movq %rbx, %rdi
popq %rbx
jmp 0x1030
leaq 0x34(%rbx), %rsi
movq %rbx, %rdi
callq 0x15fa
jmp 0x239a
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: cloneWave
WAVE *
cloneWave(WAVE *v)
    {
    int i;
    WAVE *w = newWave();

    w->ID = v->ID;
    w->Format = v->Format;
    w->Subchunk1ID = v->Subchunk1ID;
    w->Subchunk2ID = v->Subchunk2ID;
    w->ChunkSize = v->ChunkSize;
    w->Subchunk1Size = v->Subchunk1Size;
    w->AudioFormat = v->AudioFormat;
    w->NumChannels = v->NumChannels;
    w->SampleRate = v->SampleRate;
    w->ByteRate = v->ByteRate;
    w->BlockAlign = v->BlockAlign;
    w->BitsPerSample = v->BitsPerSample;
    w->Subchunk2Size = v->Subchunk2Size;
    for (i = 0; i < MAX_CHANNELS; ++i)
        w->channels[i] = v->channels[i];
    w->sampleCount = v->sampleCount;
    w->sampleWidth = v->sampleWidth;
    w->maxAmp = v->maxAmp;

    return w;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xd0, %edi
callq 0x21af
movq %rax, %r14
xorl %eax, %eax
movq %rax, 0x90(%r14)
movq %rax, 0xa0(%r14)
movl $0x84, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x10e0
movaps 0x1155(%rip), %xmm0     # 0x3540
movups %xmm0, 0xa8(%r14)
movsd 0xc0d(%rip), %xmm0      # 0x3008
movups %xmm0, 0xb8(%r14)
movl $0x0, 0xc8(%r14)
movups (%rbx), %xmm0
movups %xmm0, (%r14)
movups 0x10(%rbx), %xmm0
movups %xmm0, 0x10(%r14)
movups 0x20(%rbx), %xmm0
movups %xmm0, 0x20(%r14)
movups 0x30(%rbx), %xmm0
movups %xmm0, 0x30(%r14)
movq 0x40(%rbx), %rax
movq %rax, 0x40(%r14)
movq 0x48(%rbx), %rax
movq %rax, 0x48(%r14)
movl $0xa, %eax
movq (%rbx,%rax,8), %rcx
movq %rcx, (%r14,%rax,8)
incq %rax
cmpq $0xf, %rax
jne 0x2445
movq 0x78(%rbx), %rax
movq %rax, 0x78(%r14)
movl 0x80(%rbx), %eax
movl %eax, 0x80(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: displayWave
void
displayWave(WAVE *w)
    {
    printf("ID: %s\n",w->ID);
    printf("ChunkSize: %ld\n",w->ChunkSize);
    printf("Format: %s\n",w->Format);
    printf("Subchunk1ID: %s\n",w->Subchunk1ID);
    printf("Subchunk1Size: %ld\n",w->Subchunk1Size);
    printf("AudioFormat: %d\n",w->AudioFormat);
    printf("NumChannels: %d\n",w->NumChannels);
    printf("SampleRate: %d\n",w->SampleRate);
    printf("ByteRate: %d\n",w->ByteRate);
    printf("BlockAlign: %d\n",w->BlockAlign);
    printf("BitsPerSample: %d\n",w->BitsPerSample);
    printf("Subchunk2ID: %s\n",w->Subchunk2ID);
    printf("Subchunk2Size: %ld\n",w->Subchunk2Size);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rsi
leaq 0x10f9(%rip), %rdi      # 0x357d
xorl %eax, %eax
callq 0x10c0
movq 0x20(%rbx), %rsi
leaq 0x10c2(%rip), %rdi      # 0x3558
xorl %eax, %eax
callq 0x10c0
movq 0x8(%rbx), %rsi
leaq 0x10c0(%rip), %rdi      # 0x3568
xorl %eax, %eax
callq 0x10c0
movq 0x10(%rbx), %rsi
leaq 0x10ba(%rip), %rdi      # 0x3574
xorl %eax, %eax
callq 0x10c0
movq 0x28(%rbx), %rsi
leaq 0x10b9(%rip), %rdi      # 0x3585
xorl %eax, %eax
callq 0x10c0
movl 0x30(%rbx), %esi
leaq 0x10bc(%rip), %rdi      # 0x3599
xorl %eax, %eax
callq 0x10c0
movl 0x34(%rbx), %esi
leaq 0x10bc(%rip), %rdi      # 0x35aa
xorl %eax, %eax
callq 0x10c0
movl 0x38(%rbx), %esi
leaq 0x10bc(%rip), %rdi      # 0x35bb
xorl %eax, %eax
callq 0x10c0
movl 0x3c(%rbx), %esi
leaq 0x10bb(%rip), %rdi      # 0x35cb
xorl %eax, %eax
callq 0x10c0
movl 0x40(%rbx), %esi
leaq 0x10b8(%rip), %rdi      # 0x35d9
xorl %eax, %eax
callq 0x10c0
movl 0x44(%rbx), %esi
leaq 0x10b7(%rip), %rdi      # 0x35e9
xorl %eax, %eax
callq 0x10c0
movq 0x18(%rbx), %rsi
leaq 0x10b8(%rip), %rdi      # 0x35fc
xorl %eax, %eax
callq 0x10c0
movq 0x48(%rbx), %rsi
leaq 0x10b7(%rip), %rdi      # 0x360d
xorl %eax, %eax
popq %rbx
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: isID
static int
isID(FILE *in,char *id)
    {
    char ch;
    int matching = 1;
    int count = 0;
    while (matching && *id)
        {
        fread(&ch,sizeof(char),1,in);
        if (ch != *id) matching = 0;
        //fprintf(stderr,"comparing %c (%d) with %c\n",ch,ch,*id);
        ++count;
        ++id;
        }
    skip(in,-count);
    //if (matching) 
    //    fprintf(stderr,"match!\n");
    //else
    //    fprintf(stderr,"no match.\n");
    return matching;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0xf(%rsp), %r15
cmpb $0x0, (%r14,%r12)
je 0x2888
movl $0x1, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1070
movb 0xf(%rsp), %cl
leaq 0x1(%r12), %rax
cmpb (%r14,%r12), %cl
movq %rax, %r12
je 0x2853
xorl %ebp, %ebp
movl %eax, %r12d
jmp 0x288d
movl $0x1, %ebp
negl %r12d
movslq %r12d, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1140
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: readWaveFP
WAVE *
readWaveFP(FILE *in)
    {
    int i,j;
    WAVE *w;

    w = newWave();

    readWaveHeader(w,in);

    if (w->AudioFormat != 1)
        fprintf(stderr,"WARNING: Audio format is not PCM");

    //fprintf(stderr,"allocating %d samples for each of %d channels\n",
            //w->sampleCount,w->NumChannels);

    for (j = 0; j < w->NumChannels; ++j)
        w->channels[j] = (int *) newIntArray(w->sampleCount);

    for (i = 0; !feof(in) && i < w->sampleCount; ++i)
        for (j = 0; j < w->NumChannels; ++j)
            {
            int amp;
            amp = readByteInt(in,w->sampleWidth);
            if (amp >= w->maxAmp)
                amp = -2 * w->maxAmp + amp;
            //if (i < 1000) printf("read sample %d: %d\n", i, amp);
            w->channels[j][i] = amp;
            }

    //fprintf(stderr,"i is %d\n",i);
    if (i != w->sampleCount)
        {
        fprintf(stderr,"sample count mismatch, setting sample count to %d\n",
            i);
        setWaveSize(w,i);
        }

    fclose(in);

    //fprintf(stderr,"samples allocated\n");

    return w;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0xd0, %edi
callq 0x21af
movq %rax, %rbp
movq %rax, %r14
xorl %eax, %eax
movq %rax, 0x90(%rbp)
movq %rax, 0xa0(%rbp)
movl $0x84, %edx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x10e0
movaps 0xc4a(%rip), %xmm0      # 0x3540
movups %xmm0, 0xa8(%rbp)
movsd 0x703(%rip), %xmm0      # 0x3008
movups %xmm0, 0xb8(%rbp)
movl $0x0, 0xc8(%rbp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x255e
cmpl $0x1, 0x30(%rbp)
jne 0x2a20
cmpl $0x0, 0x34(%r14)
jle 0x295e
xorl %r15d, %r15d
movl 0x78(%r14), %r12d
leal 0x4(,%r12,4), %edi
callq 0x21af
movl %r12d, (%rax)
addq $0x4, %rax
movq %rax, 0x50(%r14,%r15,8)
incq %r15
movslq 0x34(%r14), %rax
cmpq %rax, %r15
jl 0x2935
leaq 0x34(%rbp), %rax
movq %rax, 0x10(%rsp)
addq $0x78, %rbp
movq %rbx, %rdi
callq 0x1110
xorl %r13d, %r13d
testl %eax, %eax
jne 0x2a00
movq %rbp, 0x8(%rsp)
xorl %r12d, %r12d
leaq 0x4(%rsp), %rbp
xorl %r13d, %r13d
movq 0x8(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %r13
jge 0x29fb
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
jle 0x29ec
xorl %r15d, %r15d
movslq 0x7c(%r14), %rdx
movl %r12d, 0x4(%rsp)
movl $0x1, %esi
movq %rbp, %rdi
movq %rbx, %rcx
callq 0x1070
movl 0x4(%rsp), %eax
movl 0x80(%r14), %ecx
leal (%rcx,%rcx), %edx
cmpl %ecx, %eax
cmovll %r12d, %edx
subl %edx, %eax
movq 0x50(%r14,%r15,8), %rcx
movl %eax, (%rcx,%r13,4)
incq %r15
movslq 0x34(%r14), %rax
cmpq %rax, %r15
jl 0x29a8
incq %r13
movq %rbx, %rdi
callq 0x1110
testl %eax, %eax
je 0x298e
movq 0x8(%rsp), %rbp
cmpl (%rbp), %r13d
jne 0x2a2a
movq %rbx, %rdi
callq 0x10a0
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x165f
jmp 0x292b
movl %r13d, %edi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x167b
jmp 0x2a06
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: growIntArray
int *
growIntArray(int *a)
    {
    int i;
    int *b = newIntArray(LENGTH(a) * 2);

    for (i = 0; i < LENGTH(a); ++i)
        b[i] = a[i];

    return b;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl -0x4(%rdi), %eax
leal 0x4(,%rax,8), %edi
movl %eax, %ebp
addl %eax, %ebp
callq 0x21af
movl %ebp, (%rax)
addq $0x4, %rax
cmpl $0x0, -0x4(%rbx)
jle 0x2da0
xorl %ecx, %ecx
movl (%rbx,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
movslq -0x4(%rbx), %rdx
cmpq %rdx, %rcx
jl 0x2d8e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pipde[P]deos-songlib/lib/wave.c
// Function: copyIntArray
int *
copyIntArray(int *a)
    {
    int i;
    int *b = newIntArray(LENGTH(a));

    for (i = 0; i < LENGTH(a); ++i)
        b[i] = a[i];

    return b;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl -0x4(%rdi), %r14d
leal 0x4(,%r14,4), %edi
callq 0x21af
movl %r14d, (%rax)
addq $0x4, %rax
cmpl $0x0, -0x4(%rbx)
jle 0x2de0
xorl %ecx, %ecx
movl (%rbx,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
movslq -0x4(%rbx), %rdx
cmpq %rdx, %rcx
jl 0x2dce
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/pyk[P]simple-nn/deps/pcg/src/pcg-advance-64.c
// Function: pcg_advance_lcg_64
uint64_t pcg_advance_lcg_64(uint64_t state, uint64_t delta, uint64_t cur_mult,
                            uint64_t cur_plus)
{
    uint64_t acc_mult = 1u;
    uint64_t acc_plus = 0u;
    while (delta > 0) {
        if (delta & 1) {
            acc_mult *= cur_mult;
            acc_plus = acc_plus * cur_mult + cur_plus;
        }
        cur_plus = (cur_mult + 1) * cur_plus;
        cur_mult *= cur_mult;
        delta /= 2;
    }
    return acc_mult * state + acc_plus;
}

// Assembly:
movl $0x1, %eax
xorl %r8d, %r8d
testq %rsi, %rsi
je 0x1755
testb $0x1, %sil
je 0x173a
imulq %rdx, %rax
imulq %rdx, %r8
addq %rcx, %r8
leaq 0x1(%rdx), %r9
imulq %r9, %rcx
imulq %rdx, %rdx
movq %rsi, %r9
shrq %r9
cmpq $0x1, %rsi
movq %r9, %rsi
ja 0x1729
imulq %rdi, %rax
addq %r8, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/Tarsnap[P]libcperciva/tests/optional_mutex/normal/../main.c
// Function: main
int
main(int argc, char * argv[])
{
	int counter_expected;

	WARNP_INIT;
	(void)argc; /* UNUSED */

#ifdef NUM_THREADS
	counter_expected = NUM_TIMES * NUM_THREADS;
	if (test_pthread())
		goto err0;
#else
	counter_expected = NUM_TIMES;
	inc_dec_counter(NULL);
#endif

	/* Check the counter. */
	if (check_counter(counter_expected))
		goto err0;

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x1385
callq 0x148c
movl $0x64, %ebp
leaq 0x2d37(%rip), %r14      # 0x40c8
leaq 0xc6c(%rip), %rbx       # 0x2004
movq %rsp, %r15
leaq 0xc7a(%rip), %r12       # 0x201c
movq %r14, %rdi
callq 0x1750
testl %eax, %eax
jne 0x142a
incl 0x2d3c(%rip)            # 0x40f0
movq $0x0, (%rsp)
movq $0x989680, 0x8(%rsp)    # imm = 0x989680
movq %r15, %rdi
xorl %esi, %esi
callq 0x1080
decl 0x2d1b(%rip)            # 0x40f0
incl 0x2d19(%rip)            # 0x40f4
movq %r14, %rdi
callq 0x1753
testl %eax, %eax
jne 0x1427
decl %ebp
jne 0x13a2
leaq 0x2cd6(%rip), %rdi      # 0x40c8
callq 0x1750
testl %eax, %eax
jne 0x1450
movl 0x2cef(%rip), %ebp      # 0x40f0
movl 0x2ced(%rip), %ebx      # 0x40f4
leaq 0x2cba(%rip), %rdi      # 0x40c8
callq 0x1753
testl %eax, %eax
jne 0x1459
testl %ebp, %ebp
jne 0x147f
cmpl $0x64, %ebx
jne 0x147f
xorl %edi, %edi
callq 0x1110
movq %r12, %rbx
movl %eax, %edi
callq 0x1140
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x162b
callq 0x1060
movl $0x0, (%rax)
xorl %edi, %edi
callq 0x10d0
leaq 0xbad(%rip), %rbx       # 0x2004
jmp 0x1460
leaq 0xbbc(%rip), %rbx       # 0x201c
movl %eax, %edi
callq 0x1140
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x162b
callq 0x1060
movl $0x0, (%rax)
movl $0x1, %edi
callq 0x1110
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_type_of
es_type_t es_type_of(es_val_t val)
{
  switch(es_tag(val)) {
  case ES_OBJ_TAG:    return obj_type_of(val);
  case ES_VALUE_TAG:  return es_payload(es_type_t, val);
  case ES_BOOL_TAG:   return ES_BOOL_TYPE;
  case ES_FIXNUM_TAG: return ES_FIXNUM_TYPE;
  case ES_SYMBOL_TAG: return ES_SYMBOL_TYPE;
  case ES_CHAR_TAG:   return ES_CHAR_TYPE;
  default:            return ES_INVALID_TYPE;
  }
}

// Assembly:
movq %rdi, %rax
movl %eax, %ecx
andl $0x7, %ecx
cmpq $0x5, %rcx
ja 0x1911
leaq 0x471f(%rip), %rdx      # 0x6008
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl (%rax), %eax
retq
movl $0x1, %eax
retq
movl $0x3, %eax
retq
sarl $0x3, %eax
retq
movl $0x2, %eax
retq
movl $0x4, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_port_vprintf
es_val_t es_port_vprintf(es_ctx_t* ctx, es_val_t port, const char* fmt, va_list args)
{
  if (!fmt || *fmt == '\0') {
    return es_void;
  }

  es_port_t* p = es_port_val(port);
  char buf[1024];
  char* loc = strstr(fmt, "%@");

  if (loc) {
    strncpy(buf, fmt, loc - fmt);
    buf[loc - fmt] = '\0';
    if (*buf != '\0') {
      vfprintf(p->stream, buf, args);
    }
    es_val_t val = va_arg(args, es_val_t);
    es_port_write(ctx, port, val);
    es_port_vprintf(ctx, port, loc + 2, args);
    return es_void;
  } else {
    vfprintf(p->stream, fmt, args);
    return es_void;
  }
}

// Assembly:
testq %rdx, %rdx
je 0x1a84
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdx, %r13
cmpb $0x0, (%rdx)
je 0x1a73
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4df2(%rip), %rsi      # 0x67d0
movq %r13, %rdi
callq 0x1180
testq %rax, %rax
je 0x1a33
movq %rax, %r12
movq %rax, %rbp
subq %r13, %rbp
movq %rsp, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1040
movb $0x0, (%rsp,%rbp)
movq %rsp, %rax
cmpb $0x0, (%rax)
je 0x1a1d
movq 0x10(%r14), %rdi
movq %rsp, %rsi
movq %rbx, %rdx
callq 0x1130
movl (%rbx), %ecx
cmpq $0x28, %rcx
ja 0x1a44
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x1a50
movq 0x10(%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1130
jmp 0x1a73
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a94
addq $0x2, %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x19a8
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_make_char_cstr
es_val_t es_make_char_cstr(char* buf)
{
  if (strcmp("space", buf) == 0) {
    return es_make_char(' ');
  } else if (strcmp("newline", buf) == 0) {
    return es_make_char('\n');
  } else if (strcmp("tab", buf) == 0) {
    return es_make_char('\t');
  } else {
    return es_make_char(*buf);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x4745(%rip), %rdi      # 0x67a7
movq %rbx, %rsi
callq 0x10e0
testl %eax, %eax
je 0x20a2
leaq 0x473a(%rip), %rdi      # 0x67af
movq %rbx, %rsi
callq 0x10e0
testl %eax, %eax
je 0x20a9
leaq 0x4731(%rip), %rdi      # 0x67b9
movq %rbx, %rsi
callq 0x10e0
testl %eax, %eax
je 0x20b0
movsbq (%rbx), %rax
leaq 0x5(,%rax,8), %rax
jmp 0x20b5
movl $0x105, %eax            # imm = 0x105
jmp 0x20b5
movl $0x55, %eax
jmp 0x20b5
movl $0x4d, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_alloc
static void* es_alloc(es_ctx_t* ctx, es_type_t type, size_t size)
{
  void* mem = heap_alloc(&ctx->heap, size);

  if (!mem) {
    es_gc(ctx);
    mem = heap_alloc(&ctx->heap, size);
    if (!mem) {
      exit(1);
    }
  }

  obj_init(es_obj_to_val(mem), type);
  return mem;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movq 0x10(%rdi), %rax
movq 0x28(%rdi), %rcx
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %rcx
cmpq %rdx, %rcx
jb 0x2154
leaq (%rax,%r14), %rcx
movq %rcx, 0x10(%r15)
testq %rax, %rax
jne 0x2180
movq %r15, %rdi
callq 0x3526
movq 0x10(%r15), %rax
movq 0x28(%r15), %rcx
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %rcx
cmpq %r14, %rcx
jb 0x2190
addq %rax, %r14
movq %r14, 0x10(%r15)
testq %rax, %rax
je 0x2190
movl %ebx, (%rax)
movq $0x0, 0x8(%rax)
popq %rbx
popq %r14
popq %r15
retq
movl $0x1, %edi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_make_pair
es_val_t es_make_pair(es_ctx_t* ctx, es_val_t head, es_val_t tail)
{
  es_pair_t* pair;
  gc_root2(ctx, head, tail);
  pair = es_alloc(ctx, ES_PAIR_TYPE, sizeof(es_pair_t));
  pair->head = head;
  pair->tail = tail;
  gc_unroot(ctx, 2);
  return es_obj_to_val(pair);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %rsi, (%r14)
movq %rsp, %r15
movq %rdx, (%r15)
movslq 0x2040(%rdi), %rax
movq %r14, 0x40(%rdi,%rax,8)
leal 0x2(%rax), %ecx
movl %ecx, 0x2040(%rdi)
movq %r15, 0x48(%rdi,%rax,8)
movl $0x20, %edx
movl $0x6, %esi
callq 0x2122
movq (%r14), %rcx
movq %rcx, 0x10(%rax)
movq (%r15), %rcx
movq %rcx, 0x18(%rax)
addl $-0x2, 0x2040(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_make_port
es_val_t es_make_port(es_ctx_t* ctx, FILE* stream)
{
  es_port_t* port = es_alloc(ctx, ES_PORT_TYPE, sizeof(es_port_t));
  port->stream = stream;
  port->eof    = 0;
  port->top    = 0;
  port->tail   = 0;
  port->cur    = 0;
  port->nbytes = 0;
  port->linum  = 0;
  port->colnum = 0;
  port->size   = 65536;
  port->buf    = malloc(port->size);
  return es_obj_to_val(port);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x1848, %edx           # imm = 0x1848
movl $0xc, %esi
callq 0x2122
movq %rax, %r14
movq %rbx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x24(%rax)
movups %xmm0, 0x34(%rax)
movl $0x10000, 0x20(%rax)    # imm = 0x10000
movl $0x10000, %edi          # imm = 0x10000
callq 0x1100
movq %rax, 0x18(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_port_getc
int es_port_getc(es_val_t port)
{
  es_port_t* p = es_port_val(port);
  if (p->cur < p->tail) {
    int c = p->buf[p->cur++];
    if (p->top == 0 && p->cur == p->tail)
      p->cur = p->tail = 0;
    return port_update_pos(port, c);
  } else if (p->eof) {
    return EOF;
  } else {
    int c = getc(p->stream);
    if (EOF == c) {
      p->eof = 1;
    } else if (p->top > 0) {
      assert(p->tail < p->size);
      p->buf[p->tail] = c;
      p->cur = ++p->tail;
    } else if (p->cur == p->tail) {
      p->cur = p->tail = 0;
    }
    return port_update_pos(port, c);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq 0x24(%rdi), %rax
movl 0x28(%rdi), %ecx
cmpl %ecx, %eax
jge 0x2787
movq 0x18(%rbx), %rsi
leal 0x1(%rax), %edx
movl %edx, 0x24(%rbx)
movsbl (%rsi,%rax), %eax
cmpl $0x0, 0x40(%rbx)
jne 0x277a
cmpl %ecx, %edx
jne 0x277a
movq $0x0, 0x24(%rbx)
incq 0x30(%rbx)
incl 0x3c(%rbx)
cmpb $0xa, %al
je 0x27e8
jmp 0x27f7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x0, 0x2c(%rbx)
jne 0x27f7
movq 0x10(%rbx), %rdi
callq 0x1170
cmpl $-0x1, %eax
je 0x27c3
cmpl $0x0, 0x40(%rbx)
jle 0x27cc
movslq 0x28(%rbx), %rcx
cmpl 0x20(%rbx), %ecx
jge 0x27f9
movq 0x18(%rbx), %rdx
movb %al, (%rdx,%rcx)
movl 0x28(%rbx), %ecx
incl %ecx
movl %ecx, 0x28(%rbx)
movl %ecx, 0x24(%rbx)
jmp 0x27dc
movl $0x1, 0x2c(%rbx)
jmp 0x27dc
movl 0x24(%rbx), %ecx
cmpl 0x28(%rbx), %ecx
jne 0x27dc
movq $0x0, 0x24(%rbx)
incq 0x30(%rbx)
incl 0x3c(%rbx)
cmpl $0xa, %eax
jne 0x27f7
incl 0x38(%rbx)
movl $0x0, 0x3c(%rbx)
movl $0xa, %eax
popq %rbx
retq
leaq 0x3c34(%rip), %rdi      # 0x6434
leaq 0x3c3f(%rip), %rsi      # 0x6446
leaq 0x3c3e(%rip), %rcx      # 0x644c
movl $0x336, %edx            # imm = 0x336
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_port_peekc
int es_port_peekc(es_val_t port)
{
  es_port_t* p = es_port_val(port);
  if (p->cur < p->tail) {
    return p->buf[p->cur];
  } else {
    es_port_mark(port);
    int c = es_port_getc(port);
    es_port_reset(port);
    return c;
  }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x24(%rdi), %eax
cmpl 0x28(%rdi), %eax
jge 0x2832
cltq
movq 0x18(%rbx), %rcx
movsbl (%rcx,%rax), %eax
jmp 0x286a
movslq 0x40(%rbx), %rcx
leaq (%rcx,%rcx,2), %rdx
movl %eax, 0x48(%rbx,%rdx,8)
movq 0x30(%rbx), %rax
movq %rax, 0x50(%rbx,%rdx,8)
movq 0x38(%rbx), %rax
movq %rax, 0x58(%rbx,%rdx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x40(%rbx)
movq %rbx, %rdi
callq 0x274b
movl %eax, %ebp
movq %rbx, %rdi
callq 0x2871
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_port_reset
void es_port_reset(es_val_t port)
{
  es_port_t* p = es_port_val(port);
  assert(p->top > 0);
  --p->top;
  p->cur    = p->state[p->top].cur;
  p->nbytes = p->state[p->top].nbytes;
  p->linum  = p->state[p->top].linum;
  p->colnum = p->state[p->top].colnum;
}

// Assembly:
movl 0x40(%rdi), %eax
testl %eax, %eax
jle 0x289b
decl %eax
movl %eax, 0x40(%rdi)
leaq (%rax,%rax,2), %rax
movl 0x48(%rdi,%rax,8), %ecx
movl %ecx, 0x24(%rdi)
movq 0x50(%rdi,%rax,8), %rcx
movq %rcx, 0x30(%rdi)
movq 0x58(%rdi,%rax,8), %rax
movq %rax, 0x38(%rdi)
retq
pushq %rax
leaq 0x3bc4(%rip), %rdi      # 0x6467
leaq 0x3b9c(%rip), %rsi      # 0x6446
leaq 0x3bc1(%rip), %rcx      # 0x6472
movl $0x35b, %edx            # imm = 0x35B
callq 0x10a0
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_make_fn
es_val_t es_make_fn(es_ctx_t* ctx, int arity, es_pfn_t pfn)
{
  es_fn_t* fn = es_alloc(ctx, ES_FN_TYPE, sizeof(es_fn_t));
  fn->arity   = arity;
  fn->pfn     = pfn;
  return es_obj_to_val(fn);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl $0x20, %edx
movl $0xe, %esi
callq 0x2122
movl %ebp, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_make_string
es_val_t es_make_string(es_ctx_t* ctx, char* cstr)
{
  es_string_t* string;
  long length = strlen(cstr);
  string = es_alloc(ctx, ES_STRING_TYPE, sizeof(es_string_t) + length + 1);
  string->length = length;
  strcpy(string->value, cstr);
  return es_obj_to_val(string);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1070
movq %rax, %r15
leaq 0x19(%rax), %rdx
movq %r14, %rdi
movl $0x5, %esi
callq 0x2122
movq %rax, %r14
movq %r15, 0x10(%rax)
leaq 0x18(%rax), %rdi
movq %rbx, %rsi
callq 0x1050
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/pedro-onate[P]eva/eva.c
// Function: es_string_make
es_val_t es_string_make(es_ctx_t* ctx, int length, char c)
{
  es_string_t* string;
  string = es_alloc(ctx, ES_STRING_TYPE, sizeof(es_string_t) + length + 1);
  string->length = length;
  for(int i = 0; i < string->length; i++) {
    string->value[i] = c;
  }
  string->value[string->length] = '\0';
  return es_obj_to_val(string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movslq %esi, %r15
leaq 0x19(%r15), %rdx
movl $0x5, %esi
callq 0x2122
movq %rax, %r14
movq %r15, 0x10(%rax)
testl %r15d, %r15d
je 0x2ac0
movq %r14, %rdi
addq $0x18, %rdi
movl %ebp, %edx
movzbl %bl, %esi
callq 0x10b0
movb $0x0, 0x18(%r14,%r15)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq