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


x86 assembly (clang, -O0):
<unpack22_32_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3fffff,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,-0x20(%rbp)
xor    %r9d,%r9d
mov    $0x4,%esi
mov    $0x2,%r8d
mov    %r9d,%edi
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    0x10(%rax),%edi
sar    $0x1a,%edi
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
shl    $0x6,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%edx
sar    $0xe,%edx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
shl    $0x12,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r9d
sar    $0xc,%r9d
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x14,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    (%rax),%r10d
sar    $0x16,%r10d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0xa,%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)
mov    $0xa,%edi
xor    %r9d,%r9d
mov    $0x8,%ecx
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
movl   $0x6,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%esi
sar    $0x14,%esi
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
shl    $0xc,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%edx
sar    $0x1e,%edx
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%eax
shl    $0x2,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r8d
sar    $0x12,%r8d
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%eax
shl    $0xe,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%r9d
sar    $0x1c,%r9d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
shl    $0x4,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%r11
mov    0x18(%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)
xor    %r9d,%r9d
mov    $0x4,%esi
mov    $0x2,%r8d
mov    %r9d,%edi
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    0x3c(%rax),%edi
sar    $0x1a,%edi
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%eax
shl    $0x6,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%edx
sar    $0xe,%edx
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%eax
shl    $0x12,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%r8d
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%r9d
sar    $0xc,%r9d
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%eax
shl    $0x14,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%r10d
sar    $0x16,%r10d
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%eax
shl    $0xa,%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    $0xa,%edi
xor    %r9d,%r9d
mov    $0x8,%ecx
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%r8d
movl   $0x6,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%esi
sar    $0x14,%esi
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%eax
shl    $0xc,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%edx
sar    $0x1e,%edx
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%eax
shl    $0x2,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%r8d
sar    $0x12,%r8d
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%eax
shl    $0xe,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%r9d
sar    $0x1c,%r9d
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%eax
shl    $0x4,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%r10d
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%r11
mov    0x44(%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    -0x8(%rbp),%rax
add    $0x58,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack22_32_avx2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x3fffff,%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,%r15d
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x2,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x10(%rbx),%esi
mov    %esi,%eax
sar    $0x1a,%eax
mov    0x14(%rbx),%edi
shl    $0x6,%edi
or     %eax,%edi
mov    0xc(%rbx),%ecx
mov    %ecx,%eax
sar    $0xe,%eax
mov    %esi,%edx
shl    $0x12,%edx
or     %eax,%edx
mov    0x8(%rbx),%r8d
mov    %r8d,%eax
sar    $0x18,%eax
shl    $0x8,%ecx
or     %eax,%ecx
mov    (%rbx),%r10d
mov    0x4(%rbx),%ebp
mov    %ebp,%eax
sar    $0xc,%eax
mov    %r8d,%r9d
shl    $0x14,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x16,%eax
shl    $0xa,%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    %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    $0xa,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x6
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x28(%rbx),%edi
mov    0x24(%rbx),%edx
mov    %edx,%eax
sar    $0x14,%eax
mov    %edi,%esi
shl    $0xc,%esi
or     %eax,%esi
mov    0x20(%rbx),%ecx
mov    %ecx,%eax
sar    $0x1e,%eax
shl    $0x2,%edx
or     %eax,%edx
mov    0x18(%rbx),%r10d
mov    0x1c(%rbx),%r9d
mov    %r9d,%ebp
sar    $0x12,%ebp
mov    %ecx,%r8d
shl    $0xe,%r8d
or     %ebp,%r8d
mov    %r10d,%ebp
sar    $0x1c,%ebp
shl    $0x4,%r9d
or     %ebp,%r9d
movswl 0x16(%rbx),%ebp
mov    %r10d,%eax
shl    $0x10,%eax
or     %ebp,%eax
push   %rax
push   %r10
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>
lea    0x40(%r14),%r12
xor    %edi,%edi
mov    $0x4,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x2,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x3c(%rbx),%esi
mov    %esi,%eax
sar    $0x1a,%eax
mov    0x40(%rbx),%edi
shl    $0x6,%edi
or     %eax,%edi
mov    0x38(%rbx),%ecx
mov    %ecx,%eax
sar    $0xe,%eax
mov    %esi,%edx
shl    $0x12,%edx
or     %eax,%edx
mov    0x34(%rbx),%r8d
mov    %r8d,%eax
sar    $0x18,%eax
shl    $0x8,%ecx
or     %eax,%ecx
mov    0x2c(%rbx),%r10d
mov    0x30(%rbx),%ebp
mov    %ebp,%eax
sar    $0xc,%eax
mov    %r8d,%r9d
shl    $0x14,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x16,%eax
shl    $0xa,%ebp
or     %eax,%ebp
push   %r10
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    $0xa,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x6
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x54(%rbx),%edi
mov    0x50(%rbx),%edx
mov    %edx,%eax
sar    $0x14,%eax
mov    %edi,%esi
shl    $0xc,%esi
or     %eax,%esi
mov    0x4c(%rbx),%ecx
mov    %ecx,%eax
sar    $0x1e,%eax
shl    $0x2,%edx
or     %eax,%edx
mov    0x44(%rbx),%r10d
mov    0x48(%rbx),%r9d
mov    %r9d,%ebp
sar    $0x12,%ebp
mov    %ecx,%r8d
shl    $0xe,%r8d
or     %ebp,%r8d
mov    %r10d,%ebp
sar    $0x1c,%ebp
shl    $0x4,%r9d
or     %ebp,%r9d
movswl 0x42(%rbx),%ebp
mov    %r10d,%eax
shl    $0x10,%eax
or     %ebp,%eax
push   %rax
push   %r10
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    $0x58,%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* @unpack22_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 4194303, 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 4, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0)
store i32 %12, i32* %6
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 4
%15 = load i32, i32* %14
%16 = ashr i32 %15, 26
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 5
%19 = load i32, i32* %18
%20 = shl i32 %19, 6
%21 = or i32 %16, %20
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 4
%24 = load i32, i32* %23
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 3
%27 = load i32, i32* %26
%28 = ashr i32 %27, 14
%29 = load i32*, i32** %3
%30 = getelementptr inbounds i32, i32* %29, i64 4
%31 = load i32, i32* %30
%32 = shl i32 %31, 18
%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, 24
%38 = load i32*, i32** %3
%39 = getelementptr inbounds i32, i32* %38, i64 3
%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 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, 12
%50 = load i32*, i32** %3
%51 = getelementptr inbounds i32, i32* %50, i64 2
%52 = load i32, i32* %51
%53 = shl i32 %52, 20
%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, 22
%59 = load i32*, i32** %3
%60 = getelementptr inbounds i32, i32* %59, i64 1
%61 = load i32, i32* %60
%62 = shl i32 %61, 10
%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 %21, 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 10, i32 0, i32 0, i32 8, i32 0, i32 0, i32 6, 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 = load i32*, i32** %3
%83 = getelementptr inbounds i32, i32* %82, i64 9
%84 = load i32, i32* %83
%85 = ashr i32 %84, 20
%86 = load i32*, i32** %3
%87 = getelementptr inbounds i32, i32* %86, i64 10
%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 8
%93 = load i32, i32* %92
%94 = ashr i32 %93, 30
%95 = load i32*, i32** %3
%96 = getelementptr inbounds i32, i32* %95, i64 9
%97 = load i32, i32* %96
%98 = shl i32 %97, 2
%99 = or i32 %94, %98
%100 = load i32*, i32** %3
%101 = getelementptr inbounds i32, i32* %100, i64 8
%102 = load i32, i32* %101
%103 = load i32*, i32** %3
%104 = getelementptr inbounds i32, i32* %103, i64 7
%105 = load i32, i32* %104
%106 = ashr i32 %105, 18
%107 = load i32*, i32** %3
%108 = getelementptr inbounds i32, i32* %107, i64 8
%109 = load i32, i32* %108
%110 = shl i32 %109, 14
%111 = or i32 %106, %110
%112 = load i32*, i32** %3
%113 = getelementptr inbounds i32, i32* %112, i64 6
%114 = load i32, i32* %113
%115 = ashr i32 %114, 28
%116 = load i32*, i32** %3
%117 = getelementptr inbounds i32, i32* %116, i64 7
%118 = load i32, i32* %117
%119 = shl i32 %118, 4
%120 = or i32 %115, %119
%121 = load i32*, i32** %3
%122 = getelementptr inbounds i32, i32* %121, i64 6
%123 = load i32, i32* %122
%124 = load i32*, i32** %3
%125 = getelementptr inbounds i32, i32* %124, i64 5
%126 = load i32, i32* %125
%127 = ashr i32 %126, 16
%128 = load i32*, i32** %3
%129 = getelementptr inbounds i32, i32* %128, i64 6
%130 = load i32, i32* %129
%131 = shl i32 %130, 16
%132 = or i32 %127, %131
%133 = call i32 @_mm256_set_epi32(i32 %81, i32 %90, i32 %99, i32 %102, i32 %111, i32 %120, i32 %123, i32 %132)
store i32 %133, i32* %7
%134 = load i32, i32* %7
%135 = load i32, i32* %6
%136 = call i32 @_mm256_srlv_epi32(i32 %134, i32 %135)
%137 = load i32, i32* %8
%138 = call i32 @_mm256_and_si256(i32 %136, i32 %137)
store i32 %138, i32* %9
%139 = load i32*, i32** %4
%140 = load i32, i32* %9
%141 = call i32 @_mm256_storeu_si256(i32* %139, i32 %140)
%142 = load i32*, i32** %4
%143 = getelementptr inbounds i32, i32* %142, i64 8
store i32* %143, i32** %4
%144 = call i32 @_mm256_set_epi32(i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0)
store i32 %144, i32* %6
%145 = load i32*, i32** %3
%146 = getelementptr inbounds i32, i32* %145, i64 15
%147 = load i32, i32* %146
%148 = ashr i32 %147, 26
%149 = load i32*, i32** %3
%150 = getelementptr inbounds i32, i32* %149, i64 16
%151 = load i32, i32* %150
%152 = shl i32 %151, 6
%153 = or i32 %148, %152
%154 = load i32*, i32** %3
%155 = getelementptr inbounds i32, i32* %154, i64 15
%156 = load i32, i32* %155
%157 = load i32*, i32** %3
%158 = getelementptr inbounds i32, i32* %157, i64 14
%159 = load i32, i32* %158
%160 = ashr i32 %159, 14
%161 = load i32*, i32** %3
%162 = getelementptr inbounds i32, i32* %161, i64 15
%163 = load i32, i32* %162
%164 = shl i32 %163, 18
%165 = or i32 %160, %164
%166 = load i32*, i32** %3
%167 = getelementptr inbounds i32, i32* %166, i64 13
%168 = load i32, i32* %167
%169 = ashr i32 %168, 24
%170 = load i32*, i32** %3
%171 = getelementptr inbounds i32, i32* %170, i64 14
%172 = load i32, i32* %171
%173 = shl i32 %172, 8
%174 = or i32 %169, %173
%175 = load i32*, i32** %3
%176 = getelementptr inbounds i32, i32* %175, i64 13
%177 = load i32, i32* %176
%178 = load i32*, i32** %3
%179 = getelementptr inbounds i32, i32* %178, i64 12
%180 = load i32, i32* %179
%181 = ashr i32 %180, 12
%182 = load i32*, i32** %3
%183 = getelementptr inbounds i32, i32* %182, i64 13
%184 = load i32, i32* %183
%185 = shl i32 %184, 20
%186 = or i32 %181, %185
%187 = load i32*, i32** %3
%188 = getelementptr inbounds i32, i32* %187, i64 11
%189 = load i32, i32* %188
%190 = ashr i32 %189, 22
%191 = load i32*, i32** %3
%192 = getelementptr inbounds i32, i32* %191, i64 12
%193 = load i32, i32* %192
%194 = shl i32 %193, 10
%195 = or i32 %190, %194
%196 = load i32*, i32** %3
%197 = getelementptr inbounds i32, i32* %196, i64 11
%198 = load i32, i32* %197
%199 = call i32 @_mm256_set_epi32(i32 %153, i32 %156, i32 %165, i32 %174, i32 %177, i32 %186, i32 %195, i32 %198)
store i32 %199, i32* %7
%200 = load i32, i32* %7
%201 = load i32, i32* %6
%202 = call i32 @_mm256_srlv_epi32(i32 %200, i32 %201)
%203 = load i32, i32* %8
%204 = call i32 @_mm256_and_si256(i32 %202, i32 %203)
store i32 %204, i32* %9
%205 = load i32*, i32** %4
%206 = load i32, i32* %9
%207 = call i32 @_mm256_storeu_si256(i32* %205, i32 %206)
%208 = load i32*, i32** %4
%209 = getelementptr inbounds i32, i32* %208, i64 8
store i32* %209, i32** %4
%210 = call i32 @_mm256_set_epi32(i32 10, i32 0, i32 0, i32 8, i32 0, i32 0, i32 6, i32 0)
store i32 %210, i32* %6
%211 = load i32*, i32** %3
%212 = getelementptr inbounds i32, i32* %211, i64 21
%213 = load i32, i32* %212
%214 = load i32*, i32** %3
%215 = getelementptr inbounds i32, i32* %214, i64 20
%216 = load i32, i32* %215
%217 = ashr i32 %216, 20
%218 = load i32*, i32** %3
%219 = getelementptr inbounds i32, i32* %218, i64 21
%220 = load i32, i32* %219
%221 = shl i32 %220, 12
%222 = or i32 %217, %221
%223 = load i32*, i32** %3
%224 = getelementptr inbounds i32, i32* %223, i64 19
%225 = load i32, i32* %224
%226 = ashr i32 %225, 30
%227 = load i32*, i32** %3
%228 = getelementptr inbounds i32, i32* %227, i64 20
%229 = load i32, i32* %228
%230 = shl i32 %229, 2
%231 = or i32 %226, %230
%232 = load i32*, i32** %3
%233 = getelementptr inbounds i32, i32* %232, i64 19
%234 = load i32, i32* %233
%235 = load i32*, i32** %3
%236 = getelementptr inbounds i32, i32* %235, i64 18
%237 = load i32, i32* %236
%238 = ashr i32 %237, 18
%239 = load i32*, i32** %3
%240 = getelementptr inbounds i32, i32* %239, i64 19
%241 = load i32, i32* %240
%242 = shl i32 %241, 14
%243 = or i32 %238, %242
%244 = load i32*, i32** %3
%245 = getelementptr inbounds i32, i32* %244, i64 17
%246 = load i32, i32* %245
%247 = ashr i32 %246, 28
%248 = load i32*, i32** %3
%249 = getelementptr inbounds i32, i32* %248, i64 18
%250 = load i32, i32* %249
%251 = shl i32 %250, 4
%252 = or i32 %247, %251
%253 = load i32*, i32** %3
%254 = getelementptr inbounds i32, i32* %253, i64 17
%255 = load i32, i32* %254
%256 = load i32*, i32** %3
%257 = getelementptr inbounds i32, i32* %256, i64 16
%258 = load i32, i32* %257
%259 = ashr i32 %258, 16
%260 = load i32*, i32** %3
%261 = getelementptr inbounds i32, i32* %260, i64 17
%262 = load i32, i32* %261
%263 = shl i32 %262, 16
%264 = or i32 %259, %263
%265 = call i32 @_mm256_set_epi32(i32 %213, i32 %222, i32 %231, i32 %234, i32 %243, i32 %252, i32 %255, i32 %264)
store i32 %265, i32* %7
%266 = load i32, i32* %7
%267 = load i32, i32* %6
%268 = call i32 @_mm256_srlv_epi32(i32 %266, i32 %267)
%269 = load i32, i32* %8
%270 = call i32 @_mm256_and_si256(i32 %268, i32 %269)
store i32 %270, i32* %9
%271 = load i32*, i32** %4
%272 = load i32, i32* %9
%273 = call i32 @_mm256_storeu_si256(i32* %271, i32 %272)
%274 = load i32*, i32** %4
%275 = getelementptr inbounds i32, i32* %274, i64 8
store i32* %275, i32** %4
%276 = load i32*, i32** %3
%277 = getelementptr inbounds i32, i32* %276, i64 22
store i32* %277, i32** %3
%278 = load i32*, i32** %3
ret i32* %278
}

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