#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_LOCAL0;
int LOG_NDELAY;
int LOG_NOWAIT;
int LOG_PID;
int /*<<< orphan*/ atol(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ openlog(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test(int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc != 3) {
    fprintf(stderr, "test nprocess nloop");
    exit(1);
  }
  openlog(NULL, LOG_NDELAY | LOG_NOWAIT | LOG_PID, LOG_LOCAL0);
  test(atol(argv[1]), atol(argv[2]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     118f <main+0x3f>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    0xe80(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%esi
mov    0x2e29(%rip),%rax
or     (%rax),%esi
mov    0x2e30(%rip),%rax
or     (%rax),%esi
mov    0x2e37(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%edi
call   1050 <openlog@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atol@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1070 <test@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x3,%edi
jne    11ac <main+0x5c>
mov    %rsi,%rbx
mov    0x2e56(%rip),%rax
mov    0x2e5f(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2e64(%rip),%rax
or     (%rax),%esi
mov    0x2e6b(%rip),%rax
mov    (%rax),%edx
xor    %edi,%edi
call   1050 <openlog@plt>
mov    0x8(%rbx),%rdi
call   1040 <atol@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1040 <atol@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1070 <test@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
lea    0xe44(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"test nprocess nloop\00"
@LOG_NDELAY = global i32 0
@LOG_NOWAIT = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL0 = global i32 0
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* %4
%7 = icmp ne i32 %6, 3
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i32, i32* @LOG_NDELAY
%14 = load i32, i32* @LOG_NOWAIT
%15 = or i32 %13, %14
%16 = load i32, i32* @LOG_PID
%17 = or i32 %15, %16
%18 = load i32, i32* @LOG_LOCAL0
%19 = call i32 @openlog(i32* null, i32 %17, i32 %18)
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
%23 = call i32 @atol(i8* %22)
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 2
%26 = load i8*, i8** %25
%27 = call i32 @atol(i8* %26)
%28 = call i32 @test(i32 %23, i32 %27)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"test nprocess nloop\00"
@LOG_NDELAY = global i32 0
@LOG_NOWAIT = global i32 0
@LOG_PID = global i32 0
@LOG_LOCAL0 = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = load i32, i32* @LOG_NDELAY
%10 = load i32, i32* @LOG_NOWAIT
%11 = or i32 %10, %9
%12 = load i32, i32* @LOG_PID
%13 = or i32 %11, %12
%14 = load i32, i32* @LOG_LOCAL0
%15 = tail call i32 @openlog(i32* null, i32 %13, i32 %14)
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = tail call i32 @atol(i8* %17)
%19 = getelementptr inbounds i8*, i8** %1, i64 2
%20 = load i8*, i8** %19
%21 = tail call i32 @atol(i8* %20)
%22 = tail call i32 @test(i32 %18, i32 %21)
ret i32 0
}