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

/* Variables and functions */
char *nal_unit_name_of(uint8_t type) {
  static char *name[] = {
      "Unspecified",
      "Coded slice of a non-IDR picture",
      "Coded slice data partition A",
      "Coded slice data partition B",
      "Coded slice data partition C",
      "Coded slice of an IDR picture",
      "Supplemental enhancement information",
      "Sequence parameter set",
      "Picture parameter set",
      "Access unit delimiter",
      "End of sequence",
      "End of stream",
      "Filler data",
      "Sequence parameter set extension",
      "Prefix NAL unit",
      "Subset sequence parameter set",
      "Reserved",
      "Reserved",
      "Reserved",
      "Coded slice of an auxiliary coded picture without partitioning",
      "Coded slice extension",
      "Coded slice extension for depth view components",
      "Reserved",
      "Reserved",
      "Unspecified",
      "Unspecified",
      "Unspecified",
  };
  return name[type];
}


x86 assembly (clang, -O0):
<nal_unit_name_of>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
lea    0x2f1d(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nal_unit_name_of>:
lea    0xef9(%rip),%rcx
movslq (%rcx,%rdi,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@nal_unit_name_of.name = internal global [27 x i8*] [i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0)]
@.str = [12 x i8] c"Unspecified\00"
@.str.1 = [33 x i8] c"Coded slice of a non-IDR picture\00"
@.str.2 = [29 x i8] c"Coded slice data partition A\00"
@.str.3 = [29 x i8] c"Coded slice data partition B\00"
@.str.4 = [29 x i8] c"Coded slice data partition C\00"
@.str.5 = [30 x i8] c"Coded slice of an IDR picture\00"
@.str.6 = [37 x i8] c"Supplemental enhancement information\00"
@.str.7 = [23 x i8] c"Sequence parameter set\00"
@.str.8 = [22 x i8] c"Picture parameter set\00"
@.str.9 = [22 x i8] c"Access unit delimiter\00"
@.str.10 = [16 x i8] c"End of sequence\00"
@.str.11 = [14 x i8] c"End of stream\00"
@.str.12 = [12 x i8] c"Filler data\00"
@.str.13 = [33 x i8] c"Sequence parameter set extension\00"
@.str.14 = [16 x i8] c"Prefix NAL unit\00"
@.str.15 = [30 x i8] c"Subset sequence parameter set\00"
@.str.16 = [9 x i8] c"Reserved\00"
@.str.17 = [63 x i8] c"Coded slice of an auxiliary coded picture without partitioning\00"
@.str.18 = [22 x i8] c"Coded slice extension\00"
@.str.19 = [48 x i8] c"Coded slice extension for depth view components\00"
define i8* @nal_unit_name_of(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = getelementptr inbounds [27 x i8*], [27 x i8*]* @nal_unit_name_of.name, i64 0, i64 %3
%5 = load i8*, i8** %4
ret i8* %5
}

LLVM IR (-O2):
@reltable.nal_unit_name_of = internal unnamed_addr constant [27 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.1 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.2 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.3 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.4 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.5 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([37 x i8]* @.str.6 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.7 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.8 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.9 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.10 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.11 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.12 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.13 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.14 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.15 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.16 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.16 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.16 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([63 x i8]* @.str.17 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.18 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([48 x i8]* @.str.19 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.16 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.16 to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([27 x i32]* @reltable.nal_unit_name_of to i64)) to i32)]
@.str = [12 x i8] c"Unspecified\00"
@.str.1 = [33 x i8] c"Coded slice of a non-IDR picture\00"
@.str.2 = [29 x i8] c"Coded slice data partition A\00"
@.str.3 = [29 x i8] c"Coded slice data partition B\00"
@.str.4 = [29 x i8] c"Coded slice data partition C\00"
@.str.5 = [30 x i8] c"Coded slice of an IDR picture\00"
@.str.6 = [37 x i8] c"Supplemental enhancement information\00"
@.str.7 = [23 x i8] c"Sequence parameter set\00"
@.str.8 = [22 x i8] c"Picture parameter set\00"
@.str.9 = [22 x i8] c"Access unit delimiter\00"
@.str.10 = [16 x i8] c"End of sequence\00"
@.str.11 = [14 x i8] c"End of stream\00"
@.str.12 = [12 x i8] c"Filler data\00"
@.str.13 = [33 x i8] c"Sequence parameter set extension\00"
@.str.14 = [16 x i8] c"Prefix NAL unit\00"
@.str.15 = [30 x i8] c"Subset sequence parameter set\00"
@.str.16 = [9 x i8] c"Reserved\00"
@.str.17 = [63 x i8] c"Coded slice of an auxiliary coded picture without partitioning\00"
@.str.18 = [22 x i8] c"Coded slice extension\00"
@.str.19 = [48 x i8] c"Coded slice extension for depth view components\00"
define i8* @nal_unit_name_of(i64 %0) {
%2 = shl i64 %0, 2
%3 = call i8* @llvm.load.relative.i64(i8* bitcast ([27 x i32]* @reltable.nal_unit_name_of to i8*), i64 %2)
ret i8* %3
}