// File: /workspace/github_c_makefile_star2_O1/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:
movq %rsi, %rcx
shrq $0x20, %rcx
xorl %eax, %eax
testl %esi, %esi
js 0x4848
xorl %r8d, %r8d
testq %rsi, %rsi
js 0x484b
cmpl %esi, 0x50(%rdi)
jle 0x484b
movl 0x54(%rdi), %r8d
cmpl %ecx, %r8d
jle 0x4848
imull %esi, %r8d
leaq (%r8,%r8,8), %r8
shlq $0x2, %r8
addq 0x70(%rdi), %r8
leaq (%rcx,%rcx,8), %r9
leaq (%r8,%r9,4), %r8
jmp 0x484b
xorl %r8d, %r8d
testq %r8, %r8
je 0x49ac
xorl %eax, %eax
movl (%r8,%rax,4), %r9d
movl %r9d, (%rdx,%rax,4)
cmpl $0x0, (%r8,%rax,4)
je 0x4872
leaq 0x1(%rax), %r9
cmpq $0x5, %rax
movq %r9, %rax
jne 0x4856
movl 0x20(%r8), %r9d
andl $0x1, %r9d
movl 0x1c(%rdx), %eax
andl $-0x2, %eax
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl 0x20(%r8), %r9d
andl $0x6, %r9d
andl $-0x7, %eax
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl 0x20(%r8), %r9d
andl $0x8, %r9d
andl $-0x9, %eax
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl 0x20(%r8), %r9d
andl $0x10, %r9d
andl $-0x11, %eax
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl 0x58(%rdi), %r9d
shll $0x5, %r9d
xorl 0x20(%r8), %r9d
andl $0x20, %r9d
andl $-0x21, %eax
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl 0x20(%r8), %r9d
andl $0x40, %r9d
andl $-0x41, %eax
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl $0x80, %r9d
andl 0x20(%r8), %r9d
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl $0xf00, %r9d            # imm = 0xF00
andl 0x20(%r8), %r9d
andl $0xfffff0ff, %eax       # imm = 0xFFFFF0FF
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl $0x1000, %r9d           # imm = 0x1000
andl 0x20(%r8), %r9d
andl $0xffff7fff, %eax       # imm = 0xFFFF7FFF
leal (%rax,%r9,8), %eax
movl %eax, 0x1c(%rdx)
movl $0x6000, %r9d           # imm = 0x6000
andl 0x20(%r8), %r9d
andl $0xfffcffff, %eax       # imm = 0xFFFCFFFF
leal (%rax,%r9,8), %eax
movl %eax, 0x1c(%rdx)
movl 0x20(%r8), %r9d
shrl $0x4, %r9d
andl $0x1000, %r9d           # imm = 0x1000
andl $0xffffefff, %eax       # imm = 0xFFFFEFFF
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl 0x20(%r8), %r9d
shrl $0x4, %r9d
andl $0x6000, %r9d           # imm = 0x6000
andl $0xffff9fff, %eax       # imm = 0xFFFF9FFF
orl %r9d, %eax
movl %eax, 0x1c(%rdx)
movl 0x18(%r8), %eax
movl %eax, 0x20(%rdx)
movl 0x1c(%r8), %eax
movl %eax, 0x24(%rdx)
movl 0x54(%rdi), %eax
leal -0x1(%rax), %r8d
cmpl %ecx, %r8d
jle 0x49a2
imull %esi, %eax
leaq (%rax,%rax,8), %rax
shlq $0x2, %rax
addq 0x70(%rdi), %rax
incl %ecx
leaq (%rcx,%rcx,8), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x49ad
movb $0x1, %al
movb %al, 0x18(%rdx)
movl $0x1, %eax
retq
movb $0x2, %al
jmp 0x49a4