#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;
int /*<<< orphan*/ strcasecmp(char const *, char *);
int lub_log_facility(const char *str, int *facility) {
  if (!strcasecmp(str, "local0"))
    *facility = LOG_LOCAL0;
  else if (!strcasecmp(str, "local1"))
    *facility = LOG_LOCAL1;
  else if (!strcasecmp(str, "local2"))
    *facility = LOG_LOCAL2;
  else if (!strcasecmp(str, "local3"))
    *facility = LOG_LOCAL3;
  else if (!strcasecmp(str, "local4"))
    *facility = LOG_LOCAL4;
  else if (!strcasecmp(str, "local5"))
    *facility = LOG_LOCAL5;
  else if (!strcasecmp(str, "local6"))
    *facility = LOG_LOCAL6;
  else if (!strcasecmp(str, "local7"))
    *facility = LOG_LOCAL7;
  else if (!strcasecmp(str, "auth"))
    *facility = LOG_AUTH;
  else if (!strcasecmp(str, "authpriv"))
    *facility = LOG_AUTHPRIV;
  else if (!strcasecmp(str, "cron"))
    *facility = LOG_CRON;
  else if (!strcasecmp(str, "daemon"))
    *facility = LOG_DAEMON;
  else if (!strcasecmp(str, "ftp"))
    *facility = LOG_FTP;
  else if (!strcasecmp(str, "kern"))
    *facility = LOG_KERN;
  else if (!strcasecmp(str, "lpr"))
    *facility = LOG_LPR;
  else if (!strcasecmp(str, "mail"))
    *facility = LOG_MAIL;
  else if (!strcasecmp(str, "news"))
    *facility = LOG_NEWS;
  else if (!strcasecmp(str, "syslog"))
    *facility = LOG_SYSLOG;
  else if (!strcasecmp(str, "user"))
    *facility = LOG_USER;
  else if (!strcasecmp(str, "uucp"))
    *facility = LOG_UUCP;
  else
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<lub_log_facility>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    114d <lub_log_facility+0x3d>
mov    0x2e78(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    150f <lub_log_facility+0x3ff>
mov    -0x10(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    117a <lub_log_facility+0x6a>
mov    0x2e0b(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    150a <lub_log_facility+0x3fa>
mov    -0x10(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11a7 <lub_log_facility+0x97>
mov    0x2e2e(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1505 <lub_log_facility+0x3f5>
mov    -0x10(%rbp),%rdi
lea    0xe63(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    11d4 <lub_log_facility+0xc4>
mov    0x2dc1(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    1500 <lub_log_facility+0x3f0>
mov    -0x10(%rbp),%rdi
lea    0xe3d(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1201 <lub_log_facility+0xf1>
mov    0x2dcc(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14fb <lub_log_facility+0x3eb>
mov    -0x10(%rbp),%rdi
lea    0xe17(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    122e <lub_log_facility+0x11e>
mov    0x2d5f(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14f6 <lub_log_facility+0x3e6>
mov    -0x10(%rbp),%rdi
lea    0xdf1(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    125b <lub_log_facility+0x14b>
mov    0x2d82(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14f1 <lub_log_facility+0x3e1>
mov    -0x10(%rbp),%rdi
lea    0xdcb(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1288 <lub_log_facility+0x178>
mov    0x2d15(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14ec <lub_log_facility+0x3dc>
mov    -0x10(%rbp),%rdi
lea    0xda5(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    12b5 <lub_log_facility+0x1a5>
mov    0x2d08(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14e7 <lub_log_facility+0x3d7>
mov    -0x10(%rbp),%rdi
lea    0xd7d(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    12e2 <lub_log_facility+0x1d2>
mov    0x2c8b(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14e2 <lub_log_facility+0x3d2>
mov    -0x10(%rbp),%rdi
lea    0xd59(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    130f <lub_log_facility+0x1ff>
mov    0x2c3e(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14dd <lub_log_facility+0x3cd>
mov    -0x10(%rbp),%rdi
lea    0xd31(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    133c <lub_log_facility+0x22c>
mov    0x2cb1(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14d8 <lub_log_facility+0x3c8>
mov    -0x10(%rbp),%rdi
lea    0xd0b(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1369 <lub_log_facility+0x259>
mov    0x2c14(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14d3 <lub_log_facility+0x3c3>
mov    -0x10(%rbp),%rdi
lea    0xce2(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1396 <lub_log_facility+0x286>
mov    0x2bdf(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14ce <lub_log_facility+0x3be>
mov    -0x10(%rbp),%rdi
lea    0xcba(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    13c3 <lub_log_facility+0x2b3>
mov    0x2bea(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14c9 <lub_log_facility+0x3b9>
mov    -0x10(%rbp),%rdi
lea    0xc91(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    13f0 <lub_log_facility+0x2e0>
mov    0x2b6d(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14c4 <lub_log_facility+0x3b4>
mov    -0x10(%rbp),%rdi
lea    0xc69(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    141d <lub_log_facility+0x30d>
mov    0x2bc8(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14bf <lub_log_facility+0x3af>
mov    -0x10(%rbp),%rdi
lea    0xc41(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    144a <lub_log_facility+0x33a>
mov    0x2b5b(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14ba <lub_log_facility+0x3aa>
mov    -0x10(%rbp),%rdi
lea    0xc1b(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1477 <lub_log_facility+0x367>
mov    0x2b7e(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14b5 <lub_log_facility+0x3a5>
mov    -0x10(%rbp),%rdi
lea    0xbf3(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    14a4 <lub_log_facility+0x394>
mov    0x2ab1(%rip),%rax
mov    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
jmp    14b0 <lub_log_facility+0x3a0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1516 <lub_log_facility+0x406>
jmp    14b5 <lub_log_facility+0x3a5>
jmp    14ba <lub_log_facility+0x3aa>
jmp    14bf <lub_log_facility+0x3af>
jmp    14c4 <lub_log_facility+0x3b4>
jmp    14c9 <lub_log_facility+0x3b9>
jmp    14ce <lub_log_facility+0x3be>
jmp    14d3 <lub_log_facility+0x3c3>
jmp    14d8 <lub_log_facility+0x3c8>
jmp    14dd <lub_log_facility+0x3cd>
jmp    14e2 <lub_log_facility+0x3d2>
jmp    14e7 <lub_log_facility+0x3d7>
jmp    14ec <lub_log_facility+0x3dc>
jmp    14f1 <lub_log_facility+0x3e1>
jmp    14f6 <lub_log_facility+0x3e6>
jmp    14fb <lub_log_facility+0x3eb>
jmp    1500 <lub_log_facility+0x3f0>
jmp    1505 <lub_log_facility+0x3f5>
jmp    150a <lub_log_facility+0x3fa>
jmp    150f <lub_log_facility+0x3ff>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lub_log_facility>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xedf(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     12f6 <lub_log_facility+0x1e6>
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1302 <lub_log_facility+0x1f2>
lea    0xec2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     130e <lub_log_facility+0x1fe>
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     131a <lub_log_facility+0x20a>
lea    0xea2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1326 <lub_log_facility+0x216>
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     132f <lub_log_facility+0x21f>
lea    0xe82(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1338 <lub_log_facility+0x228>
lea    0xe72(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1341 <lub_log_facility+0x231>
lea    0xe62(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     134a <lub_log_facility+0x23a>
lea    0xe50(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1353 <lub_log_facility+0x243>
lea    0xe42(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     135c <lub_log_facility+0x24c>
lea    0xe30(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1365 <lub_log_facility+0x255>
lea    0xe20(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     136e <lub_log_facility+0x25e>
lea    0xe0d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1377 <lub_log_facility+0x267>
lea    0xdfb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1380 <lub_log_facility+0x270>
lea    0xde8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1389 <lub_log_facility+0x279>
lea    0xdd6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     1392 <lub_log_facility+0x282>
lea    0xdc4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     139b <lub_log_facility+0x28b>
lea    0xdb4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
test   %eax,%eax
je     13a4 <lub_log_facility+0x294>
lea    0xda2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
test   %ecx,%ecx
jne    13b2 <lub_log_facility+0x2a2>
mov    0x2c57(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2cbb(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c6f(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2cb3(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c67(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c93(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c4a(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c91(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c48(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c5f(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c06(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2bdd(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c74(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2bfb(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2bea(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c19(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2bc0(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c3f(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2bf6(%rip),%rax
jmp    13ab <lub_log_facility+0x29b>
mov    0x2c3d(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"local0\00"
@LOG_LOCAL0 = global i32 0
@.str.1 = [7 x i8] c"local1\00"
@LOG_LOCAL1 = global i32 0
@.str.2 = [7 x i8] c"local2\00"
@LOG_LOCAL2 = global i32 0
@.str.3 = [7 x i8] c"local3\00"
@LOG_LOCAL3 = global i32 0
@.str.4 = [7 x i8] c"local4\00"
@LOG_LOCAL4 = global i32 0
@.str.5 = [7 x i8] c"local5\00"
@LOG_LOCAL5 = global i32 0
@.str.6 = [7 x i8] c"local6\00"
@LOG_LOCAL6 = global i32 0
@.str.7 = [7 x i8] c"local7\00"
@LOG_LOCAL7 = global i32 0
@.str.8 = [5 x i8] c"auth\00"
@LOG_AUTH = global i32 0
@.str.9 = [9 x i8] c"authpriv\00"
@LOG_AUTHPRIV = global i32 0
@.str.10 = [5 x i8] c"cron\00"
@LOG_CRON = global i32 0
@.str.11 = [7 x i8] c"daemon\00"
@LOG_DAEMON = global i32 0
@.str.12 = [4 x i8] c"ftp\00"
@LOG_FTP = global i32 0
@.str.13 = [5 x i8] c"kern\00"
@LOG_KERN = 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 @lub_log_facility(i8* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
%6 = load i8*, i8** %4
%7 = call i32 @strcasecmp(i8* %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* @LOG_LOCAL0
%11 = load i32*, i32** %5
store i32 %10, i32* %11
br label %165
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strcasecmp(i8* %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp ne i32 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %12
%17 = load i32, i32* @LOG_LOCAL1
%18 = load i32*, i32** %5
store i32 %17, i32* %18
br label %164
19: ; preds = %12
%20 = load i8*, i8** %4
%21 = call i32 @strcasecmp(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %19
%24 = load i32, i32* @LOG_LOCAL2
%25 = load i32*, i32** %5
store i32 %24, i32* %25
br label %163
26: ; preds = %19
%27 = load i8*, i8** %4
%28 = call i32 @strcasecmp(i8* %27, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %33, label %30
30: ; preds = %26
%31 = load i32, i32* @LOG_LOCAL3
%32 = load i32*, i32** %5
store i32 %31, i32* %32
br label %162
33: ; preds = %26
%34 = load i8*, i8** %4
%35 = call i32 @strcasecmp(i8* %34, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %40, label %37
37: ; preds = %33
%38 = load i32, i32* @LOG_LOCAL4
%39 = load i32*, i32** %5
store i32 %38, i32* %39
br label %161
40: ; preds = %33
%41 = load i8*, i8** %4
%42 = call i32 @strcasecmp(i8* %41, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%43 = icmp ne i32 %42, 0
br i1 %43, label %47, label %44
44: ; preds = %40
%45 = load i32, i32* @LOG_LOCAL5
%46 = load i32*, i32** %5
store i32 %45, i32* %46
br label %160
47: ; preds = %40
%48 = load i8*, i8** %4
%49 = call i32 @strcasecmp(i8* %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %54, label %51
51: ; preds = %47
%52 = load i32, i32* @LOG_LOCAL6
%53 = load i32*, i32** %5
store i32 %52, i32* %53
br label %159
54: ; preds = %47
%55 = load i8*, i8** %4
%56 = call i32 @strcasecmp(i8* %55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%57 = icmp ne i32 %56, 0
br i1 %57, label %61, label %58
58: ; preds = %54
%59 = load i32, i32* @LOG_LOCAL7
%60 = load i32*, i32** %5
store i32 %59, i32* %60
br label %158
61: ; preds = %54
%62 = load i8*, i8** %4
%63 = call i32 @strcasecmp(i8* %62, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%64 = icmp ne i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %61
%66 = load i32, i32* @LOG_AUTH
%67 = load i32*, i32** %5
store i32 %66, i32* %67
br label %157
68: ; preds = %61
%69 = load i8*, i8** %4
%70 = call i32 @strcasecmp(i8* %69, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%71 = icmp ne i32 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %68
%73 = load i32, i32* @LOG_AUTHPRIV
%74 = load i32*, i32** %5
store i32 %73, i32* %74
br label %156
75: ; preds = %68
%76 = load i8*, i8** %4
%77 = call i32 @strcasecmp(i8* %76, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %82, label %79
79: ; preds = %75
%80 = load i32, i32* @LOG_CRON
%81 = load i32*, i32** %5
store i32 %80, i32* %81
br label %155
82: ; preds = %75
%83 = load i8*, i8** %4
%84 = call i32 @strcasecmp(i8* %83, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%85 = icmp ne i32 %84, 0
br i1 %85, label %89, label %86
86: ; preds = %82
%87 = load i32, i32* @LOG_DAEMON
%88 = load i32*, i32** %5
store i32 %87, i32* %88
br label %154
89: ; preds = %82
%90 = load i8*, i8** %4
%91 = call i32 @strcasecmp(i8* %90, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%92 = icmp ne i32 %91, 0
br i1 %92, label %96, label %93
93: ; preds = %89
%94 = load i32, i32* @LOG_FTP
%95 = load i32*, i32** %5
store i32 %94, i32* %95
br label %153
96: ; preds = %89
%97 = load i8*, i8** %4
%98 = call i32 @strcasecmp(i8* %97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%99 = icmp ne i32 %98, 0
br i1 %99, label %103, label %100
100: ; preds = %96
%101 = load i32, i32* @LOG_KERN
%102 = load i32*, i32** %5
store i32 %101, i32* %102
br label %152
103: ; preds = %96
%104 = load i8*, i8** %4
%105 = call i32 @strcasecmp(i8* %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%106 = icmp ne i32 %105, 0
br i1 %106, label %110, label %107
107: ; preds = %103
%108 = load i32, i32* @LOG_LPR
%109 = load i32*, i32** %5
store i32 %108, i32* %109
br label %151
110: ; preds = %103
%111 = load i8*, i8** %4
%112 = call i32 @strcasecmp(i8* %111, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%113 = icmp ne i32 %112, 0
br i1 %113, label %117, label %114
114: ; preds = %110
%115 = load i32, i32* @LOG_MAIL
%116 = load i32*, i32** %5
store i32 %115, i32* %116
br label %150
117: ; preds = %110
%118 = load i8*, i8** %4
%119 = call i32 @strcasecmp(i8* %118, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%120 = icmp ne i32 %119, 0
br i1 %120, label %124, label %121
121: ; preds = %117
%122 = load i32, i32* @LOG_NEWS
%123 = load i32*, i32** %5
store i32 %122, i32* %123
br label %149
124: ; preds = %117
%125 = load i8*, i8** %4
%126 = call i32 @strcasecmp(i8* %125, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
%127 = icmp ne i32 %126, 0
br i1 %127, label %131, label %128
128: ; preds = %124
%129 = load i32, i32* @LOG_SYSLOG
%130 = load i32*, i32** %5
store i32 %129, i32* %130
br label %148
131: ; preds = %124
%132 = load i8*, i8** %4
%133 = call i32 @strcasecmp(i8* %132, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%134 = icmp ne i32 %133, 0
br i1 %134, label %138, label %135
135: ; preds = %131
%136 = load i32, i32* @LOG_USER
%137 = load i32*, i32** %5
store i32 %136, i32* %137
br label %147
138: ; preds = %131
%139 = load i8*, i8** %4
%140 = call i32 @strcasecmp(i8* %139, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
%141 = icmp ne i32 %140, 0
br i1 %141, label %145, label %142
142: ; preds = %138
%143 = load i32, i32* @LOG_UUCP
%144 = load i32*, i32** %5
store i32 %143, i32* %144
br label %146
145: ; preds = %138
store i32 -1, i32* %3
br label %166
146: ; preds = %142
br label %147
147: ; preds = %146, %135
br label %148
148: ; preds = %147, %128
br label %149
149: ; preds = %148, %121
br label %150
150: ; preds = %149, %114
br label %151
151: ; preds = %150, %107
br label %152
152: ; preds = %151, %100
br label %153
153: ; preds = %152, %93
br label %154
154: ; preds = %153, %86
br label %155
155: ; preds = %154, %79
br label %156
156: ; preds = %155, %72
br label %157
157: ; preds = %156, %65
br label %158
158: ; preds = %157, %58
br label %159
159: ; preds = %158, %51
br label %160
160: ; preds = %159, %44
br label %161
161: ; preds = %160, %37
br label %162
162: ; preds = %161, %30
br label %163
163: ; preds = %162, %23
br label %164
164: ; preds = %163, %16
br label %165
165: ; preds = %164, %9
store i32 0, i32* %3
br label %166
166: ; preds = %165, %145
%167 = load i32, i32* %3
ret i32 %167
}

LLVM IR (-O2):
@.str = [7 x i8] c"local0\00"
@LOG_LOCAL0 = global i32 0
@.str.1 = [7 x i8] c"local1\00"
@LOG_LOCAL1 = global i32 0
@.str.2 = [7 x i8] c"local2\00"
@LOG_LOCAL2 = global i32 0
@.str.3 = [7 x i8] c"local3\00"
@LOG_LOCAL3 = global i32 0
@.str.4 = [7 x i8] c"local4\00"
@LOG_LOCAL4 = global i32 0
@.str.5 = [7 x i8] c"local5\00"
@LOG_LOCAL5 = global i32 0
@.str.6 = [7 x i8] c"local6\00"
@LOG_LOCAL6 = global i32 0
@.str.7 = [7 x i8] c"local7\00"
@LOG_LOCAL7 = global i32 0
@.str.8 = [5 x i8] c"auth\00"
@LOG_AUTH = global i32 0
@.str.9 = [9 x i8] c"authpriv\00"
@LOG_AUTHPRIV = global i32 0
@.str.10 = [5 x i8] c"cron\00"
@LOG_CRON = global i32 0
@.str.11 = [7 x i8] c"daemon\00"
@LOG_DAEMON = global i32 0
@.str.12 = [4 x i8] c"ftp\00"
@LOG_FTP = global i32 0
@.str.13 = [5 x i8] c"kern\00"
@LOG_KERN = 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 @lub_log_facility(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %62, label %5
5: ; preds = %2
%6 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %62, label %8
8: ; preds = %5
%9 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %62, label %11
11: ; preds = %8
%12 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %62, label %14
14: ; preds = %11
%15 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %62, label %17
17: ; preds = %14
%18 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %62, label %20
20: ; preds = %17
%21 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %62, label %23
23: ; preds = %20
%24 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %62, label %26
26: ; preds = %23
%27 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %62, label %29
29: ; preds = %26
%30 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
br i1 %31, label %62, label %32
32: ; preds = %29
%33 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%34 = icmp eq i32 %33, 0
br i1 %34, label %62, label %35
35: ; preds = %32
%36 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%37 = icmp eq i32 %36, 0
br i1 %37, label %62, label %38
38: ; preds = %35
%39 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0))
%40 = icmp eq i32 %39, 0
br i1 %40, label %62, label %41
41: ; preds = %38
%42 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
br i1 %43, label %62, label %44
44: ; preds = %41
%45 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0))
%46 = icmp eq i32 %45, 0
br i1 %46, label %62, label %47
47: ; preds = %44
%48 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0))
%49 = icmp eq i32 %48, 0
br i1 %49, label %62, label %50
50: ; preds = %47
%51 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0))
%52 = icmp eq i32 %51, 0
br i1 %52, label %62, label %53
53: ; preds = %50
%54 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0))
%55 = icmp eq i32 %54, 0
br i1 %55, label %62, label %56
56: ; preds = %53
%57 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
%58 = icmp eq i32 %57, 0
br i1 %58, label %62, label %59
59: ; preds = %56
%60 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0))
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %59, %56, %53, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %8, %5, %2
%63 = phi i32* [ @LOG_LOCAL0, %2 ], [ @LOG_LOCAL1, %5 ], [ @LOG_LOCAL2, %8 ], [ @LOG_LOCAL3, %11 ], [ @LOG_LOCAL4, %14 ], [ @LOG_LOCAL5, %17 ], [ @LOG_LOCAL6, %20 ], [ @LOG_LOCAL7, %23 ], [ @LOG_AUTH, %26 ], [ @LOG_AUTHPRIV, %29 ], [ @LOG_CRON, %32 ], [ @LOG_DAEMON, %35 ], [ @LOG_FTP, %38 ], [ @LOG_KERN, %41 ], [ @LOG_LPR, %44 ], [ @LOG_MAIL, %47 ], [ @LOG_NEWS, %50 ], [ @LOG_SYSLOG, %53 ], [ @LOG_USER, %56 ], [ @LOG_UUCP, %59 ]
%64 = load i32, i32* %63
store i32 %64, i32* %1
br label %65
65: ; preds = %62, %59
%66 = phi i32 [ -1, %59 ], [ 0, %62 ]
ret i32 %66
}