// File: /workspace/github_c_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %r12
shrq $0x20, %r12
movl %r12d, %edx
callq 0x42cb
testq %rax, %rax
je 0x42b9
xorl %ecx, %ecx
cmpq $0x6, %rcx
je 0x41a8
movl (%rax,%rcx,4), %edx
movl %edx, (%rbx,%rcx,4)
incq %rcx
testl %edx, %edx
jne 0x4195
movl 0x20(%rax), %edx
andl $0x1, %edx
movl 0x1c(%rbx), %ecx
andl $-0x2, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl 0x20(%rax), %edx
andl $0x6, %edx
andl $-0x7, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl 0x20(%rax), %edx
andl $0x8, %edx
andl $-0x9, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl 0x20(%rax), %edx
andl $0x10, %edx
andl $-0x11, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl 0x58(%r15), %edx
shll $0x5, %edx
xorl 0x20(%rax), %edx
andl $0x20, %edx
andl $-0x21, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl 0x20(%rax), %edx
andl $0x40, %edx
andl $-0x41, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl $0x80, %edx
andl 0x20(%rax), %edx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl $0xf00, %edx            # imm = 0xF00
andl 0x20(%rax), %edx
andl $0xfffff0ff, %ecx       # imm = 0xFFFFF0FF
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl $0x1000, %edx           # imm = 0x1000
andl 0x20(%rax), %edx
andl $0xffff7fff, %ecx       # imm = 0xFFFF7FFF
leal (%rcx,%rdx,8), %ecx
movl %ecx, 0x1c(%rbx)
movl $0x6000, %edx           # imm = 0x6000
andl 0x20(%rax), %edx
andl $0xfffcffff, %ecx       # imm = 0xFFFCFFFF
leal (%rcx,%rdx,8), %ecx
movl %ecx, 0x1c(%rbx)
movl 0x20(%rax), %edx
shrl $0x4, %edx
andl $0x1000, %edx           # imm = 0x1000
andl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl 0x20(%rax), %edx
shrl $0x4, %edx
andl $0x6000, %edx           # imm = 0x6000
andl $0xffff9fff, %ecx       # imm = 0xFFFF9FFF
orl %edx, %ecx
movl %ecx, 0x1c(%rbx)
movl 0x18(%rax), %ecx
movl %ecx, 0x20(%rbx)
movl 0x1c(%rax), %eax
movl %eax, 0x24(%rbx)
movl 0x54(%r15), %eax
decl %eax
cmpl %r12d, %eax
jle 0x42af
incl %r12d
movq %r15, %rdi
movl %r14d, %esi
movl %r12d, %edx
callq 0x42cb
cmpl $-0x1, (%rax)
je 0x42c7
movb $0x1, %al
movb %al, 0x18(%rbx)
pushq $0x1
popq %rax
jmp 0x42bb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb $0x2, %al
jmp 0x42b1