// File: /workspace/github_cpp_makefile_star2_O2/probonopd[P]decodeir/DecodeIR.cpp
// Function: Signal::tryCanalSat()
void Signal::tryCanalSat()	// GD 2009  Added tryCanalSat

// CanalSat		{55.5k,250,msb}<-1,1|1,-1>(T=0,(1,-1,D:7,S:6,T:1,0:1,F:7,-89m,T=1)+) 
// where T=0 for the first frame and T=1 for all repeats
// (PID = 018C)
// CanalSatLD     {56k,320,msb}<-1,1|1,-1>(T=0,(1,-1,D:7,S:6,T:1,0:1,F:6,~F:1,-85m,T=1)+)  DAR Aug 2012
// Amino		{56.0k,268,msb}<-1,1|1,-1>(T=1,(7,-6,3,D:4,1:1,T:1,1:2,0:8,F:8,15:4,C:4,-79m,T=0)+)
// also 36k is used
// where T=1 for first frame and T=0 for all repeat frames
// with C = sum of the first 7 nibbles mod 15

// Zaptor		{36k,330,msb}<-1,1|1,-1>(8,-6,2,D:8,T:1,S:7,F:8,E:4,C:4,-74m)+
// where T=0 for all frames except the last, T=1 for last frame, E is a checksum seed
// with C = (D:4+D:4:4+S:4+S:3:4+8*T+F:4+F:4:4+E)&15

