LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: main
int main(int argc, char *argv[])
{
  file_node_t *root;
  char *root_dir;
  FILE *fh;

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

  fh = fopen(argv[1], "wx");
  if (fh == NULL) {
     fprintf(stderr, "Error: Cannot open file, or it exists already: %s\n", argv[1]);
     return 1;
  }

  if (argc > 2) {
    root_dir = argv[2];
  } else {
    root_dir = ".";
  }

  root = file_node_new(NULL, NULL, FILE_NODE_TYPE_ROOT);
  if (root == NULL) {
    fclose(fh);
    return 1;
  }

  if (file_node_scan(root, root_dir) != 0) {
    file_node_remove(root);
    fclose(fh);
    return 1;
  }

  file_node_sort(root);

  if (isatty(STDOUT_FILENO)) {
    file_node_curses_loop(root);
    file_node_print_marked(root, root_dir, fh);
  } else {
    /* Mostly for debugging. */
    file_node_dump(root);
  }

  file_node_remove(root);
  fclose(fh);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x1367
movq 0x3cb5(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x1cb0(%rip), %rsi      # 0x3004
movb $0x0, %al
callq 0x1150
movl $0x1, -0x4(%rbp)
jmp 0x1482
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x1cb3(%rip), %rsi      # 0x3029
callq 0x11a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x13b2
movq 0x3c6b(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1c8d(%rip), %rsi      # 0x302c
movb $0x0, %al
callq 0x1150
movl $0x1, -0x4(%rbp)
jmp 0x1482
cmpl $0x2, -0x8(%rbp)
jle 0x13c6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x13d1
leaq 0x1c92(%rip), %rax      # 0x305f
movq %rax, -0x20(%rbp)
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movq %rsi, %rdi
callq 0x1490
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x13ff
movq -0x28(%rbp), %rdi
callq 0x10a0
movl $0x1, -0x4(%rbp)
jmp 0x1482
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1560
cmpl $0x0, %eax
je 0x142c
movq -0x18(%rbp), %rdi
callq 0x16d0
movq -0x28(%rbp), %rdi
callq 0x10a0
movl $0x1, -0x4(%rbp)
jmp 0x1482
movq -0x18(%rbp), %rdi
callq 0x1750
movl $0x1, %edi
callq 0x1080
cmpl $0x0, %eax
je 0x1460
movq -0x18(%rbp), %rdi
callq 0x17c0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1b10
jmp 0x1469
movq -0x18(%rbp), %rdi
callq 0x1bc0
movq -0x18(%rbp), %rdi
callq 0x16d0
movq -0x28(%rbp), %rdi
callq 0x10a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_new
static file_node_t *file_node_new(file_node_t *parent, char *name, file_node_type_t type)
{
  int len;
  file_node_t *new;

  new = (file_node_t *)malloc(sizeof(file_node_t));
  if (new == NULL)
    return NULL;

  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->parent = parent;
  new->no_of_subnodes = 0;
  new->subnode = NULL;
  new->marked = 0;
  
  return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x30, %edi
callq 0x1180
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x14c5
movq $0x0, -0x8(%rbp)
jmp 0x1552
cmpq $0x0, -0x18(%rbp)
jne 0x14da
movq -0x28(%rbp), %rax
movq $0x0, 0x8(%rax)
jmp 0x1513
movq -0x18(%rbp), %rdi
callq 0x10c0
addq $0x1, %rax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rdi
callq 0x1180
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x1060
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x28(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_scan
static int file_node_scan(file_node_t *current, char *path)
{
  DIR *dh;
  struct dirent *entry;
  struct stat st;
  char fullpath[PATH_MAX];
  file_node_t *subnode;

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

  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 = file_node_add(current, entry->d_name, FILE_NODE_TYPE_DIR);
      file_node_scan(subnode, fullpath);

    } else if (S_ISREG(st.st_mode)) {
      file_node_add(current, entry->d_name, FILE_NODE_TYPE_FILE);
    }
  }

  closedir(dh);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10d0, %rsp           # imm = 0x10D0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x15af
movq 0x3a6a(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x1ac5(%rip), %rsi      # 0x3061
movb $0x0, %al
callq 0x1150
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x16bc
jmp 0x15b1
movq -0x20(%rbp), %rdi
callq 0x1170
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x16ac
movq -0x28(%rbp), %rax
movsbl 0x13(%rax), %eax
cmpl $0x2e, %eax
jne 0x15d7
jmp 0x15b1
leaq -0x10c0(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r8
addq $0x13, %r8
movl $0x1000, %esi           # imm = 0x1000
leaq 0x1a90(%rip), %rdx      # 0x3086
movb $0x0, %al
callq 0x10f0
leaq -0x10c0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x1160
cmpl $-0x1, %eax
jne 0x1639
movq 0x39dc(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq -0x10c0(%rbp), %rdx
leaq 0x1a5f(%rip), %rsi      # 0x308c
movb $0x0, %al
callq 0x1150
jmp 0x15b1
movl -0xa0(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x167d
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x13, %rsi
movl $0x1, %edx
callq 0x1c90
movq %rax, -0x10c8(%rbp)
movq -0x10c8(%rbp), %rdi
leaq -0x10c0(%rbp), %rsi
callq 0x1560
jmp 0x16a7
movl -0xa0(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x16a5
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x13, %rsi
movl $0x2, %edx
callq 0x1c90
jmp 0x16a7
jmp 0x15b1
movq -0x20(%rbp), %rdi
callq 0x1110
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10d0, %rsp           # imm = 0x10D0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_remove
static void file_node_remove(file_node_t *node)
{
  int i;
  free(node->name);
  for (i = 0; i < node->no_of_subnodes; i++) {
    file_node_remove(node->subnode[i]);
  }
  if (node->subnode != NULL) {
    free(node->subnode);
  }
  free(node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1040
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jae 0x171c
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x16d0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x16f0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x1734
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rdi
callq 0x1040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_sort
static void file_node_sort(file_node_t *node)
{
  int i;
  qsort(node->subnode, node->no_of_subnodes, sizeof(file_node_t *), file_node_compare);
  for (i = 0; i < node->no_of_subnodes; i++) {
    file_node_sort(node->subnode[i]);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, %esi
movl $0x8, %edx
leaq 0x5d7(%rip), %rcx       # 0x1d50
callq 0x1070
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jae 0x17b1
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1750
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1785
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_print_marked
static void file_node_print_marked(file_node_t *node, char *root_dir, FILE *fh)
{
  int i;
  char path[PATH_MAX];

  if (node->marked) {
    fprintf(fh, "%s/%s\n", root_dir, file_node_path(node, path, PATH_MAX));
  }

  for (i = 0; i < node->no_of_subnodes; i++) {
    file_node_print_marked(node->subnode[i], root_dir, fh);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1030, %rsp           # imm = 0x1030
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1b7a
movq -0x18(%rbp), %rax
movq %rax, -0x1030(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1028(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x1020(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2500
movq -0x1030(%rbp), %rdi
movq -0x1028(%rbp), %rdx
movq %rax, %rcx
leaq 0x153d(%rip), %rsi      # 0x30b0
movb $0x0, %al
callq 0x1150
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jae 0x1bb5
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x1b10
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1b81
addq $0x1030, %rsp           # imm = 0x1030
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_dump
static void file_node_dump(file_node_t *node)
{
  int i, depth;

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

  if (node->type == FILE_NODE_TYPE_ROOT)
    printf("/");
  else {
    printf("%s", node->name);
    if (node->type == FILE_NODE_TYPE_DIR)
      printf("/");
  }

  printf("\n");

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x24c0
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
cmpl $0x1, %eax
jle 0x1bf8
leaq 0x14c8(%rip), %rdi      # 0x30b7
movb $0x0, %al
callq 0x10e0
jmp 0x1bd8
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x1c12
leaq 0x14b1(%rip), %rdi      # 0x30ba
movb $0x0, %al
callq 0x10e0
jmp 0x1c42
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x1468(%rip), %rdi      # 0x3089
movb $0x0, %al
callq 0x10e0
movq -0x8(%rbp), %rax
cmpl $0x1, 0x10(%rax)
jne 0x1c40
leaq 0x1481(%rip), %rdi      # 0x30ba
movb $0x0, %al
callq 0x10e0
jmp 0x1c42
leaq 0x13de(%rip), %rdi      # 0x3027
movb $0x0, %al
callq 0x10e0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jae 0x1c83
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1bc0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1c57
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_add
static file_node_t *file_node_add(file_node_t *current, char *name, file_node_type_t type)
{
  file_node_t *new;

  new = file_node_new(current, name, type);
  if (new == NULL)
    return NULL;

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

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

  return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x1490
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1cc8
movq $0x0, -0x8(%rbp)
jmp 0x1d40
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1cea
movl $0x8, %edi
callq 0x1180
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x1d14
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x3, %rsi
callq 0x1190
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_list_size
static int file_node_list_size(file_node_t *node)
{
  int i, size;

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

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

  return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x1dcf
movl $0x0, -0x10(%rbp)
jmp 0x1dd6
movl $0x1, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jae 0x1e0f
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1db0
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1ddd
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: curses_winch_handler
static void curses_winch_handler(file_node_t *node)
{
  endwin(); /* To get new window limits. */
  curses_update_screen(node);
  flushinp();
  keypad(stdscr, TRUE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
callq 0x11f0
movq -0x8(%rbp), %rdi
callq 0x1e20
callq 0x1050
movq 0x2f52(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
movl $0x1, %esi
callq 0x1120
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_mark
static void file_node_mark(file_node_t *node, int node_no)
{
  int node_count;
  file_node_t *found;

  node_count = 0;
  found = file_node_get_by_node_no(node, node_no, &node_count);
  if (found == NULL)
    return;

  if (found->type != FILE_NODE_TYPE_FILE)
    return; /* Only files, not directories, can be marked. */

  if (found->marked == 0) {
    found->marked = 1;
  } else {
    found->marked = 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x10(%rbp), %rdx
callq 0x2410
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x20d3
jmp 0x20fe
movq -0x18(%rbp), %rax
cmpl $0x2, 0x10(%rax)
je 0x20df
jmp 0x20fe
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x20f4
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
jmp 0x20fe
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_get_by_node_no
static file_node_t *file_node_get_by_node_no(file_node_t *node, int node_no, int *node_count)
{
  file_node_t *found;
  int i;

  if (node->type != FILE_NODE_TYPE_ROOT) {
    *node_count = *node_count + 1;
  }
  
  if (*node_count == node_no) {
    return node; /* Match found, return self. */
  }

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

  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x243c
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x2451
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24aa
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jae 0x24a2
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x2410
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2495
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x24aa
jmp 0x2497
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2458
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_depth
static int file_node_depth(file_node_t *node)
{
  int depth;

  depth = 0;
  do {
    if (node->type == FILE_NODE_TYPE_ROOT) {
      break;
    }
    node = node->parent;
    depth++;
  } while (node != NULL);

  return depth;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x24db
jmp 0x24f7
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x24cf
movl -0xc(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/kobolt[P]curses-collection/fileselect/fileselect.c
// Function: file_node_path
static char *file_node_path(file_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 == FILE_NODE_TYPE_ROOT) {
      break;
    }
    strncpy(temp, path, PATH_MAX);
    snprintf(path, path_len, "%s/%s", node->name, temp);
    node = node->parent;
  }

  return path;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1020, %rsp           # imm = 0x1020
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x14(%rbp), %rdx
callq 0x1060
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x2592
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x254a
jmp 0x2592
leaq -0x1020(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x1060
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
leaq -0x1020(%rbp), %r8
leaq 0xb09(%rip), %rdx       # 0x3086
movb $0x0, %al
callq 0x10f0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x2537
movq -0x10(%rbp), %rax
addq $0x1020, %rsp           # imm = 0x1020
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/giometti[P]mastering_UNIX_programming/chapter_05/readdir.c
// Function: main
int main(int argc, char *argv[])
{
	struct stat buf;
	DIR *d;
	struct dirent *dp;
	int dirfd, fd;
        int ret;

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

	/* Open the directory entry */
	dirfd = open(argv[1], O_RDONLY);
	if (dirfd < 0) {
		perror("open");
		return -1;
	}

	/* Create the DIR stream over the dirfd */
	d = fdopendir(dirfd);
	if (d == NULL) {
		fprintf(stderr,
			"Cannot open %s directory\n", argv[1]);
		return -1;
	}

	/* Now iterate over files */
	printf("Files list for directory %s:\n", argv[1]);
	printf("size\tname\n");
	while ((dp = readdir(d)) != NULL) {
		/* Get a file descriptor for next direntry */
		fd = openat(dirfd, dp->d_name, O_RDONLY);
		if (fd < 0) {
			perror(dp->d_name);
			continue;
		}

		/* Get file's statistics */
		ret = fstat(fd, &buf);
		close(fd); /* fd is not needed anymore */
		if (ret < 0) {
			perror(dp->d_name);
			continue;
		}

		/* Print the file entry (size & name) */
		printf("%ld\t%s\n",
			(intmax_t) buf.st_size,
			dp->d_name);
	}

	closedir(d); /* this implicitly closes dirfd */

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x121a
movq 0x2e02(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0xdfd(%rip), %rsi       # 0x2004
movb $0x0, %al
callq 0x1070
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x138c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x1090
movl %eax, -0xb4(%rbp)
cmpl $0x0, -0xb4(%rbp)
jge 0x1252
leaq 0xdd4(%rip), %rdi       # 0x2015
callq 0x10a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x138c
movl -0xb4(%rbp), %edi
callq 0x10b0
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x129a
movq 0x2d83(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xd93(%rip), %rsi       # 0x201a
movb $0x0, %al
callq 0x1070
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x138c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xd8b(%rip), %rdi       # 0x2034
movb $0x0, %al
callq 0x1040
leaq 0xd9b(%rip), %rdi       # 0x2052
movb $0x0, %al
callq 0x1040
movq -0xa8(%rbp), %rdi
callq 0x1080
movq %rax, -0xb0(%rbp)
cmpq $0x0, %rax
je 0x1379
movl -0xb4(%rbp), %edi
movq -0xb0(%rbp), %rsi
addq $0x13, %rsi
xorl %edx, %edx
movb $0x0, %al
callq 0x1030
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0xb8(%rbp)
jge 0x1316
movq -0xb0(%rbp), %rdi
addq $0x13, %rdi
callq 0x10a0
jmp 0x12be
movl -0xb8(%rbp), %edi
leaq -0xa0(%rbp), %rsi
callq 0x10c0
movl %eax, -0xbc(%rbp)
movl -0xb8(%rbp), %edi
callq 0x1050
cmpl $0x0, -0xbc(%rbp)
jge 0x1357
movq -0xb0(%rbp), %rdi
addq $0x13, %rdi
callq 0x10a0
jmp 0x12be
movq -0x70(%rbp), %rsi
movq -0xb0(%rbp), %rdx
addq $0x13, %rdx
leaq 0xcf0(%rip), %rdi       # 0x205d
movb $0x0, %al
callq 0x1040
jmp 0x12be
movq -0xa8(%rbp), %rdi
callq 0x1060
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: stack4
int
stack4(unsigned short a, unsigned short b, unsigned short c, unsigned short d) {
//	printf("stack4: %x,%x,%x,%x\n", a, b, c, d);
	if (STACK16(S+1) + 1 != a) return 0;
	if (STACK16(S+3) + 1 != b) return 0;
	if (STACK16(S+5) + 1 != c) return 0;
	if (STACK16(S+7) + 1 != d) return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %cx, %ax
movw %dx, %cx
movw %si, %dx
movw %di, %si
movw %si, -0x6(%rbp)
movw %dx, -0x8(%rbp)
movw %cx, -0xa(%rbp)
movw %ax, -0xc(%rbp)
leaq 0x6ab9(%rip), %rax      # 0x42120
movzbl (%rax), %eax
addl $0x100, %eax            # imm = 0x100
addl $0x1, %eax
movslq %eax, %rcx
leaq 0xf434(%rip), %rax      # 0x4aab0
movzbl (%rax,%rcx), %eax
leaq 0x6a99(%rip), %rcx      # 0x42120
movzbl (%rcx), %ecx
addl $0x100, %ecx            # imm = 0x100
addl $0x1, %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xf410(%rip), %rcx      # 0x4aab0
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
addl $0x1, %eax
movzwl -0x6(%rbp), %ecx
cmpl %ecx, %eax
je 0x3b6c0
movl $0x0, -0x4(%rbp)
jmp 0x3b7e1
leaq 0x6a59(%rip), %rax      # 0x42120
movzbl (%rax), %eax
addl $0x100, %eax            # imm = 0x100
addl $0x3, %eax
movslq %eax, %rcx
leaq 0xf3d4(%rip), %rax      # 0x4aab0
movzbl (%rax,%rcx), %eax
leaq 0x6a39(%rip), %rcx      # 0x42120
movzbl (%rcx), %ecx
addl $0x100, %ecx            # imm = 0x100
addl $0x3, %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xf3b0(%rip), %rcx      # 0x4aab0
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
addl $0x1, %eax
movzwl -0x8(%rbp), %ecx
cmpl %ecx, %eax
je 0x3b720
movl $0x0, -0x4(%rbp)
jmp 0x3b7e1
leaq 0x69f9(%rip), %rax      # 0x42120
movzbl (%rax), %eax
addl $0x100, %eax            # imm = 0x100
addl $0x5, %eax
movslq %eax, %rcx
leaq 0xf374(%rip), %rax      # 0x4aab0
movzbl (%rax,%rcx), %eax
leaq 0x69d9(%rip), %rcx      # 0x42120
movzbl (%rcx), %ecx
addl $0x100, %ecx            # imm = 0x100
addl $0x5, %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xf350(%rip), %rcx      # 0x4aab0
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
addl $0x1, %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
je 0x3b77d
movl $0x0, -0x4(%rbp)
jmp 0x3b7e1
leaq 0x699c(%rip), %rax      # 0x42120
movzbl (%rax), %eax
addl $0x100, %eax            # imm = 0x100
addl $0x7, %eax
movslq %eax, %rcx
leaq 0xf317(%rip), %rax      # 0x4aab0
movzbl (%rax,%rcx), %eax
leaq 0x697c(%rip), %rcx      # 0x42120
movzbl (%rcx), %ecx
addl $0x100, %ecx            # imm = 0x100
addl $0x7, %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xf2f3(%rip), %rcx      # 0x4aab0
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
addl $0x1, %eax
movzwl -0xc(%rbp), %ecx
cmpl %ecx, %eax
je 0x3b7da
movl $0x0, -0x4(%rbp)
jmp 0x3b7e1
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: init_os
int
init_os(int argc, char **argv) {
//	printf("init_os %d\n", argc);
	if (!argc) /* continuation */
		return PC;

	if (argc>1) {
		interactive = 0;
		input_file = fopen(argv[1], "r");
		if (!input_file) {
			printf("Error opening: %s\n", argv[1]);
			exit(1);
		}
		if (fgetc(input_file)=='#') {
			char c;
			do {
				c = fgetc(input_file);
			} while((c!=13)&&(c!=10));
		} else {
			fseek(input_file, 0, SEEK_SET);
		}
	} else {
		interactive = 1;
		input_file = NULL;
	}
	srand((unsigned int)time(NULL));

	return 0xE394; /* main entry point of BASIC */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x3bc07
leaq 0x1eeb4(%rip), %rax     # 0x5aab0
movzwl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3bce6
cmpl $0x1, -0x8(%rbp)
jle 0x3bcba
movl $0x0, 0x1ef79(%rip)     # 0x5ab94
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x3ea6(%rip), %rsi      # 0x3fad0
callq 0x11e0
movq %rax, 0x1ef62(%rip)     # 0x5ab98
cmpq $0x0, 0x1ef5a(%rip)     # 0x5ab98
jne 0x3bc60
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x3e83(%rip), %rdi      # 0x3fad2
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11f0
movq 0x1ef31(%rip), %rdi     # 0x5ab98
callq 0x1100
cmpl $0x23, %eax
jne 0x3bca6
jmp 0x3bc73
movq 0x1ef1e(%rip), %rdi     # 0x5ab98
callq 0x1100
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %ecx
xorl %eax, %eax
cmpl $0xd, %ecx
movb %al, -0x12(%rbp)
je 0x3bc9d
movsbl -0x11(%rbp), %eax
cmpl $0xa, %eax
setne %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
testb $0x1, %al
jne 0x3bc73
jmp 0x3bcb8
movq 0x1eeeb(%rip), %rdi     # 0x5ab98
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x11d0
jmp 0x3bccf
movl $0x1, 0x1eed0(%rip)     # 0x5ab94
movq $0x0, 0x1eec9(%rip) # 0x5ab98
xorl %eax, %eax
movl %eax, %edi
callq 0x1180
movl %eax, %edi
callq 0x1130
movl $0xe394, -0x4(%rbp)     # imm = 0xE394
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: plugin_on
void
plugin_on() {
	if (plugin)
		return;

	replace_vector(VEC_ERROR, MAGIC_ERROR, &orig_error);
	replace_vector(VEC_MAIN, MAGIC_MAIN, &orig_main);
	replace_vector(VEC_CRNCH, MAGIC_CRNCH, &orig_crnch);
	replace_vector(VEC_QPLOP, MAGIC_QPLOP, &orig_qplop);
	replace_vector(VEC_GONE, MAGIC_GONE, &orig_gone);
	replace_vector(VEC_EVAL, MAGIC_EVAL, &orig_eval);
	
	plugin = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x1ee15(%rip)     # 0x5aba0
je 0x3bd92
jmp 0x3be20
movl $0x300, %edi            # imm = 0x300
movl $0xff00, %esi           # imm = 0xFF00
leaq 0x1ee01(%rip), %rdx     # 0x5aba4
callq 0x3bcf0
movl $0x302, %edi            # imm = 0x302
movl $0xff01, %esi           # imm = 0xFF01
leaq 0x1eded(%rip), %rdx     # 0x5aba6
callq 0x3bcf0
movl $0x304, %edi            # imm = 0x304
movl $0xff02, %esi           # imm = 0xFF02
leaq 0x1edd9(%rip), %rdx     # 0x5aba8
callq 0x3bcf0
movl $0x306, %edi            # imm = 0x306
movl $0xff03, %esi           # imm = 0xFF03
leaq 0x1edc5(%rip), %rdx     # 0x5abaa
callq 0x3bcf0
movl $0x308, %edi            # imm = 0x308
movl $0xff04, %esi           # imm = 0xFF04
leaq 0x1edb1(%rip), %rdx     # 0x5abac
callq 0x3bcf0
movl $0x30a, %edi            # imm = 0x30A
movl $0xff05, %esi           # imm = 0xFF05
leaq 0x1ed9d(%rip), %rdx     # 0x5abae
callq 0x3bcf0
movl $0x1, 0x1ed80(%rip)     # 0x5aba0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: OPEN
static void
OPEN() {
    kernal_status = 0;
    if (kernal_files[kernal_lfn]) {
        C = 1;
        A = KERN_ERR_FILE_OPEN;
    } else if (kernal_filename_len == 0) {
        C = 1;
        A = KERN_ERR_MISSING_FILE_NAME;
    } else {
        unsigned char savedbyte = RAM[kernal_filename+kernal_filename_len];
        const char* mode = kernal_sec == 0 ? "r" : "w";
        RAM[kernal_filename+kernal_filename_len] = 0;
        kernal_files[kernal_lfn] = fopen(RAM+kernal_filename, mode);
        RAM[kernal_filename+kernal_filename_len] = savedbyte;
        if (kernal_files[kernal_lfn]) {
            kernal_files_next[kernal_lfn] = EOF;
            C = 0;
        } else {
            C = 1;
            A = KERN_ERR_FILE_NOT_FOUND;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb $0x0, 0x1e371(%rip)     # 0x5aac0
movzbl 0x1e467(%rip), %eax     # 0x5abbd
movl %eax, %ecx
leaq 0x1e371(%rip), %rax     # 0x5aad0
cmpq $0x0, (%rax,%rcx,8)
je 0x3c77f
leaq 0x1e349(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1e33e(%rip), %rax     # 0x5aab5
movb $0x2, (%rax)
jmp 0x3c8a7
movzbl 0x1e436(%rip), %eax     # 0x5abbc
cmpl $0x0, %eax
jne 0x3c7a4
leaq 0x1e324(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1e319(%rip), %rax     # 0x5aab5
movb $0x8, (%rax)
jmp 0x3c8a5
movzwl 0x1e40f(%rip), %eax     # 0x5abba
movzbl 0x1e40a(%rip), %ecx     # 0x5abbc
addl %ecx, %eax
movslq %eax, %rcx
leaq 0xe2f2(%rip), %rax      # 0x4aab0
movb (%rax,%rcx), %al
movb %al, -0x1(%rbp)
movzbl 0x1e3f4(%rip), %edx     # 0x5abbf
leaq 0x332d(%rip), %rax      # 0x3faff
leaq 0x32f7(%rip), %rcx      # 0x3fad0
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, -0x10(%rbp)
movzwl 0x1e3cf(%rip), %eax     # 0x5abba
movzbl 0x1e3ca(%rip), %ecx     # 0x5abbc
addl %ecx, %eax
movslq %eax, %rcx
leaq 0xe2b2(%rip), %rax      # 0x4aab0
movb $0x0, (%rax,%rcx)
movzwl 0x1e3b1(%rip), %eax     # 0x5abba
cltq
leaq 0xe29e(%rip), %rdi      # 0x4aab0
addq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x11e0
movq %rax, %rdx
movzbl 0x1e395(%rip), %eax     # 0x5abbd
movl %eax, %ecx
leaq 0x1e29f(%rip), %rax     # 0x5aad0
movq %rdx, (%rax,%rcx,8)
movb -0x1(%rbp), %dl
movzwl 0x1e37b(%rip), %eax     # 0x5abba
movzbl 0x1e376(%rip), %ecx     # 0x5abbc
addl %ecx, %eax
movslq %eax, %rcx
leaq 0xe25e(%rip), %rax      # 0x4aab0
movb %dl, (%rax,%rcx)
movzbl 0x1e361(%rip), %eax     # 0x5abbd
movl %eax, %ecx
leaq 0x1e26b(%rip), %rax     # 0x5aad0
cmpq $0x0, (%rax,%rcx,8)
je 0x3c88f
movzbl 0x1e34a(%rip), %eax     # 0x5abbd
movl %eax, %ecx
leaq 0x1e2d4(%rip), %rax     # 0x5ab50
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
leaq 0x1e22c(%rip), %rax     # 0x5aab6
movb $0x0, (%rax)
jmp 0x3c8a3
leaq 0x1e220(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1e215(%rip), %rax     # 0x5aab5
movb $0x4, (%rax)
jmp 0x3c8a5
jmp 0x3c8a7
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: CLOSE
static void
CLOSE() {
    if (!kernal_files[kernal_lfn]) {
        C = 1;
        A = KERN_ERR_FILE_NOT_OPEN;
    } else {
        fclose(kernal_files[kernal_lfn]);
        kernal_files[kernal_lfn] = 0;
        C = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x1e302(%rip), %eax     # 0x5abbd
movl %eax, %ecx
leaq 0x1e20c(%rip), %rax     # 0x5aad0
cmpq $0x0, (%rax,%rcx,8)
jne 0x3c8e1
leaq 0x1e1e4(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1e1d9(%rip), %rax     # 0x5aab5
movb $0x3, (%rax)
jmp 0x3c91c
movzbl 0x1e2d5(%rip), %eax     # 0x5abbd
movl %eax, %ecx
leaq 0x1e1df(%rip), %rax     # 0x5aad0
movq (%rax,%rcx,8), %rdi
callq 0x1060
movzbl 0x1e2bc(%rip), %eax     # 0x5abbd
movl %eax, %ecx
leaq 0x1e1c6(%rip), %rax     # 0x5aad0
movq $0x0, (%rax,%rcx,8)
leaq 0x1e19d(%rip), %rax     # 0x5aab6
movb $0x0, (%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: CHKIN
static void
CHKIN() {
    kernal_status = 0;
    if (!kernal_files[X]) {
        C = 1;
        A = KERN_ERR_FILE_NOT_OPEN;
    } else {
        // TODO Check read/write mode
        kernal_input = X;
        C = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x1e195(%rip)     # 0x5aac0
leaq 0x1e180(%rip), %rax     # 0x5aab2
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1e192(%rip), %rax     # 0x5aad0
cmpq $0x0, (%rax,%rcx,8)
jne 0x3c95b
leaq 0x1e16a(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1e15f(%rip), %rax     # 0x5aab5
movb $0x3, (%rax)
jmp 0x3c974
leaq 0x1e150(%rip), %rax     # 0x5aab2
movb (%rax), %al
movb %al, 0x1e15f(%rip)      # 0x5aac9
leaq 0x1e145(%rip), %rax     # 0x5aab6
movb $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: CHKOUT
static void
CHKOUT() {
    kernal_status = 0;
    if (!kernal_files[X]) {
        C = 1;
        A = KERN_ERR_FILE_NOT_OPEN;
    } else {
        // TODO Check read/write mode
        kernal_output = X;
        C = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, 0x1e135(%rip)     # 0x5aac0
leaq 0x1e120(%rip), %rax     # 0x5aab2
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x1e132(%rip), %rax     # 0x5aad0
cmpq $0x0, (%rax,%rcx,8)
jne 0x3c9bb
leaq 0x1e10a(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1e0ff(%rip), %rax     # 0x5aab5
movb $0x3, (%rax)
jmp 0x3c9d4
leaq 0x1e0f0(%rip), %rax     # 0x5aab2
movb (%rax), %al
movb %al, 0x1e0fe(%rip)      # 0x5aac8
leaq 0x1e0e5(%rip), %rax     # 0x5aab6
movb $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: SAVE
static void
SAVE() {
		FILE *f;
		unsigned char savedbyte;
		unsigned short start;
		unsigned short end;

		start = RAM[A] | RAM[A+1]<<8;
		end = X | Y << 8;
		if (end<start) {
			C = 1;
			A = KERN_ERR_NONE;
			return;
		}
		if (!kernal_filename_len) {
			C = 1;
			A = KERN_ERR_MISSING_FILE_NAME;
			return;
		}
		savedbyte = RAM[kernal_filename+kernal_filename_len]; /* TODO possible overflow */
		RAM[kernal_filename+kernal_filename_len] = 0;
		f = fopen((char*)&RAM[kernal_filename], "wb"); /* overwrite - these are not the COMMODORE DOS semantics! */
		if (!f) {
			C = 1;
			A = KERN_ERR_FILE_NOT_FOUND;
			return;
		}
		fputc(start & 0xFF, f);
		fputc(start >> 8, f);
		fwrite(&RAM[start], end-start, 1, f);
		fclose(f);
		C = 0;
		A = KERN_ERR_NONE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1d126(%rip), %rax     # 0x5aab5
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xd115(%rip), %rax      # 0x4aab0
movzbl (%rax,%rcx), %eax
leaq 0x1d10f(%rip), %rcx     # 0x5aab5
movzbl (%rcx), %ecx
addl $0x1, %ecx
movslq %ecx, %rdx
leaq 0xd0fa(%rip), %rcx      # 0x4aab0
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, -0xc(%rbp)
leaq 0x1d0e8(%rip), %rax     # 0x5aab2
movzbl (%rax), %eax
leaq 0x1d0e4(%rip), %rcx     # 0x5aab8
movzbl (%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movw %ax, -0xe(%rbp)
movzwl -0xe(%rbp), %eax
movzwl -0xc(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3da05
leaq 0x1d0c3(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1d0b8(%rip), %rax     # 0x5aab5
movb $0x0, (%rax)
jmp 0x3db0c
cmpb $0x0, 0x1d1b0(%rip)     # 0x5abbc
jne 0x3da27
leaq 0x1d0a1(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1d096(%rip), %rax     # 0x5aab5
movb $0x8, (%rax)
jmp 0x3db0c
movzwl 0x1d18c(%rip), %eax     # 0x5abba
movzbl 0x1d187(%rip), %ecx     # 0x5abbc
addl %ecx, %eax
movslq %eax, %rcx
leaq 0xd06f(%rip), %rax      # 0x4aab0
movb (%rax,%rcx), %al
movb %al, -0x9(%rbp)
movzwl 0x1d16c(%rip), %eax     # 0x5abba
movzbl 0x1d167(%rip), %ecx     # 0x5abbc
addl %ecx, %eax
movslq %eax, %rcx
leaq 0xd04f(%rip), %rax      # 0x4aab0
movb $0x0, (%rax,%rcx)
movzwl 0x1d14e(%rip), %eax     # 0x5abba
leaq 0xd03d(%rip), %rdi      # 0x4aab0
addq %rax, %rdi
leaq 0x20b6(%rip), %rsi      # 0x3fb33
callq 0x11e0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x3daa3
leaq 0x1d022(%rip), %rax     # 0x5aab6
movb $0x1, (%rax)
leaq 0x1d017(%rip), %rax     # 0x5aab5
movb $0x4, (%rax)
jmp 0x3db0c
movzwl -0xc(%rbp), %edi
andl $0xff, %edi
movq -0x8(%rbp), %rsi
callq 0x1120
movzwl -0xc(%rbp), %edi
sarl $0x8, %edi
movq -0x8(%rbp), %rsi
callq 0x1120
movzwl -0xc(%rbp), %eax
leaq 0xcfdf(%rip), %rdi      # 0x4aab0
addq %rax, %rdi
movzwl -0xe(%rbp), %eax
movzwl -0xc(%rbp), %ecx
subl %ecx, %eax
movslq %eax, %rsi
movq -0x8(%rbp), %rcx
movl $0x1, %edx
callq 0x1200
movq -0x8(%rbp), %rdi
callq 0x1060
leaq 0x1cfb7(%rip), %rax     # 0x5aab6
movb $0x0, (%rax)
leaq 0x1cfac(%rip), %rax     # 0x5aab5
movb $0x0, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: SETTIM
static void
SETTIM() {
    unsigned long   jiffies = Y*65536 + X*256 + A;
    unsigned long   seconds = jiffies/60;
#ifdef _WIN32
	SYSTEMTIME st;

	GetLocalTime(&st);
	st.wHour         = (WORD)(seconds/3600);
	st.wMinute       = (WORD)(seconds/60);
	st.wSecond       = (WORD)(seconds%60);
	st.wMilliseconds = (WORD)((jiffies % 60) * 1000 / 60);
	SetLocalTime(&st);
#else
    time_t  now = time(0);
    struct tm       bd;
    struct timeval  tv;
    
    localtime_r(&now, &bd);

    bd.tm_sec       = seconds%60;
    bd.tm_min       = seconds/60;
    bd.tm_hour      = seconds/3600;

    tv.tv_sec   = mktime(&bd);
    tv.tv_usec  = (jiffies % 60) * (1000000/60);
    
    settimeofday(&tv, 0);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x1cf89(%rip), %rax     # 0x5aab8
movzbl (%rax), %eax
shll $0x10, %eax
leaq 0x1cf76(%rip), %rcx     # 0x5aab2
movzbl (%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
leaq 0x1cf6a(%rip), %rcx     # 0x5aab5
movzbl (%rcx), %ecx
addl %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x3c, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1180
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1040
movq -0x10(%rbp), %rax
movl $0x3c, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl $0x3c, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movl $0xe10, %ecx            # imm = 0xE10
xorl %edx, %edx
divq %rcx
movl %eax, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x11c0
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movl $0x3c, %ecx
xorl %edx, %edx
divq %rcx
imulq $0x411a, %rdx, %rax     # imm = 0x411A
movq %rax, -0x58(%rbp)
leaq -0x60(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1190
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: RDTIM
static void
RDTIM() {
	unsigned long   jiffies;
#ifdef _WIN32
	SYSTEMTIME st;

	GetLocalTime(&st);
	jiffies = ((st.wHour*60 + st.wMinute)*60 + st.wSecond)*60 + st.wMilliseconds * 60 / 1000;
#else
    time_t  now = time(0);
    struct tm       bd;
    struct timeval  tv;
    
    localtime_r(&now, &bd);
    gettimeofday(&tv, 0);
    
    jiffies = ((bd.tm_hour*60 + bd.tm_min)*60 + bd.tm_sec)*60 + tv.tv_usec / (1000000/60);
#endif
    Y   = (unsigned char)(jiffies/65536);
    X   = (unsigned char)((jiffies%65536)/256);
    A   = (unsigned char)(jiffies%256);
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
xorl %eax, %eax
movl %eax, %edi
callq 0x1180
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1040
leaq -0x58(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10c0
imull $0x3c, -0x40(%rbp), %eax
addl -0x44(%rbp), %eax
imull $0x3c, %eax, %eax
addl -0x48(%rbp), %eax
imull $0x3c, %eax, %eax
cltq
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
movl $0x411a, %ecx           # imm = 0x411A
cqto
idivq %rcx
movq %rax, %rcx
movq -0x60(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
leaq 0x1ce56(%rip), %rax     # 0x5aab8
movb %cl, (%rax)
movq -0x8(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
shrq $0x8, %rax
movb %al, %cl
leaq 0x1ce37(%rip), %rax     # 0x5aab2
movb %cl, (%rax)
movq -0x8(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
leaq 0x1ce25(%rip), %rax     # 0x5aab5
movb %cl, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: GETIN
static void
GETIN() {
    if (kernal_input != 0) {
        if (feof(kernal_files[kernal_input])) {
            kernal_status |= KERN_ST_EOF;
            kernal_status |= KERN_ST_TIME_OUT_READ;
            A = 199;
        } else {
            if (kernal_files_next[kernal_input] == EOF)
                kernal_files_next[kernal_input] = fgetc(kernal_files[kernal_input]);
            A = kernal_files_next[kernal_input];
            kernal_files_next[kernal_input] = fgetc(kernal_files[kernal_input]);
            if (kernal_files_next[kernal_input] == EOF)
                kernal_status |= KERN_ST_EOF;
        }
        C = 0;
    } else {
#ifdef _WIN32
        if (_kbhit())
            A = _getch();
        else
            A = 0;
#else
        A = getchar();
#endif
        if (A=='\n') A = '\r';
        C = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl 0x1ce0e(%rip), %eax     # 0x5aac9
cmpl $0x0, %eax
je 0x3ddd5
movzbl 0x1cdfe(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1cdfc(%rip), %rax     # 0x5aad0
movq (%rax,%rcx,8), %rdi
callq 0x1150
cmpl $0x0, %eax
je 0x3dd11
movzbl 0x1cdd7(%rip), %eax     # 0x5aac0
orl $0x40, %eax
movb %al, 0x1cdce(%rip)      # 0x5aac0
movzbl 0x1cdc7(%rip), %eax     # 0x5aac0
orl $0x2, %eax
movb %al, 0x1cdbe(%rip)      # 0x5aac0
leaq 0x1cdac(%rip), %rax     # 0x5aab5
movb $-0x39, (%rax)
jmp 0x3ddc9
movzbl 0x1cdb1(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1ce2f(%rip), %rax     # 0x5ab50
cmpl $-0x1, (%rax,%rcx,4)
jne 0x3dd55
movzbl 0x1cd9b(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1cd99(%rip), %rax     # 0x5aad0
movq (%rax,%rcx,8), %rdi
callq 0x1100
movl %eax, %edx
movzbl 0x1cd80(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1cdfe(%rip), %rax     # 0x5ab50
movl %edx, (%rax,%rcx,4)
movzbl 0x1cd6d(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1cdeb(%rip), %rax     # 0x5ab50
movl (%rax,%rcx,4), %eax
movb %al, %cl
leaq 0x1cd44(%rip), %rax     # 0x5aab5
movb %cl, (%rax)
movzbl 0x1cd4f(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1cd4d(%rip), %rax     # 0x5aad0
movq (%rax,%rcx,8), %rdi
callq 0x1100
movl %eax, %edx
movzbl 0x1cd34(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1cdb2(%rip), %rax     # 0x5ab50
movl %edx, (%rax,%rcx,4)
movzbl 0x1cd21(%rip), %eax     # 0x5aac9
movl %eax, %ecx
leaq 0x1cd9f(%rip), %rax     # 0x5ab50
cmpl $-0x1, (%rax,%rcx,4)
jne 0x3ddc7
movzbl 0x1cd02(%rip), %eax     # 0x5aac0
orl $0x40, %eax
movb %al, 0x1ccf9(%rip)      # 0x5aac0
jmp 0x3ddc9
leaq 0x1cce6(%rip), %rax     # 0x5aab6
movb $0x0, (%rax)
jmp 0x3de08
callq 0x1140
movb %al, %cl
leaq 0x1ccd2(%rip), %rax     # 0x5aab5
movb %cl, (%rax)
leaq 0x1ccc9(%rip), %rax     # 0x5aab5
movzbl (%rax), %eax
cmpl $0xa, %eax
jne 0x3ddfe
leaq 0x1ccba(%rip), %rax     # 0x5aab5
movb $0xd, (%rax)
leaq 0x1ccb1(%rip), %rax     # 0x5aab6
movb $0x0, (%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: CLALL
static void
CLALL() {
    int i;
    for (i = 0; i < sizeof(kernal_files)/sizeof(kernal_files[0]); ++i) {
        if (kernal_files[i]) {
            fclose(kernal_files[i]);
            kernal_files[i] = 0;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movslq -0x4(%rbp), %rax
cmpq $0x10, %rax
jae 0x3de6f
movslq -0x4(%rbp), %rcx
leaq 0x1cc9c(%rip), %rax     # 0x5aad0
cmpq $0x0, (%rax,%rcx,8)
je 0x3de62
movslq -0x4(%rbp), %rcx
leaq 0x1cc8a(%rip), %rax     # 0x5aad0
movq (%rax,%rcx,8), %rdi
callq 0x1060
movslq -0x4(%rbp), %rcx
leaq 0x1cc76(%rip), %rax     # 0x5aad0
movq $0x0, (%rax,%rcx,8)
jmp 0x3de64
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3de1f
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: PLOT
static void
PLOT() {
    if (C) {
        int CX, CY;
        get_cursor(&CX, &CY);
        Y = CX;
        X = CY;
    } else {
        printf("UNIMPL: set cursor %d %d\n", Y, X);
        exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1cc27(%rip), %rax     # 0x5aab6
cmpb $0x0, (%rax)
je 0x3debf
leaq -0x4(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x3e680
movl -0x4(%rbp), %eax
movb %al, %cl
leaq 0x1cc0b(%rip), %rax     # 0x5aab8
movb %cl, (%rax)
movl -0x8(%rbp), %eax
movb %al, %cl
leaq 0x1cbf7(%rip), %rax     # 0x5aab2
movb %cl, (%rax)
jmp 0x3deeb
leaq 0x1cbf2(%rip), %rax     # 0x5aab8
movzbl (%rax), %esi
leaq 0x1cbe2(%rip), %rax     # 0x5aab2
movzbl (%rax), %edx
leaq 0x1c5c(%rip), %rdi      # 0x3fb36
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x11f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbmbasic/runtime.c
// Function: IOBASE
static void
IOBASE() {
#define CIA 0xDC00 /* we could put this anywhere... */
		/*
		 * IOBASE is just used inside RND to get a timer value.
		 * So, let's fake this here, too.
		 * Commodore BASIC reads offsets 4/5 and 6/7 to get the
		 * two timers of the CIA.
		 */
		int pseudo_timer;
		pseudo_timer = rand();
		RAM[CIA+4] = pseudo_timer&0xff;
		RAM[CIA+5] = pseudo_timer>>8;
		pseudo_timer = rand(); /* more entropy! */
		RAM[CIA+8] = pseudo_timer&0xff;
		RAM[CIA+9] = pseudo_timer>>8;
		X = CIA & 0xFF;
		Y = CIA >> 8;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x1210
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
leaq 0xcb8f(%rip), %rax      # 0x4aab0
movb %cl, 0xdc04(%rax)
movl -0x4(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
leaq 0xcb7a(%rip), %rax      # 0x4aab0
movb %cl, 0xdc05(%rax)
callq 0x1210
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
leaq 0xcb5b(%rip), %rax      # 0x4aab0
movb %cl, 0xdc08(%rax)
movl -0x4(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
leaq 0xcb46(%rip), %rax      # 0x4aab0
movb %cl, 0xdc09(%rax)
leaq 0x1cb3b(%rip), %rax     # 0x5aab2
movb $0x0, (%rax)
leaq 0x1cb37(%rip), %rax     # 0x5aab8
movb $-0x24, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)