#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 */
scalar_t__ EBADF;
scalar_t__ EEXIST;
scalar_t__ EINVAL;
scalar_t__ ENOENT;
scalar_t__ ENOMEM;
scalar_t__ ENOSPC;
scalar_t__ errno;
int /*<<< orphan*/ printf(char *);
void epoll_ctl_err_show() {
  printf("error at epoll_ctl\n");
  if (EBADF == errno) {
    printf("error at epoll_ctl, error  is EBADF\n");
  } else if (EEXIST == errno) {
    printf("error at epoll_ctl, error  is EEXIST\n");
  } else if (EINVAL == errno) {
    printf("error at epoll_ctl, error  is EINVAL\n");
  } else if (ENOENT == errno) {
    printf("error at epoll_ctl, error  is ENOENT\n");
  } else if (ENOMEM == errno) {
    printf("error at epoll_ctl, error  is ENOMEM\n");
  } else if (ENOSPC == errno) {
    printf("error at epoll_ctl, error  is ENOSPC\n");
  }
}


x86 assembly (clang, -O0):
<epoll_ctl_err_show>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%rax
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
jne    114b <epoll_ctl_err_show+0x3b>
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
jmp    1236 <epoll_ctl_err_show+0x126>
mov    0x2e8e(%rip),%rax
mov    (%rax),%rax
mov    0x2e74(%rip),%rcx
cmp    (%rcx),%rax
jne    1176 <epoll_ctl_err_show+0x66>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
jmp    1231 <epoll_ctl_err_show+0x121>
mov    0x2e4b(%rip),%rax
mov    (%rax),%rax
mov    0x2e49(%rip),%rcx
cmp    (%rcx),%rax
jne    11a1 <epoll_ctl_err_show+0x91>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
jmp    122c <epoll_ctl_err_show+0x11c>
mov    0x2e00(%rip),%rax
mov    (%rax),%rax
mov    0x2e1e(%rip),%rcx
cmp    (%rcx),%rax
jne    11cc <epoll_ctl_err_show+0xbc>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
jmp    1227 <epoll_ctl_err_show+0x117>
mov    0x2e05(%rip),%rax
mov    (%rax),%rax
mov    0x2df3(%rip),%rcx
cmp    (%rcx),%rax
jne    11f7 <epoll_ctl_err_show+0xe7>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1222 <epoll_ctl_err_show+0x112>
mov    0x2dc2(%rip),%rax
mov    (%rax),%rax
mov    0x2dc8(%rip),%rcx
cmp    (%rcx),%rax
jne    121d <epoll_ctl_err_show+0x10d>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1222 <epoll_ctl_err_show+0x112>
jmp    1227 <epoll_ctl_err_show+0x117>
jmp    122c <epoll_ctl_err_show+0x11c>
jmp    1231 <epoll_ctl_err_show+0x121>
jmp    1236 <epoll_ctl_err_show+0x126>
pop    %rbp
ret

