#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 /*<<< orphan*/ LOG_DAEMON;
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ LOG_PID;
int /*<<< orphan*/ check_resolv();
int /*<<< orphan*/ handle_arguments(int, char **);
int /*<<< orphan*/ openlog(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ syslog(int /*<<< orphan*/, char *);
int /*<<< orphan*/ watch_resolv();
int main(int argc, char **argv) {
  openlog("pia-resolv-fix", LOG_PID, LOG_DAEMON);
  syslog(LOG_INFO, "Launching pia-resolv-fix");
  handle_arguments(argc, argv);
  check_resolv();
  watch_resolv();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e6b(%rip),%rax
mov    (%rax),%esi
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
lea    0xe8b(%rip),%rdi
call   1070 <openlog@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
lea    0xe6c(%rip),%rsi
call   1060 <syslog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <handle_arguments@plt>
mov    $0x0,%al
call   1030 <check_resolv@plt>
mov    $0x0,%al
call   1050 <watch_resolv@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
lea    0xe99(%rip),%rdi
call   1070 <openlog@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
lea    0xe7a(%rip),%rsi
call   1060 <syslog@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <handle_arguments@plt>
xor    %eax,%eax
call   1030 <check_resolv@plt>
xor    %eax,%eax
call   1050 <watch_resolv@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"pia-resolv-fix\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
@LOG_INFO = global i32 0
@.str.1 = [25 x i8] c"Launching pia-resolv-fix\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @LOG_PID
%7 = load i32, i32* @LOG_DAEMON
%8 = call i32 @openlog(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* @LOG_INFO
%10 = call i32 @syslog(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i32 @handle_arguments(i32 %11, i8** %12)
%14 = call i32 (...) @check_resolv()
%15 = call i32 (...) @watch_resolv()
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"pia-resolv-fix\00"
@LOG_PID = global i32 0
@LOG_DAEMON = global i32 0
@LOG_INFO = global i32 0
@.str.1 = [25 x i8] c"Launching pia-resolv-fix\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i32, i32* @LOG_PID
%4 = load i32, i32* @LOG_DAEMON
%5 = tail call i32 @openlog(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = load i32, i32* @LOG_INFO
%7 = tail call i32 @syslog(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @handle_arguments(i32 %0, i8** %1)
%9 = tail call i32 (...) @check_resolv()
%10 = tail call i32 (...) @watch_resolv()
ret i32 0
}