// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/kplib.c
// Function: kzread
int kzread (void *buffer, int leng)
{
	int i, j, k, bfinal, btype, hlit, hdist;

	if ((!kzfs.fil) || (leng <= 0)) return(0);

	if (kzfs.comptyp == 0)
	{
		if (kzfs.pos != kzfs.i) //Seek only when position changes
			fseek(kzfs.fil,kzfs.seek0+kzfs.pos,SEEK_SET);
		i = min(kzfs.leng-kzfs.pos,leng);
		i = (int)fread(buffer,1,i,kzfs.fil);
		kzfs.i += i; //kzfs.i is a local copy of ftell(kzfs.fil);
	}
	else if (kzfs.comptyp == 8)
	{
		zipfilmode = 1;

			//Initialize for putbuf4zip
		gzbufptr = (char *)buffer; gzbufptr = &gzbufptr[-kzfs.pos];
		kzfs.endpos = min(kzfs.pos+leng,kzfs.leng);
		if (kzfs.endpos == kzfs.pos) return(0); //Guard against reading 0 length

		if (kzfs.pos < gslidew-32768) // Must go back to start :(
		{
			if (kzfs.comptell) fseek(kzfs.fil,kzfs.seek0,SEEK_SET);

			gslidew = 0; gslider = 16384;
			kzfs.jmpplc = 0;

				//Initialize for suckbits/peekbits/getbits
			kzfs.comptell = min(kzfs.compleng,(int)sizeof(olinbuf));
			kzfs.comptell = (int)fread(&olinbuf[0],1,kzfs.comptell,kzfs.fil);
				//Make it re-load when there are < 32 bits left in FIFO
			bitpos = -(((int)sizeof(olinbuf)-4)<<3);
				//Identity: filptr + (bitpos>>3) = &olinbuf[0]
			filptr = &olinbuf[-(bitpos>>3)];
		}
		else
		{
			i = max(gslidew-32768,0); j = gslider-16384;

				//HACK: Don't unzip anything until you have to...
				//   (keeps file pointer as low as possible)
			if (kzfs.endpos <= gslidew) j = kzfs.endpos;

				//write uncompoffs on slidebuf from: i to j
			if (!((i^j)&32768))
				putbuf4zip(&slidebuf[i&32767],i,j);
			else
			{
				putbuf4zip(&slidebuf[i&32767],i,j&~32767);
				putbuf4zip(slidebuf,j&~32767,j);
			}

				//HACK: Don't unzip anything until you have to...
				//   (keeps file pointer as low as possible)
			if (kzfs.endpos <= gslidew) goto retkzread;
		}

		switch (kzfs.jmpplc)
		{
			case 0: goto kzreadplc0;
			case 1: goto kzreadplc1;
			case 2: goto kzreadplc2;
			case 3: goto kzreadplc3;
		}
kzreadplc0:;
		do
		{
			bfinal = getbits(1); btype = getbits(2);

#if 0
				//Display Huffman block offsets&lengths of input file - for debugging only!
			{
			static int ouncomppos = 0, ocomppos = 0;
			if (kzfs.comptell == sizeof(olinbuf)) i = 0;
			else if (kzfs.comptell < kzfs.compleng) i = kzfs.comptell-(sizeof(olinbuf)-4);
			else i = kzfs.comptell-(kzfs.comptell%(sizeof(olinbuf)-4));
			i += ((char *)&filptr[bitpos>>3])-((char *)(&olinbuf[0]));
			i = (i<<3)+(bitpos&7)-3;
			if (gslidew) printf(" ULng:0x%08x CLng:0x%08x.%x",gslidew-ouncomppos,(i-ocomppos)>>3,((i-ocomppos)&7)<<1);
			printf("\ntype:%d, Uoff:0x%08x Coff:0x%08x.%x",btype,gslidew,i>>3,(i&7)<<1);
			if (bfinal)
			{
				printf(" ULng:0x%08x CLng:0x%08x.%x",kzfs.leng-gslidew,((kzfs.compleng<<3)-i)>>3,(((kzfs.compleng<<3)-i)&7)<<1);
				printf("\n        Uoff:0x%08x Coff:0x%08x.0",kzfs.leng,kzfs.compleng);
				ouncomppos = ocomppos = 0;
			}
			else { ouncomppos = gslidew; ocomppos = i; }
			}
#endif

			if (btype == 0)
			{
				  //Raw (uncompressed)
				suckbits((-bitpos)&7);  //Synchronize to start of next byte
				i = getbits(16); if ((getbits(16)^i) != 0xffff) return(-1);
				for(;i;i--)
				{
					if (gslidew >= gslider)
					{
						putbuf4zip(&slidebuf[(gslider-16384)&32767],gslider-16384,gslider); gslider += 16384;
						if (gslider-16384 >= kzfs.endpos)
						{
							kzfs.jmpplc = 1; kzfs.i = i; kzfs.bfinal = bfinal;
							goto retkzread;
kzreadplc1:;         i = kzfs.i; bfinal = kzfs.bfinal;
						}
					}
					slidebuf[(gslidew++)&32767] = (char)getbits(8);
				}
				continue;
			}
			if (btype == 3) continue;

			if (btype == 1) //Fixed Huffman
			{
				hlit = 288; hdist = 32; i = 0;
				for(;i<144;i++) clen[i] = 8; //Fixed bit sizes (literals)
				for(;i<256;i++) clen[i] = 9; //Fixed bit sizes (literals)
				for(;i<280;i++) clen[i] = 7; //Fixed bit sizes (EOI,lengths)
				for(;i<288;i++) clen[i] = 8; //Fixed bit sizes (lengths)
				for(;i<320;i++) clen[i] = 5; //Fixed bit sizes (distances)
			}
			else  //Dynamic Huffman
			{
				hlit = getbits(5)+257; hdist = getbits(5)+1; j = getbits(4)+4;
				for(i=0;i<j;i++) cclen[ccind[i]] = getbits(3);
				for(;i<19;i++) cclen[ccind[i]] = 0;
				hufgencode(cclen,19,ibuf0,nbuf0);

				j = 0; k = hlit+hdist;
				while (j < k)
				{
					i = hufgetsym(ibuf0,nbuf0);
					if (i < 16) { clen[j++] = i; continue; }
					if (i == 16)
						{ for(i=getbits(2)+3;i;i--) { clen[j] = clen[j-1]; j++; } }
					else
					{
						if (i == 17) i = getbits(3)+3; else i = getbits(7)+11;
						for(;i;i--) clen[j++] = 0;
					}
				}
			}

			hufgencode(clen,hlit,ibuf0,nbuf0);
			qhufgencode(ibuf0,nbuf0,qhufval0,qhufbit0,LOGQHUFSIZ0);

			hufgencode(&clen[hlit],hdist,ibuf1,nbuf1);
			qhufgencode(ibuf1,nbuf1,qhufval1,qhufbit1,LOGQHUFSIZ1);

			while (1)
			{
				if (gslidew >= gslider)
				{
					putbuf4zip(&slidebuf[(gslider-16384)&32767],gslider-16384,gslider); gslider += 16384;
					if (gslider-16384 >= kzfs.endpos)
					{
						kzfs.jmpplc = 2; kzfs.bfinal = bfinal; goto retkzread;
kzreadplc2:;      bfinal = kzfs.bfinal;
					}
				}

				k = peekbits(LOGQHUFSIZ0);
				if (qhufbit0[k]) { i = qhufval0[k]; suckbits((int)qhufbit0[k]); }
				else i = hufgetsym(ibuf0,nbuf0);

				if (i < 256) { slidebuf[(gslidew++)&32767] = (char)i; continue; }
				if (i == 256) break;
				i = getbits(hxbit[i+30-257][0]) + hxbit[i+30-257][1];

				k = peekbits(LOGQHUFSIZ1);
				if (qhufbit1[k]) { j = qhufval1[k]; suckbits((int)qhufbit1[k]); }
				else j = hufgetsym(ibuf1,nbuf1);

				j = getbits(hxbit[j][0]) + hxbit[j][1];
				for(;i;i--,gslidew++) slidebuf[gslidew&32767] = slidebuf[(gslidew-j)&32767];
			}
		} while (!bfinal);

		gslider -= 16384;
		if (!((gslider^gslidew)&32768))
			putbuf4zip(&slidebuf[gslider&32767],gslider,gslidew);
		else
		{
			putbuf4zip(&slidebuf[gslider&32767],gslider,gslidew&~32767);
			putbuf4zip(slidebuf,gslidew&~32767,gslidew);
		}
kzreadplc3:; kzfs.jmpplc = 3;
	}

retkzread:;
	i = kzfs.pos;
	kzfs.pos += leng; if (kzfs.pos > kzfs.leng) kzfs.pos = kzfs.leng;
	return(kzfs.pos-i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, 0x540191(%rip)    # 0x5a8f88
je 0x68dff
cmpl $0x0, -0x14(%rbp)
jg 0x68e0b
movl $0x0, -0x4(%rbp)
jmp 0x698e3
cmpl $0x0, 0x54017e(%rip)    # 0x5a8f90
jne 0x68ea2
movl 0x540186(%rip), %eax    # 0x5a8fa4
cmpl 0x54018c(%rip), %eax    # 0x5a8fb0
je 0x68e44
movq 0x54015b(%rip), %rdi    # 0x5a8f88
movl 0x540161(%rip), %eax    # 0x5a8f94
addl 0x54016b(%rip), %eax    # 0x5a8fa4
movl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x6ba0
movl 0x540156(%rip), %eax    # 0x5a8fa0
subl 0x540154(%rip), %eax    # 0x5a8fa4
cmpl -0x14(%rbp), %eax
jge 0x68e66
movl 0x540145(%rip), %eax    # 0x5a8fa0
subl 0x540143(%rip), %eax    # 0x5a8fa4
movl %eax, -0x34(%rbp)
jmp 0x68e6c
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x18(%rbp), %rdx
movq 0x540107(%rip), %rcx    # 0x5a8f88
movl $0x1, %esi
callq 0x64f0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl 0x540119(%rip), %eax    # 0x5a8fb0
movl %eax, 0x540113(%rip)    # 0x5a8fb0
jmp 0x698a3
cmpl $0x8, 0x5400e7(%rip)    # 0x5a8f90
jne 0x698a1
movl $0x1, 0x540227(%rip)    # 0x5a90e0
movq -0x10(%rbp), %rax
movq %rax, 0x540224(%rip)    # 0x5a90e8
movq 0x54021d(%rip), %rax    # 0x5a90e8
xorl %ecx, %ecx
subl 0x5400d1(%rip), %ecx    # 0x5a8fa4
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x540208(%rip)    # 0x5a90e8
movl 0x5400be(%rip), %eax    # 0x5a8fa4
addl -0x14(%rbp), %eax
cmpl 0x5400b1(%rip), %eax    # 0x5a8fa0
jge 0x68eff
movl 0x5400ad(%rip), %eax    # 0x5a8fa4
addl -0x14(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x68f08
movl 0x54009b(%rip), %eax    # 0x5a8fa0
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, 0x540097(%rip)    # 0x5a8fa8
movl 0x540091(%rip), %eax    # 0x5a8fa8
cmpl 0x540087(%rip), %eax    # 0x5a8fa4
jne 0x68f2b
movl $0x0, -0x4(%rbp)
jmp 0x698e3
movl 0x540073(%rip), %eax    # 0x5a8fa4
movl 0x540085(%rip), %ecx    # 0x5a8fbc
subl $0x8000, %ecx           # imm = 0x8000
cmpl %ecx, %eax
jge 0x69001
cmpl $0x0, 0x540050(%rip)    # 0x5a8f9c
je 0x68f64
movq 0x540033(%rip), %rdi    # 0x5a8f88
movl 0x540039(%rip), %eax    # 0x5a8f94
movl %eax, %esi
xorl %edx, %edx
callq 0x6ba0
movl $0x0, 0x54004e(%rip)    # 0x5a8fbc
movl $0x4000, 0x540178(%rip) # imm = 0x4000
movl $0x0, 0x54002a(%rip)    # 0x5a8fac
cmpl $0x10000, 0x54000c(%rip) # imm = 0x10000
jge 0x68f99
movl 0x540004(%rip), %eax    # 0x5a8f98
movl %eax, -0x3c(%rbp)
jmp 0x68fa3
movl $0x10000, %eax          # imm = 0x10000
movl %eax, -0x3c(%rbp)
jmp 0x68fa3
movl -0x3c(%rbp), %eax
movl %eax, 0x53fff0(%rip)    # 0x5a8f9c
movslq 0x53ffe9(%rip), %rdx    # 0x5a8f9c
movq 0x53ffce(%rip), %rcx    # 0x5a8f88
leaq 0x54013f(%rip), %rdi    # 0x5a9100
movl $0x1, %esi
callq 0x64f0
movl %eax, 0x53ffcb(%rip)    # 0x5a8f9c
movl $0xfff80020, 0x550125(%rip) # imm = 0xFFF80020
movl 0x55011f(%rip), %ecx    # 0x5b9100
sarl $0x3, %ecx
xorl %eax, %eax
subl %ecx, %eax
movslq %eax, %rcx
leaq 0x54010e(%rip), %rax    # 0x5a9100
addq %rcx, %rax
movq %rax, 0x55010c(%rip)    # 0x5b9108
jmp 0x690d6
movl 0x53ffb5(%rip), %eax    # 0x5a8fbc
subl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jle 0x69021
movl 0x53ffa5(%rip), %eax    # 0x5a8fbc
subl $0x8000, %eax           # imm = 0x8000
movl %eax, -0x40(%rbp)
jmp 0x69028
xorl %eax, %eax
movl %eax, -0x40(%rbp)
jmp 0x69028
movl -0x40(%rbp), %eax
movl %eax, -0x18(%rbp)
movl 0x5400bc(%rip), %eax    # 0x5a90f0
subl $0x4000, %eax           # imm = 0x4000
movl %eax, -0x1c(%rbp)
movl 0x53ff66(%rip), %eax    # 0x5a8fa8
cmpl 0x53ff74(%rip), %eax    # 0x5a8fbc
jg 0x69053
movl 0x53ff58(%rip), %eax    # 0x5a8fa8
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
xorl -0x1c(%rbp), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x69084
movl -0x18(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cltq
leaq 0x55009c(%rip), %rdi    # 0x5b9110
addq %rax, %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x698f0
jmp 0x690c1
movl -0x18(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
cltq
leaq 0x55007b(%rip), %rdi    # 0x5b9110
addq %rax, %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
andl $0xffff8000, %edx       # imm = 0xFFFF8000
callq 0x698f0
movl -0x1c(%rbp), %esi
andl $0xffff8000, %esi       # imm = 0xFFFF8000
movl -0x1c(%rbp), %edx
leaq 0x550054(%rip), %rdi    # 0x5b9110
callq 0x698f0
movl 0x53fee1(%rip), %eax    # 0x5a8fa8
cmpl 0x53feef(%rip), %eax    # 0x5a8fbc
jg 0x690d4
jmp 0x698a5
jmp 0x690d6
movl 0x53fed0(%rip), %eax    # 0x5a8fac
movq %rax, -0x48(%rbp)
subq $0x3, %rax
ja 0x6910b
movq -0x48(%rbp), %rax
leaq 0x4a6a3(%rip), %rcx     # 0xb3794
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x6910d
jmp 0x69206
jmp 0x69629
jmp 0x69897
jmp 0x6910d
jmp 0x6910f
movl $0x1, %edi
callq 0x69980
movl %eax, -0x24(%rbp)
movl $0x2, %edi
callq 0x69980
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x6925c
xorl %edi, %edi
subl 0x54ffc5(%rip), %edi    # 0x5b9100
andl $0x7, %edi
callq 0x699b0
movl $0x10, %edi
callq 0x69980
movl %eax, -0x18(%rbp)
movl $0x10, %edi
callq 0x69980
xorl -0x18(%rbp), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x69170
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x698e3
jmp 0x69172
cmpl $0x0, -0x18(%rbp)
je 0x69257
movl 0x53fe3a(%rip), %eax    # 0x5a8fbc
cmpl 0x53ff68(%rip), %eax    # 0x5a90f0
jl 0x6921a
movl 0x53ff5c(%rip), %eax    # 0x5a90f0
subl $0x4000, %eax           # imm = 0x4000
andl $0x7fff, %eax           # imm = 0x7FFF
cltq
leaq 0x54ff69(%rip), %rdi    # 0x5b9110
addq %rax, %rdi
movl 0x53ff40(%rip), %esi    # 0x5a90f0
subl $0x4000, %esi           # imm = 0x4000
movl 0x53ff34(%rip), %edx    # 0x5a90f0
callq 0x698f0
movl 0x53ff29(%rip), %eax    # 0x5a90f0
addl $0x4000, %eax           # imm = 0x4000
movl %eax, 0x53ff1e(%rip)    # 0x5a90f0
movl 0x53ff18(%rip), %eax    # 0x5a90f0
subl $0x4000, %eax           # imm = 0x4000
cmpl 0x53fdc5(%rip), %eax    # 0x5a8fa8
jl 0x69218
movl $0x1, 0x53fdbd(%rip)    # 0x5a8fac
movl -0x18(%rbp), %eax
movl %eax, 0x53fdb8(%rip)    # 0x5a8fb0
movl -0x24(%rbp), %eax
movl %eax, 0x53fdb3(%rip)    # 0x5a8fb4
jmp 0x698a5
movl 0x53fda4(%rip), %eax    # 0x5a8fb0
movl %eax, -0x18(%rbp)
movl 0x53fd9f(%rip), %eax    # 0x5a8fb4
movl %eax, -0x24(%rbp)
jmp 0x6921a
movl $0x8, %edi
callq 0x69980
movb %al, %dl
movl 0x53fd90(%rip), %eax    # 0x5a8fbc
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x53fd85(%rip)    # 0x5a8fbc
andl $0x7fff, %eax           # imm = 0x7FFF
movslq %eax, %rcx
leaq 0x54feca(%rip), %rax    # 0x5b9110
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x69172
jmp 0x697e7
cmpl $0x3, -0x28(%rbp)
jne 0x69267
jmp 0x697e7
cmpl $0x1, -0x28(%rbp)
jne 0x69351
movl $0x120, -0x2c(%rbp)     # imm = 0x120
movl $0x20, -0x30(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x90, -0x18(%rbp)
jge 0x692ac
movslq -0x18(%rbp), %rcx
leaq 0x557e76(%rip), %rax    # 0x5c1110
movl $0x8, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x69286
jmp 0x692ae
cmpl $0x100, -0x18(%rbp)     # imm = 0x100
jge 0x692d4
movslq -0x18(%rbp), %rcx
leaq 0x557e4e(%rip), %rax    # 0x5c1110
movl $0x9, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x692ae
jmp 0x692d6
cmpl $0x118, -0x18(%rbp)     # imm = 0x118
jge 0x692fc
movslq -0x18(%rbp), %rcx
leaq 0x557e26(%rip), %rax    # 0x5c1110
movl $0x7, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x692d6
jmp 0x692fe
cmpl $0x120, -0x18(%rbp)     # imm = 0x120
jge 0x69324
movslq -0x18(%rbp), %rcx
leaq 0x557dfe(%rip), %rax    # 0x5c1110
movl $0x8, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x692fe
jmp 0x69326
cmpl $0x140, -0x18(%rbp)     # imm = 0x140
jge 0x6934c
movslq -0x18(%rbp), %rcx
leaq 0x557dd6(%rip), %rax    # 0x5c1110
movl $0x5, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x69326
jmp 0x69519
movl $0x5, %edi
callq 0x69980
addl $0x101, %eax            # imm = 0x101
movl %eax, -0x2c(%rbp)
movl $0x5, %edi
callq 0x69980
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl $0x4, %edi
callq 0x69980
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x693c2
movl $0x3, %edi
callq 0x69980
movl %eax, %edx
movslq -0x18(%rbp), %rcx
leaq 0x77e87(%rip), %rax     # 0xe1230
movslq (%rax,%rcx,4), %rcx
leaq 0x55825c(%rip), %rax    # 0x5c1610
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6938a
jmp 0x693c4
cmpl $0x13, -0x18(%rbp)
jge 0x693f2
movslq -0x18(%rbp), %rcx
leaq 0x77e5b(%rip), %rax     # 0xe1230
movslq (%rax,%rcx,4), %rcx
leaq 0x558230(%rip), %rax    # 0x5c1610
movl $0x0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x693c4
leaq 0x558217(%rip), %rdi    # 0x5c1610
movl $0x13, %esi
leaq 0x55825b(%rip), %rdx    # 0x5c1660
leaq 0x5586d4(%rip), %rcx    # 0x5c1ae0
callq 0x699e0
movl $0x0, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x69517
leaq 0x55822c(%rip), %rdi    # 0x5c1660
leaq 0x5586a5(%rip), %rsi    # 0x5c1ae0
callq 0x69b10
movl %eax, -0x18(%rbp)
cmpl $0x10, -0x18(%rbp)
jge 0x69466
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x1c(%rbp)
movslq %eax, %rcx
leaq 0x557caf(%rip), %rax    # 0x5c1110
movl %edx, (%rax,%rcx,4)
jmp 0x69421
cmpl $0x10, -0x18(%rbp)
jne 0x694b9
movl $0x2, %edi
callq 0x69980
addl $0x3, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x694b7
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x557c7e(%rip), %rax    # 0x5c1110
movl (%rax,%rcx,4), %edx
movslq -0x1c(%rbp), %rcx
leaq 0x557c70(%rip), %rax    # 0x5c1110
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6947c
jmp 0x69512
cmpl $0x11, -0x18(%rbp)
jne 0x694d1
movl $0x3, %edi
callq 0x69980
addl $0x3, %eax
movl %eax, -0x18(%rbp)
jmp 0x694e1
movl $0x7, %edi
callq 0x69980
addl $0xb, %eax
movl %eax, -0x18(%rbp)
jmp 0x694e3
cmpl $0x0, -0x18(%rbp)
je 0x69510
movl -0x1c(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x1c(%rbp)
movslq %eax, %rcx
leaq 0x557c12(%rip), %rax    # 0x5c1110
movl $0x0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x694e3
jmp 0x69512
jmp 0x69421
jmp 0x69519
movl -0x2c(%rbp), %esi
leaq 0x557bed(%rip), %rdi    # 0x5c1110
leaq 0x558136(%rip), %rdx    # 0x5c1660
leaq 0x5585af(%rip), %rcx    # 0x5c1ae0
callq 0x699e0
leaq 0x558123(%rip), %rdi    # 0x5c1660
leaq 0x55859c(%rip), %rsi    # 0x5c1ae0
leaq 0x558615(%rip), %rdx    # 0x5c1b60
leaq 0x558e0e(%rip), %rcx    # 0x5c2360
movl $0x9, %r8d
callq 0x69ba0
movslq -0x2c(%rbp), %rax
leaq 0x557ba8(%rip), %rdi    # 0x5c1110
shlq $0x2, %rax
addq %rax, %rdi
movl -0x30(%rbp), %esi
leaq 0x558fe7(%rip), %rdx    # 0x5c2560
leaq 0x559060(%rip), %rcx    # 0x5c25e0
callq 0x699e0
leaq 0x558fd4(%rip), %rdi    # 0x5c2560
leaq 0x55904d(%rip), %rsi    # 0x5c25e0
leaq 0x5590c6(%rip), %rdx    # 0x5c2660
leaq 0x5591bf(%rip), %rcx    # 0x5c2760
movl $0x6, %r8d
callq 0x69ba0
movl 0x53fa0a(%rip), %eax    # 0x5a8fbc
cmpl 0x53fb38(%rip), %eax    # 0x5a90f0
jl 0x69634
movl 0x53fb30(%rip), %eax    # 0x5a90f0
subl $0x4000, %eax           # imm = 0x4000
andl $0x7fff, %eax           # imm = 0x7FFF
cltq
leaq 0x54fb3d(%rip), %rdi    # 0x5b9110
addq %rax, %rdi
movl 0x53fb14(%rip), %esi    # 0x5a90f0
subl $0x4000, %esi           # imm = 0x4000
movl 0x53fb08(%rip), %edx    # 0x5a90f0
callq 0x698f0
movl 0x53fafd(%rip), %eax    # 0x5a90f0
addl $0x4000, %eax           # imm = 0x4000
movl %eax, 0x53faf2(%rip)    # 0x5a90f0
movl 0x53faec(%rip), %eax    # 0x5a90f0
subl $0x4000, %eax           # imm = 0x4000
cmpl 0x53f999(%rip), %eax    # 0x5a8fa8
jl 0x69632
movl $0x2, 0x53f991(%rip)    # 0x5a8fac
movl -0x24(%rbp), %eax
movl %eax, 0x53f990(%rip)    # 0x5a8fb4
jmp 0x698a5
movl 0x53f985(%rip), %eax    # 0x5a8fb4
movl %eax, -0x24(%rbp)
jmp 0x69634
movl $0x9, %edi
callq 0x69cd0
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x558d14(%rip), %rax    # 0x5c2360
cmpb $0x0, (%rax,%rcx)
je 0x69679
movslq -0x20(%rbp), %rcx
leaq 0x558503(%rip), %rax    # 0x5c1b60
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x558cf2(%rip), %rax    # 0x5c2360
movzbl (%rax,%rcx), %edi
callq 0x699b0
jmp 0x6968f
leaq 0x557fe0(%rip), %rdi    # 0x5c1660
leaq 0x558459(%rip), %rsi    # 0x5c1ae0
callq 0x69b10
movl %eax, -0x18(%rbp)
cmpl $0x100, -0x18(%rbp)     # imm = 0x100
jge 0x696c5
movl -0x18(%rbp), %eax
movb %al, %dl
movl 0x53f919(%rip), %eax    # 0x5a8fbc
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x53f90e(%rip)    # 0x5a8fbc
andl $0x7fff, %eax           # imm = 0x7FFF
movslq %eax, %rcx
leaq 0x54fa53(%rip), %rax    # 0x5b9110
movb %dl, (%rax,%rcx)
jmp 0x695ac
cmpl $0x100, -0x18(%rbp)     # imm = 0x100
jne 0x696d3
jmp 0x697e5
movl -0x18(%rbp), %eax
addl $0x1e, %eax
subl $0x101, %eax            # imm = 0x101
movslq %eax, %rcx
leaq 0x5590b8(%rip), %rax    # 0x5c27a0
movl (%rax,%rcx,8), %edi
callq 0x69980
movl -0x18(%rbp), %ecx
addl $0x1e, %ecx
subl $0x101, %ecx            # imm = 0x101
movslq %ecx, %rdx
leaq 0x55909a(%rip), %rcx    # 0x5c27a0
addl 0x4(%rcx,%rdx,8), %eax
movl %eax, -0x18(%rbp)
movl $0x6, %edi
callq 0x69cd0
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x55903b(%rip), %rax    # 0x5c2760
cmpb $0x0, (%rax,%rcx)
je 0x69752
movslq -0x20(%rbp), %rcx
leaq 0x558f2a(%rip), %rax    # 0x5c2660
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0x559019(%rip), %rax    # 0x5c2760
movzbl (%rax,%rcx), %edi
callq 0x699b0
jmp 0x69768
leaq 0x558e07(%rip), %rdi    # 0x5c2560
leaq 0x558e80(%rip), %rsi    # 0x5c25e0
callq 0x69b10
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0x55902d(%rip), %rax    # 0x5c27a0
movl (%rax,%rcx,8), %edi
callq 0x69980
movslq -0x1c(%rbp), %rdx
leaq 0x55901a(%rip), %rcx    # 0x5c27a0
addl 0x4(%rcx,%rdx,8), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x697e0
movl 0x53f823(%rip), %eax    # 0x5a8fbc
subl -0x1c(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movslq %eax, %rcx
leaq 0x54f965(%rip), %rax    # 0x5b9110
movb (%rax,%rcx), %dl
movl 0x53f808(%rip), %eax    # 0x5a8fbc
andl $0x7fff, %eax           # imm = 0x7FFF
movslq %eax, %rcx
leaq 0x54f94d(%rip), %rax    # 0x5b9110
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
movl 0x53f7e7(%rip), %eax    # 0x5a8fbc
addl $0x1, %eax
movl %eax, 0x53f7de(%rip)    # 0x5a8fbc
jmp 0x6978d
jmp 0x695ac
jmp 0x697e7
cmpl $0x0, -0x24(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6910f
movl 0x53f8f2(%rip), %eax    # 0x5a90f0
subl $0x4000, %eax           # imm = 0x4000
movl %eax, 0x53f8e7(%rip)    # 0x5a90f0
movl 0x53f8e1(%rip), %eax    # 0x5a90f0
xorl 0x53f7a7(%rip), %eax    # 0x5a8fbc
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x69849
movl 0x53f8cb(%rip), %eax    # 0x5a90f0
andl $0x7fff, %eax           # imm = 0x7FFF
cltq
leaq 0x54f8dd(%rip), %rdi    # 0x5b9110
addq %rax, %rdi
movl 0x53f8b4(%rip), %esi    # 0x5a90f0
movl 0x53f77a(%rip), %edx    # 0x5a8fbc
callq 0x698f0
jmp 0x69895
movl 0x53f8a1(%rip), %eax    # 0x5a90f0
andl $0x7fff, %eax           # imm = 0x7FFF
cltq
leaq 0x54f8b3(%rip), %rdi    # 0x5b9110
addq %rax, %rdi
movl 0x53f88a(%rip), %esi    # 0x5a90f0
movl 0x53f750(%rip), %edx    # 0x5a8fbc
andl $0xffff8000, %edx       # imm = 0xFFFF8000
callq 0x698f0
movl 0x53f73f(%rip), %esi    # 0x5a8fbc
andl $0xffff8000, %esi       # imm = 0xFFFF8000
movl 0x53f733(%rip), %edx    # 0x5a8fbc
leaq 0x54f880(%rip), %rdi    # 0x5b9110
callq 0x698f0
jmp 0x69897
movl $0x3, 0x53f70b(%rip)    # 0x5a8fac
jmp 0x698a3
jmp 0x698a5
movl 0x53f6f9(%rip), %eax    # 0x5a8fa4
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl 0x53f6ed(%rip), %eax    # 0x5a8fa4
movl %eax, 0x53f6e7(%rip)    # 0x5a8fa4
movl 0x53f6e1(%rip), %eax    # 0x5a8fa4
cmpl 0x53f6d7(%rip), %eax    # 0x5a8fa0
jle 0x698d7
movl 0x53f6cf(%rip), %eax    # 0x5a8fa0
movl %eax, 0x53f6cd(%rip)    # 0x5a8fa4
movl 0x53f6c7(%rip), %eax    # 0x5a8fa4
subl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)