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


x86 assembly (clang, -O0):
<unpack29_32_avx2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1fffffff,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,-0x20(%rbp)
xor    %r9d,%r9d
mov    %r9d,%edi
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
sar    $0xb,%edi
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
shl    $0x15,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%esi
sar    $0xe,%esi
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
shl    $0x12,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%edx
sar    $0x11,%edx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
shl    $0xf,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
sar    $0x14,%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
shl    $0xc,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%r8d
sar    $0x17,%r8d
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
shl    $0x9,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%r9d
sar    $0x1a,%r9d
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x6,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    (%rax),%r10d
sar    $0x1d,%r10d
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x3,%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)
xor    %r8d,%r8d
mov    $0x2,%r9d
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
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
sar    $0x13,%edi
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%eax
shl    $0xd,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%esi
sar    $0x16,%esi
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%eax
shl    $0xa,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%edx
sar    $0x19,%edx
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%eax
shl    $0x7,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%ecx
sar    $0x1c,%ecx
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
shl    $0x4,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%r8d
sar    $0x1f,%r8d
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
shl    $0x1,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%r9d
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%r10d
sar    $0x5,%r10d
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%eax
shl    $0x1b,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
sar    $0x8,%eax
mov    -0x8(%rbp),%r11
mov    0x20(%r11),%r11d
shl    $0x18,%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    $0x1,%edx
mov    %r9d,%edi
mov    %r9d,%esi
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
sar    $0x1b,%edi
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%eax
shl    $0x5,%eax
or     %eax,%edi
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%esi
sar    $0x1e,%esi
mov    -0x8(%rbp),%rax
mov    0x50(%rax),%eax
shl    $0x2,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%ecx
sar    $0x4,%ecx
mov    -0x8(%rbp),%rax
mov    0x4c(%rax),%eax
shl    $0x1c,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%r8d
sar    $0x7,%r8d
mov    -0x8(%rbp),%rax
mov    0x48(%rax),%eax
shl    $0x19,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%r9d
sar    $0xa,%r9d
mov    -0x8(%rbp),%rax
mov    0x44(%rax),%eax
shl    $0x16,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%r10d
sar    $0xd,%r10d
mov    -0x8(%rbp),%rax
mov    0x40(%rax),%eax
shl    $0x13,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%r11
mov    0x3c(%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    $0x3,%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    0x70(%rax),%edi
mov    -0x8(%rbp),%rax
mov    0x6c(%rax),%esi
sar    $0x6,%esi
mov    -0x8(%rbp),%rax
mov    0x70(%rax),%eax
shl    $0x1a,%eax
or     %eax,%esi
mov    -0x8(%rbp),%rax
mov    0x68(%rax),%edx
sar    $0x9,%edx
mov    -0x8(%rbp),%rax
mov    0x6c(%rax),%eax
shl    $0x17,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x64(%rax),%ecx
sar    $0xc,%ecx
mov    -0x8(%rbp),%rax
mov    0x68(%rax),%eax
shl    $0x14,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x60(%rax),%r8d
sar    $0xf,%r8d
mov    -0x8(%rbp),%rax
mov    0x64(%rax),%eax
shl    $0x11,%eax
or     %eax,%r8d
mov    -0x8(%rbp),%rax
mov    0x5c(%rax),%r9d
sar    $0x12,%r9d
mov    -0x8(%rbp),%rax
mov    0x60(%rax),%eax
shl    $0xe,%eax
or     %eax,%r9d
mov    -0x8(%rbp),%rax
mov    0x58(%rax),%r10d
sar    $0x15,%r10d
mov    -0x8(%rbp),%rax
mov    0x5c(%rax),%eax
shl    $0xb,%eax
or     %eax,%r10d
mov    -0x8(%rbp),%rax
mov    0x54(%rax),%eax
sar    $0x18,%eax
mov    -0x8(%rbp),%r11
mov    0x58(%r11),%r11d
shl    $0x8,%r11d
or     %r11d,%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1070 <_mm256_set_epi32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm256_and_si256@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <_mm256_storeu_si256@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x74,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

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

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