#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 */
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  char *next_in;
  int avail_in;
  char *next_out;
  int avail_out;
  scalar_t__ opaque;
  scalar_t__ zfree;
  scalar_t__ zalloc;
};
typedef TYPE_1__ z_stream;
typedef scalar_t__ voidpf;
typedef scalar_t__ free_func;
typedef scalar_t__ alloc_func;

/* Variables and functions */
int /*<<< orphan*/ Z_NO_FLUSH;
int inflate(TYPE_1__ *, int /*<<< orphan*/);
int /*<<< orphan*/ inflateEnd(TYPE_1__ *);
int /*<<< orphan*/ inflateInit(TYPE_1__ *);
void decompress(char *p, char *p2, int len, int uLen) {
  int status;
  z_stream d_stream;
  d_stream.zalloc = (alloc_func)0;
  d_stream.zfree = (free_func)0;
  d_stream.opaque = (voidpf)0;
  d_stream.next_in = p;
  d_stream.avail_in = len;
  d_stream.next_out = p2;
  d_stream.avail_out = uLen;
  inflateInit(&d_stream);
  status = inflate(&d_stream, Z_NO_FLUSH);
  inflateEnd(&d_stream);
}


x86 assembly (clang, -O0):
<decompress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x40(%rbp)
lea    -0x58(%rbp),%rdi
call   1040 <inflateInit@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%esi
lea    -0x58(%rbp),%rdi
call   1030 <inflate@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x58(%rbp),%rdi
call   1050 <inflateEnd@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decompress>:
push   %rbx
sub    $0x40,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x28(%rsp)
movq   $0x0,0x38(%rsp)
mov    %rdi,0x8(%rsp)
mov    %edx,0x10(%rsp)
mov    %rsi,0x18(%rsp)
mov    %ecx,0x20(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <inflateInit@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1030 <inflate@plt>
mov    %rbx,%rdi
call   1050 <inflateEnd@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_5__ = type { i8*, i32, i8*, i32, i64, i64, i64 }
@Z_NO_FLUSH = global i32 0
define void @decompress(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.TYPE_5__
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %10, i32 0, i32 6
store i64 0, i64* %11
%12 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %10, i32 0, i32 5
store i64 0, i64* %12
%13 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %10, i32 0, i32 4
store i64 0, i64* %13
%14 = load i8*, i8** %5
%15 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %10, i32 0, i32 0
store i8* %14, i8** %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %10, i32 0, i32 1
store i32 %16, i32* %17
%18 = load i8*, i8** %6
%19 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %10, i32 0, i32 2
store i8* %18, i8** %19
%20 = load i32, i32* %8
%21 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %10, i32 0, i32 3
store i32 %20, i32* %21
%22 = call i32 @inflateInit(%struct.TYPE_5__* %10)
%23 = load i32, i32* @Z_NO_FLUSH
%24 = call i32 @inflate(%struct.TYPE_5__* %10, i32 %23)
store i32 %24, i32* %9
%25 = call i32 @inflateEnd(%struct.TYPE_5__* %10)
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { i8*, i32, i8*, i32, i64, i64, i64 }
@Z_NO_FLUSH = global i32 0
define void @decompress(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.TYPE_5__
%6 = bitcast %struct.TYPE_5__* %5 to i8*
%7 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %5, i64 0, i32 4
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %5, i64 0, i32 0
%9 = bitcast i64* %7 to i8*
store i8* %0, i8** %8
%10 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %5, i64 0, i32 1
store i32 %2, i32* %10
%11 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %5, i64 0, i32 2
store i8* %1, i8** %11
%12 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %5, i64 0, i32 3
store i32 %3, i32* %12
%13 = call i32 @inflateInit(%struct.TYPE_5__* %5)
%14 = load i32, i32* @Z_NO_FLUSH
%15 = call i32 @inflate(%struct.TYPE_5__* %5, i32 %14)
%16 = call i32 @inflateEnd(%struct.TYPE_5__* %5)
ret void
}