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

	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--;

	drawregion(0, 0, term.col, term.row);
	xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
			term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
	term.ocx = cx, term.ocy = term.c.y;
	xfinishdraw();
	xximspot(term.ocx, term.ocy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10c72(%rip), %eax     # 0x18d70
movl %eax, -0x4(%rbp)
callq 0xc430
cmpl $0x0, %eax
jne 0x8110
jmp 0x82d6
cmpl $0x0, 0x10c65(%rip)     # 0x18d7c
jge 0x8120
xorl %eax, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8150
movl 0x10c56(%rip), %eax     # 0x18d7c
movl 0x10c18(%rip), %ecx     # 0x18d44
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x8141
movl 0x10c0b(%rip), %eax     # 0x18d44
subl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x814a
movl 0x10c35(%rip), %eax     # 0x18d7c
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, 0x10c23(%rip)     # 0x18d7c
cmpl $0x0, 0x10c20(%rip)     # 0x18d80
jge 0x8169
xorl %eax, %eax
movl %eax, -0x24(%rbp)
jmp 0x8199
movl 0x10c11(%rip), %eax     # 0x18d80
movl 0x10bcb(%rip), %ecx     # 0x18d40
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x818a
movl 0x10bbe(%rip), %eax     # 0x18d40
subl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x8193
movl 0x10bf0(%rip), %eax     # 0x18d80
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, 0x10bde(%rip)     # 0x18d80
movq 0x10b9f(%rip), %rax     # 0x18d48
movslq 0x10bd0(%rip), %rcx     # 0x18d80
movq (%rax,%rcx,8), %rax
movslq 0x10bc1(%rip), %rcx     # 0x18d7c
shlq $0x4, %rcx
addq %rcx, %rax
movzwl 0x4(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x81df
movl 0x10ba6(%rip), %eax     # 0x18d7c
addl $-0x1, %eax
movl %eax, 0x10b9d(%rip)     # 0x18d7c
movq 0x10b62(%rip), %rax     # 0x18d48
movslq 0x10b87(%rip), %rcx     # 0x18d74
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 0x8213
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
movl 0x10b2b(%rip), %edx     # 0x18d44
movl 0x10b21(%rip), %ecx     # 0x18d40
xorl %esi, %esi
movl %esi, %edi
callq 0x82e0
movl -0x4(%rbp), %edi
movl 0x10b43(%rip), %esi     # 0x18d74
movq 0x10b10(%rip), %rax     # 0x18d48
movslq 0x10b35(%rip), %rcx     # 0x18d74
movq (%rax,%rcx,8), %rcx
movslq -0x4(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movl 0x10b27(%rip), %r8d     # 0x18d7c
movl 0x10b24(%rip), %r9d     # 0x18d80
movq 0x10ae5(%rip), %rax     # 0x18d48
movslq 0x10b16(%rip), %rdx     # 0x18d80
movq (%rax,%rdx,8), %rax
movslq 0x10b07(%rip), %rdx     # 0x18d7c
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq 0x8(%rcx), %rcx
movq (%rax), %r10
movq %r10, -0x18(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
leaq -0x18(%rbp), %rax
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0xbfb0
movl -0x4(%rbp), %eax
movl %eax, 0x10ac8(%rip)     # 0x18d7c
movl 0x10aba(%rip), %eax     # 0x18d74
movl %eax, 0x10ac0(%rip)     # 0x18d80
callq 0xd330
movl 0x10ab1(%rip), %edi     # 0x18d7c
movl 0x10aaf(%rip), %esi     # 0x18d80
callq 0xd3f0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)