{
	int HB;
	static int M = 0;	// toggle mask or previous T	
	int T = 0;				// toggle
	static int FC = 0;	// count of bypassed frames
	static int confBits1to32 = 0;	// DAR July 2011
	static int confBits34to65 = 0;	//filled in when a toggle changes state  DAR July 2011

	if ( nFrameL < 11 || nTotDur < 5000) return;
	if (*pFrame < 1000)
	{	
		if (sortBurst.min3 < 570) 
		{                         
			HB = 250;
		}
		else 
		{
			HB = 320;            //DAR AUG 2012 add CanalSatLD                                       
		}
		if (	*pFrame < HB*.5 
			||	nMaxDur < .5*HB 
			||	nMaxDur > 2.5*HB ) 
		{
			return;
		}
	}
	else
	{
		//if (nFreq > 46000)  //DAR March 2011 Some Amino is 36KHz  
		if (sortBurst.min3 < 600) //so use burst times instead
		{                         
			HB = 270;
		}
		else 
		{
			HB = 330;                                                   
		}
		if (	nMaxDur != *pFrame 
			||	nMaxDur < 3.5*HB 
			||	nMaxDur > 14*HB ) // First ON nominally 7 or 8 half bits
		{
			return;
		}
	}

	if (   !framed(40*HB)
		|| sortOn.min1 < HB * .3
		|| sortOn.max2 > HB * 4.5		// nominal 4
        || sortBurst.max2 > HB * 7  )	// nominal 4,-2
	{
		return;
	}

    minGlitch = HB*.25;
	nMinShort2 = HB * .5;
	nMaxShort2 = HB * 1.5;

	cleanup();
	nBit = 1;
	nState = (HB == 270 || HB == 330) ? 0 : 1;
	pBit += 2 - nState;

	while (pBit < pFrameEnd)
	{
		if ( nBit == 1 || ((HB == 270 || HB == 330) && nBit == 2))
		{
			int pulseL = (HB == 270 || HB == 330) && nBit == 1;						// Is initial long MARK?
			nMinShort = HB * (pulseL ? HB == 330 ? 1.5 : 2.4 : .5);	// nominally 2 : 3 : 1
			nMaxShort = nMinLong = HB * (pulseL ? HB == 330 ? 2.5 : 3.5 : 1.5);	// nominally 2 v 3 : 3 v 4 : 1 v 2
			nMaxLong = HB * (pulseL ? HB == 330 ? 3.6 : 4.8 : 2.5);	// nominally 3 : 4 : 2
		}
		if ( ! phaseBit() ) return;
	}
	if ( nBit != ( (HB == 270 || HB == 330) ? 33 : 23 ) ) return;		// wrong number of bits
	if ( (HB == 250 || HB == 320) && getLsb(15,1) ) return;            // bit 15 must be zero for CanalSat

	// look to see if there is a following frame
	float* pFrameEnd1 = pFrameEnd;					// save for later restoration
	float* pFrameEnd2 = pFrameEnd + 1;
	for ( ; pFrameEnd2 < pMainLimit; pFrameEnd2++ )
	{
		if ( *pFrameEnd2 > 40 * HB ) break;
	};
	nState = (HB == 270 || HB == 330) ? 0 : 1;
	pBit = pFrameEnd + 3 - nState;
	pFrameEnd = pFrameEnd2;							// temp change for use by phaseBit{}
	nBit++;

	while ( pBit < pFrameEnd )
	{
		if ( (HB == 270 || HB == 330) && nBit <= 35 )
		{
			int pulseL = nBit == 34;
			nMinShort = HB * (pulseL ? HB == 330 ? 1.5 : 2.4 : .5);
			nMaxShort = nMinLong = HB * (pulseL ? HB == 330 ? 2.5 : 3.5 : 1.5);
			nMaxLong = HB * (pulseL ? HB == 330 ? 3.6 : 4.8 : 2.5);
		}
		if ( ! phaseBit() ) break;
	}
	pFrameEnd = pFrameEnd1;							// restore original value
	makeMsb();
	if ( (HB == 270 || HB == 330) )  //much of the below Amino/Zaptor stuff revised by DAR July 2011
	{
		int s = 0;	// For Amino andZaptor protocols, check checksum
		int tmp1 = getMsb(1,32);  
		int tmp2 = getMsb(34,32); 
		for (int n=1; n<29; n+=4) s += getMsb(n,4);
		if ( getMsb(29,4) != (s&15) ) return; 
		if ( nBit == 66 )
		{
			s = 0;   // check checksum of second frame
			for (int n=34; n<62; n+=4) s += getMsb(n,4);	
			if ( getMsb(62,4) != (s&15) ) return;
			T = ((tmp1 ^ tmp2) & 0xFFFFFFF0);	//mask off checksum nibble
			if ((T == 0x04000000) 			//Amino confirmed; also means subdevice and function codes match
					&& (tmp1 & 0x04000000))		// repeat bit changed from 1 to 0, so tmp1 is a start frame 
			{
				AminoToggleDetected = true;
				confBits1to32 = tmp1;
				confBits34to65 = tmp2;
				if ( FC == 0 ) setzContext();			// save the context value
				FC++;	
				return;			// wait for repeat to come round
			}
			if	((T == 0x00800000)			//Zaptor confirmed; also shows subdevice and function codes match
					&& (tmp2 & 0x00800000)) //repeat bit changed from 0 to 1, so tmp2 is an end frame 
			{  
				ZaptorToggleDetected = true;
				confBits1to32 = tmp1;
				confBits34to65 = tmp2;
			}
		}
	}
	if ( (HB == 250 || HB == 320)&&	nBit == 46 )
	{
		T = getMsb(14,1) ^ getMsb(37,1);				// difference between the toggle values
		if	(	( (M == 0) ^ (T == 0) )					// exactly one of M and T must be zero
			&&	getMsb(1,13) == getMsb(24,13)			// all bits other than toggle must be equal
			&&	getMsb(15,8) == getMsb(38,8) )
		{
			M = 1;										// next frame is valid repeat
			if ( FC == 0 ) setzContext();				// save the context value
			FC++;										// increment count of bypassed frames
			return;										// wait for repeat to come round
		}
	}					
	if ( HB == 250 )
	{
		*pDevice = getMsb(1,7);
		*pSubDevice = getMsb(8,6);
		*pOBC = getMsb(16,7);
		pHex[0] = *pOBC << 1;
		strcpy( pProtocol, "CanalSat" );
		nNote_out = 4;
		strcpy( pMisc, M == 0 ? (nNote_out = 1, nAuxNote_out = 1, "no start frame") : "");
	}
	else if ( HB == 320 )
	{
		*pDevice = getMsb(1,7);
		*pSubDevice = getMsb(8,6);
		*pOBC = getMsb(16,6);
		strcpy( pProtocol, "CanalSatLD" );
		nNote_out = 4;
		strcpy( pMisc, M == 0 ? (nNote_out = 1, nAuxNote_out = 1, "no start frame") : "");
	}
	else 
	{
		if (AminoToggleDetected) HB = 270;		
		else if (ZaptorToggleDetected) HB = 330;	
		else 
		{
			confBits1to32 = getMsb(1,32);
			int tmp3 = confBits1to32 & 0x000000F0; 
			if (tmp3 == 0xF0) HB = 270;			//Amino decided by seed nibble
			else if (tmp3 == 0x50) HB = 330;	//Zaptor 
		}	//  else decide protocol by already determined HB duration 	
		if ( HB == 270 )					//Amino
		{
			*pDevice = (confBits1to32 >> 28) & 0xF;	
			*pSubDevice = (confBits1to32 >> 16) & 0xFF;  //always zero according to the Amino spec
			*pOBC = (confBits1to32 >> 8) & 0xFF;   
			pHex[0] = *pOBC;
			int seed = (confBits1to32 >> 4) & 0xF;
			if (seed != 0x0F) sprintf(pMisc, "E = %d", seed);
			if (nFreq > 46000) strcpy( pProtocol, "Amino-56");
			else strcpy( pProtocol, "Amino-36");
			if (AminoToggleDetected)  nNote_out = 4;
			else
			{
				nNote_out = 1;
				if ((confBits1to32 & 0x04000000) == 0) 
				{
					nAuxNote_out = 1;
					if (*pMisc){strcat(pMisc, ", ");}
					strcat(pMisc, "no start frame");
				}
				else 
				{
					nAuxNote_out = 0;
					if (*pMisc){strcat(pMisc, ", ");}
					strcat(pMisc, "no end frame");
				}
			}
		}
		else if ( HB == 330 )  //Zaptor
		{
			if (!ZaptorToggleDetected && (nBit == 66))  
			{
					if ( FC == 0 ) setzContext();	// save the context value
					FC++;	
					return;			// wait for repeat to come round
			}
			*pDevice = (confBits1to32 >> 24) & 0xFF;
			*pSubDevice = (confBits1to32 >> 16) & 0x7F;  
			*pOBC = (confBits1to32 >> 8) & 0xFF;   
			pHex[0] = *pOBC;
			int seed = (confBits1to32 >> 4) & 0xF;
			if (nFreq > 46000) strcpy( pProtocol, "Zaptor-56");
			else strcpy( pProtocol, "Zaptor-36");
			if (seed != 5) sprintf(pMisc, "E = %d", seed);
			if (ZaptorToggleDetected) nNote_out = 5;  
			else if ((confBits1to32 & 0x00800000) == 0)
			{
				nNote_out = 1;
				nAuxNote_out = 0;
				if (*pMisc){strcat(pMisc, ", ");}
				strcat(pMisc, "no end frame");
			}
			else
			{
				nNote_out = 0;
				nAuxNote_out = 6;
				if (*pMisc){strcat(pMisc, ", ");}
				strcat(pMisc, "no start frame");
			}
		}
	}
	nFrameCount = FC;
	M = 0;		// reset static variables
	FC = 0;		
}

