#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
char *generateLogTime(char *);
int /*<<< orphan*/ printQuery(int /*<<< orphan*/ *, int, char *, int, int);
void printSysLogs(FILE *fLogFile, int fdStat, int fdMem, int fdLoad,
                  int fdDisk) {
  char timeStr[100] = "";
  fprintf(fLogFile, "[%s] System ", generateLogTime(timeStr));
  fprintf(fLogFile, " [PROCESS]");
  printQuery(fLogFile, fdStat, " cpuusermode", 0, 1);
  printQuery(fLogFile, fdStat, " cpusystemmode", 0, 3);
  printQuery(fLogFile, fdStat, " idletaskrunning", 0, 4);
  printQuery(fLogFile, fdStat, " iowaittime", 0, 5);
  printQuery(fLogFile, fdStat, " irqservicetime", 0, 6);
  printQuery(fLogFile, fdStat, " softirqservicetime", 0, 7);
  printQuery(fLogFile, fdStat, " intr", 2, 1);
  printQuery(fLogFile, fdStat, " ctxt", 3, 1);
  printQuery(fLogFile, fdStat, " forks", 5, 1);
  printQuery(fLogFile, fdStat, " runnable", 6, 1);
  printQuery(fLogFile, fdStat, " blocked", 7, 1);
  fprintf(fLogFile, " [MEMORY]");
  printQuery(fLogFile, fdMem, " memtotal", 0, 1);
  printQuery(fLogFile, fdMem, " memfree", 1, 1);
  printQuery(fLogFile, fdMem, " cached", 3, 1);
  printQuery(fLogFile, fdMem, " swapcached", 4, 1);
  printQuery(fLogFile, fdMem, " active", 5, 1);
  printQuery(fLogFile, fdMem, " inactive", 6, 1);
  fprintf(fLogFile, " [LOADAVG]");
  printQuery(fLogFile, fdLoad, " 1min", 0, 0);
  printQuery(fLogFile, fdLoad, " 5min", 0, 1);
  printQuery(fLogFile, fdLoad, " 15min", 0, 2);
  fprintf(fLogFile, " [DISKSTATS](sda)");
  printQuery(fLogFile, fdDisk, " totalnoreads", 16, 3);
  printQuery(fLogFile, fdDisk, " totalsectorsread", 16, 5);
  printQuery(fLogFile, fdDisk, " nomsread", 16, 6);
  printQuery(fLogFile, fdDisk, " totalnowrites", 16, 7);
  printQuery(fLogFile, fdDisk, " nosectorswritten", 16, 9);
  printQuery(fLogFile, fdDisk, " nomswritten", 16, 10);
  fprintf(fLogFile, "\n");
  return;
}


