#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*/ getchar();
int /*<<< orphan*/ leerArchivo(char *, char *);
int /*<<< orphan*/ printf(char *, char *, ...);
int main(void) {
  char contenidoArchivo[1024];
  leerArchivo(
      "/home/mauricio/git/laboratorio_1_utnfra/Extra_Guia_Ej7/src/archivo.txt",
      contenidoArchivo);
  printf("%s", contenidoArchivo);
  do {
    printf("\n\n-PAUSE- file: %s line:%d\n",
           "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/"
           "heads/master/Extra_Guia_Ej7/src/main.c",
           27);
    getchar();
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <leerArchivo@plt>
lea    -0x410(%rbp),%rsi
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0x1b,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x1,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <leerArchivo@plt>
lea    0xef6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
lea    0xefd(%rip),%rsi
mov    $0x1b,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    $0x1,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [71 x i8] c"/home/mauricio/git/laboratorio_1_utnfra/Extra_Guia_Ej7/src/archivo.txt\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [28 x i8] c"\0A\0A-PAUSE- file: %s line:%d\0A\00"
@.str.3 = [165 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/heads/master/Extra_Guia_Ej7/src/main.c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @leerArchivo(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %0
%8 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str.3, i64 0, i64 0), i32 27)
%9 = call i32 (...) @getchar()
br label %10
10: ; preds = %7
ret i32 1
}

LLVM IR (-O2):
@.str = [71 x i8] c"/home/mauricio/git/laboratorio_1_utnfra/Extra_Guia_Ej7/src/archivo.txt\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [28 x i8] c"\0A\0A-PAUSE- file: %s line:%d\0A\00"
@.str.3 = [165 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/josemax15/laboratorio_1_utnfra/refs/heads/master/Extra_Guia_Ej7/src/main.c\00"
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @leerArchivo(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([165 x i8], [165 x i8]* @.str.3, i64 0, i64 0), i32 27)
%6 = call i32 (...) @getchar()
ret i32 1
}