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

/* Variables and functions */
scalar_t__ strcmp(char *, char *);
char *known_property(char *atom) {
  char *atom_names[] = {"FOUNDRY",
                        "FAMILY_NAME",
                        "WEIGHT_NAME",
                        "SLANT",
                        "SETWIDTH_NAME",
                        "ADD_STYLE_NAME",
                        "SPACING",
                        "CHARSET_REGISTRY",
                        "CHARSET_ENCODING",
                        "FONT",
                        "FACE_NAME",
                        "FULL_NAME",
                        "COPYRIGHT",
                        "NOTICE",
                        "FONT_TYPE",
                        "FONT_VERSION",
                        "RASTERIZER_NAME",
                        "RASTERIZER_VERSION",
                        "_ADOBE_POSTSCRIPT_FONTNAME",
                        "CHARSET_COLLECTIONS",
                        "CLASSIFICATION",
                        "DEVICE_FONT_NAME",
                        "FONTNAME_REGISTRY",
                        "MONOSPACED",
                        "QUALITY",
                        "RELATIVE_SET",
                        "STYLE"};
  for (int i = 0; i < (sizeof(atom_names) / sizeof(atom_names[0])); i++) {
    if (strcmp(atom_names[i], atom) == 0)
      return atom_names[i];
  }
  return NULL;
}


