// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %edx
callq 0x6a70
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x681a
movl $0x0, -0x4(%rbp)
jmp 0x6a67
movl $0x0, -0x2c(%rbp)
cmpl $0x6, -0x2c(%rbp)
jge 0x685a
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x28(%rbp), %rax
movslq -0x2c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x684d
jmp 0x685a
jmp 0x684f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6821
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
andl $-0x2, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl %edx
andl $0x3, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x3, %edx
shll %edx
andl $-0x7, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x3, %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
shll $0x3, %edx
andl $-0x9, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x4, %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
shll $0x4, %edx
andl $-0x11, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x5, %edx
andl $0x1, %edx
movq -0x18(%rbp), %rax
movb 0x58(%rax), %al
andb $0x1, %al
movzbl %al, %eax
xorl %eax, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
shll $0x5, %edx
andl $-0x21, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x6, %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
shll $0x6, %edx
andl $-0x41, %ecx
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x7, %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
shll $0x7, %edx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x8, %edx
andl $0xf, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0xf, %edx
shll $0x8, %edx
andl $0xfffff0ff, %ecx       # imm = 0xFFFFF0FF
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0xc, %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
shll $0xf, %edx
andl $0xffff7fff, %ecx       # imm = 0xFFFF7FFF
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0xd, %edx
andl $0x3, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x3, %edx
shll $0x10, %edx
andl $0xfffcffff, %ecx       # imm = 0xFFFCFFFF
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x10, %edx
andl $0x1, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x1, %edx
shll $0xc, %edx
andl $0xffffefff, %ecx       # imm = 0xFFFFEFFF
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %edx
shrl $0x11, %edx
andl $0x3, %edx
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %ecx
andl $0x3, %edx
shll $0xd, %edx
andl $0xffff9fff, %ecx       # imm = 0xFFFF9FFF
orl %edx, %ecx
movl %ecx, 0x1c(%rax)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x18(%rcx), %ecx
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movl 0x1c(%rcx), %ecx
movl %ecx, 0x24(%rax)
movl -0x8(%rbp), %eax
movq -0x18(%rbp), %rcx
movl 0x54(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x6a58
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x8(%rbp), %edx
addl $0x1, %edx
callq 0x6a70
cmpl $-0x1, (%rax)
jne 0x6a58
movq -0x20(%rbp), %rax
movb $0x2, 0x18(%rax)
jmp 0x6a60
movq -0x20(%rbp), %rax
movb $0x1, 0x18(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq