#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 LOG_AUTH;
int LOG_AUTHPRIV;
int LOG_CRON;
int LOG_DAEMON;
int LOG_FTP;
int LOG_KERN;
int LOG_LOCAL0;
int LOG_LOCAL1;
int LOG_LOCAL2;
int LOG_LOCAL3;
int LOG_LOCAL4;
int LOG_LOCAL5;
int LOG_LOCAL6;
int LOG_LOCAL7;
int LOG_LPR;
int LOG_MAIL;
int LOG_NEWS;
int LOG_SYSLOG;
int LOG_USER;
int LOG_UUCP;
scalar_t__ strcmp(char *, char *);
int snoopy_syslog_convert_facilityToInt(char *facilityStr) {
  char *facilityStrAdj;
  int facilityInt;
  facilityStrAdj = facilityStr;
  if ('_' == facilityStr[3]) {
    facilityStrAdj = &facilityStr[4];
  }
  if (strcmp(facilityStrAdj, "AUTH") == 0) {
    facilityInt = LOG_AUTH;
  } else if (strcmp(facilityStrAdj, "AUTHPRIV") == 0) {
    facilityInt = LOG_AUTHPRIV;
  } else if (strcmp(facilityStrAdj, "CRON") == 0) {
    facilityInt = LOG_CRON;
  } else if (strcmp(facilityStrAdj, "DAEMON") == 0) {
    facilityInt = LOG_DAEMON;
  } else if (strcmp(facilityStrAdj, "FTP") == 0) {
    facilityInt = LOG_FTP;
  } else if (strcmp(facilityStrAdj, "KERN") == 0) {
    facilityInt = LOG_KERN;
  } else if (strcmp(facilityStrAdj, "LOCAL0") == 0) {
    facilityInt = LOG_LOCAL0;
  } else if (strcmp(facilityStrAdj, "LOCAL1") == 0) {
    facilityInt = LOG_LOCAL1;
  } else if (strcmp(facilityStrAdj, "LOCAL2") == 0) {
    facilityInt = LOG_LOCAL2;
  } else if (strcmp(facilityStrAdj, "LOCAL3") == 0) {
    facilityInt = LOG_LOCAL3;
  } else if (strcmp(facilityStrAdj, "LOCAL4") == 0) {
    facilityInt = LOG_LOCAL4;
  } else if (strcmp(facilityStrAdj, "LOCAL5") == 0) {
    facilityInt = LOG_LOCAL5;
  } else if (strcmp(facilityStrAdj, "LOCAL6") == 0) {
    facilityInt = LOG_LOCAL6;
  } else if (strcmp(facilityStrAdj, "LOCAL7") == 0) {
    facilityInt = LOG_LOCAL7;
  } else if (strcmp(facilityStrAdj, "LPR") == 0) {
    facilityInt = LOG_LPR;
  } else if (strcmp(facilityStrAdj, "MAIL") == 0) {
    facilityInt = LOG_MAIL;
  } else if (strcmp(facilityStrAdj, "NEWS") == 0) {
    facilityInt = LOG_NEWS;
  } else if (strcmp(facilityStrAdj, "SYSLOG") == 0) {
    facilityInt = LOG_SYSLOG;
  } else if (strcmp(facilityStrAdj, "USER") == 0) {
    facilityInt = LOG_USER;
  } else if (strcmp(facilityStrAdj, "UUCP") == 0) {
    facilityInt = LOG_UUCP;
  } else {
    facilityInt = -1;
  }
  return facilityInt;
}


