// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/minalpherv11/avx2/MinalpherCore.cpp
// Function: minalpher_core_single_block_inverse(long long vector[4] const&, long long vector[4]&, long long vector[4]&)
void minalpher_core_single_block_inverse(
  const __m256i           &DATA,   /* I                            */
  __m256i                 &ymm0_,  /* O    ymm0                    */
  __m256i                 &ymm1_   /* O    ymm1                    */
  )
{
  /*==== FORMAT CHANGE ====*/
  //Constant Load
  const __m256i ymmMask = _mm256_set_epi32(0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F);

  //VPERMQ
  __m256i tmp = _mm256_permute4x64_epi64(DATA, 0xD8);

  //AND
  __m256i tmp0, tmp1;
  tmp0 = _mm256_and_si256(ymmMask, tmp);
  tmp1 = _mm256_andnot_si256(ymmMask, tmp);

  //SHIFT
  tmp1 = _mm256_srli_epi16(tmp1, 4);

  //UNPACK
  __m256i ymm0 = _mm256_unpacklo_epi8(tmp0, tmp1);
  __m256i ymm1 = _mm256_unpackhi_epi8(tmp0, tmp1);
  /*==== END FORMAT CHANGE ====*/


  /*==== Minalpher-P ====*/
  //Constant Load
  const __m256i ymmSbox = _mm256_set_epi8(0x07, 0x0A, 0x09, 0x06, 0x00, 0x0E, 0x0D, 0x05, 0x0F, 0x0C, 0x08, 0x02, 0x01, 0x04, 0x03, 0x0B,
    0x07, 0x0A, 0x09, 0x06, 0x00, 0x0E, 0x0D, 0x05, 0x0F, 0x0C, 0x08, 0x02, 0x01, 0x04, 0x03, 0x0B);


  /*==== single round function ====*/
#define singleRoundFunctionH(i, ymm0, ymm1 ) {\
    ymm0 = _mm256_shuffle_epi8( ymmSbox, ymm0 );\
    ymm1 = _mm256_shuffle_epi8( ymmSbox, ymm1 );\
    ymm0 = _mm256_shuffle_epi8( ymm0, ShuffleSingleBlock0 );\
    ymm1 = _mm256_shuffle_epi8( ymm1, ShuffleSingleBlock1 );\
    __m256i tmp01 = _mm256_xor_si256(ymm0, ymm1);\
    ymm0 = _mm256_xor_si256( ymm0, RoundConstSingleBlock[i][0] );\
    ymm1 = _mm256_xor_si256( ymm1, RoundConstSingleBlock[i][1] );\
    tmp01 = _mm256_permute4x64_epi64(tmp01, 0x4E);\
    ymm0 = _mm256_xor_si256(tmp01, ymm0); \
    ymm1 = _mm256_xor_si256(tmp01, ymm1); \
    tmp0 = _mm256_slli_si256( ymm0, 8 );\
    tmp1 = _mm256_slli_si256( ymm1, 8 );\
    ymm0 = _mm256_xor_si256( tmp0, ymm0 );\
    ymm1 = _mm256_xor_si256( tmp1, ymm1 );\
    }

  singleRoundFunctionH(2, ymm0, ymm1);
  singleRoundFunctionH(13, ymm0, ymm1);
  singleRoundFunctionH(12, ymm0, ymm1);
  singleRoundFunctionH(15, ymm0, ymm1);
  singleRoundFunctionH(14, ymm0, ymm1);
  singleRoundFunctionH(9, ymm0, ymm1);
  singleRoundFunctionH(8, ymm0, ymm1);
  singleRoundFunctionH(11, ymm0, ymm1);
  singleRoundFunctionH(10, ymm0, ymm1);
  singleRoundFunctionH(5, ymm0, ymm1);
  singleRoundFunctionH(4, ymm0, ymm1);
  singleRoundFunctionH(7, ymm0, ymm1);
  singleRoundFunctionH(6, ymm0, ymm1);
  singleRoundFunctionH(1, ymm0, ymm1);
  singleRoundFunctionH(0, ymm0, ymm1);
  singleRoundFunctionH(3, ymm0, ymm1);
  singleRoundFunctionH(2, ymm0, ymm1);

  ymm0  = _mm256_shuffle_epi8(ymmSbox, ymm0);
  ymm0_ = _mm256_shuffle_epi8(ymm0, ShuffleSingleBlock0);

  ymm1  = _mm256_shuffle_epi8(ymmSbox, ymm1);
  ymm1_ = _mm256_shuffle_epi8(ymm1, ShuffleSingleBlock1);
  /*==== END Minalpher-P ====*/
}

