// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/primatesv1ape80/ref/encrypt.cpp
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
    unsigned char *m,unsigned long long *mlen,
    unsigned char *nsec,
    const unsigned char *c,unsigned long long clen,
    const unsigned char *ad,unsigned long long adlen,
    const unsigned char *npub,
    const unsigned char *k
)
{
	/*
    ... generating a plaintext m[0],m[1],...,m[*mlen-1]
    ... and secret message number nsec[0],nsec[1],...
    ... from a ciphertext c[0],c[1],...,c[clen-1]
    ... and associated data ad[0],ad[1],...,ad[adlen-1]
    ... and public message number npub[0],npub[1],...
    ... and secret key k[0],k[1],...
    ...
	*/
	unsigned char V[StateSize]; //the state represented in Elements
	//Temp variables represented as elements
	unsigned char key[KeySizeElements];
	unsigned char nonce[NonceSizeElements];
	unsigned char tag[TagSizeElements];
	unsigned char data[RateSizeElements];
	unsigned char cipher[RateSizeElements];
	unsigned char IV[StateSize]; //temp state represented in Elements
	
	if((clen<(TagSizeBytes+RateSizeBytes))&&(clen!=TagSizeBytes)) return -1; //invalid ciphertext
   
	//a temporary array for message
	unsigned char *mT = (unsigned char*) malloc(clen-TagSizeBytes);
    if (mT == NULL) return -2; // memory allocation failure
	
	Bytes2Element(key,k,0,KeySizeElements); //representing k as elements
	Bytes2Element(nonce,npub,0,NonceSizeElements); //representing npub as elements

	// IV <-- O||K
	InitializeState(IV,key);
	// Treating the nonce as the first part of the associated data
	for(int i=0; i<(NonceSizeElements/RateSizeElements); i++)
	{
		// IV <-- p_1 (N[i]^IV_r || IV_c)
		for(int j=0; j<RateSizeElements; j++)
			IV[j]^=nonce[RateSizeElements*i+j];
		p_1(IV);
	}
	if(adlen!=0)
	{ 
		// for i=1 to u-1 (except the last block which needs padding)
		if(adlen>RateSizeBytes)
		{ 
			for(unsigned long long i=0; i<adlen-RateSizeBytes; i=i+RateSizeBytes)
			{
				Bytes2Element(data,ad,i,RateSizeElements); // representing a block of ad as elements
				// IV <-- p_1 (A[i]^IV_r || IV_c)
				for(int j=0; j<RateSizeElements; j++)
					IV[j]^=data[j];
				p_1(IV);
			}
		}
		// IV <-- A[u]^IV_r || IV_c
		int l = adlen%RateSizeBytes;
		if(l==0){ //do padding with spill over			
			Bytes2Element(data,ad,adlen-RateSizeBytes,RateSizeElements); // representing last block of ad as elements
			for(int i=0; i<RateSizeElements; i++)
				IV[i]^=data[i];
			IV[RateSizeElements]^=16; //padding spills over to capacity
		}
		else{ //do standard padding
			unsigned char dataP[RateSizeBytes];
			for(int i=0; i< l; i++)
				dataP[i]=ad[adlen-l+i];
			dataP[l]=128; //padding over bytes
			for(int i=l+1; i<RateSizeBytes; i++)
				dataP[i]=0;
			Bytes2Element(data,dataP,0,RateSizeElements); // representing last padded block of ad as elements
			for(int i=0; i<RateSizeElements; i++)
				IV[i]^=data[i];
		}
		// IV <-- p_1(IV)
		p_1(IV);	
	}
	// IV <-- IV ^ (0..01)
	IV[StateSize-1]^=1;
	unsigned char tagT[TagSizeBytes];
	if(clen==TagSizeBytes){ //ciphertext length and hence the message length is 0
		*mlen=0;
		//do standard padding
		unsigned char dataP[RateSizeBytes];
		dataP[0]=128; //padding over bytes
		for(int i=1; i<RateSizeBytes; i++)
			dataP[i]=0;
		Bytes2Element(data,dataP,0,RateSizeElements);  // representing last block of m as elements
		// V <-- p_1 (M[1]^V_r || V_c)
		for(int i=0; i<RateSizeElements; i++)
			IV[i]^=data[i];
		p_1(IV);
		// T <-- (V_c)_c/2 ^ K 
		for(int i=0; i<TagSizeElements; i++)
			tag[i]=IV[RateSizeElements+i]^key[i]; 
		Element2Bytes(tagT,tag,0,TagSizeBytes) ;

		unsigned char cor=0;
		for(int i=0; i<TagSizeBytes; i++) //check if tags match
			cor = cor || (tagT[i]^c[i]);
		free(mT);
		if(cor==0) return 0;
		else return -1;
	}
	else{
		// V <-- p_1_inv(C[w] || K^T)
		Bytes2Element(cipher,c,clen-(TagSizeBytes+RateSizeBytes),RateSizeElements);
		Bytes2Element(tag,c,clen-(TagSizeBytes),TagSizeElements);
		for(int i=0; i<RateSizeElements; i++)
			V[i]=cipher[i];
		for(int i=0; i<CapacitySize; i++)
			V[RateSizeElements+i]=key[i]^tag[i];
		p_1_inv(V);
		
		if(clen==(TagSizeBytes+RateSizeBytes)){ //ciphertext is one block only hence plaintext length is less then or equal to RateSize
			// V <-- V ^ IV
			for(int i=0; i<StateSize; i++)
				V[i] ^= IV[i]; 
			unsigned char cor=0;
			for(int i=RateSizeElements+1; i<StateSize; i++) //check if IV_c matches with V_c
				cor = cor || V[i];
			cor = cor || (!((V[RateSizeElements]==0) || (V[RateSizeElements]==16)));
			if (cor==0)
			{
				for(int i=0; i<RateSizeElements; i++)
					data[i]=V[i];
				Element2Bytes(mT,data,0,RateSizeBytes); //representing m as bytes
				if(V[RateSizeElements]==16) *mlen=(unsigned long long) RateSizeBytes;
				else{ 
					unsigned char match=0;
					for(int i=0; i<RateSizeBytes; i++) {
						match |= (mT[i]==128);
					}
					if(match==0) { free(mT); return -1; }
					for(int i=RateSizeBytes-1; i>=0; i--)
						if(mT[i]==128) { *mlen=(unsigned long long) i; break;}
				}
				for(unsigned long long i=0; i<*mlen; i++)
					m[i]=mT[i];
				free(mT);
				return 0;
			}
			else { free(mT); return -1; }
		}
		else{
			*mlen=clen-TagSizeBytes;
			//for i=w (tha last block)
			int l = clen%RateSizeBytes;
			if (l==0){
				//M[w] <-- |V_r|_l^C[w-1]
				Bytes2Element(cipher,c,clen-(TagSizeBytes+2*RateSizeBytes),RateSizeElements);
				for(int i=0; i<RateSizeElements; i++)
					data[i]=V[i]^cipher[i];
				Element2Bytes(mT,data,clen-(TagSizeBytes+RateSizeBytes),RateSizeBytes); //representing last block m as bytes
				//V <-- V^M[w]10*
				for(int i=0; i<(RateSizeElements); i++)
					V[i]^=data[i];
				V[RateSizeElements]^=16;
			}
			else{
				//M[w] <-- |V_r|_l^C[w-1]
				unsigned char cipherP[RateSizeBytes];
				unsigned char mtmp[RateSizeBytes];
				Element2Bytes(cipherP,V,0,RateSizeBytes); //representing last block m as bytes
				for(int i=0; i<l; i++){
					mT[(clen-TagSizeBytes)-l+i]=cipherP[i]^c[clen-(TagSizeBytes+RateSizeBytes+l)+i];
					mtmp[i]=mT[(clen-TagSizeBytes)-l+i];
				}
				mtmp[l]=128;
				for(int i=l+1; i<RateSizeBytes; i++)
					mtmp[i]=0;
				Bytes2Element(data,mtmp,0,RateSizeElements);
				//V <-- V^M[w]10*
				for(int i=0; i<RateSizeElements; i++)
					V[i]^=data[i];	
			}
			l = (l==0) ? RateSizeBytes : l;
			//for i=w-1 to 2
			for(unsigned long long i=((clen-TagSizeBytes)-l); i>RateSizeBytes; i=i-5){
				// V <-- p_1_inv(V)
				p_1_inv(V);
				// M[i] <-- C[i-1]^V_r
				unsigned char mtmp[RateSizeElements];
				Bytes2Element(data,c,i-2*RateSizeBytes,RateSizeElements);
				for(int j=0; j<RateSizeElements; j++)
					mtmp[j]=data[j]^V[j];
				Element2Bytes(mT,mtmp,i-RateSizeBytes,RateSizeBytes); //representing last block m as bytes
				
				// V <-- C[i-1] || V_c
				for(int j=0; j<RateSizeElements; j++)
					V[j]=data[j];
			}
			//for i=1
			// V <-- p_1_inv(V)
			p_1_inv(V);
			// M[i] <-- C[i-1]^V_r
			for(int i=0; i<RateSizeElements; i++)
				data[i]=IV[i]^V[i];
			Element2Bytes(mT,data,0,RateSizeBytes); //representing last block m as bytes
			 //check if IV_c matches with V_c
			for(int j=0; j<RateSizeElements; j++)
				V[j]^=data[j];
			unsigned char cor=0;
			for(int i=RateSizeElements; i<StateSize; i++) 
				cor = cor || (V[i]^IV[i]);
			if(cor==0) {
				for(unsigned long long i=0; i<*mlen; i++)
					m[i]=mT[i];
			}
			free(mT);
			if (cor == 0) return 0;
			else return -1;
		}
	}
}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movq 0x210(%rsp), %rax
movq 0x208(%rsp), %rax
movq 0x200(%rsp), %rax
movq %rdi, 0x1e8(%rsp)
movq %rsi, 0x1e0(%rsp)
movq %rdx, 0x1d8(%rsp)
movq %rcx, 0x1d0(%rsp)
movq %r8, 0x1c8(%rsp)
movq %r9, 0x1c0(%rsp)
cmpq $0x19, 0x1c8(%rsp)
jae 0x2a25
cmpq $0x14, 0x1c8(%rsp)
je 0x2a25
movl $0xffffffff, 0x1f4(%rsp) # imm = 0xFFFFFFFF
jmp 0x3932
movq 0x1c8(%rsp), %rdi
subq $0x14, %rdi
callq 0x2070
movq %rax, 0xf8(%rsp)
cmpq $0x0, 0xf8(%rsp)
jne 0x2a59
movl $0xfffffffe, 0x1f4(%rsp) # imm = 0xFFFFFFFE
jmp 0x3932
leaq 0x170(%rsp), %rdi
movq 0x210(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x20, %ecx
callq 0x2180
leaq 0x160(%rsp), %rdi
movq 0x208(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x10, %ecx
callq 0x2180
leaq 0x100(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x2080
movl $0x0, 0xf4(%rsp)
cmpl $0x2, 0xf4(%rsp)
jge 0x2b3e
movl $0x0, 0xf0(%rsp)
cmpl $0x8, 0xf0(%rsp)
jge 0x2b1b
movl 0xf4(%rsp), %eax
shll $0x3, %eax
addl 0xf0(%rsp), %eax
cltq
movzbl 0x160(%rsp,%rax), %edx
movslq 0xf0(%rsp), %rax
movzbl 0x100(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x100(%rsp,%rax)
movl 0xf0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf0(%rsp)
jmp 0x2aca
leaq 0x100(%rsp), %rdi
callq 0x2050
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x2ab5
cmpq $0x0, 0x200(%rsp)
je 0x2e09
cmpq $0x5, 0x200(%rsp)
jbe 0x2c20
movq $0x0, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq 0x200(%rsp), %rcx
subq $0x5, %rcx
cmpq %rcx, %rax
jae 0x2c1e
leaq 0x138(%rsp), %rdi
movq 0x1c0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
movl $0x8, %ecx
callq 0x2180
movl $0x0, 0xe4(%rsp)
cmpl $0x8, 0xe4(%rsp)
jge 0x2bf8
movslq 0xe4(%rsp), %rax
movzbl 0x138(%rsp,%rax), %edx
movslq 0xe4(%rsp), %rax
movzbl 0x100(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x100(%rsp,%rax)
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
jmp 0x2bb2
leaq 0x100(%rsp), %rdi
callq 0x2050
movq 0xe8(%rsp), %rax
addq $0x5, %rax
movq %rax, 0xe8(%rsp)
jmp 0x2b68
jmp 0x2c20
movq 0x200(%rsp), %rax
movl $0x5, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0xe0(%rsp)
cmpl $0x0, 0xe0(%rsp)
jne 0x2cd7
leaq 0x138(%rsp), %rdi
movq 0x1c0(%rsp), %rsi
movq 0x200(%rsp), %rdx
subq $0x5, %rdx
movl $0x8, %ecx
callq 0x2180
movl $0x0, 0xdc(%rsp)
cmpl $0x8, 0xdc(%rsp)
jge 0x2cc0
movslq 0xdc(%rsp), %rax
movzbl 0x138(%rsp,%rax), %edx
movslq 0xdc(%rsp), %rax
movzbl 0x100(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x100(%rsp,%rax)
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x2c7a
movzbl 0x108(%rsp), %eax
xorl $0x10, %eax
movb %al, 0x108(%rsp)
jmp 0x2dfc
movl $0x0, 0xd0(%rsp)
movl 0xd0(%rsp), %eax
cmpl 0xe0(%rsp), %eax
jge 0x2d3d
movq 0x1c0(%rsp), %rax
movq 0x200(%rsp), %rcx
movslq 0xe0(%rsp), %rdx
subq %rdx, %rcx
movslq 0xd0(%rsp), %rdx
addq %rdx, %rcx
movb (%rax,%rcx), %cl
movslq 0xd0(%rsp), %rax
movb %cl, 0xd7(%rsp,%rax)
movl 0xd0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xd0(%rsp)
jmp 0x2ce2
movslq 0xe0(%rsp), %rax
movb $-0x80, 0xd7(%rsp,%rax)
movl 0xe0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xcc(%rsp)
cmpl $0x5, 0xcc(%rsp)
jge 0x2d8b
movslq 0xcc(%rsp), %rax
movb $0x0, 0xd7(%rsp,%rax)
movl 0xcc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xcc(%rsp)
jmp 0x2d5e
leaq 0x138(%rsp), %rdi
leaq 0xd7(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x8, %ecx
callq 0x2180
movl $0x0, 0xc8(%rsp)
cmpl $0x8, 0xc8(%rsp)
jge 0x2dfa
movslq 0xc8(%rsp), %rax
movzbl 0x138(%rsp,%rax), %edx
movslq 0xc8(%rsp), %rax
movzbl 0x100(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x100(%rsp,%rax)
movl 0xc8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc8(%rsp)
jmp 0x2db4
jmp 0x2dfc
leaq 0x100(%rsp), %rdi
callq 0x2050
movzbl 0x127(%rsp), %eax
xorl $0x1, %eax
movb %al, 0x127(%rsp)
cmpq $0x14, 0x1c8(%rsp)
jne 0x3029
movq 0x1e0(%rsp), %rax
movq $0x0, (%rax)
movb $-0x80, 0xab(%rsp)
movl $0x1, 0xa4(%rsp)
cmpl $0x5, 0xa4(%rsp)
jge 0x2e79
movslq 0xa4(%rsp), %rax
movb $0x0, 0xab(%rsp,%rax)
movl 0xa4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa4(%rsp)
jmp 0x2e4c
leaq 0x138(%rsp), %rdi
leaq 0xab(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x8, %ecx
callq 0x2180
movl $0x0, 0xa0(%rsp)
cmpl $0x8, 0xa0(%rsp)
jge 0x2ee8
movslq 0xa0(%rsp), %rax
movzbl 0x138(%rsp,%rax), %edx
movslq 0xa0(%rsp), %rax
movzbl 0x100(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x100(%rsp,%rax)
movl 0xa0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa0(%rsp)
jmp 0x2ea2
leaq 0x100(%rsp), %rdi
callq 0x2050
movl $0x0, 0x9c(%rsp)
cmpl $0x20, 0x9c(%rsp)
jge 0x2f54
movl 0x9c(%rsp), %eax
addl $0x8, %eax
cltq
movzbl 0x100(%rsp,%rax), %eax
movslq 0x9c(%rsp), %rcx
movzbl 0x170(%rsp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %cl
movslq 0x9c(%rsp), %rax
movb %cl, 0x140(%rsp,%rax)
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x2f00
leaq 0xb0(%rsp), %rdi
leaq 0x140(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x14, %ecx
callq 0x2060
movb $0x0, 0x9b(%rsp)
movl $0x0, 0x94(%rsp)
cmpl $0x14, 0x94(%rsp)
jge 0x2fef
movb $0x1, %al
cmpb $0x0, 0x9b(%rsp)
movb %al, 0xf(%rsp)
jne 0x2fcf
movslq 0x94(%rsp), %rax
movzbl 0xb0(%rsp,%rax), %eax
movq 0x1d0(%rsp), %rcx
movslq 0x94(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0x9b(%rsp)
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x2f85
movq 0xf8(%rsp), %rdi
callq 0x20c0
movzbl 0x9b(%rsp), %eax
cmpl $0x0, %eax
jne 0x3019
movl $0x0, 0x1f4(%rsp)
jmp 0x3932
movl $0xffffffff, 0x1f4(%rsp) # imm = 0xFFFFFFFF
jmp 0x3932
leaq 0x130(%rsp), %rdi
movq 0x1d0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
subq $0x19, %rdx
movl $0x8, %ecx
callq 0x2180
leaq 0x140(%rsp), %rdi
movq 0x1d0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
subq $0x14, %rdx
movl $0x20, %ecx
callq 0x2180
movl $0x0, 0x90(%rsp)
cmpl $0x8, 0x90(%rsp)
jge 0x30bb
movslq 0x90(%rsp), %rax
movb 0x130(%rsp,%rax), %cl
movslq 0x90(%rsp), %rax
movb %cl, 0x190(%rsp,%rax)
movl 0x90(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x90(%rsp)
jmp 0x3080
movl $0x0, 0x8c(%rsp)
cmpl $0x20, 0x8c(%rsp)
jge 0x311a
movslq 0x8c(%rsp), %rax
movzbl 0x170(%rsp,%rax), %eax
movslq 0x8c(%rsp), %rcx
movzbl 0x140(%rsp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %cl
movl 0x8c(%rsp), %eax
addl $0x8, %eax
cltq
movb %cl, 0x190(%rsp,%rax)
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x30c6
leaq 0x190(%rsp), %rdi
callq 0x20f0
cmpq $0x19, 0x1c8(%rsp)
jne 0x33fb
movl $0x0, 0x88(%rsp)
cmpl $0x28, 0x88(%rsp)
jge 0x3187
movslq 0x88(%rsp), %rax
movzbl 0x100(%rsp,%rax), %edx
movslq 0x88(%rsp), %rax
movzbl 0x190(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x190(%rsp,%rax)
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x3141
movb $0x0, 0x87(%rsp)
movl $0x9, 0x80(%rsp)
cmpl $0x28, 0x80(%rsp)
jge 0x31eb
movb $0x1, %al
cmpb $0x0, 0x87(%rsp)
movb %al, 0xe(%rsp)
jne 0x31cb
movslq 0x80(%rsp), %rax
cmpb $0x0, 0x190(%rsp,%rax)
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
andb $0x1, %al
movb %al, 0x87(%rsp)
movl 0x80(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x80(%rsp)
jmp 0x319a
movb $0x1, %al
cmpb $0x0, 0x87(%rsp)
movb %al, 0xd(%rsp)
jne 0x322a
movzbl 0x198(%rsp), %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, 0xc(%rsp)
je 0x3220
movzbl 0x198(%rsp), %eax
cmpl $0x10, %eax
sete %al
movb %al, 0xc(%rsp)
movb 0xc(%rsp), %al
xorb $-0x1, %al
movb %al, 0xd(%rsp)
movb 0xd(%rsp), %al
andb $0x1, %al
movb %al, 0x87(%rsp)
movzbl 0x87(%rsp), %eax
cmpl $0x0, %eax
jne 0x33de
movl $0x0, 0x7c(%rsp)
cmpl $0x8, 0x7c(%rsp)
jge 0x327c
movslq 0x7c(%rsp), %rax
movb 0x190(%rsp,%rax), %cl
movslq 0x7c(%rsp), %rax
movb %cl, 0x138(%rsp,%rax)
movl 0x7c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x7c(%rsp)
jmp 0x3250
movq 0xf8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x5, %ecx
callq 0x2060
movzbl 0x198(%rsp), %eax
cmpl $0x10, %eax
jne 0x32bb
movq 0x1e0(%rsp), %rax
movq $0x5, (%rax)
jmp 0x3376
movb $0x0, 0x7b(%rsp)
movl $0x0, 0x74(%rsp)
cmpl $0x5, 0x74(%rsp)
jge 0x3305
movq 0xf8(%rsp), %rax
movslq 0x74(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x80, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movzbl 0x7b(%rsp), %eax
orl %ecx, %eax
movb %al, 0x7b(%rsp)
movl 0x74(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x74(%rsp)
jmp 0x32c8
movzbl 0x7b(%rsp), %eax
cmpl $0x0, %eax
jne 0x332c
movq 0xf8(%rsp), %rdi
callq 0x20c0
movl $0xffffffff, 0x1f4(%rsp) # imm = 0xFFFFFFFF
jmp 0x3932
movl $0x4, 0x70(%rsp)
cmpl $0x0, 0x70(%rsp)
jl 0x3374
movq 0xf8(%rsp), %rax
movslq 0x70(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x80, %eax
jne 0x3365
movslq 0x70(%rsp), %rcx
movq 0x1e0(%rsp), %rax
movq %rcx, (%rax)
jmp 0x3374
jmp 0x3367
movl 0x70(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x3334
jmp 0x3376
movq $0x0, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq 0x1e0(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x33c1
movq 0xf8(%rsp), %rax
movq 0x68(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x1e8(%rsp), %rax
movq 0x68(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x337f
movq 0xf8(%rsp), %rdi
callq 0x20c0
movl $0x0, 0x1f4(%rsp)
jmp 0x3932
movq 0xf8(%rsp), %rdi
callq 0x20c0
movl $0xffffffff, 0x1f4(%rsp) # imm = 0xFFFFFFFF
jmp 0x3932
movq 0x1c8(%rsp), %rcx
subq $0x14, %rcx
movq 0x1e0(%rsp), %rax
movq %rcx, (%rax)
movq 0x1c8(%rsp), %rax
movl $0x5, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x351d
leaq 0x130(%rsp), %rdi
movq 0x1d0(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
subq $0x1e, %rdx
movl $0x8, %ecx
callq 0x2180
movl $0x0, 0x60(%rsp)
cmpl $0x8, 0x60(%rsp)
jge 0x34a1
movslq 0x60(%rsp), %rax
movzbl 0x190(%rsp,%rax), %eax
movslq 0x60(%rsp), %rcx
movzbl 0x130(%rsp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %cl
movslq 0x60(%rsp), %rax
movb %cl, 0x138(%rsp,%rax)
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x3463
movq 0xf8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
movq 0x1c8(%rsp), %rdx
subq $0x19, %rdx
movl $0x5, %ecx
callq 0x2060
movl $0x0, 0x5c(%rsp)
cmpl $0x8, 0x5c(%rsp)
jge 0x3506
movslq 0x5c(%rsp), %rax
movzbl 0x138(%rsp,%rax), %edx
movslq 0x5c(%rsp), %rax
movzbl 0x190(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x190(%rsp,%rax)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x34cf
movzbl 0x198(%rsp), %eax
xorl $0x10, %eax
movb %al, 0x198(%rsp)
jmp 0x367b
leaq 0x57(%rsp), %rdi
leaq 0x190(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x5, %ecx
callq 0x2060
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x64(%rsp), %eax
jge 0x35ec
movslq 0x4c(%rsp), %rax
movzbl 0x57(%rsp,%rax), %eax
movq 0x1d0(%rsp), %rcx
movq 0x1c8(%rsp), %rdx
movl 0x64(%rsp), %esi
addl $0x19, %esi
movslq %esi, %rsi
subq %rsi, %rdx
movslq 0x4c(%rsp), %rsi
addq %rsi, %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq 0xf8(%rsp), %rax
movq 0x1c8(%rsp), %rcx
subq $0x14, %rcx
movslq 0x64(%rsp), %rsi
subq %rsi, %rcx
movslq 0x4c(%rsp), %rsi
addq %rsi, %rcx
movb %dl, (%rax,%rcx)
movq 0xf8(%rsp), %rax
movq 0x1c8(%rsp), %rcx
subq $0x14, %rcx
movslq 0x64(%rsp), %rdx
subq %rdx, %rcx
movslq 0x4c(%rsp), %rdx
addq %rdx, %rcx
movb (%rax,%rcx), %cl
movslq 0x4c(%rsp), %rax
movb %cl, 0x52(%rsp,%rax)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x3540
movslq 0x64(%rsp), %rax
movb $-0x80, 0x52(%rsp,%rax)
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
cmpl $0x5, 0x48(%rsp)
jge 0x361f
movslq 0x48(%rsp), %rax
movb $0x0, 0x52(%rsp,%rax)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x3601
leaq 0x138(%rsp), %rdi
leaq 0x52(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x8, %ecx
callq 0x2180
movl $0x0, 0x44(%rsp)
cmpl $0x8, 0x44(%rsp)
jge 0x3679
movslq 0x44(%rsp), %rax
movzbl 0x138(%rsp,%rax), %edx
movslq 0x44(%rsp), %rax
movzbl 0x190(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x190(%rsp,%rax)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x3642
jmp 0x367b
cmpl $0x0, 0x64(%rsp)
jne 0x368d
movl $0x5, %eax
movl %eax, 0x8(%rsp)
jmp 0x3695
movl 0x64(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0x64(%rsp)
movq 0x1c8(%rsp), %rax
subq $0x14, %rax
movslq 0x64(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x38(%rsp)
cmpq $0x5, 0x38(%rsp)
jbe 0x379e
leaq 0x190(%rsp), %rdi
callq 0x20f0
leaq 0x138(%rsp), %rdi
movq 0x1d0(%rsp), %rsi
movq 0x38(%rsp), %rdx
subq $0xa, %rdx
movl $0x8, %ecx
callq 0x2180
movl $0x0, 0x2c(%rsp)
cmpl $0x8, 0x2c(%rsp)
jge 0x3735
movslq 0x2c(%rsp), %rax
movzbl 0x138(%rsp,%rax), %eax
movslq 0x2c(%rsp), %rcx
movzbl 0x190(%rsp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %cl
movslq 0x2c(%rsp), %rax
movb %cl, 0x30(%rsp,%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x36fa
movq 0xf8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
subq $0x5, %rdx
movl $0x5, %ecx
callq 0x2060
movl $0x0, 0x28(%rsp)
cmpl $0x8, 0x28(%rsp)
jge 0x3789
movslq 0x28(%rsp), %rax
movb 0x138(%rsp,%rax), %cl
movslq 0x28(%rsp), %rax
movb %cl, 0x190(%rsp,%rax)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x375d
jmp 0x378b
movq 0x38(%rsp), %rax
subq $0x5, %rax
movq %rax, 0x38(%rsp)
jmp 0x36b6
leaq 0x190(%rsp), %rdi
callq 0x20f0
movl $0x0, 0x24(%rsp)
cmpl $0x8, 0x24(%rsp)
jge 0x37f1
movslq 0x24(%rsp), %rax
movzbl 0x100(%rsp,%rax), %eax
movslq 0x24(%rsp), %rcx
movzbl 0x190(%rsp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %cl
movslq 0x24(%rsp), %rax
movb %cl, 0x138(%rsp,%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x37b3
movq 0xf8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0x5, %ecx
callq 0x2060
movl $0x0, 0x20(%rsp)
cmpl $0x8, 0x20(%rsp)
jge 0x384e
movslq 0x20(%rsp), %rax
movzbl 0x138(%rsp,%rax), %edx
movslq 0x20(%rsp), %rax
movzbl 0x190(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x190(%rsp,%rax)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x3817
movb $0x0, 0x1f(%rsp)
movl $0x8, 0x18(%rsp)
cmpl $0x28, 0x18(%rsp)
jge 0x38ac
movb $0x1, %al
cmpb $0x0, 0x1f(%rsp)
movb %al, 0x7(%rsp)
jne 0x3895
movslq 0x18(%rsp), %rax
movzbl 0x190(%rsp,%rax), %eax
movslq 0x18(%rsp), %rcx
movzbl 0x100(%rsp,%rcx), %ecx
xorl %ecx, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
andb $0x1, %al
movb %al, 0x1f(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x385b
movzbl 0x1f(%rsp), %eax
cmpl $0x0, %eax
jne 0x3903
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x1e0(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x3901
movq 0xf8(%rsp), %rax
movq 0x10(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x1e8(%rsp), %rax
movq 0x10(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x38bf
jmp 0x3903
movq 0xf8(%rsp), %rdi
callq 0x20c0
movzbl 0x1f(%rsp), %eax
cmpl $0x0, %eax
jne 0x3927
movl $0x0, 0x1f4(%rsp)
jmp 0x3932
movl $0xffffffff, 0x1f4(%rsp) # imm = 0xFFFFFFFF
movl 0x1f4(%rsp), %eax
addq $0x1f8, %rsp            # imm = 0x1F8
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)