// File: /workspace/github_c_makefile_star2_O1/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 0xdfd4(%rip), %rbx      # 0x157f0
movl 0xdfd9(%rip), %r15d     # 0x157fc
movl 0xdfd7(%rip), %ebp      # 0x15800
callq 0xa358
testl %eax, %eax
je 0x798d
movl 0xdfc0(%rip), %edx      # 0x157fc
xorl %ecx, %ecx
movl $0x0, %eax
testl %edx, %edx
js 0x7854
movl 0xdf77(%rip), %eax      # 0x157c4
decl %eax
cmpl %eax, %edx
cmovll %edx, %eax
movl %eax, 0xdfa2(%rip)      # 0x157fc
movl 0xdfa0(%rip), %edx      # 0x15800
testl %edx, %edx
js 0x7871
movl 0xdf56(%rip), %ecx      # 0x157c0
decl %ecx
cmpl %ecx, %edx
cmovll %edx, %ecx
movl %ecx, 0xdf89(%rip)      # 0x15800
movq 0xdf4a(%rip), %rdx      # 0x157c8
movslq %ecx, %rcx
movq (%rdx,%rcx,8), %rcx
movslq %eax, %rsi
shlq $0x4, %rsi
testb $0x4, 0x5(%rcx,%rsi)
je 0x789b
decl %eax
movl %eax, 0xdf61(%rip)      # 0x157fc
movslq 0xdf52(%rip), %rax      # 0x157f4
movq (%rdx,%rax,8), %rax
movq %rbx, %rcx
shlq $0x4, %rcx
movl 0x4(%rax,%rcx), %eax
shll $0x5, %eax
movswl %ax, %r12d
sarl $0xf, %r12d
addl %ebx, %r12d
movslq 0xdefa(%rip), %r13      # 0x157c0
testq %r13, %r13
jle 0x7909
movl 0xdef3(%rip), %ebx      # 0x157c4
xorl %r14d, %r14d
movq 0xdefd(%rip), %rax      # 0x157d8
cmpl $0x0, (%rax,%r14,4)
je 0x7901
movl $0x0, (%rax,%r14,4)
movq 0xded7(%rip), %rax      # 0x157c8
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq 0xa362
incq %r14
cmpq %r14, %r13
jne 0x78d4
movslq 0xdee4(%rip), %rsi      # 0x157f4
movq 0xdeb1(%rip), %rax      # 0x157c8
movq (%rax,%rsi,8), %rcx
movslq %r12d, %rbx
movq %rbx, %rdi
shlq $0x4, %rdi
movslq 0xded0(%rip), %r8       # 0x157fc
movslq 0xdecd(%rip), %r9       # 0x15800
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, 0x10(%rsp)
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rsp)
movl %ebx, %edi
callq 0x9fe1
movl %ebx, 0xde95(%rip)      # 0x157fc
movl 0xde87(%rip), %eax      # 0x157f4
movl %eax, 0xde8d(%rip)      # 0x15800
callq 0xaf3c
movl 0xde7e(%rip), %edi      # 0x157fc
movl 0xde7c(%rip), %esi      # 0x15800
cmpl %edi, %r15d
jne 0x799c
cmpl %esi, %ebp
jne 0x799c
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 0xafbd