LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: putglyph
static int putglyph(VTermGlyphInfo *info, VTermPos pos, void *user)
{
  VTermScreen *screen = user;
  ScreenCell *cell = getcell(screen, pos.row, pos.col);

  if(!cell)
    return 0;

  int i;
  for(i = 0; i < VTERM_MAX_CHARS_PER_CELL && info->chars[i]; i++) {
    cell->chars[i] = info->chars[i];
    cell->pen = screen->pen;
  }
  if(i < VTERM_MAX_CHARS_PER_CELL)
    cell->chars[i] = 0;

  for(int col = 1; col < info->width; col++)
    getcell(screen, pos.row, pos.col + col)->chars[0] = (uint32_t)-1;

  VTermRect rect = {
    .start_row = pos.row,
    .end_row   = pos.row+1,
    .start_col = pos.col,
    .end_col   = pos.col+info->width,
  };

  cell->pen.protected_cell = info->protected_cell;
  cell->pen.dwl            = info->dwl;
  cell->pen.dhl            = info->dhl;

  damagerect(screen, rect);

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movq %rsi, %r12
shrq $0x20, %r12
movq %rdx, %rdi
movl %r12d, %edx
callq 0x42cb
testq %rax, %rax
je 0x49c5
movq %rax, %r15
addq $0x18, %rax
leaq 0x80(%rbx), %rdx
xorl %ecx, %ecx
cmpq $0x6, %rcx
je 0x49d1
movq (%r14), %rsi
movl (%rsi,%rcx,4), %esi
testl %esi, %esi
je 0x49cc
movl %esi, (%r15,%rcx,4)
movl 0x8(%rdx), %esi
movl %esi, 0x8(%rax)
movq (%rdx), %rsi
movq %rsi, (%rax)
incq %rcx
jmp 0x49a0
xorl %eax, %eax
jmp 0x4a64
andl $0x0, (%r15,%rcx,4)
pushq $0x1
popq %rbp
movl 0x8(%r14), %edx
cmpl %edx, %ebp
jge 0x49f2
leal (%r12,%rbp), %edx
movq %rbx, %rdi
movl %r13d, %esi
callq 0x42cb
orl $-0x1, (%rax)
incl %ebp
jmp 0x49d4
movl %r13d, %eax
shlq $0x20, %r13
orq %rax, %r13
movabsq $0x100000000, %rsi      # imm = 0x100000000
addq %r13, %rsi
addl %r12d, %edx
shlq $0x20, %rdx
orq %r12, %rdx
movzbl 0xc(%r14), %eax
andl $0x1, %eax
shll $0xf, %eax
movl $0xffff7fff, %ecx       # imm = 0xFFFF7FFF
andl 0x20(%r15), %ecx
orl %eax, %ecx
movl %ecx, 0x20(%r15)
movl 0xc(%r14), %eax
andl $0x2, %eax
shll $0xf, %eax
andl $0xfffeffff, %ecx       # imm = 0xFFFEFFFF
orl %eax, %ecx
movl %ecx, 0x20(%r15)
movl 0xc(%r14), %eax
andl $0xc, %eax
shll $0xf, %eax
andl $0xfff9ffff, %ecx       # imm = 0xFFF9FFFF
orl %eax, %ecx
movl %ecx, 0x20(%r15)
movq %rbx, %rdi
callq 0x5178
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: setpenattr
static int setpenattr(VTermAttr attr, VTermValue *val, void *user)
{
  VTermScreen *screen = user;

  switch(attr) {
  case VTERM_ATTR_BOLD:
    screen->pen.bold = val->boolean;
    return 1;
  case VTERM_ATTR_UNDERLINE:
    screen->pen.underline = val->number;
    return 1;
  case VTERM_ATTR_ITALIC:
    screen->pen.italic = val->boolean;
    return 1;
  case VTERM_ATTR_BLINK:
    screen->pen.blink = val->boolean;
    return 1;
  case VTERM_ATTR_REVERSE:
    screen->pen.reverse = val->boolean;
    return 1;
  case VTERM_ATTR_CONCEAL:
    screen->pen.conceal = val->boolean;
    return 1;
  case VTERM_ATTR_STRIKE:
    screen->pen.strike = val->boolean;
    return 1;
  case VTERM_ATTR_FONT:
    screen->pen.font = val->number;
    return 1;
  case VTERM_ATTR_FOREGROUND:
    screen->pen.fg = val->color;
    return 1;
  case VTERM_ATTR_BACKGROUND:
    screen->pen.bg = val->color;
    return 1;
  case VTERM_ATTR_SMALL:
    screen->pen.small = val->boolean;
    return 1;
  case VTERM_ATTR_BASELINE:
    screen->pen.baseline = val->number;
    return 1;

  case VTERM_N_ATTRS:
    return 0;
  }

  return 0;
}

// Assembly:
decl %edi
cmpl $0xb, %edi
ja 0x4e07
leaq 0x590d(%rip), %rax      # 0xa618
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl (%rsi), %eax
movl 0x88(%rdx), %ecx
andl $0x1, %eax
andl $-0x2, %ecx
jmp 0x4df1
movl (%rsi), %eax
andl $0x3, %eax
movl $0xffff9fff, %ecx       # imm = 0xFFFF9FFF
andl 0x88(%rdx), %ecx
shll $0xd, %eax
jmp 0x4df1
movl (%rsi), %eax
movl 0x88(%rdx), %ecx
shll $0x5, %eax
andl $0x20, %eax
andl $-0x21, %ecx
jmp 0x4df1
movl (%rsi), %eax
movl %eax, 0x84(%rdx)
jmp 0x4df9
movl (%rsi), %eax
movl 0x88(%rdx), %ecx
andl $0x1, %eax
andl $-0x9, %ecx
leal (%rcx,%rax,8), %eax
jmp 0x4dae
movl (%rsi), %eax
movl 0x88(%rdx), %ecx
shll $0x4, %eax
andl $0x10, %eax
andl $-0x11, %ecx
jmp 0x4df1
movl (%rsi), %eax
andl $0xf, %eax
movl $0xfffff0ff, %ecx       # imm = 0xFFFFF0FF
andl 0x88(%rdx), %ecx
shll $0x8, %eax
jmp 0x4df1
movl (%rsi), %eax
movl 0x88(%rdx), %ecx
andl $0x3, %eax
andl $-0x7, %ecx
leal (%rcx,%rax,2), %eax
movl %eax, 0x88(%rdx)
jmp 0x4df9
movl (%rsi), %eax
movl 0x88(%rdx), %ecx
shll $0x6, %eax
andl $0x40, %eax
andl $-0x41, %ecx
jmp 0x4df1
movl (%rsi), %eax
shll $0x7, %eax
movl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
andl 0x88(%rdx), %ecx
movzbl %al, %eax
jmp 0x4df1
movl (%rsi), %eax
andl $0x1, %eax
movl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
andl 0x88(%rdx), %ecx
shll $0xc, %eax
orl %eax, %ecx
movl %ecx, 0x88(%rdx)
pushq $0x1
popq %rax
retq
movl (%rsi), %eax
movl %eax, 0x80(%rdx)
jmp 0x4df9
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: settermprop
static int settermprop(VTermProp prop, VTermValue *val, void *user)
{
  VTermScreen *screen = user;

  switch(prop) {
  case VTERM_PROP_ALTSCREEN:
    if(val->boolean && !screen->buffers[BUFIDX_ALTSCREEN])
      return 0;

    screen->buffer = val->boolean ? screen->buffers[BUFIDX_ALTSCREEN] : screen->buffers[BUFIDX_PRIMARY];
    /* only send a damage event on disable; because during enable there's an
     * erase that sends a damage anyway
     */
    if(!val->boolean)
      damagescreen(screen);
    break;
  case VTERM_PROP_REVERSE:
    screen->global_reverse = val->boolean;
    damagescreen(screen);
    break;
  default:
    ; /* ignore */
  }

  if(screen->callbacks && screen->callbacks->settermprop)
    return (*screen->callbacks->settermprop)(prop, val, screen->cbdata);

  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x6, %edi
je 0x4e32
cmpl $0x3, %ebp
jne 0x4e5a
cmpl $0x0, (%rbx)
je 0x4e45
movq 0x68(%r14), %rax
testq %rax, %rax
jne 0x4e49
xorl %eax, %eax
jmp 0x4e7e
movb (%rbx), %al
movb 0x58(%r14), %cl
andb $0x1, %al
andb $-0x2, %cl
orb %al, %cl
movb %cl, 0x58(%r14)
jmp 0x4e52
movq 0x60(%r14), %rax
movq %rax, 0x70(%r14)
cmpl $0x0, (%rbx)
jne 0x4e5a
movq %r14, %rdi
callq 0x53ce
movq 0x10(%r14), %rcx
pushq $0x1
popq %rax
testq %rcx, %rcx
je 0x4e7e
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x4e7e
movq 0x18(%r14), %rdx
movl %ebp, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmpq *%rcx
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: setlineinfo
static int setlineinfo(int row, const VTermLineInfo *newinfo, const VTermLineInfo *oldinfo, void *user)
{
  VTermScreen *screen = user;

  if(newinfo->doublewidth != oldinfo->doublewidth ||
     newinfo->doubleheight != oldinfo->doubleheight) {
    for(int col = 0; col < screen->cols; col++) {
      ScreenCell *cell = getcell(screen, row, col);
      cell->pen.dwl = newinfo->doublewidth;
      cell->pen.dhl = newinfo->doubleheight;
    }

    VTermRect rect = {
      .start_row = row,
      .end_row   = row + 1,
      .start_col = 0,
      .end_col   = newinfo->doublewidth ? screen->cols / 2 : screen->cols,
    };
    damagerect(screen, rect);

    if(newinfo->doublewidth) {
      rect.start_col = screen->cols / 2;
      rect.end_col   = screen->cols;

      erase_internal(rect, 0, user);
    }
  }

  return 1;
}

// Assembly:
movb (%rdx), %al
xorb (%rsi), %al
testb $0x7, %al
je 0x50be
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r15
movl %edi, %r14d
xorl %ebp, %ebp
movl $0xfffeffff, %r12d      # imm = 0xFFFEFFFF
movl 0x54(%rbx), %ecx
cmpl %ecx, %ebp
jge 0x5066
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x42cb
movzbl (%r15), %ecx
andl $0x1, %ecx
shll $0x10, %ecx
movl 0x20(%rax), %edx
andl %r12d, %edx
orl %ecx, %edx
movl %edx, 0x20(%rax)
movl (%r15), %ecx
andl $0x6, %ecx
shll $0x10, %ecx
andl $0xfff9ffff, %edx       # imm = 0xFFF9FFFF
orl %ecx, %edx
movl %edx, 0x20(%rax)
incl %ebp
jmp 0x5025
movl %r14d, %eax
incl %r14d
shlq $0x20, %r14
orq %rax, %r14
pushq $0x2
popq %rbp
movl %ecx, %eax
cltd
idivl %ebp
testb $0x1, (%r15)
cmovnel %eax, %ecx
shlq $0x20, %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x5178
testb $0x1, (%r15)
je 0x50b6
movl 0x54(%rbx), %esi
movl %esi, %eax
cltd
idivl %ebp
shlq $0x20, %rsi
orq %rax, %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x5305
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: premove
static int premove(VTermRect rect, void *user)
{
  VTermScreen *screen = user;

  if(((screen->callbacks && screen->callbacks->sb_pushline) ||
        (screen->callbacks_has_pushline4 && screen->callbacks && screen->callbacks->sb_pushline4)) &&
     rect.start_row == 0 && rect.start_col == 0 &&        // starts top-left corner
     rect.end_col == screen->cols &&                      // full width
     screen->buffer == screen->buffers[BUFIDX_PRIMARY]) { // not altscreen
    for(int row = 0; row < rect.end_row; row++) {
      const VTermLineInfo *lineinfo = vterm_state_get_lineinfo(screen->state, row);
      sb_pushline_from_row(screen, row, lineinfo->continuation);
    }
  }

  return 1;
}

// Assembly:
movq 0x10(%rdx), %rax
testq %rax, %rax
je 0x513f
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
cmpq $0x0, 0x30(%rax)
je 0x510c
testl %r14d, %r14d
jne 0x513b
jmp 0x5124
cmpb $0x1, 0x20(%rbx)
jne 0x513b
cmpq $0x0, 0x48(%rax)
setne %al
testl %r14d, %r14d
sete %cl
testb %cl, %al
je 0x513b
testl %esi, %esi
jne 0x513b
shrq $0x20, %rsi
cmpl %esi, 0x54(%rbx)
jne 0x513b
movq 0x70(%rbx), %rax
cmpq 0x60(%rbx), %rax
je 0x5143
popq %rbx
popq %r14
popq %rbp
pushq $0x1
popq %rax
retq
shrq $0x20, %r14
xorl %ebp, %ebp
testl %r14d, %r14d
cmovlel %ebp, %r14d
cmpl %ebp, %r14d
je 0x513b
movq 0x8(%rbx), %rdi
movl %ebp, %esi
callq 0x2090
movb (%rax), %al
andb $0x8, %al
shrb $0x3, %al
movzbl %al, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5d51
incl %ebp
jmp 0x5150
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: damagerect
static void damagerect(VTermScreen *screen, VTermRect rect)
{
  VTermRect emit;

  switch(screen->damage_merge) {
  case VTERM_DAMAGE_CELL:
    /* Always emit damage event */
    emit = rect;
    break;

  case VTERM_DAMAGE_ROW:
    /* Emit damage longer than one row. Try to merge with existing damage in
     * the same row */
    if(rect.end_row > rect.start_row + 1) {
      // Bigger than 1 line - flush existing, emit this
      vterm_screen_flush_damage(screen);
      emit = rect;
    }
    else if(screen->damaged.start_row == -1) {
      // None stored yet
      screen->damaged = rect;
      return;
    }
    else if(rect.start_row == screen->damaged.start_row) {
      // Merge with the stored line
      if(screen->damaged.start_col > rect.start_col)
        screen->damaged.start_col = rect.start_col;
      if(screen->damaged.end_col < rect.end_col)
        screen->damaged.end_col = rect.end_col;
      return;
    }
    else {
      // Emit the currently stored line, store a new one
      emit = screen->damaged;
      screen->damaged = rect;
    }
    break;

  case VTERM_DAMAGE_SCREEN:
  case VTERM_DAMAGE_SCROLL:
    /* Never emit damage event */
    if(screen->damaged.start_row == -1)
      screen->damaged = rect;
    else {
      rect_expand(&screen->damaged, &rect);
    }
    return;

  default:
    DEBUG_LOG("TODO: Maybe merge damage for level %d\n", screen->damage_merge);
    return;
  }

  if(screen->callbacks && screen->callbacks->damage)
    (*screen->callbacks->damage)(emit, screen->cbdata);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rax
shrq $0x20, %rax
movl 0x24(%rdi), %ecx
leal -0x2(%rcx), %edx
cmpl $0x2, %edx
jb 0x51bb
testl %ecx, %ecx
je 0x522b
cmpl $0x1, %ecx
jne 0x524d
leal 0x1(%r15), %ecx
cmpl %eax, %ecx
jge 0x51f1
movq %r14, %rdi
callq 0x2040
jmp 0x522b
movl 0x28(%r14), %ecx
cmpl $-0x1, %ecx
je 0x520b
cmpl %r15d, %ecx
jle 0x51cd
movl %r15d, 0x28(%r14)
cmpl %ebx, 0x30(%r14)
jle 0x51d7
movl %ebx, 0x30(%r14)
cmpl %eax, 0x2c(%r14)
jge 0x51e1
movl %eax, 0x2c(%r14)
shrq $0x20, %rbx
cmpl %ebx, 0x34(%r14)
jge 0x524d
movl %ebx, 0x34(%r14)
jmp 0x524d
movl 0x28(%r14), %eax
cmpl $-0x1, %eax
je 0x520b
cmpl %r15d, %eax
jne 0x5215
cmpl %ebx, 0x30(%r14)
jle 0x51e1
movl %ebx, 0x30(%r14)
jmp 0x51e1
movq %r15, 0x28(%r14)
movq %rbx, 0x30(%r14)
jmp 0x524d
movq 0x28(%r14), %rax
movq 0x30(%r14), %rcx
movq %r15, 0x28(%r14)
movq %rbx, 0x30(%r14)
movq %rcx, %rbx
movq %rax, %r15
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x524d
movq (%rax), %rax
testq %rax, %rax
je 0x524d
movq 0x18(%r14), %rdx
movq %r15, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: moverect_internal
static int moverect_internal(VTermRect dest, VTermRect src, void *user)
{
  VTermScreen *screen = user;

  int cols = src.end_col - src.start_col;
  int downward = src.start_row - dest.start_row;

  int init_row, test_row, inc_row;
  if(downward < 0) {
    init_row = dest.end_row - 1;
    test_row = dest.start_row - 1;
    inc_row  = -1;
  }
  else {
    init_row = dest.start_row;
    test_row = dest.end_row;
    inc_row  = +1;
  }

  for(int row = init_row; row != test_row; row += inc_row)
    memmove(getcell(screen, row, dest.start_col),
            getcell(screen, row + downward, src.start_col),
            cols * sizeof(ScreenCell));

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rdi, %rax
shrq $0x20, %rax
subl %edi, %edx
leal -0x1(%rax), %r12d
leal -0x1(%rdi), %r8d
testl %edx, %edx
cmovnsl %edi, %r12d
cmovnsl %eax, %r8d
movl %r8d, 0x4(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movl %edx, %r15d
sarl $0x1f, %r15d
orl $0x1, %r15d
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rcx, %r13
imulq %rcx, %rax
sarq $0x20, %rax
imulq $0x24, %rax, %rbp
cmpl %r12d, 0x4(%rsp)
je 0x52f3
movq %rbx, %rdi
movl %r12d, %esi
movq 0x8(%rsp), %rdx
callq 0x42cb
movq %rax, %r14
movq 0x10(%rsp), %rax
leal (%rax,%r12), %esi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x42cb
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x2190
addl %r15d, %r12d
jmp 0x52b2
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: erase_internal
static int erase_internal(VTermRect rect, int selective, void *user)
{
  VTermScreen *screen = user;

  for(int row = rect.start_row; row < screen->state->rows && row < rect.end_row; row++) {
    const VTermLineInfo *info = vterm_state_get_lineinfo(screen->state, row);

    for(int col = rect.start_col; col < rect.end_col; col++) {
      ScreenCell *cell = getcell(screen, row, col);

      if(selective && cell->pen.protected_cell)
        continue;

      cell->chars[0] = 0;
      cell->pen = (ScreenPen){
        /* Only copy .fg and .bg; leave things like rv in reset state */
        .fg = screen->pen.fg,
        .bg = screen->pen.bg,
      };
      cell->pen.dwl = info->doublewidth;
      cell->pen.dhl = info->doubleheight;
    }
  }

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, 0x4(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq %rdi, %rax
shrq $0x20, %rax
movq %rax, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
shrq $0x20, %r14
movq 0x8(%rbx), %rdi
cmpl 0x30(%rdi), %r15d
jge 0x53bc
cmpl 0x10(%rsp), %r15d
jge 0x53bc
movl %r15d, %esi
callq 0x2090
movq %rax, %r12
movq 0x8(%rsp), %rax
movl %eax, %r13d
cmpl %r14d, %r13d
jge 0x53b4
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x42cb
cmpl $0x0, 0x4(%rsp)
je 0x5379
testb $-0x80, 0x21(%rax)
jne 0x53af
andl $0x0, (%rax)
movq 0x80(%rbx), %rcx
andl $0xfff80000, %ebp       # imm = 0xFFF80000
movq %rcx, 0x18(%rax)
movl %ebp, 0x20(%rax)
movzbl (%r12), %ecx
andl $0x1, %ecx
shll $0x10, %ecx
orl %ebp, %ecx
movl %ecx, 0x20(%rax)
movl (%r12), %edx
andl $0x6, %edx
shll $0x10, %edx
orl %ecx, %edx
movl %edx, 0x20(%rax)
incl %r13d
jmp 0x5359
incl %r15d
jmp 0x5335
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/screen.c
// Function: sb_pushline_from_row
static void sb_pushline_from_row(VTermScreen *screen, int row, bool continuation)
{
  VTermPos pos = { .row = row };
  for(pos.col = 0; pos.col < screen->cols; pos.col++)
    vterm_screen_get_cell(screen, pos, screen->sb_buffer + pos.col);

  if(screen->callbacks_has_pushline4 && screen->callbacks->sb_pushline4)
    (screen->callbacks->sb_pushline4)(screen->cols, screen->sb_buffer, continuation, screen->cbdata);
  else
    (screen->callbacks->sb_pushline)(screen->cols, screen->sb_buffer, screen->cbdata);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movl %esi, %r14d
xorl %r15d, %r15d
movabsq $0x100000000, %r12      # imm = 0x100000000
xorl %r13d, %r13d
movslq 0x54(%rbx), %rdi
cmpq %rdi, %r13
jge 0x5d9b
movq 0x78(%rbx), %rdx
addq %r15, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21f0
incq %r13
addq $0x28, %r15
addq %r12, %r14
jmp 0x5d74
movq 0x10(%rbx), %rcx
cmpb $0x1, 0x20(%rbx)
jne 0x5dca
movq 0x48(%rcx), %rax
testq %rax, %rax
je 0x5dca
movq 0x18(%rbx), %rcx
movq 0x78(%rbx), %rsi
movzbl %bpl, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq 0x30(%rcx), %rax
movq 0x18(%rbx), %rdx
movq 0x78(%rbx), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: vterm_state_free
INTERNAL void vterm_state_free(VTermState *state)
{
  vterm_allocator_free(state->vt, state->tabstops);
  vterm_allocator_free(state->vt, state->lineinfos[BUFIDX_PRIMARY]);
  if(state->lineinfos[BUFIDX_ALTSCREEN])
    vterm_allocator_free(state->vt, state->lineinfos[BUFIDX_ALTSCREEN]);
  vterm_allocator_free(state->vt, state->combine_chars);
  vterm_allocator_free(state->vt, state);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x58(%rbx), %rsi
callq 0x9663
movq (%rbx), %rdi
movq 0x60(%rbx), %rsi
callq 0x9663
movq 0x68(%rbx), %rsi
testq %rsi, %rsi
je 0x5e15
movq (%rbx), %rdi
callq 0x9663
movq (%rbx), %rdi
movq 0x90(%rbx), %rsi
callq 0x9663
movq (%rbx), %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x9663
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: vterm_obtain_state
VTermState *vterm_obtain_state(VTerm *vt)
{
  if(vt->state)
    return vt->state;

  VTermState *state = vterm_state_new(vt);
  vt->state = state;

  vterm_parser_set_callbacks(vt, &parser_callbacks, state);

  return state;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x128(%rdi), %r14
testq %r14, %r14
jne 0x5f4b
movq %rdi, %rbx
movl $0x1d8, %esi            # imm = 0x1D8
callq 0x95f8
movq %rax, %r14
movq %rbx, (%rax)
movq 0x10(%rbx), %rax
movq %rax, 0x30(%r14)
andq $0x0, 0x78(%r14)
andl $0x0, 0x80(%r14)
andl $0x0, 0x88(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movb $0x0, 0x18(%r14)
movups %xmm0, 0x1b8(%r14)
andq $0x0, 0x1c8(%r14)
movq %r14, %rdi
callq 0x332c
andl $0x0, 0x188(%r14)
movq $0x10, 0x98(%r14)
movq (%r14), %rdi
pushq $0x40
popq %rsi
callq 0x95f8
movq %rax, 0x90(%r14)
movq (%r14), %rdi
movl 0x34(%r14), %eax
addl $0x7, %eax
pushq $0x8
popq %rcx
cltd
idivl %ecx
movslq %eax, %rsi
callq 0x95f8
movq %rax, 0x58(%r14)
movq (%r14), %rdi
movslq 0x30(%r14), %rsi
shlq $0x2, %rsi
callq 0x95f8
movq %rax, 0x60(%r14)
movq (%r14), %rdi
movslq 0x30(%r14), %rsi
shlq $0x2, %rsi
callq 0x95f8
movq %rax, 0x68(%r14)
movq 0x60(%r14), %rax
movq %rax, 0x70(%r14)
pushq $0x75
popq %rsi
xorl %edi, %edi
callq 0x2130
movq %rax, 0x110(%r14)
movq (%rax), %rcx
testq %rcx, %rcx
je 0x5f32
movq %r14, %rsi
addq $0x118, %rsi            # imm = 0x118
movq %rax, %rdi
callq *%rcx
movq %r14, 0x128(%rbx)
leaq 0x8e70(%rip), %rsi      # 0xedb0
movq %rbx, %rdi
movq %r14, %rdx
callq 0x20d0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: set_lineinfo
static void set_lineinfo(VTermState *state, int row, int force, int dwl, int dhl)
{
  VTermLineInfo info = state->lineinfo[row];

  if(dwl == DWL_OFF)
    info.doublewidth = DWL_OFF;
  else if(dwl == DWL_ON)
    info.doublewidth = DWL_ON;
  // else -1 to ignore

  if(dhl == DHL_OFF)
    info.doubleheight = DHL_OFF;
  else if(dhl == DHL_TOP)
    info.doubleheight = DHL_TOP;
  else if(dhl == DHL_BOTTOM)
    info.doubleheight = DHL_BOTTOM;

  if((state->callbacks &&
      state->callbacks->setlineinfo &&
      (*state->callbacks->setlineinfo)(row, &info, state->lineinfo + row, state->cbdata))
      || force)
    state->lineinfo[row] = info;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %r14
movq 0x70(%rdi), %rax
movslq %esi, %rbx
movl (%rax,%rbx,4), %edx
movl %edx, 0xc(%rsp)
testl %ecx, %ecx
setne %cl
andb $-0x8, %dl
orb %cl, %dl
cmpl $0x1, %r8d
je 0x6124
testl %r8d, %r8d
je 0x6127
orb $0x4, %dl
jmp 0x6127
orb $0x2, %dl
movb %dl, 0xc(%rsp)
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x6159
movq 0x50(%rcx), %r8
testq %r8, %r8
je 0x6159
leaq (%rax,%rbx,4), %rdx
movq 0x10(%r14), %rcx
leaq 0xc(%rsp), %rsi
movl %ebx, %edi
callq *%r8
orl %ebp, %eax
je 0x6164
movq 0x70(%r14), %rax
jmp 0x615d
testl %ebp, %ebp
je 0x6164
movl 0xc(%rsp), %ecx
movl %ecx, (%rax,%rbx,4)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: erase
static void erase(VTermState *state, VTermRect rect, int selective)
{
  if(rect.end_col == state->cols) {
    /* If we're erasing the final cells of any lines, cancel the continuation
     * marker on the subsequent line
     */
    for(int row = rect.start_row + 1; row < rect.end_row + 1 && row < state->rows; row++)
      state->lineinfo[row].continuation = 0;
  }

  if(state->callbacks && state->callbacks->erase)
    if((*state->callbacks->erase)(rect, selective, state->cbdata))
      return;
}

// Assembly:
movq %rdx, %rax
shrq $0x20, %rax
cmpl %eax, 0x34(%rdi)
jne 0x61d4
movslq %esi, %r8
movq %rsi, %rax
sarq $0x20, %rax
cmpq %rax, %r8
jge 0x61d4
leaq 0x1(%r8), %r9
movslq 0x30(%rdi), %r10
cmpq %r10, %r9
jge 0x61d4
movq 0x70(%rdi), %r10
andb $-0x9, 0x4(%r10,%r8,4)
movq %r9, %r8
jmp 0x61b3
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x61f8
movq 0x20(%rax), %r8
testq %r8, %r8
je 0x61f8
movq 0x10(%rdi), %rax
movq %rsi, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movq %rax, %rcx
jmpq *%r8
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: vterm_state_set_callbacks
void vterm_state_set_callbacks(VTermState *state, const VTermStateCallbacks *callbacks, void *user)
{
  if(callbacks) {
    state->callbacks = callbacks;
    state->cbdata = user;

    if(state->callbacks && state->callbacks->initpen)
      (*state->callbacks->initpen)(state->cbdata);
  }
  else {
    state->callbacks = NULL;
    state->cbdata = NULL;
  }
}

// Assembly:
testq %rsi, %rsi
je 0x621c
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0x6226
movq %rdx, %rdi
jmpq *%rax
addq $0x8, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: vterm_state_set_selection_callbacks
void vterm_state_set_selection_callbacks(VTermState *state, const VTermSelectionCallbacks *callbacks, void *user,
    char *buffer, size_t buflen)
{
  if(buflen && !buffer)
    buffer = vterm_allocator_malloc(state->vt, buflen);

  state->selection.callbacks = callbacks;
  state->selection.user      = user;
  state->selection.buffer    = buffer;
  state->selection.buflen    = buflen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
testq %r8, %r8
sete %al
testq %rcx, %rcx
setne %dl
orb %al, %dl
jne 0x641c
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x95f8
movq %rax, %rcx
movq %r12, 0x1b8(%r14)
movq %r15, 0x1c0(%r14)
movq %rcx, 0x1c8(%r14)
movq %rbx, 0x1d0(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: base64_one
static char base64_one(uint8_t b)
{
  if(b < 26)
    return 'A' + b;
  else if(b < 52)
    return 'a' + b - 26;
  else if(b < 62)
    return '0' + b - 52;
  else if(b == 62)
    return '+';
  else if(b == 63)
    return '/';
  return 0;
}

// Assembly:
movl %edi, %eax
cmpb $0x19, %al
ja 0x66dc
addb $0x41, %al
retq
cmpb $0x33, %al
ja 0x66e3
addb $0x47, %al
retq
cmpb $0x3d, %al
ja 0x66ea
addb $-0x4, %al
retq
cmpb $0x3e, %al
setne %al
shlb $0x2, %al
orb $0x2b, %al
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: grow_combine_buffer
static void grow_combine_buffer(VTermState *state)
{
  size_t    new_size = state->combine_chars_size * 2;
  uint32_t *new_chars = vterm_allocator_malloc(state->vt, new_size * sizeof(new_chars[0]));

  memcpy(new_chars, state->combine_chars, state->combine_chars_size * sizeof(new_chars[0]));

  vterm_allocator_free(state->vt, state->combine_chars);

  state->combine_chars = new_chars;
  state->combine_chars_size = new_size;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x98(%rbx), %rsi
leaq (%rsi,%rsi), %r15
shlq $0x3, %rsi
callq 0x95f8
movq %rax, %r14
movq 0x90(%rbx), %rsi
movq 0x98(%rbx), %rdx
shlq $0x2, %rdx
movq %rax, %rdi
callq 0x2120
movq (%rbx), %rdi
movq 0x90(%rbx), %rsi
callq 0x9663
movq %r14, 0x90(%rbx)
movq %r15, 0x98(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: putglyph
static void putglyph(VTermState *state, const uint32_t chars[], int width, VTermPos pos)
{
  VTermGlyphInfo info = {
    .chars = chars,
    .width = width,
    .protected_cell = state->protected_cell,
    .dwl = state->lineinfo[pos.row].doublewidth,
    .dhl = state->lineinfo[pos.row].doubleheight,
  };

  if(state->callbacks && state->callbacks->putglyph)
    if((*state->callbacks->putglyph)(&info, pos, state->cbdata))
      return;

  DEBUG_LOG("libvterm: Unhandled putglyph U+%04x at (%d,%d)\n", chars[0], pos.col, pos.row);
}

// Assembly:
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movl %edx, 0x10(%rsp)
movb 0x18c(%rdi), %al
andb $0x1, %al
movq 0x70(%rdi), %rdx
movslq %ecx, %rsi
movb (%rdx,%rsi,4), %dl
addb %dl, %dl
andb $0xe, %dl
orb %al, %dl
movb %dl, 0x14(%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x8c36
movq (%rax), %rax
testq %rax, %rax
je 0x8c36
movq 0x10(%rdi), %rdx
leaq 0x8(%rsp), %rdi
movq %rcx, %rsi
callq *%rax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: linefeed
static void linefeed(VTermState *state)
{
  if(state->pos.row == SCROLLREGION_BOTTOM(state) - 1) {
    VTermRect rect = {
      .start_row = state->scrollregion_top,
      .end_row   = SCROLLREGION_BOTTOM(state),
      .start_col = SCROLLREGION_LEFT(state),
      .end_col   = SCROLLREGION_RIGHT(state),
    };

    scroll(state, rect, 1, 0);
  }
  else if(state->pos.row < state->rows-1)
    state->pos.row++;
}

// Assembly:
movl 0x38(%rdi), %eax
movl 0x48(%rdi), %esi
testl %esi, %esi
js 0x8c53
leal -0x1(%rsi), %ecx
cmpl %ecx, %eax
je 0x8c5d
movl 0x30(%rdi), %ecx
decl %ecx
jmp 0x8c74
movl 0x30(%rdi), %esi
leal -0x1(%rsi), %ecx
cmpl %ecx, %eax
jne 0x8c74
movl 0x44(%rdi), %eax
shlq $0x20, %rsi
orq %rax, %rsi
testb $0x10, 0xad(%rdi)
jne 0x8c7e
xorl %eax, %eax
jmp 0x8c88
cmpl %ecx, %eax
jge 0x8c7d
incl %eax
movl %eax, 0x38(%rdi)
retq
movl 0x4c(%rdi), %eax
movl 0x50(%rdi), %edx
testl %edx, %edx
jns 0x8c8b
movl 0x34(%rdi), %edx
shlq $0x20, %rdx
orq %rax, %rdx
pushq $0x1
popq %rcx
xorl %r8d, %r8d
jmp 0x8c9a
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: updatecursor
static void updatecursor(VTermState *state, VTermPos *oldpos, int cancel_phantom)
{
  if(state->pos.col == oldpos->col && state->pos.row == oldpos->row)
    return;

  if(cancel_phantom)
    state->at_phantom = 0;

  if(state->callbacks && state->callbacks->movecursor)
    if((*state->callbacks->movecursor)(state->pos, *oldpos, state->mode.cursor_visible, state->cbdata))
      return;
}

// Assembly:
movl 0x3c(%rdi), %eax
cmpl 0x4(%rsi), %eax
jne 0x8f0f
movl 0x38(%rdi), %eax
cmpl (%rsi), %eax
je 0x8f42
testl %edx, %edx
je 0x8f17
andl $0x0, 0x40(%rdi)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x8f42
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x8f42
movl 0xac(%rdi), %edx
shrl $0x5, %edx
andl $0x1, %edx
movq 0x10(%rdi), %rcx
movq 0x38(%rdi), %rdi
movq (%rsi), %rsi
jmpq *%rax
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: tab
static void tab(VTermState *state, int count, int direction)
{
  while(count > 0) {
    if(direction > 0) {
      if(state->pos.col >= THISROWWIDTH(state)-1)
        return;

      state->pos.col++;
    }
    else if(direction < 0) {
      if(state->pos.col < 1)
        return;

      state->pos.col--;
    }

    if(is_col_tabstop(state, state->pos.col))
      count--;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ecx
movl $0x2, %r9d
movl $0x1, %r10d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
testl %esi, %esi
jle 0x8fb7
movl 0x3c(%rdi), %ebx
testl %ecx, %ecx
jle 0x8f93
movq 0x70(%rdi), %r14
movslq 0x38(%rdi), %r15
movl 0x34(%rdi), %r8d
movl %r8d, %eax
cltd
idivl %r9d
testb $0x1, (%r14,%r15,4)
cmovel %r8d, %eax
decl %eax
movl %r10d, %edx
cmpl %eax, %ebx
jge 0x8fb7
addl %edx, %ebx
movl %ebx, 0x3c(%rdi)
jmp 0x8f95
js 0x8fb0
movq 0x58(%rdi), %rax
movl %ebx, %edx
sarl $0x3, %edx
movslq %edx, %rdx
movzbl (%rax,%rdx), %eax
andl $0x7, %ebx
btl %ebx, %eax
sbbl $0x0, %esi
jmp 0x8f5c
movl %r11d, %edx
testl %ebx, %ebx
jg 0x8f8c
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: savecursor
static void savecursor(VTermState *state, int save)
{
  if(save) {
    state->saved.pos = state->pos;
    state->saved.mode.cursor_visible = state->mode.cursor_visible;
    state->saved.mode.cursor_blink   = state->mode.cursor_blink;
    state->saved.mode.cursor_shape   = state->mode.cursor_shape;

    vterm_state_savepen(state, 1);
  }
  else {
    VTermPos oldpos = state->pos;

    state->pos = state->saved.pos;

    settermprop_bool(state, VTERM_PROP_CURSORVISIBLE, state->saved.mode.cursor_visible);
    settermprop_bool(state, VTERM_PROP_CURSORBLINK,   state->saved.mode.cursor_blink);
    settermprop_int (state, VTERM_PROP_CURSORSHAPE,   state->saved.mode.cursor_shape);

    vterm_state_savepen(state, 0);

    updatecursor(state, &oldpos, 1);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x9011
movq 0x38(%rbx), %rax
movq %rax, 0x190(%rbx)
movzwl 0xac(%rbx), %eax
movl %eax, %ecx
shrb $0x5, %cl
movb 0x1a4(%rbx), %dl
andb $-0x10, %dl
shrl $0x5, %eax
andb $0xc, %al
andb $0x3, %cl
orb %dl, %cl
orb %al, %cl
movb %cl, 0x1a4(%rbx)
pushq $0x1
popq %rsi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x34f4
movq 0x38(%rbx), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq 0x190(%rbx), %rax
movq %rax, 0x38(%rbx)
movzbl 0x1a4(%rbx), %edx
andl $0x1, %edx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x616d
movl 0x1a4(%rbx), %edx
shrl %edx
andl $0x1, %edx
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x616d
movl 0x1a4(%rbx), %edx
shrl $0x2, %edx
andl $0x3, %edx
pushq $0x7
popq %rsi
movq %rbx, %rdi
callq 0x6185
movq %rbx, %rdi
xorl %esi, %esi
callq 0x34f4
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x8f00
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/state.c
// Function: is_cursor_in_scrollregion
static int is_cursor_in_scrollregion(const VTermState *state)
{
  if(state->pos.row < state->scrollregion_top ||
     state->pos.row >= SCROLLREGION_BOTTOM(state))
    return 0;
  if(state->pos.col < SCROLLREGION_LEFT(state) ||
     state->pos.col >= SCROLLREGION_RIGHT(state))
    return 0;

  return 1;
}

// Assembly:
movl 0x38(%rdi), %ecx
xorl %eax, %eax
cmpl 0x44(%rdi), %ecx
jl 0x90b4
movl 0x48(%rdi), %edx
testl %edx, %edx
jns 0x90a0
movl 0x30(%rdi), %edx
cmpl %edx, %ecx
jge 0x90b4
movl 0x3c(%rdi), %ecx
testb $0x10, 0xad(%rdi)
jne 0x90b5
testl %ecx, %ecx
jns 0x90c1
retq
cmpl 0x4c(%rdi), %ecx
jl 0x90b4
movl 0x50(%rdi), %edx
testl %edx, %edx
jns 0x90c4
movl 0x34(%rdi), %edx
xorl %eax, %eax
cmpl %edx, %ecx
setl %al
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/unicode.c
// Function: bisearch
static int bisearch(uint32_t ucs, const struct interval *table, int max) {
  int min = 0;
  int mid;

  if (ucs < table[0].first || ucs > table[max].last)
    return 0;
  while (max >= min) {
    mid = (min + max) / 2;
    if (ucs > table[mid].last)
      min = mid + 1;
    else if (ucs < table[mid].first)
      max = mid - 1;
    else
      return 1;
  }

  return 0;
}

// Assembly:
xorl %ecx, %ecx
cmpl %edi, (%rsi)
ja 0x94db
movl %edx, %r8d
movl %edx, %eax
cmpl %edi, 0x4(%rsi,%rax,8)
jb 0x94db
xorl %r10d, %r10d
pushq $0x2
popq %r9
pushq $0x1
popq %rcx
cmpl %r10d, %r8d
jl 0x94d9
leal (%r10,%r8), %eax
cltd
idivl %r9d
movslq %eax, %rdx
cmpl %edi, 0x4(%rsi,%rdx,8)
jae 0x94cd
incl %eax
movl %eax, %r10d
jmp 0x94b0
cmpl %edi, (%rsi,%rdx,8)
jbe 0x94db
decl %eax
movl %eax, %r8d
jmp 0x94b0
xorl %ecx, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_build
VTerm *vterm_build(const struct VTermBuilder *builder)
{
  const VTermAllocatorFunctions *allocator = DEFAULT(builder->allocator, &default_allocator);

  /* Need to bootstrap using the allocator function directly */
  VTerm *vt = (*allocator->malloc)(sizeof(VTerm), builder->allocdata);

  vt->allocator = allocator;
  vt->allocdata = builder->allocdata;

  vt->rows = builder->rows;
  vt->cols = builder->cols;

  vt->parser.state = NORMAL;

  vt->parser.callbacks = NULL;
  vt->parser.cbdata    = NULL;

  vt->parser.emit_nul  = false;

  vt->outfunc = NULL;
  vt->outdata = NULL;

  vt->outbuffer_len = DEFAULT(builder->outbuffer_len, 4096);
  vt->outbuffer_cur = 0;
  vt->outbuffer = vterm_allocator_malloc(vt, vt->outbuffer_len);

  vt->tmpbuffer_len = DEFAULT(builder->tmpbuffer_len, 4096);
  vt->tmpbuffer = vterm_allocator_malloc(vt, vt->tmpbuffer_len);

  return vt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rsi
testq %rax, %rax
leaq 0x5c5f(%rip), %r15      # 0xf190
cmovneq %rax, %r15
movl $0x138, %edi            # imm = 0x138
callq *(%r15)
movq %rax, %rbx
movq %r15, (%rax)
movq 0x18(%r14), %rsi
movq %rsi, 0x8(%rax)
movq 0x4(%r14), %rax
movq %rax, 0x10(%rbx)
andl $0x0, 0x20(%rbx)
movb $0x0, 0xe9(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xf0(%rbx)
movq 0x20(%r14), %rdi
testq %rdi, %rdi
movl $0x1000, %r12d          # imm = 0x1000
cmoveq %r12, %rdi
movq %rdi, 0x108(%rbx)
andq $0x0, 0x110(%rbx)
callq *(%r15)
movq %rax, 0x100(%rbx)
movq 0x28(%r14), %rdi
testq %rdi, %rdi
cmoveq %r12, %rdi
movq %rdi, 0x120(%rbx)
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
callq *(%rax)
movq %rax, 0x118(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_free
void vterm_free(VTerm *vt)
{
  if(vt->screen)
    vterm_screen_free(vt->screen);

  if(vt->state)
    vterm_state_free(vt->state);

  vterm_allocator_free(vt, vt->outbuffer);
  vterm_allocator_free(vt, vt->tmpbuffer);

  vterm_allocator_free(vt, vt);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x130(%rdi), %rdi
testq %rdi, %rdi
je 0x961f
callq 0x3ec0
movq 0x128(%rbx), %rdi
testq %rdi, %rdi
je 0x9630
callq 0x5de8
movq 0x100(%rbx), %rdi
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
callq *0x8(%rax)
movq 0x118(%rbx), %rdi
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
callq *0x8(%rax)
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %rax
movq %rbx, %rdi
popq %rbx
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_get_size
void vterm_get_size(const VTerm *vt, int *rowsp, int *colsp)
{
  if(rowsp)
    *rowsp = vt->rows;
  if(colsp)
    *colsp = vt->cols;
}

// Assembly:
testq %rsi, %rsi
je 0x9680
movl 0x10(%rdi), %eax
movl %eax, (%rsi)
testq %rdx, %rdx
je 0x968a
movl 0x14(%rdi), %eax
movl %eax, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_set_size
void vterm_set_size(VTerm *vt, int rows, int cols)
{
  if(rows < 1 || cols < 1)
    return;

  vt->rows = rows;
  vt->cols = cols;

  if(vt->parser.callbacks && vt->parser.callbacks->resize)
    (*vt->parser.callbacks->resize)(rows, cols, vt->parser.cbdata);
}

// Assembly:
testl %esi, %esi
setle %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0x96c4
movl %esi, 0x10(%rdi)
movl %edx, 0x14(%rdi)
movq 0xd8(%rdi), %rax
testq %rax, %rax
je 0x96c4
movq 0x48(%rax), %rcx
testq %rcx, %rcx
je 0x96c4
movq 0xe0(%rdi), %rax
movl %esi, %edi
movl %edx, %esi
movq %rax, %rdx
jmpq *%rcx
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_push_output_bytes
INTERNAL void vterm_push_output_bytes(VTerm *vt, const char *bytes, size_t len)
{
  if(vt->outfunc) {
    (vt->outfunc)(bytes, len, vt->outdata);
    return;
  }

  if(len > vt->outbuffer_len - vt->outbuffer_cur)
    return;

  memcpy(vt->outbuffer + vt->outbuffer_cur, bytes, len);
  vt->outbuffer_cur += len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0xf0(%rdi), %rax
testq %rax, %rax
je 0x9718
movq 0xf8(%r14), %rdx
movq %rsi, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movq 0x108(%r14), %rax
movq 0x110(%r14), %rdi
subq %rdi, %rax
cmpq %rbx, %rax
jb 0x9744
addq 0x100(%r14), %rdi
movq %rbx, %rdx
callq 0x2120
addq %rbx, 0x110(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_push_output_sprintf_ctrl
INTERNAL void vterm_push_output_sprintf_ctrl(VTerm *vt, unsigned char ctrl, const char *fmt, ...)
{
  size_t cur;

  if(ctrl >= 0x80 && !vt->mode.ctrl8bit)
    cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
        ESC_S "%c", ctrl - 0x40);
  else
    cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
        "%c", ctrl);

  if(cur >= vt->tmpbuffer_len)
    return;

  va_list args;
  va_start(args, fmt);
  cur += vsnprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
      fmt, args);
  va_end(args);

  if(cur >= vt->tmpbuffer_len)
    return;

  vterm_push_output_bytes(vt, vt->tmpbuffer, cur);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rcx, %r10
movq %rdx, %r14
movl %esi, %ecx
movq %rdi, %rbx
movq %r10, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x9861
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testb %cl, %cl
jns 0x9885
testb $0x2, 0x18(%rbx)
jne 0x9885
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
addl $-0x40, %ecx
leaq 0xa2c(%rip), %rdx       # 0xa2af
jmp 0x989a
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
leaq 0xa16(%rip), %rdx       # 0xa2b0
xorl %eax, %eax
callq 0x20e0
movslq %eax, %r15
cmpq %r15, 0x120(%rbx)
jbe 0x990c
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
movq 0x118(%rbx), %rdi
addq %r15, %rdi
movq 0x120(%rbx), %rsi
subq %r15, %rsi
movq %r14, %rdx
callq 0x2080
movslq %eax, %rdx
addq %r15, %rdx
cmpq 0x120(%rbx), %rdx
jae 0x990c
movq 0x118(%rbx), %rsi
movq %rbx, %rdi
callq 0x96ec
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_push_output_sprintf_str
INTERNAL void vterm_push_output_sprintf_str(VTerm *vt, unsigned char ctrl, bool term, const char *fmt, ...)
{
  size_t cur = 0;

  if(ctrl) {
    if(ctrl >= 0x80 && !vt->mode.ctrl8bit)
      cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
          ESC_S "%c", ctrl - 0x40);
    else
      cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
          "%c", ctrl);

    if(cur >= vt->tmpbuffer_len)
      return;
  }

  va_list args;
  va_start(args, fmt);
  cur += vsnprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
      fmt, args);
  va_end(args);

  if(cur >= vt->tmpbuffer_len)
    return;

  if(term) {
    cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
        vt->mode.ctrl8bit ? "\x9C" : ESC_S "\\"); // ST

    if(cur >= vt->tmpbuffer_len)
      return;
  }

  vterm_push_output_bytes(vt, vt->tmpbuffer, cur);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x9973
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testl %esi, %esi
je 0x99cc
movzbl %sil, %ecx
testb %cl, %cl
jns 0x999f
testb $0x2, 0x18(%rbx)
jne 0x999f
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
addl $-0x40, %ecx
leaq 0x912(%rip), %rdx       # 0xa2af
jmp 0x99b4
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
leaq 0x8fc(%rip), %rdx       # 0xa2b0
xorl %eax, %eax
callq 0x20e0
movslq %eax, %r15
cmpq %r15, 0x120(%rbx)
ja 0x99cf
jmp 0x9a6e
xorl %r15d, %r15d
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rcx)
movq 0x118(%rbx), %rdi
addq %r15, %rdi
movq 0x120(%rbx), %rsi
subq %r15, %rsi
movq %r14, %rdx
callq 0x2080
movslq %eax, %r14
addq %r15, %r14
movq 0x120(%rbx), %rsi
subq %r14, %rsi
jbe 0x9a6e
testb %bpl, %bpl
je 0x9a5c
movq 0x118(%rbx), %rdi
addq %r14, %rdi
testb $0x2, 0x18(%rbx)
leaq 0xf7e(%rip), %rax       # 0xa9ba
leaq 0xf74(%rip), %rdx       # 0xa9b7
cmoveq %rax, %rdx
xorl %eax, %eax
callq 0x20e0
cltq
addq %rax, %r14
cmpq 0x120(%rbx), %r14
jae 0x9a6e
movq 0x118(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x96ec
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_output_read
size_t vterm_output_read(VTerm *vt, char *buffer, size_t len)
{
  if(len > vt->outbuffer_cur)
    len = vt->outbuffer_cur;

  memcpy(buffer, vt->outbuffer, len);

  if(len < vt->outbuffer_cur)
    memmove(vt->outbuffer, vt->outbuffer + len, vt->outbuffer_cur - len);

  vt->outbuffer_cur -= len;

  return len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rax
movq %rdi, %r14
movq 0x100(%rdi), %rsi
movq 0x110(%rdi), %rcx
cmpq %rdx, %rcx
cmovbq %rcx, %rbx
movq %rax, %rdi
movq %rbx, %rdx
callq 0x2120
movq 0x110(%r14), %rax
movq %rax, %rdx
subq %rbx, %rdx
jbe 0x9aee
movq 0x100(%r14), %rdi
leaq (%rdi,%rbx), %rsi
callq 0x2190
movq 0x110(%r14), %rax
subq %rbx, %rax
movq %rax, 0x110(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_copy_cells
void vterm_copy_cells(VTermRect dest,
    VTermRect src,
    void (*copycell)(VTermPos dest, VTermPos src, void *user),
    void *user)
{
  int downward  = src.start_row - dest.start_row;
  int rightward = src.start_col - dest.start_col;

  int init_row, test_row, init_col, test_col;
  int inc_row, inc_col;

  if(downward < 0) {
    init_row = dest.end_row - 1;
    test_row = dest.start_row - 1;
    inc_row = -1;
  }
  else /* downward >= 0 */ {
    init_row = dest.start_row;
    test_row = dest.end_row;
    inc_row = +1;
  }

  if(rightward < 0) {
    init_col = dest.end_col - 1;
    test_col = dest.start_col - 1;
    inc_col = -1;
  }
  else /* rightward >= 0 */ {
    init_col = dest.start_col;
    test_col = dest.end_col;
    inc_col = +1;
  }

  VTermPos pos;
  for(pos.row = init_row; pos.row != test_row; pos.row += inc_row)
    for(pos.col = init_col; pos.col != test_col; pos.col += inc_col) {
      VTermPos srcpos = { pos.row + downward, pos.col + rightward };
      (*copycell)(pos, srcpos, user);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r10
shrq $0x20, %r10
movq %rsi, %rax
shrq $0x20, %rax
subl %edi, %edx
subl %esi, %ecx
leal -0x1(%r10), %ebx
leal -0x1(%rdi), %ebp
movl %edx, %r11d
sarl $0x1f, %r11d
orl $0x1, %r11d
movl %r11d, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
testl %edx, %edx
cmovnsl %r10d, %ebp
movl %ebp, 0x14(%rsp)
cmovnsl %edi, %ebx
movq %r9, 0x30(%rsp)
leal -0x1(%rax), %edx
leal -0x1(%rsi), %r12d
testl %ecx, %ecx
cmovnsl %esi, %edx
movl %edx, 0xc(%rsp)
cmovnsl %eax, %r12d
movq %r8, 0x28(%rsp)
movq %rcx, %r14
movl %ecx, %ebp
sarl $0x1f, %ebp
orl $0x1, %ebp
cmpl 0x14(%rsp), %ebx
je 0x9d42
movq 0x18(%rsp), %rax
leal (%rbx,%rax), %r13d
movq %rbx, 0x20(%rsp)
movl %ebx, %ebx
movl 0xc(%rsp), %eax
movl %eax, %r15d
cmpl %r15d, %r12d
je 0x9d37
leal (%r14,%r15), %esi
movq %r15, %rdi
shlq $0x20, %rdi
orq %rbx, %rdi
shlq $0x20, %rsi
orq %r13, %rsi
movq 0x30(%rsp), %rdx
callq *0x28(%rsp)
addl %ebp, %r15d
jmp 0x9d0f
movq 0x20(%rsp), %rbx
addl 0x10(%rsp), %ebx
jmp 0x9cf2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/neovim[P]libvterm/src/vterm.c
// Function: vterm_check_version
void vterm_check_version(int major, int minor)
{
  if(major != VTERM_VERSION_MAJOR) {
    fprintf(stderr, "libvterm major version mismatch; %d (wants) != %d (library)\n",
        major, VTERM_VERSION_MAJOR);
    exit(1);
  }

  if(minor > VTERM_VERSION_MINOR) {
    fprintf(stderr, "libvterm minor version mismatch; %d (wants) > %d (library)\n",
        minor, VTERM_VERSION_MINOR);
    exit(1);
  }

  // Happy
}

// Assembly:
pushq %rax
testl %edi, %edi
jne 0x9d5f
movl %esi, %edx
cmpl $0x4, %esi
jge 0x9d78
popq %rax
retq
movl %edi, %eax
movq 0x5288(%rip), %rcx      # 0xeff0
movq (%rcx), %rdi
leaq 0x14be(%rip), %rsi      # 0xb230
movl %eax, %edx
xorl %ecx, %ecx
jmp 0x9d8c
movq 0x5271(%rip), %rax      # 0xeff0
movq (%rax), %rdi
leaq 0x14e4(%rip), %rsi      # 0xb26d
pushq $0x3
popq %rcx
xorl %eax, %eax
callq 0x2110
pushq $0x1
popq %rdi
callq 0x21d0
// File: /workspace/github_c_makefile_star2_O2/ioerror[P]csidh-reference-implementation/csidh_util.c
// Function: pprint_ss
void pprint_ss(uint64_t *x)
{
    /* for p512 we print 8 64bit little endian values as hex. */
    int ceiling = 7;
    int i;
    for(i=ceiling; i >= 0; --i){
        printf("%.16" PRIX64 "", x[i]);
    }
    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x7
popq %rbp
leaq 0x3d78(%rip), %r14      # 0x5017
testl %ebp, %ebp
js 0x12b7
movl %ebp, %eax
movq (%rbx,%rax,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1060
decl %ebp
jmp 0x129f
pushq $0xa
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030