#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_out;
  int /*<<< orphan*/ *next_out;
  scalar_t__ avail_in;
  int /*<<< orphan*/ *next_in;
  void *opaque;
  void *zfree;
  void *zalloc;
};
typedef TYPE_1__ z_stream;

/* Variables and functions */
void *Z_NULL;
TYPE_1__ *malloc(int);
z_stream *streaming_commons_create_z_stream(void) {
  z_stream *ret = malloc(sizeof(z_stream));
  if (ret) {
    ret->zalloc = Z_NULL;
    ret->zfree = Z_NULL;
    ret->opaque = Z_NULL;
    ret->next_in = NULL;
    ret->avail_in = 0;
    ret->next_out = NULL;
    ret->avail_out = 0;
  }
  return ret;
}


x86 assembly (clang, -O0):
<streaming_commons_create_z_stream>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x38,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1196 <streaming_commons_create_z_stream+0x86>
mov    0x2ea8(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x30(%rax)
mov    0x2e96(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x28(%rax)
mov    0x2e84(%rip),%rax
mov    (%rax),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,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    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streaming_commons_create_z_stream>:
push   %rax
mov    $0x38,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     1140 <streaming_commons_create_z_stream+0x30>
mov    0x2eb9(%rip),%rcx
mov    (%rcx),%rcx
mov    %rcx,0x30(%rax)
mov    %rcx,0x28(%rax)
mov    %rcx,0x20(%rax)
xorps  %xmm0,%xmm0
movups %xmm0,(%rax)
movups %xmm0,0x10(%rax)
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i64, i32*, i64, i32*, i8*, i8*, i8* }
@Z_NULL = global i8* null
define %struct.TYPE_4__* @streaming_commons_create_z_stream() {
%1 = alloca %struct.TYPE_4__*
%2 = call %struct.TYPE_4__* @malloc(i32 56)
store %struct.TYPE_4__* %2, %struct.TYPE_4__** %1
%3 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%4 = icmp ne %struct.TYPE_4__* %3, null
br i1 %4, label %5, label %23
5: ; preds = %0
%6 = load i8*, i8** @Z_NULL
%7 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 6
store i8* %6, i8** %8
%9 = load i8*, i8** @Z_NULL
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 5
store i8* %9, i8** %11
%12 = load i8*, i8** @Z_NULL
%13 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%14 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %13, i32 0, i32 4
store i8* %12, i8** %14
%15 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%16 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %15, i32 0, i32 3
store i32* null, i32** %16
%17 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%18 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %17, i32 0, i32 2
store i64 0, i64* %18
%19 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%20 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %19, i32 0, i32 1
store i32* null, i32** %20
%21 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%22 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %21, i32 0, i32 0
store i64 0, i64* %22
br label %23
23: ; preds = %5, %0
%24 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
ret %struct.TYPE_4__* %24
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i64, i32*, i64, i32*, i8*, i8*, i8* }
@Z_NULL = global i8* null
define noalias %struct.TYPE_4__* @streaming_commons_create_z_stream() {
%1 = tail call %struct.TYPE_4__* @malloc(i32 56)
%2 = icmp eq %struct.TYPE_4__* %1, null
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = load i8*, i8** @Z_NULL
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 6
store i8* %4, i8** %5
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 5
store i8* %4, i8** %6
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 4
store i8* %4, i8** %7
%8 = bitcast %struct.TYPE_4__* %1 to i8*
br label %9
9: ; preds = %3, %0
ret %struct.TYPE_4__* %1
}