// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: drawline2d
static void drawline2d (float x0, float y0, float x1, float y1, unsigned char col)
{
	float f, dx, dy, fxres, fyres;
	int e, inc, x, y;
	unsigned int up16;

	dx = x1-x0; dy = y1-y0; if ((dx == 0) && (dy == 0)) return;
	fxres = (float)xdimen; fyres = (float)ydimen;
		  if (x0 >= fxres) { if (x1 >= fxres) return; y0 += (fxres-x0)*dy/dx; x0 = fxres; }
	else if (x0 <      0) { if (x1 <      0) return; y0 += (    0-x0)*dy/dx; x0 =     0; }
		  if (x1 >= fxres) {                          y1 += (fxres-x1)*dy/dx; x1 = fxres; }
	else if (x1 <      0) {                          y1 += (    0-x1)*dy/dx; x1 =     0; }
		  if (y0 >= fyres) { if (y1 >= fyres) return; x0 += (fyres-y0)*dx/dy; y0 = fyres; }
	else if (y0 <      0) { if (y1 <      0) return; x0 += (    0-y0)*dx/dy; y0 =     0; }
		  if (y1 >= fyres) {                          x1 += (fyres-y1)*dx/dy; y1 = fyres; }
	else if (y1 <      0) {                          x1 += (    0-y1)*dx/dy; y1 =     0; }

	if (fabs(dx) > fabs(dy))
	{
		if (x0 > x1) { f = x0; x0 = x1; x1 = f; f = y0; y0 = y1; y1 = f; }
		y = (int)(y0*65536.f)+32768;
		inc = (int)(dy/dx*65536.f+.5f);
		x = (int)(x0+.5); if (x < 0) { y -= inc*x; x = 0; } //if for safety
		e = (int)(x1+.5); if (e > xdimen) e = xdimen;       //if for safety
		up16 = (ydimen<<16);
		for(;x<e;x++,y+=inc) if ((unsigned int)y < up16) *(unsigned char *)(ylookup[y>>16]+x+frameoffset) = col;
	}
	else
	{
		if (y0 > y1) { f = x0; x0 = x1; x1 = f; f = y0; y0 = y1; y1 = f; }
		x = (int)(x0*65536.f)+32768;
		inc = (int)(dx/dy*65536.f+.5f);
		y = (int)(y0+.5); if (y < 0) { x -= inc*y; y = 0; } //if for safety
		e = (int)(y1+.5); if (e > ydimen) e = ydimen;       //if for safety
		up16 = (xdimen<<16);
		for(;y<e;y++,x+=inc) if ((unsigned int)x < up16) *(unsigned char *)(ylookup[y]+(x>>16)+frameoffset) = col;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movss %xmm0, -0x4(%rbp)
movss %xmm1, -0x8(%rbp)
movss %xmm2, -0xc(%rbp)
movss %xmm3, -0x10(%rbp)
movb %al, -0x11(%rbp)
movss -0xc(%rbp), %xmm0
subss -0x4(%rbp), %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x10(%rbp), %xmm0
subss -0x8(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x1c(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x7853f
jp 0x7853f
movss -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x7853f
jp 0x7853f
jmp 0x78a0a
leaq 0x687da(%rip), %rax     # 0xe0d20
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x24(%rbp)
leaq 0x24009e(%rip), %rax    # 0x2b85f4
cvtsi2ssl (%rax), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x4(%rbp), %xmm0
ucomiss -0x24(%rbp), %xmm0
jb 0x785a4
movss -0xc(%rbp), %xmm0
ucomiss -0x24(%rbp), %xmm0
jb 0x7857a
jmp 0x78a0a
movss -0x24(%rbp), %xmm0
subss -0x4(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x24(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x785e1
xorps %xmm0, %xmm0
ucomiss -0x4(%rbp), %xmm0
jbe 0x785df
xorps %xmm0, %xmm0
ucomiss -0xc(%rbp), %xmm0
jbe 0x785bb
jmp 0x78a0a
xorps %xmm0, %xmm0
subss -0x4(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
addss -0x8(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x4(%rbp)
jmp 0x785e1
movss -0xc(%rbp), %xmm0
ucomiss -0x24(%rbp), %xmm0
jb 0x78616
movss -0x24(%rbp), %xmm0
subss -0xc(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
addss -0x10(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
movss -0x24(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
jmp 0x78645
xorps %xmm0, %xmm0
ucomiss -0xc(%rbp), %xmm0
jbe 0x78643
xorps %xmm0, %xmm0
subss -0xc(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
addss -0x10(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
jmp 0x78645
movss -0x8(%rbp), %xmm0
ucomiss -0x28(%rbp), %xmm0
jb 0x7868a
movss -0x10(%rbp), %xmm0
ucomiss -0x28(%rbp), %xmm0
jb 0x78660
jmp 0x78a0a
movss -0x28(%rbp), %xmm0
subss -0x8(%rbp), %xmm0
mulss -0x1c(%rbp), %xmm0
divss -0x20(%rbp), %xmm0
addss -0x4(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
jmp 0x786c7
xorps %xmm0, %xmm0
ucomiss -0x8(%rbp), %xmm0
jbe 0x786c5
xorps %xmm0, %xmm0
ucomiss -0x10(%rbp), %xmm0
jbe 0x786a1
jmp 0x78a0a
xorps %xmm0, %xmm0
subss -0x8(%rbp), %xmm0
mulss -0x1c(%rbp), %xmm0
divss -0x20(%rbp), %xmm0
addss -0x4(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x8(%rbp)
jmp 0x786c7
movss -0x10(%rbp), %xmm0
ucomiss -0x28(%rbp), %xmm0
jb 0x786fc
movss -0x28(%rbp), %xmm0
subss -0x10(%rbp), %xmm0
mulss -0x1c(%rbp), %xmm0
divss -0x20(%rbp), %xmm0
addss -0xc(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss -0x28(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x7872b
xorps %xmm0, %xmm0
ucomiss -0x10(%rbp), %xmm0
jbe 0x78729
xorps %xmm0, %xmm0
subss -0x10(%rbp), %xmm0
mulss -0x1c(%rbp), %xmm0
divss -0x20(%rbp), %xmm0
addss -0xc(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
jmp 0x7872b
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x3cee5(%rip), %xmm1    # 0xb5620
pand %xmm1, %xmm0
movss -0x20(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
movaps 0x3ced1(%rip), %xmm2    # 0xb5620
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x788b5
movss -0x4(%rbp), %xmm0
ucomiss -0xc(%rbp), %xmm0
jbe 0x787a4
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x18(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
movss 0x3a64c(%rip), %xmm0    # 0xb2df8
mulss -0x8(%rbp), %xmm0
cvttss2si %xmm0, %eax
addl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x38(%rbp)
movss -0x20(%rbp), %xmm0
divss -0x1c(%rbp), %xmm0
movss 0x3a629(%rip), %xmm1    # 0xb2df8
mulss %xmm1, %xmm0
movss 0x3dded(%rip), %xmm1    # 0xb65c8
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x30(%rbp)
movss -0x4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3dc59(%rip), %xmm1    # 0xb6450
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jge 0x7881e
movl -0x30(%rbp), %ecx
imull -0x34(%rbp), %ecx
movl -0x38(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3dc21(%rip), %xmm1    # 0xb6450
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
leaq 0x684dc(%rip), %rcx     # 0xe0d20
cmpl (%rcx), %eax
jle 0x78854
leaq 0x684d1(%rip), %rax     # 0xe0d20
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
leaq 0x23fd99(%rip), %rax    # 0x2b85f4
movl (%rax), %eax
shll $0x10, %eax
movl %eax, -0x3c(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x788b0
movl -0x38(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x7889a
movb -0x11(%rbp), %cl
movl -0x38(%rbp), %eax
sarl $0x10, %eax
movslq %eax, %rdx
leaq 0x3d91fa(%rip), %rax    # 0x451a80
movl (%rax,%rdx,4), %eax
addl -0x34(%rbp), %eax
cltq
leaq 0x399c5b(%rip), %rdx    # 0x4124f0
addq (%rdx), %rax
movb %cl, (%rax)
jmp 0x7889c
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x78863
jmp 0x78a0a
movss -0x8(%rbp), %xmm0
ucomiss -0x10(%rbp), %xmm0
jbe 0x788fc
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x18(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0xc(%rbp)
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x10(%rbp)
movss 0x3a4f4(%rip), %xmm0    # 0xb2df8
mulss -0x4(%rbp), %xmm0
cvttss2si %xmm0, %eax
addl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x34(%rbp)
movss -0x1c(%rbp), %xmm0
divss -0x20(%rbp), %xmm0
movss 0x3a4d1(%rip), %xmm1    # 0xb2df8
mulss %xmm1, %xmm0
movss 0x3dc95(%rip), %xmm1    # 0xb65c8
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x30(%rbp)
movss -0x8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3db01(%rip), %xmm1    # 0xb6450
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jge 0x78976
movl -0x30(%rbp), %ecx
imull -0x38(%rbp), %ecx
movl -0x34(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x3dac9(%rip), %xmm1    # 0xb6450
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
leaq 0x23fc58(%rip), %rcx    # 0x2b85f4
cmpl (%rcx), %eax
jle 0x789ac
leaq 0x23fc4d(%rip), %rax    # 0x2b85f4
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
leaq 0x6836d(%rip), %rax     # 0xe0d20
movl (%rax), %eax
shll $0x10, %eax
movl %eax, -0x3c(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x78a08
movl -0x34(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jae 0x789f2
movb -0x11(%rbp), %cl
movslq -0x38(%rbp), %rdx
leaq 0x3d90a7(%rip), %rax    # 0x451a80
movl (%rax,%rdx,4), %eax
movl -0x34(%rbp), %edx
sarl $0x10, %edx
addl %edx, %eax
cltq
leaq 0x399b03(%rip), %rdx    # 0x4124f0
addq (%rdx), %rax
movb %cl, (%rax)
jmp 0x789f4
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl -0x34(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x789bb
jmp 0x78a0a
popq %rbp
retq
nopl (%rax)