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


x86 assembly (clang, -O0):
<unpack9_32_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1ff,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,-0x20(%rbp)
xor    %r8d,%r8d
mov    $0x16,%esi
mov    $0xd,%edx
mov    $0x4,%ecx
mov    $0x12,%r9d
mov    %r8d,%edi
movl   $0x9,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
sar    $0x1f,%edi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x1,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%r8d
sar    $0x1b,%r8d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x5,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    (%rax),%r9d
mov    -0x8(%rbp),%rax
mov    (%rax),%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)
mov    $0x7,%edi
xor    %r9d,%r9d
mov    $0x15,%edx
mov    $0xc,%ecx
mov    $0x3,%r8d
mov    %r9d,%esi
movl   $0x11,(%rsp)
movl   $0x8,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%esi
sar    $0x1e,%esi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
shl    $0x2,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r9d
sar    $0x1a,%r9d
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x6,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x8(%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    $0xf,%edi
mov    $0x6,%esi
xor    %edx,%edx
mov    $0x14,%ecx
mov    $0xb,%r8d
mov    $0x2,%r9d
movl   $0x0,(%rsp)
movl   $0x10,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%edx
sar    $0x1d,%edx
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
shl    $0x3,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r10d
sar    $0x19,%r10d
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
shl    $0x7,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x10(%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    $0x17,%edi
mov    $0xe,%esi
mov    $0x5,%edx
xor    %ecx,%ecx
mov    $0x13,%r8d
mov    $0xa,%r9d
movl   $0x1,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
sar    $0x1c,%ecx
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%eax
shl    $0x4,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
sar    $0x18,%eax
mov    -0x8(%rbp),%r11
mov    0x1c(%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)
mov    -0x8(%rbp),%rax
add    $0x24,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack9_32_avx2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x1ff,%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,%r15d
xor    %edi,%edi
mov    $0x16,%esi
mov    $0xd,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
mov    $0x12,%r9d
push   $0x0
push   $0x9
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    (%rbx),%r9d
mov    0x4(%rbx),%ecx
mov    %ecx,%eax
sar    $0x1f,%eax
mov    0x8(%rbx),%edi
add    %edi,%edi
or     %eax,%edi
mov    %r9d,%eax
sar    $0x1b,%eax
mov    %ecx,%r8d
shl    $0x5,%r8d
or     %eax,%r8d
mov    %ecx,%esi
mov    %ecx,%edx
push   %r9
push   %r9
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
mov    %ebp,%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    %r15d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
lea    0x20(%r14),%r12
mov    $0x7,%edi
xor    %esi,%esi
mov    $0x15,%edx
mov    $0xc,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
push   $0x8
push   $0x11
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    0x10(%rbx),%edi
mov    0x8(%rbx),%eax
mov    0xc(%rbx),%ecx
mov    %ecx,%edx
sar    $0x1e,%edx
lea    0x0(,%rdi,4),%esi
or     %edx,%esi
mov    %eax,%edx
sar    $0x1a,%edx
mov    %ecx,%r9d
shl    $0x6,%r9d
or     %edx,%r9d
mov    %ecx,%edx
mov    %ecx,%r8d
push   %rax
push   %rax
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
mov    %ebp,%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    %r15d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
lea    0x40(%r14),%r12
mov    $0xf,%edi
mov    $0x6,%esi
xor    %edx,%edx
mov    $0x14,%ecx
mov    $0xb,%r8d
mov    $0x2,%r9d
push   $0x10
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x18(%rbx),%edi
mov    0x10(%rbx),%eax
mov    0x14(%rbx),%ecx
mov    %ecx,%esi
sar    $0x1d,%esi
lea    0x0(,%rdi,8),%edx
or     %esi,%edx
mov    %eax,%esi
sar    $0x19,%esi
mov    %ecx,%ebp
shl    $0x7,%ebp
or     %esi,%ebp
mov    %edi,%esi
mov    %ecx,%r8d
mov    %ecx,%r9d
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    %r15d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
add    $0x60,%r14
mov    $0x17,%edi
mov    $0xe,%esi
mov    $0x5,%edx
xor    %ecx,%ecx
mov    $0x13,%r8d
mov    $0xa,%r9d
push   $0x0
push   $0x1
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x1c(%rbx),%r8d
mov    0x20(%rbx),%edi
mov    %r8d,%eax
sar    $0x1c,%eax
mov    %edi,%ecx
shl    $0x4,%ecx
or     %eax,%ecx
movsbl 0x1b(%rbx),%eax
mov    %r8d,%ebp
shl    $0x8,%ebp
or     %eax,%ebp
mov    %edi,%esi
mov    %edi,%edx
mov    %r8d,%r9d
push   %rbp
push   %r8
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    %r15d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
add    $0x24,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32* @unpack9_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 511, 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 0, i32 22, i32 13, i32 4, i32 0, i32 18, i32 9, i32 0)
store i32 %12, i32* %6
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = load i32, i32* %14
%16 = ashr i32 %15, 31
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
%19 = load i32, i32* %18
%20 = shl i32 %19, 1
%21 = or i32 %16, %20
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
%28 = load i32*, i32** %3
%29 = getelementptr inbounds i32, i32* %28, i64 1
%30 = load i32, i32* %29
%31 = load i32*, i32** %3
%32 = getelementptr inbounds i32, i32* %31, i64 0
%33 = load i32, i32* %32
%34 = ashr i32 %33, 27
%35 = load i32*, i32** %3
%36 = getelementptr inbounds i32, i32* %35, i64 1
%37 = load i32, i32* %36
%38 = shl i32 %37, 5
%39 = or i32 %34, %38
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i64 0
%42 = load i32, i32* %41
%43 = load i32*, i32** %3
%44 = getelementptr inbounds i32, i32* %43, i64 0
%45 = load i32, i32* %44
%46 = load i32*, i32** %3
%47 = getelementptr inbounds i32, i32* %46, i64 0
%48 = load i32, i32* %47
%49 = call i32 @_mm256_set_epi32(i32 %21, i32 %24, i32 %27, i32 %30, i32 %39, i32 %42, i32 %45, i32 %48)
store i32 %49, i32* %7
%50 = load i32, i32* %7
%51 = load i32, i32* %6
%52 = call i32 @_mm256_srlv_epi32(i32 %50, i32 %51)
%53 = load i32, i32* %8
%54 = call i32 @_mm256_and_si256(i32 %52, i32 %53)
store i32 %54, i32* %9
%55 = load i32*, i32** %4
%56 = load i32, i32* %9
%57 = call i32 @_mm256_storeu_si256(i32* %55, i32 %56)
%58 = load i32*, i32** %4
%59 = getelementptr inbounds i32, i32* %58, i64 8
store i32* %59, i32** %4
%60 = call i32 @_mm256_set_epi32(i32 7, i32 0, i32 21, i32 12, i32 3, i32 0, i32 17, i32 8)
store i32 %60, i32* %6
%61 = load i32*, i32** %3
%62 = getelementptr inbounds i32, i32* %61, i64 4
%63 = load i32, i32* %62
%64 = load i32*, i32** %3
%65 = getelementptr inbounds i32, i32* %64, i64 3
%66 = load i32, i32* %65
%67 = ashr i32 %66, 30
%68 = load i32*, i32** %3
%69 = getelementptr inbounds i32, i32* %68, i64 4
%70 = load i32, i32* %69
%71 = shl i32 %70, 2
%72 = or i32 %67, %71
%73 = load i32*, i32** %3
%74 = getelementptr inbounds i32, i32* %73, i64 3
%75 = load i32, i32* %74
%76 = load i32*, i32** %3
%77 = getelementptr inbounds i32, i32* %76, i64 3
%78 = load i32, i32* %77
%79 = load i32*, i32** %3
%80 = getelementptr inbounds i32, i32* %79, i64 3
%81 = load i32, i32* %80
%82 = load i32*, i32** %3
%83 = getelementptr inbounds i32, i32* %82, i64 2
%84 = load i32, i32* %83
%85 = ashr i32 %84, 26
%86 = load i32*, i32** %3
%87 = getelementptr inbounds i32, i32* %86, i64 3
%88 = load i32, i32* %87
%89 = shl i32 %88, 6
%90 = or i32 %85, %89
%91 = load i32*, i32** %3
%92 = getelementptr inbounds i32, i32* %91, i64 2
%93 = load i32, i32* %92
%94 = load i32*, i32** %3
%95 = getelementptr inbounds i32, i32* %94, i64 2
%96 = load i32, i32* %95
%97 = call i32 @_mm256_set_epi32(i32 %63, i32 %72, i32 %75, i32 %78, i32 %81, i32 %90, i32 %93, i32 %96)
store i32 %97, i32* %7
%98 = load i32, i32* %7
%99 = load i32, i32* %6
%100 = call i32 @_mm256_srlv_epi32(i32 %98, i32 %99)
%101 = load i32, i32* %8
%102 = call i32 @_mm256_and_si256(i32 %100, i32 %101)
store i32 %102, i32* %9
%103 = load i32*, i32** %4
%104 = load i32, i32* %9
%105 = call i32 @_mm256_storeu_si256(i32* %103, i32 %104)
%106 = load i32*, i32** %4
%107 = getelementptr inbounds i32, i32* %106, i64 8
store i32* %107, i32** %4
%108 = call i32 @_mm256_set_epi32(i32 15, i32 6, i32 0, i32 20, i32 11, i32 2, i32 0, i32 16)
store i32 %108, i32* %6
%109 = load i32*, i32** %3
%110 = getelementptr inbounds i32, i32* %109, i64 6
%111 = load i32, i32* %110
%112 = load i32*, i32** %3
%113 = getelementptr inbounds i32, i32* %112, i64 6
%114 = load i32, i32* %113
%115 = load i32*, i32** %3
%116 = getelementptr inbounds i32, i32* %115, i64 5
%117 = load i32, i32* %116
%118 = ashr i32 %117, 29
%119 = load i32*, i32** %3
%120 = getelementptr inbounds i32, i32* %119, i64 6
%121 = load i32, i32* %120
%122 = shl i32 %121, 3
%123 = or i32 %118, %122
%124 = load i32*, i32** %3
%125 = getelementptr inbounds i32, i32* %124, i64 5
%126 = load i32, i32* %125
%127 = load i32*, i32** %3
%128 = getelementptr inbounds i32, i32* %127, i64 5
%129 = load i32, i32* %128
%130 = load i32*, i32** %3
%131 = getelementptr inbounds i32, i32* %130, i64 5
%132 = load i32, i32* %131
%133 = load i32*, i32** %3
%134 = getelementptr inbounds i32, i32* %133, i64 4
%135 = load i32, i32* %134
%136 = ashr i32 %135, 25
%137 = load i32*, i32** %3
%138 = getelementptr inbounds i32, i32* %137, i64 5
%139 = load i32, i32* %138
%140 = shl i32 %139, 7
%141 = or i32 %136, %140
%142 = load i32*, i32** %3
%143 = getelementptr inbounds i32, i32* %142, i64 4
%144 = load i32, i32* %143
%145 = call i32 @_mm256_set_epi32(i32 %111, i32 %114, i32 %123, i32 %126, i32 %129, i32 %132, i32 %141, i32 %144)
store i32 %145, i32* %7
%146 = load i32, i32* %7
%147 = load i32, i32* %6
%148 = call i32 @_mm256_srlv_epi32(i32 %146, i32 %147)
%149 = load i32, i32* %8
%150 = call i32 @_mm256_and_si256(i32 %148, i32 %149)
store i32 %150, i32* %9
%151 = load i32*, i32** %4
%152 = load i32, i32* %9
%153 = call i32 @_mm256_storeu_si256(i32* %151, i32 %152)
%154 = load i32*, i32** %4
%155 = getelementptr inbounds i32, i32* %154, i64 8
store i32* %155, i32** %4
%156 = call i32 @_mm256_set_epi32(i32 23, i32 14, i32 5, i32 0, i32 19, i32 10, i32 1, i32 0)
store i32 %156, i32* %6
%157 = load i32*, i32** %3
%158 = getelementptr inbounds i32, i32* %157, i64 8
%159 = load i32, i32* %158
%160 = load i32*, i32** %3
%161 = getelementptr inbounds i32, i32* %160, i64 8
%162 = load i32, i32* %161
%163 = load i32*, i32** %3
%164 = getelementptr inbounds i32, i32* %163, i64 8
%165 = load i32, i32* %164
%166 = load i32*, i32** %3
%167 = getelementptr inbounds i32, i32* %166, i64 7
%168 = load i32, i32* %167
%169 = ashr i32 %168, 28
%170 = load i32*, i32** %3
%171 = getelementptr inbounds i32, i32* %170, i64 8
%172 = load i32, i32* %171
%173 = shl i32 %172, 4
%174 = or i32 %169, %173
%175 = load i32*, i32** %3
%176 = getelementptr inbounds i32, i32* %175, i64 7
%177 = load i32, i32* %176
%178 = load i32*, i32** %3
%179 = getelementptr inbounds i32, i32* %178, i64 7
%180 = load i32, i32* %179
%181 = load i32*, i32** %3
%182 = getelementptr inbounds i32, i32* %181, i64 7
%183 = load i32, i32* %182
%184 = load i32*, i32** %3
%185 = getelementptr inbounds i32, i32* %184, i64 6
%186 = load i32, i32* %185
%187 = ashr i32 %186, 24
%188 = load i32*, i32** %3
%189 = getelementptr inbounds i32, i32* %188, i64 7
%190 = load i32, i32* %189
%191 = shl i32 %190, 8
%192 = or i32 %187, %191
%193 = call i32 @_mm256_set_epi32(i32 %159, i32 %162, i32 %165, i32 %174, i32 %177, i32 %180, i32 %183, i32 %192)
store i32 %193, i32* %7
%194 = load i32, i32* %7
%195 = load i32, i32* %6
%196 = call i32 @_mm256_srlv_epi32(i32 %194, i32 %195)
%197 = load i32, i32* %8
%198 = call i32 @_mm256_and_si256(i32 %196, i32 %197)
store i32 %198, i32* %9
%199 = load i32*, i32** %4
%200 = load i32, i32* %9
%201 = call i32 @_mm256_storeu_si256(i32* %199, i32 %200)
%202 = load i32*, i32** %4
%203 = getelementptr inbounds i32, i32* %202, i64 8
store i32* %203, i32** %4
%204 = load i32*, i32** %3
%205 = getelementptr inbounds i32, i32* %204, i64 9
store i32* %205, i32** %3
%206 = load i32*, i32** %3
ret i32* %206
}

