#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 0x87:
    return 1;
  case 0x81:
    return 2;
  case 0x82:
    return 3;
  case 0x83:
    return 4;
  case 0x84:
    return 5;
  case 0x85:
    return 6;
  case 0x86:
    return 7;
  case 0x21:
    return 8;
  case 0x22:
    return 9;
  case 0x23:
    return 10;
  }
  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     122a <get_prop_picstyle_index+0x11a>
jmp    112f <get_prop_picstyle_index+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x22,%eax
je     1236 <get_prop_picstyle_index+0x126>
jmp    1140 <get_prop_picstyle_index+0x30>
mov    -0xc(%rbp),%eax
sub    $0x23,%eax
je     1242 <get_prop_picstyle_index+0x132>
jmp    1151 <get_prop_picstyle_index+0x41>
mov    -0xc(%rbp),%eax
sub    $0x81,%eax
je     11e2 <get_prop_picstyle_index+0xd2>
jmp    1164 <get_prop_picstyle_index+0x54>
mov    -0xc(%rbp),%eax
sub    $0x82,%eax
je     11ee <get_prop_picstyle_index+0xde>
jmp    1177 <get_prop_picstyle_index+0x67>
mov    -0xc(%rbp),%eax
sub    $0x83,%eax
je     11fa <get_prop_picstyle_index+0xea>
jmp    118a <get_prop_picstyle_index+0x7a>
mov    -0xc(%rbp),%eax
sub    $0x84,%eax
je     1206 <get_prop_picstyle_index+0xf6>
jmp    119d <get_prop_picstyle_index+0x8d>
mov    -0xc(%rbp),%eax
sub    $0x85,%eax
je     1212 <get_prop_picstyle_index+0x102>
jmp    11b0 <get_prop_picstyle_index+0xa0>
mov    -0xc(%rbp),%eax
sub    $0x86,%eax
je     121e <get_prop_picstyle_index+0x10e>
jmp    11c3 <get_prop_picstyle_index+0xb3>
mov    -0xc(%rbp),%eax
sub    $0x87,%eax
jne    124e <get_prop_picstyle_index+0x13e>
jmp    11d6 <get_prop_picstyle_index+0xc6>
movl   $0x1,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x2,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x3,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x4,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x5,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x6,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x7,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x8,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0x9,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
movl   $0xa,-0x4(%rbp)
jmp    126e <get_prop_picstyle_index+0x15e>
mov    -0x8(%rbp),%r8d
mov    $0x40000,%edi
xor    %edx,%edx
lea    0xda0(%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    $0x6,%eax
ja     118e <get_prop_picstyle_index+0x7e>
mov    $0x1,%ebx
lea    0xecc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x2,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
cmp    $0x21,%r8d
je     1180 <get_prop_picstyle_index+0x70>
cmp    $0x22,%r8d
je     1187 <get_prop_picstyle_index+0x77>
cmp    $0x23,%r8d
jne    118e <get_prop_picstyle_index+0x7e>
mov    $0xa,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
mov    $0x3,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
mov    $0x4,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
mov    $0x5,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
mov    $0x6,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
mov    $0x7,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
mov    $0x8,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
mov    $0x9,%ebx
jmp    11a5 <get_prop_picstyle_index+0x95>
lea    0xe87(%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 %15 [
i32 135, label %5
i32 129, label %6
i32 130, label %7
i32 131, label %8
i32 132, label %9
i32 133, label %10
i32 134, label %11
i32 33, label %12
i32 34, label %13
i32 35, label %14
]
5: ; preds = %1
store i32 1, i32* %2
br label %18
6: ; preds = %1
store i32 2, i32* %2
br label %18
7: ; preds = %1
store i32 3, i32* %2
br label %18
8: ; preds = %1
store i32 4, i32* %2
br label %18
9: ; preds = %1
store i32 5, i32* %2
br label %18
10: ; preds = %1
store i32 6, i32* %2
br label %18
11: ; preds = %1
store i32 7, i32* %2
br label %18
12: ; preds = %1
store i32 8, i32* %2
br label %18
13: ; preds = %1
store i32 9, i32* %2
br label %18
14: ; preds = %1
store i32 10, 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 ([17 x i8], [17 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 = [17 x i8] c"unk picstyle: %x\00"
define i32 @get_prop_picstyle_index(i32 %0) {
switch i32 %0, label %11 [
i32 135, label %13
i32 129, label %2
i32 130, label %3
i32 131, label %4
i32 132, label %5
i32 133, label %6
i32 134, label %7
i32 33, label %8
i32 34, label %9
i32 35, label %10
]
2: ; preds = %1
br label %13
3: ; preds = %1
br label %13
4: ; preds = %1
br label %13
5: ; preds = %1
br label %13
6: ; preds = %1
br label %13
7: ; preds = %1
br label %13
8: ; preds = %1
br label %13
9: ; preds = %1
br label %13
10: ; preds = %1
br label %13
11: ; preds = %1
%12 = 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 %13
13: ; preds = %1, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%14 = phi i32 [ 0, %11 ], [ 10, %10 ], [ 9, %9 ], [ 8, %8 ], [ 7, %7 ], [ 6, %6 ], [ 5, %5 ], [ 4, %4 ], [ 3, %3 ], [ 2, %2 ], [ 1, %1 ]
ret i32 %14
}