#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 */

/* Variables and functions */
int /*<<< orphan*/ MySAR_macro_print_msg(char *, int, int, char *);
#define Z_DATA_ERROR 132
#define Z_ERRNO 131
#define Z_MEM_ERROR 130
#define Z_STREAM_ERROR 129
#define Z_VERSION_ERROR 128
void Z_err(int ret) {
  switch (ret) {
  case Z_ERRNO:
    MySAR_macro_print_msg(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/coffnix/mysar-ng/refs/heads/master/bin/"
        "mysar-binary-importer/src/unzip.c",
        38, 0x02, "IO error on compressed file!");
    ;
    break;
  case Z_STREAM_ERROR:
    MySAR_macro_print_msg(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/coffnix/mysar-ng/refs/heads/master/bin/"
        "mysar-binary-importer/src/unzip.c",
        41, 0x02, "invalid compression level");
    ;
    break;
  case Z_DATA_ERROR:
    MySAR_macro_print_msg(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/coffnix/mysar-ng/refs/heads/master/bin/"
        "mysar-binary-importer/src/unzip.c",
        44, 0x02, "invalid or incomplete deflate data");
    ;
    break;
  case Z_MEM_ERROR:
    MySAR_macro_print_msg(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/coffnix/mysar-ng/refs/heads/master/bin/"
        "mysar-binary-importer/src/unzip.c",
        47, 0x02, "out of memory");
    ;
    break;
  case Z_VERSION_ERROR:
    MySAR_macro_print_msg(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/coffnix/mysar-ng/refs/heads/master/bin/"
        "mysar-binary-importer/src/unzip.c",
        50, 0x02, "zlib version mismatch!");
    ;
  }
}


x86 assembly (clang, -O0):
<Z_err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4,%eax
ja     11e9 <Z_err+0xd9>
mov    -0x10(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec9(%rip),%rdi
mov    $0x26,%esi
mov    $0x2,%edx
lea    0xf5b(%rip),%rcx
call   1030 <MySAR_macro_print_msg@plt>
jmp    11e9 <Z_err+0xd9>
lea    0xea7(%rip),%rdi
mov    $0x29,%esi
mov    $0x2,%edx
lea    0xf56(%rip),%rcx
call   1030 <MySAR_macro_print_msg@plt>
jmp    11e9 <Z_err+0xd9>
lea    0xe85(%rip),%rdi
mov    $0x2c,%esi
mov    $0x2,%edx
lea    0xf4e(%rip),%rcx
call   1030 <MySAR_macro_print_msg@plt>
jmp    11e9 <Z_err+0xd9>
lea    0xe63(%rip),%rdi
mov    $0x2f,%esi
mov    $0x2,%edx
lea    0xf4f(%rip),%rcx
call   1030 <MySAR_macro_print_msg@plt>
jmp    11e9 <Z_err+0xd9>
lea    0xe41(%rip),%rdi
mov    $0x32,%esi
mov    $0x2,%edx
lea    0xf3b(%rip),%rcx
call   1030 <MySAR_macro_print_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Z_err>:
add    $0xffffff80,%edi
cmp    $0x4,%edi
ja     1145 <Z_err+0x35>
lea    0xee1(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xee5(%rip),%rdi
lea    0xfe9(%rip),%rcx
mov    $0x32,%esi
mov    $0x2,%edx
jmp    1030 <MySAR_macro_print_msg@plt>
ret
lea    0xec7(%rip),%rdi
lea    0xf80(%rip),%rcx
mov    $0x29,%esi
mov    $0x2,%edx
jmp    1030 <MySAR_macro_print_msg@plt>
lea    0xeaa(%rip),%rdi
lea    0xfa0(%rip),%rcx
mov    $0x2f,%esi
mov    $0x2,%edx
jmp    1030 <MySAR_macro_print_msg@plt>
lea    0xe8d(%rip),%rdi
lea    0xf29(%rip),%rcx
mov    $0x26,%esi
mov    $0x2,%edx
jmp    1030 <MySAR_macro_print_msg@plt>
lea    0xe70(%rip),%rdi
lea    0xf43(%rip),%rcx
mov    $0x2c,%esi
mov    $0x2,%edx
jmp    1030 <MySAR_macro_print_msg@plt>

LLVM IR (-O0):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/coffnix/mysar-ng/refs/heads/master/bin/mysar-binary-importer/src/unzip.c\00"
@.str.1 = [29 x i8] c"IO error on compressed file!\00"
@.str.2 = [26 x i8] c"invalid compression level\00"
@.str.3 = [35 x i8] c"invalid or incomplete deflate data\00"
@.str.4 = [14 x i8] c"out of memory\00"
@.str.5 = [23 x i8] c"zlib version mismatch!\00"
define void @Z_err(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %14 [
i32 131, label %4
i32 129, label %6
i32 132, label %8
i32 130, label %10
i32 128, label %12
]
4: ; preds = %1
%5 = call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 38, i32 2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %14
6: ; preds = %1
%7 = call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 41, i32 2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %14
8: ; preds = %1
%9 = call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 44, i32 2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %14
10: ; preds = %1
%11 = call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 47, i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %14
12: ; preds = %1
%13 = call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 50, i32 2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %14
14: ; preds = %12, %1, %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
@.str = [163 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/coffnix/mysar-ng/refs/heads/master/bin/mysar-binary-importer/src/unzip.c\00"
@.str.1 = [29 x i8] c"IO error on compressed file!\00"
@.str.2 = [26 x i8] c"invalid compression level\00"
@.str.3 = [35 x i8] c"invalid or incomplete deflate data\00"
@.str.4 = [14 x i8] c"out of memory\00"
@.str.5 = [23 x i8] c"zlib version mismatch!\00"
define void @Z_err(i32 %0) {
switch i32 %0, label %12 [
i32 131, label %2
i32 129, label %4
i32 132, label %6
i32 130, label %8
i32 128, label %10
]
2: ; preds = %1
%3 = tail call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 38, i32 2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %12
4: ; preds = %1
%5 = tail call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 41, i32 2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %12
6: ; preds = %1
%7 = tail call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 44, i32 2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.3, i64 0, i64 0))
br label %12
8: ; preds = %1
%9 = tail call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 47, i32 2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
br label %12
10: ; preds = %1
%11 = tail call i32 @MySAR_macro_print_msg(i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0), i32 50, i32 2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
br label %12
12: ; preds = %10, %1, %8, %6, %4, %2
ret void
}