// File: /workspace/github_c_makefile_star2_O2/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 $0x38, %rsp
movslq 0xd590(%rip), %r12      # 0x147e0
movl 0xd596(%rip), %ebx      # 0x147ec
movl 0xd593(%rip), %r15d     # 0x147f0
callq 0x9c99
testl %eax, %eax
je 0x73c6
movl 0xd57c(%rip), %edx      # 0x147ec
xorl %ecx, %ecx
movl $0x0, %eax
testl %edx, %edx
js 0x7288
movl 0xd533(%rip), %eax      # 0x147b4
decl %eax
cmpl %eax, %edx
cmovll %edx, %eax
movl %eax, 0xd55e(%rip)      # 0x147ec
movl 0xd55c(%rip), %edx      # 0x147f0
testl %edx, %edx
js 0x72a5
movl 0xd512(%rip), %ecx      # 0x147b0
decl %ecx
cmpl %ecx, %edx
cmovll %edx, %ecx
movl %ebx, 0x1c(%rsp)
movl %ecx, 0xd541(%rip)      # 0x147f0
movq 0xd502(%rip), %rdx      # 0x147b8
movslq %ecx, %rcx
movq (%rdx,%rcx,8), %rcx
movslq %eax, %rsi
shlq $0x4, %rsi
testb $0x4, 0x5(%rcx,%rsi)
je 0x72d3
decl %eax
movl %eax, 0xd519(%rip)      # 0x147ec
movslq 0xd50a(%rip), %rax      # 0x147e4
movq (%rdx,%rax,8), %rax
movq %r12, %rcx
shlq $0x4, %rcx
movl 0x4(%rax,%rcx), %eax
shll $0x5, %eax
movswl %ax, %r13d
sarl $0xf, %r13d
movl 0xd4ba(%rip), %ebx      # 0x147b4
movl 0xd4b0(%rip), %ebp      # 0x147b0
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
cmpq %r14, %rbp
je 0x733d
movq 0xd4b3(%rip), %rax      # 0x147c8
cmpl $0x0, (%rax,%r14,4)
je 0x7338
andl $0x0, (%rax,%r14,4)
movq 0xd490(%rip), %rax      # 0x147b8
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x9ca3
incq %r14
jmp 0x7309
addl %r13d, %r12d
movslq 0xd49d(%rip), %rsi      # 0x147e4
movq 0xd46a(%rip), %rax      # 0x147b8
movq (%rax,%rsi,8), %rcx
movslq %r12d, %rbx
movq %rbx, %rdi
shlq $0x4, %rdi
movslq 0xd489(%rip), %r8       # 0x147ec
movslq 0xd486(%rip), %r9       # 0x147f0
movq (%rax,%r9,8), %rax
movq %r8, %r10
shlq $0x4, %r10
movq (%rcx,%rdi), %rdx
movq 0x8(%rcx,%rdi), %rcx
movups (%rax,%r10), %xmm0
movaps %xmm0, 0x20(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebx, %edi
callq 0x993f
movl %ebx, 0xd44e(%rip)      # 0x147ec
movl 0xd440(%rip), %eax      # 0x147e4
movl %eax, 0xd446(%rip)      # 0x147f0
callq 0xa72d
movl 0xd437(%rip), %edi      # 0x147ec
movl 0xd435(%rip), %esi      # 0x147f0
cmpl %edi, 0x1c(%rsp)
jne 0x73d5
cmpl %esi, %r15d
jne 0x73d5
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa7b8