#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 *unpack12_32_avx2(const uint32_t *in, uint32_t *out) {
  uint32_t mask = 0xfff;
  __m256i reg_shifts, reg_inls, reg_masks;
  __m256i results;
  reg_masks = _mm256_set1_epi32(mask);
  reg_shifts = _mm256_set_epi32(20, 8, 0, 16, 4, 0, 12, 0);
  reg_inls = _mm256_set_epi32(in[2], in[2], in[1] >> 28 | in[2] << 4, in[1],
                              in[1], in[0] >> 24 | in[1] << 8, 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(20, 8, 0, 16, 4, 0, 12, 0);
  reg_inls = _mm256_set_epi32(in[5], in[5], in[4] >> 28 | in[5] << 4, in[4],
                              in[4], in[3] >> 24 | in[4] << 8, in[3], in[3]);
  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(20, 8, 0, 16, 4, 0, 12, 0);
  reg_inls = _mm256_set_epi32(in[8], in[8], in[7] >> 28 | in[8] << 4, in[7],
                              in[7], in[6] >> 24 | in[7] << 8, in[6], in[6]);
  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(20, 8, 0, 16, 4, 0, 12, 0);
  reg_inls =
      _mm256_set_epi32(in[11], in[11], in[10] >> 28 | in[11] << 4, in[10],
                       in[10], in[9] >> 24 | in[10] << 8, in[9], in[9]);
  results =
      _mm256_and_si256(_mm256_srlv_epi32(reg_inls, reg_shifts), reg_masks);
  _mm256_storeu_si256((__m256i *)(out), results);
  out += 8;
  in += 12;
  return in;
}