x86 assembly (clang, -O0):
<known_property>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0xf0(%rbp),%rdi
lea    0x2c03(%rip),%rsi
mov    $0xd8,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0xf4(%rbp)
movslq -0xf4(%rbp),%rax
cmp    $0x1b,%rax
jae    11b5 <known_property+0x95>
movslq -0xf4(%rbp),%rax
mov    -0xf0(%rbp,%rax,8),%rdi
ff
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    119c <known_property+0x7c>
movslq -0xf4(%rbp),%rax
mov    -0xf0(%rbp,%rax,8),%rax
ff
mov    %rax,-0x8(%rbp)
jmp    11bd <known_property+0x9d>
jmp    11a1 <known_property+0x81>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1151 <known_property+0x31>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<known_property>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0x2c1c(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rbx,%r12,1),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1154 <known_property+0x44>
add    $0x8,%rbx
cmp    $0xd8,%rbx
jne    1130 <known_property+0x20>
xor    %r15d,%r15d
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"FOUNDRY\00"
@.str.1 = [12 x i8] c"FAMILY_NAME\00"
@.str.2 = [12 x i8] c"WEIGHT_NAME\00"
@.str.3 = [6 x i8] c"SLANT\00"
@.str.4 = [14 x i8] c"SETWIDTH_NAME\00"
@.str.5 = [15 x i8] c"ADD_STYLE_NAME\00"
@.str.6 = [8 x i8] c"SPACING\00"
@.str.7 = [17 x i8] c"CHARSET_REGISTRY\00"
@.str.8 = [17 x i8] c"CHARSET_ENCODING\00"
@.str.9 = [5 x i8] c"FONT\00"
@.str.10 = [10 x i8] c"FACE_NAME\00"
@.str.11 = [10 x i8] c"FULL_NAME\00"
@.str.12 = [10 x i8] c"COPYRIGHT\00"
@.str.13 = [7 x i8] c"NOTICE\00"
@.str.14 = [10 x i8] c"FONT_TYPE\00"
@.str.15 = [13 x i8] c"FONT_VERSION\00"
@.str.16 = [16 x i8] c"RASTERIZER_NAME\00"
@.str.17 = [19 x i8] c"RASTERIZER_VERSION\00"
@.str.18 = [27 x i8] c"_ADOBE_POSTSCRIPT_FONTNAME\00"
@.str.19 = [20 x i8] c"CHARSET_COLLECTIONS\00"
@.str.20 = [15 x i8] c"CLASSIFICATION\00"
@.str.21 = [17 x i8] c"DEVICE_FONT_NAME\00"
@.str.22 = [18 x i8] c"FONTNAME_REGISTRY\00"
@.str.23 = [11 x i8] c"MONOSPACED\00"
@.str.24 = [8 x i8] c"QUALITY\00"
@.str.25 = [13 x i8] c"RELATIVE_SET\00"
@.str.26 = [6 x i8] c"STYLE\00"
@__const.known_property.atom_names = [27 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.26, i32 0, i32 0)]
define i8* @known_property(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [27 x i8*]
%5 = alloca i32
store i8* %0, i8** %3
%6 = bitcast [27 x i8*]* %4 to i8*
store i32 0, i32* %5
br label %7
7: ; preds = %25, %1
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = icmp ult i64 %9, 27
br i1 %10, label %11, label %28
11: ; preds = %7
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [27 x i8*], [27 x i8*]* %4, i64 0, i64 %13
%15 = load i8*, i8** %14
%16 = load i8*, i8** %3
%17 = call i64 @strcmp(i8* %15, i8* %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %11
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [27 x i8*], [27 x i8*]* %4, i64 0, i64 %21
%23 = load i8*, i8** %22
store i8* %23, i8** %2
br label %29
24: ; preds = %11
br label %25
25: ; preds = %24
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %7
28: ; preds = %7
store i8* null, i8** %2
br label %29
29: ; preds = %28, %19
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
@.str = [8 x i8] c"FOUNDRY\00"
@.str.1 = [12 x i8] c"FAMILY_NAME\00"
@.str.2 = [12 x i8] c"WEIGHT_NAME\00"
@.str.3 = [6 x i8] c"SLANT\00"
@.str.4 = [14 x i8] c"SETWIDTH_NAME\00"
@.str.5 = [15 x i8] c"ADD_STYLE_NAME\00"
@.str.6 = [8 x i8] c"SPACING\00"
@.str.7 = [17 x i8] c"CHARSET_REGISTRY\00"
@.str.8 = [17 x i8] c"CHARSET_ENCODING\00"
@.str.9 = [5 x i8] c"FONT\00"
@.str.10 = [10 x i8] c"FACE_NAME\00"
@.str.11 = [10 x i8] c"FULL_NAME\00"
@.str.12 = [10 x i8] c"COPYRIGHT\00"
@.str.13 = [7 x i8] c"NOTICE\00"
@.str.14 = [10 x i8] c"FONT_TYPE\00"
@.str.15 = [13 x i8] c"FONT_VERSION\00"
@.str.16 = [16 x i8] c"RASTERIZER_NAME\00"
@.str.17 = [19 x i8] c"RASTERIZER_VERSION\00"
@.str.18 = [27 x i8] c"_ADOBE_POSTSCRIPT_FONTNAME\00"
@.str.19 = [20 x i8] c"CHARSET_COLLECTIONS\00"
@.str.20 = [15 x i8] c"CLASSIFICATION\00"
@.str.21 = [17 x i8] c"DEVICE_FONT_NAME\00"
@.str.22 = [18 x i8] c"FONTNAME_REGISTRY\00"
@.str.23 = [11 x i8] c"MONOSPACED\00"
@.str.24 = [8 x i8] c"QUALITY\00"
@.str.25 = [13 x i8] c"RELATIVE_SET\00"
@.str.26 = [6 x i8] c"STYLE\00"
@__const.known_property.atom_names = [27 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.26, i32 0, i32 0)]
define i8* @known_property(i8* %0) {
br label %5
2: ; preds = %5
%3 = add nuw nsw i64 %6, 1
%4 = icmp eq i64 %3, 27
br i1 %4, label %11, label %5
5: ; preds = %1, %2
%6 = phi i64 [ 0, %1 ], [ %3, %2 ]
%7 = getelementptr inbounds [27 x i8*], [27 x i8*]* @__const.known_property.atom_names, i64 0, i64 %6
%8 = load i8*, i8** %7
%9 = tail call i64 @strcmp(i8* %8, i8* %0)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %5, %2
%12 = phi i8* [ %8, %5 ], [ null, %2 ]
ret i8* %12
}