#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 uint8_t;

/* Variables and functions */
const char *mp2vseqx_get_level_txt(uint8_t i_profilelevel) {
  if (i_profilelevel & (1 << 7)) {
    return i_profilelevel == 0x8e                             ? "Low"
           : i_profilelevel == 0x8d || i_profilelevel == 0x85 ? "Main"
           : i_profilelevel == 0x8a || i_profilelevel == 0x82 ? "High 1440"
           : i_profilelevel == 0x8b                           ? "High"
                                                              : "Reserved";
  } else {
    i_profilelevel &= 0xf;
    return i_profilelevel == 10  ? "Low"
           : i_profilelevel == 8 ? "Main"
           : i_profilelevel == 6 ? "High 1440"
           : i_profilelevel == 4 ? "High"
           : i_profilelevel == 2 ? "HighP"
                                 : "Reserved";
  }
}


x86 assembly (clang, -O0):
<mp2vseqx_get_level_txt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     11c5 <mp2vseqx_get_level_txt+0xc5>
cmpl   $0x8e,-0xc(%rbp)
jne    1135 <mp2vseqx_get_level_txt+0x35>
lea    0xed4(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    11b8 <mp2vseqx_get_level_txt+0xb8>
cmpl   $0x8d,-0xc(%rbp)
je     114f <mp2vseqx_get_level_txt+0x4f>
cmpl   $0x85,-0xc(%rbp)
jne    115f <mp2vseqx_get_level_txt+0x5f>
lea    0xeae(%rip),%rax
mov    %rax,-0x20(%rbp)
jmp    11b0 <mp2vseqx_get_level_txt+0xb0>
cmpl   $0x8a,-0xc(%rbp)
je     1179 <mp2vseqx_get_level_txt+0x79>
cmpl   $0x82,-0xc(%rbp)
jne    1189 <mp2vseqx_get_level_txt+0x89>
lea    0xe89(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    11a8 <mp2vseqx_get_level_txt+0xa8>
mov    -0xc(%rbp),%edx
lea    0xe85(%rip),%rax
lea    0xe79(%rip),%rcx
cmp    $0x8b,%edx
cmove  %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1272 <mp2vseqx_get_level_txt+0x172>
mov    -0xc(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jne    11e8 <mp2vseqx_get_level_txt+0xe8>
lea    0xe21(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    126a <mp2vseqx_get_level_txt+0x16a>
cmpl   $0x8,-0xc(%rbp)
jne    1202 <mp2vseqx_get_level_txt+0x102>
lea    0xe0b(%rip),%rax
mov    %rax,-0x38(%rbp)
jmp    1262 <mp2vseqx_get_level_txt+0x162>
cmpl   $0x6,-0xc(%rbp)
jne    121c <mp2vseqx_get_level_txt+0x11c>
lea    0xdf6(%rip),%rax
mov    %rax,-0x40(%rbp)
jmp    125a <mp2vseqx_get_level_txt+0x15a>
cmpl   $0x4,-0xc(%rbp)
jne    1236 <mp2vseqx_get_level_txt+0x136>
lea    0xde6(%rip),%rax
mov    %rax,-0x48(%rbp)
jmp    1252 <mp2vseqx_get_level_txt+0x152>
mov    -0xc(%rbp),%edx
lea    0xdd8(%rip),%rax
lea    0xdda(%rip),%rcx
cmp    $0x2,%edx
cmove  %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vseqx_get_level_txt>:
test   $0x80,%dil
jne    1131 <mp2vseqx_get_level_txt+0x31>
and    $0xf,%edi
lea    -0x4(%rdi),%eax
cmp    $0x7,%eax
jae    111b <mp2vseqx_get_level_txt+0x1b>
mov    $0x55,%ecx
bt     %eax,%ecx
jb     115c <mp2vseqx_get_level_txt+0x5c>
cmp    $0x2,%edi
lea    0xefc(%rip),%rcx
lea    0xeec(%rip),%rax
cmove  %rcx,%rax
ret
cmp    $0x8e,%edi
jne    1141 <mp2vseqx_get_level_txt+0x41>
lea    0xec0(%rip),%rax
ret
mov    %edi,%eax
and    $0xfffffff7,%eax
cmp    $0x82,%eax
je     116d <mp2vseqx_get_level_txt+0x6d>
cmp    $0x85,%eax
jne    1175 <mp2vseqx_get_level_txt+0x75>
lea    0xea9(%rip),%rax
ret
cltq
lea    0xec3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xe95(%rip),%rax
ret
cmp    $0x8b,%edi
lea    0xe91(%rip),%rcx
jmp    1125 <mp2vseqx_get_level_txt+0x25>

LLVM IR (-O0):
@.str = [4 x i8] c"Low\00"
@.str.1 = [5 x i8] c"Main\00"
@.str.2 = [10 x i8] c"High 1440\00"
@.str.3 = [5 x i8] c"High\00"
@.str.4 = [9 x i8] c"Reserved\00"
@.str.5 = [6 x i8] c"HighP\00"
define i8* @mp2vseqx_get_level_txt(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 128
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %36
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 142
br i1 %9, label %10, label %11
10: ; preds = %7
br label %34
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 141
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 133
br i1 %16, label %17, label %18
17: ; preds = %14, %11
br label %32
18: ; preds = %14
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 138
br i1 %20, label %24, label %21
21: ; preds = %18
%22 = load i32, i32* %3
%23 = icmp eq i32 %22, 130
br i1 %23, label %24, label %25
24: ; preds = %21, %18
br label %30
25: ; preds = %21
%26 = load i32, i32* %3
%27 = icmp eq i32 %26, 139
%28 = zext i1 %27 to i64
%29 = select i1 %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0)
br label %30
30: ; preds = %25, %24
%31 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %24 ], [ %29, %25 ]
br label %32
32: ; preds = %30, %17
%33 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %17 ], [ %31, %30 ]
br label %34
34: ; preds = %32, %10
%35 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %10 ], [ %33, %32 ]
store i8* %35, i8** %2
br label %67
36: ; preds = %1
%37 = load i32, i32* %3
%38 = and i32 %37, 15
store i32 %38, i32* %3
%39 = load i32, i32* %3
%40 = icmp eq i32 %39, 10
br i1 %40, label %41, label %42
41: ; preds = %36
br label %65
42: ; preds = %36
%43 = load i32, i32* %3
%44 = icmp eq i32 %43, 8
br i1 %44, label %45, label %46
45: ; preds = %42
br label %63
46: ; preds = %42
%47 = load i32, i32* %3
%48 = icmp eq i32 %47, 6
br i1 %48, label %49, label %50
49: ; preds = %46
br label %61
50: ; preds = %46
%51 = load i32, i32* %3
%52 = icmp eq i32 %51, 4
br i1 %52, label %53, label %54
53: ; preds = %50
br label %59
54: ; preds = %50
%55 = load i32, i32* %3
%56 = icmp eq i32 %55, 2
%57 = zext i1 %56 to i64
%58 = select i1 %56, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0)
br label %59
59: ; preds = %54, %53
%60 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %53 ], [ %58, %54 ]
br label %61
61: ; preds = %59, %49
%62 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %49 ], [ %60, %59 ]
br label %63
63: ; preds = %61, %45
%64 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %45 ], [ %62, %61 ]
br label %65
65: ; preds = %63, %41
%66 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %41 ], [ %64, %63 ]
store i8* %66, i8** %2
br label %67
67: ; preds = %65, %34
%68 = load i8*, i8** %2
ret i8* %68
}

