// File: /workspace/github_c_makefile_star2_O0/jaimecgomezz[P]st/st.c
// Function: draw
void draw(void) {
  int cx = term.c.x, ocx = term.ocx, ocy = term.ocy;

  if (!xstartdraw())
    return;

  /* adjust cursor position */
  LIMIT(term.ocx, 0, term.col - 1);
  LIMIT(term.ocy, 0, term.row - 1);
  if (term.line[term.ocy][term.ocx].mode & ATTR_WDUMMY)
    term.ocx--;
  if (term.line[term.c.y][cx].mode & ATTR_WDUMMY)
    cx--;

  // >>>>>>>>>>>>>>>>>>>> vim-browse
  // ==================== vim-browse
  drawregion(0, 0, term.col, term.row);
  // ==================== vim-browse
  // <<<<<<<<<<<<<<<<<<<< vim-browse
  // >>>>>>>>>>>>>>>>>>>> ligatures-scrollback
  // ==================== ligatures-scrollback
  xdrawcursor(
    cx,
    term.c.y,
    term.line[term.c.y][cx],
    term.ocx,
    term.ocy,
    term.line[term.ocy][term.ocx]
  );
  // ==================== ligatures-scrollback
  // <<<<<<<<<<<<<<<<<<<< ligatures-scrollback

  term.ocx = cx;
  term.ocy = term.c.y;
  xfinishdraw();
  if (ocx != term.ocx || ocy != term.ocy)
    xximspot(term.ocx, term.ocy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10c62(%rip), %eax     # 0x18df0
movl %eax, -0x4(%rbp)
movl 0x10c65(%rip), %eax     # 0x18dfc
movl %eax, -0x8(%rbp)
movl 0x10c60(%rip), %eax     # 0x18e00
movl %eax, -0xc(%rbp)
callq 0xc560
cmpl $0x0, %eax
jne 0x81b2
jmp 0x838e
cmpl $0x0, 0x10c43(%rip)     # 0x18dfc
jge 0x81c2
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x81f2
movl 0x10c34(%rip), %eax     # 0x18dfc
movl 0x10bf6(%rip), %ecx     # 0x18dc4
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x81e3
movl 0x10be9(%rip), %eax     # 0x18dc4
subl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x81ec
movl 0x10c13(%rip), %eax     # 0x18dfc
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, 0x10c01(%rip)     # 0x18dfc
cmpl $0x0, 0x10bfe(%rip)     # 0x18e00
jge 0x820b
xorl %eax, %eax
movl %eax, -0x2c(%rbp)
jmp 0x823b
movl 0x10bef(%rip), %eax     # 0x18e00
movl 0x10ba9(%rip), %ecx     # 0x18dc0
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x822c
movl 0x10b9c(%rip), %eax     # 0x18dc0
subl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x8235
movl 0x10bce(%rip), %eax     # 0x18e00
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, 0x10bbc(%rip)     # 0x18e00
movq 0x10b7d(%rip), %rax     # 0x18dc8
movslq 0x10bae(%rip), %rcx     # 0x18e00
movq (%rax,%rcx,8), %rax
movslq 0x10b9f(%rip), %rcx     # 0x18dfc
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x8281
movl 0x10b84(%rip), %eax     # 0x18dfc
addl $-0x1, %eax
movl %eax, 0x10b7b(%rip)     # 0x18dfc
movq 0x10b40(%rip), %rax     # 0x18dc8
movslq 0x10b65(%rip), %rcx     # 0x18df4
movq (%rax,%rcx,8), %rax
movslq -0x4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x82b5
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
movl 0x10b09(%rip), %edx     # 0x18dc4
movl 0x10aff(%rip), %ecx     # 0x18dc0
xorl %esi, %esi
movl %esi, %edi
callq 0x83a0
movl -0x4(%rbp), %edi
movl 0x10b21(%rip), %esi     # 0x18df4
movq 0x10aee(%rip), %rax     # 0x18dc8
movslq 0x10b13(%rip), %rcx     # 0x18df4
movq (%rax,%rcx,8), %rcx
movslq -0x4(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movl 0x10b05(%rip), %r8d     # 0x18dfc
movl 0x10b02(%rip), %r9d     # 0x18e00
movq 0x10ac3(%rip), %rax     # 0x18dc8
movslq 0x10af4(%rip), %rdx     # 0x18e00
movq (%rax,%rdx,8), %rax
movslq 0x10ae5(%rip), %rdx     # 0x18dfc
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
movq (%rax), %r10
movq %r10, -0x20(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rax
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0xc0e0
movl -0x4(%rbp), %eax
movl %eax, 0x10aa6(%rip)     # 0x18dfc
movl 0x10a98(%rip), %eax     # 0x18df4
movl %eax, 0x10a9e(%rip)     # 0x18e00
callq 0xd460
movl -0x8(%rbp), %eax
cmpl 0x10a8c(%rip), %eax     # 0x18dfc
jne 0x837d
movl -0xc(%rbp), %eax
cmpl 0x10a85(%rip), %eax     # 0x18e00
je 0x838e
movl 0x10a79(%rip), %edi     # 0x18dfc
movl 0x10a77(%rip), %esi     # 0x18e00
callq 0xd520
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)