// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/screen.c
// Function: vterm_screen_get_cell
int vterm_screen_get_cell(const VTermScreen *screen, VTermPos pos, VTermScreenCell *cell)
{
  ScreenCell *intcell = getcell(screen, pos.row, pos.col);
  if(!intcell)
    return 0;

  for(int i = 0; i < VTERM_MAX_CHARS_PER_CELL; i++) {
    cell->chars[i] = intcell->chars[i];
    if(!intcell->chars[i])
      break;
  }

  cell->attrs.bold      = intcell->pen.bold;
  cell->attrs.underline = intcell->pen.underline;
  cell->attrs.italic    = intcell->pen.italic;
  cell->attrs.blink     = intcell->pen.blink;
  cell->attrs.reverse   = intcell->pen.reverse ^ screen->global_reverse;
  cell->attrs.conceal   = intcell->pen.conceal;
  cell->attrs.strike    = intcell->pen.strike;
  cell->attrs.font      = intcell->pen.font;
  cell->attrs.small     = intcell->pen.small;
  cell->attrs.baseline  = intcell->pen.baseline;

  cell->attrs.dwl = intcell->pen.dwl;
  cell->attrs.dhl = intcell->pen.dhl;

  cell->fg = intcell->pen.fg;
  cell->bg = intcell->pen.bg;

  if(pos.col < (screen->cols - 1) &&
     getcell(screen, pos.row, pos.col + 1)->chars[0] == (uint32_t)-1)
    cell->width = 2;
  else
    cell->width = 1;

  return 1;
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
js 0x4ceb
testq %rsi, %rsi
js 0x4ceb
movl %esi, %ecx
cmpl %esi, 0x50(%rdi)
jle 0x4ceb
shrq $0x20, %rsi
movl 0x54(%rdi), %r8d
cmpl %esi, %r8d
jle 0x4ceb
movq 0x70(%rdi), %r9
testq %r9, %r9
je 0x4ceb
imull %ecx, %r8d
leaq (%r8,%r8,8), %rax
leaq (%r9,%rax,4), %rax
leaq (%rsi,%rsi,8), %r8
leaq (%rax,%r8,4), %rax
xorl %r8d, %r8d
movl (%rax,%r8,4), %r9d
movl %r9d, (%rdx,%r8,4)
testl %r9d, %r9d
je 0x4b91
leaq 0x1(%r8), %r9
cmpq $0x5, %r8
movq %r9, %r8
jne 0x4b77
movl 0x20(%rax), %r9d
andl $0x1, %r9d
movl 0x1c(%rdx), %r8d
andl $-0x2, %r8d
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl 0x20(%rax), %r9d
andl $0x6, %r9d
andl $-0x7, %r8d
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl 0x20(%rax), %r9d
andl $0x8, %r9d
andl $-0x9, %r8d
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl 0x20(%rax), %r9d
andl $0x10, %r9d
andl $-0x11, %r8d
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl 0x58(%rdi), %r9d
shll $0x5, %r9d
xorl 0x20(%rax), %r9d
andl $0x20, %r9d
andl $-0x21, %r8d
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl 0x20(%rax), %r9d
andl $0x40, %r9d
andl $-0x41, %r8d
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl $0x80, %r9d
andl 0x20(%rax), %r9d
andl $0xffffff7f, %r8d       # imm = 0xFFFFFF7F
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl $0xf00, %r9d            # imm = 0xF00
andl 0x20(%rax), %r9d
andl $0xfffff0ff, %r8d       # imm = 0xFFFFF0FF
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl $0x1000, %r9d           # imm = 0x1000
andl 0x20(%rax), %r9d
andl $0xffff7fff, %r8d       # imm = 0xFFFF7FFF
leal (%r8,%r9,8), %r8d
movl %r8d, 0x1c(%rdx)
movl $0x6000, %r9d           # imm = 0x6000
andl 0x20(%rax), %r9d
andl $0xfffcffff, %r8d       # imm = 0xFFFCFFFF
leal (%r8,%r9,8), %r8d
movl %r8d, 0x1c(%rdx)
movl 0x20(%rax), %r9d
shrl $0x4, %r9d
andl $0x1000, %r9d           # imm = 0x1000
andl $0xffffefff, %r8d       # imm = 0xFFFFEFFF
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl 0x20(%rax), %r9d
shrl $0x4, %r9d
andl $0x6000, %r9d           # imm = 0x6000
andl $0xffff9fff, %r8d       # imm = 0xFFFF9FFF
orl %r9d, %r8d
movl %r8d, 0x1c(%rdx)
movl 0x18(%rax), %r8d
movl %r8d, 0x20(%rdx)
movl 0x1c(%rax), %eax
movl %eax, 0x24(%rdx)
movl 0x54(%rdi), %eax
leal -0x1(%rax), %r8d
cmpl %esi, %r8d
jle 0x4ce1
imull %ecx, %eax
leaq (%rax,%rax,8), %rax
shlq $0x2, %rax
addq 0x70(%rdi), %rax
leal 0x1(%rsi), %ecx
leaq (%rcx,%rcx,8), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x4cec
movb $0x1, %al
movb %al, 0x18(%rdx)
movl $0x1, %eax
retq
movb $0x2, %al
jmp 0x4ce3