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


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

x86 assembly (clang, -O2):
<unpack15_32_avx2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x7fff,%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,%ebx
mov    $0x9,%edi
xor    %esi,%esi
mov    $0xb,%edx
xor    %ecx,%ecx
mov    $0xd,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0xf
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0xc(%r15),%edi
mov    0x8(%r15),%edx
mov    %edx,%eax
sar    $0x1a,%eax
mov    %edi,%esi
shl    $0x6,%esi
or     %eax,%esi
mov    (%r15),%eax
mov    0x4(%r15),%r8d
mov    %r8d,%ebp
sar    $0x1c,%ebp
mov    %edx,%ecx
shl    $0x4,%ecx
or     %ebp,%ecx
mov    %eax,%ebp
sar    $0x1e,%ebp
lea    0x0(,%r8,4),%r9d
or     %ebp,%r9d
push   %rax
push   %rax
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)
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
mov    $0x5,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x7
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x1c(%r15),%edi
mov    0x18(%r15),%edx
mov    %edx,%eax
sar    $0x12,%eax
mov    %edi,%esi
shl    $0xe,%esi
or     %eax,%esi
mov    0x10(%r15),%ebx
mov    0x14(%r15),%r8d
mov    %r8d,%ebp
sar    $0x14,%ebp
mov    %edx,%ecx
shl    $0xc,%ecx
or     %ebp,%ecx
mov    %ebx,%ebp
sar    $0x16,%ebp
mov    %r8d,%r9d
shl    $0xa,%r9d
or     %ebp,%r9d
movsbl 0xf(%r15),%ebp
mov    %ebx,%eax
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
mov    $0xa,%esi
xor    %edx,%edx
mov    $0xc,%ecx
xor    %r8d,%r8d
mov    $0xe,%r9d
push   $0x10
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    $0x1b,%eax
mov    %esi,%edx
shl    $0x5,%edx
or     %eax,%edx
mov    0x1c(%r15),%eax
mov    0x20(%r15),%r9d
mov    %r9d,%ebx
sar    $0x1d,%ebx
lea    0x0(,%rcx,8),%r8d
or     %ebx,%r8d
mov    %eax,%ebx
sar    $0x1f,%ebx
lea    (%r9,%r9,1),%ebp
or     %ebx,%ebp
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    $0x11,%edi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
mov    $0x6,%r9d
push   $0x8
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    0x38(%r15),%edi
mov    0x34(%r15),%ecx
mov    %ecx,%eax
sar    $0x13,%eax
mov    %edi,%edx
shl    $0xd,%edx
or     %eax,%edx
mov    0x2c(%r15),%eax
mov    0x30(%r15),%r9d
mov    %r9d,%esi
sar    $0x15,%esi
mov    %ecx,%r8d
shl    $0xb,%r8d
or     %esi,%r8d
mov    %eax,%esi
sar    $0x17,%esi
mov    %r9d,%ebx
shl    $0x9,%ebx
or     %esi,%ebx
mov    %edi,%esi
push   %rax
push   %rbx
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    %r13d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
add    $0x3c,%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* @unpack15_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 32767, 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 9, i32 0, i32 11, i32 0, i32 13, i32 0, i32 15, i32 0)
store i32 %12, i32* %6
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 3
%15 = load i32, i32* %14
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load i32, i32* %17
%19 = ashr i32 %18, 26
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = load i32, i32* %21
%23 = shl i32 %22, 6
%24 = or i32 %19, %23
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 2
%27 = load i32, i32* %26
%28 = load i32*, i32** %3
%29 = getelementptr inbounds i32, i32* %28, i64 1
%30 = load i32, i32* %29
%31 = ashr i32 %30, 28
%32 = load i32*, i32** %3
%33 = getelementptr inbounds i32, i32* %32, i64 2
%34 = load i32, i32* %33
%35 = shl i32 %34, 4
%36 = or i32 %31, %35
%37 = load i32*, i32** %3
%38 = getelementptr inbounds i32, i32* %37, i64 1
%39 = load i32, i32* %38
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i64 0
%42 = load i32, i32* %41
%43 = ashr i32 %42, 30
%44 = load i32*, i32** %3
%45 = getelementptr inbounds i32, i32* %44, i64 1
%46 = load i32, i32* %45
%47 = shl i32 %46, 2
%48 = or i32 %43, %47
%49 = load i32*, i32** %3
%50 = getelementptr inbounds i32, i32* %49, i64 0
%51 = load i32, i32* %50
%52 = load i32*, i32** %3
%53 = getelementptr inbounds i32, i32* %52, i64 0
%54 = load i32, i32* %53
%55 = call i32 @_mm256_set_epi32(i32 %15, i32 %24, i32 %27, i32 %36, i32 %39, i32 %48, i32 %51, i32 %54)
store i32 %55, i32* %7
%56 = load i32, i32* %7
%57 = load i32, i32* %6
%58 = call i32 @_mm256_srlv_epi32(i32 %56, i32 %57)
%59 = load i32, i32* %8
%60 = call i32 @_mm256_and_si256(i32 %58, i32 %59)
store i32 %60, i32* %9
%61 = load i32*, i32** %4
%62 = load i32, i32* %9
%63 = call i32 @_mm256_storeu_si256(i32* %61, i32 %62)
%64 = load i32*, i32** %4
%65 = getelementptr inbounds i32, i32* %64, i64 8
store i32* %65, i32** %4
%66 = call i32 @_mm256_set_epi32(i32 1, i32 0, i32 3, i32 0, i32 5, i32 0, i32 7, i32 0)
store i32 %66, i32* %6
%67 = load i32*, i32** %3
%68 = getelementptr inbounds i32, i32* %67, i64 7
%69 = load i32, i32* %68
%70 = load i32*, i32** %3
%71 = getelementptr inbounds i32, i32* %70, i64 6
%72 = load i32, i32* %71
%73 = ashr i32 %72, 18
%74 = load i32*, i32** %3
%75 = getelementptr inbounds i32, i32* %74, i64 7
%76 = load i32, i32* %75
%77 = shl i32 %76, 14
%78 = or i32 %73, %77
%79 = load i32*, i32** %3
%80 = getelementptr inbounds i32, i32* %79, i64 6
%81 = load i32, i32* %80
%82 = load i32*, i32** %3
%83 = getelementptr inbounds i32, i32* %82, i64 5
%84 = load i32, i32* %83
%85 = ashr i32 %84, 20
%86 = load i32*, i32** %3
%87 = getelementptr inbounds i32, i32* %86, i64 6
%88 = load i32, i32* %87
%89 = shl i32 %88, 12
%90 = or i32 %85, %89
%91 = load i32*, i32** %3
%92 = getelementptr inbounds i32, i32* %91, i64 5
%93 = load i32, i32* %92
%94 = load i32*, i32** %3
%95 = getelementptr inbounds i32, i32* %94, i64 4
%96 = load i32, i32* %95
%97 = ashr i32 %96, 22
%98 = load i32*, i32** %3
%99 = getelementptr inbounds i32, i32* %98, i64 5
%100 = load i32, i32* %99
%101 = shl i32 %100, 10
%102 = or i32 %97, %101
%103 = load i32*, i32** %3
%104 = getelementptr inbounds i32, i32* %103, i64 4
%105 = load i32, i32* %104
%106 = load i32*, i32** %3
%107 = getelementptr inbounds i32, i32* %106, i64 3
%108 = load i32, i32* %107
%109 = ashr i32 %108, 24
%110 = load i32*, i32** %3
%111 = getelementptr inbounds i32, i32* %110, i64 4
%112 = load i32, i32* %111
%113 = shl i32 %112, 8
%114 = or i32 %109, %113
%115 = call i32 @_mm256_set_epi32(i32 %69, i32 %78, i32 %81, i32 %90, i32 %93, i32 %102, i32 %105, i32 %114)
store i32 %115, i32* %7
%116 = load i32, i32* %7
%117 = load i32, i32* %6
%118 = call i32 @_mm256_srlv_epi32(i32 %116, i32 %117)
%119 = load i32, i32* %8
%120 = call i32 @_mm256_and_si256(i32 %118, i32 %119)
store i32 %120, i32* %9
%121 = load i32*, i32** %4
%122 = load i32, i32* %9
%123 = call i32 @_mm256_storeu_si256(i32* %121, i32 %122)
%124 = load i32*, i32** %4
%125 = getelementptr inbounds i32, i32* %124, i64 8
store i32* %125, i32** %4
%126 = call i32 @_mm256_set_epi32(i32 0, i32 10, i32 0, i32 12, i32 0, i32 14, i32 0, i32 16)
store i32 %126, i32* %6
%127 = load i32*, i32** %3
%128 = getelementptr inbounds i32, i32* %127, i64 10
%129 = load i32, i32* %128
%130 = ashr i32 %129, 25
%131 = load i32*, i32** %3
%132 = getelementptr inbounds i32, i32* %131, i64 11
%133 = load i32, i32* %132
%134 = shl i32 %133, 7
%135 = or i32 %130, %134
%136 = load i32*, i32** %3
%137 = getelementptr inbounds i32, i32* %136, i64 10
%138 = load i32, i32* %137
%139 = load i32*, i32** %3
%140 = getelementptr inbounds i32, i32* %139, i64 9
%141 = load i32, i32* %140
%142 = ashr i32 %141, 27
%143 = load i32*, i32** %3
%144 = getelementptr inbounds i32, i32* %143, i64 10
%145 = load i32, i32* %144
%146 = shl i32 %145, 5
%147 = or i32 %142, %146
%148 = load i32*, i32** %3
%149 = getelementptr inbounds i32, i32* %148, i64 9
%150 = load i32, i32* %149
%151 = load i32*, i32** %3
%152 = getelementptr inbounds i32, i32* %151, i64 8
%153 = load i32, i32* %152
%154 = ashr i32 %153, 29
%155 = load i32*, i32** %3
%156 = getelementptr inbounds i32, i32* %155, i64 9
%157 = load i32, i32* %156
%158 = shl i32 %157, 3
%159 = or i32 %154, %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 7
%165 = load i32, i32* %164
%166 = ashr i32 %165, 31
%167 = load i32*, i32** %3
%168 = getelementptr inbounds i32, i32* %167, i64 8
%169 = load i32, i32* %168
%170 = shl i32 %169, 1
%171 = or i32 %166, %170
%172 = load i32*, i32** %3
%173 = getelementptr inbounds i32, i32* %172, i64 7
%174 = load i32, i32* %173
%175 = call i32 @_mm256_set_epi32(i32 %135, i32 %138, i32 %147, i32 %150, i32 %159, i32 %162, i32 %171, i32 %174)
store i32 %175, i32* %7
%176 = load i32, i32* %7
%177 = load i32, i32* %6
%178 = call i32 @_mm256_srlv_epi32(i32 %176, i32 %177)
%179 = load i32, i32* %8
%180 = call i32 @_mm256_and_si256(i32 %178, i32 %179)
store i32 %180, i32* %9
%181 = load i32*, i32** %4
%182 = load i32, i32* %9
%183 = call i32 @_mm256_storeu_si256(i32* %181, i32 %182)
%184 = load i32*, i32** %4
%185 = getelementptr inbounds i32, i32* %184, i64 8
store i32* %185, i32** %4
%186 = call i32 @_mm256_set_epi32(i32 17, i32 2, i32 0, i32 4, i32 0, i32 6, i32 0, i32 8)
store i32 %186, i32* %6
%187 = load i32*, i32** %3
%188 = getelementptr inbounds i32, i32* %187, i64 14
%189 = load i32, i32* %188
%190 = load i32*, i32** %3
%191 = getelementptr inbounds i32, i32* %190, i64 14
%192 = load i32, i32* %191
%193 = load i32*, i32** %3
%194 = getelementptr inbounds i32, i32* %193, i64 13
%195 = load i32, i32* %194
%196 = ashr i32 %195, 19
%197 = load i32*, i32** %3
%198 = getelementptr inbounds i32, i32* %197, i64 14
%199 = load i32, i32* %198
%200 = shl i32 %199, 13
%201 = or i32 %196, %200
%202 = load i32*, i32** %3
%203 = getelementptr inbounds i32, i32* %202, i64 13
%204 = load i32, i32* %203
%205 = load i32*, i32** %3
%206 = getelementptr inbounds i32, i32* %205, i64 12
%207 = load i32, i32* %206
%208 = ashr i32 %207, 21
%209 = load i32*, i32** %3
%210 = getelementptr inbounds i32, i32* %209, i64 13
%211 = load i32, i32* %210
%212 = shl i32 %211, 11
%213 = or i32 %208, %212
%214 = load i32*, i32** %3
%215 = getelementptr inbounds i32, i32* %214, i64 12
%216 = load i32, i32* %215
%217 = load i32*, i32** %3
%218 = getelementptr inbounds i32, i32* %217, i64 11
%219 = load i32, i32* %218
%220 = ashr i32 %219, 23
%221 = load i32*, i32** %3
%222 = getelementptr inbounds i32, i32* %221, i64 12
%223 = load i32, i32* %222
%224 = shl i32 %223, 9
%225 = or i32 %220, %224
%226 = load i32*, i32** %3
%227 = getelementptr inbounds i32, i32* %226, i64 11
%228 = load i32, i32* %227
%229 = call i32 @_mm256_set_epi32(i32 %189, i32 %192, i32 %201, i32 %204, i32 %213, i32 %216, i32 %225, i32 %228)
store i32 %229, i32* %7
%230 = load i32, i32* %7
%231 = load i32, i32* %6
%232 = call i32 @_mm256_srlv_epi32(i32 %230, i32 %231)
%233 = load i32, i32* %8
%234 = call i32 @_mm256_and_si256(i32 %232, i32 %233)
store i32 %234, i32* %9
%235 = load i32*, i32** %4
%236 = load i32, i32* %9
%237 = call i32 @_mm256_storeu_si256(i32* %235, i32 %236)
%238 = load i32*, i32** %4
%239 = getelementptr inbounds i32, i32* %238, i64 8
store i32* %239, i32** %4
%240 = load i32*, i32** %3
%241 = getelementptr inbounds i32, i32* %240, i64 15
store i32* %241, i32** %3
%242 = load i32*, i32** %3
ret i32* %242
}