x86 assembly (clang, -O2):
<epoll_ctl_err_show>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e94(%rip),%rcx
mov    0x2ea5(%rip),%rax
mov    (%rax),%rax
cmp    %rax,(%rcx)
jne    1140 <epoll_ctl_err_show+0x30>
lea    0xf92(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
mov    0x2e99(%rip),%rcx
cmp    %rax,(%rcx)
jne    1159 <epoll_ctl_err_show+0x49>
lea    0xf54(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
mov    0x2e68(%rip),%rcx
cmp    %rax,(%rcx)
jne    1172 <epoll_ctl_err_show+0x62>
lea    0xf16(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
mov    0x2e2f(%rip),%rcx
cmp    %rax,(%rcx)
jne    118b <epoll_ctl_err_show+0x7b>
lea    0xed8(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
mov    0x2e46(%rip),%rcx
cmp    %rax,(%rcx)
jne    11a4 <epoll_ctl_err_show+0x94>
lea    0xe9a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
mov    0x2e15(%rip),%rcx
cmp    %rax,(%rcx)
jne    11bd <epoll_ctl_err_show+0xad>
lea    0xe5c(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"error at epoll_ctl\0A\00"
@EBADF = global i64 0
@errno = global i64 0
@.str.1 = [37 x i8] c"error at epoll_ctl, error is EBADF\0A\00"
@EEXIST = global i64 0
@.str.2 = [38 x i8] c"error at epoll_ctl, error is EEXIST\0A\00"
@EINVAL = global i64 0
@.str.3 = [38 x i8] c"error at epoll_ctl, error is EINVAL\0A\00"
@ENOENT = global i64 0
@.str.4 = [38 x i8] c"error at epoll_ctl, error is ENOENT\0A\00"
@ENOMEM = global i64 0
@.str.5 = [38 x i8] c"error at epoll_ctl, error is ENOMEM\0A\00"
@ENOSPC = global i64 0
@.str.6 = [38 x i8] c"error at epoll_ctl, error is ENOSPC\0A\00"
define void @epoll_ctl_err_show() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = load i64, i64* @EBADF
%3 = load i64, i64* @errno
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
br label %42
7: ; preds = %0
%8 = load i64, i64* @EEXIST
%9 = load i64, i64* @errno
%10 = icmp eq i64 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
br label %41
13: ; preds = %7
%14 = load i64, i64* @EINVAL
%15 = load i64, i64* @errno
%16 = icmp eq i64 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
br label %40
19: ; preds = %13
%20 = load i64, i64* @ENOENT
%21 = load i64, i64* @errno
%22 = icmp eq i64 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
br label %39
25: ; preds = %19
%26 = load i64, i64* @ENOMEM
%27 = load i64, i64* @errno
%28 = icmp eq i64 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
br label %38
31: ; preds = %25
%32 = load i64, i64* @ENOSPC
%33 = load i64, i64* @errno
%34 = icmp eq i64 %32, %33
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
br label %37
37: ; preds = %35, %31
br label %38
38: ; preds = %37, %29
br label %39
39: ; preds = %38, %23
br label %40
40: ; preds = %39, %17
br label %41
41: ; preds = %40, %11
br label %42
42: ; preds = %41, %5
ret void
}

LLVM IR (-O2):
@EBADF = global i64 0
@errno = global i64 0
@EEXIST = global i64 0
@EINVAL = global i64 0
@ENOENT = global i64 0
@ENOMEM = global i64 0
@ENOSPC = global i64 0
@str = [19 x i8] c"error at epoll_ctl\00"
@str.7 = [37 x i8] c"error at epoll_ctl, error is ENOSPC\00"
@str.8 = [37 x i8] c"error at epoll_ctl, error is ENOMEM\00"
@str.9 = [37 x i8] c"error at epoll_ctl, error is ENOENT\00"
@str.10 = [37 x i8] c"error at epoll_ctl, error is EINVAL\00"
@str.11 = [37 x i8] c"error at epoll_ctl, error is EEXIST\00"
@str.12 = [36 x i8] c"error at epoll_ctl, error is EBADF\00"
define void @epoll_ctl_err_show() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = load i64, i64* @EBADF
%3 = load i64, i64* @errno
%4 = icmp eq i64 %2, %3
br i1 %4, label %20, label %5
5: ; preds = %0
%6 = load i64, i64* @EEXIST
%7 = icmp eq i64 %6, %3
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i64, i64* @EINVAL
%10 = icmp eq i64 %9, %3
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i64, i64* @ENOENT
%13 = icmp eq i64 %12, %3
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i64, i64* @ENOMEM
%16 = icmp eq i64 %15, %3
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i64, i64* @ENOSPC
%19 = icmp eq i64 %18, %3
br i1 %19, label %20, label %23
20: ; preds = %17, %14, %11, %8, %5, %0
%21 = phi i8* [ getelementptr inbounds ([36 x i8], [36 x i8]* @str.12, i64 0, i64 0), %0 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @str.11, i64 0, i64 0), %5 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @str.10, i64 0, i64 0), %8 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @str.9, i64 0, i64 0), %11 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @str.8, i64 0, i64 0), %14 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @str.7, i64 0, i64 0), %17 ]
%22 = tail call i32 @puts(i8* dereferenceable(1) %21)
br label %23
23: ; preds = %20, %17
ret void
}