#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ __m256i;

/* Variables and functions */
int /*<<< orphan*/ _mm256_and_si256(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_set1_epi32(int);
int /*<<< orphan*/ _mm256_set_epi32(int const, int const, int const, int const,
                                    int const, int const, int const, int const);
int /*<<< orphan*/ _mm256_srlv_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm256_storeu_si256(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
const uint32_t *unpack23_32_avx2(const uint32_t *in, uint32_t *out) {
  uint32_t mask = 0x7fffff;
  __m256i reg_shifts, reg_inls, reg_masks;
  __m256i results;
  reg_masks = _mm256_set1_epi32(mask);
  reg_shifts = _mm256_set_epi32(1, 0, 0, 0, 5, 0, 0, 0);
  reg_inls = _mm256_set_epi32(
      in[5], in[4] >> 10 | in[5] << 22, in[3] >> 19 | in[4] << 13,
      in[2] >> 28 | in[3] << 4, in[2], in[1] >> 14 | in[2] << 18,
      in[0] >> 23 | in[1] << 9, in[0]);
  results =
      _mm256_and_si256(_mm256_srlv_epi32(reg_inls, reg_shifts), reg_masks);
  _mm256_storeu_si256((__m256i *)(out), results);
  out += 8;
  reg_shifts = _mm256_set_epi32(0, 2, 0, 0, 0, 6, 0, 0);
  reg_inls = _mm256_set_epi32(
      in[10] >> 25 | in[11] << 7, in[10], in[9] >> 11 | in[10] << 21,
      in[8] >> 20 | in[9] << 12, in[7] >> 29 | in[8] << 3, in[7],
      in[6] >> 15 | in[7] << 17, in[5] >> 24 | in[6] << 8);
  results =
      _mm256_and_si256(_mm256_srlv_epi32(reg_inls, reg_shifts), reg_masks);
  _mm256_storeu_si256((__m256i *)(out), results);
  out += 8;
  reg_shifts = _mm256_set_epi32(0, 0, 3, 0, 0, 0, 7, 0);
  reg_inls = _mm256_set_epi32(
      in[16] >> 17 | in[17] << 15, in[15] >> 26 | in[16] << 6, in[15],
      in[14] >> 12 | in[15] << 20, in[13] >> 21 | in[14] << 11,
      in[12] >> 30 | in[13] << 2, in[12], in[11] >> 16 | in[12] << 16);
  results =
      _mm256_and_si256(_mm256_srlv_epi32(reg_inls, reg_shifts), reg_masks);
  _mm256_storeu_si256((__m256i *)(out), results);
  out += 8;
  reg_shifts = _mm256_set_epi32(9, 0, 0, 4, 0, 0, 0, 8);
  reg_inls = _mm256_set_epi32(
      in[22], in[21] >> 18 | in[22] << 14, in[20] >> 27 | in[21] << 5, in[20],
      in[19] >> 13 | in[20] << 19, in[18] >> 22 | in[19] << 10,
      in[17] >> 31 | in[18] << 1, in[17]);
  results =
      _mm256_and_si256(_mm256_srlv_epi32(reg_inls, reg_shifts), reg_masks);
  _mm256_storeu_si256((__m256i *)(out), results);
  out += 8;
  in += 23;
  return in;
}


x86 assembly (clang, -O0):
<unpack23_32_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x7fffff,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    $0x1,%edi
xor    %r9d,%r9d
mov    $0x5,%r8d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%esi
sar    $0xa,%esi
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
shl    $0x16,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edx
sar    $0x13,%edx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
shl    $0xd,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
sar    $0x1c,%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x4,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r9d
sar    $0xe,%r9d
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x12,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    (%rax),%r10d
sar    $0x17,%r10d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x9,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm256_and_si256@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <_mm256_storeu_si256@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
xor    %r8d,%r8d
mov    $0x2,%esi
mov    $0x6,%r9d
mov    %r8d,%edi
mov    %r8d,%edx
mov    %r8d,%ecx
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%edi
sar    $0x19,%edi
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
shl    $0x7,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%edx
sar    $0xb,%edx
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
shl    $0x15,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%ecx
sar    $0x14,%ecx
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%eax
shl    $0xc,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r8d
sar    $0x1d,%r8d
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%eax
shl    $0x3,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%r10d
sar    $0xf,%r10d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
shl    $0x11,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
sar    $0x18,%eax
mov    -0x8(%rbp),%r11
mov    0x18(%r11),%r11d
shl    $0x8,%r11d
or     %r11d,%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm256_and_si256@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <_mm256_storeu_si256@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
xor    %r9d,%r9d
mov    $0x3,%edx
mov    %r9d,%edi
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x7,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%edi
sar    $0x11,%edi
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%eax
shl    $0xf,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%esi
sar    $0x1a,%esi
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%eax
shl    $0x6,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%ecx
sar    $0xc,%ecx
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%eax
shl    $0x14,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%r8d
sar    $0x15,%r8d
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%eax
shl    $0xb,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%r9d
sar    $0x1e,%r9d
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%eax
shl    $0x2,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%r11
mov    0x30(%r11),%r11d
shl    $0x10,%r11d
or     %r11d,%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm256_and_si256@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <_mm256_storeu_si256@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    $0x9,%edi
xor    %r9d,%r9d
mov    $0x4,%ecx
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x8,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x58(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%esi
sar    $0x12,%esi
mov    -0x8(%rbp),%rax
mov    0x58(%rax),%eax
shl    $0xe,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%edx
sar    $0x1b,%edx
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%eax
shl    $0x5,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%r8d
sar    $0xd,%r8d
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%eax
shl    $0x13,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%r9d
sar    $0x16,%r9d
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%eax
shl    $0xa,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%r10d
sar    $0x1f,%r10d
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%eax
shl    $0x1,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm256_and_si256@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <_mm256_storeu_si256@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x5c,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack23_32_avx2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x7fffff,%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,%ebx
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x5,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x14(%r15),%edi
mov    0x10(%r15),%edx
mov    %edx,%eax
sar    $0xa,%eax
mov    %edi,%esi
shl    $0x16,%esi
or     %eax,%esi
mov    0xc(%r15),%ecx
mov    %ecx,%eax
sar    $0x13,%eax
shl    $0xd,%edx
or     %eax,%edx
mov    0x8(%r15),%r8d
mov    %r8d,%eax
sar    $0x1c,%eax
shl    $0x4,%ecx
or     %eax,%ecx
mov    (%r15),%r10d
mov    0x4(%r15),%ebp
mov    %ebp,%eax
sar    $0xe,%eax
mov    %r8d,%r9d
shl    $0x12,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x17,%eax
shl    $0x9,%ebp
or     %eax,%ebp
push   %r10
push   %rbp
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
mov    %r12d,%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebx,%r12d
mov    %ebx,0xc(%rsp)
call   1040 <_mm256_and_si256@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
lea    0x20(%r14),%rax
mov    %rax,0x10(%rsp)
xor    %edi,%edi
mov    $0x2,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x6,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x28(%r15),%esi
mov    %esi,%eax
sar    $0x19,%eax
mov    0x2c(%r15),%edi
shl    $0x7,%edi
or     %eax,%edi
mov    0x24(%r15),%ecx
mov    %ecx,%eax
sar    $0xb,%eax
mov    %esi,%edx
shl    $0x15,%edx
or     %eax,%edx
mov    0x20(%r15),%r8d
mov    %r8d,%eax
sar    $0x14,%eax
shl    $0xc,%ecx
or     %eax,%ecx
mov    0x18(%r15),%eax
mov    0x1c(%r15),%r9d
mov    %r9d,%ebp
sar    $0x1d,%ebp
shl    $0x3,%r8d
or     %ebp,%r8d
mov    %eax,%ebp
sar    $0xf,%ebp
mov    %r9d,%ebx
shl    $0x11,%ebx
or     %ebp,%ebx
movsbl 0x17(%r15),%ebp
shl    $0x8,%eax
or     %ebp,%eax
push   %rax
push   %rbx
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
mov    %r13d,%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    %r12d,%esi
call   1040 <_mm256_and_si256@plt>
mov    0x10(%rsp),%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
lea    0x40(%r14),%r12
xor    %edi,%edi
xor    %esi,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x7
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x40(%r15),%esi
mov    %esi,%eax
sar    $0x11,%eax
mov    0x44(%r15),%edi
shl    $0xf,%edi
or     %eax,%edi
mov    0x3c(%r15),%edx
mov    %edx,%eax
sar    $0x1a,%eax
shl    $0x6,%esi
or     %eax,%esi
mov    0x38(%r15),%r8d
mov    %r8d,%eax
sar    $0xc,%eax
mov    %edx,%ecx
shl    $0x14,%ecx
or     %eax,%ecx
mov    0x30(%r15),%ebp
mov    0x34(%r15),%r9d
mov    %r9d,%ebx
sar    $0x15,%ebx
shl    $0xb,%r8d
or     %ebx,%r8d
mov    %ebp,%ebx
sar    $0x1e,%ebx
shl    $0x2,%r9d
or     %ebx,%r9d
movswl 0x2e(%r15),%ebx
mov    %ebp,%eax
shl    $0x10,%eax
or     %ebx,%eax
push   %rax
push   %rbp
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
mov    %r13d,%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    0xc(%rsp),%r13d
mov    %r13d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
add    $0x60,%r14
mov    $0x9,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x8
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x58(%r15),%edi
mov    0x54(%r15),%edx
mov    %edx,%eax
sar    $0x12,%eax
mov    %edi,%esi
shl    $0xe,%esi
or     %eax,%esi
mov    0x50(%r15),%ecx
mov    %ecx,%eax
sar    $0x1b,%eax
shl    $0x5,%edx
or     %eax,%edx
mov    0x4c(%r15),%r9d
mov    %r9d,%eax
sar    $0xd,%eax
mov    %ecx,%r8d
shl    $0x13,%r8d
or     %eax,%r8d
mov    0x44(%r15),%eax
mov    0x48(%r15),%ebx
mov    %ebx,%ebp
sar    $0x16,%ebp
shl    $0xa,%r9d
or     %ebp,%r9d
mov    %eax,%ebp
sar    $0x1f,%ebp
add    %ebx,%ebx
or     %ebp,%ebx
push   %rax
push   %rbx
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
mov    %r12d,%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    %r13d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
add    $0x5c,%r15
mov    %r15,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32* @unpack23_32_avx2(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 8388607, i32* %5
%10 = load i32, i32* %5
%11 = call i32 @_mm256_set1_epi32(i32 %10)
store i32 %11, i32* %8
%12 = call i32 @_mm256_set_epi32(i32 1, i32 0, i32 0, i32 0, i32 5, i32 0, i32 0, i32 0)
store i32 %12, i32* %6
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 5
%15 = load i32, i32* %14
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 4
%18 = load i32, i32* %17
%19 = ashr i32 %18, 10
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 5
%22 = load i32, i32* %21
%23 = shl i32 %22, 22
%24 = or i32 %19, %23
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 3
%27 = load i32, i32* %26
%28 = ashr i32 %27, 19
%29 = load i32*, i32** %3
%30 = getelementptr inbounds i32, i32* %29, i64 4
%31 = load i32, i32* %30
%32 = shl i32 %31, 13
%33 = or i32 %28, %32
%34 = load i32*, i32** %3
%35 = getelementptr inbounds i32, i32* %34, i64 2
%36 = load i32, i32* %35
%37 = ashr i32 %36, 28
%38 = load i32*, i32** %3
%39 = getelementptr inbounds i32, i32* %38, i64 3
%40 = load i32, i32* %39
%41 = shl i32 %40, 4
%42 = or i32 %37, %41
%43 = load i32*, i32** %3
%44 = getelementptr inbounds i32, i32* %43, i64 2
%45 = load i32, i32* %44
%46 = load i32*, i32** %3
%47 = getelementptr inbounds i32, i32* %46, i64 1
%48 = load i32, i32* %47
%49 = ashr i32 %48, 14
%50 = load i32*, i32** %3
%51 = getelementptr inbounds i32, i32* %50, i64 2
%52 = load i32, i32* %51
%53 = shl i32 %52, 18
%54 = or i32 %49, %53
%55 = load i32*, i32** %3
%56 = getelementptr inbounds i32, i32* %55, i64 0
%57 = load i32, i32* %56
%58 = ashr i32 %57, 23
%59 = load i32*, i32** %3
%60 = getelementptr inbounds i32, i32* %59, i64 1
%61 = load i32, i32* %60
%62 = shl i32 %61, 9
%63 = or i32 %58, %62
%64 = load i32*, i32** %3
%65 = getelementptr inbounds i32, i32* %64, i64 0
%66 = load i32, i32* %65
%67 = call i32 @_mm256_set_epi32(i32 %15, i32 %24, i32 %33, i32 %42, i32 %45, i32 %54, i32 %63, i32 %66)
store i32 %67, i32* %7
%68 = load i32, i32* %7
%69 = load i32, i32* %6
%70 = call i32 @_mm256_srlv_epi32(i32 %68, i32 %69)
%71 = load i32, i32* %8
%72 = call i32 @_mm256_and_si256(i32 %70, i32 %71)
store i32 %72, i32* %9
%73 = load i32*, i32** %4
%74 = load i32, i32* %9
%75 = call i32 @_mm256_storeu_si256(i32* %73, i32 %74)
%76 = load i32*, i32** %4
%77 = getelementptr inbounds i32, i32* %76, i64 8
store i32* %77, i32** %4
%78 = call i32 @_mm256_set_epi32(i32 0, i32 2, i32 0, i32 0, i32 0, i32 6, i32 0, i32 0)
store i32 %78, i32* %6
%79 = load i32*, i32** %3
%80 = getelementptr inbounds i32, i32* %79, i64 10
%81 = load i32, i32* %80
%82 = ashr i32 %81, 25
%83 = load i32*, i32** %3
%84 = getelementptr inbounds i32, i32* %83, i64 11
%85 = load i32, i32* %84
%86 = shl i32 %85, 7
%87 = or i32 %82, %86
%88 = load i32*, i32** %3
%89 = getelementptr inbounds i32, i32* %88, i64 10
%90 = load i32, i32* %89
%91 = load i32*, i32** %3
%92 = getelementptr inbounds i32, i32* %91, i64 9
%93 = load i32, i32* %92
%94 = ashr i32 %93, 11
%95 = load i32*, i32** %3
%96 = getelementptr inbounds i32, i32* %95, i64 10
%97 = load i32, i32* %96
%98 = shl i32 %97, 21
%99 = or i32 %94, %98
%100 = load i32*, i32** %3
%101 = getelementptr inbounds i32, i32* %100, i64 8
%102 = load i32, i32* %101
%103 = ashr i32 %102, 20
%104 = load i32*, i32** %3
%105 = getelementptr inbounds i32, i32* %104, i64 9
%106 = load i32, i32* %105
%107 = shl i32 %106, 12
%108 = or i32 %103, %107
%109 = load i32*, i32** %3
%110 = getelementptr inbounds i32, i32* %109, i64 7
%111 = load i32, i32* %110
%112 = ashr i32 %111, 29
%113 = load i32*, i32** %3
%114 = getelementptr inbounds i32, i32* %113, i64 8
%115 = load i32, i32* %114
%116 = shl i32 %115, 3
%117 = or i32 %112, %116
%118 = load i32*, i32** %3
%119 = getelementptr inbounds i32, i32* %118, i64 7
%120 = load i32, i32* %119
%121 = load i32*, i32** %3
%122 = getelementptr inbounds i32, i32* %121, i64 6
%123 = load i32, i32* %122
%124 = ashr i32 %123, 15
%125 = load i32*, i32** %3
%126 = getelementptr inbounds i32, i32* %125, i64 7
%127 = load i32, i32* %126
%128 = shl i32 %127, 17
%129 = or i32 %124, %128
%130 = load i32*, i32** %3
%131 = getelementptr inbounds i32, i32* %130, i64 5
%132 = load i32, i32* %131
%133 = ashr i32 %132, 24
%134 = load i32*, i32** %3
%135 = getelementptr inbounds i32, i32* %134, i64 6
%136 = load i32, i32* %135
%137 = shl i32 %136, 8
%138 = or i32 %133, %137
%139 = call i32 @_mm256_set_epi32(i32 %87, i32 %90, i32 %99, i32 %108, i32 %117, i32 %120, i32 %129, i32 %138)
store i32 %139, i32* %7
%140 = load i32, i32* %7
%141 = load i32, i32* %6
%142 = call i32 @_mm256_srlv_epi32(i32 %140, i32 %141)
%143 = load i32, i32* %8
%144 = call i32 @_mm256_and_si256(i32 %142, i32 %143)
store i32 %144, i32* %9
%145 = load i32*, i32** %4
%146 = load i32, i32* %9
%147 = call i32 @_mm256_storeu_si256(i32* %145, i32 %146)
%148 = load i32*, i32** %4
%149 = getelementptr inbounds i32, i32* %148, i64 8
store i32* %149, i32** %4
%150 = call i32 @_mm256_set_epi32(i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 7, i32 0)
store i32 %150, i32* %6
%151 = load i32*, i32** %3
%152 = getelementptr inbounds i32, i32* %151, i64 16
%153 = load i32, i32* %152
%154 = ashr i32 %153, 17
%155 = load i32*, i32** %3
%156 = getelementptr inbounds i32, i32* %155, i64 17
%157 = load i32, i32* %156
%158 = shl i32 %157, 15
%159 = or i32 %154, %158
%160 = load i32*, i32** %3
%161 = getelementptr inbounds i32, i32* %160, i64 15
%162 = load i32, i32* %161
%163 = ashr i32 %162, 26
%164 = load i32*, i32** %3
%165 = getelementptr inbounds i32, i32* %164, i64 16
%166 = load i32, i32* %165
%167 = shl i32 %166, 6
%168 = or i32 %163, %167
%169 = load i32*, i32** %3
%170 = getelementptr inbounds i32, i32* %169, i64 15
%171 = load i32, i32* %170
%172 = load i32*, i32** %3
%173 = getelementptr inbounds i32, i32* %172, i64 14
%174 = load i32, i32* %173
%175 = ashr i32 %174, 12
%176 = load i32*, i32** %3
%177 = getelementptr inbounds i32, i32* %176, i64 15
%178 = load i32, i32* %177
%179 = shl i32 %178, 20
%180 = or i32 %175, %179
%181 = load i32*, i32** %3
%182 = getelementptr inbounds i32, i32* %181, i64 13
%183 = load i32, i32* %182
%184 = ashr i32 %183, 21
%185 = load i32*, i32** %3
%186 = getelementptr inbounds i32, i32* %185, i64 14
%187 = load i32, i32* %186
%188 = shl i32 %187, 11
%189 = or i32 %184, %188
%190 = load i32*, i32** %3
%191 = getelementptr inbounds i32, i32* %190, i64 12
%192 = load i32, i32* %191
%193 = ashr i32 %192, 30
%194 = load i32*, i32** %3
%195 = getelementptr inbounds i32, i32* %194, i64 13
%196 = load i32, i32* %195
%197 = shl i32 %196, 2
%198 = or i32 %193, %197
%199 = load i32*, i32** %3
%200 = getelementptr inbounds i32, i32* %199, i64 12
%201 = load i32, i32* %200
%202 = load i32*, i32** %3
%203 = getelementptr inbounds i32, i32* %202, i64 11
%204 = load i32, i32* %203
%205 = ashr i32 %204, 16
%206 = load i32*, i32** %3
%207 = getelementptr inbounds i32, i32* %206, i64 12
%208 = load i32, i32* %207
%209 = shl i32 %208, 16
%210 = or i32 %205, %209
%211 = call i32 @_mm256_set_epi32(i32 %159, i32 %168, i32 %171, i32 %180, i32 %189, i32 %198, i32 %201, i32 %210)
store i32 %211, i32* %7
%212 = load i32, i32* %7
%213 = load i32, i32* %6
%214 = call i32 @_mm256_srlv_epi32(i32 %212, i32 %213)
%215 = load i32, i32* %8
%216 = call i32 @_mm256_and_si256(i32 %214, i32 %215)
store i32 %216, i32* %9
%217 = load i32*, i32** %4
%218 = load i32, i32* %9
%219 = call i32 @_mm256_storeu_si256(i32* %217, i32 %218)
%220 = load i32*, i32** %4
%221 = getelementptr inbounds i32, i32* %220, i64 8
store i32* %221, i32** %4
%222 = call i32 @_mm256_set_epi32(i32 9, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 8)
store i32 %222, i32* %6
%223 = load i32*, i32** %3
%224 = getelementptr inbounds i32, i32* %223, i64 22
%225 = load i32, i32* %224
%226 = load i32*, i32** %3
%227 = getelementptr inbounds i32, i32* %226, i64 21
%228 = load i32, i32* %227
%229 = ashr i32 %228, 18
%230 = load i32*, i32** %3
%231 = getelementptr inbounds i32, i32* %230, i64 22
%232 = load i32, i32* %231
%233 = shl i32 %232, 14
%234 = or i32 %229, %233
%235 = load i32*, i32** %3
%236 = getelementptr inbounds i32, i32* %235, i64 20
%237 = load i32, i32* %236
%238 = ashr i32 %237, 27
%239 = load i32*, i32** %3
%240 = getelementptr inbounds i32, i32* %239, i64 21
%241 = load i32, i32* %240
%242 = shl i32 %241, 5
%243 = or i32 %238, %242
%244 = load i32*, i32** %3
%245 = getelementptr inbounds i32, i32* %244, i64 20
%246 = load i32, i32* %245
%247 = load i32*, i32** %3
%248 = getelementptr inbounds i32, i32* %247, i64 19
%249 = load i32, i32* %248
%250 = ashr i32 %249, 13
%251 = load i32*, i32** %3
%252 = getelementptr inbounds i32, i32* %251, i64 20
%253 = load i32, i32* %252
%254 = shl i32 %253, 19
%255 = or i32 %250, %254
%256 = load i32*, i32** %3
%257 = getelementptr inbounds i32, i32* %256, i64 18
%258 = load i32, i32* %257
%259 = ashr i32 %258, 22
%260 = load i32*, i32** %3
%261 = getelementptr inbounds i32, i32* %260, i64 19
%262 = load i32, i32* %261
%263 = shl i32 %262, 10
%264 = or i32 %259, %263
%265 = load i32*, i32** %3
%266 = getelementptr inbounds i32, i32* %265, i64 17
%267 = load i32, i32* %266
%268 = ashr i32 %267, 31
%269 = load i32*, i32** %3
%270 = getelementptr inbounds i32, i32* %269, i64 18
%271 = load i32, i32* %270
%272 = shl i32 %271, 1
%273 = or i32 %268, %272
%274 = load i32*, i32** %3
%275 = getelementptr inbounds i32, i32* %274, i64 17
%276 = load i32, i32* %275
%277 = call i32 @_mm256_set_epi32(i32 %225, i32 %234, i32 %243, i32 %246, i32 %255, i32 %264, i32 %273, i32 %276)
store i32 %277, i32* %7
%278 = load i32, i32* %7
%279 = load i32, i32* %6
%280 = call i32 @_mm256_srlv_epi32(i32 %278, i32 %279)
%281 = load i32, i32* %8
%282 = call i32 @_mm256_and_si256(i32 %280, i32 %281)
store i32 %282, i32* %9
%283 = load i32*, i32** %4
%284 = load i32, i32* %9
%285 = call i32 @_mm256_storeu_si256(i32* %283, i32 %284)
%286 = load i32*, i32** %4
%287 = getelementptr inbounds i32, i32* %286, i64 8
store i32* %287, i32** %4
%288 = load i32*, i32** %3
%289 = getelementptr inbounds i32, i32* %288, i64 23
store i32* %289, i32** %3
%290 = load i32*, i32** %3
ret i32* %290
}

LLVM IR (-O2):
define i32* @unpack23_32_avx2(i32* %0, i32* %1) {
%3 = tail call i32 @_mm256_set1_epi32(i32 8388607)
%4 = tail call i32 @_mm256_set_epi32(i32 1, i32 0, i32 0, i32 0, i32 5, i32 0, i32 0, i32 0)
%5 = getelementptr inbounds i32, i32* %0, i64 5
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 4
%8 = load i32, i32* %7
%9 = ashr i32 %8, 10
%10 = shl i32 %6, 22
%11 = or i32 %9, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = ashr i32 %13, 19
%15 = shl i32 %8, 13
%16 = or i32 %14, %15
%17 = getelementptr inbounds i32, i32* %0, i64 2
%18 = load i32, i32* %17
%19 = ashr i32 %18, 28
%20 = shl i32 %13, 4
%21 = or i32 %19, %20
%22 = getelementptr inbounds i32, i32* %0, i64 1
%23 = load i32, i32* %22
%24 = ashr i32 %23, 14
%25 = shl i32 %18, 18
%26 = or i32 %24, %25
%27 = load i32, i32* %0
%28 = ashr i32 %27, 23
%29 = shl i32 %23, 9
%30 = or i32 %28, %29
%31 = tail call i32 @_mm256_set_epi32(i32 %6, i32 %11, i32 %16, i32 %21, i32 %18, i32 %26, i32 %30, i32 %27)
%32 = tail call i32 @_mm256_srlv_epi32(i32 %31, i32 %4)
%33 = tail call i32 @_mm256_and_si256(i32 %32, i32 %3)
%34 = tail call i32 @_mm256_storeu_si256(i32* %1, i32 %33)
%35 = getelementptr inbounds i32, i32* %1, i64 8
%36 = tail call i32 @_mm256_set_epi32(i32 0, i32 2, i32 0, i32 0, i32 0, i32 6, i32 0, i32 0)
%37 = getelementptr inbounds i32, i32* %0, i64 10
%38 = load i32, i32* %37
%39 = ashr i32 %38, 25
%40 = getelementptr inbounds i32, i32* %0, i64 11
%41 = load i32, i32* %40
%42 = shl i32 %41, 7
%43 = or i32 %42, %39
%44 = getelementptr inbounds i32, i32* %0, i64 9
%45 = load i32, i32* %44
%46 = ashr i32 %45, 11
%47 = shl i32 %38, 21
%48 = or i32 %46, %47
%49 = getelementptr inbounds i32, i32* %0, i64 8
%50 = load i32, i32* %49
%51 = ashr i32 %50, 20
%52 = shl i32 %45, 12
%53 = or i32 %51, %52
%54 = getelementptr inbounds i32, i32* %0, i64 7
%55 = load i32, i32* %54
%56 = ashr i32 %55, 29
%57 = shl i32 %50, 3
%58 = or i32 %56, %57
%59 = getelementptr inbounds i32, i32* %0, i64 6
%60 = load i32, i32* %59
%61 = ashr i32 %60, 15
%62 = shl i32 %55, 17
%63 = or i32 %61, %62
%64 = load i32, i32* %5
%65 = ashr i32 %64, 24
%66 = shl i32 %60, 8
%67 = or i32 %65, %66
%68 = tail call i32 @_mm256_set_epi32(i32 %43, i32 %38, i32 %48, i32 %53, i32 %58, i32 %55, i32 %63, i32 %67)
%69 = tail call i32 @_mm256_srlv_epi32(i32 %68, i32 %36)
%70 = tail call i32 @_mm256_and_si256(i32 %69, i32 %3)
%71 = tail call i32 @_mm256_storeu_si256(i32* %35, i32 %70)
%72 = getelementptr inbounds i32, i32* %1, i64 16
%73 = tail call i32 @_mm256_set_epi32(i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 7, i32 0)
%74 = getelementptr inbounds i32, i32* %0, i64 16
%75 = load i32, i32* %74
%76 = ashr i32 %75, 17
%77 = getelementptr inbounds i32, i32* %0, i64 17
%78 = load i32, i32* %77
%79 = shl i32 %78, 15
%80 = or i32 %79, %76
%81 = getelementptr inbounds i32, i32* %0, i64 15
%82 = load i32, i32* %81
%83 = ashr i32 %82, 26
%84 = shl i32 %75, 6
%85 = or i32 %83, %84
%86 = getelementptr inbounds i32, i32* %0, i64 14
%87 = load i32, i32* %86
%88 = ashr i32 %87, 12
%89 = shl i32 %82, 20
%90 = or i32 %88, %89
%91 = getelementptr inbounds i32, i32* %0, i64 13
%92 = load i32, i32* %91
%93 = ashr i32 %92, 21
%94 = shl i32 %87, 11
%95 = or i32 %93, %94
%96 = getelementptr inbounds i32, i32* %0, i64 12
%97 = load i32, i32* %96
%98 = ashr i32 %97, 30
%99 = shl i32 %92, 2
%100 = or i32 %98, %99
%101 = load i32, i32* %40
%102 = ashr i32 %101, 16
%103 = shl i32 %97, 16
%104 = or i32 %102, %103
%105 = tail call i32 @_mm256_set_epi32(i32 %80, i32 %85, i32 %82, i32 %90, i32 %95, i32 %100, i32 %97, i32 %104)
%106 = tail call i32 @_mm256_srlv_epi32(i32 %105, i32 %73)
%107 = tail call i32 @_mm256_and_si256(i32 %106, i32 %3)
%108 = tail call i32 @_mm256_storeu_si256(i32* %72, i32 %107)
%109 = getelementptr inbounds i32, i32* %1, i64 24
%110 = tail call i32 @_mm256_set_epi32(i32 9, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 8)
%111 = getelementptr inbounds i32, i32* %0, i64 22
%112 = load i32, i32* %111
%113 = getelementptr inbounds i32, i32* %0, i64 21
%114 = load i32, i32* %113
%115 = ashr i32 %114, 18
%116 = shl i32 %112, 14
%117 = or i32 %115, %116
%118 = getelementptr inbounds i32, i32* %0, i64 20
%119 = load i32, i32* %118
%120 = ashr i32 %119, 27
%121 = shl i32 %114, 5
%122 = or i32 %120, %121
%123 = getelementptr inbounds i32, i32* %0, i64 19
%124 = load i32, i32* %123
%125 = ashr i32 %124, 13
%126 = shl i32 %119, 19
%127 = or i32 %125, %126
%128 = getelementptr inbounds i32, i32* %0, i64 18
%129 = load i32, i32* %128
%130 = ashr i32 %129, 22
%131 = shl i32 %124, 10
%132 = or i32 %130, %131
%133 = load i32, i32* %77
%134 = ashr i32 %133, 31
%135 = shl i32 %129, 1
%136 = or i32 %134, %135
%137 = tail call i32 @_mm256_set_epi32(i32 %112, i32 %117, i32 %122, i32 %119, i32 %127, i32 %132, i32 %136, i32 %133)
%138 = tail call i32 @_mm256_srlv_epi32(i32 %137, i32 %110)
%139 = tail call i32 @_mm256_and_si256(i32 %138, i32 %3)
%140 = tail call i32 @_mm256_storeu_si256(i32* %109, i32 %139)
%141 = getelementptr inbounds i32, i32* %0, i64 23
ret i32* %141
}