LLVM IR (-O2):
define i32* @unpack15_32_avx2(i32* %0, i32* %1) {
%3 = tail call i32 @_mm256_set1_epi32(i32 32767)
%4 = tail call i32 @_mm256_set_epi32(i32 9, i32 0, i32 11, i32 0, i32 13, i32 0, i32 15, i32 0)
%5 = getelementptr inbounds i32, i32* %0, i64 3
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = ashr i32 %8, 26
%10 = shl i32 %6, 6
%11 = or i32 %9, %10
%12 = getelementptr inbounds i32, i32* %0, i64 1
%13 = load i32, i32* %12
%14 = ashr i32 %13, 28
%15 = shl i32 %8, 4
%16 = or i32 %14, %15
%17 = load i32, i32* %0
%18 = ashr i32 %17, 30
%19 = shl i32 %13, 2
%20 = or i32 %18, %19
%21 = tail call i32 @_mm256_set_epi32(i32 %6, i32 %11, i32 %8, i32 %16, i32 %13, i32 %20, i32 %17, i32 %17)
%22 = tail call i32 @_mm256_srlv_epi32(i32 %21, i32 %4)
%23 = tail call i32 @_mm256_and_si256(i32 %22, i32 %3)
%24 = tail call i32 @_mm256_storeu_si256(i32* %1, i32 %23)
%25 = getelementptr inbounds i32, i32* %1, i64 8
%26 = tail call i32 @_mm256_set_epi32(i32 1, i32 0, i32 3, i32 0, i32 5, i32 0, i32 7, i32 0)
%27 = getelementptr inbounds i32, i32* %0, i64 7
%28 = load i32, i32* %27
%29 = getelementptr inbounds i32, i32* %0, i64 6
%30 = load i32, i32* %29
%31 = ashr i32 %30, 18
%32 = shl i32 %28, 14
%33 = or i32 %31, %32
%34 = getelementptr inbounds i32, i32* %0, i64 5
%35 = load i32, i32* %34
%36 = ashr i32 %35, 20
%37 = shl i32 %30, 12
%38 = or i32 %36, %37
%39 = getelementptr inbounds i32, i32* %0, i64 4
%40 = load i32, i32* %39
%41 = ashr i32 %40, 22
%42 = shl i32 %35, 10
%43 = or i32 %41, %42
%44 = load i32, i32* %5
%45 = ashr i32 %44, 24
%46 = shl i32 %40, 8
%47 = or i32 %45, %46
%48 = tail call i32 @_mm256_set_epi32(i32 %28, i32 %33, i32 %30, i32 %38, i32 %35, i32 %43, i32 %40, i32 %47)
%49 = tail call i32 @_mm256_srlv_epi32(i32 %48, i32 %26)
%50 = tail call i32 @_mm256_and_si256(i32 %49, i32 %3)
%51 = tail call i32 @_mm256_storeu_si256(i32* %25, i32 %50)
%52 = getelementptr inbounds i32, i32* %1, i64 16
%53 = tail call i32 @_mm256_set_epi32(i32 0, i32 10, i32 0, i32 12, i32 0, i32 14, i32 0, i32 16)
%54 = getelementptr inbounds i32, i32* %0, i64 10
%55 = load i32, i32* %54
%56 = ashr i32 %55, 25
%57 = getelementptr inbounds i32, i32* %0, i64 11
%58 = load i32, i32* %57
%59 = shl i32 %58, 7
%60 = or i32 %59, %56
%61 = getelementptr inbounds i32, i32* %0, i64 9
%62 = load i32, i32* %61
%63 = ashr i32 %62, 27
%64 = shl i32 %55, 5
%65 = or i32 %63, %64
%66 = getelementptr inbounds i32, i32* %0, i64 8
%67 = load i32, i32* %66
%68 = ashr i32 %67, 29
%69 = shl i32 %62, 3
%70 = or i32 %68, %69
%71 = load i32, i32* %27
%72 = ashr i32 %71, 31
%73 = shl i32 %67, 1
%74 = or i32 %72, %73
%75 = tail call i32 @_mm256_set_epi32(i32 %60, i32 %55, i32 %65, i32 %62, i32 %70, i32 %67, i32 %74, i32 %71)
%76 = tail call i32 @_mm256_srlv_epi32(i32 %75, i32 %53)
%77 = tail call i32 @_mm256_and_si256(i32 %76, i32 %3)
%78 = tail call i32 @_mm256_storeu_si256(i32* %52, i32 %77)
%79 = getelementptr inbounds i32, i32* %1, i64 24
%80 = tail call i32 @_mm256_set_epi32(i32 17, i32 2, i32 0, i32 4, i32 0, i32 6, i32 0, i32 8)
%81 = getelementptr inbounds i32, i32* %0, i64 14
%82 = load i32, i32* %81
%83 = getelementptr inbounds i32, i32* %0, i64 13
%84 = load i32, i32* %83
%85 = ashr i32 %84, 19
%86 = shl i32 %82, 13
%87 = or i32 %85, %86
%88 = getelementptr inbounds i32, i32* %0, i64 12
%89 = load i32, i32* %88
%90 = ashr i32 %89, 21
%91 = shl i32 %84, 11
%92 = or i32 %90, %91
%93 = load i32, i32* %57
%94 = ashr i32 %93, 23
%95 = shl i32 %89, 9
%96 = or i32 %94, %95
%97 = tail call i32 @_mm256_set_epi32(i32 %82, i32 %82, i32 %87, i32 %84, i32 %92, i32 %89, i32 %96, i32 %93)
%98 = tail call i32 @_mm256_srlv_epi32(i32 %97, i32 %80)
%99 = tail call i32 @_mm256_and_si256(i32 %98, i32 %3)
%100 = tail call i32 @_mm256_storeu_si256(i32* %79, i32 %99)
%101 = getelementptr inbounds i32, i32* %0, i64 15
ret i32* %101
}