#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*/ err_exit(char *);
void _clean_err_exit(int errnum) {
  if (errnum == 9)
    err_exit("Cannot connect to server");
  if (errnum == 10)
    err_exit("Timeout connecting to server");
  if (errnum == 13)
    err_exit("Server version not compatible");
  if (errnum == 16)
    err_exit("Invalid metric name specified");
  if (errnum == 18)
    err_exit("Maximum metrics reached");
  if (errnum == 21)
    err_exit("Error parsing configuration file");
  if (errnum == 23)
    err_exit("Invalid configuration input found");
}


x86 assembly (clang, -O0):
<_clean_err_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x9,-0x4(%rbp)
jne    1131 <_clean_err_exit+0x21>
lea    0xed4(%rip),%rdi
call   1030 <err_exit@plt>
cmpl   $0xa,-0x4(%rbp)
jne    1147 <_clean_err_exit+0x37>
lea    0xed7(%rip),%rdi
call   1030 <err_exit@plt>
cmpl   $0xd,-0x4(%rbp)
jne    115d <_clean_err_exit+0x4d>
lea    0xede(%rip),%rdi
call   1030 <err_exit@plt>
cmpl   $0x10,-0x4(%rbp)
jne    1173 <_clean_err_exit+0x63>
lea    0xee6(%rip),%rdi
call   1030 <err_exit@plt>
cmpl   $0x12,-0x4(%rbp)
jne    1189 <_clean_err_exit+0x79>
lea    0xeee(%rip),%rdi
call   1030 <err_exit@plt>
cmpl   $0x15,-0x4(%rbp)
jne    119f <_clean_err_exit+0x8f>
lea    0xef0(%rip),%rdi
call   1030 <err_exit@plt>
cmpl   $0x17,-0x4(%rbp)
jne    11b5 <_clean_err_exit+0xa5>
lea    0xefb(%rip),%rdi
call   1030 <err_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_clean_err_exit>:
add    $0xfffffff7,%edi
cmp    $0xe,%edi
ja     1122 <_clean_err_exit+0x12>
mov    $0x5293,%eax
bt     %edi,%eax
jb     1123 <_clean_err_exit+0x13>
ret
movslq %edi,%rax
lea    0xfa3(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <err_exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Cannot connect to server\00"
@.str.1 = [29 x i8] c"Timeout connecting to server\00"
@.str.2 = [30 x i8] c"Server version not compatible\00"
@.str.3 = [30 x i8] c"Invalid metric name specified\00"
@.str.4 = [24 x i8] c"Maximum metrics reached\00"
@.str.5 = [33 x i8] c"Error parsing configuration file\00"
@.str.6 = [34 x i8] c"Invalid configuration input found\00"
define void @_clean_err_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 9
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @err_exit(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 10
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @err_exit(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 13
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @err_exit(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 16
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @err_exit(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %17
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 18
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 @err_exit(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
%28 = load i32, i32* %2
%29 = icmp eq i32 %28, 21
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @err_exit(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %27
%33 = load i32, i32* %2
%34 = icmp eq i32 %33, 23
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = call i32 @err_exit(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
br label %37
37: ; preds = %35, %32
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Cannot connect to server\00"
@.str.1 = [29 x i8] c"Timeout connecting to server\00"
@.str.2 = [30 x i8] c"Server version not compatible\00"
@.str.3 = [30 x i8] c"Invalid metric name specified\00"
@.str.4 = [24 x i8] c"Maximum metrics reached\00"
@.str.5 = [33 x i8] c"Error parsing configuration file\00"
@.str.6 = [34 x i8] c"Invalid configuration input found\00"
@reltable._clean_err_exit = [15 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.1 to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.2 to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.3 to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.4 to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.5 to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([34 x i8]* @.str.6 to i64), i64 ptrtoint ([15 x i32]* @reltable._clean_err_exit to i64)) to i32)]
define void @_clean_err_exit(i32 %0) {
%2 = add i32 %0, -9
%3 = icmp ult i32 %2, 15
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = trunc i32 %2 to i16
%6 = lshr i16 21139, %5
%7 = and i16 %6, 1
%8 = icmp eq i16 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %4
%10 = sext i32 %2 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([15 x i32]* @reltable._clean_err_exit to i8*), i64 %11)
%13 = tail call i32 @err_exit(i8* %12)
br label %14
14: ; preds = %4, %1, %9
ret void
}