x86 assembly (clang, -O0):
<snoopy_syslog_convert_facilityToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%ecx
mov    $0x5f,%eax
cmp    %ecx,%eax
jne    1145 <snoopy_syslog_convert_facilityToInt+0x35>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb0(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1170 <snoopy_syslog_convert_facilityToInt+0x60>
mov    0x2e4a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1507 <snoopy_syslog_convert_facilityToInt+0x3f7>
mov    -0x10(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    119b <snoopy_syslog_convert_facilityToInt+0x8b>
mov    0x2dcf(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1502 <snoopy_syslog_convert_facilityToInt+0x3f2>
mov    -0x10(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11c6 <snoopy_syslog_convert_facilityToInt+0xb6>
mov    0x2d84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14fd <snoopy_syslog_convert_facilityToInt+0x3ed>
mov    -0x10(%rbp),%rdi
lea    0xe42(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    11f1 <snoopy_syslog_convert_facilityToInt+0xe1>
mov    0x2df9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14f8 <snoopy_syslog_convert_facilityToInt+0x3e8>
mov    -0x10(%rbp),%rdi
lea    0xe1e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    121c <snoopy_syslog_convert_facilityToInt+0x10c>
mov    0x2d5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14f3 <snoopy_syslog_convert_facilityToInt+0x3e3>
mov    -0x10(%rbp),%rdi
lea    0xdf7(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1247 <snoopy_syslog_convert_facilityToInt+0x137>
mov    0x2d2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14ee <snoopy_syslog_convert_facilityToInt+0x3de>
mov    -0x10(%rbp),%rdi
lea    0xdd1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1272 <snoopy_syslog_convert_facilityToInt+0x162>
mov    0x2d50(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14e9 <snoopy_syslog_convert_facilityToInt+0x3d9>
mov    -0x10(%rbp),%rdi
lea    0xdad(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    129d <snoopy_syslog_convert_facilityToInt+0x18d>
mov    0x2ce5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14e4 <snoopy_syslog_convert_facilityToInt+0x3d4>
mov    -0x10(%rbp),%rdi
lea    0xd89(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12c8 <snoopy_syslog_convert_facilityToInt+0x1b8>
mov    0x2d0a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14df <snoopy_syslog_convert_facilityToInt+0x3cf>
mov    -0x10(%rbp),%rdi
lea    0xd65(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    12f3 <snoopy_syslog_convert_facilityToInt+0x1e3>
mov    0x2c9f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14da <snoopy_syslog_convert_facilityToInt+0x3ca>
mov    -0x10(%rbp),%rdi
lea    0xd41(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    131e <snoopy_syslog_convert_facilityToInt+0x20e>
mov    0x2cac(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14d5 <snoopy_syslog_convert_facilityToInt+0x3c5>
mov    -0x10(%rbp),%rdi
lea    0xd1d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1349 <snoopy_syslog_convert_facilityToInt+0x239>
mov    0x2c41(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14d0 <snoopy_syslog_convert_facilityToInt+0x3c0>
mov    -0x10(%rbp),%rdi
lea    0xcf9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1374 <snoopy_syslog_convert_facilityToInt+0x264>
mov    0x2c66(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14cb <snoopy_syslog_convert_facilityToInt+0x3bb>
mov    -0x10(%rbp),%rdi
lea    0xcd5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    139f <snoopy_syslog_convert_facilityToInt+0x28f>
mov    0x2bfb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14c6 <snoopy_syslog_convert_facilityToInt+0x3b6>
mov    -0x10(%rbp),%rdi
lea    0xcb1(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    13ca <snoopy_syslog_convert_facilityToInt+0x2ba>
mov    0x2be0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14c1 <snoopy_syslog_convert_facilityToInt+0x3b1>
mov    -0x10(%rbp),%rdi
lea    0xc8a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    13f5 <snoopy_syslog_convert_facilityToInt+0x2e5>
mov    0x2b65(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14bc <snoopy_syslog_convert_facilityToInt+0x3ac>
mov    -0x10(%rbp),%rdi
lea    0xc64(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1420 <snoopy_syslog_convert_facilityToInt+0x310>
mov    0x2bc2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14b7 <snoopy_syslog_convert_facilityToInt+0x3a7>
mov    -0x10(%rbp),%rdi
lea    0xc3e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    144b <snoopy_syslog_convert_facilityToInt+0x33b>
mov    0x2b57(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14b2 <snoopy_syslog_convert_facilityToInt+0x3a2>
mov    -0x10(%rbp),%rdi
lea    0xc1a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    1476 <snoopy_syslog_convert_facilityToInt+0x366>
mov    0x2b7c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14ad <snoopy_syslog_convert_facilityToInt+0x39d>
mov    -0x10(%rbp),%rdi
lea    0xbf4(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    14a1 <snoopy_syslog_convert_facilityToInt+0x391>
mov    0x2ab1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    14a8 <snoopy_syslog_convert_facilityToInt+0x398>
movl   $0xffffffff,-0x14(%rbp)
jmp    14ad <snoopy_syslog_convert_facilityToInt+0x39d>
jmp    14b2 <snoopy_syslog_convert_facilityToInt+0x3a2>
jmp    14b7 <snoopy_syslog_convert_facilityToInt+0x3a7>
jmp    14bc <snoopy_syslog_convert_facilityToInt+0x3ac>
jmp    14c1 <snoopy_syslog_convert_facilityToInt+0x3b1>
jmp    14c6 <snoopy_syslog_convert_facilityToInt+0x3b6>
jmp    14cb <snoopy_syslog_convert_facilityToInt+0x3bb>
jmp    14d0 <snoopy_syslog_convert_facilityToInt+0x3c0>
jmp    14d5 <snoopy_syslog_convert_facilityToInt+0x3c5>
jmp    14da <snoopy_syslog_convert_facilityToInt+0x3ca>
jmp    14df <snoopy_syslog_convert_facilityToInt+0x3cf>
jmp    14e4 <snoopy_syslog_convert_facilityToInt+0x3d4>
jmp    14e9 <snoopy_syslog_convert_facilityToInt+0x3d9>
jmp    14ee <snoopy_syslog_convert_facilityToInt+0x3de>
jmp    14f3 <snoopy_syslog_convert_facilityToInt+0x3e3>
jmp    14f8 <snoopy_syslog_convert_facilityToInt+0x3e8>
jmp    14fd <snoopy_syslog_convert_facilityToInt+0x3ed>
jmp    1502 <snoopy_syslog_convert_facilityToInt+0x3f2>
jmp    1507 <snoopy_syslog_convert_facilityToInt+0x3f7>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snoopy_syslog_convert_facilityToInt>:
push   %rbx
xor    %eax,%eax
cmpb   $0x5f,0x3(%rdi)
sete   %al
lea    (%rdi,%rax,4),%rbx
lea    0xedb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1305 <snoopy_syslog_convert_facilityToInt+0x1f5>
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1311 <snoopy_syslog_convert_facilityToInt+0x201>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     131d <snoopy_syslog_convert_facilityToInt+0x20d>
lea    0xea6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1329 <snoopy_syslog_convert_facilityToInt+0x219>
lea    0xe95(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1335 <snoopy_syslog_convert_facilityToInt+0x225>
lea    0xe81(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     133e <snoopy_syslog_convert_facilityToInt+0x22e>
lea    0xe6e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1347 <snoopy_syslog_convert_facilityToInt+0x237>
lea    0xe5d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1350 <snoopy_syslog_convert_facilityToInt+0x240>
lea    0xe4c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1359 <snoopy_syslog_convert_facilityToInt+0x249>
lea    0xe3b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1362 <snoopy_syslog_convert_facilityToInt+0x252>
lea    0xe2a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     136b <snoopy_syslog_convert_facilityToInt+0x25b>
lea    0xe19(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1374 <snoopy_syslog_convert_facilityToInt+0x264>
lea    0xe08(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     137d <snoopy_syslog_convert_facilityToInt+0x26d>
lea    0xdf7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1386 <snoopy_syslog_convert_facilityToInt+0x276>
lea    0xde6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     138f <snoopy_syslog_convert_facilityToInt+0x27f>
lea    0xdd2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1398 <snoopy_syslog_convert_facilityToInt+0x288>
lea    0xdbf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13a1 <snoopy_syslog_convert_facilityToInt+0x291>
lea    0xdac(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13aa <snoopy_syslog_convert_facilityToInt+0x29a>
lea    0xd9b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %rax,%rax
je     13b3 <snoopy_syslog_convert_facilityToInt+0x2a3>
lea    0xd88(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    0x2c4c(%rip),%rcx
neg    %rax
sbb    %eax,%eax
or     (%rcx),%eax
pop    %rbx
ret
mov    0x2ca4(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c48(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c1c(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2cb0(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c34(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c23(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c6a(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c21(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c68(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c1f(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c4e(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c05(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c4c(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c03(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c0a(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2bb1(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c30(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2be7(%rip),%rax
jmp    13ba <snoopy_syslog_convert_facilityToInt+0x2aa>
mov    0x2c2e(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"AUTH\00"
@LOG_AUTH = global i32 0
@.str.1 = [9 x i8] c"AUTHPRIV\00"
@LOG_AUTHPRIV = global i32 0
@.str.2 = [5 x i8] c"CRON\00"
@LOG_CRON = global i32 0
@.str.3 = [7 x i8] c"DAEMON\00"
@LOG_DAEMON = global i32 0
@.str.4 = [4 x i8] c"FTP\00"
@LOG_FTP = global i32 0
@.str.5 = [5 x i8] c"KERN\00"
@LOG_KERN = global i32 0
@.str.6 = [7 x i8] c"LOCAL0\00"
@LOG_LOCAL0 = global i32 0
@.str.7 = [7 x i8] c"LOCAL1\00"
@LOG_LOCAL1 = global i32 0
@.str.8 = [7 x i8] c"LOCAL2\00"
@LOG_LOCAL2 = global i32 0
@.str.9 = [7 x i8] c"LOCAL3\00"
@LOG_LOCAL3 = global i32 0
@.str.10 = [7 x i8] c"LOCAL4\00"
@LOG_LOCAL4 = global i32 0
@.str.11 = [7 x i8] c"LOCAL5\00"
@LOG_LOCAL5 = global i32 0
@.str.12 = [7 x i8] c"LOCAL6\00"
@LOG_LOCAL6 = global i32 0
@.str.13 = [7 x i8] c"LOCAL7\00"
@LOG_LOCAL7 = global i32 0
@.str.14 = [4 x i8] c"LPR\00"
@LOG_LPR = global i32 0
@.str.15 = [5 x i8] c"MAIL\00"
@LOG_MAIL = global i32 0
@.str.16 = [5 x i8] c"NEWS\00"
@LOG_NEWS = global i32 0
@.str.17 = [7 x i8] c"SYSLOG\00"
@LOG_SYSLOG = global i32 0
@.str.18 = [5 x i8] c"USER\00"
@LOG_USER = global i32 0
@.str.19 = [5 x i8] c"UUCP\00"
@LOG_UUCP = global i32 0
define i32 @snoopy_syslog_convert_facilityToInt(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 95, %9
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 4
store i8* %13, i8** %3
br label %14
14: ; preds = %11, %1
%15 = load i8*, i8** %3
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load i32, i32* @LOG_AUTH
store i32 %19, i32* %4
br label %154
20: ; preds = %14
%21 = load i8*, i8** %3
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = load i32, i32* @LOG_AUTHPRIV
store i32 %25, i32* %4
br label %153
26: ; preds = %20
%27 = load i8*, i8** %3
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %26
%31 = load i32, i32* @LOG_CRON
store i32 %31, i32* %4
br label %152
32: ; preds = %26
%33 = load i8*, i8** %3
%34 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load i32, i32* @LOG_DAEMON
store i32 %37, i32* %4
br label %151
38: ; preds = %32
%39 = load i8*, i8** %3
%40 = call i64 @strcmp(i8* %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %38
%43 = load i32, i32* @LOG_FTP
store i32 %43, i32* %4
br label %150
44: ; preds = %38
%45 = load i8*, i8** %3
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %44
%49 = load i32, i32* @LOG_KERN
store i32 %49, i32* %4
br label %149
50: ; preds = %44
%51 = load i8*, i8** %3
%52 = call i64 @strcmp(i8* %51, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %50
%55 = load i32, i32* @LOG_LOCAL0
store i32 %55, i32* %4
br label %148
56: ; preds = %50
%57 = load i8*, i8** %3
%58 = call i64 @strcmp(i8* %57, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = load i32, i32* @LOG_LOCAL1
store i32 %61, i32* %4
br label %147
62: ; preds = %56
%63 = load i8*, i8** %3
%64 = call i64 @strcmp(i8* %63, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%65 = icmp eq i64 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %62
%67 = load i32, i32* @LOG_LOCAL2
store i32 %67, i32* %4
br label %146
68: ; preds = %62
%69 = load i8*, i8** %3
%70 = call i64 @strcmp(i8* %69, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = load i32, i32* @LOG_LOCAL3
store i32 %73, i32* %4
br label %145
74: ; preds = %68
%75 = load i8*, i8** %3
%76 = call i64 @strcmp(i8* %75, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %74
%79 = load i32, i32* @LOG_LOCAL4
store i32 %79, i32* %4
br label %144
80: ; preds = %74
%81 = load i8*, i8** %3
%82 = call i64 @strcmp(i8* %81, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %80
%85 = load i32, i32* @LOG_LOCAL5
store i32 %85, i32* %4
br label %143
86: ; preds = %80
%87 = load i8*, i8** %3
%88 = call i64 @strcmp(i8* %87, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %86
%91 = load i32, i32* @LOG_LOCAL6
store i32 %91, i32* %4
br label %142
92: ; preds = %86
%93 = load i8*, i8** %3
%94 = call i64 @strcmp(i8* %93, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %92
%97 = load i32, i32* @LOG_LOCAL7
store i32 %97, i32* %4
br label %141
98: ; preds = %92
%99 = load i8*, i8** %3
%100 = call i64 @strcmp(i8* %99, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%101 = icmp eq i64 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %98
%103 = load i32, i32* @LOG_LPR
store i32 %103, i32* %4
br label %140
104: ; preds = %98
%105 = load i8*, i8** %3
%106 = call i64 @strcmp(i8* %105, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%107 = icmp eq i64 %106, 0
br i1 %107, label %108, label %110
108: ; preds = %104
%109 = load i32, i32* @LOG_MAIL
store i32 %109, i32* %4
br label %139
110: ; preds = %104
%111 = load i8*, i8** %3
%112 = call i64 @strcmp(i8* %111, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%113 = icmp eq i64 %112, 0
br i1 %113, label %114, label %116
114: ; preds = %110
%115 = load i32, i32* @LOG_NEWS
store i32 %115, i32* %4
br label %138
116: ; preds = %110
%117 = load i8*, i8** %3
%118 = call i64 @strcmp(i8* %117, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
%119 = icmp eq i64 %118, 0
br i1 %119, label %120, label %122
120: ; preds = %116
%121 = load i32, i32* @LOG_SYSLOG
store i32 %121, i32* %4
br label %137
122: ; preds = %116
%123 = load i8*, i8** %3
%124 = call i64 @strcmp(i8* %123, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%125 = icmp eq i64 %124, 0
br i1 %125, label %126, label %128
126: ; preds = %122
%127 = load i32, i32* @LOG_USER
store i32 %127, i32* %4
br label %136
128: ; preds = %122
%129 = load i8*, i8** %3
%130 = call i64 @strcmp(i8* %129, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
%131 = icmp eq i64 %130, 0
br i1 %131, label %132, label %134
132: ; preds = %128
%133 = load i32, i32* @LOG_UUCP
store i32 %133, i32* %4
br label %135
134: ; preds = %128
store i32 -1, i32* %4
br label %135
135: ; preds = %134, %132
br label %136
136: ; preds = %135, %126
br label %137
137: ; preds = %136, %120
br label %138
138: ; preds = %137, %114
br label %139
139: ; preds = %138, %108
br label %140
140: ; preds = %139, %102
br label %141
141: ; preds = %140, %96
br label %142
142: ; preds = %141, %90
br label %143
143: ; preds = %142, %84
br label %144
144: ; preds = %143, %78
br label %145
145: ; preds = %144, %72
br label %146
146: ; preds = %145, %66
br label %147
147: ; preds = %146, %60
br label %148
148: ; preds = %147, %54
br label %149
149: ; preds = %148, %48
br label %150
150: ; preds = %149, %42
br label %151
151: ; preds = %150, %36
br label %152
152: ; preds = %151, %30
br label %153
153: ; preds = %152, %24
br label %154
154: ; preds = %153, %18
%155 = load i32, i32* %4
ret i32 %155
}

LLVM IR (-O2):
@.str = [5 x i8] c"AUTH\00"
@LOG_AUTH = global i32 0
@.str.1 = [9 x i8] c"AUTHPRIV\00"
@LOG_AUTHPRIV = global i32 0
@.str.2 = [5 x i8] c"CRON\00"
@LOG_CRON = global i32 0
@.str.3 = [7 x i8] c"DAEMON\00"
@LOG_DAEMON = global i32 0
@.str.4 = [4 x i8] c"FTP\00"
@LOG_FTP = global i32 0
@.str.5 = [5 x i8] c"KERN\00"
@LOG_KERN = global i32 0
@.str.6 = [7 x i8] c"LOCAL0\00"
@LOG_LOCAL0 = global i32 0
@.str.7 = [7 x i8] c"LOCAL1\00"
@LOG_LOCAL1 = global i32 0
@.str.8 = [7 x i8] c"LOCAL2\00"
@LOG_LOCAL2 = global i32 0
@.str.9 = [7 x i8] c"LOCAL3\00"
@LOG_LOCAL3 = global i32 0
@.str.10 = [7 x i8] c"LOCAL4\00"
@LOG_LOCAL4 = global i32 0
@.str.11 = [7 x i8] c"LOCAL5\00"
@LOG_LOCAL5 = global i32 0
@.str.12 = [7 x i8] c"LOCAL6\00"
@LOG_LOCAL6 = global i32 0
@.str.13 = [7 x i8] c"LOCAL7\00"
@LOG_LOCAL7 = global i32 0
@.str.14 = [4 x i8] c"LPR\00"
@LOG_LPR = global i32 0
@.str.15 = [5 x i8] c"MAIL\00"
@LOG_MAIL = global i32 0
@.str.16 = [5 x i8] c"NEWS\00"
@LOG_NEWS = global i32 0
@.str.17 = [7 x i8] c"SYSLOG\00"
@LOG_SYSLOG = global i32 0
@.str.18 = [5 x i8] c"USER\00"
@LOG_USER = global i32 0
@.str.19 = [5 x i8] c"UUCP\00"
@LOG_UUCP = global i32 0
define i32 @snoopy_syslog_convert_facilityToInt(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 95
%5 = select i1 %4, i64 4, i64 0
%6 = getelementptr i8, i8* %0, i64 %5
%7 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* @LOG_AUTH
br label %106
11: ; preds = %1
%12 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = load i32, i32* @LOG_AUTHPRIV
br label %106
16: ; preds = %11
%17 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i32, i32* @LOG_CRON
br label %106
21: ; preds = %16
%22 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = load i32, i32* @LOG_DAEMON
br label %106
26: ; preds = %21
%27 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = load i32, i32* @LOG_FTP
br label %106
31: ; preds = %26
%32 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = load i32, i32* @LOG_KERN
br label %106
36: ; preds = %31
%37 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = load i32, i32* @LOG_LOCAL0
br label %106
41: ; preds = %36
%42 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = load i32, i32* @LOG_LOCAL1
br label %106
46: ; preds = %41
%47 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = load i32, i32* @LOG_LOCAL2
br label %106
51: ; preds = %46
%52 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = load i32, i32* @LOG_LOCAL3
br label %106
56: ; preds = %51
%57 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = load i32, i32* @LOG_LOCAL4
br label %106
61: ; preds = %56
%62 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = load i32, i32* @LOG_LOCAL5
br label %106
66: ; preds = %61
%67 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = load i32, i32* @LOG_LOCAL6
br label %106
71: ; preds = %66
%72 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %71
%75 = load i32, i32* @LOG_LOCAL7
br label %106
76: ; preds = %71
%77 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %81
79: ; preds = %76
%80 = load i32, i32* @LOG_LPR
br label %106
81: ; preds = %76
%82 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %81
%85 = load i32, i32* @LOG_MAIL
br label %106
86: ; preds = %81
%87 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%88 = icmp eq i64 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %86
%90 = load i32, i32* @LOG_NEWS
br label %106
91: ; preds = %86
%92 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
%93 = icmp eq i64 %92, 0
br i1 %93, label %94, label %96
94: ; preds = %91
%95 = load i32, i32* @LOG_SYSLOG
br label %106
96: ; preds = %91
%97 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %101
99: ; preds = %96
%100 = load i32, i32* @LOG_USER
br label %106
101: ; preds = %96
%102 = tail call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
%104 = load i32, i32* @LOG_UUCP
%105 = select i1 %103, i32 %104, i32 -1
br label %106
106: ; preds = %101, %14, %24, %34, %44, %54, %64, %74, %84, %94, %99, %89, %79, %69, %59, %49, %39, %29, %19, %9
%107 = phi i32 [ %10, %9 ], [ %15, %14 ], [ %20, %19 ], [ %25, %24 ], [ %30, %29 ], [ %35, %34 ], [ %40, %39 ], [ %45, %44 ], [ %50, %49 ], [ %55, %54 ], [ %60, %59 ], [ %65, %64 ], [ %70, %69 ], [ %75, %74 ], [ %80, %79 ], [ %85, %84 ], [ %90, %89 ], [ %95, %94 ], [ %100, %99 ], [ %105, %101 ]
ret i32 %107
}