#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_ALERT;
int LOG_AUTH;
int LOG_CRIT;
int LOG_DEBUG;
int LOG_EMERG;
int LOG_ERR;
int LOG_INFO;
int LOG_NOTICE;
int /*<<< orphan*/ LOG_UPTO(int);
int LOG_WARNING;
int /*<<< orphan*/ setlogmask(int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int, char *);
int main(void) {
  setlogmask(LOG_UPTO(LOG_WARNING));
  syslog(LOG_AUTH | LOG_EMERG, "[auth] EMERG !!!");
  syslog(LOG_AUTH | LOG_ALERT, "[auth] ALERT !!!");
  syslog(LOG_AUTH | LOG_CRIT, "[auth] CRIT !!!");
  syslog(LOG_AUTH | LOG_ERR, "[auth] ERR !!!");
  syslog(LOG_AUTH | LOG_WARNING, "[auth] WARNING !!!");
  syslog(LOG_AUTH | LOG_NOTICE, "[auth] NOTICE !!!");
  syslog(LOG_AUTH | LOG_INFO, "[auth] INFO !!!");
  syslog(LOG_AUTH | LOG_DEBUG, "[auth] DEBUG !!!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1030 <LOG_UPTO@plt>
mov    %eax,%edi
call   1040 <setlogmask@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    0x2e74(%rip),%rax
or     (%rax),%edi
lea    0xe93(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
mov    0x2e66(%rip),%rax
or     (%rax),%edi
lea    0xe86(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
mov    0x2e40(%rip),%rax
or     (%rax),%edi
lea    0xe79(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2e1b(%rip),%rax
mov    (%rax),%edi
mov    0x2dda(%rip),%rax
or     (%rax),%edi
lea    0xe6b(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
mov    0x2dec(%rip),%rax
or     (%rax),%edi
lea    0xe5c(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
mov    0x2dbe(%rip),%rax
or     (%rax),%edi
lea    0xe51(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2dc1(%rip),%rax
mov    (%rax),%edi
mov    0x2d90(%rip),%rax
or     (%rax),%edi
lea    0xe45(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
mov    0x2d7a(%rip),%rax
or     (%rax),%edi
lea    0xe37(%rip),%rsi
call   1050 <syslog@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2e8d(%rip),%r14
mov    (%r14),%edi
call   1030 <LOG_UPTO@plt>
mov    %eax,%edi
call   1040 <setlogmask@plt>
mov    0x2e7f(%rip),%rbx
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
or     (%rbx),%edi
lea    0xe9d(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
or     (%rbx),%edi
lea    0xe97(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
or     (%rbx),%edi
lea    0xe91(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
or     (%rbx),%edi
lea    0xe8a(%rip),%rsi
call   1050 <syslog@plt>
mov    (%r14),%edi
or     (%rbx),%edi
lea    0xe88(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
or     (%rbx),%edi
lea    0xe84(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2dcc(%rip),%rax
mov    (%rax),%edi
or     (%rbx),%edi
lea    0xe7f(%rip),%rsi
call   1050 <syslog@plt>
mov    0x2dbd(%rip),%rax
mov    (%rax),%edi
or     (%rbx),%edi
lea    0xe78(%rip),%rsi
call   1050 <syslog@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LOG_WARNING = global i32 0
@LOG_AUTH = global i32 0
@LOG_EMERG = global i32 0
@.str = [17 x i8] c"[auth] EMERG !!!\00"
@LOG_ALERT = global i32 0
@.str.1 = [17 x i8] c"[auth] ALERT !!!\00"
@LOG_CRIT = global i32 0
@.str.2 = [16 x i8] c"[auth] CRIT !!!\00"
@LOG_ERR = global i32 0
@.str.3 = [15 x i8] c"[auth] ERR !!!\00"
@.str.4 = [19 x i8] c"[auth] WARNING !!!\00"
@LOG_NOTICE = global i32 0
@.str.5 = [18 x i8] c"[auth] NOTICE !!!\00"
@LOG_INFO = global i32 0
@.str.6 = [16 x i8] c"[auth] INFO !!!\00"
@LOG_DEBUG = global i32 0
@.str.7 = [17 x i8] c"[auth] DEBUG !!!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @LOG_WARNING
%3 = call i32 @LOG_UPTO(i32 %2)
%4 = call i32 @setlogmask(i32 %3)
%5 = load i32, i32* @LOG_AUTH
%6 = load i32, i32* @LOG_EMERG
%7 = or i32 %5, %6
%8 = call i32 @syslog(i32 %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @LOG_AUTH
%10 = load i32, i32* @LOG_ALERT
%11 = or i32 %9, %10
%12 = call i32 @syslog(i32 %11, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* @LOG_AUTH
%14 = load i32, i32* @LOG_CRIT
%15 = or i32 %13, %14
%16 = call i32 @syslog(i32 %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @LOG_AUTH
%18 = load i32, i32* @LOG_ERR
%19 = or i32 %17, %18
%20 = call i32 @syslog(i32 %19, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%21 = load i32, i32* @LOG_AUTH
%22 = load i32, i32* @LOG_WARNING
%23 = or i32 %21, %22
%24 = call i32 @syslog(i32 %23, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%25 = load i32, i32* @LOG_AUTH
%26 = load i32, i32* @LOG_NOTICE
%27 = or i32 %25, %26
%28 = call i32 @syslog(i32 %27, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%29 = load i32, i32* @LOG_AUTH
%30 = load i32, i32* @LOG_INFO
%31 = or i32 %29, %30
%32 = call i32 @syslog(i32 %31, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%33 = load i32, i32* @LOG_AUTH
%34 = load i32, i32* @LOG_DEBUG
%35 = or i32 %33, %34
%36 = call i32 @syslog(i32 %35, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@LOG_WARNING = global i32 0
@LOG_AUTH = global i32 0
@LOG_EMERG = global i32 0
@.str = [17 x i8] c"[auth] EMERG !!!\00"
@LOG_ALERT = global i32 0
@.str.1 = [17 x i8] c"[auth] ALERT !!!\00"
@LOG_CRIT = global i32 0
@.str.2 = [16 x i8] c"[auth] CRIT !!!\00"
@LOG_ERR = global i32 0
@.str.3 = [15 x i8] c"[auth] ERR !!!\00"
@.str.4 = [19 x i8] c"[auth] WARNING !!!\00"
@LOG_NOTICE = global i32 0
@.str.5 = [18 x i8] c"[auth] NOTICE !!!\00"
@LOG_INFO = global i32 0
@.str.6 = [16 x i8] c"[auth] INFO !!!\00"
@LOG_DEBUG = global i32 0
@.str.7 = [17 x i8] c"[auth] DEBUG !!!\00"
define i32 @main() {
%1 = load i32, i32* @LOG_WARNING
%2 = tail call i32 @LOG_UPTO(i32 %1)
%3 = tail call i32 @setlogmask(i32 %2)
%4 = load i32, i32* @LOG_AUTH
%5 = load i32, i32* @LOG_EMERG
%6 = or i32 %5, %4
%7 = tail call i32 @syslog(i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @LOG_AUTH
%9 = load i32, i32* @LOG_ALERT
%10 = or i32 %9, %8
%11 = tail call i32 @syslog(i32 %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @LOG_AUTH
%13 = load i32, i32* @LOG_CRIT
%14 = or i32 %13, %12
%15 = tail call i32 @syslog(i32 %14, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @LOG_AUTH
%17 = load i32, i32* @LOG_ERR
%18 = or i32 %17, %16
%19 = tail call i32 @syslog(i32 %18, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%20 = load i32, i32* @LOG_AUTH
%21 = load i32, i32* @LOG_WARNING
%22 = or i32 %21, %20
%23 = tail call i32 @syslog(i32 %22, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%24 = load i32, i32* @LOG_AUTH
%25 = load i32, i32* @LOG_NOTICE
%26 = or i32 %25, %24
%27 = tail call i32 @syslog(i32 %26, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%28 = load i32, i32* @LOG_AUTH
%29 = load i32, i32* @LOG_INFO
%30 = or i32 %29, %28
%31 = tail call i32 @syslog(i32 %30, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%32 = load i32, i32* @LOG_AUTH
%33 = load i32, i32* @LOG_DEBUG
%34 = or i32 %33, %32
%35 = tail call i32 @syslog(i32 %34, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}