// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/twine80n6t4clocv2/vperm/encrypt.c
// Function: crypto_aead_decrypt
int crypto_aead_decrypt(
                        unsigned char *m,unsigned long long *mlen,
                        unsigned char *nsec,                                //not relavent to CLOC
                        const unsigned char *c,unsigned long long clen,
                        const unsigned char *ad,unsigned long long adlen,
                        const unsigned char *npub,
                        const unsigned char *k
                        )
{
    word state, tmp;
    unsigned long long i, lastblocklen;    /* set plaintext length */
    
    *mlen = clen - CRYPTO_ABYTES;
    
    unsigned char tag[CRYPTO_ABYTES];

    /* set key and compute round keys */
    Keyschedule80(k);
    
    /* process the associated data */
    
    /* process the first (partial) block of ad */
    load_partial_block(&state, ad, (adlen>STATE_LEN)?STATE_LEN:adlen, ONE_ZERO_PADDING);
    fix0(state);
    twine80_enc(state);
    if((ad[0] & 0x80) || (adlen == 0)){
        // appy h
        h(state);
    }
    else{
        // do nothing
    }
    
    if(adlen > STATE_LEN){ // ad is of more than one block
        i = STATE_LEN;
        
        /* process the middle ad blocks, excluding the first and last (partial) block */
        while((i+STATE_LEN) < adlen)
        {
            tmp = LOADS(ad+i);
            state = XOR(state, tmp);
            twine80_enc(state);
            i += STATE_LEN;
        }
        
        /* process the last (partial) ad block */
        load_partial_block(&tmp, ad+i, adlen - i, ONE_ZERO_PADDING);
        state = XOR(state, tmp);
        twine80_enc(state);
    }
    
    
    /* process the nonce */
    load_partial_block(&tmp, npub, CRYPTO_NPUBBYTES, PARAM_OZP);
    state = XOR(state, tmp);
    
    if((adlen % STATE_LEN) || (adlen == 0)){
        /* apply f2 */
        f2(state);
    }
    else{
        /* apply f1 */
        f1(state);
    }
    
    /* copy the encryption to tag state */
    tmp = SHL4(MASK4L(state));
    if(*mlen){
        /* apply g2 to tag state */
        g2(tmp);
    }
    else{
        /* apply g1 to tag state */
        g1(tmp);
    }
    state = XOR(MASK4L(state), MASK4U(tmp));
    twine80_enc(state);
    
    i = 0;
    /* process all the message except for the last message/ciphertext block */
    while((i + STATE_LEN) < (*mlen)){
        tmp = LOADS(c+i);
        tmp = XOR(tmp, SHL4(tmp));
        state = XOR(state, tmp);
        STORES(m+i, state);
        state = XOR(MASK4U(state), MASK4L(tmp));
        fix1(state);
        twine80_enc(state);
        i += STATE_LEN;
    }
    
    /* process the last block of the message/ciphetext */
    lastblocklen = (*mlen) - i;
    
    if(lastblocklen > 0){
        load_partial_block(&tmp, c+i, lastblocklen, ZERO_APPEND);
        state = XOR(state, tmp);
        store_partial_block(m+i, state, lastblocklen);
        unsigned char shift_bytes = (STATE_LEN - (unsigned char)lastblocklen);
        tmp = AND(SHR(_mm_set1_epi8(0x0f), shift_bytes*2), tmp);
        state = XOR(state, SHL4(tmp));
        /* add the one zero padding */
        state = XOR(state, SHL(_mm_set_epi8(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x80), lastblocklen*2));
        
        if((*mlen) % STATE_LEN){
            /* apply f2 */
            f2(state);
        }
        else{
            /* apply f1 */
            f1(state);
        }
        twine80_enc(state);
    }
    
    /* output the tag */
    store_partial_block(tag, SHR4(state), CRYPTO_ABYTES);

    /* compare the tag */
    for(i = 0; i < CRYPTO_ABYTES; i++)
        if(tag[i] != c[(*mlen) + i]){
            return RETURN_TAG_NO_MATCH;
        }
    
	return RETURN_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r13
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x90(%rsp), %rbp
movq 0xa0(%rsp), %rdi
addq $-0x4, %r8
movq %r8, (%rsi)
callq 0x1050
cmpq $0x8, %rbp
pushq $0x8
popq %r12
movq %r12, %rdx
cmovbq %rbp, %rdx
leaq 0x40(%rsp), %rbp
pushq $0x2
popq %rcx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1060
vmovdqa (%rbp), %xmm1
vpand 0x12ce(%rip), %xmm1, %xmm0 # 0x3260
vpmovwb %xmm0, %xmm2
vpshufb 0x12cf(%rip), %xmm0, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpbroadcastq 0x1369(%rip), %xmm12 # 0x3318
vpternlogq $0x48, %xmm2, %xmm12, %xmm0
vpshufb 0x12c1(%rip), %xmm1, %xmm2 # 0x3280
vpshufb 0x12c8(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm2, %xmm12, %xmm1
movq 0x2fc5(%rip), %rbp      # 0x4fa0
leaq 0x30(%rbp), %rax
movq 0x2ffa(%rip), %rcx      # 0x4fe0
vmovdqa (%rcx), %xmm14
xorl %ecx, %ecx
vmovdqa 0x11dc(%rip), %xmm8     # 0x31d0
vmovdqa 0x11e4(%rip), %xmm9     # 0x31e0
vmovdqa 0x11ec(%rip), %xmm10    # 0x31f0
vmovdqa 0x11f4(%rip), %xmm11    # 0x3200
cmpq $0x23, %rcx
ja 0x2067
vpxor -0x30(%rax), %xmm0, %xmm2
vpshufb %xmm2, %xmm14, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm8, %xmm0, %xmm0
vpxor -0x20(%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm14, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpshufb %xmm9, %xmm1, %xmm1
vpxor -0x10(%rax), %xmm0, %xmm2
vpshufb %xmm2, %xmm14, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpxor (%rax), %xmm1, %xmm2
vpshufb %xmm10, %xmm0, %xmm0
vpshufb %xmm2, %xmm14, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpshufb %xmm11, %xmm1, %xmm1
addq $0x4, %rcx
addq $0x40, %rax
jmp 0x200c
vpunpcklbw %xmm0, %xmm1, %xmm2 # xmm2 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
vmovdqa 0x113d(%rip), %xmm13    # 0x31b0
vpshufb %xmm13, %xmm2, %xmm2
vpunpckhbw %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[8],xmm0[8],xmm1[9],xmm0[9],xmm1[10],xmm0[10],xmm1[11],xmm0[11],xmm1[12],xmm0[12],xmm1[13],xmm0[13],xmm1[14],xmm0[14],xmm1[15],xmm0[15]
vpshufb %xmm13, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm0
vpxor %xmm2, %xmm0, %xmm6
movq 0x90(%rsp), %r8
testq %r8, %r8
je 0x209e
cmpb $0x0, (%r13)
jns 0x20c5
vpshufd $0x24, %xmm6, %xmm0     # xmm0 = xmm6[0,1,2,0]
vpshufd $0x79, %xmm6, %xmm1     # xmm1 = xmm6[1,2,3,1]
vpxor %xmm1, %xmm0, %xmm0
movq 0x2f35(%rip), %rax      # 0x4fe8
vmovdqa %xmm0, (%rax)
vpxor %xmm1, %xmm1, %xmm1
vpblendd $0x8, %xmm6, %xmm1, %xmm1 # xmm1 = xmm1[0,1,2],xmm6[3]
vpxor %xmm1, %xmm0, %xmm6
cmpq $0x9, %r8
vmovdqa %xmm14, 0x30(%rsp)
jb 0x21d0
vpbroadcastb 0xf54(%rip), %xmm0 # 0x3032
vmovdqa 0x118a(%rip), %xmm1     # 0x3270
vmovdqa 0x1192(%rip), %xmm2     # 0x3280
vmovdqa 0x119a(%rip), %xmm3     # 0x3290
leaq 0x30(%rbp), %rax
leaq 0x8(%r12), %rcx
cmpq %r8, %rcx
jae 0x21da
vmovq (%r13,%r12), %xmm4
vpsrlw $0x4, %xmm4, %xmm5
vpunpcklbw %xmm4, %xmm5, %xmm4 # xmm4 = xmm5[0],xmm4[0],xmm5[1],xmm4[1],xmm5[2],xmm4[2],xmm5[3],xmm4[3],xmm5[4],xmm4[4],xmm5[5],xmm4[5],xmm5[6],xmm4[6],xmm5[7],xmm4[7]
vpand %xmm0, %xmm4, %xmm4
vpxor %xmm6, %xmm4, %xmm6
vpmovwb %xmm6, %xmm7
vpshufb %xmm1, %xmm6, %xmm5
vpsrlw $0x4, %xmm5, %xmm5
vpternlogq $0x48, %xmm7, %xmm12, %xmm5
vpshufb %xmm2, %xmm6, %xmm7
vpshufb %xmm3, %xmm6, %xmm6
vpsrlw $0x4, %xmm6, %xmm6
vpternlogq $0x48, %xmm7, %xmm12, %xmm6
movq %rax, %rdx
xorl %esi, %esi
cmpq $0x23, %rsi
ja 0x21ad
vpxor -0x30(%rdx), %xmm5, %xmm7
vpshufb %xmm7, %xmm14, %xmm7
vpxor %xmm7, %xmm6, %xmm6
vpshufb %xmm8, %xmm5, %xmm5
vpxor -0x20(%rdx), %xmm6, %xmm7
vpshufb %xmm7, %xmm14, %xmm7
vpxor %xmm5, %xmm7, %xmm5
vpshufb %xmm9, %xmm6, %xmm6
vpxor -0x10(%rdx), %xmm5, %xmm7
vpshufb %xmm7, %xmm14, %xmm7
vpxor %xmm7, %xmm6, %xmm6
vpxor (%rdx), %xmm6, %xmm7
vpshufb %xmm10, %xmm5, %xmm5
vpshufb %xmm7, %xmm14, %xmm7
vpxor %xmm5, %xmm7, %xmm5
vpshufb %xmm11, %xmm6, %xmm6
addq $0x4, %rsi
addq $0x40, %rdx
jmp 0x2152
vpunpcklbw %xmm5, %xmm6, %xmm7 # xmm7 = xmm6[0],xmm5[0],xmm6[1],xmm5[1],xmm6[2],xmm5[2],xmm6[3],xmm5[3],xmm6[4],xmm5[4],xmm6[5],xmm5[5],xmm6[6],xmm5[6],xmm6[7],xmm5[7]
vpshufb %xmm13, %xmm7, %xmm7
vpunpckhbw %xmm5, %xmm6, %xmm5 # xmm5 = xmm6[8],xmm5[8],xmm6[9],xmm5[9],xmm6[10],xmm5[10],xmm6[11],xmm5[11],xmm6[12],xmm5[12],xmm6[13],xmm5[13],xmm6[14],xmm5[14],xmm6[15],xmm5[15]
vpshufb %xmm13, %xmm5, %xmm5
vpsllw $0x4, %xmm5, %xmm5
vpxor %xmm7, %xmm5, %xmm6
movq %rcx, %r12
jmp 0x20fa
vmovdqa %xmm6, (%rsp)
jmp 0x2303
leaq 0x20(%rsp), %rdi
vmovaps %xmm4, (%rdi)
addq %r12, %r13
movl %r8d, %edx
subl %r12d, %edx
pushq $0x2
popq %rcx
movq %rdi, %r12
movq %r13, %rsi
vmovdqa %xmm6, (%rsp)
callq 0x1060
vmovdqa 0x30(%rsp), %xmm9
vmovdqa 0xfa3(%rip), %xmm8      # 0x31b0
vpbroadcastq 0x1102(%rip), %xmm7 # 0x3318
vmovdqa 0xfe2(%rip), %xmm6      # 0x3200
vmovdqa 0xfca(%rip), %xmm5      # 0x31f0
vmovdqa 0xfb2(%rip), %xmm4      # 0x31e0
vmovaps 0xf9a(%rip), %xmm3      # 0x31d0
vmovdqa (%rsp), %xmm0
vpxor (%r12), %xmm0, %xmm1
vpmovwb %xmm1, %xmm2
vpshufb 0x1020(%rip), %xmm1, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpternlogq $0x48, %xmm2, %xmm7, %xmm0
vpshufb 0x101b(%rip), %xmm1, %xmm2 # 0x3280
vpshufb 0x1022(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm2, %xmm7, %xmm1
leaq 0x30(%rbp), %rax
xorl %ecx, %ecx
cmpq $0x23, %rcx
ja 0x22db
vpxor -0x30(%rax), %xmm0, %xmm2
vpshufb %xmm2, %xmm9, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm3, %xmm0, %xmm0
vpxor -0x20(%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm9, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpshufb %xmm4, %xmm1, %xmm1
vpxor -0x10(%rax), %xmm0, %xmm2
vpshufb %xmm2, %xmm9, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpxor (%rax), %xmm1, %xmm2
vpshufb %xmm5, %xmm0, %xmm0
vpshufb %xmm2, %xmm9, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpshufb %xmm6, %xmm1, %xmm1
addq $0x4, %rcx
addq $0x40, %rax
jmp 0x2280
vpunpcklbw %xmm0, %xmm1, %xmm2 # xmm2 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7]
vpshufb %xmm8, %xmm2, %xmm2
vpunpckhbw %xmm0, %xmm1, %xmm0 # xmm0 = xmm1[8],xmm0[8],xmm1[9],xmm0[9],xmm1[10],xmm0[10],xmm1[11],xmm0[11],xmm1[12],xmm0[12],xmm1[13],xmm0[13],xmm1[14],xmm0[14],xmm1[15],xmm0[15]
vpshufb %xmm8, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm0
vpxor %xmm2, %xmm0, %xmm0
vmovdqa %xmm0, (%rsp)
movq 0x90(%rsp), %r8
testq %r8, %r8
setne %r12b
leaq 0x20(%rsp), %rdi
pushq $0x6
popq %rdx
pushq $0x3
popq %rcx
movq %r8, %r13
movq 0x98(%rsp), %rsi
callq 0x1060
vmovdqa (%rsp), %xmm0
leaq 0x20(%rsp), %rax
vpxor (%rax), %xmm0, %xmm0
testb $0x7, %r13b
sete %al
testb %al, %r12b
jne 0x234f
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0xf53(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x2372
vpbroadcastq %xmm0, %xmm1
vpshufd $0x9e, %xmm0, %xmm2     # xmm2 = xmm0[2,3,1,2]
vpxor %xmm2, %xmm1, %xmm1
movq 0x2c84(%rip), %rax      # 0x4fe8
vmovdqa %xmm1, (%rax)
vpxor %xmm2, %xmm2, %xmm2
vpblendd $0xc, %xmm0, %xmm2, %xmm0 # xmm0 = xmm2[0,1],xmm0[2,3]
vpxor %xmm0, %xmm1, %xmm0
vpbroadcastq 0xf99(%rip), %xmm15 # 0x3318
vpandq 0xf8f(%rip){1to2}, %xmm0, %xmm2 # 0x3318
vpsllw $0x4, %xmm2, %xmm0
movq (%r14), %r12
testq %r12, %r12
vmovdqa 0xe34(%rip), %xmm11     # 0x31d0
vmovdqa 0xe3c(%rip), %xmm12     # 0x31e0
vmovdqa 0xe44(%rip), %xmm13     # 0x31f0
vmovdqa 0xe4c(%rip), %xmm14     # 0x3200
movq 0x2c25(%rip), %rdi      # 0x4fe0
vmovdqa64 0xdeb(%rip), %xmm16 # 0x31b0
vmovdqa 0x30(%rsp), %xmm4
je 0x23dd
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0xec5(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x23eb
vpshufd $0x4e, %xmm0, %xmm1     # xmm1 = xmm0[2,3,0,1]
vxorps %xmm3, %xmm3, %xmm3
vshufps $0x94, %xmm0, %xmm3, %xmm0 # xmm0 = xmm3[0,1],xmm0[1,2]
vpxor %xmm0, %xmm1, %xmm0
vpternlogq $0xf8, 0xf26(%rip){1to2}, %xmm0, %xmm2 # 0x3320
vpmovwb %xmm2, %xmm3
vpshufb 0xe67(%rip), %xmm2, %xmm1 # 0x3270
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm3, %xmm15, %xmm1
vpshufb 0xe62(%rip), %xmm2, %xmm3 # 0x3280
vpshufb 0xe69(%rip), %xmm2, %xmm2 # 0x3290
vpsrlw $0x4, %xmm2, %xmm2
vpternlogq $0x48, %xmm3, %xmm15, %xmm2
leaq 0x30(%rbp), %rax
xorl %ecx, %ecx
cmpq $0x23, %rcx
ja 0x2494
vpxor -0x30(%rax), %xmm1, %xmm3
vpshufb %xmm3, %xmm4, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpshufb %xmm11, %xmm1, %xmm1
vpxor -0x20(%rax), %xmm2, %xmm3
vpshufb %xmm3, %xmm4, %xmm3
vpxor %xmm1, %xmm3, %xmm1
vpshufb %xmm12, %xmm2, %xmm2
vpxor -0x10(%rax), %xmm1, %xmm3
vpshufb %xmm3, %xmm4, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpxor (%rax), %xmm2, %xmm3
vpshufb %xmm13, %xmm1, %xmm1
vpshufb %xmm3, %xmm4, %xmm3
vpxor %xmm1, %xmm3, %xmm1
vpshufb %xmm14, %xmm2, %xmm2
addq $0x4, %rcx
addq $0x40, %rax
jmp 0x2439
vpunpcklbw %xmm1, %xmm2, %xmm3 # xmm3 = xmm2[0],xmm1[0],xmm2[1],xmm1[1],xmm2[2],xmm1[2],xmm2[3],xmm1[3],xmm2[4],xmm1[4],xmm2[5],xmm1[5],xmm2[6],xmm1[6],xmm2[7],xmm1[7]
vpshufb %xmm16, %xmm3, %xmm3
vpunpckhbw %xmm1, %xmm2, %xmm1 # xmm1 = xmm2[8],xmm1[8],xmm2[9],xmm1[9],xmm2[10],xmm1[10],xmm2[11],xmm1[11],xmm2[12],xmm1[12],xmm2[13],xmm1[13],xmm2[14],xmm1[14],xmm2[15],xmm1[15]
vpshufb %xmm16, %xmm1, %xmm1
vpsllw $0x4, %xmm1, %xmm1
vpxor %xmm3, %xmm1, %xmm10
vpbroadcastb 0xb77(%rip), %xmm17 # 0x3032
vmovq 0xcfd(%rip), %xmm1      # 0x31c0
vpbroadcastq 0xe54(%rip), %xmm2 # 0x3320
vpmovsxbq 0xb61(%rip), %xmm3 # 0x3036
vmovdqa 0xd93(%rip), %xmm4      # 0x3270
xorl %r13d, %r13d
vmovdqa 0xd98(%rip), %xmm5      # 0x3280
vmovdqa 0xda0(%rip), %xmm6      # 0x3290
leaq 0x30(%rbp), %rax
leaq 0x8(%r13), %rcx
cmpq %r12, %rcx
jae 0x260c
vmovq (%rbx,%r13), %xmm0
vpsrlw $0x4, %xmm0, %xmm7
vpunpcklbw %xmm0, %xmm7, %xmm0 # xmm0 = xmm7[0],xmm0[0],xmm7[1],xmm0[1],xmm7[2],xmm0[2],xmm7[3],xmm0[3],xmm7[4],xmm0[4],xmm7[5],xmm0[5],xmm7[6],xmm0[6],xmm7[7],xmm0[7]
vpandq %xmm17, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm7
vpor %xmm0, %xmm7, %xmm0
vpxor %xmm0, %xmm10, %xmm7
vpsllw $0x4, %xmm7, %xmm8
vpmovwb %xmm8, %xmm8
vpshufb %xmm1, %xmm7, %xmm7
vpternlogq $0xf8, %xmm17, %xmm7, %xmm8
vmovq %xmm8, (%r15,%r13)
vpternlogq $0x6c, %xmm2, %xmm0, %xmm10
vpor %xmm3, %xmm10, %xmm7
vpmovwb %xmm7, %xmm9
vpshufb %xmm4, %xmm7, %xmm7
vpsrlw $0x4, %xmm7, %xmm8
vpternlogq $0x48, %xmm9, %xmm15, %xmm8
vpshufb %xmm5, %xmm10, %xmm7
vpshufb %xmm6, %xmm10, %xmm9
vpsrlw $0x4, %xmm9, %xmm9
vpternlogq $0x48, %xmm7, %xmm15, %xmm9
vmovdqa (%rdi), %xmm7
movq %rax, %rdx
xorl %esi, %esi
cmpq $0x23, %rsi
ja 0x25e1
vpxor -0x30(%rdx), %xmm8, %xmm10
vpshufb %xmm10, %xmm7, %xmm10
vpxor %xmm10, %xmm9, %xmm9
vpshufb %xmm11, %xmm8, %xmm8
vpxor -0x20(%rdx), %xmm9, %xmm10
vpshufb %xmm10, %xmm7, %xmm10
vpxor %xmm8, %xmm10, %xmm8
vpshufb %xmm12, %xmm9, %xmm9
vpxor -0x10(%rdx), %xmm8, %xmm10
vpshufb %xmm10, %xmm7, %xmm10
vpxor %xmm10, %xmm9, %xmm9
vpxor (%rdx), %xmm9, %xmm10
vpshufb %xmm13, %xmm8, %xmm8
vpshufb %xmm10, %xmm7, %xmm10
vpxor %xmm8, %xmm10, %xmm8
vpshufb %xmm14, %xmm9, %xmm9
addq $0x4, %rsi
addq $0x40, %rdx
jmp 0x2582
vpunpcklbw %xmm8, %xmm9, %xmm7 # xmm7 = xmm9[0],xmm8[0],xmm9[1],xmm8[1],xmm9[2],xmm8[2],xmm9[3],xmm8[3],xmm9[4],xmm8[4],xmm9[5],xmm8[5],xmm9[6],xmm8[6],xmm9[7],xmm8[7]
vpshufb %xmm16, %xmm7, %xmm7
vpunpckhbw %xmm8, %xmm9, %xmm8 # xmm8 = xmm9[8],xmm8[8],xmm9[9],xmm8[9],xmm9[10],xmm8[10],xmm9[11],xmm8[11],xmm9[12],xmm8[12],xmm9[13],xmm8[13],xmm9[14],xmm8[14],xmm9[15],xmm8[15]
vpshufb %xmm16, %xmm8, %xmm8
vpsllw $0x4, %xmm8, %xmm8
vpxor %xmm7, %xmm8, %xmm10
movq (%r14), %r12
movq %rcx, %r13
jmp 0x24f4
vmovdqa %xmm0, 0x20(%rsp)
subq %r13, %r12
je 0x27da
leaq (%rbx,%r13), %rsi
leaq 0x20(%rsp), %rdi
movl %r12d, %edx
xorl %ecx, %ecx
vmovdqa %xmm10, (%rsp)
callq 0x1060
leaq 0x20(%rsp), %rax
vmovaps (%rax), %xmm0
vmovaps %xmm0, 0x30(%rsp)
vxorps (%rsp), %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
addq %r13, %r15
movq %r15, %rdi
movl %r12d, %esi
callq 0x10b0
vpbroadcastb %r12d, %xmm0
vpaddb %xmm0, %xmm0, %xmm0
vmovdqa 0xc44(%rip), %xmm1      # 0x32b0
vpsubb %xmm0, %xmm1, %xmm1
vpbroadcastb 0x9b9(%rip), %xmm2 # 0x3032
vpshufb %xmm1, %xmm2, %xmm1
vpand 0x30(%rsp), %xmm1, %xmm1
vpsllw $0x4, %xmm1, %xmm1
vmovdqa 0xc2f(%rip), %xmm2      # 0x32c0
vpsubb %xmm0, %xmm2, %xmm0
vpmovzxbq 0x99a(%rip), %xmm2 # 0x3038
vpshufb %xmm0, %xmm2, %xmm0
vpternlogq $0x96, (%rsp), %xmm1, %xmm0
testb $0x7, (%r14)
je 0x26c1
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0xbe1(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x26e4
vpbroadcastq %xmm0, %xmm1
vpshufd $0x9e, %xmm0, %xmm2     # xmm2 = xmm0[2,3,1,2]
vpxor %xmm2, %xmm1, %xmm1
movq 0x2912(%rip), %rax      # 0x4fe8
vmovdqa %xmm1, (%rax)
vpxor %xmm2, %xmm2, %xmm2
vpblendd $0xc, %xmm0, %xmm2, %xmm0 # xmm0 = xmm2[0,1],xmm0[2,3]
vpxor %xmm0, %xmm1, %xmm1
vmovdqa 0xae0(%rip), %xmm4      # 0x31d0
vmovdqa 0xae8(%rip), %xmm5      # 0x31e0
vmovdqa 0xaf0(%rip), %xmm6      # 0x31f0
vmovdqa 0xaf8(%rip), %xmm7      # 0x3200
vpbroadcastq 0xc07(%rip), %xmm8 # 0x3318
movq 0x28c8(%rip), %rax      # 0x4fe0
vmovdqa 0xa90(%rip), %xmm9      # 0x31b0
vpmovwb %xmm1, %xmm2
vpshufb 0xb41(%rip), %xmm1, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpternlogq $0x48, %xmm2, %xmm8, %xmm0
vpshufb 0xb3c(%rip), %xmm1, %xmm3 # 0x3280
vpshufb 0xb43(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm2
vpternlogq $0x48, %xmm3, %xmm8, %xmm2
addq $0x30, %rbp
vmovdqa (%rax), %xmm1
xorl %eax, %eax
cmpq $0x23, %rax
ja 0x27bf
vpxor -0x30(%rbp), %xmm0, %xmm3
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpshufb %xmm4, %xmm0, %xmm0
vpxor -0x20(%rbp), %xmm2, %xmm3
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm0, %xmm3, %xmm0
vpshufb %xmm5, %xmm2, %xmm2
vpxor -0x10(%rbp), %xmm0, %xmm3
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpxor (%rbp), %xmm2, %xmm3
vpshufb %xmm6, %xmm0, %xmm0
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm0, %xmm3, %xmm0
vpshufb %xmm7, %xmm2, %xmm2
addq $0x4, %rax
addq $0x40, %rbp
jmp 0x2763
vpunpcklbw %xmm0, %xmm2, %xmm1 # xmm1 = xmm2[0],xmm0[0],xmm2[1],xmm0[1],xmm2[2],xmm0[2],xmm2[3],xmm0[3],xmm2[4],xmm0[4],xmm2[5],xmm0[5],xmm2[6],xmm0[6],xmm2[7],xmm0[7]
vpshufb %xmm9, %xmm1, %xmm1
vpunpckhbw %xmm0, %xmm2, %xmm0 # xmm0 = xmm2[8],xmm0[8],xmm2[9],xmm0[9],xmm2[10],xmm0[10],xmm2[11],xmm0[11],xmm2[12],xmm0[12],xmm2[13],xmm0[13],xmm2[14],xmm0[14],xmm2[15],xmm0[15]
vpshufb %xmm9, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm0
vpxor %xmm1, %xmm0, %xmm10
vpsrlw $0x4, %xmm10, %xmm0
vpshufb 0xaf7(%rip), %xmm0, %xmm0 # 0x32e0
vpbroadcastw 0x842(%rip), %xmm1 # 0x3034
vpand %xmm1, %xmm10, %xmm1
vpmovwb %xmm1, %xmm1
vpor %xmm0, %xmm1, %xmm0
vmovd %xmm0, 0x1c(%rsp)
xorl %eax, %eax
pushq $-0x1
popq %rcx
xorl %edx, %edx
cmpq $0x4, %rdx
je 0x282d
movb 0x1c(%rsp,%rdx), %sil
movq (%r14), %rdi
addq %rbx, %rdi
leaq 0x1(%rdx), %r8
cmpb (%rdx,%rdi), %sil
movq %r8, %rdx
je 0x280d
movl %ecx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq