#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 check_stat_btime();
int check_uptime();
scalar_t__ init_namespaces();
int /*<<< orphan*/ ksft_exit_fail();
int /*<<< orphan*/ ksft_exit_pass();
int /*<<< orphan*/ ksft_set_plan(int);
int /*<<< orphan*/ nscheck();
int main(int argc, char *argv[]) {
  int ret = 0;
  nscheck();
  ksft_set_plan(2);
  if (init_namespaces())
    return 1;
  ret |= check_uptime();
  ret |= check_stat_btime();
  if (ret)
    ksft_exit_fail();
  ksft_exit_pass();
  return ret;
}


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)
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1090 <nscheck@plt>
mov    $0x2,%edi
call   1050 <ksft_set_plan@plt>
mov    $0x0,%al
call   1040 <init_namespaces@plt>
cmp    $0x0,%rax
je     11bb <main+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    11f3 <main+0x83>
mov    $0x0,%al
call   1030 <check_uptime@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1080 <check_stat_btime@plt>
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11e6 <main+0x76>
mov    $0x0,%al
call   1070 <ksft_exit_fail@plt>
mov    $0x0,%al
call   1060 <ksft_exit_pass@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1090 <nscheck@plt>
mov    $0x2,%edi
call   1050 <ksft_set_plan@plt>
xor    %eax,%eax
call   1040 <init_namespaces@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    11b9 <main+0x49>
xor    %eax,%eax
call   1030 <check_uptime@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1080 <check_stat_btime@plt>
mov    %eax,%ebx
or     %ebp,%ebx
je     11b2 <main+0x42>
xor    %eax,%eax
call   1070 <ksft_exit_fail@plt>
xor    %eax,%eax
call   1060 <ksft_exit_pass@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = call i32 (...) @nscheck()
%8 = call i32 @ksft_set_plan(i32 2)
%9 = call i64 (...) @init_namespaces()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 1, i32* %3
br label %26
12: ; preds = %2
%13 = call i32 (...) @check_uptime()
%14 = load i32, i32* %6
%15 = or i32 %14, %13
store i32 %15, i32* %6
%16 = call i32 (...) @check_stat_btime()
%17 = load i32, i32* %6
%18 = or i32 %17, %16
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %12
%22 = call i32 (...) @ksft_exit_fail()
br label %23
23: ; preds = %21, %12
%24 = call i32 (...) @ksft_exit_pass()
%25 = load i32, i32* %6
store i32 %25, i32* %3
br label %26
26: ; preds = %23, %11
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @nscheck()
%4 = tail call i32 @ksft_set_plan(i32 2)
%5 = tail call i64 (...) @init_namespaces()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = tail call i32 (...) @check_uptime()
%9 = tail call i32 (...) @check_stat_btime()
%10 = or i32 %9, %8
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %7
%13 = tail call i32 (...) @ksft_exit_fail()
br label %14
14: ; preds = %12, %7
%15 = tail call i32 (...) @ksft_exit_pass()
br label %16
16: ; preds = %2, %14
%17 = phi i32 [ %10, %14 ], [ 1, %2 ]
ret i32 %17
}