#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 /*<<< orphan*/ uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ DecompressData(int /*<<< orphan*/, int /*<<< orphan*/ *, int,
                                  int, int, int, int, int, int);
int fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ *malloc(int);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  uint32_t size;
  size = fgetc(stdin);
  size |= fgetc(stdin) << 8;
  size |= fgetc(stdin) << 16;
  size |= fgetc(stdin) << 24;
  uint32_t shifts;
  shifts = fgetc(stdin);
  shifts |= fgetc(stdin) << 8;
  shifts |= fgetc(stdin) << 16;
  uint8_t *buf = malloc(size);
  DecompressData(stdin, buf, size, shifts >> 20, (shifts >> 16) & 0xf,
                 (shifts >> 12) & 0xf, (shifts >> 8) & 0xf, (shifts >> 4) & 0xf,
                 shifts & 0xf);
  fwrite(buf, size, 1, stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
shl    $0x10,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
shl    $0x18,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
mov    %eax,-0x18(%rbp)
mov    0x2e2b(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
call   1030 <fgetc@plt>
shl    $0x10,%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
sar    $0x14,%ecx
mov    -0x18(%rbp),%r8d
sar    $0x10,%r8d
and    $0xf,%r8d
mov    -0x18(%rbp),%r9d
sar    $0xc,%r9d
and    $0xf,%r9d
mov    -0x18(%rbp),%r11d
sar    $0x8,%r11d
and    $0xf,%r11d
mov    -0x18(%rbp),%r10d
sar    $0x4,%r10d
and    $0xf,%r10d
mov    -0x18(%rbp),%eax
and    $0xf,%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1060 <DecompressData@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    0x2d7c(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%edx
call   1050 <fwrite@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e96(%rip),%r13
mov    0x0(%r13),%edi
call   1030 <fgetc@plt>
mov    %eax,%ebx
mov    0x0(%r13),%edi
call   1030 <fgetc@plt>
shl    $0x8,%eax
or     %eax,%ebx
mov    0x0(%r13),%edi
call   1030 <fgetc@plt>
mov    %eax,%r12d
shl    $0x10,%r12d
mov    0x0(%r13),%edi
call   1030 <fgetc@plt>
shl    $0x18,%eax
or     %eax,%r12d
or     %ebx,%r12d
mov    0x0(%r13),%edi
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    0x0(%r13),%edi
call   1030 <fgetc@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
or     %r14d,%ebx
mov    0x0(%r13),%edi
call   1030 <fgetc@plt>
mov    %eax,%ebp
shl    $0x10,%ebp
or     %ebx,%ebp
mov    %r12d,%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    0x0(%r13),%edi
mov    %ebp,%ecx
sar    $0x14,%ecx
shr    $0x10,%ebp
and    $0xf,%ebp
mov    %ebx,%r9d
shr    $0xc,%r9d
and    $0xf,%r9d
shr    $0x8,%ebx
and    $0xf,%ebx
mov    %r14d,%eax
shr    $0x4,%eax
and    $0xf,%eax
and    $0xf,%r14d
sub    $0x8,%rsp
mov    %r15,%rsi
mov    %r12d,%edx
mov    %ebp,%r8d
push   %r14
push   %rax
push   %rbx
call   1060 <DecompressData@plt>
add    $0x20,%rsp
mov    0x2dc5(%rip),%rax
mov    (%rax),%ecx
mov    %r15,%rdi
mov    %r12d,%esi
mov    $0x1,%edx
call   1050 <fwrite@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = load i32, i32* @stdin
%9 = call i32 @fgetc(i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* @stdin
%11 = call i32 @fgetc(i32 %10)
%12 = shl i32 %11, 8
%13 = load i32, i32* %5
%14 = or i32 %13, %12
store i32 %14, i32* %5
%15 = load i32, i32* @stdin
%16 = call i32 @fgetc(i32 %15)
%17 = shl i32 %16, 16
%18 = load i32, i32* %5
%19 = or i32 %18, %17
store i32 %19, i32* %5
%20 = load i32, i32* @stdin
%21 = call i32 @fgetc(i32 %20)
%22 = shl i32 %21, 24
%23 = load i32, i32* %5
%24 = or i32 %23, %22
store i32 %24, i32* %5
%25 = load i32, i32* @stdin
%26 = call i32 @fgetc(i32 %25)
store i32 %26, i32* %6
%27 = load i32, i32* @stdin
%28 = call i32 @fgetc(i32 %27)
%29 = shl i32 %28, 8
%30 = load i32, i32* %6
%31 = or i32 %30, %29
store i32 %31, i32* %6
%32 = load i32, i32* @stdin
%33 = call i32 @fgetc(i32 %32)
%34 = shl i32 %33, 16
%35 = load i32, i32* %6
%36 = or i32 %35, %34
store i32 %36, i32* %6
%37 = load i32, i32* %5
%38 = call i32* @malloc(i32 %37)
store i32* %38, i32** %7
%39 = load i32, i32* @stdin
%40 = load i32*, i32** %7
%41 = load i32, i32* %5
%42 = load i32, i32* %6
%43 = ashr i32 %42, 20
%44 = load i32, i32* %6
%45 = ashr i32 %44, 16
%46 = and i32 %45, 15
%47 = load i32, i32* %6
%48 = ashr i32 %47, 12
%49 = and i32 %48, 15
%50 = load i32, i32* %6
%51 = ashr i32 %50, 8
%52 = and i32 %51, 15
%53 = load i32, i32* %6
%54 = ashr i32 %53, 4
%55 = and i32 %54, 15
%56 = load i32, i32* %6
%57 = and i32 %56, 15
%58 = call i32 @DecompressData(i32 %39, i32* %40, i32 %41, i32 %43, i32 %46, i32 %49, i32 %52, i32 %55, i32 %57)
%59 = load i32*, i32** %7
%60 = load i32, i32* %5
%61 = load i32, i32* @stdout
%62 = call i32 @fwrite(i32* %59, i32 %60, i32 1, i32 %61)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgetc(i32 %3)
%5 = load i32, i32* @stdin
%6 = tail call i32 @fgetc(i32 %5)
%7 = shl i32 %6, 8
%8 = or i32 %7, %4
%9 = load i32, i32* @stdin
%10 = tail call i32 @fgetc(i32 %9)
%11 = shl i32 %10, 16
%12 = or i32 %8, %11
%13 = load i32, i32* @stdin
%14 = tail call i32 @fgetc(i32 %13)
%15 = shl i32 %14, 24
%16 = or i32 %12, %15
%17 = load i32, i32* @stdin
%18 = tail call i32 @fgetc(i32 %17)
%19 = load i32, i32* @stdin
%20 = tail call i32 @fgetc(i32 %19)
%21 = shl i32 %20, 8
%22 = or i32 %21, %18
%23 = load i32, i32* @stdin
%24 = tail call i32 @fgetc(i32 %23)
%25 = shl i32 %24, 16
%26 = or i32 %25, %22
%27 = tail call i32* @malloc(i32 %16)
%28 = load i32, i32* @stdin
%29 = ashr i32 %26, 20
%30 = lshr i32 %26, 16
%31 = and i32 %30, 15
%32 = lshr i32 %22, 12
%33 = and i32 %32, 15
%34 = lshr i32 %22, 8
%35 = and i32 %34, 15
%36 = lshr i32 %18, 4
%37 = and i32 %36, 15
%38 = and i32 %18, 15
%39 = tail call i32 @DecompressData(i32 %28, i32* %27, i32 %16, i32 %29, i32 %31, i32 %33, i32 %35, i32 %37, i32 %38)
%40 = load i32, i32* @stdout
%41 = tail call i32 @fwrite(i32* %27, i32 %16, i32 1, i32 %40)
ret i32 0
}