#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 /*<<< orphan*/ visibility_name;

/* Variables and functions */
#define STV_DEFAULT 131
#define STV_HIDDEN 130
#define STV_INTERNAL 129
#define STV_PROTECTED 128
const char *sym_visibility(unsigned visibility) {
  static const char *visibility_name[] = {
      [STV_DEFAULT] = "STV_DEFAULT",
      [STV_INTERNAL] = "STV_INTERNAL",
      [STV_HIDDEN] = "STV_HIDDEN",
      [STV_PROTECTED] = "STV_PROTECTED",
  };
  const char *name = "unknown sym visibility name";
  if (visibility < (sizeof(visibility_name) / sizeof((visibility_name)[0]))) {
    name = visibility_name[visibility];
  }
  return name;
}


x86 assembly (clang, -O0):
<sym_visibility>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xf24(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x84,%rax
jae    1135 <sym_visibility+0x35>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0x2f03(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sym_visibility>:
cmp    $0x83,%edi
ja     1116 <sym_visibility+0x16>
mov    %edi,%eax
lea    0x291f(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret
lea    0xf15(%rip),%rax
ret

LLVM IR (-O0):
@sym_visibility.visibility_name = internal global [132 x i8*] [i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i32 0, i32 0)]
@.str = [14 x i8] c"STV_PROTECTED\00"
@.str.1 = [13 x i8] c"STV_INTERNAL\00"
@.str.2 = [11 x i8] c"STV_HIDDEN\00"
@.str.3 = [12 x i8] c"STV_DEFAULT\00"
@.str.4 = [28 x i8] c"unknown sym visibility name\00"
define i8* @sym_visibility(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), i8** %3
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = icmp ult i64 %5, 132
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [132 x i8*], [132 x i8*]* @sym_visibility.visibility_name, i64 0, i64 %9
%11 = load i8*, i8** %10
store i8* %11, i8** %3
br label %12
12: ; preds = %7, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@sym_visibility.visibility_name = internal unnamed_addr constant [132 x i8*] [i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* null, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i32 0, i32 0)]
@.str = [14 x i8] c"STV_PROTECTED\00"
@.str.1 = [13 x i8] c"STV_INTERNAL\00"
@.str.2 = [11 x i8] c"STV_HIDDEN\00"
@.str.3 = [12 x i8] c"STV_DEFAULT\00"
@.str.4 = [28 x i8] c"unknown sym visibility name\00"
define i8* @sym_visibility(i32 %0) {
%2 = icmp ult i32 %0, 132
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = zext i32 %0 to i64
%5 = getelementptr inbounds [132 x i8*], [132 x i8*]* @sym_visibility.visibility_name, i64 0, i64 %4
%6 = load i8*, i8** %5
br label %7
7: ; preds = %3, %1
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0), %1 ]
ret i8* %8
}