// Assembly:
vpermq $0xd8, (%rdi), %ymm0    # ymm0 = mem[0,2,1,3]
vpsrlw $0x4, %ymm0, %ymm1
vpbroadcastb 0x707e(%rip), %ymm2 # 0xa001
vpand %ymm2, %ymm0, %ymm0
vpand %ymm2, %ymm1, %ymm1
vpunpcklbw %ymm1, %ymm0, %ymm2 # ymm2 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[4],ymm1[4],ymm0[5],ymm1[5],ymm0[6],ymm1[6],ymm0[7],ymm1[7],ymm0[16],ymm1[16],ymm0[17],ymm1[17],ymm0[18],ymm1[18],ymm0[19],ymm1[19],ymm0[20],ymm1[20],ymm0[21],ymm1[21],ymm0[22],ymm1[22],ymm0[23],ymm1[23]
vpunpckhbw %ymm1, %ymm0, %ymm1 # ymm1 = ymm0[8],ymm1[8],ymm0[9],ymm1[9],ymm0[10],ymm1[10],ymm0[11],ymm1[11],ymm0[12],ymm1[12],ymm0[13],ymm1[13],ymm0[14],ymm1[14],ymm0[15],ymm1[15],ymm0[24],ymm1[24],ymm0[25],ymm1[25],ymm0[26],ymm1[26],ymm0[27],ymm1[27],ymm0[28],ymm1[28],ymm0[29],ymm1[29],ymm0[30],ymm1[30],ymm0[31],ymm1[31]
vbroadcasti128 0x73e4(%rip), %ymm0 # ymm0 = mem[0,1,0,1]
vpshufb %ymm2, %ymm0, %ymm3
vpshufb %ymm1, %ymm0, %ymm4
vmovdqa 0x9592(%rip), %ymm2     # 0xc540
vpshufb %ymm2, %ymm3, %ymm5
vmovdqa 0x95a5(%rip), %ymm1     # 0xc560
vpshufb %ymm1, %ymm4, %ymm6
vmovdqa 0x91f8(%rip), %ymm3     # 0xc1c0
vpxor %ymm5, %ymm6, %ymm7
vmovdqa 0x920c(%rip), %ymm4     # 0xc1e0
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, %ymm7, %ymm3, %ymm5
vpternlogq $0x96, %ymm6, %ymm4, %ymm7
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x945d(%rip), %ymm7, %ymm5 # 0xc480
vpternlogq $0x96, 0x9472(%rip), %ymm6, %ymm7 # 0xc4a0
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x93d7(%rip), %ymm7, %ymm5 # 0xc440
vpternlogq $0x96, 0x93ec(%rip), %ymm6, %ymm7 # 0xc460
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x9451(%rip), %ymm7, %ymm5 # 0xc500
vpternlogq $0x96, 0x9466(%rip), %ymm6, %ymm7 # 0xc520
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x93cb(%rip), %ymm7, %ymm5 # 0xc4c0
vpternlogq $0x96, 0x93e0(%rip), %ymm6, %ymm7 # 0xc4e0
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x9245(%rip), %ymm7, %ymm5 # 0xc380
vpternlogq $0x96, 0x925a(%rip), %ymm6, %ymm7 # 0xc3a0
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x91bf(%rip), %ymm7, %ymm5 # 0xc340
vpternlogq $0x96, 0x91d4(%rip), %ymm6, %ymm7 # 0xc360
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x9239(%rip), %ymm7, %ymm5 # 0xc400
vpternlogq $0x96, 0x924e(%rip), %ymm6, %ymm7 # 0xc420
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x91b3(%rip), %ymm7, %ymm5 # 0xc3c0
vpternlogq $0x96, 0x91c8(%rip), %ymm6, %ymm7 # 0xc3e0
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x902d(%rip), %ymm7, %ymm5 # 0xc280
vpternlogq $0x96, 0x9042(%rip), %ymm6, %ymm7 # 0xc2a0
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x8fa7(%rip), %ymm7, %ymm5 # 0xc240
vpternlogq $0x96, 0x8fbc(%rip), %ymm6, %ymm7 # 0xc260
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x9021(%rip), %ymm7, %ymm5 # 0xc300
vpternlogq $0x96, 0x9036(%rip), %ymm6, %ymm7 # 0xc320
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x8f9b(%rip), %ymm7, %ymm5 # 0xc2c0
vpternlogq $0x96, 0x8fb0(%rip), %ymm6, %ymm7 # 0xc2e0
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x8e15(%rip), %ymm7, %ymm5 # 0xc180
vpternlogq $0x96, 0x8e2a(%rip), %ymm6, %ymm7 # 0xc1a0
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x8d8f(%rip), %ymm7, %ymm5 # 0xc140
vpternlogq $0x96, 0x8da4(%rip), %ymm6, %ymm7 # 0xc160
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, 0x8e09(%rip), %ymm7, %ymm5 # 0xc200
vpternlogq $0x96, 0x8e1e(%rip), %ymm6, %ymm7 # 0xc220
vpslldq $0x8, %ymm5, %ymm6      # ymm6 = zero,zero,zero,zero,zero,zero,zero,zero,ymm5[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm5[16,17,18,19,20,21,22,23]
vpslldq $0x8, %ymm7, %ymm8      # ymm8 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm5, %ymm6, %ymm5
vpshufb %ymm5, %ymm0, %ymm5
vxorpd %ymm7, %ymm8, %ymm6
vpshufb %ymm6, %ymm0, %ymm6
vpshufb %ymm2, %ymm5, %ymm5
vpshufb %ymm1, %ymm6, %ymm6
vpxor %ymm5, %ymm6, %ymm7
vpermq $0x4e, %ymm7, %ymm7     # ymm7 = ymm7[2,3,0,1]
vpternlogq $0x96, %ymm5, %ymm7, %ymm3
vpternlogq $0x96, %ymm6, %ymm4, %ymm7
vpslldq $0x8, %ymm3, %ymm4      # ymm4 = zero,zero,zero,zero,zero,zero,zero,zero,ymm3[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm3[16,17,18,19,20,21,22,23]
vxorpd %ymm3, %ymm4, %ymm3
vpshufb %ymm3, %ymm0, %ymm3
vpshufb %ymm2, %ymm3, %ymm2
vmovdqa %ymm2, (%rsi)
vpslldq $0x8, %ymm7, %ymm2      # ymm2 = zero,zero,zero,zero,zero,zero,zero,zero,ymm7[0,1,2,3,4,5,6,7],zero,zero,zero,zero,zero,zero,zero,zero,ymm7[16,17,18,19,20,21,22,23]
vxorpd %ymm7, %ymm2, %ymm2
vpshufb %ymm2, %ymm0, %ymm0
vpshufb %ymm1, %ymm0, %ymm0
vmovdqa %ymm0, (%rdx)
vzeroupper
retq