#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*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, float, float, char *);
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void escribirxy_txt(float x, float y) {
  time_t tiempo = time(0);
  struct tm *tlocal = localtime(&tiempo);
  char output[128];
  strftime(output, 128, "%d/%m/%y %H:%M:%S", tlocal);
  FILE *fileout;
  int i = 0;
  char filename[26] = "Data";
  char format[5] = ".txt";
  strcat(filename, format);
  fileout = fopen(filename, "a");
  fprintf(fileout, "%f %f %s \n", x, y, output);
  fclose(fileout);
}


x86 assembly (clang, -O0):
<escribirxy_txt>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x80,%esi
lea    0xe4d(%rip),%rdx
call   1070 <strftime@plt>
movl   $0x0,-0xac(%rbp)
mov    0xe67(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0xe61(%rip),%rax
mov    %rax,-0xc8(%rbp)
mov    0xe5b(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xe55(%rip),%ax
mov    %ax,-0xb8(%rbp)
mov    0xe12(%rip),%eax
mov    %eax,-0xd5(%rbp)
mov    0xe0a(%rip),%al
mov    %al,-0xd1(%rbp)
lea    -0xd0(%rbp),%rdi
lea    -0xd5(%rbp),%rsi
call   1090 <strcat@plt>
lea    -0xd0(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    -0xa0(%rbp),%rdx
lea    0xdbb(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0xa8(%rbp),%rdi
call   1040 <fclose@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<escribirxy_txt>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
movss  %xmm1,0x18(%rsp)
movss  %xmm0,0x14(%rsp)
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0x1c(%rsp)
lea    0x1c(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xe5e(%rip),%rdx
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x80,%esi
mov    %rax,%rcx
call   1070 <strftime@plt>
movups 0xe7c(%rip),%xmm0
movups %xmm0,0x2a(%rsp)
movaps 0xe66(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movb   $0x0,0x10(%rsp)
movl   $0x7478742e,0xc(%rsp)
74
lea    0x20(%rsp),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1090 <strcat@plt>
lea    0xe22(%rip),%rsi
mov    %rbx,%rdi
call   1080 <fopen@plt>
mov    %rax,%rbx
lea    0xe12(%rip),%rsi
mov    %rax,%rdi
movss  0x14(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
mov    %r14,%rdx
call   1050 <fprintf@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%d/%m/%y %H:%M:%S\00"
@__const.escribirxy_txt.filename = [26 x i8] c"Data\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.escribirxy_txt.format = [5 x i8] c".txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [11 x i8] c"%f %f %s \0A\00"
define void @escribirxy_txt(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca %struct.tm*
%7 = alloca [128 x i8]
%8 = alloca i32*
%9 = alloca i32
%10 = alloca [26 x i8]
%11 = alloca [5 x i8]
store float %0, float* %3
store float %1, float* %4
%12 = call i32 @time(i32 0)
store i32 %12, i32* %5
%13 = call %struct.tm* @localtime(i32* %5)
store %struct.tm* %13, %struct.tm** %6
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%15 = load %struct.tm*, %struct.tm** %6
%16 = call i32 @strftime(i8* %14, i32 128, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %15)
store i32 0, i32* %9
%17 = bitcast [26 x i8]* %10 to i8*
%18 = bitcast [5 x i8]* %11 to i8*
%19 = getelementptr inbounds [26 x i8], [26 x i8]* %10, i64 0, i64 0
%20 = getelementptr inbounds [5 x i8], [5 x i8]* %11, i64 0, i64 0
%21 = call i32 @strcat(i8* %19, i8* %20)
%22 = getelementptr inbounds [26 x i8], [26 x i8]* %10, i64 0, i64 0
%23 = call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %23, i32** %8
%24 = load i32*, i32** %8
%25 = load float, float* %3
%26 = load float, float* %4
%27 = getelementptr inbounds [128 x i8], [128 x i8]* %7, i64 0, i64 0
%28 = call i32 @fprintf(i32* %24, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %25, float %26, i8* %27)
%29 = load i32*, i32** %8
%30 = call i32 @fclose(i32* %29)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%d/%m/%y %H:%M:%S\00"
@__const.escribirxy_txt.filename = [26 x i8] c"Data\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.escribirxy_txt.format = [5 x i8] c".txt\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [11 x i8] c"%f %f %s \0A\00"
define void @escribirxy_txt(float %0, float %1) {
%3 = alloca i32
%4 = alloca [128 x i8]
%5 = alloca [26 x i8]
%6 = alloca [5 x i8]
%7 = bitcast i32* %3 to i8*
%8 = tail call i32 @time(i32 0)
store i32 %8, i32* %3
%9 = call %struct.tm* @localtime(i32* %3)
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%11 = call i32 @strftime(i8* %10, i32 128, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %9)
%12 = getelementptr inbounds [26 x i8], [26 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%14 = call i32 @strcat(i8* %12, i8* %13)
%15 = call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %0, float %1, i8* %10)
%17 = call i32 @fclose(i32* %15)
ret void
}