#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_OBJECTTYPEENUMERATION_print(int otype) {
  int status = 1;
  switch (otype) {
  case 0x00:
    printf("Invalid");
    break;
  case 0x01:
    printf("Brush");
    break;
  case 0x02:
    printf("Pen");
    break;
  case 0x03:
    printf("Path");
    break;
  case 0x04:
    printf("Region");
    break;
  case 0x05:
    printf("Image");
    break;
  case 0x06:
    printf("Font");
    break;
  case 0x07:
    printf("StringFormat");
    break;
  case 0x08:
    printf("ImageAttributes");
    break;
  case 0x09:
    printf("CustomLineCap");
    break;
  default:
    status = 0;
    printf("INVALID(%d)", otype);
    break;
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_OBJECTTYPEENUMERATION_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    $0x9,%rax
ja     1205 <U_PMF_OBJECTTYPEENUMERATION_print+0xf5>
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    121d <U_PMF_OBJECTTYPEENUMERATION_print+0x10d>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe66(%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_OBJECTTYPEENUMERATION_print>:
push   %rbx
mov    %edi,%esi
cmp    $0x9,%edi
ja     1133 <U_PMF_OBJECTTYPEENUMERATION_print+0x23>
mov    %esi,%eax
lea    0xedf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xef7(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xf42(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11a0 <U_PMF_OBJECTTYPEENUMERATION_print+0x90>
lea    0xee4(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xee1(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xedc(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xed8(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xed6(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xed3(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xecf(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xee3(%rip),%rdi
jmp    1194 <U_PMF_OBJECTTYPEENUMERATION_print+0x84>
lea    0xeca(%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"Invalid\00"
@.str.1 = [6 x i8] c"Brush\00"
@.str.2 = [4 x i8] c"Pen\00"
@.str.3 = [5 x i8] c"Path\00"
@.str.4 = [7 x i8] c"Region\00"
@.str.5 = [6 x i8] c"Image\00"
@.str.6 = [5 x i8] c"Font\00"
@.str.7 = [13 x i8] c"StringFormat\00"
@.str.8 = [16 x i8] c"ImageAttributes\00"
@.str.9 = [14 x i8] c"CustomLineCap\00"
@.str.10 = [12 x i8] c"INVALID(%d)\00"
define i32 @U_PMF_OBJECTTYPEENUMERATION_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 %25 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
i32 5, label %15
i32 6, label %17
i32 7, label %19
i32 8, label %21
i32 9, label %23
]
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %28
7: ; preds = %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %28
9: ; preds = %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %28
11: ; preds = %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %28
13: ; preds = %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %28
15: ; preds = %1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %28
17: ; preds = %1
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %28
19: ; preds = %1
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
br label %28
21: ; preds = %1
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
br label %28
23: ; preds = %1
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
br label %28
25: ; preds = %1
store i32 0, i32* %3
%26 = load i32, i32* %2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@.str = [8 x i8] c"Invalid\00"
@.str.1 = [6 x i8] c"Brush\00"
@.str.2 = [4 x i8] c"Pen\00"
@.str.3 = [5 x i8] c"Path\00"
@.str.4 = [7 x i8] c"Region\00"
@.str.5 = [6 x i8] c"Image\00"
@.str.6 = [5 x i8] c"Font\00"
@.str.7 = [13 x i8] c"StringFormat\00"
@.str.8 = [16 x i8] c"ImageAttributes\00"
@.str.9 = [14 x i8] c"CustomLineCap\00"
@.str.10 = [12 x i8] c"INVALID(%d)\00"
define i32 @U_PMF_OBJECTTYPEENUMERATION_print(i32 %0) {
switch i32 %0, label %22 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
i32 3, label %8
i32 4, label %10
i32 5, label %12
i32 6, label %14
i32 7, label %16
i32 8, label %18
i32 9, label %20
]
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 %24
4: ; preds = %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %24
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %24
8: ; preds = %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %24
10: ; preds = %1
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %24
12: ; preds = %1
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %24
14: ; preds = %1
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %24
16: ; preds = %1
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
br label %24
18: ; preds = %1
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
br label %24
20: ; preds = %1
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
br label %24
22: ; preds = %1
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), i32 %0)
br label %24
24: ; preds = %22, %20, %18, %16, %14, %12, %10, %8, %6, %4, %2
%25 = phi i32 [ 0, %22 ], [ 1, %20 ], [ 1, %18 ], [ 1, %16 ], [ 1, %14 ], [ 1, %12 ], [ 1, %10 ], [ 1, %8 ], [ 1, %6 ], [ 1, %4 ], [ 1, %2 ]
ret i32 %25
}