void unpack_input(unsigned char *input, unsigned int *output) {
  unsigned int outbuffer[28];
  unsigned short inbuffer[10];
  unsigned int x;
  unsigned int *ptr;
  for (x = 0; x < 20; x += 2)
    inbuffer[x / 2] = (input[x] << 8) + input[x + 1];
  ptr = outbuffer;
  *(ptr++) = 27;
  *(ptr++) = (inbuffer[0] >> 10) & 0x3f;
  *(ptr++) = (inbuffer[0] >> 5) & 0x1f;
  *(ptr++) = inbuffer[0] & 0x1f;
  *(ptr++) = (inbuffer[1] >> 12) & 0xf;
  *(ptr++) = (inbuffer[1] >> 8) & 0xf;
  *(ptr++) = (inbuffer[1] >> 5) & 7;
  *(ptr++) = (inbuffer[1] >> 2) & 7;
  *(ptr++) = ((inbuffer[1] << 1) & 6) | ((inbuffer[2] >> 15) & 1);
  *(ptr++) = (inbuffer[2] >> 12) & 7;
  *(ptr++) = (inbuffer[2] >> 10) & 3;
  *(ptr++) = (inbuffer[2] >> 5) & 0x1f;
  *(ptr++) = ((inbuffer[2] << 2) & 0x7c) | ((inbuffer[3] >> 14) & 3);
  *(ptr++) = (inbuffer[3] >> 6) & 0xff;
  *(ptr++) = ((inbuffer[3] << 1) & 0x7e) | ((inbuffer[4] >> 15) & 1);
  *(ptr++) = (inbuffer[4] >> 8) & 0x7f;
  *(ptr++) = (inbuffer[4] >> 1) & 0x7f;
  *(ptr++) = ((inbuffer[4] << 7) & 0x80) | ((inbuffer[5] >> 9) & 0x7f);
  *(ptr++) = (inbuffer[5] >> 2) & 0x7f;
  *(ptr++) = ((inbuffer[5] << 5) & 0x60) | ((inbuffer[6] >> 11) & 0x1f);
  *(ptr++) = (inbuffer[6] >> 4) & 0x7f;
  *(ptr++) = ((inbuffer[6] << 4) & 0xf0) | ((inbuffer[7] >> 12) & 0xf);
  *(ptr++) = (inbuffer[7] >> 5) & 0x7f;
  *(ptr++) = ((inbuffer[7] << 2) & 0x7c) | ((inbuffer[8] >> 14) & 3);
  *(ptr++) = (inbuffer[8] >> 7) & 0x7f;
  *(ptr++) = ((inbuffer[8] << 1) & 0xfe) | ((inbuffer[9] >> 15) & 1);
  *(ptr++) = (inbuffer[9] >> 8) & 0x7f;
  *(ptr++) = (inbuffer[9] >> 1) & 0x7f;
  *(output++) = outbuffer[11];
  for (x = 1; x < 11; *(output++) = outbuffer[x++])
    ;
  ptr = outbuffer + 12;
  for (x = 0; x < 16; x += 4) {
    *(output++) = ptr[x];
    *(output++) = ptr[x + 2];
    *(output++) = ptr[x + 3];
    *(output++) = ptr[x + 1];
  }
}


