#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
void main() {
  int presentes;
  char personas[100][100];
  int i;
  printf("Cuantas personas NO conoce Tinin\n");
  scanf("%d", &presentes);
  for (i = 0; i < presentes; i++) {
    printf("Soy ");
    scanf("%s", &personas[i]);
    printf("\n");
  }
  for (i = 0; i < presentes; i++) {
    printf("Hola, %s\n", personas[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2730,%rsp
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0x2724(%rbp)
mov    -0x2724(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11b7 <main+0x97>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x2724(%rbp),%rax
lea    -0x2720(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2724(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2724(%rbp)
jmp    1155 <main+0x35>
movl   $0x0,-0x2724(%rbp)
mov    -0x2724(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1207 <main+0xe7>
movslq -0x2724(%rbp),%rax
lea    -0x2720(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2724(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2724(%rbp)
jmp    11c1 <main+0xa1>
add    $0x2730,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x2728,%rsp
lea    0xec0(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9f(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11ff <main+0xbf>
lea    0x10(%rsp),%r12
lea    0xe7f(%rip),%r14
lea    0xe7d(%rip),%r15
xor    %ebx,%ebx
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
add    $0x64,%r12
cmp    %rax,%rbx
jl     1190 <main+0x50>
test   %eax,%eax
jle    11ff <main+0xbf>
lea    0x10(%rsp),%r15
lea    0xe38(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
add    $0x64,%r15
cmp    %rax,%rbx
jl     11e0 <main+0xa0>
add    $0x2728,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Cuantas personas NO conoce Tinin\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"Soy \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [10 x i8] c"Hola, %s\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca [100 x [100 x i8]]
%3 = alloca i32
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
store i32 0, i32* %3
br label %6
6: ; preds = %17, %0
%7 = load i32, i32* %3
%8 = load i32, i32* %1
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 %13
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %17
17: ; preds = %10
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %6
20: ; preds = %6
store i32 0, i32* %3
br label %21
21: ; preds = %31, %20
%22 = load i32, i32* %3
%23 = load i32, i32* %1
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %34
25: ; preds = %21
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 %27
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %28, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), 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 %21
34: ; preds = %21
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"Soy \00"
@.str.3 = [3 x i8] c"%s\00"
@.str.5 = [10 x i8] c"Hola, %s\0A\00"
@str = [33 x i8] c"Cuantas personas NO conoce Tinin\00"
define void @main() {
%1 = alloca i32
%2 = alloca [100 x [100 x i8]]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 0, i64 0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = icmp sgt i32 %7, 0
br i1 %8, label %11, label %29
9: ; preds = %11
%10 = icmp sgt i32 %18, 0
br i1 %10, label %21, label %29
11: ; preds = %0, %11
%12 = phi i64 [ %17, %11 ], [ 0, %0 ]
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 %12
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), [100 x i8]* %14)
%16 = call i32 @putchar(i32 10)
%17 = add nuw nsw i64 %12, 1
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = icmp slt i64 %17, %19
br i1 %20, label %11, label %9
21: ; preds = %9, %21
%22 = phi i64 [ %25, %21 ], [ 0, %9 ]
%23 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 %22, i64 0
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* %23)
%25 = add nuw nsw i64 %22, 1
%26 = load i32, i32* %1
%27 = sext i32 %26 to i64
%28 = icmp slt i64 %25, %27
br i1 %28, label %21, label %29
29: ; preds = %21, %0, %9
ret void
}