// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: clearview
void clearview(int dacol)
{
	int y, dx;
	intptr_t p;

	if (qsetmode != 200) return;

#if USE_POLYMOST && USE_OPENGL
	if (rendmode == 3) {
		palette_t p;
		if (usegammabrightness) p = curpalette[dacol];
		else {
			p.r = britable[curbrightness][ curpalette[dacol].r ];
			p.g = britable[curbrightness][ curpalette[dacol].g ];
			p.b = britable[curbrightness][ curpalette[dacol].b ];
		}
		glfunc.glClearColor(((float)p.r)/255.0,
					  ((float)p.g)/255.0,
					  ((float)p.b)/255.0,
					  0);
		glfunc.glScissor(windowx1,yres-(windowy2+1),windowx2-windowx1+1,windowy2-windowy1+1);
		glfunc.glEnable(GL_SCISSOR_TEST);
		glfunc.glClear(GL_COLOR_BUFFER_BIT);
		glfunc.glDisable(GL_SCISSOR_TEST);
		return;
	}
#endif

	dx = windowx2-windowx1+1;
	dacol += (dacol<<8); dacol += (dacol<<16);
	p = frameplace+ylookup[windowy1]+windowx1;
	for(y=windowy1;y<=windowy2;y++) {
		clearbufbyte((void*)p,dx,dacol);
		p += ylookup[1];
	}

	faketimerhandler();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
cmpl $0xc8, 0x19d6e3(%rip)   # 0x1f5588
je 0x57eac
jmp 0x580c9
leaq 0x595a6d(%rip), %rax    # 0x5ed920
cmpl $0x3, (%rax)
jne 0x58030
cmpl $0x0, 0x88db9(%rip)     # 0xe0c7c
je 0x57edb
movslq -0x4(%rbp), %rcx
leaq 0x419330(%rip), %rax    # 0x471200
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
jmp 0x57f5b
movslq 0x19d682(%rip), %rcx    # 0x1f5564
leaq 0x419b17(%rip), %rax    # 0x471a00
shlq $0x8, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rdx
leaq 0x419305(%rip), %rcx    # 0x471200
movzbl (%rcx,%rdx,4), %ecx
movb (%rax,%rcx), %al
movb %al, -0x1c(%rbp)
movslq 0x19d658(%rip), %rcx    # 0x1f5564
leaq 0x419aed(%rip), %rax    # 0x471a00
shlq $0x8, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rdx
leaq 0x4192db(%rip), %rcx    # 0x471200
movzbl 0x1(%rcx,%rdx,4), %ecx
movb (%rax,%rcx), %al
movb %al, -0x1b(%rbp)
movslq 0x19d62d(%rip), %rcx    # 0x1f5564
leaq 0x419ac2(%rip), %rax    # 0x471a00
shlq $0x8, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rdx
leaq 0x4192b0(%rip), %rcx    # 0x471200
movzbl 0x2(%rcx,%rdx,4), %ecx
movb (%rax,%rcx), %al
movb %al, -0x1a(%rbp)
leaq 0x5957ae(%rip), %rax    # 0x5ed710
movq (%rax), %rax
movzbl -0x1c(%rbp), %ecx
cvtsi2ss %ecx, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x5ada7(%rip), %xmm2    # 0xb2d20
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movzbl -0x1b(%rbp), %ecx
cvtsi2ss %ecx, %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
movzbl -0x1a(%rbp), %ecx
cvtsi2ss %ecx, %xmm2
cvtss2sd %xmm2, %xmm2
movsd 0x5ad77(%rip), %xmm3    # 0xb2d20
divsd %xmm3, %xmm2
cvtsd2ss %xmm2, %xmm2
xorps %xmm3, %xmm3
callq *%rax
leaq 0x595753(%rip), %rax    # 0x5ed710
movq 0x88(%rax), %rax
movl 0x3b6186(%rip), %edi    # 0x40e150
leaq 0x88427(%rip), %rcx     # 0xe03f8
movl (%rcx), %esi
movl 0x3ead6b(%rip), %ecx    # 0x442d44
addl $0x1, %ecx
subl %ecx, %esi
movl 0x3ead5c(%rip), %edx    # 0x442d40
subl 0x3b6166(%rip), %edx    # 0x40e150
addl $0x1, %edx
movl 0x3ead51(%rip), %ecx    # 0x442d44
subl 0x3b77e7(%rip), %ecx    # 0x40f7e0
addl $0x1, %ecx
callq *%rax
movl $0xc11, %edi            # imm = 0xC11
leaq 0x595706(%rip), %rax    # 0x5ed710
callq *0x40(%rax)
movl $0x4000, %edi           # imm = 0x4000
leaq 0x5956f7(%rip), %rax    # 0x5ed710
callq *0x8(%rax)
movl $0xc11, %edi            # imm = 0xC11
leaq 0x5956e8(%rip), %rax    # 0x5ed710
callq *0x48(%rax)
jmp 0x580c9
movl 0x3ead0a(%rip), %eax    # 0x442d40
subl 0x3b6114(%rip), %eax    # 0x40e150
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
shll $0x8, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0x10, %eax
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq 0x162baf(%rip), %rax    # 0x1bac10
movq (%rax), %rax
movslq 0x3b7775(%rip), %rdx    # 0x40f7e0
leaq 0x3f9a0e(%rip), %rcx    # 0x451a80
movslq (%rcx,%rdx,4), %rcx
addq %rcx, %rax
movslq 0x3b60d0(%rip), %rcx    # 0x40e150
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl 0x3b7753(%rip), %eax    # 0x40f7e0
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x3eacab(%rip), %eax    # 0x442d44
jg 0x580c4
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x4(%rbp), %edx
callq 0x6ee60
movslq 0x3f99d3(%rip), %rax    # 0x451a84
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x58090
callq 0xc220
addq $0x20, %rsp
popq %rbp
retq
nop