#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__ {
  scalar_t__ avail_in;
  void *next_in;
  void *opaque;
  void *zfree;
  void *zalloc;
};
typedef TYPE_1__ z_stream;

/* Variables and functions */
void *Z_NULL;
int Z_OK;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error_at_line(int, int /*<<< orphan*/, char *, int, char *,
                                 int /*<<< orphan*/);
int inflateInit2(TYPE_1__ *, int);
int /*<<< orphan*/ zError(int);
void InflateInit(z_stream *stream) {
  stream->zalloc = Z_NULL;
  stream->zfree = Z_NULL;
  stream->opaque = Z_NULL;
  stream->next_in = Z_NULL;
  stream->avail_in = 0;
  int ret = inflateInit2(stream, 47);
  if (ret != Z_OK) {
    error_at_line(
        -(202), errno,
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/uti7/foo/refs/heads/master/zlib-test.c",
        202, "%s", zError(ret));
  }
}


x86 assembly (clang, -O0):
<InflateInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x20(%rax)
mov    0x2e7b(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
mov    0x2e69(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    0x2e57(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <inflateInit2@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e46(%rip),%rcx
cmp    (%rcx),%eax
je     11e9 <InflateInit+0xb9>
mov    0x2e1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <zError@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%r9d
mov    $0xffffff36,%edi
lea    0xe28(%rip),%rdx
mov    $0xca,%ecx
lea    0xe9d(%rip),%r8
call   1030 <error_at_line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InflateInit>:
push   %rbx
mov    0x2e98(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x20(%rdi)
mov    %rax,0x18(%rdi)
mov    %rax,0x10(%rdi)
mov    %rax,0x8(%rdi)
movq   $0x0,(%rdi)
mov    $0x2f,%esi
call   1040 <inflateInit2@plt>
mov    0x2e8d(%rip),%rcx
cmp    (%rcx),%eax
jne    1169 <InflateInit+0x39>
pop    %rbx
ret
mov    0x2e68(%rip),%rcx
mov    (%rcx),%ebx
mov    %eax,%edi
call   1050 <zError@plt>
lea    0xe80(%rip),%rdx
lea    0xefa(%rip),%r8
mov    $0xffffff36,%edi
mov    %ebx,%esi
mov    $0xca,%ecx
mov    %eax,%r9d
pop    %rbx
jmp    1030 <error_at_line@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i64, i8*, i8*, i8*, i8* }
@Z_NULL = global i8* null
@Z_OK = global i32 0
@errno = global i32 0
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/uti7/foo/refs/heads/master/zlib-test.c\00"
@.str.1 = [3 x i8] c"%s\00"
define void @InflateInit(%struct.TYPE_4__* %0) {
%2 = alloca %struct.TYPE_4__*
%3 = alloca i32
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %2
%4 = load i8*, i8** @Z_NULL
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 4
store i8* %4, i8** %6
%7 = load i8*, i8** @Z_NULL
%8 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 3
store i8* %7, i8** %9
%10 = load i8*, i8** @Z_NULL
%11 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%12 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %11, i32 0, i32 2
store i8* %10, i8** %12
%13 = load i8*, i8** @Z_NULL
%14 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%15 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %14, i32 0, i32 1
store i8* %13, i8** %15
%16 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%17 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %16, i32 0, i32 0
store i64 0, i64* %17
%18 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%19 = call i32 @inflateInit2(%struct.TYPE_4__* %18, i32 47)
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = load i32, i32* @Z_OK
%22 = icmp ne i32 %20, %21
br i1 %22, label %23, label %28
23: ; preds = %1
%24 = load i32, i32* @errno
%25 = load i32, i32* %3
%26 = call i32 @zError(i32 %25)
%27 = call i32 @error_at_line(i32 -202, i32 %24, i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 202, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %23, %1
ret void
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64, i8*, i8*, i8*, i8* }
@Z_NULL = global i8* null
@Z_OK = global i32 0
@errno = global i32 0
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/uti7/foo/refs/heads/master/zlib-test.c\00"
@.str.1 = [3 x i8] c"%s\00"
define void @InflateInit(%struct.TYPE_4__* %0) {
%2 = load i8*, i8** @Z_NULL
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 4
store i8* %2, i8** %3
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 3
store i8* %2, i8** %4
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 2
store i8* %2, i8** %5
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 1
store i8* %2, i8** %6
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
store i64 0, i64* %7
%8 = tail call i32 @inflateInit2(%struct.TYPE_4__* %0, i32 47)
%9 = load i32, i32* @Z_OK
%10 = icmp eq i32 %8, %9
br i1 %10, label %15, label %11
11: ; preds = %1
%12 = load i32, i32* @errno
%13 = tail call i32 @zError(i32 %8)
%14 = tail call i32 @error_at_line(i32 -202, i32 %12, i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 202, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %11, %1
ret void
}