#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_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int /*<<< orphan*/ next_in;
  scalar_t__ avail_in;
  int /*<<< orphan*/ *opaque;
  int /*<<< orphan*/ *zfree;
  int /*<<< orphan*/ *zalloc;
};
typedef TYPE_1__ z_stream;

/* Variables and functions */
int /*<<< orphan*/ Z_NULL;
int Z_OK;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int inflateInit(TYPE_1__ *);
int /*<<< orphan*/ stderr;
int gtg_decompress_init(z_stream *z) {
  int status;
  z->zalloc = NULL;
  z->zfree = NULL;
  z->opaque = NULL;
  z->avail_in = 0;
  z->next_in = Z_NULL;
  status = inflateInit(z);
  if (status != Z_OK) {
    fprintf(stderr, "error at init: %d\n", status);
  }
  return status;
}


x86 assembly (clang, -O0):
<gtg_decompress_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,0x20(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x18(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x10(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,0x8(%rax)
mov    0x2e6d(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <inflateInit@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e6f(%rip),%rcx
cmp    (%rcx),%eax
je     11a1 <gtg_decompress_init+0x81>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
lea    0xe64(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtg_decompress_init>:
push   %rbx
xorps  %xmm0,%xmm0
movups %xmm0,0x18(%rdi)
movups %xmm0,0x8(%rdi)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rdi)
call   1030 <inflateInit@plt>
mov    %eax,%ebx
mov    0x2eab(%rip),%rax
cmp    (%rax),%ebx
je     1160 <gtg_decompress_init+0x40>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32, i64, i32*, i32*, i32* }
@Z_NULL = global i32 0
@Z_OK = global i32 0
@stderr = global i32 0
@.str = [19 x i8] c"error at init: %d\0A\00"
define i32 @gtg_decompress_init(%struct.TYPE_4__* %0) {
%2 = alloca %struct.TYPE_4__*
%3 = alloca i32
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %2
%4 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 4
store i32* null, i32** %5
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %6, i32 0, i32 3
store i32* null, i32** %7
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 2
store i32* null, i32** %9
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 1
store i64 0, i64* %11
%12 = load i32, i32* @Z_NULL
%13 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%14 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %13, i32 0, i32 0
store i32 %12, i32* %14
%15 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%16 = call i32 @inflateInit(%struct.TYPE_4__* %15)
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = load i32, i32* @Z_OK
%19 = icmp ne i32 %17, %18
br i1 %19, label %20, label %24
20: ; preds = %1
%21 = load i32, i32* @stderr
%22 = load i32, i32* %3
%23 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %20, %1
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32, i64, i32*, i32*, i32* }
@Z_NULL = global i32 0
@Z_OK = global i32 0
@stderr = global i32 0
@.str = [19 x i8] c"error at init: %d\0A\00"
define i32 @gtg_decompress_init(%struct.TYPE_4__* %0) {
%2 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 1
%3 = bitcast i64* %2 to i8*
%4 = load i32, i32* @Z_NULL
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
store i32 %4, i32* %5
%6 = tail call i32 @inflateInit(%struct.TYPE_4__* %0)
%7 = load i32, i32* @Z_OK
%8 = icmp eq i32 %6, %7
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %12
12: ; preds = %9, %1
ret i32 %6
}