x86 assembly (clang, -O0):
<unpack_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xa4(%rbp)
cmpl   $0x14,-0xa4(%rbp)
jae    1177 <unpack_input+0x77>
mov    -0x8(%rbp),%rax
mov    -0xa4(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    -0xa4(%rbp),%edx
add    $0x1,%edx
mov    %edx,%edx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    %ax,%cx
mov    -0xa4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,%eax
mov    %cx,-0xa0(%rbp,%rax,2)
ff
mov    -0xa4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xa4(%rbp)
jmp    111a <unpack_input+0x1a>
lea    -0x80(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0xb0(%rbp)
movl   $0x1b,(%rax)
movzwl -0xa0(%rbp),%ecx
sar    $0xa,%ecx
and    $0x3f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0xa0(%rbp),%ecx
sar    $0x5,%ecx
and    $0x1f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0xa0(%rbp),%ecx
and    $0x1f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9e(%rbp),%ecx
sar    $0xc,%ecx
and    $0xf,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9e(%rbp),%ecx
sar    $0x8,%ecx
and    $0xf,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9e(%rbp),%ecx
sar    $0x5,%ecx
and    $0x7,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9e(%rbp),%ecx
sar    $0x2,%ecx
and    $0x7,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9e(%rbp),%ecx
shl    $0x1,%ecx
and    $0x6,%ecx
movzwl -0x9c(%rbp),%eax
sar    $0xf,%eax
and    $0x1,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9c(%rbp),%ecx
sar    $0xc,%ecx
and    $0x7,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9c(%rbp),%ecx
sar    $0xa,%ecx
and    $0x3,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9c(%rbp),%ecx
sar    $0x5,%ecx
and    $0x1f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9c(%rbp),%ecx
shl    $0x2,%ecx
and    $0x7c,%ecx
movzwl -0x9a(%rbp),%eax
sar    $0xe,%eax
and    $0x3,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9a(%rbp),%ecx
sar    $0x6,%ecx
and    $0xff,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x9a(%rbp),%ecx
shl    $0x1,%ecx
and    $0x7e,%ecx
movzwl -0x98(%rbp),%eax
sar    $0xf,%eax
and    $0x1,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x98(%rbp),%ecx
sar    $0x8,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x98(%rbp),%ecx
sar    $0x1,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x98(%rbp),%ecx
shl    $0x7,%ecx
and    $0x80,%ecx
movzwl -0x96(%rbp),%eax
sar    $0x9,%eax
and    $0x7f,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x96(%rbp),%ecx
sar    $0x2,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x96(%rbp),%ecx
shl    $0x5,%ecx
and    $0x60,%ecx
movzwl -0x94(%rbp),%eax
sar    $0xb,%eax
and    $0x1f,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x94(%rbp),%ecx
sar    $0x4,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x94(%rbp),%ecx
shl    $0x4,%ecx
and    $0xf0,%ecx
movzwl -0x92(%rbp),%eax
sar    $0xc,%eax
and    $0xf,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x92(%rbp),%ecx
sar    $0x5,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x92(%rbp),%ecx
shl    $0x2,%ecx
and    $0x7c,%ecx
movzwl -0x90(%rbp),%eax
sar    $0xe,%eax
and    $0x3,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x90(%rbp),%ecx
sar    $0x7,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x90(%rbp),%ecx
shl    $0x1,%ecx
and    $0xfe,%ecx
movzwl -0x8e(%rbp),%eax
sar    $0xf,%eax
and    $0x1,%eax
or     %eax,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x8e(%rbp),%ecx
sar    $0x8,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
movzwl -0x8e(%rbp),%ecx
sar    $0x1,%ecx
and    $0x7f,%ecx
mov    -0xb0(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0xb0(%rbp)
mov    %ecx,(%rax)
mov    -0x54(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
movl   $0x1,-0xa4(%rbp)
cmpl   $0xb,-0xa4(%rbp)
jae    1647 <unpack_input+0x547>
jmp    161a <unpack_input+0x51a>
mov    -0xa4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xa4(%rbp)
mov    %eax,%eax
mov    -0x80(%rbp,%rax,4),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
jmp    1608 <unpack_input+0x508>
lea    -0x80(%rbp),%rax
add    $0x30,%rax
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0xa4(%rbp)
cmpl   $0x10,-0xa4(%rbp)
jae    1714 <unpack_input+0x614>
mov    -0xb0(%rbp),%rax
mov    -0xa4(%rbp),%ecx
mov    (%rax,%rcx,4),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0xb0(%rbp),%rax
mov    -0xa4(%rbp),%ecx
add    $0x2,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0xb0(%rbp),%rax
mov    -0xa4(%rbp),%ecx
add    $0x3,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0xb0(%rbp),%rax
mov    -0xa4(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0xa4(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0xa4(%rbp)
jmp    1660 <unpack_input+0x560>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack_input>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
movzbl 0x3(%rdi),%ebx
movzbl 0x4(%rdi),%r12d
mov    %r12d,%r14d
shl    $0x8,%r14d
movzbl 0x5(%rdi),%r15d
or     %r15d,%r14d
movzbl 0x6(%rdi),%ebp
mov    %ebp,%ecx
shl    $0x8,%ecx
movzbl 0x7(%rdi),%eax
or     %eax,%ecx
mov    %ecx,-0x4(%rsp)
movzbl 0x8(%rdi),%edx
mov    %edx,-0x18(%rsp)
movzbl 0x9(%rdi),%r13d
movzbl 0xa(%rdi),%r8d
mov    %ebx,-0x8(%rsp)
mov    %ebx,-0xc(%rsp)
and    $0x3,%ebx
mov    %r12d,%ecx
shr    $0x7,%ecx
lea    (%rcx,%rbx,2),%ecx
mov    %ecx,-0x10(%rsp)
mov    %r8d,%ebx
shl    $0x8,%ebx
and    $0x1f,%r15d
shr    $0x6,%ebp
lea    0x0(%rbp,%r15,4),%ecx
mov    %ecx,-0x14(%rsp)
and    $0x3f,%eax
mov    %edx,%ecx
shr    $0x7,%ecx
lea    (%rcx,%rax,2),%eax
mov    %eax,-0x1c(%rsp)
mov    %r13d,-0x20(%rsp)
shl    $0x7,%r13d
movzbl %r13b,%eax
shr    %r8d
or     %eax,%r8d
mov    %r8d,-0x24(%rsp)
movzbl 0xb(%rdi),%eax
or     %eax,%ebx
shl    $0x5,%eax
and    $0x60,%eax
movzbl 0xc(%rdi),%r11d
mov    %r11d,%r13d
shr    $0x3,%r11d
or     %eax,%r11d
shl    $0x8,%r13d
movzbl 0xd(%rdi),%eax
or     %eax,%r13d
shl    $0x4,%eax
movzbl %al,%eax
movzbl 0xe(%rdi),%r10d
mov    %r10d,%r9d
shr    $0x4,%r10d
or     %eax,%r10d
shl    $0x8,%r9d
movzbl 0xf(%rdi),%r8d
or     %r8d,%r9d
and    $0x1f,%r8d
movzbl 0x10(%rdi),%r15d
mov    %r15d,%edx
shr    $0x6,%r15d
lea    (%r15,%r8,4),%eax
mov    %eax,-0x28(%rsp)
shl    $0x8,%edx
movzbl 0x11(%rdi),%r15d
or     %r15d,%edx
and    $0x7f,%r15d
movzbl 0x12(%rdi),%r8d
mov    %r8d,%ebp
shr    $0x7,%ebp
lea    0x0(%rbp,%r15,2),%r15d
movzbl (%rdi),%ebp
movzbl 0x1(%rdi),%eax
movzbl 0x2(%rdi),%ecx
movzbl 0x13(%rdi),%edi
shr    $0x5,%r14d
and    $0x1f,%r14d
mov    %r14d,(%rsi)
mov    %ebp,%r14d
shr    $0x2,%ebp
mov    %ebp,0x4(%rsi)
shl    $0x8,%r14d
or     %eax,%r14d
shr    $0x5,%r14d
and    $0x1f,%r14d
mov    %r14d,0x8(%rsi)
and    $0x1f,%eax
mov    %eax,0xc(%rsi)
mov    %ecx,%eax
shr    $0x4,%eax
mov    %eax,0x10(%rsi)
and    $0xf,%ecx
mov    %ecx,0x14(%rsi)
mov    -0x8(%rsp),%eax
shr    $0x5,%eax
mov    %eax,0x18(%rsi)
mov    -0xc(%rsp),%eax
shr    $0x2,%eax
and    $0x7,%eax
mov    %eax,0x1c(%rsi)
mov    -0x10(%rsp),%eax
mov    %eax,0x20(%rsi)
mov    %r12d,%eax
shr    $0x4,%eax
and    $0x7,%eax
mov    %eax,0x24(%rsi)
shr    $0x2,%r12d
and    $0x3,%r12d
mov    %r12d,0x28(%rsi)
mov    -0x14(%rsp),%eax
mov    %eax,0x2c(%rsi)
mov    -0x1c(%rsp),%eax
mov    %eax,0x30(%rsi)
mov    -0x18(%rsp),%eax
and    $0x7f,%eax
mov    %eax,0x34(%rsi)
mov    -0x4(%rsp),%eax
shr    $0x6,%eax
movzbl %al,%eax
mov    %eax,0x38(%rsi)
mov    -0x20(%rsp),%eax
shr    %eax
mov    %eax,0x3c(%rsi)
shr    $0x2,%ebx
and    $0x7f,%ebx
mov    %ebx,0x40(%rsi)
mov    %r11d,0x44(%rsi)
mov    -0x24(%rsp),%eax
mov    %eax,0x48(%rsi)
shr    $0x4,%r13d
and    $0x7f,%r13d
mov    %r13d,0x4c(%rsi)
shr    $0x5,%r9d
and    $0x7f,%r9d
mov    %r9d,0x50(%rsi)
mov    -0x28(%rsp),%eax
mov    %eax,0x54(%rsi)
mov    %r10d,0x58(%rsi)
shr    $0x7,%edx
and    $0x7f,%edx
mov    %edx,0x5c(%rsi)
and    $0x7f,%r8d
mov    %r8d,0x60(%rsi)
shr    %edi
mov    %edi,0x64(%rsi)
mov    %r15d,0x68(%rsi)
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @unpack_input(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [28 x i32]
%6 = alloca [10 x i16]
%7 = alloca i32
%8 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
store i32 0, i32* %7
br label %9
9: ; preds = %33, %2
%10 = load i32, i32* %7
%11 = icmp ult i32 %10, 20
br i1 %11, label %12, label %36
12: ; preds = %9
%13 = load i8*, i8** %3
%14 = load i32, i32* %7
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8*, i8** %3
%21 = load i32, i32* %7
%22 = add i32 %21, 1
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %20, i64 %23
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = add nsw i32 %19, %26
%28 = trunc i32 %27 to i16
%29 = load i32, i32* %7
%30 = udiv i32 %29, 2
%31 = zext i32 %30 to i64
%32 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 %31
store i16 %28, i16* %32
br label %33
33: ; preds = %12
%34 = load i32, i32* %7
%35 = add i32 %34, 2
store i32 %35, i32* %7
br label %9
36: ; preds = %9
%37 = getelementptr inbounds [28 x i32], [28 x i32]* %5, i64 0, i64 0
store i32* %37, i32** %8
%38 = load i32*, i32** %8
%39 = getelementptr inbounds i32, i32* %38, i32 1
store i32* %39, i32** %8
store i32 27, i32* %38
%40 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 0
%41 = load i16, i16* %40
%42 = zext i16 %41 to i32
%43 = ashr i32 %42, 10
%44 = and i32 %43, 63
%45 = load i32*, i32** %8
%46 = getelementptr inbounds i32, i32* %45, i32 1
store i32* %46, i32** %8
store i32 %44, i32* %45
%47 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 0
%48 = load i16, i16* %47
%49 = zext i16 %48 to i32
%50 = ashr i32 %49, 5
%51 = and i32 %50, 31
%52 = load i32*, i32** %8
%53 = getelementptr inbounds i32, i32* %52, i32 1
store i32* %53, i32** %8
store i32 %51, i32* %52
%54 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 0
%55 = load i16, i16* %54
%56 = zext i16 %55 to i32
%57 = and i32 %56, 31
%58 = load i32*, i32** %8
%59 = getelementptr inbounds i32, i32* %58, i32 1
store i32* %59, i32** %8
store i32 %57, i32* %58
%60 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 1
%61 = load i16, i16* %60
%62 = zext i16 %61 to i32
%63 = ashr i32 %62, 12
%64 = and i32 %63, 15
%65 = load i32*, i32** %8
%66 = getelementptr inbounds i32, i32* %65, i32 1
store i32* %66, i32** %8
store i32 %64, i32* %65
%67 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 1
%68 = load i16, i16* %67
%69 = zext i16 %68 to i32
%70 = ashr i32 %69, 8
%71 = and i32 %70, 15
%72 = load i32*, i32** %8
%73 = getelementptr inbounds i32, i32* %72, i32 1
store i32* %73, i32** %8
store i32 %71, i32* %72
%74 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 1
%75 = load i16, i16* %74
%76 = zext i16 %75 to i32
%77 = ashr i32 %76, 5
%78 = and i32 %77, 7
%79 = load i32*, i32** %8
%80 = getelementptr inbounds i32, i32* %79, i32 1
store i32* %80, i32** %8
store i32 %78, i32* %79
%81 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 1
%82 = load i16, i16* %81
%83 = zext i16 %82 to i32
%84 = ashr i32 %83, 2
%85 = and i32 %84, 7
%86 = load i32*, i32** %8
%87 = getelementptr inbounds i32, i32* %86, i32 1
store i32* %87, i32** %8
store i32 %85, i32* %86
%88 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 1
%89 = load i16, i16* %88
%90 = zext i16 %89 to i32
%91 = shl i32 %90, 1
%92 = and i32 %91, 6
%93 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 2
%94 = load i16, i16* %93
%95 = zext i16 %94 to i32
%96 = ashr i32 %95, 15
%97 = and i32 %96, 1
%98 = or i32 %92, %97
%99 = load i32*, i32** %8
%100 = getelementptr inbounds i32, i32* %99, i32 1
store i32* %100, i32** %8
store i32 %98, i32* %99
%101 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 2
%102 = load i16, i16* %101
%103 = zext i16 %102 to i32
%104 = ashr i32 %103, 12
%105 = and i32 %104, 7
%106 = load i32*, i32** %8
%107 = getelementptr inbounds i32, i32* %106, i32 1
store i32* %107, i32** %8
store i32 %105, i32* %106
%108 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 2
%109 = load i16, i16* %108
%110 = zext i16 %109 to i32
%111 = ashr i32 %110, 10
%112 = and i32 %111, 3
%113 = load i32*, i32** %8
%114 = getelementptr inbounds i32, i32* %113, i32 1
store i32* %114, i32** %8
store i32 %112, i32* %113
%115 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 2
%116 = load i16, i16* %115
%117 = zext i16 %116 to i32
%118 = ashr i32 %117, 5
%119 = and i32 %118, 31
%120 = load i32*, i32** %8
%121 = getelementptr inbounds i32, i32* %120, i32 1
store i32* %121, i32** %8
store i32 %119, i32* %120
%122 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 2
%123 = load i16, i16* %122
%124 = zext i16 %123 to i32
%125 = shl i32 %124, 2
%126 = and i32 %125, 124
%127 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 3
%128 = load i16, i16* %127
%129 = zext i16 %128 to i32
%130 = ashr i32 %129, 14
%131 = and i32 %130, 3
%132 = or i32 %126, %131
%133 = load i32*, i32** %8
%134 = getelementptr inbounds i32, i32* %133, i32 1
store i32* %134, i32** %8
store i32 %132, i32* %133
%135 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 3
%136 = load i16, i16* %135
%137 = zext i16 %136 to i32
%138 = ashr i32 %137, 6
%139 = and i32 %138, 255
%140 = load i32*, i32** %8
%141 = getelementptr inbounds i32, i32* %140, i32 1
store i32* %141, i32** %8
store i32 %139, i32* %140
%142 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 3
%143 = load i16, i16* %142
%144 = zext i16 %143 to i32
%145 = shl i32 %144, 1
%146 = and i32 %145, 126
%147 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 4
%148 = load i16, i16* %147
%149 = zext i16 %148 to i32
%150 = ashr i32 %149, 15
%151 = and i32 %150, 1
%152 = or i32 %146, %151
%153 = load i32*, i32** %8
%154 = getelementptr inbounds i32, i32* %153, i32 1
store i32* %154, i32** %8
store i32 %152, i32* %153
%155 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 4
%156 = load i16, i16* %155
%157 = zext i16 %156 to i32
%158 = ashr i32 %157, 8
%159 = and i32 %158, 127
%160 = load i32*, i32** %8
%161 = getelementptr inbounds i32, i32* %160, i32 1
store i32* %161, i32** %8
store i32 %159, i32* %160
%162 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 4
%163 = load i16, i16* %162
%164 = zext i16 %163 to i32
%165 = ashr i32 %164, 1
%166 = and i32 %165, 127
%167 = load i32*, i32** %8
%168 = getelementptr inbounds i32, i32* %167, i32 1
store i32* %168, i32** %8
store i32 %166, i32* %167
%169 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 4
%170 = load i16, i16* %169
%171 = zext i16 %170 to i32
%172 = shl i32 %171, 7
%173 = and i32 %172, 128
%174 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 5
%175 = load i16, i16* %174
%176 = zext i16 %175 to i32
%177 = ashr i32 %176, 9
%178 = and i32 %177, 127
%179 = or i32 %173, %178
%180 = load i32*, i32** %8
%181 = getelementptr inbounds i32, i32* %180, i32 1
store i32* %181, i32** %8
store i32 %179, i32* %180
%182 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 5
%183 = load i16, i16* %182
%184 = zext i16 %183 to i32
%185 = ashr i32 %184, 2
%186 = and i32 %185, 127
%187 = load i32*, i32** %8
%188 = getelementptr inbounds i32, i32* %187, i32 1
store i32* %188, i32** %8
store i32 %186, i32* %187
%189 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 5
%190 = load i16, i16* %189
%191 = zext i16 %190 to i32
%192 = shl i32 %191, 5
%193 = and i32 %192, 96
%194 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 6
%195 = load i16, i16* %194
%196 = zext i16 %195 to i32
%197 = ashr i32 %196, 11
%198 = and i32 %197, 31
%199 = or i32 %193, %198
%200 = load i32*, i32** %8
%201 = getelementptr inbounds i32, i32* %200, i32 1
store i32* %201, i32** %8
store i32 %199, i32* %200
%202 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 6
%203 = load i16, i16* %202
%204 = zext i16 %203 to i32
%205 = ashr i32 %204, 4
%206 = and i32 %205, 127
%207 = load i32*, i32** %8
%208 = getelementptr inbounds i32, i32* %207, i32 1
store i32* %208, i32** %8
store i32 %206, i32* %207
%209 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 6
%210 = load i16, i16* %209
%211 = zext i16 %210 to i32
%212 = shl i32 %211, 4
%213 = and i32 %212, 240
%214 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 7
%215 = load i16, i16* %214
%216 = zext i16 %215 to i32
%217 = ashr i32 %216, 12
%218 = and i32 %217, 15
%219 = or i32 %213, %218
%220 = load i32*, i32** %8
%221 = getelementptr inbounds i32, i32* %220, i32 1
store i32* %221, i32** %8
store i32 %219, i32* %220
%222 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 7
%223 = load i16, i16* %222
%224 = zext i16 %223 to i32
%225 = ashr i32 %224, 5
%226 = and i32 %225, 127
%227 = load i32*, i32** %8
%228 = getelementptr inbounds i32, i32* %227, i32 1
store i32* %228, i32** %8
store i32 %226, i32* %227
%229 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 7
%230 = load i16, i16* %229
%231 = zext i16 %230 to i32
%232 = shl i32 %231, 2
%233 = and i32 %232, 124
%234 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 8
%235 = load i16, i16* %234
%236 = zext i16 %235 to i32
%237 = ashr i32 %236, 14
%238 = and i32 %237, 3
%239 = or i32 %233, %238
%240 = load i32*, i32** %8
%241 = getelementptr inbounds i32, i32* %240, i32 1
store i32* %241, i32** %8
store i32 %239, i32* %240
%242 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 8
%243 = load i16, i16* %242
%244 = zext i16 %243 to i32
%245 = ashr i32 %244, 7
%246 = and i32 %245, 127
%247 = load i32*, i32** %8
%248 = getelementptr inbounds i32, i32* %247, i32 1
store i32* %248, i32** %8
store i32 %246, i32* %247
%249 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 8
%250 = load i16, i16* %249
%251 = zext i16 %250 to i32
%252 = shl i32 %251, 1
%253 = and i32 %252, 254
%254 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 9
%255 = load i16, i16* %254
%256 = zext i16 %255 to i32
%257 = ashr i32 %256, 15
%258 = and i32 %257, 1
%259 = or i32 %253, %258
%260 = load i32*, i32** %8
%261 = getelementptr inbounds i32, i32* %260, i32 1
store i32* %261, i32** %8
store i32 %259, i32* %260
%262 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 9
%263 = load i16, i16* %262
%264 = zext i16 %263 to i32
%265 = ashr i32 %264, 8
%266 = and i32 %265, 127
%267 = load i32*, i32** %8
%268 = getelementptr inbounds i32, i32* %267, i32 1
store i32* %268, i32** %8
store i32 %266, i32* %267
%269 = getelementptr inbounds [10 x i16], [10 x i16]* %6, i64 0, i64 9
%270 = load i16, i16* %269
%271 = zext i16 %270 to i32
%272 = ashr i32 %271, 1
%273 = and i32 %272, 127
%274 = load i32*, i32** %8
%275 = getelementptr inbounds i32, i32* %274, i32 1
store i32* %275, i32** %8
store i32 %273, i32* %274
%276 = getelementptr inbounds [28 x i32], [28 x i32]* %5, i64 0, i64 11
%277 = load i32, i32* %276
%278 = load i32*, i32** %4
%279 = getelementptr inbounds i32, i32* %278, i32 1
store i32* %279, i32** %4
store i32 %277, i32* %278
store i32 1, i32* %7
br label %280
280: ; preds = %284, %36
%281 = load i32, i32* %7
%282 = icmp ult i32 %281, 11
br i1 %282, label %283, label %292
283: ; preds = %280
br label %284
284: ; preds = %283
%285 = load i32, i32* %7
%286 = add i32 %285, 1
store i32 %286, i32* %7
%287 = zext i32 %285 to i64
%288 = getelementptr inbounds [28 x i32], [28 x i32]* %5, i64 0, i64 %287
%289 = load i32, i32* %288
%290 = load i32*, i32** %4
%291 = getelementptr inbounds i32, i32* %290, i32 1
store i32* %291, i32** %4
store i32 %289, i32* %290
br label %280
292: ; preds = %280
%293 = getelementptr inbounds [28 x i32], [28 x i32]* %5, i64 0, i64 0
%294 = getelementptr inbounds i32, i32* %293, i64 12
store i32* %294, i32** %8
store i32 0, i32* %7
br label %295
295: ; preds = %330, %292
%296 = load i32, i32* %7
%297 = icmp ult i32 %296, 16
br i1 %297, label %298, label %333
298: ; preds = %295
%299 = load i32*, i32** %8
%300 = load i32, i32* %7
%301 = zext i32 %300 to i64
%302 = getelementptr inbounds i32, i32* %299, i64 %301
%303 = load i32, i32* %302
%304 = load i32*, i32** %4
%305 = getelementptr inbounds i32, i32* %304, i32 1
store i32* %305, i32** %4
store i32 %303, i32* %304
%306 = load i32*, i32** %8
%307 = load i32, i32* %7
%308 = add i32 %307, 2
%309 = zext i32 %308 to i64
%310 = getelementptr inbounds i32, i32* %306, i64 %309
%311 = load i32, i32* %310
%312 = load i32*, i32** %4
%313 = getelementptr inbounds i32, i32* %312, i32 1
store i32* %313, i32** %4
store i32 %311, i32* %312
%314 = load i32*, i32** %8
%315 = load i32, i32* %7
%316 = add i32 %315, 3
%317 = zext i32 %316 to i64
%318 = getelementptr inbounds i32, i32* %314, i64 %317
%319 = load i32, i32* %318
%320 = load i32*, i32** %4
%321 = getelementptr inbounds i32, i32* %320, i32 1
store i32* %321, i32** %4
store i32 %319, i32* %320
%322 = load i32*, i32** %8
%323 = load i32, i32* %7
%324 = add i32 %323, 1
%325 = zext i32 %324 to i64
%326 = getelementptr inbounds i32, i32* %322, i64 %325
%327 = load i32, i32* %326
%328 = load i32*, i32** %4
%329 = getelementptr inbounds i32, i32* %328, i32 1
store i32* %329, i32** %4
store i32 %327, i32* %328
br label %330
330: ; preds = %298
%331 = load i32, i32* %7
%332 = add i32 %331, 4
store i32 %332, i32* %7
br label %295
333: ; preds = %295
ret void
}

LLVM IR (-O2):
define void @unpack_input(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i16
%9 = or i16 %5, %8
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i16
%13 = getelementptr inbounds i8, i8* %0, i64 3
%14 = load i8, i8* %13
%15 = zext i8 %14 to i16
%16 = getelementptr inbounds i8, i8* %0, i64 4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i16
%19 = shl nuw i16 %18, 8
%20 = getelementptr inbounds i8, i8* %0, i64 5
%21 = load i8, i8* %20
%22 = zext i8 %21 to i16
%23 = or i16 %19, %22
%24 = getelementptr inbounds i8, i8* %0, i64 6
%25 = load i8, i8* %24
%26 = zext i8 %25 to i16
%27 = shl nuw i16 %26, 8
%28 = getelementptr inbounds i8, i8* %0, i64 7
%29 = load i8, i8* %28
%30 = zext i8 %29 to i16
%31 = or i16 %27, %30
%32 = getelementptr inbounds i8, i8* %0, i64 8
%33 = load i8, i8* %32
%34 = zext i8 %33 to i16
%35 = getelementptr inbounds i8, i8* %0, i64 9
%36 = load i8, i8* %35
%37 = getelementptr inbounds i8, i8* %0, i64 10
%38 = load i8, i8* %37
%39 = zext i8 %38 to i16
%40 = shl nuw i16 %39, 8
%41 = getelementptr inbounds i8, i8* %0, i64 11
%42 = load i8, i8* %41
%43 = zext i8 %42 to i16
%44 = or i16 %40, %43
%45 = getelementptr inbounds i8, i8* %0, i64 12
%46 = load i8, i8* %45
%47 = zext i8 %46 to i16
%48 = shl nuw i16 %47, 8
%49 = getelementptr inbounds i8, i8* %0, i64 13
%50 = load i8, i8* %49
%51 = zext i8 %50 to i16
%52 = or i16 %48, %51
%53 = getelementptr inbounds i8, i8* %0, i64 14
%54 = load i8, i8* %53
%55 = zext i8 %54 to i16
%56 = shl nuw i16 %55, 8
%57 = getelementptr inbounds i8, i8* %0, i64 15
%58 = load i8, i8* %57
%59 = zext i8 %58 to i16
%60 = or i16 %56, %59
%61 = getelementptr inbounds i8, i8* %0, i64 16
%62 = load i8, i8* %61
%63 = zext i8 %62 to i16
%64 = shl nuw i16 %63, 8
%65 = getelementptr inbounds i8, i8* %0, i64 17
%66 = load i8, i8* %65
%67 = zext i8 %66 to i16
%68 = or i16 %64, %67
%69 = getelementptr inbounds i8, i8* %0, i64 18
%70 = load i8, i8* %69
%71 = zext i8 %70 to i16
%72 = getelementptr inbounds i8, i8* %0, i64 19
%73 = load i8, i8* %72
%74 = lshr i16 %4, 2
%75 = zext i16 %74 to i32
%76 = lshr i16 %9, 5
%77 = and i16 %76, 31
%78 = zext i16 %77 to i32
%79 = and i16 %8, 31
%80 = zext i16 %79 to i32
%81 = lshr i16 %12, 4
%82 = zext i16 %81 to i32
%83 = and i16 %12, 15
%84 = zext i16 %83 to i32
%85 = lshr i16 %15, 5
%86 = zext i16 %85 to i32
%87 = lshr i16 %15, 2
%88 = and i16 %87, 7
%89 = zext i16 %88 to i32
%90 = zext i8 %14 to i32
%91 = shl nuw nsw i32 %90, 1
%92 = and i32 %91, 6
%93 = lshr i16 %18, 7
%94 = zext i16 %93 to i32
%95 = or i32 %92, %94
%96 = lshr i16 %18, 4
%97 = and i16 %96, 7
%98 = zext i16 %97 to i32
%99 = lshr i16 %18, 2
%100 = and i16 %99, 3
%101 = zext i16 %100 to i32
%102 = lshr i16 %23, 5
%103 = and i16 %102, 31
%104 = zext i16 %103 to i32
%105 = zext i8 %21 to i32
%106 = shl nuw nsw i32 %105, 2
%107 = and i32 %106, 124
%108 = lshr i16 %26, 6
%109 = zext i16 %108 to i32
%110 = or i32 %107, %109
%111 = lshr i16 %31, 6
%112 = and i16 %111, 255
%113 = zext i16 %112 to i32
%114 = zext i8 %29 to i32
%115 = shl nuw nsw i32 %114, 1
%116 = and i32 %115, 126
%117 = lshr i16 %34, 7
%118 = zext i16 %117 to i32
%119 = or i32 %116, %118
%120 = and i16 %34, 127
%121 = zext i16 %120 to i32
%122 = lshr i8 %36, 1
%123 = zext i8 %122 to i32
%124 = zext i8 %36 to i32
%125 = shl nuw nsw i32 %124, 7
%126 = and i32 %125, 128
%127 = lshr i16 %39, 1
%128 = zext i16 %127 to i32
%129 = or i32 %126, %128
%130 = lshr i16 %44, 2
%131 = and i16 %130, 127
%132 = zext i16 %131 to i32
%133 = zext i8 %42 to i32
%134 = shl nuw nsw i32 %133, 5
%135 = and i32 %134, 96
%136 = lshr i16 %47, 3
%137 = zext i16 %136 to i32
%138 = or i32 %135, %137
%139 = lshr i16 %52, 4
%140 = and i16 %139, 127
%141 = zext i16 %140 to i32
%142 = zext i8 %50 to i32
%143 = shl nuw nsw i32 %142, 4
%144 = and i32 %143, 240
%145 = lshr i16 %55, 4
%146 = zext i16 %145 to i32
%147 = or i32 %144, %146
%148 = lshr i16 %60, 5
%149 = and i16 %148, 127
%150 = zext i16 %149 to i32
%151 = zext i8 %58 to i32
%152 = shl nuw nsw i32 %151, 2
%153 = and i32 %152, 124
%154 = lshr i16 %63, 6
%155 = zext i16 %154 to i32
%156 = or i32 %153, %155
%157 = lshr i16 %68, 7
%158 = and i16 %157, 127
%159 = zext i16 %158 to i32
%160 = zext i8 %66 to i32
%161 = shl nuw nsw i32 %160, 1
%162 = and i32 %161, 254
%163 = lshr i16 %71, 7
%164 = zext i16 %163 to i32
%165 = or i32 %162, %164
%166 = and i16 %71, 127
%167 = zext i16 %166 to i32
%168 = lshr i8 %73, 1
%169 = zext i8 %168 to i32
store i32 %104, i32* %1
%170 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %75, i32* %170
%171 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %78, i32* %171
%172 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %80, i32* %172
%173 = getelementptr inbounds i32, i32* %1, i64 4
store i32 %82, i32* %173
%174 = getelementptr inbounds i32, i32* %1, i64 5
store i32 %84, i32* %174
%175 = getelementptr inbounds i32, i32* %1, i64 6
store i32 %86, i32* %175
%176 = getelementptr inbounds i32, i32* %1, i64 7
store i32 %89, i32* %176
%177 = getelementptr inbounds i32, i32* %1, i64 8
store i32 %95, i32* %177
%178 = getelementptr inbounds i32, i32* %1, i64 9
store i32 %98, i32* %178
%179 = getelementptr inbounds i32, i32* %1, i64 10
store i32 %101, i32* %179
%180 = getelementptr i32, i32* %1, i64 11
%181 = getelementptr i32, i32* %1, i64 12
store i32 %110, i32* %180
%182 = getelementptr i32, i32* %1, i64 13
store i32 %119, i32* %181
%183 = getelementptr i32, i32* %1, i64 14
store i32 %121, i32* %182
%184 = getelementptr i32, i32* %1, i64 15
store i32 %113, i32* %183
%185 = getelementptr i32, i32* %1, i64 16
store i32 %123, i32* %184
%186 = getelementptr i32, i32* %1, i64 17
store i32 %132, i32* %185
%187 = getelementptr i32, i32* %1, i64 18
store i32 %138, i32* %186
%188 = getelementptr i32, i32* %1, i64 19
store i32 %129, i32* %187
%189 = getelementptr i32, i32* %1, i64 20
store i32 %141, i32* %188
%190 = getelementptr i32, i32* %1, i64 21
store i32 %150, i32* %189
%191 = getelementptr i32, i32* %1, i64 22
store i32 %156, i32* %190
%192 = getelementptr i32, i32* %1, i64 23
store i32 %147, i32* %191
%193 = getelementptr i32, i32* %1, i64 24
store i32 %159, i32* %192
%194 = getelementptr i32, i32* %1, i64 25
store i32 %167, i32* %193
%195 = getelementptr i32, i32* %1, i64 26
store i32 %169, i32* %194
store i32 %165, i32* %195
ret void
}