// File: sid1607[P]avx2-merge-sort/merge_sort.cpp
// Function: transpose8(float vector[8]*, float vector[8]*, float vector[8]*, float vector[8]*, float vector[8]*, float vector[8]*, float vector[8]*, float vector[8]*)
inline void transpose8(__m256* row0, __m256* row1, __m256* row2, __m256* row3,
                       __m256* row4, __m256* row5, __m256* row6, __m256* row7) {
  __m256 __t0, __t1, __t2, __t3, __t4, __t5, __t6, __t7;
  __m256 __tt0, __tt1, __tt2, __tt3, __tt4, __tt5, __tt6, __tt7;
  static const int mask0 = _MM_SHUFFLE(1,0,1,0);
  static const int mask1 = _MM_SHUFFLE(3,2,3,2);
  __t0 = _mm256_unpacklo_ps(*row0, *row1);
  __t1 = _mm256_unpackhi_ps(*row0, *row1);
  __t2 = _mm256_unpacklo_ps(*row2, *row3);
  __t3 = _mm256_unpackhi_ps(*row2, *row3);
  __t4 = _mm256_unpacklo_ps(*row4, *row5);
  __t5 = _mm256_unpackhi_ps(*row4, *row5);
  __t6 = _mm256_unpacklo_ps(*row6, *row7);
  __t7 = _mm256_unpackhi_ps(*row6, *row7);
  __tt0 = _mm256_shuffle_ps(__t0,__t2, mask0);
  __tt1 = _mm256_shuffle_ps(__t0,__t2, mask1);
  __tt2 = _mm256_shuffle_ps(__t1,__t3, mask0);
  __tt3 = _mm256_shuffle_ps(__t1,__t3, mask1);
  __tt4 = _mm256_shuffle_ps(__t4,__t6, mask0);
  __tt5 = _mm256_shuffle_ps(__t4,__t6, mask1);
  __tt6 = _mm256_shuffle_ps(__t5,__t7, mask0);
  __tt7 = _mm256_shuffle_ps(__t5,__t7, mask1);
  *row0 = _mm256_permute2f128_ps(__tt0, __tt4, 0x20);
  *row1 = _mm256_permute2f128_ps(__tt1, __tt5, 0x20);
  *row2 = _mm256_permute2f128_ps(__tt2, __tt6, 0x20);
  *row3 = _mm256_permute2f128_ps(__tt3, __tt7, 0x20);
  *row4 = _mm256_permute2f128_ps(__tt0, __tt4, 0x31);
  *row5 = _mm256_permute2f128_ps(__tt1, __tt5, 0x31);
  *row6 = _mm256_permute2f128_ps(__tt2, __tt6, 0x31);
  *row7 = _mm256_permute2f128_ps(__tt3, __tt7, 0x31);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andq $-0x20, %rsp
subq $0x460, %rsp            # imm = 0x460
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, 0x238(%rsp)
movq %rsi, 0x230(%rsp)
movq %rdx, 0x228(%rsp)
movq %rcx, 0x220(%rsp)
movq %r8, 0x218(%rsp)
movq %r9, 0x210(%rsp)
movq 0x238(%rsp), %rax
vmovaps (%rax), %ymm1
movq 0x230(%rsp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x320(%rsp)
vmovaps %ymm0, 0x300(%rsp)
vmovaps 0x320(%rsp), %ymm0
vmovaps 0x300(%rsp), %ymm1
vunpcklps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
vmovaps %ymm0, 0x1e0(%rsp)
movq 0x238(%rsp), %rax
vmovaps (%rax), %ymm1
movq 0x230(%rsp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x420(%rsp)
vmovaps %ymm0, 0x400(%rsp)
vmovaps 0x420(%rsp), %ymm0
vmovaps 0x400(%rsp), %ymm1
vunpckhps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
vmovaps %ymm0, 0x1c0(%rsp)
movq 0x228(%rsp), %rax
vmovaps (%rax), %ymm1
movq 0x220(%rsp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x2e0(%rsp)
vmovaps %ymm0, 0x2c0(%rsp)
vmovaps 0x2e0(%rsp), %ymm0
vmovaps 0x2c0(%rsp), %ymm1
vunpcklps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
vmovaps %ymm0, 0x1a0(%rsp)
movq 0x228(%rsp), %rax
vmovaps (%rax), %ymm1
movq 0x220(%rsp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x3e0(%rsp)
vmovaps %ymm0, 0x3c0(%rsp)
vmovaps 0x3e0(%rsp), %ymm0
vmovaps 0x3c0(%rsp), %ymm1
vunpckhps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
vmovaps %ymm0, 0x180(%rsp)
movq 0x218(%rsp), %rax
vmovaps (%rax), %ymm1
movq 0x210(%rsp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x2a0(%rsp)
vmovaps %ymm0, 0x280(%rsp)
vmovaps 0x2a0(%rsp), %ymm0
vmovaps 0x280(%rsp), %ymm1
vunpcklps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
vmovaps %ymm0, 0x160(%rsp)
movq 0x218(%rsp), %rax
vmovaps (%rax), %ymm1
movq 0x210(%rsp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x3a0(%rsp)
vmovaps %ymm0, 0x380(%rsp)
vmovaps 0x3a0(%rsp), %ymm0
vmovaps 0x380(%rsp), %ymm1
vunpckhps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
vmovaps %ymm0, 0x140(%rsp)
movq 0x10(%rbp), %rax
vmovaps (%rax), %ymm1
movq 0x18(%rbp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x260(%rsp)
vmovaps %ymm0, 0x240(%rsp)
vmovaps 0x260(%rsp), %ymm0
vmovaps 0x240(%rsp), %ymm1
vunpcklps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
vmovaps %ymm0, 0x120(%rsp)
movq 0x10(%rbp), %rax
vmovaps (%rax), %ymm1
movq 0x18(%rbp), %rax
vmovaps (%rax), %ymm0
vmovaps %ymm1, 0x360(%rsp)
vmovaps %ymm0, 0x340(%rsp)
vmovaps 0x360(%rsp), %ymm0
vmovaps 0x340(%rsp), %ymm1
vunpckhps %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
vmovaps %ymm0, 0x100(%rsp)
vmovapd 0x1e0(%rsp), %ymm0
vmovapd 0x1a0(%rsp), %ymm1
vunpcklpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
vmovaps %ymm0, 0xe0(%rsp)
vmovapd 0x1e0(%rsp), %ymm0
vmovapd 0x1a0(%rsp), %ymm1
vunpckhpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
vmovaps %ymm0, 0xc0(%rsp)
vmovapd 0x1c0(%rsp), %ymm0
vmovapd 0x180(%rsp), %ymm1
vunpcklpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
vmovaps %ymm0, 0xa0(%rsp)
vmovapd 0x1c0(%rsp), %ymm0
vmovapd 0x180(%rsp), %ymm1
vunpckhpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
vmovaps %ymm0, 0x80(%rsp)
vmovapd 0x160(%rsp), %ymm0
vmovapd 0x120(%rsp), %ymm1
vunpcklpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
vmovaps %ymm0, 0x60(%rsp)
vmovapd 0x160(%rsp), %ymm0
vmovapd 0x120(%rsp), %ymm1
vunpckhpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
vmovaps %ymm0, 0x40(%rsp)
vmovapd 0x140(%rsp), %ymm0
vmovapd 0x100(%rsp), %ymm1
vunpcklpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0],ymm1[0],ymm0[2],ymm1[2]
vmovaps %ymm0, 0x20(%rsp)
vmovapd 0x140(%rsp), %ymm0
vmovapd 0x100(%rsp), %ymm1
vunpckhpd %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
vmovaps %ymm0, (%rsp)
vmovaps 0xe0(%rsp), %ymm0
vmovaps 0x60(%rsp), %ymm1
vperm2f128 $0x20, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0,1],ymm1[0,1]
movq 0x238(%rsp), %rax
vmovaps %ymm0, (%rax)
vmovaps 0xc0(%rsp), %ymm0
vmovaps 0x40(%rsp), %ymm1
vperm2f128 $0x20, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0,1],ymm1[0,1]
movq 0x230(%rsp), %rax
vmovaps %ymm0, (%rax)
vmovaps 0xa0(%rsp), %ymm0
vmovaps 0x20(%rsp), %ymm1
vperm2f128 $0x20, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0,1],ymm1[0,1]
movq 0x228(%rsp), %rax
vmovaps %ymm0, (%rax)
vmovaps 0x80(%rsp), %ymm0
vmovaps (%rsp), %ymm1
vperm2f128 $0x20, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[0,1],ymm1[0,1]
movq 0x220(%rsp), %rax
vmovaps %ymm0, (%rax)
vmovaps 0xe0(%rsp), %ymm0
vmovaps 0x60(%rsp), %ymm1
vperm2f128 $0x31, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2,3],ymm1[2,3]
movq 0x218(%rsp), %rax
vmovaps %ymm0, (%rax)
vmovaps 0xc0(%rsp), %ymm0
vmovaps 0x40(%rsp), %ymm1
vperm2f128 $0x31, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2,3],ymm1[2,3]
movq 0x210(%rsp), %rax
vmovaps %ymm0, (%rax)
vmovaps 0xa0(%rsp), %ymm0
vmovaps 0x20(%rsp), %ymm1
vperm2f128 $0x31, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2,3],ymm1[2,3]
movq 0x10(%rbp), %rax
vmovaps %ymm0, (%rax)
vmovaps 0x80(%rsp), %ymm0
vmovaps (%rsp), %ymm1
vperm2f128 $0x31, %ymm1, %ymm0, %ymm0 # ymm0 = ymm0[2,3],ymm1[2,3]
movq 0x18(%rbp), %rax
vmovaps %ymm0, (%rax)
movq %rbp, %rsp
popq %rbp
vzeroupper
retq