#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*/ printf(char *, unsigned int);
int /*<<< orphan*/ test_cleanup_login_records(unsigned int *, unsigned int *);
int /*<<< orphan*/ test_drop_shell_backdoor(unsigned int *, unsigned int *);
int /*<<< orphan*/ test_hide_tcp_ports(unsigned int *, unsigned int *);
int /*<<< orphan*/ test_is_attacker(unsigned int *, unsigned int *);
int /*<<< orphan*/ test_is_hidden_file(unsigned int *, unsigned int *);
int /*<<< orphan*/ test_is_procnet(unsigned int *, unsigned int *);
int /*<<< orphan*/ test_open(unsigned int *, unsigned int *);
int main(void) {
  unsigned int count = 0;
  unsigned int total = 0;
  test_is_attacker(&count, &total);
  test_is_hidden_file(&count, &total);
  test_is_procnet(&count, &total);
  test_open(&count, &total);
  test_hide_tcp_ports(&count, &total);
  test_drop_shell_backdoor(&count, &total);
  test_cleanup_login_records(&count, &total);
  printf("Error(s) found: %d\n", total - count);
  return ((int)total - (int)count);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <test_is_attacker@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <test_is_hidden_file@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1070 <test_is_procnet@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10a0 <test_open@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <test_hide_tcp_ports@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1080 <test_drop_shell_backdoor@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1090 <test_cleanup_login_records@plt>
mov    -0xc(%rbp),%esi
sub    -0x8(%rbp),%esi
lea    0xdfb(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0x4(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <test_is_attacker@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <test_is_hidden_file@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <test_is_procnet@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   10a0 <test_open@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <test_hide_tcp_ports@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <test_drop_shell_backdoor@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1090 <test_cleanup_login_records@plt>
mov    (%rsp),%esi
sub    0x4(%rsp),%esi
lea    0xe0a(%rip),%rdi
call   1030 <printf@plt>
mov    (%rsp),%eax
sub    0x4(%rsp),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Error(s) found: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%4 = call i32 @test_is_attacker(i32* %2, i32* %3)
%5 = call i32 @test_is_hidden_file(i32* %2, i32* %3)
%6 = call i32 @test_is_procnet(i32* %2, i32* %3)
%7 = call i32 @test_open(i32* %2, i32* %3)
%8 = call i32 @test_hide_tcp_ports(i32* %2, i32* %3)
%9 = call i32 @test_drop_shell_backdoor(i32* %2, i32* %3)
%10 = call i32 @test_cleanup_login_records(i32* %2, i32* %3)
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = sub i32 %11, %12
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = sub nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
@.str = [20 x i8] c"Error(s) found: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%5 = call i32 @test_is_attacker(i32* %1, i32* %2)
%6 = call i32 @test_is_hidden_file(i32* %1, i32* %2)
%7 = call i32 @test_is_procnet(i32* %1, i32* %2)
%8 = call i32 @test_open(i32* %1, i32* %2)
%9 = call i32 @test_hide_tcp_ports(i32* %1, i32* %2)
%10 = call i32 @test_drop_shell_backdoor(i32* %1, i32* %2)
%11 = call i32 @test_cleanup_login_records(i32* %1, i32* %2)
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = sub i32 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %2
%17 = load i32, i32* %1
%18 = sub nsw i32 %16, %17
ret i32 %18
}