#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 DevGetDiskReadCount();
int DevGetDiskWriteCount();
int /*<<< orphan*/ printf(char *, ...);
void PrintDiskAccessCountInfo() {
  printf("---------- Informaion of Disk Access Count ---------- \n");
  printf("Disk Read Count : %d\n", DevGetDiskReadCount());
  printf("Disk Write Count : %d\n", DevGetDiskWriteCount());
  printf("Disk Read Count + Disk Write Count : %d\n",
         DevGetDiskReadCount() + DevGetDiskWriteCount());
  printf("----------------------------------------------------- \n");
}


x86 assembly (clang, -O0):
<PrintDiskAccessCountInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <DevGetDiskReadCount@plt>
mov    %eax,%esi
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <DevGetDiskWriteCount@plt>
mov    %eax,%esi
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <DevGetDiskReadCount@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <DevGetDiskWriteCount@plt>
mov    -0x4(%rbp),%esi
add    %eax,%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintDiskAccessCountInfo>:
push   %rbx
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <DevGetDiskReadCount@plt>
lea    0xea5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <DevGetDiskWriteCount@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <DevGetDiskReadCount@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <DevGetDiskWriteCount@plt>
add    %eax,%ebx
lea    0xe82(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed2(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"---------- Informaion of Disk Access Count ---------- \0A\00"
@.str.1 = [22 x i8] c"Disk Read Count : %d\0A\00"
@.str.2 = [23 x i8] c"Disk Write Count : %d\0A\00"
@.str.3 = [41 x i8] c"Disk Read Count + Disk Write Count : %d\0A\00"
@.str.4 = [56 x i8] c"----------------------------------------------------- \0A\00"
define void @PrintDiskAccessCountInfo() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @DevGetDiskReadCount()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @DevGetDiskWriteCount()
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @DevGetDiskReadCount()
%7 = call i32 (...) @DevGetDiskWriteCount()
%8 = add nsw i32 %6, %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"Disk Read Count : %d\0A\00"
@.str.2 = [23 x i8] c"Disk Write Count : %d\0A\00"
@.str.3 = [41 x i8] c"Disk Read Count + Disk Write Count : %d\0A\00"
@str = [55 x i8] c"---------- Informaion of Disk Access Count ---------- \00"
@str.5 = [55 x i8] c"----------------------------------------------------- \00"
define void @PrintDiskAccessCountInfo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @DevGetDiskReadCount()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @DevGetDiskWriteCount()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @DevGetDiskReadCount()
%7 = tail call i32 (...) @DevGetDiskWriteCount()
%8 = add nsw i32 %7, %6
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.5, i64 0, i64 0))
ret void
}