#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*/ differentWord(char *, char *);
int /*<<< orphan*/ errAbort(char *, char *);
int /*<<< orphan*/ unsetenv(char *);
void cleanEnvVars(char *compressType) {
  if ((!differentWord(compressType, "gzip"))) {
    unsetenv("GZIP");
    unsetenv("GZIP_OPT");
  } else if ((!differentWord(compressType, "compress"))) {
  } else if ((!differentWord(compressType, "bzip2"))) {
    unsetenv("BZIP");
    unsetenv("BZIP2");
  } else if ((!differentWord(compressType, "zip"))) {
    unsetenv("ZIPOPT");
  } else {
    errAbort("cleanEnvVars: Unsupported textOutCompress type %s", compressType);
  }
}


x86 assembly (clang, -O0):
<cleanEnvVars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <differentWord@plt>
cmp    $0x0,%eax
jne    1172 <cleanEnvVars+0x42>
lea    0xea9(%rip),%rdi
call   1050 <unsetenv@plt>
lea    0xea2(%rip),%rdi
call   1050 <unsetenv@plt>
jmp    120f <cleanEnvVars+0xdf>
mov    -0x8(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1030 <differentWord@plt>
cmp    $0x0,%eax
jne    1190 <cleanEnvVars+0x60>
jmp    120a <cleanEnvVars+0xda>
mov    -0x8(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1030 <differentWord@plt>
cmp    $0x0,%eax
jne    11c6 <cleanEnvVars+0x96>
lea    0xe72(%rip),%rdi
call   1050 <unsetenv@plt>
lea    0xe6b(%rip),%rdi
call   1050 <unsetenv@plt>
jmp    1205 <cleanEnvVars+0xd5>
mov    -0x8(%rbp),%rdi
lea    0xe30(%rip),%rsi
call   1030 <differentWord@plt>
cmp    $0x0,%eax
jne    11f0 <cleanEnvVars+0xc0>
lea    0xe47(%rip),%rdi
call   1050 <unsetenv@plt>
jmp    1200 <cleanEnvVars+0xd0>
mov    -0x8(%rbp),%rsi
lea    0xe39(%rip),%rdi
call   1040 <errAbort@plt>
jmp    1205 <cleanEnvVars+0xd5>
jmp    120a <cleanEnvVars+0xda>
jmp    120f <cleanEnvVars+0xdf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanEnvVars>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1030 <differentWord@plt>
test   %eax,%eax
je     118d <cleanEnvVars+0x5d>
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <differentWord@plt>
test   %eax,%eax
je     11a6 <cleanEnvVars+0x76>
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
call   1030 <differentWord@plt>
test   %eax,%eax
je     11a8 <cleanEnvVars+0x78>
lea    0xe90(%rip),%rsi
mov    %rbx,%rdi
call   1030 <differentWord@plt>
test   %eax,%eax
je     11c1 <cleanEnvVars+0x91>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <errAbort@plt>
lea    0xe71(%rip),%rdi
call   1050 <unsetenv@plt>
lea    0xe6a(%rip),%rdi
pop    %rbx
jmp    1050 <unsetenv@plt>
pop    %rbx
ret
lea    0xe73(%rip),%rdi
call   1050 <unsetenv@plt>
lea    0xe6c(%rip),%rdi
pop    %rbx
jmp    1050 <unsetenv@plt>
lea    0xe65(%rip),%rdi
pop    %rbx
jmp    1050 <unsetenv@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"gzip\00"
@.str.1 = [5 x i8] c"GZIP\00"
@.str.2 = [9 x i8] c"GZIP_OPT\00"
@.str.3 = [9 x i8] c"compress\00"
@.str.4 = [6 x i8] c"bzip2\00"
@.str.5 = [5 x i8] c"BZIP\00"
@.str.6 = [6 x i8] c"BZIP2\00"
@.str.7 = [4 x i8] c"zip\00"
@.str.8 = [7 x i8] c"ZIPOPT\00"
@.str.9 = [50 x i8] c"cleanEnvVars: Unsupported textOutCompress type %s\00"
define void @cleanEnvVars(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @differentWord(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = call i32 @unsetenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @unsetenv(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %33
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 @differentWord(i8* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %9
br label %32
14: ; preds = %9
%15 = load i8*, i8** %2
%16 = call i32 @differentWord(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp ne i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %14
%19 = call i32 @unsetenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 @unsetenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %31
21: ; preds = %14
%22 = load i8*, i8** %2
%23 = call i32 @differentWord(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %21
%26 = call i32 @unsetenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %30
27: ; preds = %21
%28 = load i8*, i8** %2
%29 = call i32 @errAbort(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i8* %28)
br label %30
30: ; preds = %27, %25
br label %31
31: ; preds = %30, %18
br label %32
32: ; preds = %31, %13
br label %33
33: ; preds = %32, %6
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"gzip\00"
@.str.1 = [5 x i8] c"GZIP\00"
@.str.2 = [9 x i8] c"GZIP_OPT\00"
@.str.3 = [9 x i8] c"compress\00"
@.str.4 = [6 x i8] c"bzip2\00"
@.str.5 = [5 x i8] c"BZIP\00"
@.str.6 = [6 x i8] c"BZIP2\00"
@.str.7 = [4 x i8] c"zip\00"
@.str.8 = [7 x i8] c"ZIPOPT\00"
@.str.9 = [50 x i8] c"cleanEnvVars: Unsupported textOutCompress type %s\00"
define void @cleanEnvVars(i8* %0) {
%2 = tail call i32 @differentWord(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @unsetenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @unsetenv(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %23
7: ; preds = %1
%8 = tail call i32 @differentWord(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %23, label %10
10: ; preds = %7
%11 = tail call i32 @differentWord(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = tail call i32 @unsetenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%15 = tail call i32 @unsetenv(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br label %23
16: ; preds = %10
%17 = tail call i32 @differentWord(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = tail call i32 @unsetenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %23
21: ; preds = %16
%22 = tail call i32 @errAbort(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i8* %0)
br label %23
23: ; preds = %7, %19, %21, %13, %4
ret void
}