// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/paeq160/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
     )
     {
       Init();//Initializing GF(256) multiplication table for AES

		 if(mlen==NULL)
			 return -1;
		 if((clen==0) && (adlen==0))
		 {
			 *mlen=0;
			 return 0;
		 }

		 //Here we do decryption and/or authentication so we need a key and a plaintext pointer valid
		 if( (k==NULL) || (m==NULL) )
			 return -2;

		 //Minimum tag length verification
		 if (clen < CRYPTO_ABYTES)
			 return -1;

		 //Initializing constants
		unsigned char D0[2];
		D0[0] = CRYPTO_NPUBBYTES*8; //nonce length in bits
		D0[1] = CRYPTO_KEYBYTES*8; //key length in bits
		(*mlen)=0;
		 
		 //Initializing the last input to F
		 unsigned char BlockLastInput[64];  //Z1 - input to the last call of F
		 memset(BlockLastInput,0,64);
		 unsigned char Tag[64]; //Tag output
		 for(unsigned i=0; i<CRYPTO_KEYBYTES; ++i) //Key to the Z input
			BlockLastInput[64-CRYPTO_KEYBYTES+i] = k[i];
		 BlockLastInput[0] = D0[0]+6;
		 BlockLastInput[1] = D0[1];

		 unsigned long long decrypted_bytes=0;//Encrypted bytes counter
		 

		 //Encryption part
		 if(clen!=CRYPTO_ABYTES) //Ciphertext is more than just a tag
		 {
			 if(c==NULL)
				 return -3;
			 unsigned char BlockInput[64];  //V1 - input to the first layer call of F
			 unsigned char BlockMiddle[64];  //W1 - output of the first layer call of F
			 unsigned char BlockOutput[64];  //Y1 - output of the second layer call of F
			 unsigned long long mblock_counter=1;   //Message block counter
			 
			 while((clen>CRYPTO_ABYTES))
			 {
				 /* I. First layer */

				 //1. Domain-separation constant
				 BlockInput[1] = D0[1]; 
				 if(clen>= (CRYPTO_MBLOCK+CRYPTO_ABYTES))
					 BlockInput[0] = D0[0];
				 else //Last incomplete block
					 BlockInput[0] = D0[0]+1;

				 //2. Counter
				 for(unsigned i=0; i<CRYPTO_COUNTERBYTES; ++i)
				 {
					 BlockInput[i+2] = (i<sizeof(mblock_counter))?(mblock_counter>>(8*i))&0xff :0;//copying counter bytewise
				 }
				 
				 //3. Nonce
				 for(unsigned i=0; i<CRYPTO_NPUBBYTES; ++i) 
				 {
					 BlockInput[i+2+CRYPTO_COUNTERBYTES] = npub[i];
				 }

				 //4. Key
				 for(unsigned i=0; i<CRYPTO_KEYBYTES; ++i) 
				 {
					 BlockInput[i+2+CRYPTO_COUNTERBYTES+CRYPTO_NPUBBYTES] = k[i];
				 }	 

				 //5. Permutation call
				 FPerm(BlockInput, BlockMiddle); //First layer call to F

				 /* II. Encryption*/

				 if(clen>=CRYPTO_MBLOCK+CRYPTO_ABYTES)//Full block encryption
				 {
					 for(unsigned i=0; i<CRYPTO_MBLOCK; ++i)
					 {
						 m[decrypted_bytes] = BlockMiddle[i+2]^c[decrypted_bytes];
						 BlockMiddle[i+2] = c[decrypted_bytes];
						 decrypted_bytes++;
						 
					 }
					 BlockMiddle[1] =  D0[1];
					 BlockMiddle[0] = D0[0]+2;  //New Di constant

				 }

				 else //Last incomplete block
				 {
					 for(unsigned i=0; i<(unsigned)clen-CRYPTO_ABYTES; ++i)//Incomplete block Encryption
					 {
						  m[decrypted_bytes] = BlockMiddle[i+2]^c[decrypted_bytes];
						 BlockMiddle[i+2] = c[decrypted_bytes];
						 decrypted_bytes++;
					 }
					 for(unsigned i=(unsigned)clen-CRYPTO_ABYTES; i<CRYPTO_MBLOCK; ++i)
					 {
						 BlockMiddle[i+2] ^=  (unsigned char)(clen-CRYPTO_ABYTES);  //Extra Padding: extra bytes filled with the last block length in bytes
					 }

					 BlockMiddle[1] =  D0[1];
					 BlockMiddle[0] = D0[0]+3;  //New Di constant
				 }

				 //III. Second permutation call
				 //1. Call
				 FPerm(BlockMiddle, BlockOutput); //Second layer call to F
				 
				 //2. Buffer update
				 for(unsigned i=0; i<64-2-CRYPTO_KEYBYTES; ++i)//Adding the output to tag preparation buffer
				 {
					 BlockLastInput[i+2] ^= BlockOutput[i+2];
				 }


				 //Counters increment
				 mblock_counter++;
				 if(clen>=CRYPTO_MBLOCK+CRYPTO_ABYTES)
					 clen-=CRYPTO_MBLOCK;
				 
				 else 
				 	 clen=CRYPTO_ABYTES;
				 (*mlen) = decrypted_bytes;
			 }
		 }

		//Associated data part	  
		if(adlen!=0)
		{
			if(ad==NULL)
				return -4;

			unsigned char BlockInput[64];  //V1 - input to the first layer call of F
			 unsigned char BlockOutput[64];  //Y1 - output of the second layer call of F
			 unsigned long long adblock_counter=1;   //AD block counter
			 unsigned long long auth_bytes=0;

			while(adlen>0)
			{
				//1. Constant
				BlockInput[1] = D0[1];
				if(adlen>= CRYPTO_ADBLOCK)
					 BlockInput[0] = D0[0]+4;
				 else //Last incomplete block
					 BlockInput[0] = D0[0]+5;


				//2. Counter
				for(unsigned i=0; i<CRYPTO_KEYBYTES; ++i)
					BlockInput[i+2] = (i<sizeof(adblock_counter))? (adblock_counter>>(8*i))&0xff:0;//copying counter bytewise

				//3. AD block
				if(adlen >= CRYPTO_ADBLOCK) //Filling AD block
				{
					for(unsigned i=0; i<CRYPTO_ADBLOCK; ++i)
						BlockInput[i+2+CRYPTO_KEYBYTES] = ad[auth_bytes+i];
					
				}
				else //Last incomplete block
				{
					for(unsigned i=0; i<adlen; ++i)
						BlockInput[i+2+CRYPTO_KEYBYTES] = ad[auth_bytes+i];
					for(unsigned i=(unsigned)adlen; i<CRYPTO_ADBLOCK; ++i)
						BlockInput[i+2+CRYPTO_KEYBYTES] = (unsigned char)adlen;
				}

				//4. Key
				for(unsigned i=0; i<CRYPTO_KEYBYTES; ++i) 
				{
					 BlockInput[i+CRYPTO_ADBLOCK+CRYPTO_KEYBYTES+2] = k[i];
				}
				

				//5.Call to the F permutation

				FPerm(BlockInput,BlockOutput);//Call to the F permutation

				 for(unsigned i=0; i<64-2-CRYPTO_KEYBYTES; ++i)//Adding the output to Z
				 {
					 BlockLastInput[i+2] ^= BlockOutput[i+2];
				 }

				//Counters increment
				 adblock_counter++;
				 if(adlen>=CRYPTO_ADBLOCK)
				 {
					 auth_bytes += CRYPTO_ADBLOCK;
					 adlen-=CRYPTO_ADBLOCK;
				 }
				 else 
				 {
					 auth_bytes += adlen;
					 adlen=0;
				 }
			}
		}

		// Tag production 

		//1. Permutation call
		FPerm(BlockLastInput,Tag);
		//2. Key injection
		for(unsigned i=0; i<CRYPTO_KEYBYTES; ++i) 
		{
				Tag[64-CRYPTO_KEYBYTES+i] ^= k[i];
		}

		//3. Truncation
		if(clen!=CRYPTO_ABYTES)//Incorrect tag length
			return -1;

		for(unsigned i=0; i<CRYPTO_ABYTES; ++i)
		{
			if(c[(*mlen)+i] != Tag[i])
			{
				for(unsigned j=0; j< (*mlen); ++j)//Erasing decryption result
					m[j]=0;
				return -1; //Invalid
			}
		}
       return 0;
     }

