#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_BRUSHTYPEENUMERATION_print(int otype) {
  int status = 1;
  switch (otype) {
  case 0x00:
    printf("SolidColor");
    break;
  case 0x01:
    printf("HatchFill");
    break;
  case 0x02:
    printf("TextureFill");
    break;
  case 0x03:
    printf("PathGradient");
    break;
  case 0x04:
    printf("LinearGradient");
    break;
  default:
    status = 0;
    printf("INVALID(%d)", otype);
    break;
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_BRUSHTYPEENUMERATION_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    $0x4,%rax
ja     11a6 <U_PMF_BRUSHTYPEENUMERATION_print+0x96>
mov    -0x10(%rbp),%rax
lea    0xec2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <U_PMF_BRUSHTYPEENUMERATION_print+0xae>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <U_PMF_BRUSHTYPEENUMERATION_print+0xae>
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <U_PMF_BRUSHTYPEENUMERATION_print+0xae>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <U_PMF_BRUSHTYPEENUMERATION_print+0xae>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11be <U_PMF_BRUSHTYPEENUMERATION_print+0xae>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe9a(%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_BRUSHTYPEENUMERATION_print>:
push   %rbx
mov    %edi,%esi
cmp    $0x4,%edi
ja     1133 <U_PMF_BRUSHTYPEENUMERATION_print+0x23>
mov    %esi,%eax
lea    0xedf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xee3(%rip),%rdi
jmp    1167 <U_PMF_BRUSHTYPEENUMERATION_print+0x57>
lea    0xf17(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1173 <U_PMF_BRUSHTYPEENUMERATION_print+0x63>
lea    0xed3(%rip),%rdi
jmp    1167 <U_PMF_BRUSHTYPEENUMERATION_print+0x57>
lea    0xed4(%rip),%rdi
jmp    1167 <U_PMF_BRUSHTYPEENUMERATION_print+0x57>
lea    0xed7(%rip),%rdi
jmp    1167 <U_PMF_BRUSHTYPEENUMERATION_print+0x57>
lea    0xedb(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"SolidColor\00"
@.str.1 = [10 x i8] c"HatchFill\00"
@.str.2 = [12 x i8] c"TextureFill\00"
@.str.3 = [13 x i8] c"PathGradient\00"
@.str.4 = [15 x i8] c"LinearGradient\00"
@.str.5 = [12 x i8] c"INVALID(%d)\00"
define i32 @U_PMF_BRUSHTYPEENUMERATION_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 %15 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
]
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %18
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 %18
9: ; preds = %1
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %18
11: ; preds = %1
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %18
13: ; preds = %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %18
15: ; preds = %1
store i32 0, i32* %3
%16 = load i32, i32* %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %13, %11, %9, %7, %5
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [11 x i8] c"SolidColor\00"
@.str.1 = [10 x i8] c"HatchFill\00"
@.str.2 = [12 x i8] c"TextureFill\00"
@.str.3 = [13 x i8] c"PathGradient\00"
@.str.4 = [15 x i8] c"LinearGradient\00"
@.str.5 = [12 x i8] c"INVALID(%d)\00"
define i32 @U_PMF_BRUSHTYPEENUMERATION_print(i32 %0) {
switch i32 %0, label %12 [
i32 0, label %2
i32 1, label %4
i32 2, label %6
i32 3, label %8
i32 4, label %10
]
2: ; preds = %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %14
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 %14
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %14
8: ; preds = %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %14
10: ; preds = %1
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %14
12: ; preds = %1
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %0)
br label %14
14: ; preds = %12, %10, %8, %6, %4, %2
%15 = phi i32 [ 0, %12 ], [ 1, %10 ], [ 1, %8 ], [ 1, %6 ], [ 1, %4 ], [ 1, %2 ]
ret i32 %15
}