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

/* Variables and functions */
int BOOT_TIME;
int DEAD_PROCESS;
int EMPTY;
int INIT_PROCESS;
int LOGIN_PROCESS;
int NEW_TIME;
int OLD_TIME;
int USER_PROCESS;
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
extern int _p_ut_constant(char *constname) {
  int ret = -1;
  if (strlen(constname) >= 3) {
    if (strncmp(constname, "EMP", 3) == 0) {
      ret = EMPTY;
    } else if (strncmp(constname, "BOO", 3) == 0) {
      ret = BOOT_TIME;
    } else if (strncmp(constname, "OLD", 3) == 0) {
      ret = OLD_TIME;
    } else if (strncmp(constname, "NEW", 3) == 0) {
      ret = NEW_TIME;
    } else if (strncmp(constname, "USE", 3) == 0) {
      ret = USER_PROCESS;
    } else if (strncmp(constname, "INI", 3) == 0) {
      ret = INIT_PROCESS;
    } else if (strncmp(constname, "LOG", 3) == 0) {
      ret = LOGIN_PROCESS;
    } else if (strncmp(constname, "DEA", 3) == 0) {
      ret = DEAD_PROCESS;
    } else if (strncmp(constname, "RUN", 3) == 0) {
      ret = 99;
    } else if (strncmp(constname, "ACC", 3) == 0) {
      ret = 99;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<_p_ut_constant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x3,%eax
jl     1348 <_p_ut_constant+0x228>
mov    -0x8(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1175 <_p_ut_constant+0x55>
mov    0x2e7d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1343 <_p_ut_constant+0x223>
mov    -0x8(%rbp),%rdi
lea    0xe84(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11a5 <_p_ut_constant+0x85>
mov    0x2e1d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    133e <_p_ut_constant+0x21e>
mov    -0x8(%rbp),%rdi
lea    0xe58(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11d5 <_p_ut_constant+0xb5>
mov    0x2e05(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1339 <_p_ut_constant+0x219>
mov    -0x8(%rbp),%rdi
lea    0xe2c(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1205 <_p_ut_constant+0xe5>
mov    0x2ddd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1334 <_p_ut_constant+0x214>
mov    -0x8(%rbp),%rdi
lea    0xe00(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1235 <_p_ut_constant+0x115>
mov    0x2db5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    132f <_p_ut_constant+0x20f>
mov    -0x8(%rbp),%rdi
lea    0xdd4(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1265 <_p_ut_constant+0x145>
mov    0x2d65(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    132a <_p_ut_constant+0x20a>
mov    -0x8(%rbp),%rdi
lea    0xda8(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1295 <_p_ut_constant+0x175>
mov    0x2d15(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1325 <_p_ut_constant+0x205>
mov    -0x8(%rbp),%rdi
lea    0xd7c(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12c5 <_p_ut_constant+0x1a5>
mov    0x2cf5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1320 <_p_ut_constant+0x200>
mov    -0x8(%rbp),%rdi
lea    0xd50(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12f0 <_p_ut_constant+0x1d0>
movl   $0x63,-0xc(%rbp)
jmp    131b <_p_ut_constant+0x1fb>
mov    -0x8(%rbp),%rdi
lea    0xd29(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1316 <_p_ut_constant+0x1f6>
movl   $0x63,-0xc(%rbp)
jmp    131b <_p_ut_constant+0x1fb>
jmp    1320 <_p_ut_constant+0x200>
jmp    1325 <_p_ut_constant+0x205>
jmp    132a <_p_ut_constant+0x20a>
jmp    132f <_p_ut_constant+0x20f>
jmp    1334 <_p_ut_constant+0x214>
jmp    1339 <_p_ut_constant+0x219>
jmp    133e <_p_ut_constant+0x21e>
jmp    1343 <_p_ut_constant+0x223>
jmp    1348 <_p_ut_constant+0x228>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_p_ut_constant>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x3,%ecx
jl     1252 <_p_ut_constant+0x132>
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1254 <_p_ut_constant+0x134>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     125d <_p_ut_constant+0x13d>
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1266 <_p_ut_constant+0x146>
lea    0xe75(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     126f <_p_ut_constant+0x14f>
lea    0xe5c(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1278 <_p_ut_constant+0x158>
lea    0xe43(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1281 <_p_ut_constant+0x161>
lea    0xe2a(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     128a <_p_ut_constant+0x16a>
lea    0xe11(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1293 <_p_ut_constant+0x173>
lea    0xdfc(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     129e <_p_ut_constant+0x17e>
lea    0xde7(%rip),%rsi
mov    %rbx,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
neg    %rax
sbb    %eax,%eax
or     $0x63,%eax
pop    %rbx
ret
mov    0x2d8d(%rip),%rax
jmp    129a <_p_ut_constant+0x17a>
mov    0x2d54(%rip),%rax
jmp    129a <_p_ut_constant+0x17a>
mov    0x2d63(%rip),%rax
jmp    129a <_p_ut_constant+0x17a>
mov    0x2d62(%rip),%rax
jmp    129a <_p_ut_constant+0x17a>
mov    0x2d61(%rip),%rax
jmp    129a <_p_ut_constant+0x17a>
mov    0x2d38(%rip),%rax
jmp    129a <_p_ut_constant+0x17a>
mov    0x2d0f(%rip),%rax
jmp    129a <_p_ut_constant+0x17a>
mov    0x2d16(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret
mov    $0x63,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"EMP\00"
@EMPTY = global i32 0
@.str.1 = [4 x i8] c"BOO\00"
@BOOT_TIME = global i32 0
@.str.2 = [4 x i8] c"OLD\00"
@OLD_TIME = global i32 0
@.str.3 = [4 x i8] c"NEW\00"
@NEW_TIME = global i32 0
@.str.4 = [4 x i8] c"USE\00"
@USER_PROCESS = global i32 0
@.str.5 = [4 x i8] c"INI\00"
@INIT_PROCESS = global i32 0
@.str.6 = [4 x i8] c"LOG\00"
@LOGIN_PROCESS = global i32 0
@.str.7 = [4 x i8] c"DEA\00"
@DEAD_PROCESS = global i32 0
@.str.8 = [4 x i8] c"RUN\00"
@.str.9 = [4 x i8] c"ACC\00"
define i32 @_p_ut_constant(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 -1, i32* %3
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = icmp sge i32 %5, 3
br i1 %6, label %7, label %75
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i64 @strncmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = load i32, i32* @EMPTY
store i32 %12, i32* %3
br label %74
13: ; preds = %7
%14 = load i8*, i8** %2
%15 = call i64 @strncmp(i8* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i32, i32* @BOOT_TIME
store i32 %18, i32* %3
br label %73
19: ; preds = %13
%20 = load i8*, i8** %2
%21 = call i64 @strncmp(i8* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = load i32, i32* @OLD_TIME
store i32 %24, i32* %3
br label %72
25: ; preds = %19
%26 = load i8*, i8** %2
%27 = call i64 @strncmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %25
%30 = load i32, i32* @NEW_TIME
store i32 %30, i32* %3
br label %71
31: ; preds = %25
%32 = load i8*, i8** %2
%33 = call i64 @strncmp(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = load i32, i32* @USER_PROCESS
store i32 %36, i32* %3
br label %70
37: ; preds = %31
%38 = load i8*, i8** %2
%39 = call i64 @strncmp(i8* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = load i32, i32* @INIT_PROCESS
store i32 %42, i32* %3
br label %69
43: ; preds = %37
%44 = load i8*, i8** %2
%45 = call i64 @strncmp(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = load i32, i32* @LOGIN_PROCESS
store i32 %48, i32* %3
br label %68
49: ; preds = %43
%50 = load i8*, i8** %2
%51 = call i64 @strncmp(i8* %50, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %49
%54 = load i32, i32* @DEAD_PROCESS
store i32 %54, i32* %3
br label %67
55: ; preds = %49
%56 = load i8*, i8** %2
%57 = call i64 @strncmp(i8* %56, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %60
59: ; preds = %55
store i32 99, i32* %3
br label %66
60: ; preds = %55
%61 = load i8*, i8** %2
%62 = call i64 @strncmp(i8* %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %65
64: ; preds = %60
store i32 99, i32* %3
br label %65
65: ; preds = %64, %60
br label %66
66: ; preds = %65, %59
br label %67
67: ; preds = %66, %53
br label %68
68: ; preds = %67, %47
br label %69
69: ; preds = %68, %41
br label %70
70: ; preds = %69, %35
br label %71
71: ; preds = %70, %29
br label %72
72: ; preds = %71, %23
br label %73
73: ; preds = %72, %17
br label %74
74: ; preds = %73, %11
br label %75
75: ; preds = %74, %1
%76 = load i32, i32* %3
ret i32 %76
}

LLVM IR (-O2):
@.str = [4 x i8] c"EMP\00"
@EMPTY = global i32 0
@.str.1 = [4 x i8] c"BOO\00"
@BOOT_TIME = global i32 0
@.str.2 = [4 x i8] c"OLD\00"
@OLD_TIME = global i32 0
@.str.3 = [4 x i8] c"NEW\00"
@NEW_TIME = global i32 0
@.str.4 = [4 x i8] c"USE\00"
@USER_PROCESS = global i32 0
@.str.5 = [4 x i8] c"INI\00"
@INIT_PROCESS = global i32 0
@.str.6 = [4 x i8] c"LOG\00"
@LOGIN_PROCESS = global i32 0
@.str.7 = [4 x i8] c"DEA\00"
@DEAD_PROCESS = global i32 0
@.str.8 = [4 x i8] c"RUN\00"
@.str.9 = [4 x i8] c"ACC\00"
define i32 @_p_ut_constant(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 2
br i1 %3, label %4, label %51
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = load i32, i32* @EMPTY
br label %51
9: ; preds = %4
%10 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* @BOOT_TIME
br label %51
14: ; preds = %9
%15 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = load i32, i32* @OLD_TIME
br label %51
19: ; preds = %14
%20 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = load i32, i32* @NEW_TIME
br label %51
24: ; preds = %19
%25 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = load i32, i32* @USER_PROCESS
br label %51
29: ; preds = %24
%30 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = load i32, i32* @INIT_PROCESS
br label %51
34: ; preds = %29
%35 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = load i32, i32* @LOGIN_PROCESS
br label %51
39: ; preds = %34
%40 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = load i32, i32* @DEAD_PROCESS
br label %51
44: ; preds = %39
%45 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%46 = icmp eq i64 %45, 0
br i1 %46, label %51, label %47
47: ; preds = %44
%48 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%49 = icmp eq i64 %48, 0
%50 = select i1 %49, i32 99, i32 -1
br label %51
51: ; preds = %47, %44, %7, %17, %27, %37, %42, %32, %22, %12, %1
%52 = phi i32 [ %8, %7 ], [ %13, %12 ], [ %18, %17 ], [ %23, %22 ], [ %28, %27 ], [ %33, %32 ], [ %38, %37 ], [ %43, %42 ], [ -1, %1 ], [ 99, %44 ], [ %50, %47 ]
ret i32 %52
}