#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*/ Error(int, char *, int);
int getMappedElement(int element) {
  switch (element) {
  case 8:
    element = 80;
    break;
  case 5:
    element = 32;
    break;
  case 119:
    element = 616;
    break;
  case 207:
    element = 617;
    break;
  case 208:
    element = 618;
    break;
  case 209:
    element = 619;
    break;
  case 296:
    element = 620;
    break;
  case (210 + 0):
    element = 0;
    break;
  default:
    if (element >= 864) {
      Error((1 << 1), "invalid level element %d", element);
      element = 656;
    }
    break;
  }
  return element;
}


x86 assembly (clang, -O0):
<getMappedElement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x5,%eax
je     11bc <getMappedElement+0xac>
jmp    112f <getMappedElement+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x8,%eax
je     11b0 <getMappedElement+0xa0>
jmp    1140 <getMappedElement+0x30>
mov    -0x8(%rbp),%eax
sub    $0x77,%eax
je     11c8 <getMappedElement+0xb8>
jmp    1151 <getMappedElement+0x41>
mov    -0x8(%rbp),%eax
sub    $0xcf,%eax
je     11d4 <getMappedElement+0xc4>
jmp    1164 <getMappedElement+0x54>
mov    -0x8(%rbp),%eax
sub    $0xd0,%eax
je     11e0 <getMappedElement+0xd0>
jmp    1177 <getMappedElement+0x67>
mov    -0x8(%rbp),%eax
sub    $0xd1,%eax
je     11ec <getMappedElement+0xdc>
jmp    118a <getMappedElement+0x7a>
mov    -0x8(%rbp),%eax
sub    $0xd2,%eax
je     1204 <getMappedElement+0xf4>
jmp    119d <getMappedElement+0x8d>
mov    -0x8(%rbp),%eax
sub    $0x128,%eax
je     11f8 <getMappedElement+0xe8>
jmp    1210 <getMappedElement+0x100>
movl   $0x50,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
movl   $0x20,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
movl   $0x268,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
movl   $0x269,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
movl   $0x26a,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
movl   $0x26b,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
movl   $0x26c,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
movl   $0x0,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
cmpl   $0x360,-0x4(%rbp)
jl     1238 <getMappedElement+0x128>
mov    -0x4(%rbp),%edx
mov    $0x2,%edi
lea    0xdd4(%rip),%rsi
call   1030 <Error@plt>
movl   $0x290,-0x4(%rbp)
jmp    123d <getMappedElement+0x12d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMappedElement>:
push   %rax
mov    %edi,%eax
cmp    $0xce,%edi
jle    113d <getMappedElement+0x2d>
lea    -0xcf(%rax),%ecx
cmp    $0x3,%ecx
ja     1153 <getMappedElement+0x43>
lea    0xed3(%rip),%rax
movslq (%rax,%rcx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    $0x269,%eax
pop    %rcx
ret
cmp    $0x5,%eax
je     1161 <getMappedElement+0x51>
cmp    $0x8,%eax
je     119b <getMappedElement+0x8b>
cmp    $0x77,%eax
jne    1168 <getMappedElement+0x58>
mov    $0x268,%eax
pop    %rcx
ret
cmp    $0x128,%eax
jne    1168 <getMappedElement+0x58>
mov    $0x26c,%eax
pop    %rcx
ret
mov    $0x20,%eax
pop    %rcx
ret
cmp    $0x360,%eax
jl     113b <getMappedElement+0x2b>
lea    0xe9a(%rip),%rsi
mov    $0x2,%edi
mov    %eax,%edx
call   1030 <Error@plt>
mov    $0x290,%eax
pop    %rcx
ret
mov    $0x26a,%eax
pop    %rcx
ret
mov    $0x26b,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret
mov    $0x50,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"invalid level element %d\00"
define i32 @getMappedElement(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %12 [
i32 8, label %4
i32 5, label %5
i32 119, label %6
i32 207, label %7
i32 208, label %8
i32 209, label %9
i32 296, label %10
i32 210, label %11
]
4: ; preds = %1
store i32 80, i32* %2
br label %19
5: ; preds = %1
store i32 32, i32* %2
br label %19
6: ; preds = %1
store i32 616, i32* %2
br label %19
7: ; preds = %1
store i32 617, i32* %2
br label %19
8: ; preds = %1
store i32 618, i32* %2
br label %19
9: ; preds = %1
store i32 619, i32* %2
br label %19
10: ; preds = %1
store i32 620, i32* %2
br label %19
11: ; preds = %1
store i32 0, i32* %2
br label %19
12: ; preds = %1
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 864
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = call i32 @Error(i32 2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %16)
store i32 656, i32* %2
br label %18
18: ; preds = %15, %12
br label %19
19: ; preds = %18, %11, %10, %9, %8, %7, %6, %5, %4
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [25 x i8] c"invalid level element %d\00"
define i32 @getMappedElement(i32 %0) {
switch i32 %0, label %9 [
i32 8, label %13
i32 5, label %2
i32 119, label %3
i32 207, label %4
i32 208, label %5
i32 209, label %6
i32 296, label %7
i32 210, label %8
]
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
%10 = icmp sgt i32 %0, 863
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = tail call i32 @Error(i32 2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %13
13: ; preds = %1, %9, %11, %8, %7, %6, %5, %4, %3, %2
%14 = phi i32 [ 656, %11 ], [ %0, %9 ], [ 0, %8 ], [ 620, %7 ], [ 619, %6 ], [ 618, %5 ], [ 617, %4 ], [ 616, %3 ], [ 32, %2 ], [ 80, %1 ]
ret i32 %14
}