#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*/ AddTimerEntropy();
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ sumFile(char *, int, int /*<<< orphan*/, int);
void AddOtherEntropy(void) {
  AddTimerEntropy();
  sumFile("/var/log/messages", 0x1000, SEEK_END, -0x1000);
  sumFile("/var/log/syslog", 0x1000, SEEK_END, -0x1000);
  sumFile("/var/log/debug", 0x1000, SEEK_END, -0x1000);
  sumFile("/var/log/kern.log", 0x1000, SEEK_END, -0x1000);
  sumFile("/var/log/daemon.log", 0x1000, SEEK_END, -0x1000);
}


x86 assembly (clang, -O0):
<AddOtherEntropy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <AddTimerEntropy@plt>
mov    0x2eb6(%rip),%rax
mov    (%rax),%edx
lea    0xec5(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
lea    0xeb8(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edx
lea    0xea9(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    0x2e59(%rip),%rax
mov    (%rax),%edx
lea    0xe99(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    0x2e3a(%rip),%rax
mov    (%rax),%edx
lea    0xe8c(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddOtherEntropy>:
push   %rbx
xor    %eax,%eax
call   1030 <AddTimerEntropy@plt>
mov    0x2eb9(%rip),%rbx
mov    (%rbx),%edx
lea    0xec8(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    (%rbx),%edx
lea    0xec2(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    (%rbx),%edx
lea    0xeba(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    (%rbx),%edx
lea    0xeb1(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
call   1040 <sumFile@plt>
mov    (%rbx),%edx
lea    0xeab(%rip),%rdi
mov    $0x1000,%esi
mov    $0xfffff000,%ecx
pop    %rbx
jmp    1040 <sumFile@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"/var/log/messages\00"
@SEEK_END = global i32 0
@.str.1 = [16 x i8] c"/var/log/syslog\00"
@.str.2 = [15 x i8] c"/var/log/debug\00"
@.str.3 = [18 x i8] c"/var/log/kern.log\00"
@.str.4 = [20 x i8] c"/var/log/daemon.log\00"
define void @AddOtherEntropy() {
%1 = call i32 (...) @AddTimerEntropy()
%2 = load i32, i32* @SEEK_END
%3 = call i32 @sumFile(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 4096, i32 %2, i32 -4096)
%4 = load i32, i32* @SEEK_END
%5 = call i32 @sumFile(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 4096, i32 %4, i32 -4096)
%6 = load i32, i32* @SEEK_END
%7 = call i32 @sumFile(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 4096, i32 %6, i32 -4096)
%8 = load i32, i32* @SEEK_END
%9 = call i32 @sumFile(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 4096, i32 %8, i32 -4096)
%10 = load i32, i32* @SEEK_END
%11 = call i32 @sumFile(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 4096, i32 %10, i32 -4096)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"/var/log/messages\00"
@SEEK_END = global i32 0
@.str.1 = [16 x i8] c"/var/log/syslog\00"
@.str.2 = [15 x i8] c"/var/log/debug\00"
@.str.3 = [18 x i8] c"/var/log/kern.log\00"
@.str.4 = [20 x i8] c"/var/log/daemon.log\00"
define void @AddOtherEntropy() {
%1 = tail call i32 (...) @AddTimerEntropy()
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @sumFile(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 4096, i32 %2, i32 -4096)
%4 = load i32, i32* @SEEK_END
%5 = tail call i32 @sumFile(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 4096, i32 %4, i32 -4096)
%6 = load i32, i32* @SEEK_END
%7 = tail call i32 @sumFile(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 4096, i32 %6, i32 -4096)
%8 = load i32, i32* @SEEK_END
%9 = tail call i32 @sumFile(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 4096, i32 %8, i32 -4096)
%10 = load i32, i32* @SEEK_END
%11 = tail call i32 @sumFile(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 4096, i32 %10, i32 -4096)
ret void
}