#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 EPOLL_CTL_ADD;
int EPOLL_CTL_DEL;
int EPOLL_CTL_MOD;
const char *epoll_op_to_string(int op) {
  return op == EPOLL_CTL_ADD   ? "ADD"
         : op == EPOLL_CTL_DEL ? "DEL"
         : op == EPOLL_CTL_MOD ? "MOD"
                               : "???";
}


x86 assembly (clang, -O0):
<epoll_op_to_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ecf(%rip),%rcx
cmp    (%rcx),%eax
jne    1129 <epoll_op_to_string+0x29>
lea    0xee0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1177 <epoll_op_to_string+0x77>
mov    -0x4(%rbp),%eax
mov    0x2ec5(%rip),%rcx
cmp    (%rcx),%eax
jne    114b <epoll_op_to_string+0x4b>
lea    0xec2(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    116f <epoll_op_to_string+0x6f>
mov    -0x4(%rbp),%edx
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rax
lea    0xea3(%rip),%rcx
cmp    %esi,%edx
cmove  %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<epoll_op_to_string>:
mov    0x2ed9(%rip),%rax
cmp    %edi,(%rax)
jne    1113 <epoll_op_to_string+0x13>
lea    0xeee(%rip),%rax
ret
mov    0x2ede(%rip),%rax
cmp    %edi,(%rax)
jne    1126 <epoll_op_to_string+0x26>
lea    0xedf(%rip),%rax
ret
mov    0x2ea3(%rip),%rax
cmp    %edi,(%rax)
lea    0xed2(%rip),%rcx
lea    0xecf(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@EPOLL_CTL_ADD = global i32 0
@.str = [4 x i8] c"ADD\00"
@EPOLL_CTL_DEL = global i32 0
@.str.1 = [4 x i8] c"DEL\00"
@EPOLL_CTL_MOD = global i32 0
@.str.2 = [4 x i8] c"MOD\00"
@.str.3 = [4 x i8] c"???\00"
define i8* @epoll_op_to_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @EPOLL_CTL_ADD
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %20
7: ; preds = %1
%8 = load i32, i32* %2
%9 = load i32, i32* @EPOLL_CTL_DEL
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7
br label %18
12: ; preds = %7
%13 = load i32, i32* %2
%14 = load i32, i32* @EPOLL_CTL_MOD
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
br label %18
18: ; preds = %12, %11
%19 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %11 ], [ %17, %12 ]
br label %20
20: ; preds = %18, %6
%21 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %6 ], [ %19, %18 ]
ret i8* %21
}

LLVM IR (-O2):
@EPOLL_CTL_ADD = global i32 0
@.str = [4 x i8] c"ADD\00"
@EPOLL_CTL_DEL = global i32 0
@.str.1 = [4 x i8] c"DEL\00"
@EPOLL_CTL_MOD = global i32 0
@.str.2 = [4 x i8] c"MOD\00"
@.str.3 = [4 x i8] c"???\00"
define i8* @epoll_op_to_string(i32 %0) {
%2 = load i32, i32* @EPOLL_CTL_ADD
%3 = icmp eq i32 %2, %0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = load i32, i32* @EPOLL_CTL_DEL
%6 = icmp eq i32 %5, %0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = load i32, i32* @EPOLL_CTL_MOD
%9 = icmp eq i32 %8, %0
%10 = select i1 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
br label %11
11: ; preds = %7, %4, %1
%12 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %1 ], [ %10, %7 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), %4 ]
ret i8* %12
}