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


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

x86 assembly (clang, -O2):
<unpack25_32_avx2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r13
mov    %rdi,%r15
mov    $0x1ffffff,%edi
call   1050 <_mm256_set1_epi32@plt>
mov    %eax,%r14d
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x14(%r15),%esi
mov    %esi,%eax
sar    $0xf,%eax
mov    0x18(%r15),%edi
shl    $0x11,%edi
or     %eax,%edi
mov    0x10(%r15),%edx
mov    %edx,%eax
sar    $0x16,%eax
shl    $0xa,%esi
or     %eax,%esi
mov    0xc(%r15),%ecx
mov    %ecx,%eax
sar    $0x1d,%eax
shl    $0x3,%edx
or     %eax,%edx
mov    0x8(%r15),%r9d
mov    %r9d,%eax
sar    $0xb,%eax
mov    %ecx,%r8d
shl    $0x15,%r8d
or     %eax,%r8d
mov    (%r15),%r10d
mov    0x4(%r15),%ebp
mov    %ebp,%eax
sar    $0x12,%eax
shl    $0xe,%r9d
or     %eax,%r9d
mov    %r10d,%eax
sar    $0x19,%eax
shl    $0x7,%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
mov    $0x5,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x1
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r13d
mov    0x2c(%r15),%esi
mov    %esi,%eax
sar    $0x17,%eax
mov    0x30(%r15),%edi
shl    $0x9,%edi
or     %eax,%edi
mov    0x28(%r15),%edx
mov    %edx,%eax
sar    $0x1e,%eax
shl    $0x2,%esi
or     %eax,%esi
mov    0x24(%r15),%r8d
mov    %r8d,%eax
sar    $0xc,%eax
mov    %edx,%ecx
shl    $0x14,%ecx
or     %eax,%ecx
mov    0x20(%r15),%r9d
mov    %r9d,%eax
sar    $0x13,%eax
shl    $0xd,%r8d
or     %eax,%r8d
mov    0x18(%r15),%eax
mov    0x1c(%r15),%r10d
mov    %r10d,%ebx
sar    $0x1a,%ebx
shl    $0x6,%r9d
or     %ebx,%r9d
sar    $0x8,%eax
mov    %r10d,%ebp
shl    $0x18,%ebp
or     %eax,%ebp
push   %rbp
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    %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
mov    $0x6,%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    0x44(%r15),%esi
mov    %esi,%eax
sar    $0x1f,%eax
mov    0x48(%r15),%edi
add    %edi,%edi
or     %eax,%edi
mov    0x40(%r15),%ecx
mov    %ecx,%eax
sar    $0xd,%eax
mov    %esi,%edx
shl    $0x13,%edx
or     %eax,%edx
mov    0x3c(%r15),%r8d
mov    %r8d,%eax
sar    $0x14,%eax
shl    $0xc,%ecx
or     %eax,%ecx
mov    0x34(%r15),%eax
mov    0x38(%r15),%r9d
mov    %r9d,%ebx
sar    $0x1b,%ebx
shl    $0x5,%r8d
or     %ebx,%r8d
mov    %eax,%ebx
sar    $0x9,%ebx
mov    %r9d,%ebp
shl    $0x17,%ebp
or     %ebx,%ebp
movswl 0x32(%r15),%ebx
shl    $0x10,%eax
or     %ebx,%eax
push   %rax
push   %rbp
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%edi
mov    %r13d,%esi
call   1060 <_mm256_srlv_epi32@plt>
mov    %eax,%edi
mov    0xc(%rsp),%r13d
mov    %r13d,%esi
call   1040 <_mm256_and_si256@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1030 <_mm256_storeu_si256@plt>
add    $0x60,%r14
mov    $0x7,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x3,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1070 <_mm256_set_epi32@plt>
add    $0x10,%rsp
mov    %eax,%r12d
mov    0x60(%r15),%edi
mov    0x5c(%r15),%edx
mov    %edx,%eax
sar    $0xe,%eax
mov    %edi,%esi
shl    $0x12,%esi
or     %eax,%esi
mov    0x58(%r15),%ecx
mov    %ecx,%eax
sar    $0x15,%eax
shl    $0xb,%edx
or     %eax,%edx
mov    0x54(%r15),%r8d
mov    %r8d,%eax
sar    $0x1c,%eax
shl    $0x4,%ecx
or     %eax,%ecx
mov    0x4c(%r15),%eax
mov    0x50(%r15),%ebx
mov    %ebx,%ebp
sar    $0xa,%ebp
mov    %r8d,%r9d
shl    $0x16,%r9d
or     %ebp,%r9d
mov    %eax,%ebp
sar    $0x11,%ebp
shl    $0xf,%ebx
or     %ebp,%ebx
movsbl 0x4b(%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    $0x64,%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* @unpack25_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 33554431, 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 4, 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 5
%15 = load i32, i32* %14
%16 = ashr i32 %15, 15
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 6
%19 = load i32, i32* %18
%20 = shl i32 %19, 17
%21 = or i32 %16, %20
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 4
%24 = load i32, i32* %23
%25 = ashr i32 %24, 22
%26 = load i32*, i32** %3
%27 = getelementptr inbounds i32, i32* %26, i64 5
%28 = load i32, i32* %27
%29 = shl i32 %28, 10
%30 = or i32 %25, %29
%31 = load i32*, i32** %3
%32 = getelementptr inbounds i32, i32* %31, i64 3
%33 = load i32, i32* %32
%34 = ashr i32 %33, 29
%35 = load i32*, i32** %3
%36 = getelementptr inbounds i32, i32* %35, i64 4
%37 = load i32, i32* %36
%38 = shl i32 %37, 3
%39 = or i32 %34, %38
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i64 3
%42 = load i32, i32* %41
%43 = load i32*, i32** %3
%44 = getelementptr inbounds i32, i32* %43, i64 2
%45 = load i32, i32* %44
%46 = ashr i32 %45, 11
%47 = load i32*, i32** %3
%48 = getelementptr inbounds i32, i32* %47, i64 3
%49 = load i32, i32* %48
%50 = shl i32 %49, 21
%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, 18
%56 = load i32*, i32** %3
%57 = getelementptr inbounds i32, i32* %56, i64 2
%58 = load i32, i32* %57
%59 = shl i32 %58, 14
%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, 25
%65 = load i32*, i32** %3
%66 = getelementptr inbounds i32, i32* %65, i64 1
%67 = load i32, i32* %66
%68 = shl i32 %67, 7
%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 %21, i32 %30, i32 %39, 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 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 1, i32 0)
store i32 %84, i32* %6
%85 = load i32*, i32** %3
%86 = getelementptr inbounds i32, i32* %85, i64 11
%87 = load i32, i32* %86
%88 = ashr i32 %87, 23
%89 = load i32*, i32** %3
%90 = getelementptr inbounds i32, i32* %89, i64 12
%91 = load i32, i32* %90
%92 = shl i32 %91, 9
%93 = or i32 %88, %92
%94 = load i32*, i32** %3
%95 = getelementptr inbounds i32, i32* %94, i64 10
%96 = load i32, i32* %95
%97 = ashr i32 %96, 30
%98 = load i32*, i32** %3
%99 = getelementptr inbounds i32, i32* %98, i64 11
%100 = load i32, i32* %99
%101 = shl i32 %100, 2
%102 = or i32 %97, %101
%103 = load i32*, i32** %3
%104 = getelementptr inbounds i32, i32* %103, i64 10
%105 = load i32, i32* %104
%106 = load i32*, i32** %3
%107 = getelementptr inbounds i32, i32* %106, i64 9
%108 = load i32, i32* %107
%109 = ashr i32 %108, 12
%110 = load i32*, i32** %3
%111 = getelementptr inbounds i32, i32* %110, i64 10
%112 = load i32, i32* %111
%113 = shl i32 %112, 20
%114 = or i32 %109, %113
%115 = load i32*, i32** %3
%116 = getelementptr inbounds i32, i32* %115, i64 8
%117 = load i32, i32* %116
%118 = ashr i32 %117, 19
%119 = load i32*, i32** %3
%120 = getelementptr inbounds i32, i32* %119, i64 9
%121 = load i32, i32* %120
%122 = shl i32 %121, 13
%123 = or i32 %118, %122
%124 = load i32*, i32** %3
%125 = getelementptr inbounds i32, i32* %124, i64 7
%126 = load i32, i32* %125
%127 = ashr i32 %126, 26
%128 = load i32*, i32** %3
%129 = getelementptr inbounds i32, i32* %128, i64 8
%130 = load i32, i32* %129
%131 = shl i32 %130, 6
%132 = or i32 %127, %131
%133 = load i32*, i32** %3
%134 = getelementptr inbounds i32, i32* %133, i64 7
%135 = load i32, i32* %134
%136 = load i32*, i32** %3
%137 = getelementptr inbounds i32, i32* %136, i64 6
%138 = load i32, i32* %137
%139 = ashr i32 %138, 8
%140 = load i32*, i32** %3
%141 = getelementptr inbounds i32, i32* %140, i64 7
%142 = load i32, i32* %141
%143 = shl i32 %142, 24
%144 = or i32 %139, %143
%145 = call i32 @_mm256_set_epi32(i32 %93, i32 %102, i32 %105, i32 %114, i32 %123, i32 %132, i32 %135, 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 0, i32 6, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0)
store i32 %156, i32* %6
%157 = load i32*, i32** %3
%158 = getelementptr inbounds i32, i32* %157, i64 17
%159 = load i32, i32* %158
%160 = ashr i32 %159, 31
%161 = load i32*, i32** %3
%162 = getelementptr inbounds i32, i32* %161, i64 18
%163 = load i32, i32* %162
%164 = shl i32 %163, 1
%165 = or i32 %160, %164
%166 = load i32*, i32** %3
%167 = getelementptr inbounds i32, i32* %166, i64 17
%168 = load i32, i32* %167
%169 = load i32*, i32** %3
%170 = getelementptr inbounds i32, i32* %169, i64 16
%171 = load i32, i32* %170
%172 = ashr i32 %171, 13
%173 = load i32*, i32** %3
%174 = getelementptr inbounds i32, i32* %173, i64 17
%175 = load i32, i32* %174
%176 = shl i32 %175, 19
%177 = or i32 %172, %176
%178 = load i32*, i32** %3
%179 = getelementptr inbounds i32, i32* %178, i64 15
%180 = load i32, i32* %179
%181 = ashr i32 %180, 20
%182 = load i32*, i32** %3
%183 = getelementptr inbounds i32, i32* %182, i64 16
%184 = load i32, i32* %183
%185 = shl i32 %184, 12
%186 = or i32 %181, %185
%187 = load i32*, i32** %3
%188 = getelementptr inbounds i32, i32* %187, i64 14
%189 = load i32, i32* %188
%190 = ashr i32 %189, 27
%191 = load i32*, i32** %3
%192 = getelementptr inbounds i32, i32* %191, i64 15
%193 = load i32, i32* %192
%194 = shl i32 %193, 5
%195 = or i32 %190, %194
%196 = load i32*, i32** %3
%197 = getelementptr inbounds i32, i32* %196, i64 14
%198 = load i32, i32* %197
%199 = load i32*, i32** %3
%200 = getelementptr inbounds i32, i32* %199, i64 13
%201 = load i32, i32* %200
%202 = ashr i32 %201, 9
%203 = load i32*, i32** %3
%204 = getelementptr inbounds i32, i32* %203, i64 14
%205 = load i32, i32* %204
%206 = shl i32 %205, 23
%207 = or i32 %202, %206
%208 = load i32*, i32** %3
%209 = getelementptr inbounds i32, i32* %208, i64 12
%210 = load i32, i32* %209
%211 = ashr i32 %210, 16
%212 = load i32*, i32** %3
%213 = getelementptr inbounds i32, i32* %212, i64 13
%214 = load i32, i32* %213
%215 = shl i32 %214, 16
%216 = or i32 %211, %215
%217 = call i32 @_mm256_set_epi32(i32 %165, i32 %168, i32 %177, i32 %186, i32 %195, i32 %198, i32 %207, 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 7, i32 0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0)
store i32 %228, i32* %6
%229 = load i32*, i32** %3
%230 = getelementptr inbounds i32, i32* %229, i64 24
%231 = load i32, i32* %230
%232 = load i32*, i32** %3
%233 = getelementptr inbounds i32, i32* %232, i64 23
%234 = load i32, i32* %233
%235 = ashr i32 %234, 14
%236 = load i32*, i32** %3
%237 = getelementptr inbounds i32, i32* %236, i64 24
%238 = load i32, i32* %237
%239 = shl i32 %238, 18
%240 = or i32 %235, %239
%241 = load i32*, i32** %3
%242 = getelementptr inbounds i32, i32* %241, i64 22
%243 = load i32, i32* %242
%244 = ashr i32 %243, 21
%245 = load i32*, i32** %3
%246 = getelementptr inbounds i32, i32* %245, i64 23
%247 = load i32, i32* %246
%248 = shl i32 %247, 11
%249 = or i32 %244, %248
%250 = load i32*, i32** %3
%251 = getelementptr inbounds i32, i32* %250, i64 21
%252 = load i32, i32* %251
%253 = ashr i32 %252, 28
%254 = load i32*, i32** %3
%255 = getelementptr inbounds i32, i32* %254, i64 22
%256 = load i32, i32* %255
%257 = shl i32 %256, 4
%258 = or i32 %253, %257
%259 = load i32*, i32** %3
%260 = getelementptr inbounds i32, i32* %259, i64 21
%261 = load i32, i32* %260
%262 = load i32*, i32** %3
%263 = getelementptr inbounds i32, i32* %262, i64 20
%264 = load i32, i32* %263
%265 = ashr i32 %264, 10
%266 = load i32*, i32** %3
%267 = getelementptr inbounds i32, i32* %266, i64 21
%268 = load i32, i32* %267
%269 = shl i32 %268, 22
%270 = or i32 %265, %269
%271 = load i32*, i32** %3
%272 = getelementptr inbounds i32, i32* %271, i64 19
%273 = load i32, i32* %272
%274 = ashr i32 %273, 17
%275 = load i32*, i32** %3
%276 = getelementptr inbounds i32, i32* %275, i64 20
%277 = load i32, i32* %276
%278 = shl i32 %277, 15
%279 = or i32 %274, %278
%280 = load i32*, i32** %3
%281 = getelementptr inbounds i32, i32* %280, i64 18
%282 = load i32, i32* %281
%283 = ashr i32 %282, 24
%284 = load i32*, i32** %3
%285 = getelementptr inbounds i32, i32* %284, i64 19
%286 = load i32, i32* %285
%287 = shl i32 %286, 8
%288 = or i32 %283, %287
%289 = call i32 @_mm256_set_epi32(i32 %231, i32 %240, i32 %249, i32 %258, i32 %261, i32 %270, i32 %279, 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 25
store i32* %301, i32** %3
%302 = load i32*, i32** %3
ret i32* %302
}

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