// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setview
void setview(int x1, int y1, int x2, int y2)
{
	int i;
	float xfov;

	xfov = ((float)xdim / (float)ydim) / (4.f / 3.f);

	windowx1 = x1; wx1 = (x1<<12);
	windowy1 = y1; wy1 = (y1<<12);
	windowx2 = x2; wx2 = ((x2+1)<<12);
	windowy2 = y2; wy2 = ((y2+1)<<12);

	xdimen = (x2-x1)+1; halfxdimen = (xdimen>>1);
	xdimenrecip = divscale32(1L,xdimen);
	ydimen = (y2-y1)+1;

	setaspect((int)(65536.f * xfov), pixelaspect);

	for(i=0;i<windowx1;i++) { startumost[i] = 1, startdmost[i] = 0; }
	for(i=windowx1;i<=windowx2;i++)
		{ startumost[i] = windowy1, startdmost[i] = windowy2+1; }
	for(i=windowx2+1;i<xdim;i++) { startumost[i] = 1, startdmost[i] = 0; }

#if USE_POLYMOST && USE_OPENGL
	polymost_setview();
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
cvtsi2ssl 0x3f6550(%rip), %xmm0 # 0x442d4c
cvtsi2ssl 0x3f654c(%rip), %xmm1 # 0x442d50
divss %xmm1, %xmm0
movss 0x665ec(%rip), %xmm1    # 0xb2dfc
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl %eax, 0x3c192e(%rip)    # 0x40e150
movl -0x4(%rbp), %eax
shll $0xc, %eax
movl %eax, 0x4245ae(%rip)    # 0x470ddc
movl -0x8(%rbp), %eax
movl %eax, 0x3c2fa9(%rip)    # 0x40f7e0
movl -0x8(%rbp), %eax
shll $0xc, %eax
movl %eax, 0x42459d(%rip)    # 0x470de0
movl -0xc(%rbp), %eax
movl %eax, 0x3f64f4(%rip)    # 0x442d40
movl -0xc(%rbp), %eax
addl $0x1, %eax
shll $0xc, %eax
movl %eax, 0x424589(%rip)    # 0x470de4
movl -0x10(%rbp), %eax
movl %eax, 0x3f64e0(%rip)    # 0x442d44
movl -0x10(%rbp), %eax
addl $0x1, %eax
shll $0xc, %eax
movl %eax, 0x424575(%rip)    # 0x470de8
movl -0xc(%rbp), %eax
subl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, 0x9449e(%rip)     # 0xe0d20
movl 0x94498(%rip), %eax     # 0xe0d20
sarl %eax
movl %eax, 0x406e14(%rip)    # 0x4536a4
movl 0x9448a(%rip), %esi     # 0xe0d20
movl $0x1, %edi
callq 0x56e00
movl %eax, 0x424546(%rip)    # 0x470dec
movl -0x10(%rbp), %eax
subl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, 0x26bd3f(%rip)    # 0x2b85f4
movss 0x6653b(%rip), %xmm0    # 0xb2df8
mulss -0x18(%rbp), %xmm0
cvttss2si %xmm0, %edi
movl 0x40518c(%rip), %esi    # 0x451a58
callq 0x56e20
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x3c186f(%rip), %eax    # 0x40e150
jge 0x4c910
movslq -0x14(%rbp), %rcx
leaq 0x3c01e2(%rip), %rax    # 0x40cad0
movw $0x1, (%rax,%rcx,2)
movslq -0x14(%rbp), %rcx
leaq 0x3c1861(%rip), %rax    # 0x40e160
movw $0x0, (%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4c8d8
movl 0x3c183a(%rip), %eax    # 0x40e150
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x3f641e(%rip), %eax    # 0x442d40
jg 0x4c962
movl 0x3c2eb6(%rip), %eax    # 0x40f7e0
movw %ax, %dx
movslq -0x14(%rbp), %rcx
leaq 0x3c0198(%rip), %rax    # 0x40cad0
movw %dx, (%rax,%rcx,2)
movl 0x3f6402(%rip), %eax    # 0x442d44
addl $0x1, %eax
movw %ax, %dx
movslq -0x14(%rbp), %rcx
leaq 0x3c180d(%rip), %rax    # 0x40e160
movw %dx, (%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4c919
movl 0x3f63d8(%rip), %eax    # 0x442d40
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x3f63d5(%rip), %eax    # 0x442d4c
jge 0x4c9a6
movslq -0x14(%rbp), %rcx
leaq 0x3c014c(%rip), %rax    # 0x40cad0
movw $0x1, (%rax,%rcx,2)
movslq -0x14(%rbp), %rcx
leaq 0x3c17cb(%rip), %rax    # 0x40e160
movw $0x0, (%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4c96e
callq 0x733d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)