#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*/ benchReadFourInt(char *);
int /*<<< orphan*/ benchReadOneDouble(char *);
int /*<<< orphan*/ benchReadOneFloat(char *);
int /*<<< orphan*/ benchReadOneInt(char *);
int /*<<< orphan*/ benchReadThreeFloat(char *);
int /*<<< orphan*/ benchWriteFourFloat(double, double, double, double);
int /*<<< orphan*/ benchWriteFourInt(int, int, int, int);
int /*<<< orphan*/ benchWriteOneFloat(double);
int /*<<< orphan*/ benchWriteOneInt(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Reading one int...\r\n");
  benchReadOneInt("42");
  benchReadOneInt("+42");
  benchReadOneInt("-42");
  printf("Reading four int...\r\n");
  benchReadFourInt("42 +24 -5436 80000");
  printf("Reading one float...\r\n");
  benchReadOneFloat("42.28");
  benchReadOneFloat("+42.28");
  benchReadOneFloat("-42.28");
  printf("Reading one double...\r\n");
  benchReadOneDouble("42.28");
  benchReadOneDouble("+42.28");
  benchReadOneDouble("-42.28");
  printf("Reading three float...\r\n");
  benchReadThreeFloat("28.6790 +6743.9 0.0003");
  printf("Writing one int...\r\n");
  benchWriteOneInt(42);
  benchWriteOneInt(-42);
  printf("Writing four int...\r\n");
  benchWriteFourInt(42, +24, -5436, 80000);
  printf("Writing one float...\r\n");
  benchWriteOneFloat(42.28);
  benchWriteOneFloat(-42.28);
  printf("Writing three float...\r\n");
  benchWriteFourFloat(28.6790, +6743.9, 0.0003, 0.1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe73(%rip),%rdi
call   1060 <printf@plt>
lea    0xe7d(%rip),%rdi
call   1040 <benchReadOneInt@plt>
lea    0xe70(%rip),%rdi
call   1040 <benchReadOneInt@plt>
lea    0xe68(%rip),%rdi
call   1040 <benchReadOneInt@plt>
lea    0xe60(%rip),%rdi
call   1060 <printf@plt>
lea    0xe6a(%rip),%rdi
call   1080 <benchReadFourInt@plt>
lea    0xe71(%rip),%rdi
call   1060 <printf@plt>
lea    0xe7d(%rip),%rdi
call   10b0 <benchReadOneFloat@plt>
lea    0xe70(%rip),%rdi
call   10b0 <benchReadOneFloat@plt>
lea    0xe6b(%rip),%rdi
call   10b0 <benchReadOneFloat@plt>
lea    0xe66(%rip),%rdi
call   1060 <printf@plt>
lea    0xe4d(%rip),%rdi
call   1050 <benchReadOneDouble@plt>
lea    0xe40(%rip),%rdi
call   1050 <benchReadOneDouble@plt>
lea    0xe3b(%rip),%rdi
call   1050 <benchReadOneDouble@plt>
lea    0xe4e(%rip),%rdi
call   1060 <printf@plt>
lea    0xe5b(%rip),%rdi
call   10c0 <benchReadThreeFloat@plt>
lea    0xe66(%rip),%rdi
call   1060 <printf@plt>
mov    $0x2a,%edi
call   1090 <benchWriteOneInt@plt>
mov    $0xffffffd6,%edi
call   1090 <benchWriteOneInt@plt>
lea    0xe5b(%rip),%rdi
call   1060 <printf@plt>
mov    $0x2a,%edi
mov    $0x18,%esi
mov    $0xffffeac4,%edx
mov    $0x13880,%ecx
call   10a0 <benchWriteFourInt@plt>
lea    0xe4c(%rip),%rdi
call   1060 <printf@plt>
movsd  0xd59(%rip),%xmm0
call   1030 <benchWriteOneFloat@plt>
movsd  0xd44(%rip),%xmm0
call   1030 <benchWriteOneFloat@plt>
lea    0xe3d(%rip),%rdi
call   1060 <printf@plt>
movsd  0xd0b(%rip),%xmm0
movsd  0xd0b(%rip),%xmm1
movsd  0xd0b(%rip),%xmm2
movsd  0xd0b(%rip),%xmm3
call   1070 <benchWriteFourFloat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xec4(%rip),%rdi
call   1040 <puts@plt>
lea    0xe79(%rip),%rdi
call   1050 <benchReadOneInt@plt>
lea    0xe6c(%rip),%rdi
call   1050 <benchReadOneInt@plt>
lea    0xe64(%rip),%rdi
call   1050 <benchReadOneInt@plt>
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
lea    0xe50(%rip),%rdi
call   1080 <benchReadFourInt@plt>
lea    0xea5(%rip),%rdi
call   1040 <puts@plt>
lea    0xe4c(%rip),%r14
mov    %r14,%rdi
call   10b0 <benchReadOneFloat@plt>
lea    0xe3c(%rip),%r15
mov    %r15,%rdi
call   10b0 <benchReadOneFloat@plt>
lea    0xe34(%rip),%rbx
mov    %rbx,%rdi
call   10b0 <benchReadOneFloat@plt>
lea    0xe82(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1060 <benchReadOneDouble@plt>
mov    %r15,%rdi
call   1060 <benchReadOneDouble@plt>
mov    %rbx,%rdi
call   1060 <benchReadOneDouble@plt>
lea    0xe75(%rip),%rdi
call   1040 <puts@plt>
lea    0xdfc(%rip),%rdi
call   10c0 <benchReadThreeFloat@plt>
lea    0xe75(%rip),%rdi
call   1040 <puts@plt>
mov    $0x2a,%edi
call   1090 <benchWriteOneInt@plt>
mov    $0xffffffd6,%edi
call   1090 <benchWriteOneInt@plt>
lea    0xe69(%rip),%rdi
call   1040 <puts@plt>
mov    $0x2a,%edi
mov    $0x18,%esi
mov    $0xffffeac4,%edx
mov    $0x13880,%ecx
call   10a0 <benchWriteFourInt@plt>
lea    0xe59(%rip),%rdi
call   1040 <puts@plt>
movsd  0xd45(%rip),%xmm0
call   1030 <benchWriteOneFloat@plt>
movsd  0xd40(%rip),%xmm0
call   1030 <benchWriteOneFloat@plt>
lea    0xe49(%rip),%rdi
call   1040 <puts@plt>
movsd  0xd2f(%rip),%xmm0
movsd  0xd2f(%rip),%xmm1
movsd  0xd2f(%rip),%xmm2
movsd  0xd2f(%rip),%xmm3
call   1070 <benchWriteFourFloat@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Reading one int...\0D\0A\00"
@.str.1 = [3 x i8] c"42\00"
@.str.2 = [4 x i8] c"+42\00"
@.str.3 = [4 x i8] c"-42\00"
@.str.4 = [22 x i8] c"Reading four int...\0D\0A\00"
@.str.5 = [19 x i8] c"42 +24 -5436 80000\00"
@.str.6 = [23 x i8] c"Reading one float...\0D\0A\00"
@.str.7 = [6 x i8] c"42.28\00"
@.str.8 = [7 x i8] c"+42.28\00"
@.str.9 = [7 x i8] c"-42.28\00"
@.str.10 = [24 x i8] c"Reading one double...\0D\0A\00"
@.str.11 = [25 x i8] c"Reading three float...\0D\0A\00"
@.str.12 = [23 x i8] c"28.6790 +6743.9 0.0003\00"
@.str.13 = [21 x i8] c"Writing one int...\0D\0A\00"
@.str.14 = [22 x i8] c"Writing four int...\0D\0A\00"
@.str.15 = [23 x i8] c"Writing one float...\0D\0A\00"
@.str.16 = [25 x i8] c"Writing three float...\0D\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @benchReadOneInt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @benchReadOneInt(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @benchReadOneInt(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @benchReadFourInt(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 @benchReadOneFloat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%14 = call i32 @benchReadOneFloat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%15 = call i32 @benchReadOneFloat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.10, i64 0, i64 0))
%17 = call i32 @benchReadOneDouble(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%18 = call i32 @benchReadOneDouble(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%19 = call i32 @benchReadOneDouble(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
%21 = call i32 @benchReadThreeFloat(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0))
%23 = call i32 @benchWriteOneInt(i32 42)
%24 = call i32 @benchWriteOneInt(i32 -42)
%25 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0))
%26 = call i32 @benchWriteFourInt(i32 42, i32 24, i32 -5436, i32 80000)
%27 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0))
%28 = call i32 @benchWriteOneFloat(double 4.228000e+01)
%29 = call i32 @benchWriteOneFloat(double -4.228000e+01)
%30 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.16, i64 0, i64 0))
%31 = call i32 @benchWriteFourFloat(double 2.867900e+01, double 0x40BA57E666666666, double 3.000000e-04, double 1.000000e-01)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"42\00"
@.str.2 = [4 x i8] c"+42\00"
@.str.3 = [4 x i8] c"-42\00"
@.str.5 = [19 x i8] c"42 +24 -5436 80000\00"
@.str.7 = [6 x i8] c"42.28\00"
@.str.8 = [7 x i8] c"+42.28\00"
@.str.9 = [7 x i8] c"-42.28\00"
@.str.12 = [23 x i8] c"28.6790 +6743.9 0.0003\00"
@str = [20 x i8] c"Reading one int...\0D\00"
@str.17 = [21 x i8] c"Reading four int...\0D\00"
@str.18 = [22 x i8] c"Reading one float...\0D\00"
@str.19 = [23 x i8] c"Reading one double...\0D\00"
@str.20 = [24 x i8] c"Reading three float...\0D\00"
@str.21 = [20 x i8] c"Writing one int...\0D\00"
@str.22 = [21 x i8] c"Writing four int...\0D\00"
@str.23 = [22 x i8] c"Writing one float...\0D\00"
@str.24 = [24 x i8] c"Writing three float...\0D\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @benchReadOneInt(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @benchReadOneInt(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @benchReadOneInt(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.17, i64 0, i64 0))
%8 = tail call i32 @benchReadFourInt(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @benchReadOneFloat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 @benchReadOneFloat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 @benchReadOneFloat(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.19, i64 0, i64 0))
%14 = tail call i32 @benchReadOneDouble(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%15 = tail call i32 @benchReadOneDouble(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%16 = tail call i32 @benchReadOneDouble(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.20, i64 0, i64 0))
%18 = tail call i32 @benchReadThreeFloat(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.21, i64 0, i64 0))
%20 = tail call i32 @benchWriteOneInt(i32 42)
%21 = tail call i32 @benchWriteOneInt(i32 -42)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.22, i64 0, i64 0))
%23 = tail call i32 @benchWriteFourInt(i32 42, i32 24, i32 -5436, i32 80000)
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.23, i64 0, i64 0))
%25 = tail call i32 @benchWriteOneFloat(double 4.228000e+01)
%26 = tail call i32 @benchWriteOneFloat(double -4.228000e+01)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.24, i64 0, i64 0))
%28 = tail call i32 @benchWriteFourFloat(double 2.867900e+01, double 0x40BA57E666666666, double 3.000000e-04, double 1.000000e-01)
ret i32 0
}