LLVM IR (-O2):
@.str = [4 x i8] c"Low\00"
@.str.1 = [5 x i8] c"Main\00"
@.str.2 = [10 x i8] c"High 1440\00"
@.str.3 = [5 x i8] c"High\00"
@.str.4 = [9 x i8] c"Reserved\00"
@.str.5 = [6 x i8] c"HighP\00"
@reltable.mp2vseqx_get_level_txt = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.3 to i64), i64 ptrtoint ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.1 to i64), i64 ptrtoint ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i64)) to i32)]
define i8* @mp2vseqx_get_level_txt(i32 %0) {
%2 = and i32 %0, 128
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = icmp eq i32 %0, 142
br i1 %5, label %28, label %6
6: ; preds = %4
%7 = and i32 %0, -9
switch i32 %7, label %8 [
i32 133, label %28
i32 130, label %18
]
8: ; preds = %6
%9 = icmp eq i32 %0, 139
%10 = select i1 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0)
br label %28
11: ; preds = %1
%12 = and i32 %0, 15
%13 = add nsw i32 %12, -4
%14 = icmp ult i32 %13, 7
br i1 %14, label %19, label %15
15: ; preds = %19, %11
%16 = icmp eq i32 %12, 2
%17 = select i1 %16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0)
br label %28
18: ; preds = %6
br label %28
19: ; preds = %11
%20 = trunc i32 %13 to i8
%21 = lshr i8 85, %20
%22 = and i8 %21, 1
%23 = icmp eq i8 %22, 0
br i1 %23, label %15, label %24
24: ; preds = %19
%25 = sext i32 %13 to i64
%26 = shl i64 %25, 2
%27 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.mp2vseqx_get_level_txt to i8*), i64 %26)
br label %28
28: ; preds = %24, %6, %18, %15, %4, %8
%29 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %4 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %6 ], [ %10, %8 ], [ %17, %15 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %18 ], [ %27, %24 ]
ret i8* %29
}