#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*/ centrar(char *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  char cadenas[4][80];
  int i;
  for (i = 0; i < 4; i = i + 1) {
    fprintf(stdout, "Dispara una linea: ");
    fgets(cadenas[i], 80, stdin);
  }
  fprintf(stdout, "Mira como hago poesia:\n\n");
  for (i = 0; i < 4; i = i + 1) {
    centrar(cadenas[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x154(%rbp)
cmpl   $0x4,-0x154(%rbp)
jge    11aa <main+0x7a>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
call   1040 <fprintf@plt>
movslq -0x154(%rbp),%rax
lea    -0x150(%rbp),%rdi
imul   $0x50,%rax,%rax
add    %rax,%rdi
mov    0x2e5e(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1030 <fgets@plt>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    114c <main+0x1c>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
lea    0xe5a(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x154(%rbp)
cmpl   $0x4,-0x154(%rbp)
jge    1204 <main+0xd4>
movslq -0x154(%rbp),%rax
lea    -0x150(%rbp),%rdi
imul   $0x50,%rax,%rax
add    %rax,%rdi
call   1050 <centrar@plt>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    11c9 <main+0x99>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    0x2e90(%rip),%r13
mov    0x0(%r13),%edi
lea    0xead(%rip),%rbx
mov    %rbx,%rsi
call   1040 <fprintf@plt>
mov    0x2e86(%rip),%rbp
mov    0x0(%rbp),%edx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x50,%esi
call   1030 <fgets@plt>
mov    0x0(%r13),%edi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
lea    0x50(%rsp),%r15
mov    0x0(%rbp),%edx
mov    %r15,%rdi
mov    $0x50,%esi
call   1030 <fgets@plt>
mov    0x0(%r13),%edi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
lea    0xa0(%rsp),%r12
mov    0x0(%rbp),%edx
mov    %r12,%rdi
mov    $0x50,%esi
call   1030 <fgets@plt>
mov    0x0(%r13),%edi
mov    %rbx,%rsi
call   1040 <fprintf@plt>
lea    0xf0(%rsp),%rbx
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1030 <fgets@plt>
mov    0x0(%r13),%edi
lea    0xe2b(%rip),%rsi
call   1040 <fprintf@plt>
mov    %r14,%rdi
call   1050 <centrar@plt>
mov    %r15,%rdi
call   1050 <centrar@plt>
mov    %r12,%rdi
call   1050 <centrar@plt>
mov    %rbx,%rdi
call   1050 <centrar@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [20 x i8] c"Dispara una linea: \00"
@stdin = global i32 0
@.str.1 = [25 x i8] c"Mira como hago poesia:\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [80 x i8]]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %16, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 4
br i1 %6, label %7, label %19
7: ; preds = %4
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [4 x [80 x i8]], [4 x [80 x i8]]* %2, i64 0, i64 %11
%13 = getelementptr inbounds [80 x i8], [80 x i8]* %12, i64 0, i64 0
%14 = load i32, i32* @stdin
%15 = call i32 @fgets(i8* %13, i32 80, i32 %14)
br label %16
16: ; preds = %7
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %4
19: ; preds = %4
%20 = load i32, i32* @stdout
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %22
22: ; preds = %31, %19
%23 = load i32, i32* %3
%24 = icmp slt i32 %23, 4
br i1 %24, label %25, label %34
25: ; preds = %22
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [4 x [80 x i8]], [4 x [80 x i8]]* %2, i64 0, i64 %27
%29 = getelementptr inbounds [80 x i8], [80 x i8]* %28, i64 0, i64 0
%30 = call i32 @centrar(i8* %29)
br label %31
31: ; preds = %25
%32 = load i32, i32* %3
%33 = add nsw i32 %32, 1
store i32 %33, i32* %3
br label %22
34: ; preds = %22
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [20 x i8] c"Dispara una linea: \00"
@stdin = global i32 0
@.str.1 = [25 x i8] c"Mira como hago poesia:\0A\0A\00"
define i32 @main() {
%1 = alloca [4 x [80 x i8]]
%2 = getelementptr inbounds [4 x [80 x i8]], [4 x [80 x i8]]* %1, i64 0, i64 0, i64 0
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %2, i32 80, i32 %5)
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [4 x [80 x i8]], [4 x [80 x i8]]* %1, i64 0, i64 1, i64 0
%10 = load i32, i32* @stdin
%11 = call i32 @fgets(i8* %9, i32 80, i32 %10)
%12 = load i32, i32* @stdout
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [4 x [80 x i8]], [4 x [80 x i8]]* %1, i64 0, i64 2, i64 0
%15 = load i32, i32* @stdin
%16 = call i32 @fgets(i8* %14, i32 80, i32 %15)
%17 = load i32, i32* @stdout
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%19 = getelementptr inbounds [4 x [80 x i8]], [4 x [80 x i8]]* %1, i64 0, i64 3, i64 0
%20 = load i32, i32* @stdin
%21 = call i32 @fgets(i8* %19, i32 80, i32 %20)
%22 = load i32, i32* @stdout
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 @centrar(i8* %2)
%25 = call i32 @centrar(i8* %9)
%26 = call i32 @centrar(i8* %14)
%27 = call i32 @centrar(i8* %19)
ret i32 0
}