// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kddsrend
static int kddsrend (const char *buf, int leng,
	intptr_t frameptr, int bpl, int xdim, int ydim, int xoff, int yoff)
{
	int x, y, z=0, xx, yy, xsiz, ysiz, dxt, al[2], ai, j, k, v, c0, c1, stride;
	intptr_t p;
	unsigned int lut[256], r[4], g[4], b[4], a[8], rr, gg, bb;
	unsigned char *uptr, *wptr;

	(void)leng;

	xsiz = LSWAPIB(*(int *)&buf[16]);
	ysiz = LSWAPIB(*(int *)&buf[12]);
	if ((*(int *)&buf[80])&LSWAPIB(64)) //Uncompressed supports only A8R8G8B8 for now
	{
		if ((*(unsigned int *)&buf[88]) != LSWAPIB(32)) return(-1);
		if ((*(unsigned int *)&buf[92]) != LSWAPIB(0x00ff0000)) return(-1);
		if ((*(unsigned int *)&buf[96]) != LSWAPIB(0x0000ff00)) return(-1);
		if ((*(unsigned int *)&buf[100]) != LSWAPIB(0x000000ff)) return(-1);
		if ((*(unsigned int *)&buf[104]) != LSWAPIB(0xff000000)) return(-1);
		buf += 128;

		p = yoff*bpl + (xoff<<2) + frameptr; xx = (xsiz<<2);
		if (xoff < 0) { p -= (xoff<<2); buf -= (xoff<<2); xsiz += xoff; }
		xsiz = (min(xsiz,xdim-xoff)<<2); ysiz = min(ysiz,ydim);
		for(y=0;y<ysiz;y++,p+=bpl,buf+=xx)
		{
			if ((unsigned int)(y+yoff) >= (unsigned int)ydim) continue;
			memcpy((void *)p,(void *)buf,xsiz);
		}
		return(0);
	}
	if (!((*(int *)&buf[80])&LSWAPIB(4))) return(-1); //FOURCC invalid
	dxt = buf[87]-'0';
	if ((buf[84] != 'D') || (buf[85] != 'X') || (buf[86] != 'T') || (dxt < 1) || (dxt > 5)) return(-1);
	buf += 128;

	if (!(dxt&1))
	{
		for(z=256-1;z>0;z--) lut[z] = (255<<16)/z;
		lut[0] = (1<<16);
	}
	if (dxt == 1) stride = (xsiz<<1); else stride = (xsiz<<2);

	for(y=0;y<ysiz;y+=4,buf+=stride)
		for(x=0;x<xsiz;x+=4)
		{
			if (dxt == 1) uptr = (unsigned char *)(((intptr_t)buf)+(x<<1));
						else uptr = (unsigned char *)(((intptr_t)buf)+(x<<2)+8);
			c0 = SSWAPIB(*(unsigned short *)&uptr[0]);
			r[0] = ((c0>>8)&0xf8); g[0] = ((c0>>3)&0xfc); b[0] = ((c0<<3)&0xfc); a[0] = 255;
			c1 = SSWAPIB(*(unsigned short *)&uptr[2]);
			r[1] = ((c1>>8)&0xf8); g[1] = ((c1>>3)&0xfc); b[1] = ((c1<<3)&0xfc); a[1] = 255;
			if ((c0 > c1) || (dxt != 1))
			{
				r[2] = (((r[0]*2 + r[1] + 1)*(65536/3))>>16);
				g[2] = (((g[0]*2 + g[1] + 1)*(65536/3))>>16);
				b[2] = (((b[0]*2 + b[1] + 1)*(65536/3))>>16); a[2] = 255;
				r[3] = (((r[0] + r[1]*2 + 1)*(65536/3))>>16);
				g[3] = (((g[0] + g[1]*2 + 1)*(65536/3))>>16);
				b[3] = (((b[0] + b[1]*2 + 1)*(65536/3))>>16); a[3] = 255;
			}
			else
			{
				r[2] = (r[0] + r[1])>>1;
				g[2] = (g[0] + g[1])>>1;
				b[2] = (b[0] + b[1])>>1; a[2] = 255;
				r[3] = g[3] = b[3] = a[3] = 0; //Transparent
			}
			v = LSWAPIB(*(int *)&uptr[4]);
			if (dxt >= 4)
			{
				a[0] = uptr[-8]; a[1] = uptr[-7]; k = a[1]-a[0];
				if (k < 0)
				{
					z = a[0]*6 + a[1] + 3;
					for(j=2;j<8;j++) { a[j] = ((z*(65536/7))>>16); z += k; }
				}
				else
				{
					z = a[0]*4 + a[1] + 2;
					for(j=2;j<6;j++) { a[j] = ((z*(65536/5))>>16); z += k; }
					a[6] = 0; a[7] = 255;
				}
				al[0] = LSWAPIB(*(int *)&uptr[-6]);
				al[1] = LSWAPIB(*(int *)&uptr[-3]);
			}
			wptr = (unsigned char *)((y+yoff)*bpl + ((x+xoff)<<2) + frameptr);
			ai = 0;
			for(yy=0;yy<4;yy++,wptr+=bpl)
			{
				if ((unsigned int)(y+yy+yoff) >= (unsigned int)ydim) { ai += 4; continue; }
				for(xx=0;xx<4;xx++,ai++)
				{
					if ((unsigned int)(x+xx+xoff) >= (unsigned int)xdim) continue;

					j = ((v>>(ai<<1))&3);
					switch(dxt)
					{
						case 1: z = a[j]; break;
						case 2: case 3: z = (( uptr[(ai>>1)-8] >> ((xx&1)<<2) )&15)*17; break;
						case 4: case 5: z = a[( al[yy>>1] >> ((ai&7)*3) )&7]; break;
					}
					rr = r[j]; gg = g[j]; bb = b[j];
					if (!(dxt&1))
					{
						bb = min((bb*lut[z])>>16,255);
						gg = min((gg*lut[z])>>16,255);
						rr = min((rr*lut[z])>>16,255);
					}
					wptr[(xx<<2)+0] = bb;
					wptr[(xx<<2)+1] = gg;
					wptr[(xx<<2)+2] = rr;
					wptr[(xx<<2)+3] = z;
				}
			}
		}
	return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x510, %rsp            # imm = 0x510
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x670e1
movq -0x10(%rbp), %rax
cmpl $0x20, 0x58(%rax)
je 0x66f5b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67853
movq -0x10(%rbp), %rax
cmpl $0xff0000, 0x5c(%rax)   # imm = 0xFF0000
je 0x66f74
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67853
movq -0x10(%rbp), %rax
cmpl $0xff00, 0x60(%rax)     # imm = 0xFF00
je 0x66f8d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67853
movq -0x10(%rbp), %rax
cmpl $0xff, 0x64(%rax)
je 0x66fa6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67853
movq -0x10(%rbp), %rax
cmpl $0xff000000, 0x68(%rax) # imm = 0xFF000000
je 0x66fbf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67853
movq -0x10(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x10(%rbp)
movl 0x18(%rbp), %eax
imull -0x24(%rbp), %eax
movl 0x10(%rbp), %ecx
shll $0x2, %ecx
addl %ecx, %eax
cltq
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x44(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, 0x10(%rbp)
jge 0x6702b
movl 0x10(%rbp), %eax
shll $0x2, %eax
movslq %eax, %rcx
movq -0x78(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x78(%rbp)
movl 0x10(%rbp), %ecx
shll $0x2, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl 0x10(%rbp), %eax
addl -0x44(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl -0x28(%rbp), %ecx
subl 0x10(%rbp), %ecx
cmpl %ecx, %eax
jge 0x67043
movl -0x44(%rbp), %eax
movl %eax, -0x4f4(%rbp)
jmp 0x6704f
movl -0x28(%rbp), %eax
subl 0x10(%rbp), %eax
movl %eax, -0x4f4(%rbp)
movl -0x4f4(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x44(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x6706e
movl -0x48(%rbp), %eax
movl %eax, -0x4f8(%rbp)
jmp 0x67077
movl -0x2c(%rbp), %eax
movl %eax, -0x4f8(%rbp)
movl -0x4f8(%rbp), %eax
movl %eax, -0x48(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x670d5
movl -0x34(%rbp), %eax
addl 0x18(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jb 0x6709c
jmp 0x670ad
movq -0x78(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x44(%rbp), %rdx
callq 0x60c0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
movslq -0x24(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x67087
movl $0x0, -0x4(%rbp)
jmp 0x67853
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x670fc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67853
movq -0x10(%rbp), %rax
movsbl 0x57(%rax), %eax
subl $0x30, %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x54(%rax), %eax
cmpl $0x44, %eax
jne 0x6713d
movq -0x10(%rbp), %rax
movsbl 0x55(%rax), %eax
cmpl $0x58, %eax
jne 0x6713d
movq -0x10(%rbp), %rax
movsbl 0x56(%rax), %eax
cmpl $0x54, %eax
jne 0x6713d
cmpl $0x1, -0x4c(%rbp)
jl 0x6713d
cmpl $0x5, -0x4c(%rbp)
jle 0x67149
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x67853
movq -0x10(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x10(%rbp)
movl -0x4c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x6719a
movl $0xff, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jle 0x67190
movl $0xff0000, %eax         # imm = 0xFF0000
cltd
idivl -0x38(%rbp)
movl %eax, %ecx
movslq -0x38(%rbp), %rax
movl %ecx, -0x480(%rbp,%rax,4)
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x67169
movl $0x10000, -0x480(%rbp)  # imm = 0x10000
cmpl $0x1, -0x4c(%rbp)
jne 0x671aa
movl -0x44(%rbp), %eax
shll %eax
movl %eax, -0x70(%rbp)
jmp 0x671b3
movl -0x44(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x70(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x48(%rbp), %eax
jge 0x6784c
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x6782b
cmpl $0x1, -0x4c(%rbp)
jne 0x671f7
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x4e8(%rbp)
jmp 0x67212
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
addq $0x8, %rax
movq %rax, -0x4e8(%rbp)
movq -0x4e8(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
sarl $0x8, %eax
andl $0xf8, %eax
movl %eax, -0x490(%rbp)
movl -0x68(%rbp), %eax
sarl $0x3, %eax
andl $0xfc, %eax
movl %eax, -0x4a0(%rbp)
movl -0x68(%rbp), %eax
shll $0x3, %eax
andl $0xfc, %eax
movl %eax, -0x4b0(%rbp)
movl $0xff, -0x4d0(%rbp)
movq -0x4e8(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
sarl $0x8, %eax
andl $0xf8, %eax
movl %eax, -0x48c(%rbp)
movl -0x6c(%rbp), %eax
sarl $0x3, %eax
andl $0xfc, %eax
movl %eax, -0x49c(%rbp)
movl -0x6c(%rbp), %eax
shll $0x3, %eax
andl $0xfc, %eax
movl %eax, -0x4ac(%rbp)
movl $0xff, -0x4cc(%rbp)
movl -0x68(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jg 0x672b9
cmpl $0x1, -0x4c(%rbp)
je 0x67395
movl -0x490(%rbp), %eax
shll %eax
addl -0x48c(%rbp), %eax
addl $0x1, %eax
imull $0x5555, %eax, %eax     # imm = 0x5555
shrl $0x10, %eax
movl %eax, -0x488(%rbp)
movl -0x4a0(%rbp), %eax
shll %eax
addl -0x49c(%rbp), %eax
addl $0x1, %eax
imull $0x5555, %eax, %eax     # imm = 0x5555
shrl $0x10, %eax
movl %eax, -0x498(%rbp)
movl -0x4b0(%rbp), %eax
shll %eax
addl -0x4ac(%rbp), %eax
addl $0x1, %eax
imull $0x5555, %eax, %eax     # imm = 0x5555
shrl $0x10, %eax
movl %eax, -0x4a8(%rbp)
movl $0xff, -0x4c8(%rbp)
movl -0x490(%rbp), %eax
movl -0x48c(%rbp), %ecx
shll %ecx
addl %ecx, %eax
addl $0x1, %eax
imull $0x5555, %eax, %eax     # imm = 0x5555
shrl $0x10, %eax
movl %eax, -0x484(%rbp)
movl -0x4a0(%rbp), %eax
movl -0x49c(%rbp), %ecx
shll %ecx
addl %ecx, %eax
addl $0x1, %eax
imull $0x5555, %eax, %eax     # imm = 0x5555
shrl $0x10, %eax
movl %eax, -0x494(%rbp)
movl -0x4b0(%rbp), %eax
movl -0x4ac(%rbp), %ecx
shll %ecx
addl %ecx, %eax
addl $0x1, %eax
imull $0x5555, %eax, %eax     # imm = 0x5555
shrl $0x10, %eax
movl %eax, -0x4a4(%rbp)
movl $0xff, -0x4c4(%rbp)
jmp 0x67403
movl -0x490(%rbp), %eax
addl -0x48c(%rbp), %eax
shrl %eax
movl %eax, -0x488(%rbp)
movl -0x4a0(%rbp), %eax
addl -0x49c(%rbp), %eax
shrl %eax
movl %eax, -0x498(%rbp)
movl -0x4b0(%rbp), %eax
addl -0x4ac(%rbp), %eax
shrl %eax
movl %eax, -0x4a8(%rbp)
movl $0xff, -0x4c8(%rbp)
movl $0x0, -0x4c4(%rbp)
movl $0x0, -0x4a4(%rbp)
movl $0x0, -0x494(%rbp)
movl $0x0, -0x484(%rbp)
movq -0x4e8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x64(%rbp)
cmpl $0x4, -0x4c(%rbp)
jl 0x67515
movq -0x4e8(%rbp), %rax
movzbl -0x8(%rax), %eax
movl %eax, -0x4d0(%rbp)
movq -0x4e8(%rbp), %rax
movzbl -0x7(%rax), %eax
movl %eax, -0x4cc(%rbp)
movl -0x4cc(%rbp), %eax
subl -0x4d0(%rbp), %eax
movl %eax, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
jge 0x6749c
imull $0x6, -0x4d0(%rbp), %eax
addl -0x4cc(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x38(%rbp)
movl $0x2, -0x5c(%rbp)
cmpl $0x8, -0x5c(%rbp)
jge 0x6749a
imull $0x2492, -0x38(%rbp), %ecx # imm = 0x2492
sarl $0x10, %ecx
movslq -0x5c(%rbp), %rax
movl %ecx, -0x4d0(%rbp,%rax,4)
movl -0x60(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x6746b
jmp 0x674fb
movl -0x4d0(%rbp), %eax
shll $0x2, %eax
addl -0x4cc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x38(%rbp)
movl $0x2, -0x5c(%rbp)
cmpl $0x6, -0x5c(%rbp)
jge 0x674e7
imull $0x3333, -0x38(%rbp), %ecx # imm = 0x3333
sarl $0x10, %ecx
movslq -0x5c(%rbp), %rax
movl %ecx, -0x4d0(%rbp,%rax,4)
movl -0x60(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x674b8
movl $0x0, -0x4b8(%rbp)
movl $0xff, -0x4b4(%rbp)
movq -0x4e8(%rbp), %rax
movl -0x6(%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x4e8(%rbp), %rax
movl -0x3(%rax), %eax
movl %eax, -0x50(%rbp)
movl -0x34(%rbp), %eax
addl 0x18(%rbp), %eax
imull -0x24(%rbp), %eax
movl -0x30(%rbp), %ecx
addl 0x10(%rbp), %ecx
shll $0x2, %ecx
addl %ecx, %eax
cltq
addq -0x20(%rbp), %rax
movq %rax, -0x4f0(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x40(%rbp)
cmpl $0x4, -0x40(%rbp)
jge 0x6781b
movl -0x34(%rbp), %eax
addl -0x40(%rbp), %eax
addl 0x18(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jb 0x6756b
movl -0x58(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x58(%rbp)
jmp 0x677f6
movl $0x0, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jge 0x677f4
movl -0x30(%rbp), %eax
addl -0x3c(%rbp), %eax
addl 0x10(%rbp), %eax
cmpl -0x28(%rbp), %eax
jb 0x6758f
jmp 0x677dd
movl -0x64(%rbp), %eax
movb -0x58(%rbp), %cl
addb %cl, %cl
sarl %cl, %eax
andl $0x3, %eax
movl %eax, -0x5c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x4fc(%rbp)
subl $0x1, %eax
je 0x675cf
jmp 0x675af
movl -0x4fc(%rbp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0x675df
jmp 0x675bf
movl -0x4fc(%rbp), %eax
addl $-0x4, %eax
subl $0x2, %eax
jb 0x6760b
jmp 0x67630
movslq -0x5c(%rbp), %rax
movl -0x4d0(%rbp,%rax,4), %eax
movl %eax, -0x38(%rbp)
jmp 0x67630
movq -0x4e8(%rbp), %rax
movl -0x58(%rbp), %ecx
sarl %ecx
subl $0x8, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl -0x3c(%rbp), %ecx
andl $0x1, %ecx
shll $0x2, %ecx
sarl %cl, %eax
andl $0xf, %eax
imull $0x11, %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x67630
movl -0x40(%rbp), %eax
sarl %eax
cltq
movl -0x54(%rbp,%rax,4), %eax
movl -0x58(%rbp), %ecx
andl $0x7, %ecx
imull $0x3, %ecx, %ecx
sarl %cl, %eax
andl $0x7, %eax
cltq
movl -0x4d0(%rbp,%rax,4), %eax
movl %eax, -0x38(%rbp)
movslq -0x5c(%rbp), %rax
movl -0x490(%rbp,%rax,4), %eax
movl %eax, -0x4d4(%rbp)
movslq -0x5c(%rbp), %rax
movl -0x4a0(%rbp,%rax,4), %eax
movl %eax, -0x4d8(%rbp)
movslq -0x5c(%rbp), %rax
movl -0x4b0(%rbp,%rax,4), %eax
movl %eax, -0x4dc(%rbp)
movl -0x4c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x67768
movl -0x4dc(%rbp), %eax
movslq -0x38(%rbp), %rcx
imull -0x480(%rbp,%rcx,4), %eax
shrl $0x10, %eax
cmpl $0xff, %eax
jae 0x676ab
movl -0x4dc(%rbp), %eax
movslq -0x38(%rbp), %rcx
imull -0x480(%rbp,%rcx,4), %eax
shrl $0x10, %eax
movl %eax, -0x500(%rbp)
jmp 0x676b8
movl $0xff, %eax
movl %eax, -0x500(%rbp)
jmp 0x676b8
movl -0x500(%rbp), %eax
movl %eax, -0x4dc(%rbp)
movl -0x4d8(%rbp), %eax
movslq -0x38(%rbp), %rcx
imull -0x480(%rbp,%rcx,4), %eax
shrl $0x10, %eax
cmpl $0xff, %eax
jae 0x676fd
movl -0x4d8(%rbp), %eax
movslq -0x38(%rbp), %rcx
imull -0x480(%rbp,%rcx,4), %eax
shrl $0x10, %eax
movl %eax, -0x504(%rbp)
jmp 0x6770a
movl $0xff, %eax
movl %eax, -0x504(%rbp)
jmp 0x6770a
movl -0x504(%rbp), %eax
movl %eax, -0x4d8(%rbp)
movl -0x4d4(%rbp), %eax
movslq -0x38(%rbp), %rcx
imull -0x480(%rbp,%rcx,4), %eax
shrl $0x10, %eax
cmpl $0xff, %eax
jae 0x6774f
movl -0x4d4(%rbp), %eax
movslq -0x38(%rbp), %rcx
imull -0x480(%rbp,%rcx,4), %eax
shrl $0x10, %eax
movl %eax, -0x508(%rbp)
jmp 0x6775c
movl $0xff, %eax
movl %eax, -0x508(%rbp)
jmp 0x6775c
movl -0x508(%rbp), %eax
movl %eax, -0x4d4(%rbp)
movl -0x4dc(%rbp), %eax
movb %al, %dl
movq -0x4f0(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4d8(%rbp), %eax
movb %al, %dl
movq -0x4f0(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x4d4(%rbp), %eax
movb %al, %dl
movq -0x4f0(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x38(%rbp), %eax
movb %al, %dl
movq -0x4f0(%rbp), %rax
movl -0x3c(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x67572
jmp 0x677f6
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl -0x24(%rbp), %ecx
movq -0x4f0(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x4f0(%rbp)
jmp 0x67545
jmp 0x6781d
movl -0x30(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x30(%rbp)
jmp 0x671cd
jmp 0x6782d
movl -0x34(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x34(%rbp)
movl -0x70(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x671ba
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x510, %rsp            # imm = 0x510
popq %rbp
retq
nop