x86 assembly (clang, -O0):
<unpack12_32_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xfff,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    $0x14,%edi
mov    $0x8,%esi
xor    %r9d,%r9d
mov    $0x10,%ecx
mov    $0x4,%r8d
mov    %r9d,%edx
movl   $0xc,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
sar    $0x1c,%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    (%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%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    $0x14,%edi
mov    $0x8,%esi
xor    %r9d,%r9d
mov    $0x10,%ecx
mov    $0x4,%r8d
mov    %r9d,%edx
movl   $0xc,(%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    0x14(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edx
sar    $0x1c,%edx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
shl    $0x8,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0xc(%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    $0x14,%edi
mov    $0x8,%esi
xor    %r9d,%r9d
mov    $0x10,%ecx
mov    $0x4,%r8d
mov    %r9d,%edx
movl   $0xc,(%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    0x1c(%rax),%edx
sar    $0x1c,%edx
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%eax
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
shl    $0x8,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x18(%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    $0x14,%edi
mov    $0x8,%esi
xor    %r9d,%r9d
mov    $0x10,%ecx
mov    $0x4,%r8d
mov    %r9d,%edx
movl   $0xc,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%edx
sar    $0x1c,%edx
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
shl    $0x8,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x24(%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    $0x30,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack12_32_avx2>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xfff,%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,%r15d
mov    $0x14,%edi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x10,%ecx
mov    $0x4,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0xc
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    0x8(%rbx),%edi
mov    (%rbx),%eax
mov    0x4(%rbx),%ecx
mov    %ecx,%esi
sar    $0x1c,%esi
mov    %edi,%edx
shl    $0x4,%edx
or     %esi,%edx
mov    %eax,%esi
sar    $0x18,%esi
mov    %ecx,%r9d
shl    $0x8,%r9d
or     %esi,%r9d
mov    %edi,%esi
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    %r14,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
lea    0x20(%r14),%r12
mov    $0x14,%edi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x10,%ecx
mov    $0x4,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0xc
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    0x14(%rbx),%edi
mov    0xc(%rbx),%eax
mov    0x10(%rbx),%ecx
mov    %ecx,%esi
sar    $0x1c,%esi
mov    %edi,%edx
shl    $0x4,%edx
or     %esi,%edx
mov    %eax,%esi
sar    $0x18,%esi
mov    %ecx,%r9d
shl    $0x8,%r9d
or     %esi,%r9d
mov    %edi,%esi
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    $0x14,%edi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x10,%ecx
mov    $0x4,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0xc
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    0x20(%rbx),%edi
mov    0x18(%rbx),%eax
mov    0x1c(%rbx),%ecx
mov    %ecx,%esi
sar    $0x1c,%esi
mov    %edi,%edx
shl    $0x4,%edx
or     %esi,%edx
mov    %eax,%esi
sar    $0x18,%esi
mov    %ecx,%r9d
shl    $0x8,%r9d
or     %esi,%r9d
mov    %edi,%esi
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>
add    $0x60,%r14
mov    $0x14,%edi
mov    $0x8,%esi
xor    %edx,%edx
mov    $0x10,%ecx
mov    $0x4,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0xc
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%ebp
mov    0x2c(%rbx),%edi
mov    0x24(%rbx),%eax
mov    0x28(%rbx),%ecx
mov    %ecx,%esi
sar    $0x1c,%esi
mov    %edi,%edx
shl    $0x4,%edx
or     %esi,%edx
mov    %eax,%esi
sar    $0x18,%esi
mov    %ecx,%r9d
shl    $0x8,%r9d
or     %esi,%r9d
mov    %edi,%esi
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    %r14,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
add    $0x30,%rbx
mov    %rbx,%rax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32* @unpack12_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 4095, 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 20, i32 8, i32 0, i32 16, i32 4, i32 0, i32 12, i32 0)
store i32 %12, i32* %6
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load i32, i32* %17
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 1
%21 = load i32, i32* %20
%22 = ashr i32 %21, 28
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 2
%25 = load i32, i32* %24
%26 = shl i32 %25, 4
%27 = or i32 %22, %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 1
%33 = load i32, i32* %32
%34 = load i32*, i32** %3
%35 = getelementptr inbounds i32, i32* %34, i64 0
%36 = load i32, i32* %35
%37 = ashr i32 %36, 24
%38 = load i32*, i32** %3
%39 = getelementptr inbounds i32, i32* %38, i64 1
%40 = load i32, i32* %39
%41 = shl i32 %40, 8
%42 = or i32 %37, %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 %15, i32 %18, i32 %27, i32 %30, i32 %33, 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 20, i32 8, i32 0, i32 16, i32 4, i32 0, i32 12, i32 0)
store i32 %60, i32* %6
%61 = load i32*, i32** %3
%62 = getelementptr inbounds i32, i32* %61, i64 5
%63 = load i32, i32* %62
%64 = load i32*, i32** %3
%65 = getelementptr inbounds i32, i32* %64, i64 5
%66 = load i32, i32* %65
%67 = load i32*, i32** %3
%68 = getelementptr inbounds i32, i32* %67, i64 4
%69 = load i32, i32* %68
%70 = ashr i32 %69, 28
%71 = load i32*, i32** %3
%72 = getelementptr inbounds i32, i32* %71, i64 5
%73 = load i32, i32* %72
%74 = shl i32 %73, 4
%75 = or i32 %70, %74
%76 = load i32*, i32** %3
%77 = getelementptr inbounds i32, i32* %76, i64 4
%78 = load i32, i32* %77
%79 = load i32*, i32** %3
%80 = getelementptr inbounds i32, i32* %79, i64 4
%81 = load i32, i32* %80
%82 = load i32*, i32** %3
%83 = getelementptr inbounds i32, i32* %82, i64 3
%84 = load i32, i32* %83
%85 = ashr i32 %84, 24
%86 = load i32*, i32** %3
%87 = getelementptr inbounds i32, i32* %86, i64 4
%88 = load i32, i32* %87
%89 = shl i32 %88, 8
%90 = or i32 %85, %89
%91 = load i32*, i32** %3
%92 = getelementptr inbounds i32, i32* %91, i64 3
%93 = load i32, i32* %92
%94 = load i32*, i32** %3
%95 = getelementptr inbounds i32, i32* %94, i64 3
%96 = load i32, i32* %95
%97 = call i32 @_mm256_set_epi32(i32 %63, i32 %66, 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 20, i32 8, i32 0, i32 16, i32 4, i32 0, i32 12, i32 0)
store i32 %108, i32* %6
%109 = load i32*, i32** %3
%110 = getelementptr inbounds i32, i32* %109, i64 8
%111 = load i32, i32* %110
%112 = load i32*, i32** %3
%113 = getelementptr inbounds i32, i32* %112, i64 8
%114 = load i32, i32* %113
%115 = load i32*, i32** %3
%116 = getelementptr inbounds i32, i32* %115, i64 7
%117 = load i32, i32* %116
%118 = ashr i32 %117, 28
%119 = load i32*, i32** %3
%120 = getelementptr inbounds i32, i32* %119, i64 8
%121 = load i32, i32* %120
%122 = shl i32 %121, 4
%123 = or i32 %118, %122
%124 = load i32*, i32** %3
%125 = getelementptr inbounds i32, i32* %124, i64 7
%126 = load i32, i32* %125
%127 = load i32*, i32** %3
%128 = getelementptr inbounds i32, i32* %127, i64 7
%129 = load i32, i32* %128
%130 = load i32*, i32** %3
%131 = getelementptr inbounds i32, i32* %130, i64 6
%132 = load i32, i32* %131
%133 = ashr i32 %132, 24
%134 = load i32*, i32** %3
%135 = getelementptr inbounds i32, i32* %134, i64 7
%136 = load i32, i32* %135
%137 = shl i32 %136, 8
%138 = or i32 %133, %137
%139 = load i32*, i32** %3
%140 = getelementptr inbounds i32, i32* %139, i64 6
%141 = load i32, i32* %140
%142 = load i32*, i32** %3
%143 = getelementptr inbounds i32, i32* %142, i64 6
%144 = load i32, i32* %143
%145 = call i32 @_mm256_set_epi32(i32 %111, i32 %114, i32 %123, i32 %126, i32 %129, i32 %138, 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 20, i32 8, i32 0, i32 16, i32 4, i32 0, i32 12, i32 0)
store i32 %156, i32* %6
%157 = load i32*, i32** %3
%158 = getelementptr inbounds i32, i32* %157, i64 11
%159 = load i32, i32* %158
%160 = load i32*, i32** %3
%161 = getelementptr inbounds i32, i32* %160, i64 11
%162 = load i32, i32* %161
%163 = load i32*, i32** %3
%164 = getelementptr inbounds i32, i32* %163, i64 10
%165 = load i32, i32* %164
%166 = ashr i32 %165, 28
%167 = load i32*, i32** %3
%168 = getelementptr inbounds i32, i32* %167, i64 11
%169 = load i32, i32* %168
%170 = shl i32 %169, 4
%171 = or i32 %166, %170
%172 = load i32*, i32** %3
%173 = getelementptr inbounds i32, i32* %172, i64 10
%174 = load i32, i32* %173
%175 = load i32*, i32** %3
%176 = getelementptr inbounds i32, i32* %175, i64 10
%177 = load i32, i32* %176
%178 = load i32*, i32** %3
%179 = getelementptr inbounds i32, i32* %178, i64 9
%180 = load i32, i32* %179
%181 = ashr i32 %180, 24
%182 = load i32*, i32** %3
%183 = getelementptr inbounds i32, i32* %182, i64 10
%184 = load i32, i32* %183
%185 = shl i32 %184, 8
%186 = or i32 %181, %185
%187 = load i32*, i32** %3
%188 = getelementptr inbounds i32, i32* %187, i64 9
%189 = load i32, i32* %188
%190 = load i32*, i32** %3
%191 = getelementptr inbounds i32, i32* %190, i64 9
%192 = load i32, i32* %191
%193 = call i32 @_mm256_set_epi32(i32 %159, i32 %162, i32 %171, i32 %174, i32 %177, i32 %186, i32 %189, 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 12
store i32* %205, i32** %3
%206 = load i32*, i32** %3
ret i32* %206
}

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