#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_CONS;
int LOG_PID;
int /*<<< orphan*/ LOG_USER;
int /*<<< orphan*/ LOG_WARNING;
int /*<<< orphan*/ closelog();
int /*<<< orphan*/ openlog(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *, char *, char *);
void logWarningMessages(char *message1, char *message2) {
  openlog("dt228Yr4", LOG_PID | LOG_CONS, LOG_USER);
  syslog(LOG_WARNING, "%s: %s", message1, message2);
  closelog();
}


x86 assembly (clang, -O0):
<logWarningMessages>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
mov    0x2e78(%rip),%rax
or     (%rax),%esi
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
lea    0xe9e(%rip),%rdi
call   1050 <openlog@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe8a(%rip),%rsi
call   1040 <syslog@plt>
mov    $0x0,%al
call   1030 <closelog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logWarningMessages>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2e8f(%rip),%rax
mov    0x2e80(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e95(%rip),%rax
mov    (%rax),%edx
lea    0xea4(%rip),%rdi
call   1050 <openlog@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xe98(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <syslog@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <closelog@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"dt228Yr4\00"
@LOG_PID = global i32 0
@LOG_CONS = global i32 0
@LOG_USER = global i32 0
@LOG_WARNING = global i32 0
@.str.1 = [7 x i8] c"%s: %s\00"
define void @logWarningMessages(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @LOG_PID
%6 = load i32, i32* @LOG_CONS
%7 = or i32 %5, %6
%8 = load i32, i32* @LOG_USER
%9 = call i32 @openlog(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* @LOG_WARNING
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 @syslog(i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %12)
%14 = call i32 (...) @closelog()
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"dt228Yr4\00"
@LOG_PID = global i32 0
@LOG_CONS = global i32 0
@LOG_USER = global i32 0
@LOG_WARNING = global i32 0
@.str.1 = [7 x i8] c"%s: %s\00"
define void @logWarningMessages(i8* %0, i8* %1) {
%3 = load i32, i32* @LOG_PID
%4 = load i32, i32* @LOG_CONS
%5 = or i32 %4, %3
%6 = load i32, i32* @LOG_USER
%7 = tail call i32 @openlog(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @LOG_WARNING
%9 = tail call i32 @syslog(i32 %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
%10 = tail call i32 (...) @closelog()
ret void
}