// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: drawtrap
static void drawtrap (float x0, float x1, float y0, float x2, float x3, float y1,
	struct polymostdrawpolycall *draw)
{
	float px[4], py[4];
	int i, n;
	struct polymostvboitem vboitem[4];

	if (y0 == y1) return;
	px[0] = x0; py[0] = y0;  py[2] = y1;
		  if (x0 == x1) { px[1] = x3; py[1] = y1; px[2] = x2; n = 3; }
	else if (x2 == x3) { px[1] = x1; py[1] = y0; px[2] = x3; n = 3; }
	else               { px[1] = x1; py[1] = y0; px[2] = x3; px[3] = x2; py[3] = y1; n = 4; }

	for(i=0;i<n;i++)
	{
		px[i] = min(max(px[i],trapextx[0]),trapextx[1]);
		vboitem[i].t.s = px[i]*gux + py[i]*guy + guo;
		vboitem[i].t.t = px[i]*gvx + py[i]*gvy + gvo;
		vboitem[i].v.x = px[i];
		vboitem[i].v.y = py[i];
		vboitem[i].v.z = 0.f;
	}
	draw->indexcount = n;
	draw->elementcount = n;
	draw->elementvbo = vboitem;
	polymost_drawpoly_glcall(GL_TRIANGLE_FAN, draw);
	draw->elementvbo = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movss %xmm0, -0x4(%rbp)
movss %xmm1, -0x8(%rbp)
movss %xmm2, -0xc(%rbp)
movss %xmm3, -0x10(%rbp)
movss %xmm4, -0x14(%rbp)
movss %xmm5, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movss -0xc(%rbp), %xmm0
ucomiss -0x18(%rbp), %xmm0
jne 0x8dc5f
jp 0x8dc5f
jmp 0x8df3e
movss -0x4(%rbp), %xmm0
movss %xmm0, -0x30(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x4(%rbp), %xmm0
ucomiss -0x8(%rbp), %xmm0
jne 0x8dcb1
jp 0x8dcb1
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movl $0x3, -0x48(%rbp)
jmp 0x8dd20
movss -0x10(%rbp), %xmm0
ucomiss -0x14(%rbp), %xmm0
jne 0x8dce5
jp 0x8dce5
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movl $0x3, -0x48(%rbp)
jmp 0x8dd1e
movss -0x8(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x10(%rbp), %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x34(%rbp)
movl $0x4, -0x48(%rbp)
jmp 0x8dd20
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x8df01
movslq -0x44(%rbp), %rax
movss -0x30(%rbp,%rax,4), %xmm0
ucomiss 0x59bea4(%rip), %xmm0   # 0x629be8
jbe 0x8dd5a
movslq -0x44(%rbp), %rax
movss -0x30(%rbp,%rax,4), %xmm0
movss %xmm0, -0xa4(%rbp)
jmp 0x8dd6a
movss 0x59be86(%rip), %xmm0   # 0x629be8
movss %xmm0, -0xa4(%rbp)
movss -0xa4(%rbp), %xmm1
movss 0x59be72(%rip), %xmm0   # 0x629bec
ucomiss %xmm1, %xmm0
jbe 0x8ddc8
movslq -0x44(%rbp), %rax
movss -0x30(%rbp,%rax,4), %xmm0
ucomiss 0x59be58(%rip), %xmm0   # 0x629be8
jbe 0x8dda6
movslq -0x44(%rbp), %rax
movss -0x30(%rbp,%rax,4), %xmm0
movss %xmm0, -0xa8(%rbp)
jmp 0x8ddb6
movss 0x59be3a(%rip), %xmm0   # 0x629be8
movss %xmm0, -0xa8(%rbp)
movss -0xa8(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
jmp 0x8ddd8
movss 0x59be1c(%rip), %xmm0   # 0x629bec
movss %xmm0, -0xac(%rbp)
movss -0xac(%rbp), %xmm0
movslq -0x44(%rbp), %rax
movss %xmm0, -0x30(%rbp,%rax,4)
movslq -0x44(%rbp), %rax
movss -0x30(%rbp,%rax,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x55fd38(%rip), %xmm2   # 0x5edb38
movslq -0x44(%rbp), %rax
movss -0x40(%rbp,%rax,4), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd 0x55fd2a(%rip), %xmm1   # 0x5edb40
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0x55fd22(%rip), %xmm0   # 0x5edb48
cvtsd2ss %xmm0, %xmm0
movslq -0x44(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0xc(%rax)
movslq -0x44(%rbp), %rax
movss -0x30(%rbp,%rax,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x55fcf9(%rip), %xmm2   # 0x5edb50
movslq -0x44(%rbp), %rax
movss -0x40(%rbp,%rax,4), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd 0x55fceb(%rip), %xmm1   # 0x5edb58
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0x55fce3(%rip), %xmm0   # 0x5edb60
cvtsd2ss %xmm0, %xmm0
movslq -0x44(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x10(%rax)
movslq -0x44(%rbp), %rax
movss -0x30(%rbp,%rax,4), %xmm0
movslq -0x44(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, (%rax)
movslq -0x44(%rbp), %rax
movss -0x40(%rbp,%rax,4), %xmm0
movslq -0x44(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movss %xmm0, 0x4(%rax)
movslq -0x44(%rbp), %rcx
leaq -0xa0(%rbp), %rax
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x8dd27
movl -0x48(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x44(%rax)
movl -0x48(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4c(%rax)
leaq -0xa0(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x20(%rbp), %rsi
movl $0x6, %edi
callq 0x73570
movq -0x20(%rbp), %rax
movq $0x0, 0x50(%rax)
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)