LLVM IR (-O2):
define i32* @unpack9_32_avx2(i32* %0, i32* %1) {
%3 = tail call i32 @_mm256_set1_epi32(i32 511)
%4 = tail call i32 @_mm256_set_epi32(i32 0, i32 22, i32 13, i32 4, i32 0, i32 18, i32 9, i32 0)
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = ashr i32 %6, 31
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 1
%11 = or i32 %10, %7
%12 = load i32, i32* %0
%13 = ashr i32 %12, 27
%14 = shl i32 %6, 5
%15 = or i32 %13, %14
%16 = tail call i32 @_mm256_set_epi32(i32 %11, i32 %6, i32 %6, i32 %6, i32 %15, i32 %12, i32 %12, i32 %12)
%17 = tail call i32 @_mm256_srlv_epi32(i32 %16, i32 %4)
%18 = tail call i32 @_mm256_and_si256(i32 %17, i32 %3)
%19 = tail call i32 @_mm256_storeu_si256(i32* %1, i32 %18)
%20 = getelementptr inbounds i32, i32* %1, i64 8
%21 = tail call i32 @_mm256_set_epi32(i32 7, i32 0, i32 21, i32 12, i32 3, i32 0, i32 17, i32 8)
%22 = getelementptr inbounds i32, i32* %0, i64 4
%23 = load i32, i32* %22
%24 = getelementptr inbounds i32, i32* %0, i64 3
%25 = load i32, i32* %24
%26 = ashr i32 %25, 30
%27 = shl i32 %23, 2
%28 = or i32 %26, %27
%29 = load i32, i32* %8
%30 = ashr i32 %29, 26
%31 = shl i32 %25, 6
%32 = or i32 %30, %31
%33 = tail call i32 @_mm256_set_epi32(i32 %23, i32 %28, i32 %25, i32 %25, i32 %25, i32 %32, i32 %29, i32 %29)
%34 = tail call i32 @_mm256_srlv_epi32(i32 %33, i32 %21)
%35 = tail call i32 @_mm256_and_si256(i32 %34, i32 %3)
%36 = tail call i32 @_mm256_storeu_si256(i32* %20, i32 %35)
%37 = getelementptr inbounds i32, i32* %1, i64 16
%38 = tail call i32 @_mm256_set_epi32(i32 15, i32 6, i32 0, i32 20, i32 11, i32 2, i32 0, i32 16)
%39 = getelementptr inbounds i32, i32* %0, i64 6
%40 = load i32, i32* %39
%41 = getelementptr inbounds i32, i32* %0, i64 5
%42 = load i32, i32* %41
%43 = ashr i32 %42, 29
%44 = shl i32 %40, 3
%45 = or i32 %43, %44
%46 = load i32, i32* %22
%47 = ashr i32 %46, 25
%48 = shl i32 %42, 7
%49 = or i32 %47, %48
%50 = tail call i32 @_mm256_set_epi32(i32 %40, i32 %40, i32 %45, i32 %42, i32 %42, i32 %42, i32 %49, i32 %46)
%51 = tail call i32 @_mm256_srlv_epi32(i32 %50, i32 %38)
%52 = tail call i32 @_mm256_and_si256(i32 %51, i32 %3)
%53 = tail call i32 @_mm256_storeu_si256(i32* %37, i32 %52)
%54 = getelementptr inbounds i32, i32* %1, i64 24
%55 = tail call i32 @_mm256_set_epi32(i32 23, i32 14, i32 5, i32 0, i32 19, i32 10, i32 1, i32 0)
%56 = getelementptr inbounds i32, i32* %0, i64 8
%57 = load i32, i32* %56
%58 = getelementptr inbounds i32, i32* %0, i64 7
%59 = load i32, i32* %58
%60 = ashr i32 %59, 28
%61 = shl i32 %57, 4
%62 = or i32 %60, %61
%63 = load i32, i32* %39
%64 = ashr i32 %63, 24
%65 = shl i32 %59, 8
%66 = or i32 %64, %65
%67 = tail call i32 @_mm256_set_epi32(i32 %57, i32 %57, i32 %57, i32 %62, i32 %59, i32 %59, i32 %59, i32 %66)
%68 = tail call i32 @_mm256_srlv_epi32(i32 %67, i32 %55)
%69 = tail call i32 @_mm256_and_si256(i32 %68, i32 %3)
%70 = tail call i32 @_mm256_storeu_si256(i32* %54, i32 %69)
%71 = getelementptr inbounds i32, i32* %0, i64 9
ret i32* %71
}