// File: probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::decode2()
void Signal::decode2()
{
	decode();

	int xDevice = *pDevice;
	int xSubDevice = *pSubDevice;
	int xOBC = *pOBC;
	int xHex[4];
	unsigned int wContext[2];	// the pContext for the next iteration
	unsigned int xContext[2];	// the pContext of the first decode of a repeat sequence
	unsigned int yContext[2];	// the pContext of the last decode of a repeat sequence
	int xNote_out = nNote_out;
	int xAuxNote_out = nAuxNote_out;
	int contextLengthOut = 2;
	int xFrameCount;
	int xDittos;
	int xInitLeadIn = bInitLeadIn;
	int n;
	int bSetyContext = true;
	// Test if lead-in only with tryGap, note that nProtocol is already incremented
	int xLeadIn = ( ((pContext[1] & 0xFF) == nGapProtocol + 1) && (pLead) ) ? 1 : 0;
	int yLeadIn;
	char xProtocol[256];
	char xMisc[256];
	int iEndpoint = 0;	// -2 & -1 = saved 1 & 0; 0 = no early end; 1 = early end
	for (n = 0; n < 4; n++) xHex[n] = pHex[n];
	for (n=0; n<2; n++) xContext[n] = nFrameCount == 0 ? pContext[n] : zContext[n];
	strcpy(xProtocol, pProtocol);
	strcpy(xMisc, pMisc);
	if ( *pError == 0 && *pProtocol )
	{
		do
		{
			do	
			{
				if (bSetyContext)
				{
					// yContext is not set if the most recent decode has been suppressed as spurious
					for (n=0; n<2; n++) yContext[n] = pContext[n];	// save the current sequence end
				}
				for (n=0; n<2; n++) wContext[n] = pContext[n];		// save for next iteration
				bSetyContext = true;
				xFrameCount = ++nFrameCount;	// count the frame just validated
				xDittos = nDittos;				// save the ditto count so not upset by next decode
				iEndpoint = ( iEndpoint < 0 ) ? - iEndpoint - 1 :	// if <0 restore old value, else test
					(	nDittos != 0			// don't look for repeats if dittos present
					||	*pFrameEnd > 200000 );	// don't look for repeats if more than 200ms between frames
				sortOn.clear();
				sortOff.clear();
				sortBurst.clear();
				decode();						// check for spurious next frame even if early end
				yLeadIn = ( ((pContext[1] & 0xFF) == nGapProtocol + 1) && (pLead) ) ? 1 : 0;
			}
			while (	*pError == 0	
				&&	strcmp(pProtocol, xProtocol) == 0
				&&	*pDevice == xDevice
				&&	*pSubDevice == xSubDevice
				&&	*pOBC == xOBC
				&&	strcmp(pMisc, xMisc) == 0
				&&	nDittos == 0		// if new frame has dittos, or nDittos=-1, treat as non-matching
				&&	!bInitLeadIn		// if new frame has initial lead-in, treat as non-matching
				&&	(yContext[0] & 0xFFFFF) + (yContext[1] >> 16) + MinFrame
						== (pContext[0] & 0xFFFFF) - yLeadIn	// if not consecutive, treat as non-matching
				&&	!iEndpoint);		// exit loop if early end marked

			// If a generic Gap decode is followed by a real decode starting one burst later,
			// Gap decode was probably spurious, treating a real lead-in as start of data.
			// So cancel the Gap decode, remove it from the count and reset the 'x...' variables
			if (	*pError == 0 && *pProtocol
				&&	strncmp(xProtocol, "Gap-", 4) == 0
				&&	strncmp(pProtocol, "Gap-", 4) != 0
				&&	((pContext[0] - yContext[0]) & 0xFFFFF) == 1 )	// check start difference is 1 burst
			{
				--nFrameCount;			// remove from count
				iEndpoint = 0;			// no early end to count, but let the real decode be tested
				xDevice = *pDevice;
				xSubDevice = *pSubDevice;
				xOBC = *pOBC;
				xNote_out = nNote_out;
				xAuxNote_out = nAuxNote_out;
				xLeadIn = ( ((pContext[1] & 0xFF) == nGapProtocol + 1) && (pLead) ) ? 1 : 0;
				for (n = 0; n < 4; n++) xHex[n] = pHex[n];
				for (n=0; n<2; n++) xContext[n] = pContext[n];
				strcpy(xProtocol, pProtocol);
				strcpy(xMisc, pMisc);
			}
			else
			// If a decode is followed by a generic Gap decode with same start frame or one burst,
			// later, Gap decode was probably spurious, treating two or more real frames as one.
			// So skip the Gap decode and remove it from the count
			if (	*pError == 0 && *pProtocol
				&&	strncmp(pProtocol, "Gap-", 4) == 0
				&&	((pContext[0] - yContext[0]) & 0xFFFFE) == 0 )	// check start burst
			{
				--nFrameCount;					// remove spurious Gap decode from count
				bSetyContext = false;			// do not set yContext from it
				iEndpoint = - iEndpoint - 1;	// allow to continue but save old value
			}
			else
			// If a decode is followed by a Solidtek decode other than the documented ones of
			// Solidtek16 and Solidtek20, or by an S:xx.xx... decode (all these in tryQ2)
			// and the whole of this following decode frame lies within the frame of the
			// previous decode, then this second decode is probably spurious.  So skip
			// it and remove it from the count.
			if (	*pError == 0 && *pProtocol
				&&	(	strncmp(pProtocol, "S:", 2) == 0
					||	(	strncmp(pProtocol, "Solidtek", 8) == 0
						&&	strncmp(pProtocol+8, "16", 2) != 0
						&&	strncmp(pProtocol+8, "20", 2) != 0 ) )
				&&	( (pContext[0] & 0xFFFFF) + (pContext[1] >> 16)	// compare nStart + nFrameL
						<= (yContext[0] & 0xFFFFF) + (yContext[1] >> 16) ) )
			{
				--nFrameCount;					// remove spurious Solidtek decode from count
				bSetyContext = false;			// do not set yContext from it
				iEndpoint = - iEndpoint - 1;	// allow to continue but save old value
			}
			else
			// combine two types of X10 frame
			if (	*pError == 0 
				&&	strcmp(pProtocol, "X10") == 0
				&&	strncmp(xProtocol, "X10", 3) == 0
				&&	xOBC == *pOBC 
				&&	xHex[0] == pHex[0] )
			{
				if ( xInitLeadIn )
				{
					xNote_out = 4;
					xAuxNote_out = -1;
					*xMisc = 0;				// cancel the "invalid signal"
					xInitLeadIn = false;	// only needed once
				}
			}
			else
			// If a Solidtek16 or Solidtek20 decode is followed by various decodes
			// of fewer frames in which the first 8 bits match the Solidtek data then
			// it is probably a spurious decode of a partial Solidtek repeat at the end
			// of a signal.  Skip the spurious decode and remove it from the count.
			if (	*pError == 0
				&&	(	strncmp(pProtocol, "S:", 2) == 0
					||	strcmp(pProtocol, "Blaupunkt{prefix}") == 0 
					||	strcmp(pProtocol, "XX") == 0
					||	strcmp(pProtocol, "DirecTV") == 0)
				&&	(	strcmp(xProtocol, "Solidtek16") == 0
					||	strcmp(xProtocol, "Solidtek20") == 0 ) )	
			{
				int x2;
				int xbits;
				char xstr[3];

				// reconstruct first 8 bits of Solidtek decode as hex string in xstr
				if ( strcmp(xProtocol+8, "16") == 0 ) x2 = xOBC;
				else x2 = xSubDevice;
				xbits = ( msb(xDevice,4)<<3 |  msb(x2,3) ) & 0xFF;
				sprintf(xstr, "%02X", xbits);

				// check those that can be checked with this xbits value
				if (		strcmp(pProtocol, "Blaupunkt{prefix}") == 0
						&&	strcmp(xstr, "00") == 0	// needed to match Blaupunkt
					||		strcmp(pProtocol, "DirecTV") == 0
						&&	*pDevice == 0 && *pOBC == 0
						&&	strcmp(xstr, "00") == 0	// needed to match DirecTV
					||		strncmp(pProtocol, "S:", 2) == 0
						&&	strncmp(pProtocol+5, xstr, 2 ) == 0 )	// test against yy of S.xx.yy....
				{
					--nFrameCount;					// remove spurious decode from count
					bSetyContext = false;			// do not set yContext from it
					iEndpoint = - iEndpoint - 1;	// allow to continue but save old value
				}
				else
				// check the one that needs complemented xbits value
				{	sprintf(xstr, "%02X", 255-xbits);
					if (	strcmp(pProtocol, "XX") == 0
						&&	strncmp(pMisc, xstr, 2 ) == 0 )
					{
						--nFrameCount;					// remove spurious decode from count
						bSetyContext = false;			// do not set yContext from it
						iEndpoint = - iEndpoint - 1;	// allow to continue but save old value
					}
					else break;
				}
			}
			else
			// The Sony protocol can match the Async protocol if the Sony data comprises
			// binary pairs 01 and 10.  The Sony lead-in translates to Async 0x80, the
			// binary pairs 01 and 10 translate to Async 0xE6 and 0x98.  The minimum
			// required for an Async decode is 3 such Sony binary pairs.  So if a Sony
			// decode is followed by such an Async decode then the Async probably comes
			// from a truncated Sony frame. Skip the spurious decode and remove it from
			// the count. 
			if (	*pError == 0
				&&	strncmp(xProtocol, "Sony", 4) == 0
				&&	strncmp(pProtocol, "Async", 5) == 0 
				&&	strncmp(pMisc, "80", 2) == 0
				&&	(	strncmp(pMisc+3, "98", 2) == 0
					||	strncmp(pMisc+3, "E6", 2) == 0 )
				&&	(	strncmp(pMisc+6, "98", 2) == 0
					||	strncmp(pMisc+6, "E6", 2) == 0 )
				&&	(	strncmp(pMisc+9, "98", 2) == 0
					||	strncmp(pMisc+9, "E6", 2) == 0 ) )
			{
				--nFrameCount;					// remove spurious Async decode from count
				bSetyContext = false;			// do not set yContext from it
				iEndpoint = - iEndpoint - 1;	// allow to continue but save old value
			}
			else
			// If an XMP decode with valid first half frame is followed by a Mitsubishi decode with
			// same start frame, Mitsubishi decode was probably a spurious decode of an XMP signal
			// with one or more missing digits (Mitsubishi frame length is 17, valid XMP is 18).
			// So skip the Mitsubishi decode and remove it from the count.  If counts suppressed,
			// i.e. learning remotes rather than IRScope, do same if following decode is consecutive
			// and is another XMP frame.
			if (	*pError == 0 && *pProtocol
				&&  (strcmp(xProtocol, "XMP") == 0 || strncmp(xProtocol, "XMP-", 4) == 0)
				&&	(strcmp(pProtocol, "Mitsubishi") == 0
					&&	((pContext[0] - yContext[0]) & 0xFFFFF) == 0 	// check start burst
				||	strncmp(pProtocol, "XMP", 3) == 0 
					&& (yContext[0] & 0xFFFFF) + (yContext[1] >> 16) + MinFrame
						== (pContext[0] & 0xFFFFF) 
					&& bSuppressCount )
				&&  bXMPHalfValid )
			{
				// char xstr[100];
				// sprintf(xstr, "start1 = %d start2 = %d",(yContext[0] & 0xFFFFF) + (yContext[1] >> 16) + MinFrame,(pContext[0] & 0xFFFFF));
				// MessageBox(0,xstr,"Error",0);
				if (strcmp(pProtocol, "Mitsubishi") == 0)
				{	
					--nFrameCount;					// remove spurious Mitsubishi decode from count
					bSetyContext = false;			// do not set yContext from it
				}
				iEndpoint = - iEndpoint - 1;	// allow to continue but save old value
			}
			else break;
		}
		while ( iEndpoint <= 0 );

		// Frame just decoded does not match earlier frame.  If it comes from
		// extra bursts, treat it as spurious so prevent its decode
		if (	nNonSpurious > 0		// value has been set
			&&	(int)(pContext[0] & 0xFFFFF) >= nNonSpurious	)
		{
			wContext[0] = 0xFFFFF;
		}		
		if  	(	strcmp(xProtocol, "NEC") == 0
				||	strcmp(xProtocol, "NECx") == 0 
				||	strcmp(xProtocol, "48-NEC") == 0 )
		{
			if (xFrameCount > 1 || nDittos == 0 && nRepeat > 6 )  
			{							 //nRepeat > 0 changed to nRepeat > 6  DAR Dec 2010 to avoid detecting faulty 
				strcat(xProtocol, "2");  //ditto(s) as NEC2. Anyway, NEC2 should have nRepeat == 34 if xFrame == 1
			}  
			strcat (xProtocol,pSuffix);   //DAR Nov 2010 
		}
		else if (	strcmp(xProtocol, "JVC") == 0 
				&&	!xInitLeadIn )
		{
			strcat(xProtocol, "{2}");
			xNote_out = 1;
		}
		else if (	strncmp(xProtocol, "RCA", 3) == 0 
				&&	xInitLeadIn )
		{
			strcat(xProtocol, "(Old)");
			xNote_out = 11;
		}
		else if (	strncmp(xProtocol, "Gap-", 4) == 0
				||	strncmp(xProtocol, "??", 2) == 0 )
		{
			xNote_out = 8;
		}

		// Restore pContext to value saved before last call to decode()
		for (n=0; n<2; n++) pContext[n] = wContext[n];

		int iParam = xFrameCount;

		*pDevice = xDevice;
		*pSubDevice = xSubDevice;
		*pOBC = xOBC;
		for (n=0; n < 4; n++) pHex[n] = xHex[n];
		strcpy(pProtocol, xProtocol);
		if (xNote_out == -1)		// if note unset, set default
		{
			if (xDittos > 0)		// if dittos present
			{
				xNote_out = 3;		// set ditto-frame note
				iParam = xDittos;
			}
			else
			{
				xNote_out = 1;		// else set identical repeats note
			}
		}

		if (nContextLength > 2)		// extended context used by IRScope
		{
			// set pContext[2] to the pContext[0] value at start of repeat series
			// but without its preemptLength value as that is no longer relevant
			pContext[2] = xContext[0] & 0xFFFFF;
			// if there was a tryGap() lead-in then actual start is one frame earlier
			if ( pContext[2] > 0 ) pContext[2] -= xLeadIn;
			// carry the preemptLength for the next iteration in pContext[2] and mask
			// it out of pContext[0] as that field of pContext[0] is used for the handshake
			pContext[2] |= pContext[0] & 0xFFF00000;
			pContext[0] &= 0xFFFFF;
			contextLengthOut = 3;	// record the context length to be returned in the handshake
		}
		if (nContextLength > 3)
		{
			// set pContext[3] to the pContext[1] value at start of repeat series
			pContext[3] = xContext[1];
			contextLengthOut = 4;	// record the context length to be returned in the handshake
		}
		if (nContextLength > 5)
		{
			// set pContext[4,5] to the pContext[0,1] values at end of repeat series
			pContext[4] = yContext[0];
			pContext[5] = yContext[1];
			contextLengthOut = 6;
		}
		if (nContextLength > 7)
		{
			// Incoming, pContext[6,7] pass a 64-bit pointer to a Counts array used to calculate
			// the frequency of individual decodes.  Outgoing, pContext[6] provides the frequency of
			// the repeat series being reported in this return.
			pContext[6] = getFreq(pContext[2] & 0xFFFFF, (pContext[0] & 0xFFFFF) + (pContext[1]>>16) + MinFrame);
			contextLengthOut = 8;
		}
		if (nContextLength > 8)
		{
			// pContext[8] returns the note and aux note indexes (1-based, so add 1) for use by
			// IRScope, and the parameter value for the note.
			pContext[8] = iParam | (xNote_out + 1)<<16 | (xAuxNote_out + 1)<<24;
			contextLengthOut = 9;
		}

		if (contextLengthOut > 2)
		{
			// The handshake is that the 12-bit field in pContext[0] that normally carries the
			// preemptLength value is now used to carry a negative value, -(contextLengthOut-2).
			// The calling program checks to see if the top 8 bits of this value are 0xFF.  If
			// so then it is interpreted as a context length value, otherwise as a preemptLength
			// value.  So the maximum supported context length is 18, corresponding to 0xFF0.
			pContext[0] |= (2-contextLengthOut)<<20;
		}

		n = 0;
		if ( !bSuppressCount )
		{
			// nDittos = -1 means no dittos AND treat repeat frames as separate signals
			if ( xFrameCount == 1 && xDittos <= 0 )
			{
				n = sprintf(pMisc, *xMisc == 0 ? "no repeat" : "no repeat: ");
			}
			else if ( xFrameCount == 2 && xDittos <= 0 )	// nDittos < 0 should not occur in this case
			{
				n = sprintf(pMisc, *xMisc == 0 ? "+ 1 copy" : "+ 1 copy: ");
			}
			else if ( xDittos <= 0 )	// nDittos < 0 should not occur in this case
			{
				n = sprintf(pMisc, *xMisc == 0 ? "+ %d copies" : "+ %d copies: ", xFrameCount-1);
			}
			else if ( xFrameCount == 1 && xDittos == 1 )
			{
				n = sprintf(pMisc, *xMisc == 0 ? "+ 1 ditto" : "+ 1 ditto: ");
			}
			else if ( xFrameCount == 1 )
			{
				n = sprintf(pMisc, *xMisc == 0 ? "+ %d dittos" : "+ %d dittos: ", xDittos);
			}
			else	// this case should not occur
			{
				n = sprintf(pMisc, *xMisc == 0 ? "+ %d dittos, %d copies" : "+ %d dittos, %d copies: ", 
						xDittos, xFrameCount-1);
			}
		}
		// next line reports nStart and nFrameL for diagnostic purposes
		// n += sprintf(pMisc+n, "S=%d L=%d ", wContext[0]&0xFFFFF, (wContext[1]>>16)+MinFrame);
		strcpy(pMisc+n, xMisc);	// append original pMisc text
		*pError = 0;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x28d0
movq -0x290(%rbp), %rax
movq 0x160(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, -0xc(%rbp)
movq 0x168(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, -0x10(%rbp)
movq 0x170(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, -0x14(%rbp)
movl 0x88(%rax), %ecx
movl %ecx, -0x4c(%rbp)
movl 0x8c(%rax), %ecx
movl %ecx, -0x50(%rbp)
movl $0x2, -0x54(%rbp)
movl 0x70(%rax), %ecx
movl %ecx, -0x60(%rbp)
movl $0x1, -0x68(%rbp)
movq (%rax), %rcx
movl 0x4(%rcx), %ecx
andl $0xff, %ecx
movl 0x78(%rax), %edx
addl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x285(%rbp)
jne 0x14a36
movq -0x290(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
setne %al
movb %al, -0x285(%rbp)
movb -0x285(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x6c(%rbp)
movl $0x0, -0x274(%rbp)
movl $0x0, -0x64(%rbp)
cmpl $0x4, -0x64(%rbp)
jge 0x14a8b
movq -0x290(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x64(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14a5d
movl $0x0, -0x64(%rbp)
cmpl $0x2, -0x64(%rbp)
jge 0x14aef
movq -0x290(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x14abe
movq -0x290(%rbp), %rax
movq (%rax), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x294(%rbp)
jmp 0x14ad6
movq -0x290(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl 0x80(%rax,%rcx,4), %eax
movl %eax, -0x294(%rbp)
movl -0x294(%rbp), %ecx
movslq -0x64(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14a92
movq -0x290(%rbp), %rax
leaq -0x170(%rbp), %rdi
movq 0x148(%rax), %rsi
callq 0x2120
movq -0x290(%rbp), %rax
leaq -0x270(%rbp), %rdi
movq 0x150(%rax), %rsi
callq 0x2120
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x15e64
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rax
cmpb $0x0, (%rax)
je 0x15e64
jmp 0x14b56
jmp 0x14b58
cmpl $0x0, -0x68(%rbp)
je 0x14b91
movl $0x0, -0x64(%rbp)
cmpl $0x2, -0x64(%rbp)
jge 0x14b8f
movq -0x290(%rbp), %rax
movq (%rax), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x64(%rbp), %rax
movl %ecx, -0x48(%rbp,%rax,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14b65
jmp 0x14b91
movl $0x0, -0x64(%rbp)
cmpl $0x2, -0x64(%rbp)
jge 0x14bc2
movq -0x290(%rbp), %rax
movq (%rax), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x64(%rbp), %rax
movl %ecx, -0x38(%rbp,%rax,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14b98
movq -0x290(%rbp), %rax
movl $0x1, -0x68(%rbp)
movl 0x60(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x60(%rax)
movl %ecx, -0x58(%rbp)
movl 0x68(%rax), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x274(%rbp)
jge 0x14bfe
xorl %eax, %eax
subl -0x274(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x298(%rbp)
jmp 0x14c47
movq -0x290(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x68(%rcx)
movb %al, -0x299(%rbp)
jne 0x14c36
movq -0x290(%rbp), %rax
movq 0x40(%rax), %rax
movss (%rax), %xmm0
movss 0x558a(%rip), %xmm1     # 0x1a1b4
ucomiss %xmm1, %xmm0
seta %al
movb %al, -0x299(%rbp)
movb -0x299(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x298(%rbp)
movq -0x290(%rbp), %rdi
movl -0x298(%rbp), %eax
movl %eax, -0x274(%rbp)
addq $0x180, %rdi            # imm = 0x180
callq 0x187b0
movq -0x290(%rbp), %rdi
addq $0x18c, %rdi            # imm = 0x18C
callq 0x187e0
movq -0x290(%rbp), %rdi
addq $0x198, %rdi            # imm = 0x198
callq 0x18810
movq -0x290(%rbp), %rdi
callq 0x28d0
movq -0x290(%rbp), %rax
movq (%rax), %rcx
movl 0x4(%rcx), %ecx
andl $0xff, %ecx
movl 0x78(%rax), %edx
addl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x29a(%rbp)
jne 0x14cd5
movq -0x290(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
setne %al
movb %al, -0x29a(%rbp)
movb -0x29a(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x70(%rbp)
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq -0x170(%rbp), %rsi
callq 0x21c0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rax
movq 0x160(%rax), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rax
movq 0x168(%rax), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl -0x10(%rbp), %ecx
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rax
movq 0x170(%rax), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
leaq -0x270(%rbp), %rsi
callq 0x21c0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x68(%rcx)
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x70(%rcx)
movb %al, -0x29b(%rbp)
jne 0x14e37
movq -0x290(%rbp), %rax
movl -0x48(%rbp), %ecx
andl $0xfffff, %ecx          # imm = 0xFFFFF
movl -0x44(%rbp), %edx
shrl $0x10, %edx
addl %edx, %ecx
addl $0x2, %ecx
movq (%rax), %rax
movl (%rax), %edx
andl $0xfffff, %edx          # imm = 0xFFFFF
subl -0x70(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x29b(%rbp)
jne 0x14e37
cmpl $0x0, -0x274(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x29b(%rbp)
movb -0x29b(%rbp), %al
testb $0x1, %al
jne 0x14b58
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x15017
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rax
cmpb $0x0, (%rax)
je 0x15017
leaq -0x170(%rbp), %rdi
leaq 0x5a11(%rip), %rsi      # 0x1a895
movl $0x4, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x15017
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x59e9(%rip), %rsi      # 0x1a895
movl $0x4, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x15017
movq -0x290(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
subl -0x48(%rbp), %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
cmpl $0x1, %eax
jne 0x15017
movq -0x290(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
movl $0x0, -0x274(%rbp)
movq 0x160(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, -0xc(%rbp)
movq 0x168(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, -0x10(%rbp)
movq 0x170(%rax), %rcx
movl (%rcx), %ecx
movl %ecx, -0x14(%rbp)
movl 0x88(%rax), %ecx
movl %ecx, -0x4c(%rbp)
movl 0x8c(%rax), %ecx
movl %ecx, -0x50(%rbp)
movq (%rax), %rcx
movl 0x4(%rcx), %ecx
andl $0xff, %ecx
movl 0x78(%rax), %edx
addl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x29c(%rbp)
jne 0x14f62
movq -0x290(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
setne %al
movb %al, -0x29c(%rbp)
movb -0x29c(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x6c(%rbp)
movl $0x0, -0x64(%rbp)
cmpl $0x4, -0x64(%rbp)
jge 0x14fad
movq -0x290(%rbp), %rax
movq 0x178(%rax), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x64(%rbp), %rax
movl %ecx, -0x30(%rbp,%rax,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14f7f
movl $0x0, -0x64(%rbp)
cmpl $0x2, -0x64(%rbp)
jge 0x14fde
movq -0x290(%rbp), %rax
movq (%rax), %rax
movslq -0x64(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x64(%rbp), %rax
movl %ecx, -0x40(%rbp,%rax,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x14fb4
movq -0x290(%rbp), %rax
leaq -0x170(%rbp), %rdi
movq 0x148(%rax), %rsi
callq 0x2120
movq -0x290(%rbp), %rax
leaq -0x270(%rbp), %rdi
movq 0x150(%rax), %rsi
callq 0x2120
jmp 0x158a1
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x150aa
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rax
cmpb $0x0, (%rax)
je 0x150aa
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x5840(%rip), %rsi      # 0x1a895
movl $0x4, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x150aa
movq -0x290(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
subl -0x48(%rbp), %eax
andl $0xffffe, %eax          # imm = 0xFFFFE
cmpl $0x0, %eax
jne 0x150aa
movq -0x290(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
movl $0x0, -0x68(%rbp)
xorl %eax, %eax
subl -0x274(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x1589f
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x151d9
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rax
cmpb $0x0, (%rax)
je 0x151d9
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x57aa(%rip), %rsi      # 0x1a89a
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x1517b
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x5789(%rip), %rsi      # 0x1a89d
movl $0x8, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x151d9
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
addq $0x8, %rdi
leaq 0x604f(%rip), %rsi      # 0x1b18f
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x151d9
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
addq $0x8, %rdi
leaq 0x5b0e(%rip), %rsi      # 0x1ac7a
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x151d9
movq -0x290(%rbp), %rcx
movq (%rcx), %rax
movl (%rax), %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
movq (%rcx), %rcx
movl 0x4(%rcx), %ecx
shrl $0x10, %ecx
addl %ecx, %eax
movl -0x48(%rbp), %ecx
andl $0xfffff, %ecx          # imm = 0xFFFFF
movl -0x44(%rbp), %edx
shrl $0x10, %edx
addl %edx, %ecx
cmpl %ecx, %eax
ja 0x151d9
movq -0x290(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
movl $0x0, -0x68(%rbp)
xorl %eax, %eax
subl -0x274(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x1589d
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x15280
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x569e(%rip), %rsi      # 0x1a8a6
callq 0x21c0
cmpl $0x0, %eax
jne 0x15280
leaq -0x170(%rbp), %rdi
leaq 0x5686(%rip), %rsi      # 0x1a8a6
movl $0x3, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x15280
movq -0x290(%rbp), %rcx
movl -0x14(%rbp), %eax
movq 0x170(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x15280
movq -0x290(%rbp), %rcx
movl -0x30(%rbp), %eax
movq 0x178(%rcx), %rcx
cmpl (%rcx), %eax
jne 0x15280
cmpl $0x0, -0x60(%rbp)
je 0x1527b
movl $0x4, -0x4c(%rbp)
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
movb $0x0, -0x270(%rbp)
movl $0x0, -0x60(%rbp)
jmp 0x1589b
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x15591
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x55eb(%rip), %rsi      # 0x1a89a
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x1531f
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x55d7(%rip), %rsi      # 0x1a8aa
callq 0x21c0
cmpl $0x0, %eax
je 0x1531f
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x55ca(%rip), %rsi      # 0x1a8bc
callq 0x21c0
cmpl $0x0, %eax
je 0x1531f
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x55ae(%rip), %rsi      # 0x1a8bf
callq 0x21c0
cmpl $0x0, %eax
jne 0x15591
leaq -0x170(%rbp), %rdi
leaq 0x559a(%rip), %rsi      # 0x1a8c7
callq 0x21c0
cmpl $0x0, %eax
je 0x15353
leaq -0x170(%rbp), %rdi
leaq 0x558d(%rip), %rsi      # 0x1a8d2
callq 0x21c0
cmpl $0x0, %eax
jne 0x15591
leaq -0x170(%rbp), %rdi
addq $0x8, %rdi
leaq 0x5e2a(%rip), %rsi      # 0x1b18f
callq 0x21c0
cmpl $0x0, %eax
jne 0x1537a
movl -0x14(%rbp), %eax
movl %eax, -0x278(%rbp)
jmp 0x15383
movl -0x10(%rbp), %eax
movl %eax, -0x278(%rbp)
movq -0x290(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0x4, %edx
callq 0x15e70
movq -0x290(%rbp), %rdi
shll $0x3, %eax
movl %eax, -0x2a0(%rbp)
movl -0x278(%rbp), %esi
movl $0x3, %edx
callq 0x15e70
movl %eax, %ecx
movl -0x2a0(%rbp), %eax
orl %ecx, %eax
andl $0xff, %eax
movl %eax, -0x27c(%rbp)
leaq -0x27f(%rbp), %rdi
movl -0x27c(%rbp), %edx
leaq 0x5c57(%rip), %rsi      # 0x1b037
movb $0x0, %al
callq 0x2060
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x54ae(%rip), %rsi      # 0x1a8aa
callq 0x21c0
cmpl $0x0, %eax
jne 0x15422
leaq -0x27f(%rbp), %rdi
leaq 0x5df3(%rip), %rsi      # 0x1b207
callq 0x21c0
cmpl $0x0, %eax
je 0x154cb
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x5488(%rip), %rsi      # 0x1a8bf
callq 0x21c0
cmpl $0x0, %eax
jne 0x1547f
movq -0x290(%rbp), %rax
movq 0x160(%rax), %rax
cmpl $0x0, (%rax)
jne 0x1547f
movq -0x290(%rbp), %rax
movq 0x170(%rax), %rax
cmpl $0x0, (%rax)
jne 0x1547f
leaq -0x27f(%rbp), %rdi
leaq 0x5d92(%rip), %rsi      # 0x1b207
callq 0x21c0
cmpl $0x0, %eax
je 0x154cb
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x5406(%rip), %rsi      # 0x1a89a
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x154f8
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
addq $0x5, %rdi
leaq -0x27f(%rbp), %rsi
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x154f8
movq -0x290(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
movl $0x0, -0x68(%rbp)
xorl %eax, %eax
subl -0x274(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x1558c
leaq -0x27f(%rbp), %rdi
movl $0xff, %edx
subl -0x27c(%rbp), %edx
leaq 0x5b26(%rip), %rsi      # 0x1b037
movb $0x0, %al
callq 0x2060
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x538f(%rip), %rsi      # 0x1a8bc
callq 0x21c0
cmpl $0x0, %eax
jne 0x15585
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
leaq -0x27f(%rbp), %rsi
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x15585
movq -0x290(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
movl $0x0, -0x68(%rbp)
xorl %eax, %eax
subl -0x274(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x1558a
jmp 0x158b0
jmp 0x1558c
jmp 0x15899
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x1573d
leaq -0x170(%rbp), %rdi
leaq 0x5324(%rip), %rsi      # 0x1a8dd
movl $0x4, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x1573d
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x5301(%rip), %rsi      # 0x1a8e2
movl $0x5, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x1573d
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
leaq 0x5569(%rip), %rsi      # 0x1ab72
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x1573d
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
addq $0x3, %rdi
leaq 0x52b3(%rip), %rsi      # 0x1a8e8
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x15670
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
addq $0x3, %rdi
leaq 0x528e(%rip), %rsi      # 0x1a8eb
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x1573d
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
addq $0x6, %rdi
leaq 0x525f(%rip), %rsi      # 0x1a8e8
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x156c0
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
addq $0x6, %rdi
leaq 0x523a(%rip), %rsi      # 0x1a8eb
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x1573d
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
addq $0x9, %rdi
leaq 0x520f(%rip), %rsi      # 0x1a8e8
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x15710
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
addq $0x9, %rdi
leaq 0x51ea(%rip), %rsi      # 0x1a8eb
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x1573d
movq -0x290(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
movl $0x0, -0x68(%rbp)
xorl %eax, %eax
subl -0x274(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x15897
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x15893
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rax
cmpb $0x0, (%rax)
je 0x15893
leaq -0x170(%rbp), %rdi
leaq 0x5172(%rip), %rsi      # 0x1a8ee
callq 0x21c0
cmpl $0x0, %eax
je 0x157a7
leaq -0x170(%rbp), %rdi
leaq 0x515e(%rip), %rsi      # 0x1a8f2
movl $0x4, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x15893
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x513b(%rip), %rsi      # 0x1a8f7
callq 0x21c0
cmpl $0x0, %eax
jne 0x157df
movq -0x290(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
subl -0x48(%rbp), %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
cmpl $0x0, %eax
je 0x1583d
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x50fa(%rip), %rsi      # 0x1a8ee
movl $0x3, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x15893
movq -0x290(%rbp), %rcx
movl -0x48(%rbp), %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
movl -0x44(%rbp), %edx
shrl $0x10, %edx
addl %edx, %eax
addl $0x2, %eax
movq (%rcx), %rcx
movl (%rcx), %ecx
andl $0xfffff, %ecx          # imm = 0xFFFFF
cmpl %ecx, %eax
jne 0x15893
movq -0x290(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x15893
movq -0x290(%rbp), %rax
cmpl $0x0, 0x7c(%rax)
je 0x15893
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq 0x5098(%rip), %rsi      # 0x1a8f7
callq 0x21c0
cmpl $0x0, %eax
jne 0x15880
movq -0x290(%rbp), %rax
movl 0x60(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x60(%rax)
movl $0x0, -0x68(%rbp)
xorl %eax, %eax
subl -0x274(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x274(%rbp)
jmp 0x15895
jmp 0x158b0
jmp 0x15897
jmp 0x15899
jmp 0x1589b
jmp 0x1589d
jmp 0x1589f
jmp 0x158a1
jmp 0x158a3
cmpl $0x0, -0x274(%rbp)
jle 0x14b56
movq -0x290(%rbp), %rax
cmpl $0x0, 0x6c(%rax)
jle 0x158da
movq -0x290(%rbp), %rcx
movq (%rcx), %rax
movl (%rax), %eax
andl $0xfffff, %eax          # imm = 0xFFFFF
cmpl 0x6c(%rcx), %eax
jl 0x158da
movl $0xfffff, -0x38(%rbp)   # imm = 0xFFFFF
leaq -0x170(%rbp), %rdi
leaq 0x5022(%rip), %rsi      # 0x1a90a
callq 0x21c0
cmpl $0x0, %eax
je 0x15922
leaq -0x170(%rbp), %rdi
leaq 0x5002(%rip), %rsi      # 0x1a902
callq 0x21c0
cmpl $0x0, %eax
je 0x15922
leaq -0x170(%rbp), %rdi
leaq 0x4fef(%rip), %rsi      # 0x1a907
callq 0x21c0
cmpl $0x0, %eax
jne 0x15974
cmpl $0x1, -0x58(%rbp)
jg 0x15942
movq -0x290(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x15955
movq -0x290(%rbp), %rax
cmpl $0x6, 0x24(%rax)
jle 0x15955
leaq -0x170(%rbp), %rdi
leaq 0x56f3(%rip), %rsi      # 0x1b043
callq 0x2230
movq -0x290(%rbp), %rax
leaq -0x170(%rbp), %rdi
movq 0xb0(%rax), %rsi
callq 0x2230
jmp 0x15a37
leaq -0x170(%rbp), %rdi
leaq 0x4f8c(%rip), %rsi      # 0x1a90e
callq 0x21c0
cmpl $0x0, %eax
jne 0x159b1
cmpl $0x0, -0x60(%rbp)
jne 0x159b1
leaq -0x170(%rbp), %rdi
leaq 0x4f72(%rip), %rsi      # 0x1a912
callq 0x2230
movl $0x1, -0x4c(%rbp)
jmp 0x15a35
leaq -0x170(%rbp), %rdi
leaq 0x4f57(%rip), %rsi      # 0x1a916
movl $0x3, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x159f0
cmpl $0x0, -0x60(%rbp)
je 0x159f0
leaq -0x170(%rbp), %rdi
leaq 0x4f38(%rip), %rsi      # 0x1a91a
callq 0x2230
movl $0xb, -0x4c(%rbp)
jmp 0x15a33
leaq -0x170(%rbp), %rdi
leaq 0x4e97(%rip), %rsi      # 0x1a895
movl $0x4, %edx
callq 0x20b0
cmpl $0x0, %eax
je 0x15a2a
leaq -0x170(%rbp), %rdi
leaq 0x4f05(%rip), %rsi      # 0x1a920
movl $0x2, %edx
callq 0x20b0
cmpl $0x0, %eax
jne 0x15a31
movl $0x8, -0x4c(%rbp)
jmp 0x15a33
jmp 0x15a35
jmp 0x15a37
movl $0x0, -0x64(%rbp)
cmpl $0x2, -0x64(%rbp)
jge 0x15a68
movq -0x290(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl -0x38(%rbp,%rcx,4), %edx
movq (%rax), %rax
movslq -0x64(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x15a3e
movq -0x290(%rbp), %rax
movl -0x58(%rbp), %ecx
movl %ecx, -0x284(%rbp)
movl -0xc(%rbp), %edx
movq 0x160(%rax), %rcx
movl %edx, (%rcx)
movl -0x10(%rbp), %edx
movq 0x168(%rax), %rcx
movl %edx, (%rcx)
movl -0x14(%rbp), %ecx
movq 0x170(%rax), %rax
movl %ecx, (%rax)
movl $0x0, -0x64(%rbp)
cmpl $0x4, -0x64(%rbp)
jge 0x15ad1
movq -0x290(%rbp), %rax
movslq -0x64(%rbp), %rcx
movl -0x30(%rbp,%rcx,4), %edx
movq 0x178(%rax), %rax
movslq -0x64(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x15aa3
movq -0x290(%rbp), %rax
movq 0x148(%rax), %rdi
leaq -0x170(%rbp), %rsi
callq 0x2120
cmpl $-0x1, -0x4c(%rbp)
jne 0x15b12
cmpl $0x0, -0x5c(%rbp)
jle 0x15b09
movl $0x3, -0x4c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x284(%rbp)
jmp 0x15b10
movl $0x1, -0x4c(%rbp)
jmp 0x15b12
movq -0x290(%rbp), %rax
cmpl $0x2, 0x74(%rax)
jle 0x15b82
movq -0x290(%rbp), %rax
movl -0x40(%rbp), %edx
andl $0xfffff, %edx          # imm = 0xFFFFF
movq (%rax), %rcx
movl %edx, 0x8(%rcx)
movq (%rax), %rax
cmpl $0x0, 0x8(%rax)
jbe 0x15b53
movq -0x290(%rbp), %rax
movl -0x6c(%rbp), %edx
movq (%rax), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x290(%rbp), %rax
movq (%rax), %rcx
movl (%rcx), %edx
andl $0xfff00000, %edx       # imm = 0xFFF00000
movq (%rax), %rcx
orl 0x8(%rcx), %edx
movl %edx, 0x8(%rcx)
movq (%rax), %rax
movl (%rax), %ecx
andl $0xfffff, %ecx          # imm = 0xFFFFF
movl %ecx, (%rax)
movl $0x3, -0x54(%rbp)
movq -0x290(%rbp), %rax
cmpl $0x3, 0x74(%rax)
jle 0x15ba6
movq -0x290(%rbp), %rax
movl -0x3c(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0xc(%rax)
movl $0x4, -0x54(%rbp)
movq -0x290(%rbp), %rax
cmpl $0x5, 0x74(%rax)
jle 0x15bd3
movq -0x290(%rbp), %rax
movl -0x48(%rbp), %edx
movq (%rax), %rcx
movl %edx, 0x10(%rcx)
movl -0x44(%rbp), %ecx
movq (%rax), %rax
movl %ecx, 0x14(%rax)
movl $0x6, -0x54(%rbp)
movq -0x290(%rbp), %rax
cmpl $0x7, 0x74(%rax)
jle 0x15c27
movq -0x290(%rbp), %rdi
movq (%rdi), %rax
movl 0x8(%rax), %esi
andl $0xfffff, %esi          # imm = 0xFFFFF
movq (%rdi), %rax
movl (%rax), %edx
andl $0xfffff, %edx          # imm = 0xFFFFF
movq (%rdi), %rax
movl 0x4(%rax), %eax
shrl $0x10, %eax
addl %eax, %edx
addl $0x2, %edx
callq 0x148a0
movl %eax, %ecx
movq -0x290(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x18(%rax)
movl $0x8, -0x54(%rbp)
movq -0x290(%rbp), %rax
cmpl $0x8, 0x74(%rax)
jle 0x15c64
movq -0x290(%rbp), %rax
movl -0x284(%rbp), %ecx
movl -0x4c(%rbp), %edx
addl $0x1, %edx
shll $0x10, %edx
orl %edx, %ecx
movl -0x50(%rbp), %edx
addl $0x1, %edx
shll $0x18, %edx
orl %edx, %ecx
movq (%rax), %rax
movl %ecx, 0x20(%rax)
movl $0x9, -0x54(%rbp)
cmpl $0x2, -0x54(%rbp)
jle 0x15c83
movq -0x290(%rbp), %rax
movl $0x2, %ecx
subl -0x54(%rbp), %ecx
shll $0x14, %ecx
movq (%rax), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x290(%rbp), %rax
movl $0x0, -0x64(%rbp)
cmpl $0x0, 0x64(%rax)
jne 0x15e32
cmpl $0x1, -0x58(%rbp)
jne 0x15ce0
cmpl $0x0, -0x5c(%rbp)
jg 0x15ce0
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
movsbl -0x270(%rbp), %ecx
leaq 0x4c6a(%rip), %rsi      # 0x1a92d
leaq 0x4c59(%rip), %rax      # 0x1a923
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movb $0x0, %al
callq 0x2060
movl %eax, -0x64(%rbp)
jmp 0x15e30
cmpl $0x2, -0x58(%rbp)
jne 0x15d25
cmpl $0x0, -0x5c(%rbp)
jg 0x15d25
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
movsbl -0x270(%rbp), %ecx
leaq 0x4c3a(%rip), %rsi      # 0x1a942
leaq 0x4c2a(%rip), %rax      # 0x1a939
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movb $0x0, %al
callq 0x2060
movl %eax, -0x64(%rbp)
jmp 0x15e2e
cmpl $0x0, -0x5c(%rbp)
jg 0x15d6a
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
movsbl -0x270(%rbp), %ecx
leaq 0x4c12(%rip), %rsi      # 0x1a959
leaq 0x4bff(%rip), %rax      # 0x1a94d
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movl -0x58(%rbp), %edx
subl $0x1, %edx
movb $0x0, %al
callq 0x2060
movl %eax, -0x64(%rbp)
jmp 0x15e2c
cmpl $0x1, -0x58(%rbp)
jne 0x15dac
cmpl $0x1, -0x5c(%rbp)
jne 0x15dac
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
movsbl -0x270(%rbp), %ecx
leaq 0x4bdf(%rip), %rsi      # 0x1a971
leaq 0x4bce(%rip), %rax      # 0x1a967
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movb $0x0, %al
callq 0x2060
movl %eax, -0x64(%rbp)
jmp 0x15e2a
cmpl $0x1, -0x58(%rbp)
jne 0x15deb
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
movsbl -0x270(%rbp), %ecx
leaq 0x4bbb(%rip), %rsi      # 0x1a989
leaq 0x4ba8(%rip), %rax      # 0x1a97d
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movl -0x5c(%rbp), %edx
movb $0x0, %al
callq 0x2060
movl %eax, -0x64(%rbp)
jmp 0x15e28
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
movsbl -0x270(%rbp), %ecx
leaq 0x4ba7(%rip), %rsi      # 0x1a9ae
leaq 0x4b89(%rip), %rax      # 0x1a997
cmpl $0x0, %ecx
cmoveq %rax, %rsi
movl -0x5c(%rbp), %edx
movl -0x58(%rbp), %ecx
subl $0x1, %ecx
movb $0x0, %al
callq 0x2060
movl %eax, -0x64(%rbp)
jmp 0x15e2a
jmp 0x15e2c
jmp 0x15e2e
jmp 0x15e30
jmp 0x15e32
movq -0x290(%rbp), %rax
movq 0x150(%rax), %rdi
movslq -0x64(%rbp), %rax
addq %rax, %rdi
leaq -0x270(%rbp), %rsi
callq 0x2120
movq -0x290(%rbp), %rax
movq 0x158(%rax), %rax
movb $0x0, (%rax)
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
nopl (%rax)