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

/* Variables and functions */
const char *brandname(int i) {
  const static char *brandmap[] = {NULL,
                                   "Intel(R) Celeron(R) processor",
                                   "Intel(R) Pentium(R) III processor",
                                   "Intel(R) Pentium(R) III Xeon(tm) processor",
                                   "Intel(R) Pentium(R) III processor",
                                   NULL,
                                   "Mobile Intel(R) Pentium(R) III processor-M",
                                   "Mobile Intel(R) Celeron(R) processor"};
  if (i >= sizeof(brandmap))
    return NULL;
  else
    return brandmap[i];
}


x86 assembly (clang, -O0):
<brandname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x40,%rax
jb     1122 <brandname+0x22>
movq   $0x0,-0x8(%rbp)
jmp    1135 <brandname+0x35>
movslq -0xc(%rbp),%rcx
lea    0x2f03(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<brandname>:
cmp    $0x3f,%edi
jbe    1108 <brandname+0x8>
xor    %eax,%eax
ret
mov    %edi,%eax
lea    0x2cff(%rip),%rcx
mov    (%rcx,%rax,8),%rax
ret

LLVM IR (-O0):
@brandname.brandmap = internal global [8 x i8*] [i8* null, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i32 0, i32 0)]
@.str = [30 x i8] c"Intel(R) Celeron(R) processor\00"
@.str.1 = [34 x i8] c"Intel(R) Pentium(R) III processor\00"
@.str.2 = [43 x i8] c"Intel(R) Pentium(R) III Xeon(tm) processor\00"
@.str.3 = [43 x i8] c"Mobile Intel(R) Pentium(R) III processor-M\00"
@.str.4 = [37 x i8] c"Mobile Intel(R) Celeron(R) processor\00"
define i8* @brandname(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = icmp uge i64 %5, 64
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %13
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [8 x i8*], [8 x i8*]* @brandname.brandmap, i64 0, i64 %10
%12 = load i8*, i8** %11
store i8* %12, i8** %2
br label %13
13: ; preds = %8, %7
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@brandname.brandmap = internal unnamed_addr constant [8 x i8*] [i8* null, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i32 0, i32 0), i8* null, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i32 0, i32 0)]
@.str = [30 x i8] c"Intel(R) Celeron(R) processor\00"
@.str.1 = [34 x i8] c"Intel(R) Pentium(R) III processor\00"
@.str.2 = [43 x i8] c"Intel(R) Pentium(R) III Xeon(tm) processor\00"
@.str.3 = [43 x i8] c"Mobile Intel(R) Pentium(R) III processor-M\00"
@.str.4 = [37 x i8] c"Mobile Intel(R) Celeron(R) processor\00"
define i8* @brandname(i32 %0) {
%2 = icmp ugt i32 %0, 63
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = zext i32 %0 to i64
%5 = getelementptr inbounds [8 x i8*], [8 x i8*]* @brandname.brandmap, i64 0, i64 %4
%6 = load i8*, i8** %5
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}