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


x86 assembly (clang, -O0):
<get_prop_picstyle_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x21,%eax
je     120b <get_prop_picstyle_index+0xfb>
jmp    112f <get_prop_picstyle_index+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x22,%eax
je     1217 <get_prop_picstyle_index+0x107>
jmp    1140 <get_prop_picstyle_index+0x30>
mov    -0xc(%rbp),%eax
sub    $0x23,%eax
je     1223 <get_prop_picstyle_index+0x113>
jmp    1151 <get_prop_picstyle_index+0x41>
mov    -0xc(%rbp),%eax
sub    $0x81,%eax
je     11c3 <get_prop_picstyle_index+0xb3>
jmp    1164 <get_prop_picstyle_index+0x54>
mov    -0xc(%rbp),%eax
sub    $0x82,%eax
je     11cf <get_prop_picstyle_index+0xbf>
jmp    1177 <get_prop_picstyle_index+0x67>
mov    -0xc(%rbp),%eax
sub    $0x83,%eax
je     11db <get_prop_picstyle_index+0xcb>
jmp    118a <get_prop_picstyle_index+0x7a>
mov    -0xc(%rbp),%eax
sub    $0x84,%eax
je     11e7 <get_prop_picstyle_index+0xd7>
jmp    119d <get_prop_picstyle_index+0x8d>
mov    -0xc(%rbp),%eax
sub    $0x85,%eax
je     11f3 <get_prop_picstyle_index+0xe3>
jmp    11b0 <get_prop_picstyle_index+0xa0>
mov    -0xc(%rbp),%eax
sub    $0x86,%eax
je     11ff <get_prop_picstyle_index+0xef>
jmp    122f <get_prop_picstyle_index+0x11f>
movl   $0x1,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x2,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x3,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x4,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x5,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x6,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x7,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x8,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
movl   $0x9,-0x4(%rbp)
jmp    124f <get_prop_picstyle_index+0x13f>
mov    -0x8(%rbp),%r8d
mov    $0x40000,%edi
xor    %edx,%edx
lea    0xdbf(%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_index>:
push   %rbx
mov    %edi,%r8d
cmp    $0x80,%edi
jle    1144 <get_prop_picstyle_index+0x34>
lea    -0x81(%r8),%eax
cmp    $0x5,%eax
ja     1187 <get_prop_picstyle_index+0x77>
mov    $0x1,%ebx
lea    0xecc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x2,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
cmp    $0x21,%r8d
je     1179 <get_prop_picstyle_index+0x69>
cmp    $0x22,%r8d
je     1180 <get_prop_picstyle_index+0x70>
cmp    $0x23,%r8d
jne    1187 <get_prop_picstyle_index+0x77>
mov    $0x9,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
mov    $0x3,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
mov    $0x4,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
mov    $0x5,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
mov    $0x6,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
mov    $0x7,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
mov    $0x8,%ebx
jmp    119e <get_prop_picstyle_index+0x8e>
lea    0xe8a(%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 = [17 x i8] c"unk picstyle: %x\00"
define i32 @get_prop_picstyle_index(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %14 [
i32 129, label %5
i32 130, label %6
i32 131, label %7
i32 132, label %8
i32 133, label %9
i32 134, label %10
i32 33, label %11
i32 34, label %12
i32 35, label %13
]
5: ; preds = %1
store i32 1, i32* %2
br label %17
6: ; preds = %1
store i32 2, i32* %2
br label %17
7: ; preds = %1
store i32 3, i32* %2
br label %17
8: ; preds = %1
store i32 4, i32* %2
br label %17
9: ; preds = %1
store i32 5, i32* %2
br label %17
10: ; preds = %1
store i32 6, i32* %2
br label %17
11: ; preds = %1
store i32 7, i32* %2
br label %17
12: ; preds = %1
store i32 8, i32* %2
br label %17
13: ; preds = %1
store i32 9, i32* %2
br label %17
14: ; preds = %1
%15 = load i32, i32* %3
%16 = call i32 @bmp_printf(i32 262144, i32 0, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %15)
store i32 0, i32* %2
br label %17
17: ; preds = %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [17 x i8] c"unk picstyle: %x\00"
define i32 @get_prop_picstyle_index(i32 %0) {
switch i32 %0, label %10 [
i32 129, label %12
i32 130, label %2
i32 131, label %3
i32 132, label %4
i32 133, label %5
i32 134, label %6
i32 33, label %7
i32 34, label %8
i32 35, label %9
]
2: ; preds = %1
br label %12
3: ; preds = %1
br label %12
4: ; preds = %1
br label %12
5: ; preds = %1
br label %12
6: ; preds = %1
br label %12
7: ; preds = %1
br label %12
8: ; preds = %1
br label %12
9: ; preds = %1
br label %12
10: ; preds = %1
%11 = tail call i32 @bmp_printf(i32 262144, i32 0, i32 0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %12
12: ; preds = %1, %10, %9, %8, %7, %6, %5, %4, %3, %2
%13 = phi i32 [ 0, %10 ], [ 9, %9 ], [ 8, %8 ], [ 7, %7 ], [ 6, %6 ], [ 5, %5 ], [ 4, %4 ], [ 3, %3 ], [ 2, %2 ], [ 1, %1 ]
ret i32 %13
}