// Assembly:
cmpl $0xb, 0x48(%rdi)
jl 0xbd74
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movss 0x62ba(%rip), %xmm0     # 0x115ec
ucomiss 0x98(%rdi), %xmm0
ja 0xbd66
movq 0x38(%rbx), %rax
movss (%rax), %xmm0
movss 0x61f9(%rip), %xmm1     # 0x11548
ucomiss %xmm0, %xmm1
movss 0x1c8(%rbx), %xmm1
jbe 0xb3ba
movss 0x62dc(%rip), %xmm2     # 0x11640
ucomiss %xmm1, %xmm2
movl $0xfa, %ecx
movl $0x140, %r15d           # imm = 0x140
cmoval %ecx, %r15d
cvtss2sd %xmm0, %xmm2
cvtsi2sd %r15d, %xmm0
movsd 0x5d49(%rip), %xmm1     # 0x110d0
mulsd %xmm0, %xmm1
ucomisd %xmm2, %xmm1
ja 0xbd66
cvtss2sd 0x9c(%rbx), %xmm2
ucomisd %xmm2, %xmm1
ja 0xbd66
mulsd 0x5dd1(%rip), %xmm0     # 0x11180
ucomisd %xmm0, %xmm2
jbe 0xb417
jmp 0xbd66
movss 0x61e2(%rip), %xmm2     # 0x115a4
ucomiss %xmm1, %xmm2
movl $0x10e, %ecx            # imm = 0x10E
movl $0x14a, %r15d           # imm = 0x14A
cmoval %ecx, %r15d
movss 0x9c(%rbx), %xmm1
ucomiss %xmm0, %xmm1
jne 0xbd66
jp 0xbd66
cvtss2sd %xmm1, %xmm0
cvtsi2sd %r15d, %xmm2
mulsd 0x5fc4(%rip), %xmm2     # 0x113c0
ucomisd %xmm0, %xmm2
ja 0xbd66
imull $0xe, %r15d, %ecx
cvtsi2ss %ecx, %xmm0
ucomiss %xmm0, %xmm1
ja 0xbd66
imull $0x28, %r15d, %ecx
cvtsi2ss %ecx, %xmm1
movss 0x140(%rbx), %xmm0
movss %xmm1, -0x34(%rbp)
ucomiss %xmm1, %xmm0
jb 0xbd66
cvtss2sd 0x180(%rbx), %xmm0
cvtsi2sd %r15d, %xmm2
movsd 0x5d0e(%rip), %xmm1     # 0x11158
movsd %xmm2, -0x30(%rbp)
mulsd %xmm2, %xmm1
ucomisd %xmm0, %xmm1
ja 0xbd66
cvtss2sd 0x188(%rbx), %xmm0
movsd 0x5cfb(%rip), %xmm1     # 0x11168
mulsd -0x30(%rbp), %xmm1
ucomisd %xmm1, %xmm0
ja 0xbd66
imull $0x7, %r15d, %ecx
cvtsi2ss %ecx, %xmm0
movss 0x1e0(%rbx), %xmm1
ucomiss %xmm0, %xmm1
ja 0xbd66
movsd 0x5cd3(%rip), %xmm0     # 0x11170
movsd -0x30(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe0(%rbx)
movsd 0x5c16(%rip), %xmm0     # 0x110d0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movss %xmm0, 0xf4(%rbx)
movsd 0x5ca1(%rip), %xmm0     # 0x11178
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xf8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
movl $0x1, 0xc0(%rbx)
cmpl $0x10e, %r15d           # imm = 0x10E
setne %cl
xorl %edx, %edx
cmpl $0x14a, %r15d           # imm = 0x14A
setne %dl
andb %dl, %cl
movzbl %cl, %r14d
movl %r14d, 0xc4(%rbx)
pushq $0x2
popq %rcx
subl %r14d, %ecx
leaq (%rax,%rcx,4), %rax
movq %rax, 0xc8(%rbx)
shll $0x3, %edx
leaq 0x5b37(%rip), %rax      # 0x11070
movsd (%rdx,%rax), %xmm0
leaq 0x5b3b(%rip), %rax      # 0x11080
movsd (%rdx,%rax), %xmm2
movsd %xmm2, -0x50(%rbp)
leaq 0x5b3a(%rip), %rax      # 0x11090
movsd (%rdx,%rax), %xmm2
movsd %xmm2, -0x48(%rbp)
movsd %xmm0, -0x58(%rbp)
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
movq 0x40(%rbx), %r12
movl 0xc0(%rbx), %eax
cmpq %r12, 0xc8(%rbx)
jae 0xb647
cmpl $0x1, %eax
je 0xb5ad
cmpl $0x14a, %r15d           # imm = 0x14A
je 0xb5a4
cmpl $0x10e, %r15d           # imm = 0x10E
jne 0xb632
cmpl $0x2, %eax
jne 0xb632
cmpl $0x14a, %r15d           # imm = 0x14A
je 0xb5d4
movss -0x38(%rbp), %xmm1
movsd 0x5bbd(%rip), %xmm0     # 0x11180
movsd 0x5bad(%rip), %xmm2     # 0x11178
cmpl $0x10e, %r15d           # imm = 0x10E
jne 0xb5fd
movss -0x38(%rbp), %xmm1
movsd 0x5b9f(%rip), %xmm0     # 0x11180
movsd 0x5b8f(%rip), %xmm2     # 0x11178
cmpl $0x1, %eax
jne 0xb5fd
movss -0x3c(%rbp), %xmm1
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm2
movss %xmm1, 0xe4(%rbx)
movsd -0x30(%rbp), %xmm3
mulsd %xmm3, %xmm2
cvtsd2ss %xmm2, %xmm1
movss %xmm1, 0xec(%rbx)
movss %xmm1, 0xe8(%rbx)
mulsd %xmm3, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xf0(%rbx)
movq %rbx, %rdi
callq 0xf4f4
testl %eax, %eax
jne 0xb572
jmp 0xbd66
testl %r14d, %r14d
pushq $0x17
popq %rcx
pushq $0x21
popq %rdx
cmovnel %ecx, %edx
cmpl %edx, %eax
jne 0xbd66
cmpl $0x140, %r15d           # imm = 0x140
je 0xb66d
cmpl $0xfa, %r15d
jne 0xb67a
cmpb $0x0, 0xa1(%rbx)
js 0xbd66
movq 0x10(%rbx), %rdx
leaq 0x4(%r12), %rsi
movss -0x34(%rbp), %xmm1
movq %rsi, %rcx
cmpq %rdx, %rsi
jae 0xb69d
movss (%rcx), %xmm0
leaq 0x4(%rcx), %rsi
ucomiss %xmm1, %xmm0
jbe 0xb688
movl %r14d, 0xc4(%rbx)
shll $0x2, %r14d
movq %r12, %rdx
subq %r14, %rdx
addq $0xc, %rdx
movq %rdx, 0xc8(%rbx)
movq %rcx, 0x40(%rbx)
incl %eax
movl %eax, 0xc0(%rbx)
movq 0xc8(%rbx), %rax
cmpq 0x40(%rbx), %rax
jae 0xb76e
cmpl $0x14a, %r15d           # imm = 0x14A
je 0xb6e8
cmpl $0x10e, %r15d           # imm = 0x10E
jne 0xb75e
movl 0xc0(%rbx), %eax
cmpl $0x23, %eax
jg 0xb75e
movsd -0x58(%rbp), %xmm0
cmpl $0x22, %eax
je 0xb705
movsd 0x59cb(%rip), %xmm0     # 0x110d0
mulsd -0x30(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xe4(%rbx)
movsd -0x50(%rbp), %xmm0
je 0xb725
movsd 0x5a53(%rip), %xmm0     # 0x11178
mulsd -0x30(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xec(%rbx)
movss %xmm0, 0xe8(%rbx)
movsd -0x48(%rbp), %xmm0
je 0xb74d
movsd 0x5a33(%rip), %xmm0     # 0x11180
mulsd -0x30(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xf0(%rbx)
movq %rbx, %rdi
callq 0xf4f4
testl %eax, %eax
jne 0xb6c5
movq %r12, 0x40(%rbx)
movq %rbx, %rdi
callq 0xec52
cmpl $0xfa, %r15d
je 0xb8c2
cmpl $0x14a, %r15d           # imm = 0x14A
je 0xb7aa
cmpl $0x140, %r15d           # imm = 0x140
je 0xb8c2
cmpl $0x10e, %r15d           # imm = 0x10E
jne 0xb9be
pushq $0x1
popq %r13
pushq $0x20
popq %r14
movq %rbx, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0xeb6a
movl %eax, -0x30(%rbp)
pushq $0x22
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0xeb6a
movl %eax, -0x34(%rbp)
xorl %r12d, %r12d
pushq $0x4
popq %r14
cmpl $0x1d, %r13d
jae 0xb7f8
movq %rbx, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0xeb6a
addl %eax, %r12d
addl $0x4, %r13d
jmp 0xb7db
pushq $0x1d
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0xeb6a
andl $0xf, %r12d
cmpl %r12d, %eax
jne 0xbd66
cmpl $0x42, 0xc0(%rbx)
jne 0xb8ac
xorl %r14d, %r14d
pushq $0x4
popq %r13
pushq $0x22
popq %r12
cmpl $0x3e, %r12d
jae 0xb848
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0xeb6a
addl %eax, %r14d
addl $0x4, %r12d
jmp 0xb82b
pushq $0x3e
popq %rsi
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0xeb6a
andl $0xf, %r14d
cmpl %r14d, %eax
jne 0xbd66
movl -0x34(%rbp), %eax
movl -0x30(%rbp), %edx
xorl %edx, %eax
andl $-0x10, %eax
cmpl $0x4000000, %eax        # imm = 0x4000000
setne %cl
btl $0x1a, %edx
setae %dl
orb %cl, %dl
je 0xbcb2
cmpl $0x800000, %eax         # imm = 0x800000
setne %al
btl $0x17, -0x34(%rbp)
setae %cl
orb %al, %cl
jne 0xb8ac
movl $0x1, 0xbc(%rbx)
movl -0x30(%rbp), %eax
movl %eax, 0x9a68(%rip)      # 0x15314
cmpl $0x140, %r15d           # imm = 0x140
je 0xb8c2
cmpl $0xfa, %r15d
jne 0xb9be
cmpl $0x2e, 0xc0(%rbx)
jne 0xb945
movb 0xa1(%rbx), %al
movb 0xa4(%rbx), %cl
shrb %al
shrb $0x2, %cl
xorb %al, %cl
andb $0x1, %cl
cmpb %cl, 0x9a25(%rip)       # 0x1530c
je 0xb945
pushq $0x1
popq %rsi
pushq $0xd
popq %r14
movq %rbx, %rdi
movl %r14d, %edx
callq 0xeb6a
movl %eax, %r12d
pushq $0x18
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0xeb6a
cmpl %eax, %r12d
jne 0xb945
pushq $0xf
popq %rsi
pushq $0x8
popq %r14
movq %rbx, %rdi
movl %r14d, %edx
callq 0xeb6a
movl %eax, %r12d
pushq $0x26
popq %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0xeb6a
cmpl %eax, %r12d
jne 0xb945
movb $0x1, 0x99cc(%rip)      # 0x1530c
jmp 0xbcd4
cmpl $0x140, %r15d           # imm = 0x140
je 0xba50
cmpl $0xfa, %r15d
jne 0xb9be
movzbl 0xa0(%rbx), %eax
andl $0x7f, %eax
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
movzbl 0xa1(%rbx), %eax
shrl $0x2, %eax
movq 0x168(%rbx), %rcx
movl %eax, (%rcx)
movzbl 0xa2(%rbx), %eax
movl %eax, %ecx
shrl %ecx
movq 0x170(%rbx), %rdx
movl %ecx, (%rdx)
andl $-0x2, %eax
movq 0x178(%rbx), %rcx
movl %eax, (%rcx)
movq 0x148(%rbx), %rax
movabsq $0x7461536c616e6143, %rcx # imm = 0x7461536C616E6143
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
jmp 0xbaa4
cmpl $0x0, 0xb8(%rbx)
je 0xbae9
movl 0x9943(%rip), %edx      # 0x15314
movl %edx, %eax
shrl $0x1c, %eax
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
movl %edx, %eax
shrl $0x10, %eax
movl $0xff, %ecx
andl %ecx, %eax
movq 0x168(%rbx), %rsi
movl %eax, (%rsi)
movl %edx, %eax
shrl $0x8, %eax
andl %ecx, %eax
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
movq 0x178(%rbx), %rcx
movl %eax, (%rcx)
shrl $0x4, %edx
andl $0xf, %edx
cmpl $0xf, %edx
je 0xba2d
movq 0x150(%rbx), %rdi
leaq 0x636a(%rip), %rsi      # 0x11d90
xorl %eax, %eax
callq 0x2060
cmpl $0xb3b1, 0x2c(%rbx)     # imm = 0xB3B1
movq 0x148(%rbx), %rax
jl 0xbb59
movabsq $0x36352d6f6e696d41, %rcx # imm = 0x36352D6F6E696D41
jmp 0xbb63
movzbl 0xa0(%rbx), %eax
andl $0x7f, %eax
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
movzbl 0xa1(%rbx), %eax
shrl $0x2, %eax
movq 0x168(%rbx), %rcx
movl %eax, (%rcx)
movzbl 0xa2(%rbx), %eax
shrl $0x2, %eax
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
movq 0x148(%rbx), %rax
movabsq $0x7461536c616e6143, %rcx # imm = 0x7461536C616E6143
movq %rcx, (%rax)
movl $0x444c74, 0x7(%rax)    # imm = 0x444C74
movl $0x4, 0x88(%rbx)
movq 0x150(%rbx), %rdi
cmpb $0x0, 0x9850(%rip)      # 0x1530c
je 0xbac7
leaq 0x6640(%rip), %rsi      # 0x12105
jmp 0xbadf
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x88(%rbx)
leaq 0x6248(%rip), %rsi      # 0x11d27
callq 0x2120
jmp 0xbd4c
cmpl $0x0, 0xbc(%rbx)
je 0xbba8
movl 0x9818(%rip), %edx      # 0x15314
movl %edx, %eax
shrl $0x18, %eax
movq 0x160(%rbx), %rcx
movl %eax, (%rcx)
movl %edx, %eax
shrl $0x10, %eax
andl $0x7f, %eax
movq 0x168(%rbx), %rcx
movl %eax, (%rcx)
movzbl %dh, %eax
movq 0x170(%rbx), %rcx
movl %eax, (%rcx)
movq 0x178(%rbx), %rcx
movl %eax, (%rcx)
shrl $0x4, %edx
andl $0xf, %edx
cmpl $0xb3b1, 0x2c(%rbx)     # imm = 0xB3B1
movq 0x148(%rbx), %rax
jl 0xbbf9
movabsq $0x352d726f7470615a, %rcx # imm = 0x352D726F7470615A
jmp 0xbc03
movabsq $0x36332d6f6e696d41, %rcx # imm = 0x36332D6F6E696D41
movq %rcx, (%rax)
movb $0x0, 0x8(%rax)
cmpl $0x0, 0xb8(%rbx)
je 0xbb82
movl $0x4, 0x88(%rbx)
jmp 0xbd4c
movl $0x1, 0x88(%rbx)
testb $0x4, 0x9784(%rip)      # 0x15317
jne 0xbc3e
movl $0x1, 0x8c(%rbx)
jmp 0xbcfe
pushq $0x1
popq %rsi
pushq $0x20
popq %rdx
movq %rbx, %rdi
callq 0xeb6a
movl %eax, %edx
movl %eax, 0x9756(%rip)      # 0x15314
andb $-0x10, %al
cmpb $0x50, %al
je 0xbcc7
movl %edx, %eax
andl $0xf0, %eax
cmpl $0xf0, %eax
je 0xb9d1
cmpl $0x14a, %r15d           # imm = 0x14A
je 0xbcc7
cmpl $0x10e, %r15d           # imm = 0x10E
je 0xb9d1
jmp 0xbd4c
movabsq $0x332d726f7470615a, %rcx # imm = 0x332D726F7470615A
movq %rcx, (%rax)
movw $0x36, 0x8(%rax)
cmpl $0x5, %edx
je 0xbc26
movq 0x150(%rbx), %rdi
leaq 0x6171(%rip), %rsi      # 0x11d90
xorl %eax, %eax
callq 0x2060
cmpl $0x0, 0xbc(%rbx)
je 0xbc47
movl $0x5, 0x88(%rbx)
jmp 0xbd4c
andl $0x0, 0x8c(%rbx)
jmp 0xbc5f
testb $-0x80, 0x96c8(%rip)    # 0x15316
jne 0xbced
movq $0x1, 0x88(%rbx)
movq 0x150(%rbx), %r14
cmpb $0x0, (%r14)
je 0xbc88
movq %r14, %rdi
callq 0x20a0
movw $0x202c, (%r14,%rax)    # imm = 0x202C
movb $0x0, 0x2(%r14,%rax)
movq 0x150(%rbx), %r14
movq %r14, %rdi
callq 0x20a0
movabsq $0x6620646e65206f6e, %rcx # imm = 0x6620646E65206F6E
movq %rcx, (%r14,%rax)
movabsq $0x656d6172662064, %rcx # imm = 0x656D6172662064
movq %rcx, 0x5(%r14,%rax)
jmp 0xbd4c
movl $0x1, 0xb8(%rbx)
movl -0x30(%rbp), %eax
movl %eax, 0x964f(%rip)      # 0x15314
jmp 0xbcd4
cmpl $0x42, 0xc0(%rbx)
jne 0xbaf6
movl 0x9635(%rip), %r14d     # 0x15310
testl %r14d, %r14d
jne 0xbce8
movq %rbx, %rdi
callq 0x266a
incl %r14d
jmp 0xbd5f
movabsq $0x600000000, %rax      # imm = 0x600000000
movq %rax, 0x88(%rbx)
movq 0x150(%rbx), %r14
cmpb $0x0, (%r14)
je 0xbd27
movq %r14, %rdi
callq 0x20a0
movw $0x202c, (%r14,%rax)    # imm = 0x202C
movb $0x0, 0x2(%r14,%rax)
movq 0x150(%rbx), %r14
movq %r14, %rdi
callq 0x20a0
movabsq $0x7472617473206f6e, %rcx # imm = 0x7472617473206F6E
movq %rcx, (%r14,%rax)
movabsq $0x656d6172662074, %rcx # imm = 0x656D6172662074
movq %rcx, 0x7(%r14,%rax)
movl 0x95be(%rip), %eax      # 0x15310
movl %eax, 0x60(%rbx)
movb $0x0, 0x95b0(%rip)      # 0x1530c
xorl %r14d, %r14d
movl %r14d, 0x95aa(%rip)     # 0x15310
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop