// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movslq 0xddcb(%rip), %rbx      # 0x157e0
movl 0xddd0(%rip), %r15d     # 0x157ec
movl 0xddce(%rip), %ebp      # 0x157f0
callq 0xa645
testl %eax, %eax
je 0x7b94
movl 0xddb7(%rip), %ecx      # 0x157ec
xorl %r9d, %r9d
movl $0x0, %eax
testl %ecx, %ecx
js 0x7a4e
movl 0xdd6d(%rip), %eax      # 0x157b4
decl %eax
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0xdd98(%rip)      # 0x157ec
movl 0xdd96(%rip), %ecx      # 0x157f0
testl %ecx, %ecx
js 0x7a6f
movl 0xdd4b(%rip), %r9d      # 0x157b0
decl %r9d
cmpl %r9d, %ecx
cmovll %ecx, %r9d
movl %r9d, 0xdd7a(%rip)      # 0x157f0
movq 0xdd3b(%rip), %rcx      # 0x157b8
movslq %r9d, %rdx
movq (%rcx,%rdx,8), %rdi
movslq %eax, %rdx
shlq $0x4, %rdx
testb $0x4, 0x5(%rdi,%rdx)
je 0x7a9a
decl %eax
movl %eax, 0xdd52(%rip)      # 0x157ec
movslq 0xdd43(%rip), %rsi      # 0x157e4
movq (%rcx,%rsi,8), %rcx
movq %rbx, %rdx
shlq $0x4, %rdx
movl 0x4(%rcx,%rdx), %edx
shll $0x5, %edx
movswl %dx, %r12d
sarl $0xf, %r12d
addl %ebx, %r12d
movslq 0xdceb(%rip), %r13      # 0x157b0
testq %r13, %r13
jle 0x7b32
movl 0xdce4(%rip), %ebx      # 0x157b4
movq 0xdcf1(%rip), %rax      # 0x157c8
xorl %r14d, %r14d
cmpl $0x0, (%rax,%r14,4)
je 0x7b07
movl $0x0, (%rax,%r14,4)
movq 0xdcc8(%rip), %rax      # 0x157b8
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0xa64f
movq 0xdcc1(%rip), %rax      # 0x157c8
incq %r14
cmpq %r14, %r13
jne 0x7ada
movslq 0xdcce(%rip), %rsi      # 0x157e4
movq 0xdc9b(%rip), %rdx      # 0x157b8
movq (%rdx,%rsi,8), %rcx
movl 0xdcc5(%rip), %eax      # 0x157ec
movslq 0xdcc2(%rip), %r9       # 0x157f0
movq (%rdx,%r9,8), %rdi
movslq %r12d, %rbx
movq %rbx, %r10
shlq $0x4, %r10
movslq %eax, %r8
movq %r8, %rax
shlq $0x4, %rax
movq (%rcx,%r10), %rdx
movq 0x8(%rcx,%r10), %rcx
movups (%rdi,%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebx, %edi
callq 0xa2d3
movl %ebx, 0xdc7e(%rip)      # 0x157ec
movl 0xdc70(%rip), %eax      # 0x157e4
movl %eax, 0xdc76(%rip)      # 0x157f0
callq 0xb20e
movl 0xdc67(%rip), %edi      # 0x157ec
movl 0xdc65(%rip), %esi      # 0x157f0
cmpl %edi, %r15d
jne 0x7ba3
cmpl %esi, %ebp
jne 0x7ba3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb28f