x86 assembly (clang, -O0):
<printSysLogs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x88(%rbp)
lea    -0x80(%rbp),%rdi
call   1060 <generateLogTime@plt>
mov    -0x88(%rbp),%rdi
mov    %rax,%rdx
lea    0xe6f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe6a(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe60(%rip),%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe52(%rip),%rdx
xor    %ecx,%ecx
mov    $0x3,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe46(%rip),%rdx
xor    %ecx,%ecx
mov    $0x4,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe3c(%rip),%rdx
xor    %ecx,%ecx
mov    $0x5,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe2d(%rip),%rdx
xor    %ecx,%ecx
mov    $0x6,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe22(%rip),%rdx
xor    %ecx,%ecx
mov    $0x7,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe1b(%rip),%rdx
mov    $0x2,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xe03(%rip),%rdx
mov    $0x3,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xdeb(%rip),%rdx
mov    $0x5,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xdd4(%rip),%rdx
mov    $0x6,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xdc0(%rip),%rdx
mov    $0x7,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
lea    0xdae(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
lea    0xda3(%rip),%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
lea    0xd92(%rip),%rdx
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
lea    0xd7f(%rip),%rdx
mov    $0x3,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
lea    0xd69(%rip),%rdx
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
lea    0xd57(%rip),%rdx
mov    $0x5,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
lea    0xd41(%rip),%rdx
mov    $0x6,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
lea    0xd30(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xd26(%rip),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xd13(%rip),%rdx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xcfe(%rip),%rdx
xor    %ecx,%ecx
mov    $0x2,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
lea    0xced(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    0xcea(%rip),%rdx
mov    $0x10,%ecx
mov    $0x3,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    0xcda(%rip),%rdx
mov    $0x10,%ecx
mov    $0x5,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    0xcce(%rip),%rdx
mov    $0x10,%ecx
mov    $0x6,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    0xcba(%rip),%rdx
mov    $0x10,%ecx
mov    $0x7,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    0xcab(%rip),%rdx
mov    $0x10,%ecx
mov    $0x9,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
lea    0xc9f(%rip),%rdx
mov    $0x10,%ecx
mov    $0xa,%r8d
call   1050 <printQuery@plt>
mov    -0x8(%rbp),%rdi
lea    0xc91(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSysLogs>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x70,%rsp
mov    %r8d,%r15d
mov    %ecx,%r14d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
call   1060 <generateLogTime@plt>
lea    0xe5f(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
lea    0xe58(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
lea    0xe4a(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xe3e(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %ecx,%ecx
mov    $0x3,%r8d
call   1050 <printQuery@plt>
lea    0xe34(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %ecx,%ecx
mov    $0x4,%r8d
call   1050 <printQuery@plt>
lea    0xe2c(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %ecx,%ecx
mov    $0x5,%r8d
call   1050 <printQuery@plt>
lea    0xe1f(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %ecx,%ecx
mov    $0x6,%r8d
call   1050 <printQuery@plt>
lea    0xe16(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %ecx,%ecx
mov    $0x7,%r8d
call   1050 <printQuery@plt>
lea    0xe11(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x2,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xdfb(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x3,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xde5(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x5,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xdd0(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x6,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xdbe(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x7,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xdab(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
lea    0xd9c(%rip),%rdx
mov    %rbx,%rdi
mov    %r12d,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xd8c(%rip),%rdx
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x1,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xd78(%rip),%rdx
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x3,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xd63(%rip),%rdx
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xd52(%rip),%rdx
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x5,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xd3d(%rip),%rdx
mov    %rbx,%rdi
mov    %r12d,%esi
mov    $0x6,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xd2a(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
lea    0xd1c(%rip),%rdx
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1050 <printQuery@plt>
lea    0xd0b(%rip),%rdx
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1050 <printQuery@plt>
lea    0xcf7(%rip),%rdx
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %ecx,%ecx
mov    $0x2,%r8d
call   1050 <printQuery@plt>
lea    0xce4(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
lea    0xcdd(%rip),%rdx
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x10,%ecx
mov    $0x3,%r8d
call   1050 <printQuery@plt>
lea    0xcce(%rip),%rdx
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x10,%ecx
mov    $0x5,%r8d
call   1050 <printQuery@plt>
lea    0xcc3(%rip),%rdx
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x10,%ecx
mov    $0x6,%r8d
call   1050 <printQuery@plt>
lea    0xcb0(%rip),%rdx
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x10,%ecx
mov    $0x7,%r8d
call   1050 <printQuery@plt>
lea    0xca2(%rip),%rdx
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x10,%ecx
mov    $0x9,%r8d
call   1050 <printQuery@plt>
lea    0xc97(%rip),%rdx
mov    %rbx,%rdi
mov    %r15d,%esi
mov    $0x10,%ecx
mov    $0xa,%r8d
call   1050 <printQuery@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"[%s] System \00"
@.str.1 = [11 x i8] c" [PROCESS]\00"
@.str.2 = [13 x i8] c" cpuusermode\00"
@.str.3 = [15 x i8] c" cpusystemmode\00"
@.str.4 = [17 x i8] c" idletaskrunning\00"
@.str.5 = [12 x i8] c" iowaittime\00"
@.str.6 = [16 x i8] c" irqservicetime\00"
@.str.7 = [20 x i8] c" softirqservicetime\00"
@.str.8 = [6 x i8] c" intr\00"
@.str.9 = [6 x i8] c" ctxt\00"
@.str.10 = [7 x i8] c" forks\00"
@.str.11 = [10 x i8] c" runnable\00"
@.str.12 = [9 x i8] c" blocked\00"
@.str.13 = [10 x i8] c" [MEMORY]\00"
@.str.14 = [10 x i8] c" memtotal\00"
@.str.15 = [9 x i8] c" memfree\00"
@.str.16 = [8 x i8] c" cached\00"
@.str.17 = [12 x i8] c" swapcached\00"
@.str.18 = [8 x i8] c" active\00"
@.str.19 = [10 x i8] c" inactive\00"
@.str.20 = [11 x i8] c" [LOADAVG]\00"
@.str.21 = [6 x i8] c" 1min\00"
@.str.22 = [6 x i8] c" 5min\00"
@.str.23 = [7 x i8] c" 15min\00"
@.str.24 = [18 x i8] c" [DISKSTATS](sda)\00"
@.str.25 = [14 x i8] c" totalnoreads\00"
@.str.26 = [18 x i8] c" totalsectorsread\00"
@.str.27 = [10 x i8] c" nomsread\00"
@.str.28 = [15 x i8] c" totalnowrites\00"
@.str.29 = [18 x i8] c" nosectorswritten\00"
@.str.30 = [13 x i8] c" nomswritten\00"
@.str.31 = [2 x i8] c"\0A\00"
define void @printSysLogs(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [100 x i8]
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = bitcast [100 x i8]* %11 to i8*
%13 = load i32*, i32** %6
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%15 = call i8* @generateLogTime(i8* %14)
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = load i32*, i32** %6
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32*, i32** %6
%20 = load i32, i32* %7
%21 = call i32 @printQuery(i32* %19, i32 %20, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1)
%22 = load i32*, i32** %6
%23 = load i32, i32* %7
%24 = call i32 @printQuery(i32* %22, i32 %23, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 3)
%25 = load i32*, i32** %6
%26 = load i32, i32* %7
%27 = call i32 @printQuery(i32* %25, i32 %26, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 4)
%28 = load i32*, i32** %6
%29 = load i32, i32* %7
%30 = call i32 @printQuery(i32* %28, i32 %29, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 0, i32 5)
%31 = load i32*, i32** %6
%32 = load i32, i32* %7
%33 = call i32 @printQuery(i32* %31, i32 %32, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 0, i32 6)
%34 = load i32*, i32** %6
%35 = load i32, i32* %7
%36 = call i32 @printQuery(i32* %34, i32 %35, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 7)
%37 = load i32*, i32** %6
%38 = load i32, i32* %7
%39 = call i32 @printQuery(i32* %37, i32 %38, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 2, i32 1)
%40 = load i32*, i32** %6
%41 = load i32, i32* %7
%42 = call i32 @printQuery(i32* %40, i32 %41, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 3, i32 1)
%43 = load i32*, i32** %6
%44 = load i32, i32* %7
%45 = call i32 @printQuery(i32* %43, i32 %44, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 5, i32 1)
%46 = load i32*, i32** %6
%47 = load i32, i32* %7
%48 = call i32 @printQuery(i32* %46, i32 %47, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 6, i32 1)
%49 = load i32*, i32** %6
%50 = load i32, i32* %7
%51 = call i32 @printQuery(i32* %49, i32 %50, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 7, i32 1)
%52 = load i32*, i32** %6
%53 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%54 = load i32*, i32** %6
%55 = load i32, i32* %8
%56 = call i32 @printQuery(i32* %54, i32 %55, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 0, i32 1)
%57 = load i32*, i32** %6
%58 = load i32, i32* %8
%59 = call i32 @printQuery(i32* %57, i32 %58, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 1, i32 1)
%60 = load i32*, i32** %6
%61 = load i32, i32* %8
%62 = call i32 @printQuery(i32* %60, i32 %61, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i32 3, i32 1)
%63 = load i32*, i32** %6
%64 = load i32, i32* %8
%65 = call i32 @printQuery(i32* %63, i32 %64, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 4, i32 1)
%66 = load i32*, i32** %6
%67 = load i32, i32* %8
%68 = call i32 @printQuery(i32* %66, i32 %67, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i32 5, i32 1)
%69 = load i32*, i32** %6
%70 = load i32, i32* %8
%71 = call i32 @printQuery(i32* %69, i32 %70, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0), i32 6, i32 1)
%72 = load i32*, i32** %6
%73 = call i32 (i32*, i8*, ...) @fprintf(i32* %72, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.20, i64 0, i64 0))
%74 = load i32*, i32** %6
%75 = load i32, i32* %9
%76 = call i32 @printQuery(i32* %74, i32 %75, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0), i32 0, i32 0)
%77 = load i32*, i32** %6
%78 = load i32, i32* %9
%79 = call i32 @printQuery(i32* %77, i32 %78, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0), i32 0, i32 1)
%80 = load i32*, i32** %6
%81 = load i32, i32* %9
%82 = call i32 @printQuery(i32* %80, i32 %81, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i32 0, i32 2)
%83 = load i32*, i32** %6
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0))
%85 = load i32*, i32** %6
%86 = load i32, i32* %10
%87 = call i32 @printQuery(i32* %85, i32 %86, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), i32 16, i32 3)
%88 = load i32*, i32** %6
%89 = load i32, i32* %10
%90 = call i32 @printQuery(i32* %88, i32 %89, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.26, i64 0, i64 0), i32 16, i32 5)
%91 = load i32*, i32** %6
%92 = load i32, i32* %10
%93 = call i32 @printQuery(i32* %91, i32 %92, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), i32 16, i32 6)
%94 = load i32*, i32** %6
%95 = load i32, i32* %10
%96 = call i32 @printQuery(i32* %94, i32 %95, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.28, i64 0, i64 0), i32 16, i32 7)
%97 = load i32*, i32** %6
%98 = load i32, i32* %10
%99 = call i32 @printQuery(i32* %97, i32 %98, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0), i32 16, i32 9)
%100 = load i32*, i32** %6
%101 = load i32, i32* %10
%102 = call i32 @printQuery(i32* %100, i32 %101, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32 16, i32 10)
%103 = load i32*, i32** %6
%104 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.31, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"[%s] System \00"
@.str.1 = [11 x i8] c" [PROCESS]\00"
@.str.2 = [13 x i8] c" cpuusermode\00"
@.str.3 = [15 x i8] c" cpusystemmode\00"
@.str.4 = [17 x i8] c" idletaskrunning\00"
@.str.5 = [12 x i8] c" iowaittime\00"
@.str.6 = [16 x i8] c" irqservicetime\00"
@.str.7 = [20 x i8] c" softirqservicetime\00"
@.str.8 = [6 x i8] c" intr\00"
@.str.9 = [6 x i8] c" ctxt\00"
@.str.10 = [7 x i8] c" forks\00"
@.str.11 = [10 x i8] c" runnable\00"
@.str.12 = [9 x i8] c" blocked\00"
@.str.13 = [10 x i8] c" [MEMORY]\00"
@.str.14 = [10 x i8] c" memtotal\00"
@.str.15 = [9 x i8] c" memfree\00"
@.str.16 = [8 x i8] c" cached\00"
@.str.17 = [12 x i8] c" swapcached\00"
@.str.18 = [8 x i8] c" active\00"
@.str.19 = [10 x i8] c" inactive\00"
@.str.20 = [11 x i8] c" [LOADAVG]\00"
@.str.21 = [6 x i8] c" 1min\00"
@.str.22 = [6 x i8] c" 5min\00"
@.str.23 = [7 x i8] c" 15min\00"
@.str.24 = [18 x i8] c" [DISKSTATS](sda)\00"
@.str.25 = [14 x i8] c" totalnoreads\00"
@.str.26 = [18 x i8] c" totalsectorsread\00"
@.str.27 = [10 x i8] c" nomsread\00"
@.str.28 = [15 x i8] c" totalnowrites\00"
@.str.29 = [18 x i8] c" nosectorswritten\00"
@.str.30 = [13 x i8] c" nomswritten\00"
define void @printSysLogs(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [100 x i8]
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%8 = call i8* @generateLogTime(i8* %7)
%9 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 10, i64 1, i32* %0)
%11 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1)
%12 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 3)
%13 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 4)
%14 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 0, i32 5)
%15 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 0, i32 6)
%16 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 7)
%17 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 2, i32 1)
%18 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 3, i32 1)
%19 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i32 5, i32 1)
%20 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 6, i32 1)
%21 = call i32 @printQuery(i32* %0, i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0), i32 7, i32 1)
%22 = call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i64 9, i64 1, i32* %0)
%23 = call i32 @printQuery(i32* %0, i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 0, i32 1)
%24 = call i32 @printQuery(i32* %0, i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 1, i32 1)
%25 = call i32 @printQuery(i32* %0, i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), i32 3, i32 1)
%26 = call i32 @printQuery(i32* %0, i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.17, i64 0, i64 0), i32 4, i32 1)
%27 = call i32 @printQuery(i32* %0, i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i32 5, i32 1)
%28 = call i32 @printQuery(i32* %0, i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0), i32 6, i32 1)
%29 = call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.20, i64 0, i64 0), i64 10, i64 1, i32* %0)
%30 = call i32 @printQuery(i32* %0, i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0), i32 0, i32 0)
%31 = call i32 @printQuery(i32* %0, i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0), i32 0, i32 1)
%32 = call i32 @printQuery(i32* %0, i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.23, i64 0, i64 0), i32 0, i32 2)
%33 = call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.24, i64 0, i64 0), i64 17, i64 1, i32* %0)
%34 = call i32 @printQuery(i32* %0, i32 %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0), i32 16, i32 3)
%35 = call i32 @printQuery(i32* %0, i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.26, i64 0, i64 0), i32 16, i32 5)
%36 = call i32 @printQuery(i32* %0, i32 %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.27, i64 0, i64 0), i32 16, i32 6)
%37 = call i32 @printQuery(i32* %0, i32 %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.28, i64 0, i64 0), i32 16, i32 7)
%38 = call i32 @printQuery(i32* %0, i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.29, i64 0, i64 0), i32 16, i32 9)
%39 = call i32 @printQuery(i32* %0, i32 %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.30, i64 0, i64 0), i32 16, i32 10)
%40 = call i32 @fputc(i32 10, i32* %0)
ret void
}