// Assembly:
subq $0x298, %rsp            # imm = 0x298
movq 0x2b0(%rsp), %rax
movq 0x2a8(%rsp), %rax
movq 0x2a0(%rsp), %rax
movq %rdi, 0x288(%rsp)
movq %rsi, 0x280(%rsp)
movq %rdx, 0x278(%rsp)
movq %rcx, 0x270(%rsp)
movq %r8, 0x268(%rsp)
movq %r9, 0x260(%rsp)
callq 0x1060
cmpq $0x0, 0x280(%rsp)
jne 0x329f
movl $0xffffffff, 0x294(%rsp) # imm = 0xFFFFFFFF
jmp 0x3c29
cmpq $0x0, 0x268(%rsp)
jne 0x32d4
cmpq $0x0, 0x2a0(%rsp)
jne 0x32d4
movq 0x280(%rsp), %rax
movq $0x0, (%rax)
movl $0x0, 0x294(%rsp)
jmp 0x3c29
cmpq $0x0, 0x2b0(%rsp)
je 0x32ea
cmpq $0x0, 0x288(%rsp)
jne 0x32fa
movl $0xfffffffe, 0x294(%rsp) # imm = 0xFFFFFFFE
jmp 0x3c29
cmpq $0x14, 0x268(%rsp)
jae 0x3315
movl $0xffffffff, 0x294(%rsp) # imm = 0xFFFFFFFF
jmp 0x3c29
movb $-0x60, 0x25e(%rsp)
movb $-0x60, 0x25f(%rsp)
movq 0x280(%rsp), %rax
movq $0x0, (%rax)
leaq 0x210(%rsp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x1030
movl $0x0, 0x1cc(%rsp)
cmpl $0x14, 0x1cc(%rsp)
jae 0x3395
movq 0x2b0(%rsp), %rax
movl 0x1cc(%rsp), %ecx
movb (%rax,%rcx), %cl
movl 0x1cc(%rsp), %eax
addl $0x2c, %eax
movl %eax, %eax
movb %cl, 0x210(%rsp,%rax)
movl 0x1cc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1cc(%rsp)
jmp 0x3353
movzbl 0x25e(%rsp), %eax
addl $0x6, %eax
movb %al, 0x210(%rsp)
movb 0x25f(%rsp), %al
movb %al, 0x211(%rsp)
movq $0x0, 0x1c0(%rsp)
cmpq $0x14, 0x268(%rsp)
je 0x3849
cmpq $0x0, 0x270(%rsp)
jne 0x33eb
movl $0xfffffffd, 0x294(%rsp) # imm = 0xFFFFFFFD
jmp 0x3c29
movq $0x1, 0xf8(%rsp)
cmpq $0x14, 0x268(%rsp)
jbe 0x3847
movb 0x25f(%rsp), %al
movb %al, 0x181(%rsp)
cmpq $0x3e, 0x268(%rsp)
jb 0x342f
movb 0x25e(%rsp), %al
movb %al, 0x180(%rsp)
jmp 0x3441
movzbl 0x25e(%rsp), %eax
addl $0x1, %eax
movb %al, 0x180(%rsp)
movl $0x0, 0xf4(%rsp)
cmpl $0x16, 0xf4(%rsp)
jae 0x34bd
movl 0xf4(%rsp), %eax
cmpq $0x8, %rax
jae 0x3487
movq 0xf8(%rsp), %rax
movl 0xf4(%rsp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0xff, %rax
movq %rax, 0x10(%rsp)
jmp 0x3490
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x3490
movq 0x10(%rsp), %rax
movb %al, %cl
movl 0xf4(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movb %cl, 0x180(%rsp,%rax)
movl 0xf4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf4(%rsp)
jmp 0x344c
movl $0x0, 0xf0(%rsp)
cmpl $0x14, 0xf0(%rsp)
jae 0x350d
movq 0x2a8(%rsp), %rax
movl 0xf0(%rsp), %ecx
movb (%rax,%rcx), %cl
movl 0xf0(%rsp), %eax
addl $0x2, %eax
addl $0x16, %eax
movl %eax, %eax
movb %cl, 0x180(%rsp,%rax)
movl 0xf0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf0(%rsp)
jmp 0x34c8
movl $0x0, 0xec(%rsp)
cmpl $0x14, 0xec(%rsp)
jae 0x3560
movq 0x2b0(%rsp), %rax
movl 0xec(%rsp), %ecx
movb (%rax,%rcx), %cl
movl 0xec(%rsp), %eax
addl $0x2, %eax
addl $0x16, %eax
addl $0x14, %eax
movl %eax, %eax
movb %cl, 0x180(%rsp,%rax)
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xec(%rsp)
jmp 0x3518
leaq 0x180(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x1090
cmpq $0x3e, 0x268(%rsp)
jb 0x3651
movl $0x0, 0xe8(%rsp)
cmpl $0x2a, 0xe8(%rsp)
jae 0x362c
movl 0xe8(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movzbl 0x140(%rsp,%rax), %eax
movq 0x270(%rsp), %rcx
movq 0x1c0(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq 0x288(%rsp), %rax
movq 0x1c0(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x270(%rsp), %rax
movq 0x1c0(%rsp), %rcx
movb (%rax,%rcx), %cl
movl 0xe8(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movb %cl, 0x140(%rsp,%rax)
movq 0x1c0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1c0(%rsp)
movl 0xe8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rsp)
jmp 0x358f
movb 0x25f(%rsp), %al
movb %al, 0x141(%rsp)
movzbl 0x25e(%rsp), %eax
addl $0x2, %eax
movb %al, 0x140(%rsp)
jmp 0x3780
movl $0x0, 0xe4(%rsp)
movl 0xe4(%rsp), %eax
movq 0x268(%rsp), %rcx
subl $0x14, %ecx
cmpl %ecx, %eax
jae 0x3705
movl 0xe4(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movzbl 0x140(%rsp,%rax), %eax
movq 0x270(%rsp), %rcx
movq 0x1c0(%rsp), %rdx
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq 0x288(%rsp), %rax
movq 0x1c0(%rsp), %rcx
movb %dl, (%rax,%rcx)
movq 0x270(%rsp), %rax
movq 0x1c0(%rsp), %rcx
movb (%rax,%rcx), %cl
movl 0xe4(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movb %cl, 0x140(%rsp,%rax)
movq 0x1c0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x1c0(%rsp)
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
jmp 0x365c
movq 0x268(%rsp), %rax
subl $0x14, %eax
movl %eax, 0xe0(%rsp)
cmpl $0x2a, 0xe0(%rsp)
jae 0x3760
movq 0x268(%rsp), %rax
subq $0x14, %rax
movzbl %al, %edx
movl 0xe0(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movzbl 0x140(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x140(%rsp,%rax)
movl 0xe0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe0(%rsp)
jmp 0x3717
movb 0x25f(%rsp), %al
movb %al, 0x141(%rsp)
movzbl 0x25e(%rsp), %eax
addl $0x3, %eax
movb %al, 0x140(%rsp)
leaq 0x140(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x1090
movl $0x0, 0xdc(%rsp)
cmpl $0x2a, 0xdc(%rsp)
jae 0x37ee
movl 0xdc(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movzbl 0x100(%rsp,%rax), %edx
movl 0xdc(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movzbl 0x210(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x210(%rsp,%rax)
movl 0xdc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xdc(%rsp)
jmp 0x37a0
movq 0xf8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf8(%rsp)
cmpq $0x3e, 0x268(%rsp)
jb 0x3823
movq 0x268(%rsp), %rax
subq $0x2a, %rax
movq %rax, 0x268(%rsp)
jmp 0x382f
movq $0x14, 0x268(%rsp)
movq 0x1c0(%rsp), %rcx
movq 0x280(%rsp), %rax
movq %rcx, (%rax)
jmp 0x33f7
jmp 0x3849
cmpq $0x0, 0x2a0(%rsp)
je 0x3b12
cmpq $0x0, 0x260(%rsp)
jne 0x3873
movl $0xfffffffc, 0x294(%rsp) # imm = 0xFFFFFFFC
jmp 0x3c29
movq $0x1, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
cmpq $0x0, 0x2a0(%rsp)
jbe 0x3b10
movb 0x25f(%rsp), %al
movb %al, 0x91(%rsp)
cmpq $0x16, 0x2a0(%rsp)
jb 0x38c1
movzbl 0x25e(%rsp), %eax
addl $0x4, %eax
movb %al, 0x90(%rsp)
jmp 0x38d3
movzbl 0x25e(%rsp), %eax
addl $0x5, %eax
movb %al, 0x90(%rsp)
movl $0x0, 0x3c(%rsp)
cmpl $0x14, 0x3c(%rsp)
jae 0x3937
movl 0x3c(%rsp), %eax
cmpq $0x8, %rax
jae 0x390a
movq 0x48(%rsp), %rax
movl 0x3c(%rsp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
andq $0xff, %rax
movq %rax, 0x8(%rsp)
jmp 0x3913
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x3913
movq 0x8(%rsp), %rax
movb %al, %cl
movl 0x3c(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movb %cl, 0x90(%rsp,%rax)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x38db
cmpq $0x16, 0x2a0(%rsp)
jb 0x398d
movl $0x0, 0x38(%rsp)
cmpl $0x16, 0x38(%rsp)
jae 0x3988
movq 0x260(%rsp), %rax
movq 0x40(%rsp), %rcx
movl 0x38(%rsp), %edx
addq %rdx, %rcx
movb (%rax,%rcx), %cl
movl 0x38(%rsp), %eax
addl $0x2, %eax
addl $0x14, %eax
movl %eax, %eax
movb %cl, 0x90(%rsp,%rax)
movl 0x38(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x394a
jmp 0x3a19
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpq 0x2a0(%rsp), %rax
jae 0x39da
movq 0x260(%rsp), %rax
movq 0x40(%rsp), %rcx
movl 0x34(%rsp), %edx
addq %rdx, %rcx
movb (%rax,%rcx), %cl
movl 0x34(%rsp), %eax
addl $0x2, %eax
addl $0x14, %eax
movl %eax, %eax
movb %cl, 0x90(%rsp,%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x3995
movq 0x2a0(%rsp), %rax
movl %eax, 0x30(%rsp)
cmpl $0x16, 0x30(%rsp)
jae 0x3a17
movq 0x2a0(%rsp), %rax
movb %al, %cl
movl 0x30(%rsp), %eax
addl $0x2, %eax
addl $0x14, %eax
movl %eax, %eax
movb %cl, 0x90(%rsp,%rax)
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x39e6
jmp 0x3a19
movl $0x0, 0x2c(%rsp)
cmpl $0x14, 0x2c(%rsp)
jae 0x3a5a
movq 0x2b0(%rsp), %rax
movl 0x2c(%rsp), %ecx
movb (%rax,%rcx), %cl
movl 0x2c(%rsp), %eax
addl $0x16, %eax
addl $0x14, %eax
addl $0x2, %eax
movl %eax, %eax
movb %cl, 0x90(%rsp,%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x3a21
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1090
movl $0x0, 0x28(%rsp)
cmpl $0x2a, 0x28(%rsp)
jae 0x3ab0
movl 0x28(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movzbl 0x50(%rsp,%rax), %edx
movl 0x28(%rsp), %eax
addl $0x2, %eax
movl %eax, %eax
movzbl 0x210(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x210(%rsp,%rax)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x3a74
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
cmpq $0x16, 0x2a0(%rsp)
jb 0x3aed
movq 0x40(%rsp), %rax
addq $0x16, %rax
movq %rax, 0x40(%rsp)
movq 0x2a0(%rsp), %rax
subq $0x16, %rax
movq %rax, 0x2a0(%rsp)
jmp 0x3b0b
movq 0x2a0(%rsp), %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movq $0x0, 0x2a0(%rsp)
jmp 0x3885
jmp 0x3b12
leaq 0x210(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x1090
movl $0x0, 0x24(%rsp)
cmpl $0x14, 0x24(%rsp)
jae 0x3b6d
movq 0x2b0(%rsp), %rax
movl 0x24(%rsp), %ecx
movzbl (%rax,%rcx), %edx
movl 0x24(%rsp), %eax
addl $0x2c, %eax
movl %eax, %eax
movzbl 0x1d0(%rsp,%rax), %ecx
xorl %edx, %ecx
movb %cl, 0x1d0(%rsp,%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x3b2f
cmpq $0x14, 0x268(%rsp)
je 0x3b88
movl $0xffffffff, 0x294(%rsp) # imm = 0xFFFFFFFF
jmp 0x3c29
movl $0x0, 0x20(%rsp)
cmpl $0x14, 0x20(%rsp)
jae 0x3c1e
movq 0x270(%rsp), %rax
movq 0x280(%rsp), %rcx
movq (%rcx), %rcx
movl 0x20(%rsp), %edx
addq %rdx, %rcx
movzbl (%rax,%rcx), %eax
movl 0x20(%rsp), %ecx
movzbl 0x1d0(%rsp,%rcx), %ecx
cmpl %ecx, %eax
je 0x3c0c
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x280(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x3bff
movq 0x288(%rsp), %rax
movl 0x1c(%rsp), %ecx
movb $0x0, (%rax,%rcx)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x3bd1
movl $0xffffffff, 0x294(%rsp) # imm = 0xFFFFFFFF
jmp 0x3c29
jmp 0x3c0e
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x3b90
movl $0x0, 0x294(%rsp)
movl 0x294(%rsp), %eax
addq $0x298, %rsp            # imm = 0x298
retq
nopl (%rax,%rax)