// File: /workspace/github_c_makefile_star2_O3/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 $0x48, %rsp
movq %r9, %r13
movq %rcx, %rbx
movq %rdi, 0x10(%rsp)
movq 0x80(%rsp), %r15
movq 0x90(%rsp), %rdi
addq $-0x4, %r8
movq %rsi, 0x18(%rsp)
movq %r8, (%rsi)
callq 0x1050
movl $0x8, %ebp
cmpq %rbp, %r15
movl $0x8, %r14d
cmovbq %r15, %r14
movq %rsp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1080
leaq (%rsp,%r14), %r12
subq %r14, %rbp
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x1030
movq %r15, %r8
cmpq $0x7, %r15
ja 0x2071
movb $-0x80, (%r12)
vmovq (%rsp), %xmm0
vpbroadcastb 0xfb3(%rip), %xmm15 # 0x3032
movq 0x88(%rsp), %r15
vpsrlw $0x4, %xmm0, %xmm1
vpand %xmm1, %xmm15, %xmm1
vpmovzxbw %xmm1, %xmm1    # xmm1 = xmm1[0],zero,xmm1[1],zero,xmm1[2],zero,xmm1[3],zero,xmm1[4],zero,xmm1[5],zero,xmm1[6],zero,xmm1[7],zero
vpand 0x11c3(%rip), %xmm1, %xmm1 # 0x3260
vpand %xmm0, %xmm15, %xmm2
vpmovwb %xmm1, %xmm0
vmovq %xmm2, %xmm1            # xmm1 = xmm2[0],zero
movq 0x2eee(%rip), %rbp      # 0x4fa0
leaq 0x30(%rbp), %rax
movq 0x2f23(%rip), %rsi      # 0x4fe0
vmovdqa (%rsi), %xmm7
movq $-0x4, %rcx
vmovdqa 0x10e0(%rip), %xmm10    # 0x31b0
vmovdqa 0x10e8(%rip), %xmm11    # 0x31c0
vmovdqa 0x10f0(%rip), %xmm12    # 0x31d0
vmovdqa 0x10f8(%rip), %xmm13    # 0x31e0
vpxor -0x30(%rax), %xmm0, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm10, %xmm0, %xmm0
vpxor -0x20(%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpxor -0x10(%rax), %xmm0, %xmm2
vpshufb %xmm11, %xmm1, %xmm1
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm12, %xmm0, %xmm0
vpxor (%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
addq $0x4, %rcx
addq $0x40, %rax
cmpq $0x20, %rcx
jb 0x20e8
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 0x10a3(%rip), %xmm14    # 0x31f0
vpshufb %xmm14, %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 %xmm14, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm0
vpxor %xmm2, %xmm0, %xmm6
testq %r8, %r8
je 0x2170
cmpb $0x0, (%r13)
jns 0x2197
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 0x2e63(%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
jb 0x22cb
movl $0x8, %eax
cmpq $0x11, %r8
vmovdqa %xmm7, 0x20(%rsp)
jb 0x22d5
leaq -0x11(%r8), %rax
andq $-0x8, %rax
movl $0x8, %ecx
vmovdqa 0x10a5(%rip), %xmm0     # 0x3270
vpbroadcastq 0x112c(%rip), %xmm1 # 0x3300
movl $0x10, %esi
vmovdqa 0x109f(%rip), %xmm2     # 0x3280
vmovdqa 0x10a7(%rip), %xmm3     # 0x3290
leaq 0x30(%rbp), %rdx
vmovq (%r13,%rcx), %xmm4
movq %rsi, %rcx
vpsrlw $0x4, %xmm4, %xmm5
vpunpcklbw %xmm4, %xmm5, %xmm5 # xmm5 = 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]
vpternlogq $0x6c, %xmm15, %xmm6, %xmm5
vpmovwb %xmm5, %xmm6
vpshufb %xmm0, %xmm5, %xmm4
vpsrlw $0x4, %xmm4, %xmm4
vpternlogq $0x48, %xmm6, %xmm1, %xmm4
vpshufb %xmm2, %xmm5, %xmm6
vpshufb %xmm3, %xmm5, %xmm5
vpsrlw $0x4, %xmm5, %xmm5
vpternlogq $0x48, %xmm6, %xmm1, %xmm5
movq $-0x4, %rsi
movq %rdx, %rdi
vpxor -0x30(%rdi), %xmm4, %xmm6
vpshufb %xmm6, %xmm7, %xmm6
vpxor %xmm6, %xmm5, %xmm5
vpshufb %xmm10, %xmm4, %xmm4
vpxor -0x20(%rdi), %xmm5, %xmm6
vpshufb %xmm6, %xmm7, %xmm6
vpxor %xmm4, %xmm6, %xmm4
vpxor -0x10(%rdi), %xmm4, %xmm6
vpshufb %xmm11, %xmm5, %xmm5
vpshufb %xmm6, %xmm7, %xmm6
vpxor %xmm6, %xmm5, %xmm5
vpshufb %xmm12, %xmm4, %xmm4
vpxor (%rdi), %xmm5, %xmm6
vpshufb %xmm6, %xmm7, %xmm6
vpxor %xmm4, %xmm6, %xmm4
vpshufb %xmm13, %xmm5, %xmm5
addq $0x4, %rsi
addq $0x40, %rdi
cmpq $0x20, %rsi
jb 0x223e
vpunpcklbw %xmm4, %xmm5, %xmm6 # xmm6 = 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]
vpshufb %xmm14, %xmm6, %xmm6
vpunpckhbw %xmm4, %xmm5, %xmm4 # xmm4 = xmm5[8],xmm4[8],xmm5[9],xmm4[9],xmm5[10],xmm4[10],xmm5[11],xmm4[11],xmm5[12],xmm4[12],xmm5[13],xmm4[13],xmm5[14],xmm4[14],xmm5[15],xmm4[15]
vpshufb %xmm14, %xmm4, %xmm4
vpsllw $0x4, %xmm4, %xmm4
vpxor %xmm6, %xmm4, %xmm6
leaq 0x8(%rcx), %rsi
cmpq %r8, %rsi
jb 0x21ed
vmovdqa %xmm6, 0x30(%rsp)
addq $0x10, %rax
jmp 0x22db
movq 0x10(%rsp), %r13
jmp 0x244d
vmovdqa %xmm6, 0x30(%rsp)
addq %rax, %r13
movq %r8, %rcx
subq %rax, %rcx
movslq %ecx, %r14
movq %rcx, %r12
shlq $0x20, %r12
movq %rsp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1080
leaq (%rsp,%r14), %r13
movabsq $0x800000000, %rdx      # imm = 0x800000000
subq %r12, %rdx
sarq $0x20, %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x1030
cmpl $0x7, %r14d
jg 0x2326
movb $-0x80, (%r13)
vmovq (%rsp), %xmm0
vpsrlw $0x4, %xmm0, %xmm1
vpunpcklbw %xmm0, %xmm1, %xmm0 # xmm0 = 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]
vpbroadcastb 0xcf5(%rip), %xmm15 # 0x3032
vmovdqa 0x30(%rsp), %xmm4
vpternlogq $0x78, %xmm15, %xmm0, %xmm4
vpmovwb %xmm4, %xmm1
vpshufb 0xf17(%rip), %xmm4, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpbroadcastq 0xf99(%rip), %xmm2 # 0x3300
vpternlogq $0x48, %xmm1, %xmm2, %xmm0
vpshufb 0xf09(%rip), %xmm4, %xmm3 # 0x3280
vpshufb 0xf10(%rip), %xmm4, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm3, %xmm2, %xmm1
leaq 0x30(%rbp), %rax
movq $-0x4, %rcx
vmovdqa 0xe11(%rip), %xmm10     # 0x31b0
vmovdqa 0xe19(%rip), %xmm11     # 0x31c0
vmovdqa 0xe21(%rip), %xmm12     # 0x31d0
vmovdqa 0xe29(%rip), %xmm13     # 0x31e0
movq 0x2c22(%rip), %rsi      # 0x4fe0
vmovdqa 0xe2a(%rip), %xmm14     # 0x31f0
vmovdqa 0x20(%rsp), %xmm7
vpxor -0x30(%rax), %xmm0, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm10, %xmm0, %xmm0
vpxor -0x20(%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpxor -0x10(%rax), %xmm0, %xmm2
vpshufb %xmm11, %xmm1, %xmm1
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm12, %xmm0, %xmm0
vpxor (%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
addq $0x4, %rcx
addq $0x40, %rax
cmpq $0x20, %rcx
jb 0x23cc
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 %xmm14, %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 %xmm14, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm0
vpxor %xmm2, %xmm0, %xmm6
movq 0x10(%rsp), %r13
movq 0x80(%rsp), %r8
testq %r8, %r8
setne %al
movzwl 0x4(%r15), %ecx
movl (%r15), %edx
shlq $0x8, %rdx
shlq $0x28, %rcx
orq %rdx, %rcx
movabsq $-0x7fffffffffffff34, %rdx # imm = 0x80000000000000CC
orq %rcx, %rdx
vmovq %rdx, %xmm0
vpsrlw $0x4, %xmm0, %xmm1
vpunpcklbw %xmm0, %xmm1, %xmm0 # xmm0 = 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]
testb $0x7, %r8b
sete %cl
vpternlogq $0x6c, %xmm15, %xmm6, %xmm0
testb %cl, %al
jne 0x24a3
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0xdff(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x24c6
vpbroadcastq %xmm0, %xmm1
vpshufd $0x9e, %xmm0, %xmm2     # xmm2 = xmm0[2,3,1,2]
vpxor %xmm2, %xmm1, %xmm1
movq 0x2b30(%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
movq 0x18(%rsp), %rdi
vpandq 0xe27(%rip){1to2}, %xmm0, %xmm1 # 0x3300
vpsllw $0x4, %xmm1, %xmm0
movq (%rdi), %r12
testq %r12, %r12
je 0x24f6
vpshufd $0x39, %xmm0, %xmm2     # xmm2 = xmm0[1,2,3,0]
vpshufb 0xdac(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x2504
vpshufd $0x4e, %xmm0, %xmm2     # xmm2 = xmm0[2,3,0,1]
vpxor %xmm3, %xmm3, %xmm3
vshufps $0x94, %xmm0, %xmm3, %xmm0 # xmm0 = xmm3[0,1],xmm0[1,2]
vpxor %xmm0, %xmm2, %xmm0
vpternlogq $0xf8, 0xdf5(%rip){1to2}, %xmm0, %xmm1 # 0x3308
vpmovwb %xmm1, %xmm2
vpshufb 0xd4e(%rip), %xmm1, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpbroadcastq 0xdcf(%rip), %xmm16 # 0x3300
vpternlogq $0x48, %xmm2, %xmm16, %xmm0
vpshufb 0xd3f(%rip), %xmm1, %xmm2 # 0x3280
vpshufb 0xd46(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm2, %xmm16, %xmm1
leaq 0x30(%rbp), %rax
movq $-0x4, %rcx
vpxor -0x30(%rax), %xmm0, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm10, %xmm0, %xmm0
vpxor -0x20(%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpxor -0x10(%rax), %xmm0, %xmm2
vpshufb %xmm11, %xmm1, %xmm1
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm2, %xmm1, %xmm1
vpshufb %xmm12, %xmm0, %xmm0
vpxor (%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm7, %xmm2
vpxor %xmm0, %xmm2, %xmm0
vpshufb %xmm13, %xmm1, %xmm1
addq $0x4, %rcx
addq $0x40, %rax
cmpq $0x20, %rcx
jb 0x2561
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 %xmm14, %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 %xmm14, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm0
vpxor %xmm2, %xmm0, %xmm9
cmpq $0x9, %r12
jb 0x272c
movl $0x8, %ecx
vmovq 0xc14(%rip), %xmm0      # 0x3200
vpbroadcastq 0xd13(%rip), %xmm1 # 0x3308
vpmovsxbq 0xa38(%rip), %xmm2 # 0x3036
vmovdqa 0xc6a(%rip), %xmm3      # 0x3270
xorl %r14d, %r14d
vmovdqa 0xc6f(%rip), %xmm4      # 0x3280
vmovdqa 0xc77(%rip), %xmm5      # 0x3290
leaq 0x30(%rbp), %rax
vmovq (%rbx,%r14), %xmm6
vpsrlw $0x4, %xmm6, %xmm7
vpunpcklbw %xmm6, %xmm7, %xmm6 # xmm6 = xmm7[0],xmm6[0],xmm7[1],xmm6[1],xmm7[2],xmm6[2],xmm7[3],xmm6[3],xmm7[4],xmm6[4],xmm7[5],xmm6[5],xmm7[6],xmm6[6],xmm7[7],xmm6[7]
vpand %xmm6, %xmm15, %xmm6
vpsllw $0x4, %xmm6, %xmm7
vpor %xmm6, %xmm7, %xmm6
vpxor %xmm6, %xmm9, %xmm7
vpsllw $0x4, %xmm7, %xmm8
vpmovwb %xmm8, %xmm8
vpshufb %xmm0, %xmm7, %xmm7
vpternlogq $0xf8, %xmm15, %xmm7, %xmm8
vmovq %xmm8, (%r13,%r14)
movq %rcx, %r14
vpternlogq $0x78, %xmm1, %xmm9, %xmm6
vpor %xmm2, %xmm6, %xmm7
vpmovwb %xmm7, %xmm8
vpshufb %xmm3, %xmm7, %xmm7
vpsrlw $0x4, %xmm7, %xmm7
vpternlogq $0x48, %xmm8, %xmm16, %xmm7
vpshufb %xmm4, %xmm6, %xmm9
vpshufb %xmm5, %xmm6, %xmm6
vpsrlw $0x4, %xmm6, %xmm8
vpternlogq $0x48, %xmm9, %xmm16, %xmm8
vmovdqa (%rsi), %xmm6
movq $-0x4, %rcx
movq %rax, %rdx
vpxor -0x30(%rdx), %xmm7, %xmm9
vpshufb %xmm9, %xmm6, %xmm9
vpxor %xmm9, %xmm8, %xmm8
vpshufb %xmm10, %xmm7, %xmm7
vpxor -0x20(%rdx), %xmm8, %xmm9
vpshufb %xmm9, %xmm6, %xmm9
vpxor %xmm7, %xmm9, %xmm7
vpxor -0x10(%rdx), %xmm7, %xmm9
vpshufb %xmm11, %xmm8, %xmm8
vpshufb %xmm9, %xmm6, %xmm9
vpxor %xmm9, %xmm8, %xmm8
vpshufb %xmm12, %xmm7, %xmm7
vpxor (%rdx), %xmm8, %xmm9
vpshufb %xmm9, %xmm6, %xmm9
vpxor %xmm7, %xmm9, %xmm7
vpshufb %xmm13, %xmm8, %xmm8
addq $0x4, %rcx
addq $0x40, %rdx
cmpq $0x20, %rcx
jb 0x26a4
vpunpcklbw %xmm7, %xmm8, %xmm6 # xmm6 = xmm8[0],xmm7[0],xmm8[1],xmm7[1],xmm8[2],xmm7[2],xmm8[3],xmm7[3],xmm8[4],xmm7[4],xmm8[5],xmm7[5],xmm8[6],xmm7[6],xmm8[7],xmm7[7]
vpshufb %xmm14, %xmm6, %xmm6
vpunpckhbw %xmm7, %xmm8, %xmm7 # xmm7 = xmm8[8],xmm7[8],xmm8[9],xmm7[9],xmm8[10],xmm7[10],xmm8[11],xmm7[11],xmm8[12],xmm7[12],xmm8[13],xmm7[13],xmm8[14],xmm7[14],xmm8[15],xmm7[15]
vpshufb %xmm14, %xmm7, %xmm7
vpsllw $0x4, %xmm7, %xmm7
vpxor %xmm6, %xmm7, %xmm9
leaq 0x8(%r14), %rcx
movq (%rdi), %r12
cmpq %r12, %rcx
jb 0x261d
jmp 0x272f
xorl %r14d, %r14d
subq %r14, %r12
je 0x2960
leaq (%rbx,%r14), %rsi
movq %r12, %r15
shlq $0x20, %r15
movslq %r12d, %r13
movq %rsp, %rdi
movq %r13, %rdx
vmovdqa %xmm9, 0x20(%rsp)
callq 0x1080
leaq (%rsp,%r13), %rdi
movabsq $0x800000000, %rdx      # imm = 0x800000000
subq %r15, %rdx
movq 0x18(%rsp), %r15
sarq $0x20, %rdx
xorl %esi, %esi
callq 0x1030
movq %rsp, %rax
vmovq (%rax), %xmm0
vpsrlw $0x4, %xmm0, %xmm1
vpunpcklbw %xmm0, %xmm1, %xmm0 # xmm0 = 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]
vpbroadcastb 0x8a1(%rip), %xmm2 # 0x3032
vpand %xmm2, %xmm0, %xmm0
vmovdqa %xmm0, 0x30(%rsp)
vpxor 0x20(%rsp), %xmm0, %xmm1
vmovdqa %xmm1, 0x20(%rsp)
movq 0x10(%rsp), %rdi
addq %r14, %rdi
vpshufb 0xa48(%rip), %xmm1, %xmm0 # 0x3200
vpsllw $0x4, %xmm1, %xmm1
vpmovwb %xmm1, %xmm1
vpternlogq $0xf8, %xmm2, %xmm0, %xmm1
vmovq %xmm1, (%rax)
movq %rsp, %rsi
movq %r13, %rdx
callq 0x1080
vpbroadcastb %r12d, %xmm0
vpaddb %xmm0, %xmm0, %xmm0
vmovdqa 0xad5(%rip), %xmm1      # 0x32c0
vpsubb %xmm0, %xmm1, %xmm1
vpbroadcastb 0x83a(%rip), %xmm2 # 0x3032
vpshufb %xmm1, %xmm2, %xmm1
vpand 0x30(%rsp), %xmm1, %xmm1
vpsllw $0x4, %xmm1, %xmm1
vmovdqa 0xac0(%rip), %xmm2      # 0x32d0
vpsubb %xmm0, %xmm2, %xmm0
vpmovzxbq 0x81b(%rip), %xmm2 # 0x3038
vpshufb %xmm0, %xmm2, %xmm0
vpternlogq $0x96, 0x20(%rsp), %xmm1, %xmm0
testb $0x7, (%r15)
je 0x2841
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0xa61(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x2864
vpbroadcastq %xmm0, %xmm1
vpshufd $0x9e, %xmm0, %xmm2     # xmm2 = xmm0[2,3,1,2]
vpxor %xmm2, %xmm1, %xmm1
movq 0x2792(%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 0x940(%rip), %xmm4      # 0x31b0
vmovdqa 0x948(%rip), %xmm5      # 0x31c0
vmovdqa 0x950(%rip), %xmm6      # 0x31d0
vmovdqa 0x958(%rip), %xmm7      # 0x31e0
movq 0x2751(%rip), %rax      # 0x4fe0
vmovdqa 0x959(%rip), %xmm8      # 0x31f0
vpbroadcastq 0xa60(%rip), %xmm9 # 0x3300
vpmovwb %xmm1, %xmm2
vpshufb 0x9c1(%rip), %xmm1, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpternlogq $0x48, %xmm2, %xmm9, %xmm0
vpshufb 0x9bc(%rip), %xmm1, %xmm3 # 0x3280
vpshufb 0x9c3(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm2
vpternlogq $0x48, %xmm3, %xmm9, %xmm2
addq $0x30, %rbp
vmovdqa (%rax), %xmm1
movq $-0x4, %rax
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
vpxor -0x10(%rbp), %xmm0, %xmm3
vpshufb %xmm5, %xmm2, %xmm2
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpshufb %xmm6, %xmm0, %xmm0
vpxor (%rbp), %xmm2, %xmm3
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm0, %xmm3, %xmm0
vpshufb %xmm7, %xmm2, %xmm2
addq $0x4, %rax
addq $0x40, %rbp
cmpq $0x20, %rax
jb 0x28e8
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 %xmm8, %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 %xmm8, %xmm0, %xmm0
vpsllw $0x4, %xmm0, %xmm0
vpxor %xmm1, %xmm0, %xmm9
movq (%r15), %r14
vpsrlw $0x4, %xmm9, %xmm0
vpshufb 0x981(%rip), %xmm0, %xmm0 # 0x32f0
vpbroadcastw 0x6bc(%rip), %xmm1 # 0x3034
vpand %xmm1, %xmm9, %xmm1
vpmovwb %xmm1, %xmm1
vpor %xmm0, %xmm1, %xmm0
vmovd %xmm0, (%rsp)
addq %r14, %rbx
xorl %eax, %eax
movb (%rsp,%rax), %cl
cmpb (%rbx,%rax), %cl
jne 0x29a5
incq %rax
cmpq $0x4, %rax
jne 0x2990
xorl %eax, %eax
jmp 0x29aa
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)