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


x86 assembly (clang, -O0):
<unpack28_32_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xfffffff,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    $0x4,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,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    0x14(%rax),%esi
sar    $0x8,%esi
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
shl    $0x18,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edx
sar    $0xc,%edx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
shl    $0x14,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r8d
sar    $0x14,%r8d
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0xc,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x8,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    (%rax),%r10d
sar    $0x1c,%r10d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x4,%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    $0x4,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%esi
sar    $0x8,%esi
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%eax
shl    $0x18,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%edx
sar    $0xc,%edx
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%eax
shl    $0x14,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%r8d
sar    $0x14,%r8d
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
shl    $0xc,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%eax
shl    $0x8,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%r10d
sar    $0x1c,%r10d
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%eax
shl    $0x4,%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    $0x4,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%esi
sar    $0x8,%esi
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%eax
shl    $0x18,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%edx
sar    $0xc,%edx
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%eax
shl    $0x14,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%r8d
sar    $0x14,%r8d
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%eax
shl    $0xc,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%eax
shl    $0x8,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%r10d
sar    $0x1c,%r10d
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%eax
shl    $0x4,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x38(%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    $0x4,%edi
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x6c(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x68(%rax),%esi
sar    $0x8,%esi
mov    -0x8(%rbp),%rax
mov    0x6c(%rax),%eax
shl    $0x18,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x64(%rax),%edx
sar    $0xc,%edx
mov    -0x8(%rbp),%rax
mov    0x68(%rax),%eax
shl    $0x14,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x60(%rax),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    0x64(%rax),%eax
shl    $0x10,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x5c(%rax),%r8d
sar    $0x14,%r8d
mov    -0x8(%rbp),%rax
mov    0x60(%rax),%eax
shl    $0xc,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x58(%rax),%r9d
sar    $0x18,%r9d
mov    -0x8(%rbp),%rax
mov    0x5c(%rax),%eax
shl    $0x8,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%r10d
sar    $0x1c,%r10d
mov    -0x8(%rbp),%rax
mov    0x58(%rax),%eax
shl    $0x4,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x54(%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    $0x70,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack28_32_avx2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xfffffff,%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,%r15d
mov    $0x4,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x18(%rbx),%edi
mov    0x14(%rbx),%edx
mov    %edx,%eax
sar    $0x8,%eax
mov    %edi,%esi
shl    $0x18,%esi
or     %eax,%esi
mov    0x10(%rbx),%ecx
mov    %ecx,%eax
sar    $0xc,%eax
shl    $0x14,%edx
or     %eax,%edx
mov    0xc(%rbx),%r8d
mov    %r8d,%eax
sar    $0x10,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rbx),%r9d
mov    %r9d,%eax
sar    $0x14,%eax
shl    $0xc,%r8d
or     %eax,%r8d
mov    (%rbx),%r10d
mov    0x4(%rbx),%ebp
mov    %ebp,%eax
sar    $0x18,%eax
shl    $0x8,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x1c,%eax
shl    $0x4,%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    $0x4,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x34(%rbx),%edi
mov    0x30(%rbx),%edx
mov    %edx,%eax
sar    $0x8,%eax
mov    %edi,%esi
shl    $0x18,%esi
or     %eax,%esi
mov    0x2c(%rbx),%ecx
mov    %ecx,%eax
sar    $0xc,%eax
shl    $0x14,%edx
or     %eax,%edx
mov    0x28(%rbx),%r8d
mov    %r8d,%eax
sar    $0x10,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x24(%rbx),%r9d
mov    %r9d,%eax
sar    $0x14,%eax
shl    $0xc,%r8d
or     %eax,%r8d
mov    0x1c(%rbx),%r10d
mov    0x20(%rbx),%ebp
mov    %ebp,%eax
sar    $0x18,%eax
shl    $0x8,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x1c,%eax
shl    $0x4,%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>
lea    0x40(%r14),%r12
mov    $0x4,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x50(%rbx),%edi
mov    0x4c(%rbx),%edx
mov    %edx,%eax
sar    $0x8,%eax
mov    %edi,%esi
shl    $0x18,%esi
or     %eax,%esi
mov    0x48(%rbx),%ecx
mov    %ecx,%eax
sar    $0xc,%eax
shl    $0x14,%edx
or     %eax,%edx
mov    0x44(%rbx),%r8d
mov    %r8d,%eax
sar    $0x10,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x40(%rbx),%r9d
mov    %r9d,%eax
sar    $0x14,%eax
shl    $0xc,%r8d
or     %eax,%r8d
mov    0x38(%rbx),%r10d
mov    0x3c(%rbx),%ebp
mov    %ebp,%eax
sar    $0x18,%eax
shl    $0x8,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x1c,%eax
shl    $0x4,%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    $0x4,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x6c(%rbx),%edi
mov    0x68(%rbx),%edx
mov    %edx,%eax
sar    $0x8,%eax
mov    %edi,%esi
shl    $0x18,%esi
or     %eax,%esi
mov    0x64(%rbx),%ecx
mov    %ecx,%eax
sar    $0xc,%eax
shl    $0x14,%edx
or     %eax,%edx
mov    0x60(%rbx),%r8d
mov    %r8d,%eax
sar    $0x10,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x5c(%rbx),%r9d
mov    %r9d,%eax
sar    $0x14,%eax
shl    $0xc,%r8d
or     %eax,%r8d
mov    0x54(%rbx),%r10d
mov    0x58(%rbx),%ebp
mov    %ebp,%eax
sar    $0x18,%eax
shl    $0x8,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x1c,%eax
shl    $0x4,%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>
add    $0x70,%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* @unpack28_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 268435455, 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 4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
store i32 %12, i32* %6
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 6
%15 = load i32, i32* %14
%16 = load i32*, i32** %3
%17 = getelementptr inbounds i32, i32* %16, i64 5
%18 = load i32, i32* %17
%19 = ashr i32 %18, 8
%20 = load i32*, i32** %3
%21 = getelementptr inbounds i32, i32* %20, i64 6
%22 = load i32, i32* %21
%23 = shl i32 %22, 24
%24 = or i32 %19, %23
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i64 4
%27 = load i32, i32* %26
%28 = ashr i32 %27, 12
%29 = load i32*, i32** %3
%30 = getelementptr inbounds i32, i32* %29, i64 5
%31 = load i32, i32* %30
%32 = shl i32 %31, 20
%33 = or i32 %28, %32
%34 = load i32*, i32** %3
%35 = getelementptr inbounds i32, i32* %34, i64 3
%36 = load i32, i32* %35
%37 = ashr i32 %36, 16
%38 = load i32*, i32** %3
%39 = getelementptr inbounds i32, i32* %38, i64 4
%40 = load i32, i32* %39
%41 = shl i32 %40, 16
%42 = or i32 %37, %41
%43 = load i32*, i32** %3
%44 = getelementptr inbounds i32, i32* %43, i64 2
%45 = load i32, i32* %44
%46 = ashr i32 %45, 20
%47 = load i32*, i32** %3
%48 = getelementptr inbounds i32, i32* %47, i64 3
%49 = load i32, i32* %48
%50 = shl i32 %49, 12
%51 = or i32 %46, %50
%52 = load i32*, i32** %3
%53 = getelementptr inbounds i32, i32* %52, i64 1
%54 = load i32, i32* %53
%55 = ashr i32 %54, 24
%56 = load i32*, i32** %3
%57 = getelementptr inbounds i32, i32* %56, i64 2
%58 = load i32, i32* %57
%59 = shl i32 %58, 8
%60 = or i32 %55, %59
%61 = load i32*, i32** %3
%62 = getelementptr inbounds i32, i32* %61, i64 0
%63 = load i32, i32* %62
%64 = ashr i32 %63, 28
%65 = load i32*, i32** %3
%66 = getelementptr inbounds i32, i32* %65, i64 1
%67 = load i32, i32* %66
%68 = shl i32 %67, 4
%69 = or i32 %64, %68
%70 = load i32*, i32** %3
%71 = getelementptr inbounds i32, i32* %70, i64 0
%72 = load i32, i32* %71
%73 = call i32 @_mm256_set_epi32(i32 %15, i32 %24, i32 %33, i32 %42, i32 %51, i32 %60, i32 %69, i32 %72)
store i32 %73, i32* %7
%74 = load i32, i32* %7
%75 = load i32, i32* %6
%76 = call i32 @_mm256_srlv_epi32(i32 %74, i32 %75)
%77 = load i32, i32* %8
%78 = call i32 @_mm256_and_si256(i32 %76, i32 %77)
store i32 %78, i32* %9
%79 = load i32*, i32** %4
%80 = load i32, i32* %9
%81 = call i32 @_mm256_storeu_si256(i32* %79, i32 %80)
%82 = load i32*, i32** %4
%83 = getelementptr inbounds i32, i32* %82, i64 8
store i32* %83, i32** %4
%84 = call i32 @_mm256_set_epi32(i32 4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
store i32 %84, i32* %6
%85 = load i32*, i32** %3
%86 = getelementptr inbounds i32, i32* %85, i64 13
%87 = load i32, i32* %86
%88 = load i32*, i32** %3
%89 = getelementptr inbounds i32, i32* %88, i64 12
%90 = load i32, i32* %89
%91 = ashr i32 %90, 8
%92 = load i32*, i32** %3
%93 = getelementptr inbounds i32, i32* %92, i64 13
%94 = load i32, i32* %93
%95 = shl i32 %94, 24
%96 = or i32 %91, %95
%97 = load i32*, i32** %3
%98 = getelementptr inbounds i32, i32* %97, i64 11
%99 = load i32, i32* %98
%100 = ashr i32 %99, 12
%101 = load i32*, i32** %3
%102 = getelementptr inbounds i32, i32* %101, i64 12
%103 = load i32, i32* %102
%104 = shl i32 %103, 20
%105 = or i32 %100, %104
%106 = load i32*, i32** %3
%107 = getelementptr inbounds i32, i32* %106, i64 10
%108 = load i32, i32* %107
%109 = ashr i32 %108, 16
%110 = load i32*, i32** %3
%111 = getelementptr inbounds i32, i32* %110, i64 11
%112 = load i32, i32* %111
%113 = shl i32 %112, 16
%114 = or i32 %109, %113
%115 = load i32*, i32** %3
%116 = getelementptr inbounds i32, i32* %115, i64 9
%117 = load i32, i32* %116
%118 = ashr i32 %117, 20
%119 = load i32*, i32** %3
%120 = getelementptr inbounds i32, i32* %119, i64 10
%121 = load i32, i32* %120
%122 = shl i32 %121, 12
%123 = or i32 %118, %122
%124 = load i32*, i32** %3
%125 = getelementptr inbounds i32, i32* %124, i64 8
%126 = load i32, i32* %125
%127 = ashr i32 %126, 24
%128 = load i32*, i32** %3
%129 = getelementptr inbounds i32, i32* %128, i64 9
%130 = load i32, i32* %129
%131 = shl i32 %130, 8
%132 = or i32 %127, %131
%133 = load i32*, i32** %3
%134 = getelementptr inbounds i32, i32* %133, i64 7
%135 = load i32, i32* %134
%136 = ashr i32 %135, 28
%137 = load i32*, i32** %3
%138 = getelementptr inbounds i32, i32* %137, i64 8
%139 = load i32, i32* %138
%140 = shl i32 %139, 4
%141 = or i32 %136, %140
%142 = load i32*, i32** %3
%143 = getelementptr inbounds i32, i32* %142, i64 7
%144 = load i32, i32* %143
%145 = call i32 @_mm256_set_epi32(i32 %87, i32 %96, i32 %105, i32 %114, i32 %123, 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 4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
store i32 %156, i32* %6
%157 = load i32*, i32** %3
%158 = getelementptr inbounds i32, i32* %157, i64 20
%159 = load i32, i32* %158
%160 = load i32*, i32** %3
%161 = getelementptr inbounds i32, i32* %160, i64 19
%162 = load i32, i32* %161
%163 = ashr i32 %162, 8
%164 = load i32*, i32** %3
%165 = getelementptr inbounds i32, i32* %164, i64 20
%166 = load i32, i32* %165
%167 = shl i32 %166, 24
%168 = or i32 %163, %167
%169 = load i32*, i32** %3
%170 = getelementptr inbounds i32, i32* %169, i64 18
%171 = load i32, i32* %170
%172 = ashr i32 %171, 12
%173 = load i32*, i32** %3
%174 = getelementptr inbounds i32, i32* %173, i64 19
%175 = load i32, i32* %174
%176 = shl i32 %175, 20
%177 = or i32 %172, %176
%178 = load i32*, i32** %3
%179 = getelementptr inbounds i32, i32* %178, i64 17
%180 = load i32, i32* %179
%181 = ashr i32 %180, 16
%182 = load i32*, i32** %3
%183 = getelementptr inbounds i32, i32* %182, i64 18
%184 = load i32, i32* %183
%185 = shl i32 %184, 16
%186 = or i32 %181, %185
%187 = load i32*, i32** %3
%188 = getelementptr inbounds i32, i32* %187, i64 16
%189 = load i32, i32* %188
%190 = ashr i32 %189, 20
%191 = load i32*, i32** %3
%192 = getelementptr inbounds i32, i32* %191, i64 17
%193 = load i32, i32* %192
%194 = shl i32 %193, 12
%195 = or i32 %190, %194
%196 = load i32*, i32** %3
%197 = getelementptr inbounds i32, i32* %196, i64 15
%198 = load i32, i32* %197
%199 = ashr i32 %198, 24
%200 = load i32*, i32** %3
%201 = getelementptr inbounds i32, i32* %200, i64 16
%202 = load i32, i32* %201
%203 = shl i32 %202, 8
%204 = or i32 %199, %203
%205 = load i32*, i32** %3
%206 = getelementptr inbounds i32, i32* %205, i64 14
%207 = load i32, i32* %206
%208 = ashr i32 %207, 28
%209 = load i32*, i32** %3
%210 = getelementptr inbounds i32, i32* %209, i64 15
%211 = load i32, i32* %210
%212 = shl i32 %211, 4
%213 = or i32 %208, %212
%214 = load i32*, i32** %3
%215 = getelementptr inbounds i32, i32* %214, i64 14
%216 = load i32, i32* %215
%217 = call i32 @_mm256_set_epi32(i32 %159, i32 %168, i32 %177, i32 %186, i32 %195, i32 %204, i32 %213, i32 %216)
store i32 %217, i32* %7
%218 = load i32, i32* %7
%219 = load i32, i32* %6
%220 = call i32 @_mm256_srlv_epi32(i32 %218, i32 %219)
%221 = load i32, i32* %8
%222 = call i32 @_mm256_and_si256(i32 %220, i32 %221)
store i32 %222, i32* %9
%223 = load i32*, i32** %4
%224 = load i32, i32* %9
%225 = call i32 @_mm256_storeu_si256(i32* %223, i32 %224)
%226 = load i32*, i32** %4
%227 = getelementptr inbounds i32, i32* %226, i64 8
store i32* %227, i32** %4
%228 = call i32 @_mm256_set_epi32(i32 4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
store i32 %228, i32* %6
%229 = load i32*, i32** %3
%230 = getelementptr inbounds i32, i32* %229, i64 27
%231 = load i32, i32* %230
%232 = load i32*, i32** %3
%233 = getelementptr inbounds i32, i32* %232, i64 26
%234 = load i32, i32* %233
%235 = ashr i32 %234, 8
%236 = load i32*, i32** %3
%237 = getelementptr inbounds i32, i32* %236, i64 27
%238 = load i32, i32* %237
%239 = shl i32 %238, 24
%240 = or i32 %235, %239
%241 = load i32*, i32** %3
%242 = getelementptr inbounds i32, i32* %241, i64 25
%243 = load i32, i32* %242
%244 = ashr i32 %243, 12
%245 = load i32*, i32** %3
%246 = getelementptr inbounds i32, i32* %245, i64 26
%247 = load i32, i32* %246
%248 = shl i32 %247, 20
%249 = or i32 %244, %248
%250 = load i32*, i32** %3
%251 = getelementptr inbounds i32, i32* %250, i64 24
%252 = load i32, i32* %251
%253 = ashr i32 %252, 16
%254 = load i32*, i32** %3
%255 = getelementptr inbounds i32, i32* %254, i64 25
%256 = load i32, i32* %255
%257 = shl i32 %256, 16
%258 = or i32 %253, %257
%259 = load i32*, i32** %3
%260 = getelementptr inbounds i32, i32* %259, i64 23
%261 = load i32, i32* %260
%262 = ashr i32 %261, 20
%263 = load i32*, i32** %3
%264 = getelementptr inbounds i32, i32* %263, i64 24
%265 = load i32, i32* %264
%266 = shl i32 %265, 12
%267 = or i32 %262, %266
%268 = load i32*, i32** %3
%269 = getelementptr inbounds i32, i32* %268, i64 22
%270 = load i32, i32* %269
%271 = ashr i32 %270, 24
%272 = load i32*, i32** %3
%273 = getelementptr inbounds i32, i32* %272, i64 23
%274 = load i32, i32* %273
%275 = shl i32 %274, 8
%276 = or i32 %271, %275
%277 = load i32*, i32** %3
%278 = getelementptr inbounds i32, i32* %277, i64 21
%279 = load i32, i32* %278
%280 = ashr i32 %279, 28
%281 = load i32*, i32** %3
%282 = getelementptr inbounds i32, i32* %281, i64 22
%283 = load i32, i32* %282
%284 = shl i32 %283, 4
%285 = or i32 %280, %284
%286 = load i32*, i32** %3
%287 = getelementptr inbounds i32, i32* %286, i64 21
%288 = load i32, i32* %287
%289 = call i32 @_mm256_set_epi32(i32 %231, i32 %240, i32 %249, i32 %258, i32 %267, i32 %276, i32 %285, i32 %288)
store i32 %289, i32* %7
%290 = load i32, i32* %7
%291 = load i32, i32* %6
%292 = call i32 @_mm256_srlv_epi32(i32 %290, i32 %291)
%293 = load i32, i32* %8
%294 = call i32 @_mm256_and_si256(i32 %292, i32 %293)
store i32 %294, i32* %9
%295 = load i32*, i32** %4
%296 = load i32, i32* %9
%297 = call i32 @_mm256_storeu_si256(i32* %295, i32 %296)
%298 = load i32*, i32** %4
%299 = getelementptr inbounds i32, i32* %298, i64 8
store i32* %299, i32** %4
%300 = load i32*, i32** %3
%301 = getelementptr inbounds i32, i32* %300, i64 28
store i32* %301, i32** %3
%302 = load i32*, i32** %3
ret i32* %302
}

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