#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*/ bmp_printf(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              char *, int);
int get_prop_picstyle_from_index(int index) {
  switch (index) {
  case 1:
    return 0x87;
  case 2:
    return 0x81;
  case 3:
    return 0x82;
  case 4:
    return 0x83;
  case 5:
    return 0x84;
  case 6:
    return 0x85;
  case 7:
    return 0x86;
  case 8:
    return 0x21;
  case 9:
    return 0x22;
  case 10:
    return 0x23;
  }
  bmp_printf((0 | (((4) << 16) & (0xFFFF0000)) | ((0) & 0xFF) << 8 |
              ((0) & 0xFF) << 0),
             0, 0, "unk picstyle index: %x", index);
  return 0;
}


x86 assembly (clang, -O0):
<get_prop_picstyle_from_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     11bc <get_prop_picstyle_from_index+0xac>
mov    -0x10(%rbp),%rax
lea    0xec5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x87,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x81,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x82,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x83,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x84,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x85,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x86,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x21,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x22,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
movl   $0x23,-0x4(%rbp)
jmp    11dc <get_prop_picstyle_from_index+0xcc>
mov    -0x8(%rbp),%r8d
mov    $0x40000,%edi
xor    %edx,%edx
lea    0xe5a(%rip),%rcx
mov    %edx,%esi
call   1030 <bmp_printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_prop_picstyle_from_index>:
push   %rbx
mov    %edi,%r8d
lea    -0x1(%r8),%eax
cmp    $0xa,%eax
jae    112b <get_prop_picstyle_from_index+0x1b>
cltq
lea    0xef2(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
jmp    1142 <get_prop_picstyle_from_index+0x32>
lea    0xece(%rip),%rcx
xor    %ebx,%ebx
mov    $0x40000,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <bmp_printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"unk picstyle index: %x\00"
define i32 @get_prop_picstyle_from_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %15 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
i32 5, label %9
i32 6, label %10
i32 7, label %11
i32 8, label %12
i32 9, label %13
i32 10, label %14
]
5: ; preds = %1
store i32 135, i32* %2
br label %18
6: ; preds = %1
store i32 129, i32* %2
br label %18
7: ; preds = %1
store i32 130, i32* %2
br label %18
8: ; preds = %1
store i32 131, i32* %2
br label %18
9: ; preds = %1
store i32 132, i32* %2
br label %18
10: ; preds = %1
store i32 133, i32* %2
br label %18
11: ; preds = %1
store i32 134, i32* %2
br label %18
12: ; preds = %1
store i32 33, i32* %2
br label %18
13: ; preds = %1
store i32 34, i32* %2
br label %18
14: ; preds = %1
store i32 35, i32* %2
br label %18
15: ; preds = %1
%16 = load i32, i32* %3
%17 = call i32 @bmp_printf(i32 262144, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %16)
store i32 0, i32* %2
br label %18
18: ; preds = %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [23 x i8] c"unk picstyle index: %x\00"
@switch.table.get_prop_picstyle_from_index = [10 x i32] [i32 135, i32 129, i32 130, i32 131, i32 132, i32 133, i32 134, i32 33, i32 34, i32 35]
define i32 @get_prop_picstyle_from_index(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 10
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @bmp_printf(i32 262144, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %10
6: ; preds = %1
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.get_prop_picstyle_from_index, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %6, %4
%11 = phi i32 [ 0, %4 ], [ %9, %6 ]
ret i32 %11
}