LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file.c
// Function: hed_write_file
int hed_write_file(struct hed_file *file, const char *filename)
{
  if (! file->data)
    return 0;

  char *new_filename = NULL;
  if (! file->filename || strcmp(filename, file->filename) != 0) {
    new_filename = malloc(strlen(filename) + 1);
    if (! new_filename)
      return show_msg("ERROR: out of memory");
    strcpy(new_filename, filename);
  }
  
  FILE *f = fopen(filename, "w");
  if (! f) {
    free(new_filename);
    return show_msg("ERROR: can't open file '%s'", filename);
  }
  if (fwrite(file->data, 1, file->data_len, f) != file->data_len) {
    free(new_filename);
    fclose(f);
    return show_msg("ERROR: can't write file '%s'", filename);
  }
  fclose(f);
  show_msg("File saved: '%s'", filename);
  file->modified = false;

  if (new_filename) {
    if (file->filename)
      free(file->filename);
    file->filename = new_filename;
  }
  return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x41e7
movl $0x0, 0x24(%rsp)
jmp 0x4353
movq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x4214
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x2140
cmpl $0x0, %eax
je 0x425d
movq 0x10(%rsp), %rdi
callq 0x20d0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x21c0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x424e
leaq 0x715a(%rip), %rdi      # 0xb398
movb $0x0, %al
callq 0x3610
movl %eax, 0x24(%rsp)
jmp 0x4353
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2050
movq 0x10(%rsp), %rdi
leaq 0x71e2(%rip), %rsi      # 0xb44b
callq 0x2220
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0x429f
movq 0x8(%rsp), %rdi
callq 0x2030
movq 0x10(%rsp), %rsi
leaq 0x70ed(%rip), %rdi      # 0xb37c
movb $0x0, %al
callq 0x3610
movl %eax, 0x24(%rsp)
jmp 0x4353
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdx
movq (%rsp), %rcx
movl $0x1, %esi
callq 0x2280
movq 0x18(%rsp), %rcx
cmpq 0x18(%rcx), %rax
je 0x42f6
movq 0x8(%rsp), %rdi
callq 0x2030
movq (%rsp), %rdi
callq 0x20b0
movq 0x10(%rsp), %rsi
leaq 0x7164(%rip), %rdi      # 0xb44d
movb $0x0, %al
callq 0x3610
movl %eax, 0x24(%rsp)
jmp 0x4353
movq (%rsp), %rdi
callq 0x20b0
movq 0x10(%rsp), %rsi
leaq 0x715f(%rip), %rdi      # 0xb46a
movb $0x0, %al
callq 0x3610
movq 0x18(%rsp), %rax
movb $0x0, 0x28(%rax)
cmpq $0x0, 0x8(%rsp)
je 0x434b
movq 0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x433d
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x2030
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file.c
// Function: get_file_u16
bool get_file_u16(struct hed_file *file, size_t pos, uint16_t *data)
{
  if (! file->data || pos + 2 > file->data_len) return false;

  if (file->endianess == HED_DATA_LITTLE_ENDIAN) {
    *data = (((uint16_t) file->data[pos+1] << 8) |
             ((uint16_t) file->data[pos+0] << 0));
  } else {
    *data = (((uint16_t) file->data[pos+0] << 8) |
             ((uint16_t) file->data[pos+1] << 0));
  }
  return true;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x43ef
movq -0x18(%rsp), %rax
addq $0x2, %rax
movq -0x10(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x43f9
movb $0x0, -0x1(%rsp)
jmp 0x4487
movq -0x10(%rsp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x4444
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
movzbl 0x1(%rax,%rcx), %eax
movzwl %ax, %eax
shll $0x8, %eax
movq -0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq -0x18(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
movzwl %cx, %ecx
shll $0x0, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x20(%rsp), %rax
movw %cx, (%rax)
jmp 0x4482
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movzwl %ax, %eax
shll $0x8, %eax
movq -0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq -0x18(%rsp), %rdx
movzbl 0x1(%rcx,%rdx), %ecx
movzwl %cx, %ecx
shll $0x0, %ecx
orl %ecx, %eax
movw %ax, %cx
movq -0x20(%rsp), %rax
movw %cx, (%rax)
movb $0x1, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file.c
// Function: get_file_u32
bool get_file_u32(struct hed_file *file, size_t pos, uint32_t *data)
{
  if (! file->data || pos + 4 > file->data_len) return false;

  if (file->endianess == HED_DATA_LITTLE_ENDIAN) {
    *data = (((uint32_t) file->data[pos+3] << 24) |
             ((uint32_t) file->data[pos+2] << 16) |
             ((uint32_t) file->data[pos+1] <<  8) |
             ((uint32_t) file->data[pos+0] <<  0));
  } else {
    *data = (((uint32_t) file->data[pos+0] << 24) |
             ((uint32_t) file->data[pos+1] << 16) |
             ((uint32_t) file->data[pos+2] <<  8) |
             ((uint32_t) file->data[pos+3] <<  0));
  }
  return true;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x44bf
movq -0x18(%rsp), %rax
addq $0x4, %rax
movq -0x10(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x44c9
movb $0x0, -0x1(%rsp)
jmp 0x45a3
movq -0x10(%rsp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x453a
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
movzbl 0x3(%rax,%rcx), %ecx
shll $0x18, %ecx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x2(%rax,%rdx), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x1(%rax,%rdx), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl (%rax,%rdx), %eax
shll $0x0, %eax
orl %eax, %ecx
movq -0x20(%rsp), %rax
movl %ecx, (%rax)
jmp 0x459e
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
movzbl (%rax,%rcx), %ecx
shll $0x18, %ecx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x1(%rax,%rdx), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x2(%rax,%rdx), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rdx
movzbl 0x3(%rax,%rdx), %eax
shll $0x0, %eax
orl %eax, %ecx
movq -0x20(%rsp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file.c
// Function: get_file_f32
bool get_file_f32(struct hed_file *file, size_t pos, float *data)
{
  if (! file->data || pos + 4 > file->data_len) return false;
  if (is_cpu_float_little_endian() == (file->endianess == HED_DATA_LITTLE_ENDIAN)) {
    memcpy(data, &file->data[pos], 4);
    return true;
  }
  uint8_t buf[4] = { file->data[pos+3], file->data[pos+2], file->data[pos+1], file->data[pos+0] };
  memcpy(data, buf, 4);
  return true;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x47f3
movq 0x10(%rsp), %rax
addq $0x4, %rax
movq 0x18(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x47fd
movb $0x0, 0x27(%rsp)
jmp 0x489e
callq 0x48b0
movq 0x18(%rsp), %rcx
cmpl $0x0, 0x2c(%rcx)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x4837
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x10(%rsp), %rdx
movl (%rcx,%rdx), %ecx
movl %ecx, (%rax)
movb $0x1, 0x27(%rsp)
jmp 0x489e
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x3(%rax,%rcx), %al
movb %al, 0x4(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x5(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x6(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x7(%rsp)
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movl %ecx, (%rax)
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file.c
// Function: is_cpu_float_little_endian
static int is_cpu_float_little_endian(void)
{
  static int cpu_float_is_little_endian = -1;
  if (cpu_float_is_little_endian < 0) {
    float one = 1.0f;
    uint8_t data[sizeof(float)];
    memcpy(data, &one, sizeof(float));
    cpu_float_is_little_endian = (data[0] == 0) ? 1 : 0;
  }
  return cpu_float_is_little_endian;
}

// Assembly:
cmpl $0x0, 0x98a9(%rip)      # 0xe160
jge 0x48e7
movss 0x6ab7(%rip), %xmm0     # 0xb378
movss %xmm0, -0x4(%rsp)
movl -0x4(%rsp), %eax
movl %eax, -0x8(%rsp)
movzbl -0x8(%rsp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, 0x9879(%rip)      # 0xe160
movl 0x9873(%rip), %eax      # 0xe160
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file.c
// Function: get_file_f64
bool get_file_f64(struct hed_file *file, size_t pos, double *data)
{
  if (! file->data || pos + 8 > file->data_len) return false;

  if (is_cpu_float_little_endian() == (file->endianess == HED_DATA_LITTLE_ENDIAN)) {
    memcpy(data, &file->data[pos], 8);
    return true;
  }
  uint8_t buf[8] = {
    file->data[pos+7], file->data[pos+6], file->data[pos+5], file->data[pos+4],
    file->data[pos+3], file->data[pos+2], file->data[pos+1], file->data[pos+0],
  };
  memcpy(data, buf, 8);
  return true;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4923
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq 0x18(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jbe 0x492d
movb $0x0, 0x27(%rsp)
jmp 0x4a2b
callq 0x48b0
movq 0x18(%rsp), %rcx
cmpl $0x0, 0x2c(%rcx)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x496c
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x10(%rsp), %rdx
movq (%rcx,%rdx), %rcx
movq %rcx, (%rax)
movb $0x1, 0x27(%rsp)
jmp 0x4a2b
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x7(%rax,%rcx), %al
movb %al, (%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x6(%rax,%rcx), %al
movb %al, 0x1(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x5(%rax,%rcx), %al
movb %al, 0x2(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x4(%rax,%rcx), %al
movb %al, 0x3(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x3(%rax,%rcx), %al
movb %al, 0x4(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0x5(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0x6(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x7(%rsp)
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, (%rax)
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/utf8.c
// Function: utf8_prev
const void *utf8_prev(const void *start, const void *str)
{
  const uint8_t *s = str;

  s--;
  while ((const void *)s > start && (*s & 0xc0) == 0x80) {
    s--;
  }
  const void *last = s;
  const void *next;
  while ((next = utf8_next(last)) != NULL && next < str) {
    last = next;
  }
  return last;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rcx
xorl %eax, %eax
cmpq 0x30(%rsp), %rcx
movb %al, 0xf(%rsp)
jbe 0x4a91
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
andl $0xc0, %eax
cmpl $0x80, %eax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x4a9b
jmp 0x4aab
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x4a66
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x4b10
movq %rax, %rcx
movq %rcx, 0x10(%rsp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, 0xe(%rsp)
je 0x4ae4
movq 0x10(%rsp), %rax
cmpq 0x28(%rsp), %rax
setb %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
testb $0x1, %al
jne 0x4aee
jmp 0x4afa
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x4ab5
movq 0x18(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/utf8.c
// Function: utf8_len
size_t utf8_len(const void *str)
{
  size_t len = 0;
  while ((str = utf8_next(str)) != NULL)
    len++;
  return len;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x4b10
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x4dd7
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x4db2
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/utf8.c
// Function: utf8_len_upto
size_t utf8_len_upto(const void *str, const void *end)
{
  size_t len = 0;
  while ((str = utf8_next(str)) != NULL && str <= end)
    len++;
  return len;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x4b10
movq %rax, %rcx
movq %rcx, 0x20(%rsp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, 0xf(%rsp)
je 0x4e36
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
setbe %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x4e40
jmp 0x4e50
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x4e07
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: hed_select_file
int hed_select_file(struct hed_editor *editor, char *filename, size_t max_filename_len)
{
  clear_msg();

  struct hed_screen *scr = &editor->screen;
  struct file_sel file_sel;
  init_file_sel(&file_sel, editor);
  change_dir(&file_sel, ".");
  
  reset_color();
  clear_screen();
  scr->redraw_needed = true;
  while (! editor->quit && ! file_sel.quit) {
    if (scr->redraw_needed)
      draw_main_screen(&file_sel);
    process_input(&file_sel);
  }

  if (file_sel.ret >= 0) {
    if (file_sel.sel)
      snprintf(filename, max_filename_len, "%s/%s", file_sel.dir_name, file_sel.sel->filename);
    else
      file_sel.ret = -1;
  }
  
  destroy_file_sel(&file_sel);

  reset_color();
  clear_screen();
  scr->redraw_needed = true;
  return file_sel.ret;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
callq 0x3740
movq 0x60(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x4f70
leaq 0x10(%rsp), %rdi
leaq 0x65fb(%rip), %rsi      # 0xb49e
callq 0x4fe0
callq 0x3d40
callq 0x3e40
movq 0x48(%rsp), %rax
movb $0x1, 0xd(%rax)
movq 0x60(%rsp), %rcx
xorl %eax, %eax
testb $0x1, (%rcx)
movb %al, 0xf(%rsp)
jne 0x4ed5
movb 0x18(%rsp), %al
xorb $-0x1, %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x4edf
jmp 0x4f00
movq 0x48(%rsp), %rax
testb $0x1, 0xd(%rax)
je 0x4ef4
leaq 0x10(%rsp), %rdi
callq 0x5200
leaq 0x10(%rsp), %rdi
callq 0x54d0
jmp 0x4ebb
cmpl $0x0, 0x1c(%rsp)
jl 0x4f41
cmpq $0x0, 0x38(%rsp)
je 0x4f37
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x20(%rsp), %rcx
movq 0x38(%rsp), %r8
addq $0x28, %r8
leaq 0x654d(%rip), %rdx      # 0xb47b
movb $0x0, %al
callq 0x20f0
jmp 0x4f3f
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f41
leaq 0x10(%rsp), %rdi
callq 0x56d0
callq 0x3d40
callq 0x3e40
movq 0x48(%rsp), %rax
movb $0x1, 0xd(%rax)
movl 0x1c(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: init_file_sel
static void init_file_sel(struct file_sel *fs, struct hed_editor *editor)
{
  fs->editor = editor;
  fs->dir_name = NULL;
  fs->dir_list = NULL;
  fs->max_filename_len = 0;
  fs->sel = NULL;
  fs->quit = false;
  fs->ret = -1;
  fs->top_line = 0;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x10(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, (%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rsp), %rax
movb $0x0, 0x8(%rax)
movq -0x8(%rsp), %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movq -0x8(%rsp), %rax
movq $0x0, 0x30(%rax)
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: destroy_file_sel
static void destroy_file_sel(struct file_sel *fs)
{
  if (fs->dir_name)
    free(fs->dir_name);
  if (fs->dir_list)
    free_dir_list(fs->dir_list);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x56ed
movq (%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x2030
movq (%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5705
movq (%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x5980
popq %rax
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: free_dir_list
static void free_dir_list(struct file_item *list)
{
  while (list != NULL) {
    struct file_item *next = list->next;
    free(list);
    list = next;
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x59b4
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2030
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x5989
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: stat_at
static int stat_at(const char *dir, const char *file, char **p_buf, size_t *p_buf_len, struct stat *st)
{
  char *buf = *p_buf;

  size_t need_len = strlen(dir) + 1 + strlen(file) + 1;
  if (! buf || *p_buf_len < need_len) {
    buf = realloc(buf, need_len);
    if (! buf)
      return -1;
    *p_buf_len = need_len;
    *p_buf = buf;
  }
  strcpy(buf, dir);
  strcat(buf, "/");
  strcat(buf, file);

  return stat(buf, st);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0x20d0
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
callq 0x20d0
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x5a30
movq 0x20(%rsp), %rax
movq (%rax), %rax
cmpq 0x8(%rsp), %rax
jae 0x5a70
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x21e0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x5a56
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x5ab2
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2050
movq 0x10(%rsp), %rdi
leaq 0x5a10(%rip), %rsi      # 0xb49b
callq 0x2260
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2260
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2180
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: sort_file_list
static void sort_file_list(struct file_item **list)
{
  size_t n_files = 0;
  for (struct file_item *f = *list; f != NULL; f = f->next)
    n_files++;
  if (n_files <= 1)
    return;
  
  struct file_item **vec = malloc(sizeof(struct file_item *) * n_files);
  if (vec) {
    n_files = 0;
    for (struct file_item *f = *list; f != NULL; f = f->next)
      vec[n_files++] = f;
    qsort(vec, n_files, sizeof(struct file_item *), compare_files);
    for (size_t i = 0; i < n_files; i++) {
      vec[i]->index = i;
      vec[i]->next = (i+1 < n_files) ? vec[i+1] : NULL;
      vec[i]->prev = (i>0) ? vec[i-1] : NULL;
    }
    *list = vec[0];
    free(vec);
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x5b04
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0x5adf
cmpq $0x1, 0x38(%rsp)
ja 0x5b11
jmp 0x5c7a
movq 0x38(%rsp), %rdi
shlq $0x3, %rdi
callq 0x21c0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x5c7a
movq $0x0, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x5b7c
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x38(%rsp)
movq %rdx, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x5b46
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl $0x8, %edx
leaq 0xee(%rip), %rcx        # 0x5c80
callq 0x2060
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x5c60
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
addq $0x1, %rax
cmpq 0x38(%rsp), %rax
jae 0x5bed
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
jmp 0x5bf6
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x5bf6
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x18(%rsp)
jbe 0x5c2d
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
jmp 0x5c36
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x5c36
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x5ba0
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rdi
callq 0x2030
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: compare_files
static int compare_files(const void *p1, const void *p2)
{
  const struct file_item *f1 = *(struct file_item **)p1;
  const struct file_item *f2 = *(struct file_item **)p2;
  if (f1->is_file == f2->is_file)
    return strcmp(f1->filename, f2->filename);
  return (! f1->is_file) ? -1 : 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
movb 0x18(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movq (%rsp), %rcx
movb 0x18(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x5ce1
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
movq (%rsp), %rsi
addq $0x28, %rsi
callq 0x2140
movl %eax, 0x24(%rsp)
jmp 0x5d00
movq 0x8(%rsp), %rax
movb 0x18(%rax), %dl
xorb $-0x1, %dl
movl $0x1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: draw_header
static void draw_header(struct file_sel *fs)
{
  struct hed_screen *scr = &fs->editor->screen;

  reset_color();
  set_color(FG_BLACK, BG_GRAY);
  move_cursor(1, 1);
  clear_eol();

  if (fs->dir_name)
    out(" DIR: %.*s", scr->w - 30, fs->dir_name);
  
  move_cursor(scr->w - strlen(HED_BANNER) - 1, 1);
  out("%s", HED_BANNER);
  reset_color();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x8(%rsp)
callq 0x3d40
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
movl $0x1, %esi
movl %esi, %edi
callq 0x3d80
callq 0x3d60
movq 0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5d7f
movq 0x8(%rsp), %rax
movl 0x4(%rax), %esi
subl $0x1e, %esi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdx
leaq 0x5749(%rip), %rdi      # 0xb4c1
movb $0x0, %al
callq 0x3850
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rax
subq $0x8, %rax
subq $0x1, %rax
movl %eax, %edi
movl $0x1, %esi
callq 0x3d80
leaq 0x59c2(%rip), %rdi      # 0xb765
leaq 0x5722(%rip), %rsi      # 0xb4cc
movb $0x0, %al
callq 0x3850
callq 0x3d40
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: draw_footer
static void draw_footer(struct file_sel *fs)
{
  struct hed_screen *scr = &fs->editor->screen;

  reset_color();
  move_cursor(1, scr->h - 1);
  if (scr->cur_msg[0] != '\0') {
    set_color(FG_BLACK, BG_GRAY);
    out(" %s", scr->cur_msg);
  }
  clear_eol();

  hed_draw_key_help(1 + 0*EDITOR_KEY_HELP_SPACING, scr->h, "^C", "Cancel");
  //hed_draw_key_help(1 + 1*EDITOR_KEY_HELP_SPACING, scr->h, "^T", "To Files");
  clear_eol();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x8(%rsp)
callq 0x3d40
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
subl $0x1, %esi
movl $0x1, %edi
callq 0x3d80
movq 0x8(%rsp), %rax
movsbl 0x11(%rax), %eax
cmpl $0x0, %eax
je 0x5e2a
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
movq 0x8(%rsp), %rsi
addq $0x11, %rsi
leaq 0x5941(%rip), %rdi      # 0xb764
movb $0x0, %al
callq 0x3850
callq 0x3d60
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl $0x1, %edi
leaq 0x5692(%rip), %rdx      # 0xb4d5
leaq 0x568e(%rip), %rcx      # 0xb4d8
callq 0x6340
callq 0x3d60
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: move_sel_up
static void move_sel_up(struct file_sel *fs)
{
  struct hed_screen *scr = &fs->editor->screen;

  if (fs->sel->prev) {
    fs->sel = fs->sel->prev;
    if (fs->sel->index < fs->top_line)
      fs->top_line = fs->sel->index;
    scr->redraw_needed = true;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x5ed5
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x5ecc
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: move_sel_down
static void move_sel_down(struct file_sel *fs)
{
  struct hed_screen *scr = &fs->editor->screen;
  size_t n_page_lines = scr->h - 1 - EDITOR_BORDER_LINES;

  if (fs->sel->next) {
    fs->sel = fs->sel->next;
    if (fs->top_line + n_page_lines - 1 < fs->sel->index)
      fs->top_line = fs->sel->index - n_page_lines + 1;
    scr->redraw_needed = true;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
subl $0x5, %eax
cltq
movq %rax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, (%rax)
je 0x5f7a
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rsp), %rax
movq 0x30(%rax), %rax
addq -0x18(%rsp), %rax
subq $0x1, %rax
movq -0x8(%rsp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x5f71
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rcx
subq -0x18(%rsp), %rcx
addq $0x1, %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: move_sel_page_up
static void move_sel_page_up(struct file_sel *fs)
{
  struct hed_screen *scr = &fs->editor->screen;
  size_t n_page_lines = scr->h - 1 - EDITOR_BORDER_LINES;

  for (size_t i = 0; i < n_page_lines; i++) {
    if (fs->sel->prev)
      fs->sel = fs->sel->prev;
    else
      break;
  }
  if (fs->sel->index < fs->top_line) {
    if (fs->sel->index > n_page_lines/2)
      fs->top_line = fs->sel->index - n_page_lines/2;
    else
      fs->top_line = 0;
  }
  scr->redraw_needed = true;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
subl $0x5, %eax
cltq
movq %rax, -0x18(%rsp)
movq $0x0, -0x20(%rsp)
movq -0x20(%rsp), %rax
cmpq -0x18(%rsp), %rax
jae 0x5ffe
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x5fea
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
jmp 0x5fec
jmp 0x5ffe
jmp 0x5fee
movq -0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rsp)
jmp 0x5fb6
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq -0x8(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jae 0x6062
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
shrq %rcx
cmpq %rcx, %rax
jbe 0x6053
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rsp), %rax
shrq %rax
subq %rax, %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x6060
movq -0x8(%rsp), %rax
movq $0x0, 0x30(%rax)
jmp 0x6062
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/file_sel.c
// Function: move_sel_page_down
static void move_sel_page_down(struct file_sel *fs)
{
  struct hed_screen *scr = &fs->editor->screen;
  size_t n_page_lines = scr->h - 1 - EDITOR_BORDER_LINES;

  for (size_t i = 0; i < n_page_lines; i++) {
    if (fs->sel->next)
      fs->sel = fs->sel->next;
    else
      break;
  }
  if (fs->top_line + n_page_lines - 1 < fs->sel->index) {
    if (fs->sel->index > n_page_lines/2)
      fs->top_line = fs->sel->index - n_page_lines/2;
    else
      fs->top_line = 0;
  }
  scr->redraw_needed = true;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl 0x8(%rax), %eax
subl $0x1, %eax
subl $0x5, %eax
cltq
movq %rax, -0x18(%rsp)
movq $0x0, -0x20(%rsp)
movq -0x20(%rsp), %rax
cmpq -0x18(%rsp), %rax
jae 0x60ec
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, (%rax)
je 0x60d8
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
jmp 0x60da
jmp 0x60ec
jmp 0x60dc
movq -0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rsp)
jmp 0x60a6
movq -0x8(%rsp), %rax
movq 0x30(%rax), %rax
addq -0x18(%rsp), %rax
subq $0x1, %rax
movq -0x8(%rsp), %rcx
movq 0x28(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jae 0x6159
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
shrq %rcx
cmpq %rcx, %rax
jbe 0x614a
movq -0x8(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rsp), %rax
shrq %rax
subq %rax, %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x6157
movq -0x8(%rsp), %rax
movq $0x0, 0x30(%rax)
jmp 0x6159
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: hed_init_editor
void hed_init_editor(struct hed_editor *editor)
{
  editor->file = NULL;
  editor->mode = HED_MODE_DEFAULT;
  editor->half_byte_edited = false;
  editor->search_str[0] = '\0';
  editor->read_only = false;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq $0x0, 0x628(%rax)
movq -0x8(%rsp), %rax
movl $0x0, 0x104(%rax)
movq -0x8(%rsp), %rax
movb $0x0, 0x1(%rax)
movq -0x8(%rsp), %rax
movb $0x0, 0x3(%rax)
movq -0x8(%rsp), %rax
movb $0x0, 0x2(%rax)
retq
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: hed_add_file
void hed_add_file(struct hed_editor *editor, struct hed_file *file)
{
  // close current file if it's the only one and it's empty
  if (editor->file && editor->file == editor->file->next && ! editor->file->data)
    close_current_file(editor);
  
  if (! editor->file) {
    file->next = file;
    file->prev = file;
    editor->file = file;
    return;
  }
  
  file->next = editor->file;
  file->prev = editor->file->prev;
  file->prev->next = file;
  file->next->prev = file;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x628(%rax)
je 0x6207
movq 0x10(%rsp), %rax
movq 0x628(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x628(%rcx), %rcx
cmpq (%rcx), %rax
jne 0x6207
movq 0x10(%rsp), %rax
movq 0x628(%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6207
movq 0x10(%rsp), %rdi
callq 0x62a0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x628(%rax)
jne 0x6244
movq 0x8(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x628(%rax)
jmp 0x6293
movq 0x10(%rsp), %rax
movq 0x628(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x628(%rax), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rcx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: close_current_file
static void close_current_file(struct hed_editor *editor)
{
  struct hed_file *file = editor->file;
  if (! file)
    return;
  if (file->next == file) {
    hed_free_file(file);
    editor->file = NULL;
    return;
  }
  
  file->next->prev = file->prev;
  file->prev->next = file->next;
  editor->file = file->next;
  hed_free_file(file);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x62c4
jmp 0x6336
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq 0x8(%rsp), %rax
jne 0x62ef
movq 0x8(%rsp), %rdi
callq 0x3f60
movq 0x10(%rsp), %rax
movq $0x0, 0x628(%rax)
jmp 0x6336
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x628(%rax)
movq 0x8(%rsp), %rdi
callq 0x3f60
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: hed_draw_key_help
void hed_draw_key_help(int x, int y, const char *key, const char *help)
{
  move_cursor(x, y);
  set_color(FG_BLACK, BG_GRAY);
  out("%s", key);
  reset_color();
  out(" %s", help);

  size_t txt_len = strlen(key) + strlen(help) + 1;
  for (size_t i = txt_len; i < EDITOR_KEY_HELP_SPACING-1; i++)
    out(" ");
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x34(%rsp)
movl %esi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movl 0x34(%rsp), %edi
movl 0x30(%rsp), %esi
callq 0x3d80
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
movq 0x28(%rsp), %rsi
leaq 0x53e7(%rip), %rdi      # 0xb765
movb $0x0, %al
callq 0x3850
callq 0x3d40
movq 0x20(%rsp), %rsi
leaq 0x53ce(%rip), %rdi      # 0xb764
movb $0x0, %al
callq 0x3850
movq 0x28(%rsp), %rdi
callq 0x20d0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x20d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0xf, 0x10(%rsp)
jae 0x63fa
leaq 0x5234(%rip), %rdi      # 0xb617
movb $0x0, %al
callq 0x3850
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x63d4
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: get_num_displayed_file_lines
static int get_num_displayed_file_lines(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->show_data) {
    return scr->h - EDITOR_DATA_LINES - EDITOR_BORDER_LINES;
  }
  return scr->h - EDITOR_BORDER_LINES;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x18(%rsp)
movq -0x10(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, -0x20(%rsp)
movq -0x20(%rsp), %rax
testb $0x1, 0x29(%rax)
je 0x6655
movq -0x18(%rsp), %rax
movl 0x8(%rax), %eax
subl $0x5, %eax
subl $0x5, %eax
movl %eax, -0x4(%rsp)
jmp 0x6664
movq -0x18(%rsp), %rax
movl 0x8(%rax), %eax
subl $0x5, %eax
movl %eax, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: hed_run_editor
int hed_run_editor(struct hed_editor *editor, size_t start_cursor_pos)
{
  if (! editor->file) {
    struct hed_file *file = hed_new_file_from_data(NULL, 0);
    if (! file) {
      fprintf(stderr, "ERROR: out of memory\n");
      return -1;
    }
    hed_add_file(editor, file);
  }
  
  if (hed_init_screen(&editor->screen) < 0) {
    fprintf(stderr, "ERROR setting up terminal\n");
    return -1;
  }
  hed_set_cursor_pos(editor, start_cursor_pos, 16);
  
  show_cursor(false);
  clear_screen();
    
  editor->quit = false;
  while (! editor->quit) {
    if (editor->screen.redraw_needed)
      draw_main_screen(editor);
    process_input(editor);
  }

  reset_color();
  clear_screen();
  show_cursor(true);
  hed_scr_flush();
  destroy_editor(editor);
  return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x628(%rax)
jne 0x66da
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x3e60
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x66cb
movq 0x794b(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x4b6b(%rip), %rsi      # 0xb222
movb $0x0, %al
callq 0x2160
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x679b
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x61b0
movq 0x18(%rsp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x34b0
cmpl $0x0, %eax
jge 0x6715
movq 0x7901(%rip), %rax      # 0xdff8
movq (%rax), %rdi
leaq 0x4def(%rip), %rsi      # 0xb4f0
movb $0x0, %al
callq 0x2160
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x679b
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x10, %edx
callq 0x6420
xorl %edi, %edi
callq 0x3e00
callq 0x3e40
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
movq 0x18(%rsp), %rax
movb (%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x674c
jmp 0x6770
movq 0x18(%rsp), %rax
testb $0x1, 0x115(%rax)
je 0x6764
movq 0x18(%rsp), %rdi
callq 0x67b0
movq 0x18(%rsp), %rdi
callq 0x6850
jmp 0x673d
callq 0x3d40
callq 0x3e40
movl $0x1, %edi
callq 0x3e00
callq 0x3790
movq 0x18(%rsp), %rdi
callq 0x7410
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: draw_main_screen
static void draw_main_screen(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (scr->window_changed || ! file->data) {
    reset_color();
    clear_screen();
    scr->window_changed = false;
  }

  draw_header(editor);
  draw_footer(editor);

  if (file->data) {
    draw_file_dump(editor);
    draw_pos_data_dump(editor);
  }
  
  hed_scr_flush();
  scr->redraw_needed = false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
testb $0x1, 0xc(%rax)
jne 0x67ef
movq (%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6802
callq 0x3d40
callq 0x3e40
movq 0x8(%rsp), %rax
movb $0x0, 0xc(%rax)
movq 0x10(%rsp), %rdi
callq 0x7470
movq 0x10(%rsp), %rdi
callq 0x7570
movq (%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x6835
movq 0x10(%rsp), %rdi
callq 0x7930
movq 0x10(%rsp), %rdi
callq 0x7e60
callq 0x3790
movq 0x8(%rsp), %rax
movb $0x0, 0xd(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: destroy_editor
static void destroy_editor(struct hed_editor *editor)
{
  struct hed_file *file = editor->file;
  if (! file)
    return;
  
  do {
    struct hed_file *next = file->next;
    hed_free_file(file);
    file = next;
  } while (file != editor->file);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x7434
jmp 0x7468
jmp 0x7436
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
callq 0x3f60
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq 0x628(%rcx), %rax
jne 0x7436
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: draw_header
static void draw_header(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  reset_color();
  set_color(FG_BLACK, BG_GRAY);
  move_cursor(1, 1);
  out(" %s", (file->filename) ? file->filename : "New Buffer");
  if (file->modified)
    out(" (modified)");
  if (editor->read_only)
    out(" (view mode)");
  clear_eol();
  move_cursor(scr->w - strlen(HED_BANNER) - 1, 1);
  out("%s", HED_BANNER);
  reset_color();
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x3d40
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
movl $0x1, %esi
movl %esi, %edi
callq 0x3d80
movq 0x10(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x74d6
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x74e4
leaq 0x402e(%rip), %rax      # 0xb50b
movq %rax, 0x8(%rsp)
jmp 0x74e4
movq 0x8(%rsp), %rsi
leaq 0x4274(%rip), %rdi      # 0xb764
movb $0x0, %al
callq 0x3850
movq 0x10(%rsp), %rax
testb $0x1, 0x28(%rax)
je 0x7510
leaq 0x400d(%rip), %rdi      # 0xb516
movb $0x0, %al
callq 0x3850
movq 0x20(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x7529
leaq 0x4000(%rip), %rdi      # 0xb522
movb $0x0, %al
callq 0x3850
callq 0x3d60
movq 0x18(%rsp), %rax
movslq 0x4(%rax), %rax
subq $0x8, %rax
subq $0x1, %rax
movl %eax, %edi
movl $0x1, %esi
callq 0x3d80
leaq 0x4213(%rip), %rdi      # 0xb765
leaq 0x3f73(%rip), %rsi      # 0xb4cc
movb $0x0, %al
callq 0x3850
callq 0x3d40
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: prompt_get_yesno
static int prompt_get_yesno(struct hed_editor *editor, const char *prompt, bool *response)
{
  struct hed_screen *scr = &editor->screen;

  show_msg("%s", prompt);
  size_t prompt_len = strlen(prompt);
  char key_err[64];

  editor->mode = HED_MODE_READ_YESNO;
  scr->redraw_needed = true;
  while (! editor->quit) {
    if (scr->redraw_needed)
      draw_main_screen(editor);
    move_cursor(3 + prompt_len, scr->h - EDITOR_FOOTER_LINES + 1);
    show_cursor(true);
    hed_scr_flush();
    
    int k = read_key(scr->term_fd, key_err, sizeof(key_err));
    switch (k) {
    case KEY_REDRAW:
      show_cursor(false);
      reset_color();
      clear_screen();
      show_cursor(true);
      scr->redraw_needed = true;
      break;
      
    case CTRL_KEY('c'):
    case 'y': case 'Y':
    case 'n': case 'N':
      if (k == 'y' || k == 'Y')
        *response = true;
      else if (k == 'n' || k == 'N')
        *response = false;
      editor->mode = HED_MODE_DEFAULT;
      show_cursor(false);
      clear_msg();
      return (k == CTRL_KEY('c')) ? -1 : 0;
    }
  }
  return -1;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x78(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rsi
leaq 0x33c3(%rip), %rdi      # 0xb765
movb $0x0, %al
callq 0x3610
movq 0x70(%rsp), %rdi
callq 0x20d0
movq %rax, 0x58(%rsp)
movq 0x78(%rsp), %rax
movl $0x3, 0x104(%rax)
movq 0x60(%rsp), %rax
movb $0x1, 0xd(%rax)
movq 0x78(%rsp), %rax
movb (%rax), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x83e2
jmp 0x8513
movq 0x60(%rsp), %rax
testb $0x1, 0xd(%rax)
je 0x83f7
movq 0x78(%rsp), %rdi
callq 0x67b0
movl 0x58(%rsp), %edi
addl $0x3, %edi
movq 0x60(%rsp), %rax
movl 0x8(%rax), %esi
addl $-0x2, %esi
callq 0x3d80
movl $0x1, %edi
callq 0x3e00
callq 0x3790
movq 0x60(%rsp), %rax
movl (%rax), %edi
leaq 0x10(%rsp), %rsi
movl $0x40, %edx
callq 0x2a80
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
subl $0x3, %eax
je 0x84a9
jmp 0x8446
movl 0x8(%rsp), %eax
subl $0x4e, %eax
je 0x84a9
jmp 0x8451
movl 0x8(%rsp), %eax
subl $0x59, %eax
je 0x84a9
jmp 0x845c
movl 0x8(%rsp), %eax
subl $0x6e, %eax
je 0x84a9
jmp 0x8467
movl 0x8(%rsp), %eax
subl $0x79, %eax
je 0x84a9
jmp 0x8472
movl 0x8(%rsp), %eax
subl $0x110002, %eax         # imm = 0x110002
jne 0x850e
jmp 0x8483
xorl %edi, %edi
callq 0x3e00
callq 0x3d40
callq 0x3e40
movl $0x1, %edi
callq 0x3e00
movq 0x60(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x850e
cmpl $0x79, 0xc(%rsp)
je 0x84b7
cmpl $0x59, 0xc(%rsp)
jne 0x84c1
movq 0x68(%rsp), %rax
movb $0x1, (%rax)
jmp 0x84d9
cmpl $0x6e, 0xc(%rsp)
je 0x84cf
cmpl $0x4e, 0xc(%rsp)
jne 0x84d7
movq 0x68(%rsp), %rax
movb $0x0, (%rax)
jmp 0x84d9
movq 0x78(%rsp), %rax
movl $0x0, 0x104(%rax)
xorl %edi, %edi
callq 0x3e00
callq 0x3740
movl 0xc(%rsp), %edx
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x3, %edx
cmovel %ecx, %eax
movl %eax, 0x84(%rsp)
jmp 0x851e
jmp 0x83d0
movl $0xffffffff, 0x84(%rsp) # imm = 0xFFFFFFFF
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: prompt_save_file
static int prompt_save_file(struct hed_editor *editor)
{
  char filename[256];
  if (editor->file->filename)
    snprintf(filename, sizeof(filename), "%s", editor->file->filename);
  else
    filename[0] = '\0';
  if (prompt_get_filename(editor, "Write file", filename, sizeof(filename)) < 0) {
    editor->screen.redraw_needed = true;
    return -1;
  }
  editor->screen.redraw_needed = true;
  return hed_write_file(editor->file, filename);
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x108(%rsp)
movq 0x108(%rsp), %rax
movq 0x628(%rax), %rax
cmpq $0x0, 0x20(%rax)
je 0x8580
movq %rsp, %rdi
movq 0x108(%rsp), %rax
movq 0x628(%rax), %rax
movq 0x20(%rax), %rcx
movl $0x100, %esi            # imm = 0x100
leaq 0x31ee(%rip), %rdx      # 0xb765
movb $0x0, %al
callq 0x20f0
jmp 0x8584
movb $0x0, (%rsp)
movq 0x108(%rsp), %rdi
movq %rsp, %rdx
leaq 0x3365(%rip), %rsi      # 0xb8fb
movl $0x100, %ecx            # imm = 0x100
callq 0x9180
cmpl $0x0, %eax
jge 0x85c1
movq 0x108(%rsp), %rax
movb $0x1, 0x115(%rax)
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x85ee
movq 0x108(%rsp), %rax
movb $0x1, 0x115(%rax)
movq 0x108(%rsp), %rax
movq 0x628(%rax), %rdi
movq %rsp, %rsi
callq 0x41c0
movl %eax, 0x114(%rsp)
movl 0x114(%rsp), %eax
addq $0x118, %rsp            # imm = 0x118
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: toggle_display_data
static void toggle_display_data(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  file->show_data = ! file->show_data;
  scr->redraw_needed = true;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movb 0x29(%rax), %cl
xorb $-0x1, %cl
movq -0x18(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x29(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopw %cs:(%rax,%rax)