#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*/ escribirArchivo(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, ...);
void printResult(char *algorithm, int size, double timeSpent) {
  char filename[300];
  sprintf(filename, "../../outputs/C_%s.csv", algorithm);
  char log[300];
  sprintf(log, "%d, %f", size, timeSpent);
  escribirArchivo(filename, log);
}


x86 assembly (clang, -O0):
<printResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x280,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
lea    -0x150(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x280(%rbp),%rdi
mov    -0xc(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
lea    0xeb1(%rip),%rsi
mov    $0x1,%al
call   1040 <sprintf@plt>
lea    -0x150(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1030 <escribirArchivo@plt>
add    $0x280,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printResult>:
push   %r15
push   %r14
push   %rbx
sub    $0x270,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %esi,%ebx
mov    %rdi,%rdx
lea    0xec2(%rip),%rsi
lea    0x140(%rsp),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
lea    0xec0(%rip),%rsi
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %ebx,%edx
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <escribirArchivo@plt>
add    $0x270,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [23 x i8] c"../../outputs/C_%s.csv\00"
@.str.1 = [7 x i8] c"%d, %f\00"
define void @printResult(i8* %0, i32 %1, double %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
%7 = alloca [300 x i8]
%8 = alloca [300 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store double %2, double* %6
%9 = getelementptr inbounds [300 x i8], [300 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %4
%11 = call i32 (i8*, i8*, ...) @sprintf(i8* %9, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [300 x i8], [300 x i8]* %8, i64 0, i64 0
%13 = load i32, i32* %5
%14 = load double, double* %6
%15 = call i32 (i8*, i8*, ...) @sprintf(i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %13, double %14)
%16 = getelementptr inbounds [300 x i8], [300 x i8]* %7, i64 0, i64 0
%17 = getelementptr inbounds [300 x i8], [300 x i8]* %8, i64 0, i64 0
%18 = call i32 @escribirArchivo(i8* %16, i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"../../outputs/C_%s.csv\00"
@.str.1 = [7 x i8] c"%d, %f\00"
define void @printResult(i8* %0, i32 %1, double %2) {
%4 = alloca [300 x i8]
%5 = alloca [300 x i8]
%6 = getelementptr inbounds [300 x i8], [300 x i8]* %4, i64 0, i64 0
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = getelementptr inbounds [300 x i8], [300 x i8]* %5, i64 0, i64 0
%9 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %1, double %2)
%10 = call i32 @escribirArchivo(i8* %6, i8* %8)
ret void
}