LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-csi.c
// Function: termkey_interpret_string
TermKeyResult termkey_interpret_string(TermKey *tk, const TermKeyKey *key, const char **strp)
{
  struct TermKeyDriverNode *p;
  for(p = tk->drivers; p; p = p->next)
    if(p->driver == &termkey_driver_csi)
      break;

  if(!p)
    return TERMKEY_RES_NONE;

  if(key->type != TERMKEY_TYPE_DCS &&
     key->type != TERMKEY_TYPE_OSC)
    return TERMKEY_RES_NONE;

  TermKeyCsi *csi = p->info;

  if(csi->saved_string_id != key->code.number)
    return TERMKEY_RES_NONE;

  *strp = csi->saved_string;

  return TERMKEY_RES_KEY;
}

// Assembly:
movq 0x2a0(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x59be
movq 0x5638(%rip), %rdi      # 0xafe8
cmpq %rdi, (%rcx)
je 0x59bf
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x59b0
retq
movl (%rsi), %edi
andl $-0x2, %edi
cmpl $0x6, %edi
jne 0x59be
movq 0x8(%rcx), %rcx
movl 0x8(%rcx), %edi
cmpl 0x8(%rsi), %edi
jne 0x59be
movq 0x10(%rcx), %rax
movq %rax, (%rdx)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-csi.c
// Function: handle_csi_u
static TermKeyResult handle_csi_u(TermKey *tk, TermKeyKey *key, int cmd, long *arg, int args)
{
  switch(cmd) {
    case 'u': {
      if(args > 1 && arg[1] != -1)
        key->modifiers = arg[1] - 1;
      else
        key->modifiers = 0;

      int mod = key->modifiers;
      key->type = TERMKEY_TYPE_KEYSYM;
      (*tk->method.emit_codepoint)(tk, arg[0], key);
      key->modifiers |= mod;

      return TERMKEY_RES_KEY;
    }
    default:
      return TERMKEY_RES_NONE;
  }
}

// Assembly:
xorl %eax, %eax
cmpl $0x75, %edx
jne 0x5a28
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %ebp, %ebp
cmpl $0x2, %r8d
jl 0x5a05
movq 0x8(%rcx), %rax
cmpq $-0x1, %rax
je 0x5a05
decl %eax
movl %eax, %ebp
movl %ebp, 0x10(%rbx)
movl $0x2, (%rbx)
movq (%rcx), %rsi
movq %rbx, %rdx
callq *0x2a8(%rdi)
orl %ebp, 0x10(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-csi.c
// Function: handle_csi_R
static TermKeyResult handle_csi_R(TermKey *tk, TermKeyKey *key, int cmd, long *arg, int args)
{
  switch(cmd) {
    case 'R'|'?'<<8:
      if(args < 2)
        return TERMKEY_RES_NONE;

      key->type = TERMKEY_TYPE_POSITION;
      termkey_key_set_linecol(key, arg[1], arg[0]);
      return TERMKEY_RES_KEY;

    default:
      return handle_csi_ss3_full(tk, key, cmd, arg, args);
  }
}

// Assembly:
cmpl $0x3f52, %edx           # imm = 0x3F52
jne 0x5ba8
xorl %eax, %eax
cmpl $0x2, %r8d
jl 0x5b6f
movl $0x4, (%rsi)
movl (%rcx), %eax
movl 0x8(%rcx), %ecx
movl $0xfff, %edx            # imm = 0xFFF
cmpl %edx, %ecx
cmovll %ecx, %edx
movl $0x7ff, %ecx            # imm = 0x7FF
cmpl %ecx, %eax
cmovll %eax, %ecx
movb %dl, 0x9(%rsi)
movb %cl, 0xa(%rsi)
shrl $0x8, %edx
andl $0xf, %edx
shrl $0x4, %ecx
andl $0x30, %ecx
orl %edx, %ecx
movb %cl, 0xb(%rsi)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-csi.c
// Function: handle_csi_ss3_full
static TermKeyResult handle_csi_ss3_full(TermKey *tk, TermKeyKey *key, int cmd, long *arg, int args)
{
  if(args > 1 && arg[1] != -1)
    key->modifiers = arg[1] - 1;
  else
    key->modifiers = 0;

  key->type = csi_ss3s[cmd - 0x40].type;
  key->code.sym = csi_ss3s[cmd - 0x40].sym;
  key->modifiers &= ~(csi_ss3s[cmd - 0x40].modifier_mask);
  key->modifiers |= csi_ss3s[cmd - 0x40].modifier_set;

  if(key->code.sym == TERMKEY_SYM_UNKNOWN)
    return TERMKEY_RES_NONE;

  return TERMKEY_RES_KEY;
}

// Assembly:
xorl %eax, %eax
cmpl $0x2, %r8d
jl 0x5bbe
movq 0x8(%rcx), %rcx
cmpq $-0x1, %rcx
je 0x5bbe
decl %ecx
movl %ecx, %eax
movslq %edx, %rcx
shlq $0x4, %rcx
leaq 0x5644(%rip), %rdx      # 0xb210
movl -0x400(%rcx,%rdx), %edi
movl %edi, (%rsi)
movl -0x3fc(%rcx,%rdx), %edi
movl %edi, 0x8(%rsi)
movl -0x3f8(%rcx,%rdx), %r8d
notl %r8d
andl %eax, %r8d
orl -0x3f4(%rcx,%rdx), %r8d
movl %r8d, 0x10(%rsi)
xorl %eax, %eax
cmpl $-0x1, %edi
setne %al
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-csi.c
// Function: handle_csifunc
static TermKeyResult handle_csifunc(TermKey *tk, TermKeyKey *key, int cmd, long *arg, int args)
{
  if(args > 1 && arg[1] != -1)
    key->modifiers = arg[1] - 1;
  else
    key->modifiers = 0;

  key->type = TERMKEY_TYPE_KEYSYM;

  if(arg[0] == 27) {
    int mod = key->modifiers;
    (*tk->method.emit_codepoint)(tk, arg[2], key);
    key->modifiers |= mod;
  }
  else if(arg[0] >= 0 && arg[0] < NCSIFUNCS) {
    key->type = csifuncs[arg[0]].type;
    key->code.sym = csifuncs[arg[0]].sym;
    key->modifiers &= ~(csifuncs[arg[0]].modifier_mask);
    key->modifiers |= csifuncs[arg[0]].modifier_set;
  }
  else
    key->code.sym = TERMKEY_SYM_UNKNOWN;

  if(key->code.sym == TERMKEY_SYM_UNKNOWN) {
#ifdef DEBUG
    fprintf(stderr, "CSI: Unknown function key %ld\n", arg[0]);
#endif
    return TERMKEY_RES_NONE;
  }

  return TERMKEY_RES_KEY;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
xorl %ebp, %ebp
cmpl $0x2, %r8d
jl 0x5c1e
movq 0x8(%rcx), %rax
cmpq $-0x1, %rax
je 0x5c1e
decl %eax
movl %eax, %ebp
movl %ebp, 0x10(%rbx)
movl $0x2, (%rbx)
movq (%rcx), %rax
cmpq $0x1b, %rax
jne 0x5c45
movq 0x10(%rcx), %rsi
movq %rbx, %rdx
callq *0x2a8(%rdi)
orl %ebp, 0x10(%rbx)
movl 0x8(%rbx), %edx
jmp 0x5c86
cmpq $0x22, %rax
ja 0x5c7a
shlq $0x4, %rax
leaq 0x5dfa(%rip), %rsi      # 0xba50
movl (%rax,%rsi), %edx
movl %edx, (%rbx)
movl 0x4(%rax,%rsi), %edx
movl %edx, 0x8(%rbx)
movq (%rcx), %rax
shlq $0x4, %rax
movl 0x8(%rax,%rsi), %ecx
notl %ecx
andl %ecx, %ebp
orl 0xc(%rax,%rsi), %ebp
movl %ebp, 0x10(%rbx)
jmp 0x5c86
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $-0x1, %edx
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-csi.c
// Function: peekkey_ss3
static TermKeyResult peekkey_ss3(TermKey *tk, TermKeyCsi *csi, size_t introlen, TermKeyKey *key, int force, size_t *nbytep)
{
  if(tk->buffcount < introlen + 1) {
    if(!force)
      return TERMKEY_RES_AGAIN;

    (*tk->method.emit_codepoint)(tk, 'O', key);
    key->modifiers |= TERMKEY_KEYMOD_ALT;
    *nbytep = tk->buffcount;
    return TERMKEY_RES_KEY;
  }

  unsigned char cmd = CHARAT(introlen);

  if(cmd < 0x40 || cmd >= 0x80)
    return TERMKEY_RES_NONE;

  key->type = csi_ss3s[cmd - 0x40].type;
  key->code.sym = csi_ss3s[cmd - 0x40].sym;
  key->modifiers = csi_ss3s[cmd - 0x40].modifier_set;

  if(key->code.sym == TERMKEY_SYM_UNKNOWN) {
    if(tk->flags & TERMKEY_FLAG_CONVERTKP && ss3_kpalts[cmd - 0x40]) {
      key->type = TERMKEY_TYPE_UNICODE;
      key->code.codepoint = ss3_kpalts[cmd - 0x40];
      key->modifiers = 0;

      key->utf8[0] = key->code.codepoint;
      key->utf8[1] = 0;
    }
    else {
      key->type = ss3s[cmd - 0x40].type;
      key->code.sym = ss3s[cmd - 0x40].sym;
      key->modifiers = ss3s[cmd - 0x40].modifier_set;
    }
  }

  if(key->code.sym == TERMKEY_SYM_UNKNOWN) {
#ifdef DEBUG
    fprintf(stderr, "CSI: Unknown SS3 %c (0x%02x)\n", (char)cmd, cmd);
#endif
    return TERMKEY_RES_NONE;
  }

  *nbytep = introlen + 1;

  return TERMKEY_RES_KEY;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %rbx
movq %rdx, %r14
movq %rdi, %r15
cmpq %rsi, 0x20(%rdi)
jbe 0x5d20
movq 0x10(%r15), %rax
addq 0x18(%r15), %rax
movzbl (%rsi,%rax), %ecx
xorl %eax, %eax
cmpb $0x40, %cl
jl 0x5d4e
incq %rsi
andl $0x3f, %ecx
movl %ecx, %edx
shll $0x4, %edx
leaq 0x553e(%rip), %rdi      # 0xb210
movl (%rdx,%rdi), %r8d
movl %r8d, (%r14)
movl 0x4(%rdx,%rdi), %r8d
movl %r8d, 0x8(%r14)
movl 0xc(%rdx,%rdi), %edx
movl %edx, 0x10(%r14)
cmpl $-0x1, %r8d
jne 0x5d3f
testb $0x2, 0x4(%r15)
je 0x5d54
leaq 0x5d12(%rip), %rdx      # 0xba10
movsbq (%rcx,%rdx), %rdx
testq %rdx, %rdx
je 0x5d54
xorl %ecx, %ecx
movl %ecx, (%r14)
movq %rdx, 0x8(%r14)
movl %ecx, 0x10(%r14)
movb %dl, 0x14(%r14)
movb $0x0, 0x15(%r14)
jmp 0x5d74
testl %ecx, %ecx
je 0x5d49
movl $0x4f, %esi
movq %r15, %rdi
movq %r14, %rdx
callq *0x2a8(%r15)
orb $0x2, 0x10(%r14)
movq 0x20(%r15), %rsi
movq %rsi, (%rbx)
movl $0x1, %eax
jmp 0x5d4e
movl $0x3, %eax
popq %rbx
popq %r14
popq %r15
retq
shll $0x4, %ecx
leaq 0x58b2(%rip), %rdi      # 0xb610
movl (%rcx,%rdi), %edx
movl %edx, (%r14)
movl 0x4(%rcx,%rdi), %edx
movl %edx, 0x8(%r14)
movl 0xc(%rcx,%rdi), %ecx
movl %ecx, 0x10(%r14)
cmpl $-0x1, %edx
jne 0x5d3f
jmp 0x5d4e
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-csi.c
// Function: peekkey_ctrlstring
static TermKeyResult peekkey_ctrlstring(TermKey *tk, TermKeyCsi *csi, size_t introlen, TermKeyKey *key, int force, size_t *nbytep)
{
  size_t str_end = introlen;

  while(str_end < tk->buffcount) {
    if(CHARAT(str_end) == 0x07) // BEL
      break;
    if(CHARAT(str_end) == 0x9c) // ST
      break;
    if(CHARAT(str_end) == 0x1b &&
       (str_end + 1) < tk->buffcount &&
       CHARAT(str_end+1) == 0x5c) // ESC-prefixed ST
      break;

    str_end++;
  }

  if(str_end >= tk->buffcount)
    return TERMKEY_RES_AGAIN;

#ifdef DEBUG
  fprintf(stderr, "Found a control string: %*s",
      str_end - introlen, tk->buffer + tk->buffstart + introlen);
#endif

  *nbytep = str_end + 1;
  if(CHARAT(str_end) == 0x1b)
    (*nbytep)++;

  if(csi->saved_string)
    free(csi->saved_string);

  size_t len = str_end - introlen;

  csi->saved_string_id++;
  csi->saved_string = malloc(len + 1);

  strncpy(csi->saved_string, (char *)tk->buffer + tk->buffstart + introlen, len);
  csi->saved_string[len] = 0;

  key->type = (CHARAT(introlen-1) & 0x1f) == 0x10 ?
    TERMKEY_TYPE_DCS : TERMKEY_TYPE_OSC;
  key->code.number = csi->saved_string_id;
  key->modifiers = 0;

  return TERMKEY_RES_KEY;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq 0x20(%rdi), %rdi
movl $0x3, %eax
cmpq %rdx, %rdi
jbe 0x5e8a
movq %rdx, %r14
movq %rsi, %r12
movq 0x10(%r15), %rbx
movq 0x18(%r15), %rdx
addq %rbx, %rdx
movq %r14, %r13
movzbl (%rdx,%r13), %esi
cmpl $0x1b, %esi
je 0x5dd1
cmpl $0x7, %esi
je 0x5ded
cmpl $0x9c, %esi
je 0x5ded
incq %r13
movq %r13, %rsi
jmp 0x5de0
leaq 0x1(%r13), %rsi
cmpq %rdi, %rsi
jae 0x5de0
cmpb $0x5c, (%rdx,%rsi)
je 0x5ded
movq %rsi, %r13
cmpq %rdi, %rsi
jne 0x5db2
jmp 0x5e8a
leaq 0x1(%r13), %rax
movq %rax, (%r8)
movq 0x18(%r15), %rax
addq %rbx, %rax
cmpb $0x1b, (%r13,%rax)
jne 0x5e0a
leaq 0x2(%r13), %rax
movq %rax, (%r8)
movq %rcx, 0x10(%rsp)
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x5e22
callq 0x3050
movq 0x10(%r15), %rbx
subq %r14, %r13
movl 0x8(%r12), %eax
incl %eax
movl %eax, 0xc(%rsp)
movl %eax, 0x8(%r12)
leaq 0x1(%r13), %rdi
callq 0x31c0
movq %rax, %rbp
movq %rax, 0x10(%r12)
addq 0x18(%r15), %rbx
leaq (%rbx,%r14), %rsi
movq %rax, %rdi
movq %r13, %rdx
callq 0x30b0
movb $0x0, (%rbp,%r13)
movb -0x1(%r14,%rbx), %al
andb $0x1f, %al
xorl %ecx, %ecx
cmpb $0x10, %al
sete %cl
xorl $0x7, %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl $0x0, 0x10(%rax)
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: stop_driver
static int stop_driver(TermKey *tk, void *info)
{
  TermKeyTI *ti = info;
  struct stat statbuf;
  char *stop_string = ti->stop_string;
  size_t len;

  if(tk->fd == -1 || !stop_string)
    return 1;

  /* There's no point trying to write() to a pipe */
  if(fstat(tk->fd, &statbuf) == -1)
    return 0;

#ifndef _WIN32
  if(S_ISFIFO(statbuf.st_mode))
    return 1;
#endif

  /* The terminfo database will contain keys in application cursor key mode.
   * We may need to enable that mode
   */

  // Can't call putp or tputs because they suck and don't give us fd control
  len = strlen(stop_string);
  while(len) {
    size_t written = write(tk->fd, stop_string, len);
    if(written == -1)
      return 0;
    stop_string += written;
    len -= written;
  }
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %r14
movq 0x20(%rsi), %r15
movl (%rdi), %edi
cmpl $-0x1, %edi
setne %al
testq %r15, %r15
setne %cl
andb %al, %cl
movl $0x1, %ebx
cmpb $0x1, %cl
jne 0x63f6
leaq 0x8(%rsp), %rsi
callq 0x32d0
cmpl $-0x1, %eax
je 0x63f4
movl $0xf000, %eax           # imm = 0xF000
andl 0x20(%rsp), %eax
cmpl $0x1000, %eax           # imm = 0x1000
je 0x63f6
movq %r15, %rdi
callq 0x30f0
movq %rax, %r12
testq %r12, %r12
je 0x63f6
movl (%r14), %edi
movq %r15, %rsi
movq %r12, %rdx
callq 0x30e0
addq %rax, %r15
subq %rax, %r12
cmpq $-0x1, %rax
jne 0x63d5
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: peekkey
static TermKeyResult peekkey(TermKey *tk, void *info, TermKeyKey *key, int force, size_t *nbytep)
{
  TermKeyTI *ti = info;

  if(tk->buffcount == 0)
    return tk->is_closed ? TERMKEY_RES_EOF : TERMKEY_RES_NONE;

  struct trie_node *p = ti->root;

  unsigned int pos = 0;
  while(pos < tk->buffcount) {
    p = lookup_next(p, CHARAT(pos));
    if(!p)
      break;

    pos++;

    if(p->type != TYPE_KEY)
      continue;

    struct trie_node_key *nk = (struct trie_node_key*)p;
    if(nk->key.type == TERMKEY_TYPE_MOUSE) {
      tk->buffstart += pos;
      tk->buffcount -= pos;

      TermKeyResult mouse_result = (*tk->method.peekkey_mouse)(tk, key, nbytep);

      tk->buffstart -= pos;
      tk->buffcount += pos;

      if(mouse_result == TERMKEY_RES_KEY)
        *nbytep += pos;

      return mouse_result;
    }

    key->type      = nk->key.type;
    key->code.sym  = nk->key.sym;
    key->modifiers = nk->key.modifier_set;
    *nbytep = pos;
    return TERMKEY_RES_KEY;
  }

  // If p is not NULL then we hadn't walked off the end yet, so we have a
  // partial match
  if(p && !force)
    return TERMKEY_RES_AGAIN;

  return TERMKEY_RES_NONE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
cmpq $0x0, 0x20(%rdi)
je 0x6488
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq 0x10(%rsi), %rax
xorl %r12d, %r12d
movl %r12d, %r12d
cmpq %r12, 0x20(%r14)
jbe 0x649b
movq 0x10(%r14), %rcx
addq 0x18(%r14), %rcx
movzbl (%r12,%rcx), %esi
movq %rax, %rdi
callq 0x6807
testq %rax, %rax
je 0x6499
incl %r12d
cmpl $0x0, (%rax)
jne 0x6428
movl 0x4(%rax), %ecx
cmpl $0x3, %ecx
jne 0x64af
movl %r12d, %r12d
addq %r12, 0x18(%r14)
subq %r12, 0x20(%r14)
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0x2b8(%r14)
subq %r12, 0x18(%r14)
addq %r12, 0x20(%r14)
cmpl $0x1, %eax
jne 0x64cb
addq %r12, (%rbx)
jmp 0x64c6
xorl %eax, %eax
cmpb $0x0, 0x8c(%r14)
setne %al
addl %eax, %eax
jmp 0x64cb
xorl %eax, %eax
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
xorl %edx, %edx
testl %ebp, %ebp
leal (%rcx,%rcx,2), %eax
cmovnel %edx, %eax
jmp 0x64cb
movl %ecx, (%r15)
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%r15)
movl 0x10(%rax), %eax
movl %eax, 0x10(%r15)
movl %r12d, %eax
movq %rax, (%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: free_trie
static void free_trie(struct trie_node *n)
{
  switch(n->type) {
  case TYPE_KEY:
    break;
  case TYPE_ARR:
    {
      struct trie_node_arr *nar = (struct trie_node_arr*)n;
      int i;
      for(i = nar->min; i <= nar->max; i++)
        if(nar->arr[i - nar->min])
          free_trie(nar->arr[i - nar->min]);
      break;
    }
  }

  free(n);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x1, (%rdi)
jne 0x6522
movzbl 0x4(%rbx), %ebp
movb 0x5(%rbx), %al
cmpb %al, %bpl
ja 0x6522
movl %ebp, %ecx
decl %ebp
leaq (%rbx,%rcx,8), %r14
addq $0x8, %r14
movzbl 0x4(%rbx), %ecx
shll $0x3, %ecx
movq %r14, %rdx
subq %rcx, %rdx
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x6515
callq 0x64d4
movb 0x5(%rbx), %al
movzbl %al, %ecx
incl %ebp
addq $0x8, %r14
cmpl %ecx, %ebp
jb 0x64f8
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3050
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: new_node_arr
static struct trie_node *new_node_arr(unsigned char min, unsigned char max)
{
  struct trie_node_arr *n = malloc(sizeof(*n) + ((int)max-min+1) * sizeof(n->arr[0]));
  if(!n)
    return NULL;

  n->type = TYPE_ARR;
  n->min = min; n->max = max;

  int i;
  for(i = min; i <= max; i++)
    n->arr[i-min] = NULL;

  return (struct trie_node*)n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
movl %esi, %r15d
subl %edi, %r15d
movslq %r15d, %rax
leaq 0x10(,%rax,8), %rdi
callq 0x31c0
movq %rax, %rbx
testq %rax, %rax
je 0x6584
movl $0x1, (%rbx)
movb %r14b, 0x4(%rbx)
movb %bpl, 0x5(%rbx)
cmpb %bpl, %r14b
ja 0x6584
movq %rbx, %rdi
addq $0x8, %rdi
movl %r15d, %eax
leaq 0x8(,%rax,8), %rdx
xorl %esi, %esi
callq 0x3130
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: try_load_terminfo_key
static bool try_load_terminfo_key(TermKeyTI *ti, const char *name, struct keyinfo *info)
{
  const char *value = NULL;

#ifdef HAVE_UNIBILIUM
  if(ti->unibi)
    value = unibi_get_str_by_name(ti->unibi, name);
#else
  if(ti->term)
    value = tigetstr(name);
#endif

  if(ti->tk->ti_getstr_hook)
    value = (ti->tk->ti_getstr_hook)(name, value, ti->tk->ti_getstr_hook_data);

  if(!value || value == (char*)-1 || !value[0])
    return false;

  struct trie_node *node = new_node_key(info->type, info->sym, info->modifier_mask, info->modifier_set);
  insert_seq(ti, value, node);

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x65ba
movq %r12, %rdi
callq 0x3260
movq %rax, %r14
jmp 0x65bd
xorl %r14d, %r14d
movq (%rbx), %rcx
movq 0x78(%rcx), %rax
testq %rax, %rax
je 0x65db
movq 0x80(%rcx), %rdx
movq %r12, %rdi
movq %r14, %rsi
callq *%rax
movq %rax, %r14
leaq 0x1(%r14), %rax
cmpq $0x2, %rax
jae 0x65e9
xorl %eax, %eax
jmp 0x6625
cmpb $0x0, (%r14)
je 0x65e5
movups (%r15), %xmm0
movaps %xmm0, (%rsp)
movl $0x14, %edi
callq 0x31c0
testq %rax, %rax
je 0x6614
movl $0x0, (%rax)
movaps (%rsp), %xmm0
movups %xmm0, 0x4(%rax)
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x6631
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: insert_seq
static int insert_seq(TermKeyTI *ti, const char *seq, struct trie_node *node)
{
  int pos = 0;
  struct trie_node *p = ti->root;

  // Unsigned because we'll be using it as an array subscript
  unsigned char b;

  while((b = seq[pos])) {
    struct trie_node *next = lookup_next(p, b);
    if(!next)
      break;
    p = next;
    pos++;
  }

  while((b = seq[pos])) {
    struct trie_node *next;
    if(seq[pos+1])
      // Intermediate node
      next = new_node_arr(0, 0xff);
    else
      // Final key node
      next = node;

    if(!next)
      return 0;

    switch(p->type) {
    case TYPE_ARR:
      {
        struct trie_node_arr *nar = (struct trie_node_arr*)p;
        if(b < nar->min || b > nar->max) {
          fprintf(stderr, "ASSERT FAIL: Trie insert at 0x%02x is outside of extent bounds (0x%02x..0x%02x)\n",
              b, nar->min, nar->max);
          abort();
        }
        nar->arr[b - nar->min] = next;
        p = next;
        break;
      }
    case TYPE_KEY:
      fprintf(stderr, "ASSERT FAIL: Tried to insert child node in TYPE_KEY\n");
      abort();
    }

    pos++;
  }

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r14
movq %rdi, %rax
xorl %ecx, %ecx
movq %rax, %r15
movq %rcx, %r13
movb (%r14,%rcx), %al
testb %al, %al
je 0x6682
movzbl %al, %esi
movq %r15, %rdi
callq 0x6807
leaq 0x1(%r13), %rcx
testq %rax, %rax
jne 0x6648
jmp 0x6682
cmpb %al, %bpl
ja 0x6703
subl %ecx, %edx
movslq %edx, %rax
movq %r12, 0x8(%r15,%rax,8)
movq %r12, %r15
movslq %r13d, %r13
movb (%r14,%r13), %bpl
testb %bpl, %bpl
je 0x6724
movb 0x1(%r14,%r13), %bl
testb %bl, %bl
je 0x66ce
movl $0x808, %edi            # imm = 0x808
callq 0x31c0
testq %rax, %rax
je 0x6724
movq %rax, %r12
movl $0x1, (%rax)
movw $0xff00, 0x4(%rax)      # imm = 0xFF00
movq %rax, %rdi
addq $0x8, %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x3130
jmp 0x66da
movq (%rsp), %rax
movq %rax, %r12
testq %rax, %rax
je 0x6724
movl (%r15), %eax
incq %r13
cmpl $0x1, %eax
je 0x66ed
movl %ebx, %ebp
testl %eax, %eax
jne 0x6689
jmp 0x6733
movzbl %bpl, %edx
movzbl 0x4(%r15), %ecx
movb 0x5(%r15), %al
cmpb %cl, %bpl
jae 0x666c
movzbl %al, %r8d
movq 0x48e2(%rip), %rax      # 0xaff0
movq (%rax), %rdi
leaq 0x1148(%rip), %rsi      # 0x7860
xorl %eax, %eax
callq 0x3190
callq 0x3080
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x335b
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: compress_trie
static struct trie_node *compress_trie(struct trie_node *n)
{
  if(!n)
    return NULL;

  switch(n->type) {
  case TYPE_KEY:
    return n;
  case TYPE_ARR:
    {
      struct trie_node_arr *nar = (struct trie_node_arr*)n;
      unsigned char min, max;
      // Find the real bounds
      for(min = 0; !nar->arr[min]; min++)
        if(min == 255 && !nar->arr[min]) {
          free(nar);
          return new_node_arr(1, 0);
        }

      for(max = 0xff; !nar->arr[max]; max--)
        ;

      struct trie_node_arr *new = (struct trie_node_arr*)new_node_arr(min, max);
      int i;
      for(i = min; i <= max; i++)
        new->arr[i - min] = compress_trie(nar->arr[i]);

      free(nar);
      return (struct trie_node*)new;
    }
  }

  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x67f8
movq %rdi, %rbx
cmpl $0x1, (%rdi)
jne 0x67fa
cmpq $0x0, 0x8(%rbx)
je 0x6761
xorl %eax, %eax
jmp 0x677b
xorl %ecx, %ecx
cmpq $0xff, %rcx
je 0x67d0
leaq 0x1(%rcx), %rax
cmpq $0x0, 0x10(%rbx,%rcx,8)
movq %rax, %rcx
je 0x6763
xorl %ecx, %ecx
decb %cl
movzbl %cl, %r14d
cmpq $0x0, 0x8(%rbx,%r14,8)
je 0x677d
movzbl %al, %r12d
movl %r12d, %edi
movl %r14d, %esi
callq 0x652e
movq %rax, %r15
cmpb %r14b, %r12b
ja 0x67c3
leaq 0x8(%r15), %r13
decq %r12
movq 0x10(%rbx,%r12,8), %rdi
callq 0x6738
movq %rax, (%r13)
incq %r12
addq $0x8, %r13
cmpq %r14, %r12
jb 0x67a9
movq %rbx, %rdi
callq 0x3050
movq %r15, %rbx
jmp 0x67fa
movq %rbx, %rdi
callq 0x3050
movl $0x8, %edi
callq 0x31c0
testq %rax, %rax
je 0x67f8
movq %rax, %rbx
movl $0x1, (%rax)
movw $0x1, 0x4(%rax)
jmp 0x67fa
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libtermkey/driver-ti.c
// Function: lookup_next
static struct trie_node *lookup_next(struct trie_node *n, unsigned char b)
{
  switch(n->type) {
  case TYPE_KEY:
    fprintf(stderr, "ABORT: lookup_next within a TYPE_KEY node\n");
    abort();
  case TYPE_ARR:
    {
      struct trie_node_arr *nar = (struct trie_node_arr*)n;
      if(b < nar->min || b > nar->max)
        return NULL;
      return nar->arr[b - nar->min];
    }
  }

  return NULL; // Never reached but keeps compiler happy
}

// Assembly:
movl (%rdi), %eax
cmpl $0x1, %eax
je 0x6818
testl %eax, %eax
jne 0x6827
pushq %rax
callq 0x337d
movzbl 0x4(%rdi), %eax
cmpb %sil, %al
ja 0x6827
cmpb %sil, 0x5(%rdi)
jae 0x682a
xorl %eax, %eax
retq
movzbl %sil, %ecx
subq %rax, %rcx
movq 0x8(%rdi,%rcx,8), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_07/find.c
// Function: main
int main(int argc, char *argv[])
{
  if (!parse_arg_list(argc, argv))
  {
    exit(EXIT_FAILURE);
  }

  if (argc - pattern_arg_pos > 1)
  {
    for (int file_arg_pos = pattern_arg_pos + 1; file_arg_pos < argc; file_arg_pos++)
    {
      FILE *file_p;
      if ((file_p = fopen(argv[file_arg_pos], "r")) == NULL)
      {
        fprintf(stderr, "%s: can't open %s.\n", program_name, argv[file_arg_pos]);
        exit(EXIT_FAILURE);
      }
      printf("%s\n", argv[file_arg_pos]);
      find_pattern(argv[pattern_arg_pos], file_p);
      fclose(file_p);

      if (file_arg_pos < argc - 1)
      {
        putc('\n', stdout);
      }
    }
  }
  else
  {
    find_pattern(argv[pattern_arg_pos], stdin);
  }

  exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
callq 0x12a5
testl %eax, %eax
jne 0x11df
movl $0x1, %edi
callq 0x10a0
movslq 0x2e8a(%rip), %rax      # 0x4070
movl %ebp, %ecx
subl %eax, %ecx
cmpl $0x2, %ecx
jl 0x1263
leaq 0x1(%rax), %r12
cmpl %ebp, %r12d
jge 0x1276
decl %ebp
movslq %ebp, %r13
movl %r13d, %ebp
subl %eax, %ebp
leaq 0xdfb(%rip), %r14       # 0x2004
movq (%rbx,%r12,8), %rdi
movq %r14, %rsi
callq 0x1090
testq %rax, %rax
je 0x127d
movq %rax, %r15
movq (%rbx,%r12,8), %rdi
callq 0x1030
movslq 0x2e43(%rip), %rax      # 0x4070
movq (%rbx,%rax,8), %rdi
movq %r15, %rsi
callq 0x1369
movq %r15, %rdi
callq 0x1040
cmpq %r13, %r12
jge 0x125a
movq 0x2d83(%rip), %rax      # 0x3fd0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x1070
incq %r12
decl %ebp
jne 0x1209
jmp 0x1276
movq (%rbx,%rax,8), %rdi
movq 0x2d6a(%rip), %rax      # 0x3fd8
movq (%rax), %rsi
callq 0x1369
xorl %edi, %edi
callq 0x10a0
movq 0x2d74(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq 0x2dfa(%rip), %rdx      # 0x4088
movq (%rbx,%r12,8), %rcx
leaq 0xd6d(%rip), %rsi       # 0x2006
xorl %eax, %eax
callq 0x1080
jmp 0x11d5
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_07/find.c
// Function: parse_arg_list
boolean parse_arg_list(int argc, char *argv[])
{
  program_name = argv[0];

  if (argc < 3)
  {
    fprintf(stderr, "Usage: %s [-xn]... PATTERN [FILE]...\n", program_name);
    return false;
  }

  while (--argc > 0 && (*++argv)[0] == '-')
  {
    int c;
    while ((c = *++argv[0]))
    {
      switch (c)
      {
      case 'x':
        except = true;
        break;

      case 'n':
        number = true;
        break;

      default:
        fprintf(stderr, "%s: illegal option %c.\n", program_name, c);
        return false;
        break;
      }
    }

    ++pattern_arg_pos;
  }

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rsi), %rdx
movq %rdx, 0x2dd5(%rip)      # 0x4088
cmpl $0x3, %edi
jl 0x134d
movl 0x2dae(%rip), %eax      # 0x4070
leaq 0x2db7(%rip), %rcx      # 0x4080
leaq 0x2db4(%rip), %r8       # 0x4084
movl $0x1, %ebx
movq 0x8(%rsi), %r10
cmpb $0x2d, (%r10)
jne 0x1343
leal -0x1(%rdi), %r9d
addq $0x8, %rsi
incq %r10
movq %r10, (%rsi)
movzbl (%r10), %r11d
cmpl $0x6e, %r11d
je 0x1302
movq %rcx, %r14
cmpl $0x78, %r11d
je 0x1305
jmp 0x130e
movq %r8, %r14
movl $0x1, (%r14)
jmp 0x12e7
testl %r11d, %r11d
jne 0x1325
incl %eax
movl %eax, 0x2d55(%rip)      # 0x4070
cmpl $0x2, %edi
movl %r9d, %edi
jg 0x12d5
jmp 0x1343
movsbl %r11b, %ecx
movq 0x2cc8(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xd06(%rip), %rsi       # 0x2040
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1080
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x2ca4(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xcbc(%rip), %rsi       # 0x201a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1080
jmp 0x1343
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_7/exercise_7_07/find.c
// Function: find_pattern
void find_pattern(char *pattern, FILE *file_p)
{
  size_t line_number = 1;
  char line[MAX_LINE_LEN];
  while (fgets(line, MAX_LINE_LEN, file_p) != NULL)
  {
    if ((strstr(line, pattern) != NULL) != except)
    {
      if (number)
      {
        printf("%ld: ", line_number);
      }
      printf("%s", line);
    }
    ++line_number;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
je 0x1402
movl $0x1, %r15d
movq %rsp, %r12
leaq 0xcb9(%rip), %r13       # 0x205e
leaq 0xcac(%rip), %rbp       # 0x2058
movq %r12, %rdi
movq %r14, %rsi
callq 0x10b0
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
cmpl %ecx, 0x2cbb(%rip)      # 0x4080
je 0x13ea
cmpl $0x0, 0x2cb6(%rip)      # 0x4084
je 0x13dd
movq %rbp, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x1050
movq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x1050
incq %r15
movq %r12, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
jne 0x13ac
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/flappy.cc
// Function: print_scores(Display&, HighScores&)
void print_scores(Display &display, HighScores &scores) {
  attron(A_BOLD);
  mvprintw(0, display.width + 4, "== High Scores ==");
  attroff(A_BOLD);
  int i = 1;
  for (auto &line : scores.top_scores()) {
    mvprintw(i, display.width + 1, "%s", line.name.c_str());
    clrtoeol();
    mvprintw(i, display.width + 24, "%d", line.score);
    i++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x829ba(%rip), %r15     # 0x89fe0
movq (%r15), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x7160
movl 0x4(%rbx), %esi
addl $0x4, %esi
leaq 0x659ee(%rip), %rdx     # 0x6d030
xorl %edi, %edi
xorl %eax, %eax
callq 0x7390
movq (%r15), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x7380
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8c52
movq (%r15), %r13
movq 0x8(%r15), %r12
cmpq %r12, %r13
je 0x76cc
movl $0x1, %ebp
leaq 0x69e6c(%rip), %r14     # 0x714ec
leaq 0x65abf(%rip), %r15     # 0x6d146
movl 0x4(%rbx), %esi
incl %esi
movq (%r13), %rcx
movl %ebp, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x7390
movq 0x8293d(%rip), %rax     # 0x89fe0
movq (%rax), %rdi
callq 0x72e0
movl 0x4(%rbx), %esi
addl $0x18, %esi
movl 0x20(%r13), %ecx
movl %ebp, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x7390
incl %ebp
addq $0x28, %r13
cmpq %r12, %r13
jne 0x7687
movq %rsp, %rdi
callq 0x79a6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x79a6
movq %rbx, %rdi
callq 0x74b0
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/flappy.cc
// Function: Display::Display(int, int)
Display(int width = 40, int height = 20) : height{height}, width{width} {
    initscr();
    start_color();
    raw();
    timeout(0);
    noecho();
    curs_set(0);
    keypad(stdscr, TRUE);
    erase();
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %edx, (%rdi)
movl %esi, 0x4(%rdi)
callq 0x7410
callq 0x7070
callq 0x70d0
movq 0x825ba(%rip), %r14     # 0x89fe0
movq (%r14), %rdi
xorl %esi, %esi
callq 0x7310
callq 0x7300
xorl %edi, %edi
callq 0x7220
movq (%r14), %rdi
movl $0x1, %esi
callq 0x7100
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7ec0
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/flappy.cc
// Function: Display::erase()
void erase() {
    ::erase();
    for (int y = 0; y < height; y++) {
      mvaddch(y, 0, '|');
      mvaddch(y, width - 1, '|');
    }
    for (int x = 0; x < width; x++) {
      mvaddch(0, x, '-');
      mvaddch(height - 1, x, '-');
    }
    mvaddch(0, 0, '/');
    mvaddch(height - 1, 0, '\\');
    mvaddch(0, width - 1, '\\');
    mvaddch(height - 1, width - 1, '/');
  }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x72f0
cmpl $0x0, (%rbx)
jle 0x7f1f
xorl %ebp, %ebp
movq 0x82106(%rip), %r14     # 0x89fe0
movq (%r14), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x72d0
cmpl $-0x1, %eax
je 0x7ef8
movq (%r14), %rdi
movl $0x7c, %esi
callq 0x70b0
movq (%r14), %rdi
movl 0x4(%rbx), %edx
decl %edx
movl %ebp, %esi
callq 0x72d0
cmpl $-0x1, %eax
je 0x7f19
movq (%r14), %rdi
movl $0x7c, %esi
callq 0x70b0
incl %ebp
cmpl (%rbx), %ebp
jl 0x7eda
cmpl $0x0, 0x4(%rbx)
jle 0x7f73
xorl %ebp, %ebp
movq 0x820b2(%rip), %r14     # 0x89fe0
movq (%r14), %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x72d0
cmpl $-0x1, %eax
je 0x7f4c
movq (%r14), %rdi
movl $0x2d, %esi
callq 0x70b0
movq (%r14), %rdi
movl (%rbx), %esi
decl %esi
movl %ebp, %edx
callq 0x72d0
cmpl $-0x1, %eax
je 0x7f6c
movq (%r14), %rdi
movl $0x2d, %esi
callq 0x70b0
incl %ebp
cmpl 0x4(%rbx), %ebp
jl 0x7f2e
movq 0x82066(%rip), %r14     # 0x89fe0
movq (%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x72d0
cmpl $-0x1, %eax
je 0x7f98
movq (%r14), %rdi
movl $0x2f, %esi
callq 0x70b0
movq (%r14), %rdi
movl (%rbx), %esi
decl %esi
xorl %edx, %edx
callq 0x72d0
cmpl $-0x1, %eax
je 0x7fb8
movq (%r14), %rdi
movl $0x5c, %esi
callq 0x70b0
movq (%r14), %rdi
movl 0x4(%rbx), %edx
decl %edx
xorl %esi, %esi
callq 0x72d0
cmpl $-0x1, %eax
je 0x7fd9
movq (%r14), %rdi
movl $0x5c, %esi
callq 0x70b0
movq (%r14), %rdi
movl (%rbx), %esi
movl 0x4(%rbx), %edx
decl %esi
decl %edx
callq 0x72d0
cmpl $-0x1, %eax
je 0x8000
movq (%r14), %rdi
movl $0x2f, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x70b0
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/flappy.cc
// Function: Bird::draw()
void draw() {
    init_pair(1, COLOR_YELLOW, COLOR_BLACK);
    attron(COLOR_PAIR(1) | A_BOLD);
    draw('@');
    attroff(COLOR_PAIR(1) | A_BOLD);
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x7050
movq 0x81ab7(%rip), %r14     # 0x89fe0
movq (%r14), %rdi
movl $0x200100, %esi         # imm = 0x200100
xorl %edx, %edx
callq 0x7160
movq %rbx, %rdi
movl $0x40, %esi
callq 0x893a
movq (%r14), %rdi
movl $0x200100, %esi         # imm = 0x200100
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x7380
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/flappy.cc
// Function: Bird::is_alive(World&)
bool is_alive(World &world) {
    if (y <= 0 || y >= display->height) {
      return false;
    }
    int wall = world.walls[display->width / 2 - 1];
    if (wall != 0) {
      return y > wall - World::kVGap && y < wall + World::kVGap;
    }
    return true;
  }

// Assembly:
movsd (%rdi), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x85b1
movq 0x10(%rdi), %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax), %xmm1
ucomisd %xmm1, %xmm0
jae 0x85b1
movl 0x4(%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movslq %ecx, %rdx
decq %rdx
movq 0x10(%rsi), %rdi
movq 0x28(%rsi), %rcx
movq %rdi, %rax
subq 0x18(%rsi), %rax
sarq $0x2, %rax
addq %rdx, %rax
js 0x85b6
cmpq $0x7f, %rax
ja 0x85bf
leaq (%rdi,%rdx,4), %rax
jmp 0x85d8
xorl %eax, %eax
andb $0x1, %al
retq
movq %rax, %rdx
sarq $0x7, %rdx
jmp 0x85c6
movq %rax, %rdx
shrq $0x7, %rdx
movq %rdx, %rsi
shlq $0x7, %rsi
subq %rsi, %rax
shlq $0x2, %rax
addq (%rcx,%rdx,8), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x8603
leal -0x2(%rax), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
addl $0x2, %eax
cvtsi2sd %eax, %xmm2
cmpltpd %xmm0, %xmm1
cmpltpd %xmm2, %xmm0
andpd %xmm1, %xmm0
movd %xmm0, %eax
jmp 0x85b3
movb $0x1, %al
jmp 0x85b3
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/flappy.cc
// Function: World::step()
void step() {
    steps++;
    if (steps % kRate == 0) {
      walls.pop_front();
      switch (steps % (kRate * kHGap)) {
        case 0:
          walls.push_back(rand_wall());
          break;
        case kRate * 1:
        case kRate * 2:
          walls.push_back(walls.back());
          break;
        default:
          walls.push_back(0);
      }
    }
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x58(%rdi), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x58(%rdi)
testb $0x1, %al
je 0x86cf
movq %rdi, %rbx
callq 0x89a2
movslq 0x58(%rbx), %rax
imulq $0x66666667, %rax, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
cmpl $0x4, %eax
je 0x8685
cmpl $0x2, %eax
je 0x8685
testl %eax, %eax
jne 0x86be
movq 0x50(%rbx), %rax
movl (%rax), %r14d
callq 0x7090
cltd
idivl %r14d
movl %edx, %eax
shrl $0x1f, %eax
addl %edx, %eax
sarl %eax
leal 0x3(%r14), %ecx
testl %r14d, %r14d
cmovnsl %r14d, %ecx
sarl $0x2, %ecx
addl %eax, %ecx
leaq 0x4(%rsp), %rsi
movl %ecx, (%rsi)
jmp 0x86c7
movq 0x30(%rbx), %rax
movq %rax, %rsi
cmpq 0x38(%rbx), %rax
jne 0x869f
movq 0x48(%rbx), %rcx
movl $0x200, %esi            # imm = 0x200
addq -0x8(%rcx), %rsi
addq $-0x4, %rsi
movq 0x40(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x86d7
movl (%rsi), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x30(%rbx)
jmp 0x86cf
movq %rsp, %rsi
movl $0x0, (%rsi)
movq %rbx, %rdi
callq 0x820a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x89f0
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/highscores.cc
// Function: HighScores::HighScores(char const*, int)
HighScores::HighScores(const char *file, int size) {
  size_ = size;
  sqlite3_initialize();
  int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
  sqlite3_open_v2(file, &db, flags, nullptr);

  REGISTER(timeout);
  sqlite3_step(stmt_timeout);
  sqlite3_finalize(stmt_timeout);

  REGISTER(table);
  sqlite3_step(stmt_table);
  sqlite3_finalize(stmt_table);

  REGISTER(top);
  sqlite3_bind_int(stmt_top, 1, size);
  REGISTER(place);
  REGISTER(insert);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, (%rdi)
callq 0x9c60
leaq 0x8(%rbx), %rsi
movq %r14, %rdi
movl $0x6, %edx
xorl %ecx, %ecx
callq 0x172c4
movq 0x8(%rbx), %rdi
leaq 0x18(%rbx), %rcx
leaq 0x6465c(%rip), %rsi     # 0x6d149
movl $0x1b, %edx
xorl %r8d, %r8d
callq 0x132b5
movq 0x18(%rbx), %rdi
callq 0xf9ab
movq 0x18(%rbx), %rdi
callq 0xeed1
movq 0x8(%rbx), %rdi
leaq 0x10(%rbx), %rcx
leaq 0x6464a(%rip), %rsi     # 0x6d165
movl $0x3e, %edx
xorl %r8d, %r8d
callq 0x132b5
movq 0x10(%rbx), %rdi
callq 0xf9ab
movq 0x10(%rbx), %rdi
callq 0xeed1
movq 0x8(%rbx), %rdi
leaq 0x20(%rbx), %rcx
leaq 0x6465b(%rip), %rsi     # 0x6d1a4
movl $0x3a, %edx
xorl %r8d, %r8d
callq 0x132b5
movq 0x20(%rbx), %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x11099
movq 0x8(%rbx), %rdi
leaq 0x28(%rbx), %rcx
leaq 0x6466a(%rip), %rsi     # 0x6d1df
movl $0x2c, %edx
xorl %r8d, %r8d
callq 0x132b5
movq 0x8(%rbx), %rdi
addq $0x30, %rbx
leaq 0x6467b(%rip), %rsi     # 0x6d20c
movl $0x20, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %rbp
jmp 0x132b5
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/highscores.cc
// Function: HighScores::is_best(int)
bool HighScores::is_best(int score) {
  sqlite3_bind_int(stmt_place, 1, score);
  sqlite3_step(stmt_place);
  int count = sqlite3_column_int(stmt_place, 0);
  sqlite3_reset(stmt_place);
  return count < size_;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %edx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movl $0x1, %esi
callq 0x11099
movq 0x28(%rbx), %rdi
callq 0xf9ab
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x10b21
movl %eax, %ebp
movq 0x28(%rbx), %rdi
callq 0xefd9
cmpl (%rbx), %ebp
setl %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/highscores.cc
// Function: HighScores::insert_score(char const*, int)
void HighScores::insert_score(const char *name, int score) {
  sqlite3_bind_text(stmt_insert, 1, name, -1, SQLITE_TRANSIENT);
  sqlite3_bind_int(stmt_insert, 2, score);
  sqlite3_step(stmt_insert);
  sqlite3_reset(stmt_insert);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %rdx
movq %rdi, %r14
movq 0x30(%rdi), %rdi
movl $0x1, %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq $-0x1, %r8
callq 0x11135
movq 0x30(%r14), %rdi
movl $0x2, %esi
movl %ebx, %edx
callq 0x11099
movq 0x30(%r14), %rdi
callq 0xf9ab
movq 0x30(%r14), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xefd9
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/highscores.cc
// Function: HighScores::top_scores()
std::vector<listing> HighScores::top_scores() {
  std::vector<listing> scores;
  sqlite3_bind_int(stmt_top, 1, size_);
  while (sqlite3_step(stmt_top) == SQLITE_ROW) {
    listing line;
    const char *name = (const char *)sqlite3_column_text(stmt_top, 0);
    size_t length = sqlite3_column_bytes(stmt_top, 0);
    line.name = std::string{name, length};
    line.score = sqlite3_column_int(stmt_top, 1);
    scores.push_back(line);
  }
  sqlite3_reset(stmt_top);
  return scores;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %rdi, 0x8(%rsp)
movq $0x0, 0x10(%rdi)
movq 0x20(%rsi), %rdi
movl (%rsi), %edx
movl $0x1, %esi
callq 0x11099
leaq 0x20(%rsp), %rbp
leaq 0x48(%rsp), %rbx
leaq 0x38(%rsp), %r15
leaq 0x10(%rsp), %r12
movq 0x20(%r14), %rdi
callq 0xf9ab
cmpl $0x64, %eax
jne 0x8d4f
movq %rbp, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0x10b75
movq %rax, %r13
movq 0x20(%r14), %rdi
xorl %esi, %esi
callq 0x10a9c
movslq %eax, %rdx
movq %rbx, 0x38(%rsp)
addq %r13, %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x8df8
movq %r12, %rdi
movq %r15, %rsi
callq 0x7370
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x8d10
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x72b0
movq 0x20(%r14), %rdi
movl $0x1, %esi
callq 0x10b21
movl %eax, 0x30(%rsp)
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x8da4
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8c9a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72b0
jmp 0x8c9a
movq 0x20(%r14), %rdi
callq 0xefd9
movq 0x8(%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8d72
jmp 0x8d77
jmp 0x8d77
movq %rax, %r14
jmp 0x8d91
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8d91
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72b0
movq 0x8(%rsp), %rdi
callq 0x79a6
movq %r14, %rdi
callq 0x74b0
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3BtreeEnterAll
SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
  int i;
  Btree *p;
  assert( sqlite3_mutex_held(db->mutex) );
  for(i=0; i<db->nDb; i++){
    p = db->aDb[i].pBt;
    if( p ) sqlite3BtreeEnter(p);
  }
}

// Assembly:
movl 0x28(%rdi), %eax
testl %eax, %eax
jle 0x9740
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rcx
movq (%rcx,%r14), %rdi
testq %rdi, %rdi
je 0x972c
callq 0xd3a2
movl 0x28(%rbx), %eax
incq %r15
movslq %eax, %rcx
addq $0x20, %r14
cmpq %rcx, %r15
jl 0x9717
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3BtreeLeaveAll
SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
  int i;
  Btree *p;
  assert( sqlite3_mutex_held(db->mutex) );
  for(i=0; i<db->nDb; i++){
    p = db->aDb[i].pBt;
    if( p ) sqlite3BtreeLeave(p);
  }
}

// Assembly:
movl 0x28(%rdi), %eax
testl %eax, %eax
jle 0x97af
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x8, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rcx
movq (%rcx,%r14), %r12
testq %r12, %r12
je 0x9795
cmpb $0x0, 0x11(%r12)
je 0x9795
decl 0x14(%r12)
jne 0x9795
movq 0x8(%r12), %rcx
movq 0x50(%rcx), %rdi
testq %rdi, %rdi
je 0x978f
callq *0x80b9c(%rip)          # 0x8a328
movl 0x28(%rbx), %eax
movb $0x0, 0x12(%r12)
incq %r15
movslq %eax, %rcx
addq $0x20, %r14
cmpq %rcx, %r15
jl 0x975c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3MemoryAlarm
static int sqlite3MemoryAlarm(
  void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
  void *pArg,
  sqlite3_int64 iThreshold
){
  int nUsed;
  sqlite3_mutex_enter(mem0.mutex);
  mem0.alarmCallback = xCallback;
  mem0.alarmArg = pArg;
  mem0.alarmThreshold = iThreshold;
  nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
  mem0.nearlyFull = (iThreshold>0 && iThreshold<=nUsed);
  sqlite3_mutex_leave(mem0.mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x81a3b(%rip), %rdi     # 0x8bd08
testq %rdi, %rdi
je 0xa2e1
callq *0x80040(%rip)          # 0x8a318
movq 0x81a29(%rip), %rdi     # 0x8bd08
jmp 0xa2e3
xorl %edi, %edi
movq %r15, 0x81a2e(%rip)     # 0x8bd18
movq %r14, 0x81a2f(%rip)     # 0x8bd20
movq %rbx, 0x81a18(%rip)     # 0x8bd10
testq %rbx, %rbx
setg %al
movslq 0x819ab(%rip), %rcx     # 0x8bcb0
cmpq %rbx, %rcx
setge %cl
andb %al, %cl
movzbl %cl, %eax
movl %eax, 0x81a26(%rip)     # 0x8bd3c
testq %rdi, %rdi
je 0xa326
popq %rbx
popq %r14
popq %r15
jmpq *0x80002(%rip)          # 0x8a328
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: unixDlError
static void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut){
  const char *zErr;
  UNUSED_PARAMETER(NotUsed);
  unixEnterMutex();
  zErr = dlerror();
  if( zErr ){
    sqlite3_snprintf(nBuf, zBufOut, "%s", zErr);
  }
  unixLeaveMutex();
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
cmpl $0x0, 0x7db9b(%rip)     # 0x8a294
je 0xc714
movl $0x2, %edi
callq *0x7dc02(%rip)          # 0x8a308
testq %rax, %rax
je 0xc714
movq %rax, %rdi
callq *0x7dc04(%rip)          # 0x8a318
callq 0x7280
testq %rax, %rax
je 0xc734
leaq 0x64dc7(%rip), %rdx     # 0x714ec
movl %ebp, %edi
movq %rbx, %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0xb9ed
cmpl $0x0, 0x7db59(%rip)     # 0x8a294
je 0xc75c
movl $0x2, %edi
callq *0x7dbc0(%rip)          # 0x8a308
testq %rax, %rax
je 0xc75c
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *0x7dbcc(%rip)          # 0x8a328
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3BtreeGetMeta
SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
  BtShared *pBt = p->pBt;

  sqlite3BtreeEnter(p);
  assert( p->inTrans>TRANS_NONE );
  assert( SQLITE_OK==querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK) );
  assert( pBt->pPage1 );
  assert( idx>=0 && idx<=15 );

  *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);

  /* If auto-vacuum is disabled in this build and this is an auto-vacuum
  ** database, mark the database as read-only.  */
#ifdef SQLITE_OMIT_AUTOVACUUM
  if( idx==BTREE_LARGEST_ROOT_PAGE && *pMeta>0 ){
    pBt->btsFlags |= BTS_READ_ONLY;
  }
#endif

  sqlite3BtreeLeave(p);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r15
callq 0xd3a2
movq 0x18(%r15), %rax
movq 0x50(%rax), %rax
movslq %ebp, %rcx
movl 0x24(%rax,%rcx,4), %eax
bswapl %eax
movl %eax, (%r14)
cmpb $0x0, 0x11(%rbx)
je 0xdc38
decl 0x14(%rbx)
jne 0xdc38
movq 0x8(%rbx), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0xdc34
callq *0x7c6f4(%rip)          # 0x8a328
movb $0x0, 0x12(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: columnMallocFailure
static void columnMallocFailure(sqlite3_stmt *pStmt)
{
  /* If malloc() failed during an encoding conversion within an
  ** sqlite3_column_XXX API, then set the return code of the statement to
  ** SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR
  ** and _finalize() will return NOMEM.
  */
  Vdbe *p = (Vdbe *)pStmt;
  if( p ){
    p->rc = sqlite3ApiExit(p->db, p->rc);
    sqlite3_mutex_leave(p->db->mutex);
  }
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x10a9a
movq %rdi, %rbx
movq (%rdi), %rdi
movl 0x94(%rbx), %esi
callq 0xef8a
movl %eax, 0x94(%rbx)
movq (%rbx), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x10a9a
popq %rbx
jmpq *0x7988e(%rip)          # 0x8a328
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]flappy/sqlite3.c
// Function: sqlite3_bind_null
SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
  int rc;
  Vdbe *p = (Vdbe*)pStmt;
  rc = vdbeUnbind(p, i);
  if( rc==SQLITE_OK ){
    sqlite3_mutex_leave(p->db->mutex);
  }
  return rc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x10efa
movl %eax, %ebx
testl %eax, %eax
jne 0x1112b
movq (%r14), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x1112b
callq *0x791fd(%rip)          # 0x8a328
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq