LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: prompt_read_file
static int prompt_read_file(struct hed_editor *editor)
{
  char filename[256];
  filename[0] = '\0';
  if (prompt_get_filename(editor, "Read file", filename, sizeof(filename)) < 0) {
    editor->screen.redraw_needed = true;
    return -1;
  }
  editor->screen.redraw_needed = true;
  
  struct hed_file *file = hed_read_file(filename);
  if (! file)
    return -1;
  hed_add_file(editor, file);
  editor->file = file;
  return 0;
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x118(%rsp)
movb $0x0, 0x10(%rsp)
movq 0x118(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x30f0(%rip), %rsi      # 0xb768
movl $0x100, %ecx            # imm = 0x100
callq 0x9180
cmpl $0x0, %eax
jge 0x86a3
movq 0x118(%rsp), %rax
movb $0x1, 0x115(%rax)
movl $0xffffffff, 0x124(%rsp) # imm = 0xFFFFFFFF
jmp 0x8707
movq 0x118(%rsp), %rax
movb $0x1, 0x115(%rax)
leaq 0x10(%rsp), %rdi
callq 0x3fa0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x86d6
movl $0xffffffff, 0x124(%rsp) # imm = 0xFFFFFFFF
jmp 0x8707
movq 0x118(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x61b0
movq 0x8(%rsp), %rcx
movq 0x118(%rsp), %rax
movq %rcx, 0x628(%rax)
movl $0x0, 0x124(%rsp)
movl 0x124(%rsp), %eax
addq $0x128, %rsp            # imm = 0x128
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: perform_search
static int perform_search(struct hed_editor *editor)
{
  struct hed_file *file = editor->file;

  size_t search_len = strlen(editor->search_str);
  uint8_t *search_bytes;
  uint8_t search_buf[sizeof(editor->search_str)];
  if (file->pane == HED_PANE_TEXT) {
    search_bytes = (uint8_t *) editor->search_str;
  } else {
    search_len = conv_search_bytes(search_buf, sizeof(search_buf), editor->search_str);
    if (search_len == 0)
      return show_msg("Invalid byte sequence (must be a list pairs of hex numbers)");
    search_bytes = search_buf;
  }

  // TODO: Boyer-Moore search?
  bool found = false;
  size_t pos;
  for (pos = file->cursor_pos+1; pos + search_len < file->data_len; pos++) {
    if (memcmp(file->data + pos, search_bytes, search_len) == 0) {
      found = true;
      file->cursor_pos = pos;
      break;
    }
  }
  if (! found)
    return show_msg((file->pane == HED_PANE_HEX) ? "Byte sequence not found" : "Text not found");
  hed_set_cursor_pos(editor, pos, search_len);
  return 0;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x128(%rsp)
movq 0x128(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x120(%rsp)
movq 0x128(%rsp), %rdi
addq $0x3, %rdi
callq 0x20d0
movq %rax, 0x118(%rsp)
movq 0x120(%rsp), %rax
cmpl $0x1, 0x34(%rax)
jne 0x8783
movq 0x128(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x110(%rsp)
jmp 0x87d8
leaq 0x10(%rsp), %rdi
movq 0x128(%rsp), %rdx
addq $0x3, %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x9890
movq %rax, 0x118(%rsp)
cmpq $0x0, 0x118(%rsp)
jne 0x87cb
leaq 0x2fba(%rip), %rdi      # 0xb772
movb $0x0, %al
callq 0x3610
movl %eax, 0x134(%rsp)
jmp 0x88b7
leaq 0x10(%rsp), %rax
movq %rax, 0x110(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x120(%rsp), %rax
movq 0x38(%rax), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
addq 0x118(%rsp), %rax
movq 0x120(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x885c
movq 0x120(%rsp), %rax
movq 0x10(%rax), %rdi
addq (%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x2130
cmpl $0x0, %eax
jne 0x884c
movb $0x1, 0xf(%rsp)
movq (%rsp), %rcx
movq 0x120(%rsp), %rax
movq %rcx, 0x38(%rax)
jmp 0x885c
jmp 0x884e
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x87f1
testb $0x1, 0xf(%rsp)
jne 0x8893
movq 0x120(%rsp), %rax
movl 0x34(%rax), %ecx
leaq 0x2f51(%rip), %rdi      # 0xb7c6
leaq 0x2f32(%rip), %rax      # 0xb7ae
cmpl $0x0, %ecx
cmoveq %rax, %rdi
movb $0x0, %al
callq 0x3610
movl %eax, 0x134(%rsp)
jmp 0x88b7
movq 0x128(%rsp), %rdi
movq (%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x6420
movl $0x0, 0x134(%rsp)
movl 0x134(%rsp), %eax
addq $0x138, %rsp            # imm = 0x138
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: prompt_search
static int prompt_search(struct hed_editor *editor)
{
  struct hed_file *file = editor->file;
  const char *prompt = (file->pane == HED_PANE_HEX) ? "Search bytes" : "Search text";
  char prompt_str[40];
  if (editor->search_str[0] != '\0') {
    size_t prompt_len = strlen(prompt);
    size_t len = strlen(editor->search_str);
    if (len + prompt_len + 10 > sizeof(prompt_str)) {
      len = sizeof(prompt_str) - prompt_len - 10;
      snprintf(prompt_str, sizeof(prompt_str), "%s [%.*s...]", prompt, (int) len, editor->search_str);
    } else
      snprintf(prompt_str, sizeof(prompt_str), "%s [%.*s]", prompt, (int) len, editor->search_str);
    prompt = prompt_str;
  }
  char search_str[sizeof(editor->search_str)];
  search_str[0] = '\0';
  if (prompt_get_filename(editor, prompt, search_str, sizeof(search_str)) < 0)
    return -1;
  if (search_str[0] != '\0')
    strcpy(editor->search_str, search_str);
  perform_search(editor);
  return 0;
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x148(%rsp)
movq 0x148(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x140(%rsp)
movq 0x140(%rsp), %rax
movl 0x34(%rax), %edx
leaq 0x3328(%rip), %rax      # 0xbc30
leaq 0x2ec6(%rip), %rcx      # 0xb7d5
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, 0x138(%rsp)
movq 0x148(%rsp), %rax
movsbl 0x3(%rax), %eax
cmpl $0x0, %eax
je 0x8a1a
movq 0x138(%rsp), %rdi
callq 0x20d0
movq %rax, 0x108(%rsp)
movq 0x148(%rsp), %rdi
addq $0x3, %rdi
callq 0x20d0
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
addq 0x108(%rsp), %rax
addq $0xa, %rax
cmpq $0x28, %rax
jbe 0x89d0
movl $0x28, %eax
subq 0x108(%rsp), %rax
subq $0xa, %rax
movq %rax, 0x100(%rsp)
leaq 0x110(%rsp), %rdi
movq 0x138(%rsp), %rcx
movq 0x100(%rsp), %rax
movl %eax, %r8d
movq 0x148(%rsp), %r9
addq $0x3, %r9
movl $0x28, %esi
leaq 0x2e1b(%rip), %rdx      # 0xb7e2
movb $0x0, %al
callq 0x20f0
jmp 0x8a0a
leaq 0x110(%rsp), %rdi
movq 0x138(%rsp), %rcx
movq 0x100(%rsp), %rax
movl %eax, %r8d
movq 0x148(%rsp), %r9
addq $0x3, %r9
movl $0x28, %esi
leaq 0x2dec(%rip), %rdx      # 0xb7ef
movb $0x0, %al
callq 0x20f0
leaq 0x110(%rsp), %rax
movq %rax, 0x138(%rsp)
movb $0x0, (%rsp)
movq 0x148(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq %rsp, %rdx
movl $0x100, %ecx            # imm = 0x100
callq 0x9180
cmpl $0x0, %eax
jge 0x8a4d
movl $0xffffffff, 0x154(%rsp) # imm = 0xFFFFFFFF
jmp 0x8a82
movsbl (%rsp), %eax
cmpl $0x0, %eax
je 0x8a6a
movq 0x148(%rsp), %rdi
addq $0x3, %rdi
movq %rsp, %rsi
callq 0x2050
movq 0x148(%rsp), %rdi
callq 0x8720
movl $0x0, 0x154(%rsp)
movl 0x154(%rsp), %eax
addq $0x158, %rsp            # imm = 0x158
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_start_of_file
static void cursor_start_of_file(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  file->cursor_pos = 0;
  file->top_line = 0;
  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
movq $0x0, 0x38(%rax)
movq -0x18(%rsp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_end_of_file
static void cursor_end_of_file(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;
  size_t n_page_lines = get_num_displayed_file_lines(editor);
  size_t last_line = file->data_len / 16 + (file->data_len % 16 != 0);
  
  file->cursor_pos = file->data_len - 1;
  if (last_line < n_page_lines)
    file->top_line = 0;
  else
    file->top_line = last_line - n_page_lines;
  scr->redraw_needed = true;
}

// 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)
movq 0x20(%rsp), %rdi
callq 0x6610
cltq
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
shrq $0x4, %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
andq $0xf, %rcx
cmpq $0x0, %rcx
setne %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rcx
subq $0x1, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rax)
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
jae 0x8bdc
movq 0x10(%rsp), %rax
movq $0x0, 0x40(%rax)
jmp 0x8bee
movq (%rsp), %rcx
subq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x18(%rsp), %rax
movb $0x1, 0xd(%rax)
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_home
static void cursor_home(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  file->cursor_pos = file->cursor_pos / 16 * 16;
  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
movq 0x38(%rax), %rcx
shrq $0x4, %rcx
shlq $0x4, %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_end
static void cursor_end(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  file->cursor_pos = file->cursor_pos / 16 * 16 + 15;
  if (file->cursor_pos >= file->data_len)
    file->cursor_pos = file->data_len - 1;
  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
movq 0x38(%rax), %rcx
shrq $0x4, %rcx
shlq $0x4, %rcx
addq $0xf, %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x38(%rax)
movq -0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x8cbe
movq -0x18(%rsp), %rax
movq 0x18(%rax), %rcx
subq $0x1, %rcx
movq -0x18(%rsp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_left
static void cursor_left(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->cursor_pos >= 1) {
    file->cursor_pos--;
    while (file->cursor_pos < 16 * file->top_line)
      file->top_line--;
    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
cmpq $0x1, 0x38(%rax)
jb 0x8d4a
movq -0x18(%rsp), %rax
movq 0x38(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x38(%rax)
movq -0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rsp), %rcx
movq 0x40(%rcx), %rcx
shlq $0x4, %rcx
cmpq %rcx, %rax
jae 0x8d41
movq -0x18(%rsp), %rax
movq 0x40(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x8d13
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_right
static void cursor_right(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->cursor_pos + 1 < file->data_len) {
    file->cursor_pos++;
    size_t n_page_lines = get_num_displayed_file_lines(editor);
    while (file->cursor_pos >= 16 * (file->top_line + n_page_lines))
      file->top_line++;
    scr->redraw_needed = true;
  }
}

// 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)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
addq $0x1, %rax
movq 0x10(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x8df0
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rax)
movq 0x20(%rsp), %rdi
callq 0x6610
cltq
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x40(%rcx), %rcx
addq 0x8(%rsp), %rcx
shlq $0x4, %rcx
cmpq %rcx, %rax
jb 0x8de7
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x8db4
movq 0x18(%rsp), %rax
movb $0x1, 0xd(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_up
static void cursor_up(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->cursor_pos >= 16) {
    file->cursor_pos -= 16;
    while (file->cursor_pos < 16 * file->top_line)
      file->top_line--;
    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
cmpq $0x10, 0x38(%rax)
jb 0x8e7a
movq -0x18(%rsp), %rax
movq 0x38(%rax), %rcx
subq $0x10, %rcx
movq %rcx, 0x38(%rax)
movq -0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq -0x18(%rsp), %rcx
movq 0x40(%rcx), %rcx
shlq $0x4, %rcx
cmpq %rcx, %rax
jae 0x8e71
movq -0x18(%rsp), %rax
movq 0x40(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x8e43
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_down
static void cursor_down(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->cursor_pos + 16 < file->data_len) {
    file->cursor_pos += 16;
    size_t n_page_lines = get_num_displayed_file_lines(editor);
    while (file->cursor_pos >= 16 * (file->top_line + n_page_lines))
      file->top_line++;
    scr->redraw_needed = true;
  }
}

// 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)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
addq $0x10, %rax
movq 0x10(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x8f20
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rcx
addq $0x10, %rcx
movq %rcx, 0x38(%rax)
movq 0x20(%rsp), %rdi
callq 0x6610
cltq
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x40(%rcx), %rcx
addq 0x8(%rsp), %rcx
shlq $0x4, %rcx
cmpq %rcx, %rax
jb 0x8f17
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
jmp 0x8ee4
movq 0x18(%rsp), %rax
movb $0x1, 0xd(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_page_up
static void cursor_page_up(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;
  int cursor_delta = file->cursor_pos - 16*file->top_line;
  size_t n_page_lines = get_num_displayed_file_lines(editor);

  if (file->top_line == 0)
    cursor_delta %= 16;
  else if (file->top_line >= n_page_lines)
    file->top_line -= n_page_lines;
  else
    file->top_line = 0;
  file->cursor_pos = 16*file->top_line + cursor_delta;
  scr->redraw_needed = true;
}

// 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)
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x40(%rcx), %rcx
shlq $0x4, %rcx
subq %rcx, %rax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rdi
callq 0x6610
cltq
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x8fa5
movl 0xc(%rsp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %edx, 0xc(%rsp)
jmp 0x8fd9
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
cmpq (%rsp), %rax
jb 0x8fca
movq (%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x40(%rax)
jmp 0x8fd7
movq 0x10(%rsp), %rax
movq $0x0, 0x40(%rax)
jmp 0x8fd9
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rcx
shlq $0x4, %rcx
movslq 0xc(%rsp), %rax
addq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x18(%rsp), %rax
movb $0x1, 0xd(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/editor.c
// Function: cursor_page_down
static void cursor_page_down(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;
  int cursor_delta = file->cursor_pos - 16*file->top_line;
  size_t n_page_lines = get_num_displayed_file_lines(editor);
  size_t last_line = file->data_len / 16 + (file->data_len % 16 != 0);

  if (last_line < n_page_lines || file->top_line == last_line - n_page_lines) {
    if (last_line < n_page_lines)
      file->top_line = 0;
    cursor_delta = file->data_len - 16*file->top_line - 1;
  } else if (last_line > n_page_lines && file->top_line + 2*n_page_lines < last_line)
    file->top_line += n_page_lines;
  else
    file->top_line = last_line - n_page_lines;
  file->cursor_pos = 16*file->top_line + cursor_delta;
  scr->redraw_needed = true;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x628(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x40(%rcx), %rcx
shlq $0x4, %rcx
subq %rcx, %rax
movl %eax, 0x1c(%rsp)
movq 0x30(%rsp), %rdi
callq 0x6610
cltq
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
shrq $0x4, %rax
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %rcx
andq $0xf, %rcx
cmpq $0x0, %rcx
setne %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jb 0x90be
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rsp), %rcx
subq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jne 0x90fa
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x90d7
movq 0x20(%rsp), %rax
movq $0x0, 0x40(%rax)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x40(%rcx), %rcx
shlq $0x4, %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, 0x1c(%rsp)
jmp 0x914a
movq 0x8(%rsp), %rax
cmpq 0x10(%rsp), %rax
jbe 0x9135
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rsp), %rcx
shlq %rcx
addq %rcx, %rax
cmpq 0x8(%rsp), %rax
jae 0x9135
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
jmp 0x9148
movq 0x8(%rsp), %rcx
subq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x40(%rax)
jmp 0x914a
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rcx
shlq $0x4, %rcx
movslq 0x1c(%rsp), %rax
addq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x28(%rsp), %rax
movb $0x1, 0xd(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: hed_display_help
void hed_display_help(struct hed_editor *editor)
{
  clear_msg();

  struct hed_screen *scr = &editor->screen;
  struct help_state help;
  init_help_state(&help, editor);
  
  reset_color();
  clear_screen();
  scr->redraw_needed = true;
  while (! editor->quit && ! help.quit) {
    if (scr->redraw_needed)
      draw_main_screen(&help);
    process_input(&help);
  }

  reset_color();
  clear_screen();
  scr->redraw_needed = true;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
callq 0x3740
movq 0x40(%rsp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x9b20
callq 0x3d40
callq 0x3e40
movq 0x38(%rsp), %rax
movb $0x1, 0xd(%rax)
movq 0x40(%rsp), %rcx
xorl %eax, %eax
testb $0x1, (%rcx)
movb %al, 0xf(%rsp)
jne 0x9ada
movb 0x18(%rsp), %al
xorb $-0x1, %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x9ae4
jmp 0x9b05
movq 0x38(%rsp), %rax
testb $0x1, 0xd(%rax)
je 0x9af9
leaq 0x10(%rsp), %rdi
callq 0x9b70
leaq 0x10(%rsp), %rdi
callq 0x9ca0
jmp 0x9ac0
callq 0x3d40
callq 0x3e40
movq 0x38(%rsp), %rax
movb $0x1, 0xd(%rax)
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: init_help_state
static void init_help_state(struct help_state *hs, struct hed_editor *editor)
{
  hs->editor = editor;
  hs->quit = false;
  hs->top_line = 0;
  hs->lines = help_page;
  hs->num_lines = sizeof(help_page)/sizeof(help_page[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
movb $0x0, 0x8(%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rsp), %rax
leaq 0x4617(%rip), %rcx      # 0xe170
movq %rcx, 0x18(%rax)
movq -0x8(%rsp), %rax
movq $0x25, 0x20(%rax)
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: draw_main_screen
static void draw_main_screen(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;

  if (scr->window_changed) {
    reset_color();
    clear_screen();
    scr->window_changed = false;
  }

  draw_header(hs);
  draw_footer(hs);

  int line = 0;
  while (line + EDITOR_BORDER_LINES < scr->h) {
    if (hs->top_line + line >= hs->num_lines)
      break;
    move_cursor(1, line + 1 + EDITOR_HEADER_LINES);
    out("%s", hs->lines[hs->top_line + line]);
    clear_eol();
    line++;
  }

  while (line + EDITOR_BORDER_LINES < scr->h) {
    reset_color();
    move_cursor(1, line + 1 + EDITOR_HEADER_LINES);
    clear_eol();
    line++;
  }
  
  hed_scr_flush();
  scr->redraw_needed = false;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
testb $0x1, 0xc(%rax)
je 0x9baa
callq 0x3d40
callq 0x3e40
movq 0x8(%rsp), %rax
movb $0x0, 0xc(%rax)
movq 0x10(%rsp), %rdi
callq 0x9e20
movq 0x10(%rsp), %rdi
callq 0x9eb0
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
addl $0x5, %eax
movq 0x8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x9c4a
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jb 0x9bf5
jmp 0x9c4a
movl 0x4(%rsp), %esi
addl $0x1, %esi
addl $0x2, %esi
movl $0x1, %edi
callq 0x3d80
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x4(%rsp), %rdx
addq %rdx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b37(%rip), %rdi      # 0xb765
movb $0x0, %al
callq 0x3850
callq 0x3d60
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x9bc6
jmp 0x9c4c
movl 0x4(%rsp), %eax
addl $0x5, %eax
movq 0x8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x9c88
callq 0x3d40
movl 0x4(%rsp), %esi
addl $0x1, %esi
addl $0x2, %esi
movl $0x1, %edi
callq 0x3d80
callq 0x3d60
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x9c4c
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/help.c
// Function: process_input
static void process_input(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;
  char key_err[64];

  int k = read_key(scr->term_fd, key_err, sizeof(key_err));
  switch (k) {
  case KEY_REDRAW:
  case CTRL_KEY('l'):
    reset_color();
    clear_screen();
    scr->redraw_needed = true;
    break;

  case CTRL_KEY('x'):
  case CTRL_KEY('c'):
    scr->redraw_needed = true;
    hs->quit = true;
    break;

  case CTRL_KEY('p'):  move_text_up(hs); break;
  case CTRL_KEY('n'):  move_text_down(hs); break;
  case CTRL_KEY('y'):  move_text_page_up(hs); break;
  case CTRL_KEY('v'):  move_text_page_down(hs); break;
  case KEY_ARROW_UP:   move_text_up(hs); break;
  case KEY_ARROW_DOWN: move_text_down(hs); break;
  case KEY_PAGE_UP:    move_text_page_up(hs); break;
  case KEY_PAGE_DOWN:  move_text_page_down(hs); break;
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq (%rax), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, 0x58(%rsp)
movq 0x58(%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 0x9da8
jmp 0x9ce9
movl 0x8(%rsp), %eax
subl $0xc, %eax
je 0x9d93
jmp 0x9cf8
movl 0x8(%rsp), %eax
subl $0xe, %eax
je 0x9dc8
jmp 0x9d07
movl 0x8(%rsp), %eax
subl $0x10, %eax
je 0x9dbc
jmp 0x9d16
movl 0x8(%rsp), %eax
subl $0x16, %eax
je 0x9de0
jmp 0x9d25
movl 0x8(%rsp), %eax
subl $0x18, %eax
je 0x9da8
jmp 0x9d30
movl 0x8(%rsp), %eax
subl $0x19, %eax
je 0x9dd4
jmp 0x9d3f
movl 0x8(%rsp), %eax
subl $0x110002, %eax         # imm = 0x110002
je 0x9d93
jmp 0x9d4c
movl 0x8(%rsp), %eax
subl $0x111002, %eax         # imm = 0x111002
je 0x9dec
jmp 0x9d5d
movl 0x8(%rsp), %eax
subl $0x111003, %eax         # imm = 0x111003
je 0x9df8
jmp 0x9d6e
movl 0x8(%rsp), %eax
subl $0x111008, %eax         # imm = 0x111008
je 0x9e04
jmp 0x9d7f
movl 0x8(%rsp), %eax
subl $0x111009, %eax         # imm = 0x111009
je 0x9e10
jmp 0x9e1a
callq 0x3d40
callq 0x3e40
movq 0x58(%rsp), %rax
movb $0x1, 0xd(%rax)
jmp 0x9e1a
movq 0x58(%rsp), %rax
movb $0x1, 0xd(%rax)
movq 0x60(%rsp), %rax
movb $0x1, 0x8(%rax)
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0x9fd0
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0xa010
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0xa070
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0xa0e0
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0x9fd0
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0xa010
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0xa070
jmp 0x9e1a
movq 0x60(%rsp), %rdi
callq 0xa0e0
addq $0x68, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: draw_header
static void draw_header(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;

  reset_color();
  set_color(FG_BLACK, BG_GRAY);
  move_cursor(1, 1);
  out(" Help");
  clear_eol();

  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
leaq 0x16e8(%rip), %rdi      # 0xb54b
movb $0x0, %al
callq 0x3850
callq 0x3d60
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rax
subq $0x8, %rax
subq $0x1, %rax
movl %eax, %edi
movl $0x1, %esi
callq 0x3d80
leaq 0x18d2(%rip), %rdi      # 0xb765
leaq 0x1632(%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/help.c
// Function: draw_footer
static void draw_footer(struct help_state *hs)
{
  struct hed_screen *scr = &hs->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", "Back");
  hed_draw_key_help(1 + 1*EDITOR_KEY_HELP_SPACING, scr->h, "^P", "Up");
  hed_draw_key_help(1 + 2*EDITOR_KEY_HELP_SPACING, scr->h, "^N", "Down");
  hed_draw_key_help(1 + 3*EDITOR_KEY_HELP_SPACING, scr->h, "^Y", "Page Up");
  hed_draw_key_help(1 + 4*EDITOR_KEY_HELP_SPACING, scr->h, "^V", "Page Down");
  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 0x9f1a
movl $0x1e, %edi
movl $0x2f, %esi
callq 0x3c80
movq 0x8(%rsp), %rsi
addq $0x11, %rsi
leaq 0x1851(%rip), %rdi      # 0xb764
movb $0x0, %al
callq 0x3850
callq 0x3d60
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl $0x1, %edi
leaq 0x15a2(%rip), %rdx      # 0xb4d5
leaq 0x1d2c(%rip), %rcx      # 0xbc66
callq 0x6340
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl $0x11, %edi
leaq 0x1d18(%rip), %rdx      # 0xbc6b
leaq 0x1d1f(%rip), %rcx      # 0xbc79
callq 0x6340
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl $0x21, %edi
leaq 0x1cfb(%rip), %rdx      # 0xbc6e
leaq 0x1d0a(%rip), %rcx      # 0xbc84
callq 0x6340
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl $0x31, %edi
leaq 0x1cde(%rip), %rdx      # 0xbc71
leaq 0x1cda(%rip), %rcx      # 0xbc74
callq 0x6340
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl $0x41, %edi
leaq 0x1cc9(%rip), %rdx      # 0xbc7c
leaq 0x1cc5(%rip), %rcx      # 0xbc7f
callq 0x6340
callq 0x3d60
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: move_text_up
static void move_text_up(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;

  if (hs->top_line > 0) {
    hs->top_line--;
    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
cmpq $0x0, 0x10(%rax)
jbe 0xa00e
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: move_text_down
static void move_text_down(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;
  size_t n_page_lines = scr->h - EDITOR_BORDER_LINES;

  if (hs->top_line + n_page_lines < hs->num_lines) {
    hs->top_line++;
    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 $0x5, %eax
cltq
movq %rax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
addq -0x18(%rsp), %rax
movq -0x8(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jae 0xa06d
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nop
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: move_text_page_up
static void move_text_page_up(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;
  size_t n_page_lines = scr->h - EDITOR_BORDER_LINES;

  if (hs->top_line > n_page_lines)
    hs->top_line -= n_page_lines;
  else
    hs->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 $0x5, %eax
cltq
movq %rax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rsp), %rax
jbe 0xa0c1
movq -0x18(%rsp), %rdx
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
jmp 0xa0ce
movq -0x8(%rsp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/moefh[P]hed/src/help.c
// Function: move_text_page_down
static void move_text_page_down(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;
  size_t n_page_lines = scr->h - EDITOR_BORDER_LINES;

  if (hs->top_line + 2*n_page_lines < hs->num_lines)
    hs->top_line += n_page_lines;
  else
    hs->top_line = hs->num_lines - n_page_lines;
  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 $0x5, %eax
cltq
movq %rax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rsp), %rcx
shlq %rcx
addq %rcx, %rax
movq -0x8(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jae 0xa13d
movq -0x18(%rsp), %rcx
movq -0x8(%rsp), %rax
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0xa154
movq -0x8(%rsp), %rax
movq 0x20(%rax), %rcx
subq -0x18(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rsp), %rax
movb $0x1, 0xd(%rax)
retq
nop
// File: /workspace/github_c_makefile_star2_O0/ikbenlike[P]nngutils/src/rmdir.c
// Function: parse_arg
struct rmdir_args *parse_arg(struct rmdir_args *args, int argc, char **argv){
    args->paths = calloc(1, sizeof(char*) * argc);
    args->pcount = 0;
    for(int i = 0; i < argc; i++){
        if(!strcmp(argv[i], "--ignore-fail-on-non-empty")){
            args->ignore_fail = true;
        }
        else if(!strcmp(argv[i], "-p") || !strcmp(argv[i], "--parents")){
            args->parents = true;
        }
        else if(!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose")){
            args->verbose = true;
        }
        else if(argv[i][0] == '-'){
            fprintf(stderr, "%s: invalid operand '%s'\n", argv[0], argv[i]);
            exit(1);
        }
        else {
            args->paths[args->pcount++] = argv[i];
        }
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movslq -0xc(%rbp), %rsi
shlq $0x3, %rsi
movl $0x1, %edi
callq 0x1060
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x133b
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xdf3(%rip), %rsi       # 0x2004
callq 0x1070
cmpl $0x0, %eax
jne 0x1227
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
jmp 0x132b
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xde5(%rip), %rsi       # 0x201f
callq 0x1070
cmpl $0x0, %eax
je 0x1261
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xdcb(%rip), %rsi       # 0x2022
callq 0x1070
cmpl $0x0, %eax
jne 0x126e
movq -0x8(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x1329
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xdab(%rip), %rsi       # 0x202c
callq 0x1070
cmpl $0x0, %eax
je 0x12a8
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd91(%rip), %rsi       # 0x202f
callq 0x1070
cmpl $0x0, %eax
jne 0x12b2
movq -0x8(%rbp), %rax
movb $0x1, 0x2(%rax)
jmp 0x1327
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x12fb
movq 0x2d2b(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xd4f(%rip), %rsi       # 0x2039
movb $0x0, %al
callq 0x1080
movl $0x1, %edi
callq 0x1090
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rsi
movl 0x10(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x10(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x1327
jmp 0x1329
jmp 0x132b
jmp 0x132d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x11f2
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/ikbenlike[P]nngutils/src/rmdir.c
// Function: main
int main(int argc, char **argv){
    if(argc == 1){
        fprintf(stderr, "%s: missing operand\n", argv[0]);
        return 1;
    }
    struct rmdir_args *args = calloc(1, sizeof(struct rmdir_args));
    args = parse_arg(args, argc, argv);
    for(int i = 1; i < args->pcount; i++){
        if(args->verbose){
            fprintf(stdout, "%s: removing directory, '%s'\n", argv[0], args->paths[i]);
        }
        if(rmdir(args->paths[i]) == -1){
            if(errno == ENOTEMPTY && !args->ignore_fail){
                fprintf(stderr, "%s: failed to remove '%s': %s\n", argv[0], args->paths[i], strerror(errno));
                return 1;
            }
        }
    }
    free(args->paths);
    free(args);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x1397
movq 0x2c85(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0xccf(%rip), %rsi       # 0x2053
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x14c9
movl $0x1, %edi
movl $0x18, %esi
callq 0x1060
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0x11b0
movq %rax, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x14ac
movq -0x18(%rbp), %rax
testb $0x1, 0x2(%rax)
je 0x140e
movq 0x2bf2(%rip), %rax      # 0x3fd8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xc61(%rip), %rsi       # 0x2068
movb $0x0, %al
callq 0x1080
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1050
cmpl $-0x1, %eax
jne 0x149c
callq 0x1040
cmpl $0x27, (%rax)
jne 0x149a
movq -0x18(%rbp), %rax
testb $0x1, (%rax)
jne 0x149a
movq 0x2bb6(%rip), %rax      # 0x3ff8
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
callq 0x1040
movl (%rax), %edi
callq 0x10a0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq %rax, %r8
leaq 0xbfc(%rip), %rsi       # 0x2086
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x14c9
jmp 0x149c
jmp 0x149e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x13c5
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x1030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/tarun388[P]myexpos_2019/expl/./ltranslate.c
// Function: append_table
void append_table(char *label, int addr)
{
	struct LTable *temp;
	temp = (struct LTable *)malloc(sizeof(struct LTable));
	temp->name = label;
	temp->addr = addr;

	if (LThead == NULL)
	{
		LThead = temp;
		LTtail = temp;
	}
	else
	{
		LTtail->next = temp;
		LTtail = LTtail->next;
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x18, %edi
callq 0x1110
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpq $0x0, 0x4e3e(%rip)      # 0x60f8
jne 0x12d4
movq -0x18(%rbp), %rax
movq %rax, 0x4e31(%rip)      # 0x60f8
movq -0x18(%rbp), %rax
movq %rax, 0x4e2e(%rip)      # 0x6100
jmp 0x12f5
movq -0x18(%rbp), %rcx
movq 0x4e21(%rip), %rax      # 0x6100
movq %rcx, 0x10(%rax)
movq 0x4e16(%rip), %rax      # 0x6100
movq 0x10(%rax), %rax
movq %rax, 0x4e0b(%rip)      # 0x6100
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tarun388[P]myexpos_2019/expl/./ltranslate.c
// Function: find_map
int find_map(char *name)
{
	struct LTable *temp;

	temp = LThead;
	while (temp != NULL)
	{
		if (strcmp(name, temp->name) == 0)
			return temp->addr;

		temp = temp->next;
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x4de5(%rip), %rax      # 0x60f8
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x134d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x10d0
cmpl $0x0, %eax
jne 0x133f
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x1354
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1317
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/tarun388[P]myexpos_2019/expl/./ltranslate.c
// Function: print_table
void print_table()
{
	struct LTable *temp;

	temp = LThead;
	while (temp != NULL)
	{
		printf("%s : %d\n", temp->name, temp->addr);
		temp = temp->next;
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x4d89(%rip), %rax      # 0x60f8
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x13a4
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x303b(%rip), %rdi      # 0x43ca
movb $0x0, %al
callq 0x10b0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1373
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/tarun388[P]myexpos_2019/expl/ltranslate.lex.c
// Function: yy_try_NUL_trans
static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	int yy_is_jam;
    	char *yy_cp = (yy_c_buf_p);

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 35 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 34);

		return yy_is_jam ? 0 : yy_current_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq 0x4172(%rip), %rax      # 0x6130
movq %rax, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x216f(%rip), %rax      # 0x4140
cmpw $0x0, (%rax,%rcx,2)
je 0x1fec
movl -0x4(%rbp), %eax
movl %eax, 0x415b(%rip)      # 0x613c
movq -0x10(%rbp), %rax
movq %rax, 0x4154(%rip)      # 0x6140
jmp 0x1fee
movslq -0x4(%rbp), %rcx
leaq 0x2247(%rip), %rax      # 0x4240
movswl (%rax,%rcx,2), %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x2183(%rip), %rax      # 0x4190
movswl (%rax,%rcx,2), %eax
cmpl -0x4(%rbp), %eax
je 0x2043
movslq -0x4(%rbp), %rcx
leaq 0x227f(%rip), %rax      # 0x42a0
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
cmpl $0x23, -0x4(%rbp)
jl 0x2041
movzbl -0x11(%rbp), %eax
movl %eax, %ecx
leaq 0x22c5(%rip), %rax      # 0x4300
movb (%rax,%rcx), %al
movb %al, -0x11(%rbp)
jmp 0x1fee
movslq -0x4(%rbp), %rcx
leaq 0x21f2(%rip), %rax      # 0x4240
movswl (%rax,%rcx,2), %eax
movzbl -0x11(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x22be(%rip), %rax      # 0x4320
movswl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
cmpl $0x22, -0x4(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x2085
xorl %eax, %eax
movl %eax, -0x18(%rbp)
jmp 0x208b
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/openshmem-org[P]openshmem-examples/c/heapput.c
// Function: main
int
main()
{
    int me;

    shmem_init();

    me = shmem_my_pe();

    if (me == 0) {
        long src = 4321;
        shmem_long_put(&dest, &src, 1, 1);
    }

    shmem_barrier_all();

    printf("%d: dest = %ld\n", me, dest);

    shmem_finalize();

    return 0;
}

// Assembly:
subq $0x18, %rsp
movl $0x0, 0x14(%rsp)
callq 0x1080
callq 0x1060
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0x11d5
movq $0x10e1, 0x8(%rsp)      # imm = 0x10E1
leaq 0x2e97(%rip), %rdi      # 0x4058
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x1040
callq 0x1070
movl 0x10(%rsp), %esi
movq 0x2e73(%rip), %rdx      # 0x4058
leaq 0xe18(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1030
callq 0x1050
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/giometti[P]mastering_UNIX_programming/chapter_06/fstatus.c
// Function: main
int main(void)
{
	FILE *fp;
	char c;

	/* Open a file for writing */
	fp = fopen("file.txt", "w");
	if (!fp) {
		perror("fopen");
		return -1;
	}
	printf("file descriptor number is %d\n", fileno(fp));

	/* Try to read data from file */
	while (!ferror(fp))
		c = fgetc(fp);
	status(fp);

	/* Clear the error status and re-check it */
	clearerr(fp);
	status(fp);

	fclose(fp);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
leaq 0xe20(%rip), %rdi       # 0x2026
leaq 0xe22(%rip), %rsi       # 0x202f
callq 0x1090
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1232
leaq 0xe0d(%rip), %rdi       # 0x2031
callq 0x10a0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x129b
movq -0x10(%rbp), %rdi
callq 0x1080
movl %eax, %esi
leaq 0xdf3(%rip), %rdi       # 0x2037
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rdi
callq 0x1030
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1262
jmp 0x1270
movq -0x10(%rbp), %rdi
callq 0x1060
movb %al, -0x11(%rbp)
jmp 0x124b
movq -0x10(%rbp), %rdi
callq 0x11b0
movq -0x10(%rbp), %rdi
callq 0x1070
movq -0x10(%rbp), %rdi
callq 0x11b0
movq -0x10(%rbp), %rdi
callq 0x1040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]libcperciva/tests/json/main.c
// Function: main
int
main(int argc, char * argv[])
{
	size_t i;
	const uint8_t * found;

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

	/* Iterate through the tests. */
	for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
		found = json_find((const uint8_t *)tests[i].json,
		    (const uint8_t *)tests[i].json + strlen(tests[i].json),
		    tests[i].tofind);
		if (strcmp((const char *)found, tests[i].answer)) {
			printf("Searching for key \"%s\" in object:\n%s\n"
			    "Found: %s\nExpected: %s\n",
			    tests[i].tofind, tests[i].json,
			    found, tests[i].answer);
			printf("FAILURE\n");
			goto err0;
		}
	}

	/* Everything went fine. */
	printf("SUCCESS\n");

	/* Success! */
	exit(0);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0xf, -0x18(%rbp)
jae 0x12b1
leaq 0x2ea0(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x2e8a(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x2e74(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x1030
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq %rax, %rsi
leaq 0x2e52(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdx
callq 0x12d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x2e32(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
callq 0x1070
cmpl $0x0, %eax
je 0x129e
leaq 0x2e15(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
leaq 0x2e02(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
leaq 0x2dec(%rip), %rax      # 0x4060
imulq $0x18, -0x18(%rbp), %rdi
addq %rdi, %rax
movq 0x10(%rax), %r8
leaq 0xd7d(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1050
leaq 0xdac(%rip), %rdi       # 0x2041
movb $0x0, %al
callq 0x1050
jmp 0x12c6
jmp 0x12a0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x11ae
leaq 0xd92(%rip), %rdi       # 0x204a
movb $0x0, %al
callq 0x1050
xorl %edi, %edi
callq 0x1080
movl $0x1, %edi
callq 0x1080