#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 */
typedef int int32_t;

/* Variables and functions */
int32_t decode_modifiers_code(int c) {
  switch (c) {
  case 0:
    return 0;
  case 2:
    return 0x00400000;
  case 3:
    return 0x00800000;
  case 4:
    return 0x00400000 | 0x00800000;
  case 5:
    return 0x01000000;
  case 6:
    return 0x00400000 | 0x01000000;
  case 7:
    return 0x00800000 | 0x01000000;
  case 8:
    return 0x00400000 | 0x00800000 | 0x01000000;
  }
  return -1;
}


x86 assembly (clang, -O0):
<decode_modifiers_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x8,%rax
ja     118c <decode_modifiers_code+0x8c>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0x400000,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0x800000,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0xc00000,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0x1000000,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0x1400000,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0x1800000,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0x1c00000,-0x4(%rbp)
jmp    1193 <decode_modifiers_code+0x93>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_modifiers_code>:
mov    $0xffffffff,%eax
cmp    $0x8,%edi
ja     1117 <decode_modifiers_code+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @decode_modifiers_code(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 0, 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
]
5: ; preds = %1
store i32 0, i32* %2
br label %14
6: ; preds = %1
store i32 4194304, i32* %2
br label %14
7: ; preds = %1
store i32 8388608, i32* %2
br label %14
8: ; preds = %1
store i32 12582912, i32* %2
br label %14
9: ; preds = %1
store i32 16777216, i32* %2
br label %14
10: ; preds = %1
store i32 20971520, i32* %2
br label %14
11: ; preds = %1
store i32 25165824, i32* %2
br label %14
12: ; preds = %1
store i32 29360128, i32* %2
br label %14
13: ; preds = %1
store i32 -1, i32* %2
br label %14
14: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@switch.table.decode_modifiers_code = [9 x i32] [i32 0, i32 -1, i32 4194304, i32 8388608, i32 12582912, i32 16777216, i32 20971520, i32 25165824, i32 29360128]
define i32 @decode_modifiers_code(i32 %0) {
%2 = icmp ult i32 %0, 9
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [9 x i32], [9 x i32]* @switch.table.decode_modifiers_code, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}