#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*/ printf(char *, ...);
int U_PMF_COMBINEMODEENUMERATION_print(int otype) {
  int status = 1;
  switch (otype) {
  case 0x00:
    printf("Replace");
    break;
  case 0x01:
    printf("Intersect");
    break;
  case 0x02:
    printf("Union");
    break;
  case 0x03:
    printf("XOR");
    break;
  case 0x04:
    printf("Exclude");
    break;
  case 0x05:
    printf("Complement");
    break;
  default:
    status = 0;
    printf("INVALID(%d)", otype);
    break;
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_COMBINEMODEENUMERATION_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x5,%rax
ja     11b9 <U_PMF_COMBINEMODEENUMERATION_print+0xa9>
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d1 <U_PMF_COMBINEMODEENUMERATION_print+0xc1>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d1 <U_PMF_COMBINEMODEENUMERATION_print+0xc1>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d1 <U_PMF_COMBINEMODEENUMERATION_print+0xc1>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d1 <U_PMF_COMBINEMODEENUMERATION_print+0xc1>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d1 <U_PMF_COMBINEMODEENUMERATION_print+0xc1>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d1 <U_PMF_COMBINEMODEENUMERATION_print+0xc1>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_PMF_COMBINEMODEENUMERATION_print>:
push   %rbx
mov    %edi,%esi
cmp    $0x5,%edi
ja     1133 <U_PMF_COMBINEMODEENUMERATION_print+0x23>
mov    %esi,%eax
lea    0xedf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xee7(%rip),%rdi
jmp    1170 <U_PMF_COMBINEMODEENUMERATION_print+0x60>
lea    0xf0d(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <printf@plt>
jmp    117c <U_PMF_COMBINEMODEENUMERATION_print+0x6c>
lea    0xed4(%rip),%rdi
jmp    1170 <U_PMF_COMBINEMODEENUMERATION_print+0x60>
lea    0xed5(%rip),%rdi
jmp    1170 <U_PMF_COMBINEMODEENUMERATION_print+0x60>
lea    0xed2(%rip),%rdi
jmp    1170 <U_PMF_COMBINEMODEENUMERATION_print+0x60>
lea    0xecd(%rip),%rdi
jmp    1170 <U_PMF_COMBINEMODEENUMERATION_print+0x60>
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Replace\00"
@.str.1 = [10 x i8] c"Intersect\00"
@.str.2 = [6 x i8] c"Union\00"
@.str.3 = [4 x i8] c"XOR\00"
@.str.4 = [8 x i8] c"Exclude\00"
@.str.5 = [11 x i8] c"Complement\00"
@.str.6 = [12 x i8] c"INVALID(%d)\00"
define i32 @U_PMF_COMBINEMODEENUMERATION_print(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %2
switch i32 %4, label %17 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
i32 5, label %15
]
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %20
7: ; preds = %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %20
9: ; preds = %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %20
11: ; preds = %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %20
13: ; preds = %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %20
15: ; preds = %1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %20
17: ; preds = %1
store i32 0, i32* %3
%18 = load i32, i32* %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %18)
br label %20
20: ; preds = %17, %15, %13, %11, %9, %7, %5
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [8 x i8] c"Replace\00"
@.str.1 = [10 x i8] c"Intersect\00"
@.str.2 = [6 x i8] c"Union\00"
@.str.3 = [4 x i8] c"XOR\00"
@.str.4 = [8 x i8] c"Exclude\00"
@.str.5 = [11 x i8] c"Complement\00"
@.str.6 = [12 x i8] c"INVALID(%d)\00"
define i32 @U_PMF_COMBINEMODEENUMERATION_print(i32 %0) {
switch i32 %0, label %14 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
i32 3, label %8
i32 4, label %10
i32 5, label %12
]
2: ; preds = %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %16
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %16
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %16
8: ; preds = %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
br label %16
10: ; preds = %1
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %16
12: ; preds = %1
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %16
14: ; preds = %1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %0)
br label %16
16: ; preds = %14, %12, %10, %8, %6, %4, %2
%17 = phi i32 [ 0, %14 ], [ 1, %12 ], [ 1, %10 ], [ 1, %8 ], [ 1, %6 ], [ 1, %4 ], [ 1, %2 ]
ret i32 %17
}