#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
FILE *AbreRhoVsTEn(char *contenedor) {
  FILE *aA;
  char archivo[200];
  sprintf(archivo, "%s/RhoVsT", contenedor);
  aA = fopen(archivo, "w");
  fputs("# t   rho   tipo (tipo 0 es la total)\n", aA);
  fclose(aA);
  aA = fopen(archivo, "a");
  return aA;
}


x86 assembly (clang, -O0):
<AbreRhoVsTEn>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe9f(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0xe0(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
lea    -0xe0(%rbp),%rdi
lea    0xe8f(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AbreRhoVsTEn>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %rdi,%rdx
lea    0xeac(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <sprintf@plt>
lea    0xea4(%rip),%rsi
mov    %r14,%rdi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xe94(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xe9a(%rip),%rsi
mov    %r14,%rdi
call   1040 <fopen@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%s/RhoVsT\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [39 x i8] c"# t rho tipo (tipo 0 es la total)\0A\00"
@.str.3 = [2 x i8] c"a\00"
define i32* @AbreRhoVsTEn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca [200 x i8]
store i8* %0, i8** %2
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%9 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = call i32 @fputs(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32* %10)
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%15 = call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %15, i32** %3
%16 = load i32*, i32** %3
ret i32* %16
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s/RhoVsT\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [39 x i8] c"# t rho tipo (tipo 0 es la total)\0A\00"
@.str.3 = [2 x i8] c"a\00"
define noalias i32* @AbreRhoVsTEn(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32* @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i64 38, i64 1, i32* %5)
%7 = tail call i32 @fclose(i32* %5)
%8 = call i32* @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32* %8
}