// File: /workspace/github_c_makefile_star2_O1/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 0x907e(%rip), %ymm2 # 0xc001
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 0x93e4(%rip), %ymm0 # ymm0 = mem[0,1,0,1]
vpshufb %ymm2, %ymm0, %ymm3
vpshufb %ymm1, %ymm0, %ymm4
vmovdqa 0xb592(%rip), %ymm2     # 0xe540
vpshufb %ymm2, %ymm3, %ymm5
vmovdqa 0xb5a5(%rip), %ymm1     # 0xe560
vpshufb %ymm1, %ymm4, %ymm6
vmovdqa 0xb1f8(%rip), %ymm3     # 0xe1c0
vpxor %ymm5, %ymm6, %ymm7
vmovdqa 0xb20c(%rip), %ymm4     # 0xe1e0
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, 0xb45d(%rip), %ymm7, %ymm5 # 0xe480
vpternlogq $0x96, 0xb472(%rip), %ymm6, %ymm7 # 0xe4a0
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, 0xb3d7(%rip), %ymm7, %ymm5 # 0xe440
vpternlogq $0x96, 0xb3ec(%rip), %ymm6, %ymm7 # 0xe460
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, 0xb451(%rip), %ymm7, %ymm5 # 0xe500
vpternlogq $0x96, 0xb466(%rip), %ymm6, %ymm7 # 0xe520
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, 0xb3cb(%rip), %ymm7, %ymm5 # 0xe4c0
vpternlogq $0x96, 0xb3e0(%rip), %ymm6, %ymm7 # 0xe4e0
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, 0xb245(%rip), %ymm7, %ymm5 # 0xe380
vpternlogq $0x96, 0xb25a(%rip), %ymm6, %ymm7 # 0xe3a0
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, 0xb1bf(%rip), %ymm7, %ymm5 # 0xe340
vpternlogq $0x96, 0xb1d4(%rip), %ymm6, %ymm7 # 0xe360
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, 0xb239(%rip), %ymm7, %ymm5 # 0xe400
vpternlogq $0x96, 0xb24e(%rip), %ymm6, %ymm7 # 0xe420
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, 0xb1b3(%rip), %ymm7, %ymm5 # 0xe3c0
vpternlogq $0x96, 0xb1c8(%rip), %ymm6, %ymm7 # 0xe3e0
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, 0xb02d(%rip), %ymm7, %ymm5 # 0xe280
vpternlogq $0x96, 0xb042(%rip), %ymm6, %ymm7 # 0xe2a0
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, 0xafa7(%rip), %ymm7, %ymm5 # 0xe240
vpternlogq $0x96, 0xafbc(%rip), %ymm6, %ymm7 # 0xe260
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, 0xb021(%rip), %ymm7, %ymm5 # 0xe300
vpternlogq $0x96, 0xb036(%rip), %ymm6, %ymm7 # 0xe320
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, 0xaf9b(%rip), %ymm7, %ymm5 # 0xe2c0
vpternlogq $0x96, 0xafb0(%rip), %ymm6, %ymm7 # 0xe2e0
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, 0xae15(%rip), %ymm7, %ymm5 # 0xe180
vpternlogq $0x96, 0xae2a(%rip), %ymm6, %ymm7 # 0xe1a0
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, 0xad8f(%rip), %ymm7, %ymm5 # 0xe140
vpternlogq $0x96, 0xada4(%rip), %ymm6, %ymm7 # 0xe160
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, 0xae09(%rip), %ymm7, %ymm5 # 0xe200
vpternlogq $0x96, 0xae1e(%rip), %ymm6, %ymm7 # 0xe220
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