// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/twine80n6t4clocv2/vperm/encrypt.c
// Function: crypto_aead_encrypt
int crypto_aead_encrypt(
                        unsigned char *c, unsigned long long *clen,
                        const unsigned char *m, unsigned long long mlen,
                        const unsigned char *ad, unsigned long long adlen,
                        const unsigned char *nsec,                          //not relavent to CLOC
                        const unsigned char *npub,
                        const unsigned char *k
                        )
{
    word state, tmp;
    unsigned long long i, lastblocklen;
    /* set ciphertext length */
    *clen = mlen + 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 moer 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(m+i);
        state = XOR(state, tmp);
        STORES(c+i, state);
        state = XOR(SHL4(MASK4L(state)), state);
        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, m+i, lastblocklen, ZERO_APPEND);
        state = XOR(state, tmp);
        store_partial_block(c+i, state, lastblocklen);
        unsigned char shift_bytes = (STATE_LEN - (unsigned char)lastblocklen);
        tmp = AND(SHR(_mm_set1_epi8(0x0f), shift_bytes*2), state);
        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(c+mlen, SHR4(state), CRYPTO_ABYTES);
    
	return RETURN_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r12
movq %r8, %rbp
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, 0x18(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x4(%rcx), %rax
movq %rax, (%rsi)
callq 0x1050
cmpq $0x8, %r12
pushq $0x8
popq %r13
movq %r13, %rdx
cmovbq %r12, %rdx
leaq 0x40(%rsp), %r14
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1060
vmovdqa (%r14), %xmm1
vpand 0x1b6d(%rip), %xmm1, %xmm0 # 0x3260
vpmovwb %xmm0, %xmm2
vpshufb 0x1b6e(%rip), %xmm0, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpbroadcastq 0x1c08(%rip), %xmm12 # 0x3318
vpternlogq $0x48, %xmm2, %xmm12, %xmm0
vpshufb 0x1b60(%rip), %xmm1, %xmm2 # 0x3280
vpshufb 0x1b67(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm2, %xmm12, %xmm1
movq 0x3864(%rip), %r14      # 0x4fa0
leaq 0x30(%r14), %rax
movq 0x3899(%rip), %rcx      # 0x4fe0
vmovdqa (%rcx), %xmm14
xorl %ecx, %ecx
vmovdqa 0x1a7b(%rip), %xmm8     # 0x31d0
vmovdqa 0x1a83(%rip), %xmm9     # 0x31e0
vmovdqa 0x1a8b(%rip), %xmm10    # 0x31f0
vmovdqa 0x1a93(%rip), %xmm11    # 0x3200
cmpq $0x23, %rcx
ja 0x17c8
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 0x176d
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 0x19dc(%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
testq %r12, %r12
je 0x17f6
cmpb $0x0, (%rbp)
jns 0x181d
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 0x37dd(%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, %r12
vmovdqa %xmm14, 0x30(%rsp)
jb 0x1927
vpbroadcastb 0x17f4(%rip), %xmm0 # 0x302a
vmovdqa 0x1a32(%rip), %xmm1     # 0x3270
vmovdqa 0x1a3a(%rip), %xmm2     # 0x3280
vmovdqa 0x1a42(%rip), %xmm3     # 0x3290
leaq 0x30(%r14), %rax
leaq 0x8(%r13), %rcx
cmpq %r12, %rcx
jae 0x1931
vmovq (%rbp,%r13), %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 0x1904
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 0x18a9
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, %r13
jmp 0x1852
vmovdqa %xmm6, (%rsp)
jmp 0x1a52
leaq 0x20(%rsp), %rdi
vmovaps %xmm4, (%rdi)
addq %r13, %rbp
movl %r12d, %edx
subl %r13d, %edx
pushq $0x2
popq %rcx
movq %rdi, %r13
movq %rbp, %rsi
vmovdqa %xmm6, (%rsp)
callq 0x1060
vmovdqa 0x30(%rsp), %xmm9
vmovdqa 0x184c(%rip), %xmm8     # 0x31b0
vpbroadcastq 0x19ab(%rip), %xmm7 # 0x3318
vmovdqa 0x188b(%rip), %xmm6     # 0x3200
vmovdqa 0x1873(%rip), %xmm5     # 0x31f0
vmovdqa 0x185b(%rip), %xmm4     # 0x31e0
vmovaps 0x1843(%rip), %xmm3     # 0x31d0
vmovdqa (%rsp), %xmm0
vpxor (%r13), %xmm0, %xmm1
vpmovwb %xmm1, %xmm2
vpshufb 0x18c9(%rip), %xmm1, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpternlogq $0x48, %xmm2, %xmm7, %xmm0
vpshufb 0x18c4(%rip), %xmm1, %xmm2 # 0x3280
vpshufb 0x18cb(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm2, %xmm7, %xmm1
leaq 0x30(%r14), %rax
xorl %ecx, %ecx
cmpq $0x23, %rcx
ja 0x1a32
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 0x19d7
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)
testq %r12, %r12
setne %bpl
leaq 0x20(%rsp), %r13
pushq $0x6
popq %rdx
pushq $0x3
popq %rcx
movq %r13, %rdi
movq 0x98(%rsp), %rsi
callq 0x1060
vmovdqa (%rsp), %xmm0
vpxor (%r13), %xmm0, %xmm0
testb $0x7, %r12b
sete %al
testb %al, %bpl
jne 0x1a9b
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0x1807(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x1abe
vpbroadcastq %xmm0, %xmm1
vpshufd $0x9e, %xmm0, %xmm2     # xmm2 = xmm0[2,3,1,2]
vpxor %xmm2, %xmm1, %xmm1
movq 0x3538(%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), %rbp
vpbroadcastq 0x1848(%rip), %xmm14 # 0x3318
vpandq 0x183e(%rip){1to2}, %xmm0, %xmm2 # 0x3318
vpsllw $0x4, %xmm2, %xmm0
testq %rbx, %rbx
vmovdqa 0x16e6(%rip), %xmm10    # 0x31d0
vmovdqa 0x16ee(%rip), %xmm11    # 0x31e0
vmovdqa 0x16f6(%rip), %xmm12    # 0x31f0
vmovdqa 0x16fe(%rip), %xmm13    # 0x3200
movq 0x34d7(%rip), %rdi      # 0x4fe0
vmovdqa 0x169f(%rip), %xmm15    # 0x31b0
vmovdqa 0x30(%rsp), %xmm4
je 0x1b29
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0x1779(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x1b37
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, 0x17da(%rip){1to2}, %xmm0, %xmm2 # 0x3320
vpmovwb %xmm2, %xmm3
vpshufb 0x171b(%rip), %xmm2, %xmm1 # 0x3270
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm3, %xmm14, %xmm1
vpshufb 0x1716(%rip), %xmm2, %xmm3 # 0x3280
vpshufb 0x171d(%rip), %xmm2, %xmm2 # 0x3290
vpsrlw $0x4, %xmm2, %xmm7
vpternlogq $0x48, %xmm3, %xmm14, %xmm7
leaq 0x30(%r14), %rax
xorl %ecx, %ecx
cmpq $0x24, %rcx
jae 0x1be0
vpxor -0x30(%rax), %xmm1, %xmm2
vpshufb %xmm2, %xmm4, %xmm2
vpxor %xmm2, %xmm7, %xmm2
vpshufb %xmm10, %xmm1, %xmm1
vpxor -0x20(%rax), %xmm2, %xmm3
vpshufb %xmm3, %xmm4, %xmm3
vpxor %xmm1, %xmm3, %xmm1
vpshufb %xmm11, %xmm2, %xmm2
vpxor -0x10(%rax), %xmm1, %xmm3
vpshufb %xmm3, %xmm4, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpxor (%rax), %xmm2, %xmm3
vpshufb %xmm12, %xmm1, %xmm1
vpshufb %xmm3, %xmm4, %xmm3
vpxor %xmm1, %xmm3, %xmm1
vpshufb %xmm13, %xmm2, %xmm7
addq $0x4, %rcx
addq $0x40, %rax
jmp 0x1b85
vpbroadcastb 0x1440(%rip), %xmm16 # 0x302a
vmovq 0x15ce(%rip), %xmm2     # 0x31c0
vpmovsxbq 0x1433(%rip), %xmm3 # 0x302e
vmovdqa 0x166d(%rip), %xmm4     # 0x3270
xorl %r12d, %r12d
vmovdqa 0x1672(%rip), %xmm5     # 0x3280
vmovdqa 0x167a(%rip), %xmm6     # 0x3290
leaq 0x30(%r14), %rax
vpunpcklbw %xmm1, %xmm7, %xmm8 # xmm8 = xmm7[0],xmm1[0],xmm7[1],xmm1[1],xmm7[2],xmm1[2],xmm7[3],xmm1[3],xmm7[4],xmm1[4],xmm7[5],xmm1[5],xmm7[6],xmm1[6],xmm7[7],xmm1[7]
vpshufb %xmm15, %xmm8, %xmm8
vpunpckhbw %xmm1, %xmm7, %xmm1 # xmm1 = xmm7[8],xmm1[8],xmm7[9],xmm1[9],xmm7[10],xmm1[10],xmm7[11],xmm1[11],xmm7[12],xmm1[12],xmm7[13],xmm1[13],xmm7[14],xmm1[14],xmm7[15],xmm1[15]
vpshufb %xmm15, %xmm1, %xmm1
vpsllw $0x4, %xmm1, %xmm1
vpxor %xmm1, %xmm8, %xmm7
leaq 0x8(%r12), %rcx
cmpq %rbx, %rcx
jae 0x1d1c
vmovq (%r15,%r12), %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]
vpandq %xmm16, %xmm0, %xmm0
vpxor %xmm0, %xmm7, %xmm1
vpand %xmm1, %xmm14, %xmm7
vpsllw $0x4, %xmm7, %xmm8
vpmovwb %xmm8, %xmm9
vpshufb %xmm2, %xmm7, %xmm7
vpor %xmm7, %xmm9, %xmm7
vmovq %xmm7, (%rbp,%r12)
vpxor %xmm1, %xmm8, %xmm7
vpor %xmm3, %xmm7, %xmm1
vpmovwb %xmm1, %xmm8
vpshufb %xmm4, %xmm1, %xmm1
vpsrlw $0x4, %xmm1, %xmm1
vpternlogq $0x48, %xmm8, %xmm14, %xmm1
vpshufb %xmm5, %xmm7, %xmm8
vpshufb %xmm6, %xmm7, %xmm7
vpsrlw $0x4, %xmm7, %xmm7
vpternlogq $0x48, %xmm8, %xmm14, %xmm7
vmovdqa (%rdi), %xmm8
movq %rax, %rdx
xorl %esi, %esi
cmpq $0x23, %rsi
ja 0x1d14
vpxor -0x30(%rdx), %xmm1, %xmm9
vpshufb %xmm9, %xmm8, %xmm9
vpxor %xmm7, %xmm9, %xmm7
vpshufb %xmm10, %xmm1, %xmm1
vpxor -0x20(%rdx), %xmm7, %xmm9
vpshufb %xmm9, %xmm8, %xmm9
vpxor %xmm1, %xmm9, %xmm1
vpshufb %xmm11, %xmm7, %xmm7
vpxor -0x10(%rdx), %xmm1, %xmm9
vpshufb %xmm9, %xmm8, %xmm9
vpxor %xmm7, %xmm9, %xmm7
vpxor (%rdx), %xmm7, %xmm9
vpshufb %xmm12, %xmm1, %xmm1
vpshufb %xmm9, %xmm8, %xmm9
vpxor %xmm1, %xmm9, %xmm1
vpshufb %xmm13, %xmm7, %xmm7
addq $0x4, %rsi
addq $0x40, %rdx
jmp 0x1cb9
movq %rcx, %r12
jmp 0x1c1a
vmovdqa %xmm0, 0x20(%rsp)
movq %rbx, %r13
subq %r12, %r13
je 0x1ef1
addq %r12, %r15
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
xorl %ecx, %ecx
vmovdqa %xmm7, (%rsp)
callq 0x1060
vmovaps (%rsp), %xmm0
vxorps (%rbp), %xmm0, %xmm0
vmovaps %xmm0, (%rsp)
movq 0x18(%rsp), %rbp
addq %rbp, %r12
movq %r12, %rdi
movl %r13d, %esi
callq 0x10b0
vpbroadcastb %r13d, %xmm0
vpaddb %xmm0, %xmm0, %xmm0
vmovdqa 0x1531(%rip), %xmm1     # 0x32b0
vpsubb %xmm0, %xmm1, %xmm1
vpbroadcastb 0x129e(%rip), %xmm2 # 0x302a
vpshufb %xmm1, %xmm2, %xmm1
vmovdqa (%rsp), %xmm3
vpand %xmm1, %xmm3, %xmm1
vpsllw $0x4, %xmm1, %xmm1
vmovdqa 0x1519(%rip), %xmm2     # 0x32c0
vpsubb %xmm0, %xmm2, %xmm0
vpmovzxbq 0x127c(%rip), %xmm2 # 0x3030
vpshufb %xmm0, %xmm2, %xmm0
vpternlogq $0x96, %xmm1, %xmm3, %xmm0
testb $0x7, %bl
je 0x1dd5
vpshufd $0x39, %xmm0, %xmm1     # xmm1 = xmm0[1,2,3,0]
vpshufb 0x14cd(%rip), %xmm0, %xmm0 # 0x32a0
jmp 0x1df8
vpbroadcastq %xmm0, %xmm1
vpshufd $0x9e, %xmm0, %xmm2     # xmm2 = xmm0[2,3,1,2]
vpxor %xmm2, %xmm1, %xmm1
movq 0x31fe(%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 0x13cc(%rip), %xmm4     # 0x31d0
vmovdqa 0x13d4(%rip), %xmm5     # 0x31e0
vmovdqa 0x13dc(%rip), %xmm6     # 0x31f0
vmovdqa 0x13e4(%rip), %xmm7     # 0x3200
vpbroadcastq 0x14f3(%rip), %xmm8 # 0x3318
movq 0x31b4(%rip), %rax      # 0x4fe0
vpmovwb %xmm1, %xmm2
vpshufb 0x1435(%rip), %xmm1, %xmm0 # 0x3270
vpsrlw $0x4, %xmm0, %xmm0
vpternlogq $0x48, %xmm2, %xmm8, %xmm0
vpshufb 0x1430(%rip), %xmm1, %xmm3 # 0x3280
vpshufb 0x1437(%rip), %xmm1, %xmm1 # 0x3290
vpsrlw $0x4, %xmm1, %xmm2
vpternlogq $0x48, %xmm3, %xmm8, %xmm2
addq $0x30, %r14
vmovdqa (%rax), %xmm1
xorl %eax, %eax
vmovdqa 0x1339(%rip), %xmm8     # 0x31b0
cmpq $0x23, %rax
ja 0x1ed6
vpxor -0x30(%r14), %xmm0, %xmm3
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpshufb %xmm4, %xmm0, %xmm0
vpxor -0x20(%r14), %xmm2, %xmm3
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm0, %xmm3, %xmm0
vpshufb %xmm5, %xmm2, %xmm2
vpxor -0x10(%r14), %xmm0, %xmm3
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm3, %xmm2, %xmm2
vpxor (%r14), %xmm2, %xmm3
vpshufb %xmm6, %xmm0, %xmm0
vpshufb %xmm3, %xmm1, %xmm3
vpxor %xmm0, %xmm3, %xmm0
vpshufb %xmm7, %xmm2, %xmm2
addq $0x4, %rax
addq $0x40, %r14
jmp 0x1e77
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, %xmm7
vpsrlw $0x4, %xmm7, %xmm0
vpshufb 0x13e1(%rip), %xmm0, %xmm0 # 0x32e0
vpbroadcastw 0x1124(%rip), %xmm1 # 0x302c
vpand %xmm1, %xmm7, %xmm1
vpmovwb %xmm1, %xmm1
vpor %xmm0, %xmm1, %xmm0
vmovd %xmm0, (%rbp,%rbx)
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq