// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setviewback
void setviewback(void)
{
	int i, j, k;

	if (setviewcnt <= 0) return;
	setviewcnt--;

	offscreenrendering = (setviewcnt>0);
#if USE_POLYMOST
	if (setviewcnt == 0) {
		rendmode = bakrendmode;
#if USE_OPENGL
		invalidatetile(baktile,-1,-1);
#endif
	}
#endif

	setview(bakwindowx1[setviewcnt],bakwindowy1[setviewcnt],
			  bakwindowx2[setviewcnt],bakwindowy2[setviewcnt]);
	copybufbyte(&bakumost[windowx1],&startumost[windowx1],(windowx2-windowx1+1)*sizeof(startumost[0]));
	copybufbyte(&bakdmost[windowx1],&startdmost[windowx1],(windowx2-windowx1+1)*sizeof(startdmost[0]));
	frameplace = bakframeplace[setviewcnt];
	if (setviewcnt == 0)
		k = bakxsiz[0];
	else
		k = max(bakxsiz[setviewcnt-1],bakxsiz[setviewcnt]);
	j = 0; for(i=0;i<=k;i++) ylookup[i] = j, j += bytesperline;
	setvlinebpl(bytesperline);
}

// Assembly:
movl 0x3fb7c7(%rip), %eax    # 0x4381d0
testl %eax, %eax
jle 0x3cb1b
pushq %rax
cmpl $0x1, %eax
leaq 0x14169c(%rip), %rcx    # 0x17e0b8
setne (%rcx)
decl %eax
movl %eax, 0x3fb7a9(%rip)    # 0x4381d0
jne 0x3ca54
movl 0x3fb811(%rip), %eax    # 0x438240
leaq 0x5bdf1a(%rip), %rcx    # 0x5fa950
movl %eax, (%rcx)
movswl 0x3fb805(%rip), %edi    # 0x438244
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x3cc57
movl 0x3fb77c(%rip), %eax    # 0x4381d0
cltq
leaq 0x3fb7a3(%rip), %rcx    # 0x438200
movl (%rcx,%rax,4), %edi
leaq 0x3fb7a9(%rip), %rcx    # 0x438210
movl (%rcx,%rax,4), %esi
leaq 0x3fb7af(%rip), %rcx    # 0x438220
movl (%rcx,%rax,4), %edx
leaq 0x3fb7b5(%rip), %rcx    # 0x438230
movl (%rcx,%rax,4), %ecx
callq 0x3419e
movslq 0x3952e6(%rip), %rax    # 0x3d1d70
leaq 0x3fb7bf(%rip), %rcx    # 0x438250
leaq (%rcx,%rax,2), %rdi
leaq 0x3934d4(%rip), %rcx    # 0x3cff70
leaq (%rcx,%rax,2), %rsi
movl 0x3cb53a(%rip), %ecx    # 0x407fe0
subl %eax, %ecx
leal 0x2(,%rcx,2), %edx
callq 0x4d437
movslq 0x3952b5(%rip), %rax    # 0x3d1d70
leaq 0x3fd58e(%rip), %rcx    # 0x43a050
leaq (%rcx,%rax,2), %rdi
leaq 0x3952b3(%rip), %rcx    # 0x3d1d80
leaq (%rcx,%rax,2), %rsi
movl 0x3cb509(%rip), %ecx    # 0x407fe0
subl %eax, %ecx
leal 0x2(,%rcx,2), %edx
callq 0x4d437
movslq 0x3fb6e4(%rip), %rax    # 0x4381d0
leaq 0x3fb6ed(%rip), %rcx    # 0x4381e0
movq (%rcx,%rax,8), %rcx
leaq 0x1415b2(%rip), %rdx    # 0x17e0b0
movq %rcx, (%rdx)
testq %rax, %rax
je 0x3cb1c
leaq 0x3fb6b3(%rip), %rcx    # 0x4381c0
movl -0x4(%rcx,%rax,4), %edx
movl (%rcx,%rax,4), %eax
cmpl %eax, %edx
cmovgl %edx, %eax
jmp 0x3cb22
retq
movl 0x3fb69e(%rip), %eax    # 0x4381c0
leaq 0x14175b(%rip), %rcx    # 0x17e284
movl (%rcx), %edi
testl %eax, %eax
js 0x3cc51
movd %eax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %eax
andl $0x1fffffff, %eax       # imm = 0x1FFFFFFF
shlq $0x4, %rax
addq $0x10, %rax
leal (%rdi,%rdi,2), %ecx
leal (,%rdi,4), %edx
leal (%rdi,%rdi), %esi
movdqa 0x3756f(%rip), %xmm1    # 0x740d0
movdqa 0x37577(%rip), %xmm2    # 0x740e0
xorl %r8d, %r8d
movdqa 0x3757c(%rip), %xmm3    # 0x740f0
pxor %xmm3, %xmm0
leaq 0x3da121(%rip), %r9     # 0x416ca0
pcmpeqd %xmm4, %xmm4
movdqa 0x3a515(%rip), %xmm5    # 0x770a0
xorl %r10d, %r10d
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r11d
notl %r11d
testb $0x1, %r11b
je 0x3cbc9
movl %r8d, (%r10,%r9)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %r11d
testb $0x1, %r11b
je 0x3cbe2
leal (%rdi,%r8), %r11d
movl %r11d, 0x4(%r10,%r9)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %r11d
testb $0x1, %r11b
je 0x3cc24
leal (%rsi,%r8), %r11d
movl %r11d, 0x8(%r10,%r9)
pextrw $0x4, %xmm6, %r11d
testb $0x1, %r11b
je 0x3cc39
leal (%rcx,%r8), %r11d
movl %r11d, 0xc(%r10,%r9)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %r10
addl %edx, %r8d
cmpq %r10, %rax
jne 0x3cb8e
popq %rax
jmp 0x6fa48