#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*/ getch();
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
main() {
  char strings[5][100];
  int count;
  for (count = 0; count < 5; count++) {
    printf("\n\nDigite uma string: ");
    gets(strings[count]);
  }
  printf("\n\n\nAs strings que voce digitou  		foram:\n\n");
  for (count = 0; count < 5; count++) {
    printf("%s\n", strings[count]);
  }
  getch();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x204(%rbp)
cmpl   $0x5,-0x204(%rbp)
jge    1195 <main+0x65>
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x204(%rbp),%rax
lea    -0x200(%rbp),%rdi
imul   $0x64,%rax,%rax
add    %rax,%rdi
call   1040 <gets@plt>
mov    -0x204(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204(%rbp)
jmp    114c <main+0x1c>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x204(%rbp)
cmpl   $0x5,-0x204(%rbp)
jge    11f1 <main+0xc1>
movslq -0x204(%rbp),%rax
lea    -0x200(%rbp),%rsi
imul   $0x64,%rax,%rax
add    %rax,%rsi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x204(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x204(%rbp)
jmp    11ad <main+0x7d>
mov    $0x0,%al
call   1050 <getch@plt>
mov    -0x4(%rbp),%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x200,%rsp
lea    0xea9(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x64(%rsp),%r15
mov    %r15,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc8(%rsp),%r12
mov    %r12,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x12c(%rsp),%r13
mov    %r13,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x190(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
lea    0xe3e(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getch@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0A\0ADigite uma string: \00"
@.str.1 = [43 x i8] c"\0A\0A\0AAs strings que voce digitou \09\09foram:\0A\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [100 x i8]]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %2, i64 0, i64 %10
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%13 = call i32 @gets(i8* %12)
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %19
19: ; preds = %28, %17
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 5
br i1 %21, label %22, label %31
22: ; preds = %19
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %2, i64 0, i64 %24
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %25, i64 0, i64 0
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %26)
br label %28
28: ; preds = %22
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %19
31: ; preds = %19
%32 = call i32 (...) @getch()
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0A\0ADigite uma string: \00"
@str = [42 x i8] c"\0A\0A\0AAs strings que voce digitou \09\09foram:\0A\00"
define i32 @main() {
%1 = alloca [5 x [100 x i8]]
%2 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %1, i64 0, i64 1, i64 0
%7 = call i32 @gets(i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %1, i64 0, i64 2, i64 0
%10 = call i32 @gets(i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %1, i64 0, i64 3, i64 0
%13 = call i32 @gets(i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %1, i64 0, i64 4, i64 0
%16 = call i32 @gets(i8* %15)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%18 = call i32 @puts(i8* %2)
%19 = call i32 @puts(i8* %6)
%20 = call i32 @puts(i8* %9)
%21 = call i32 @puts(i8* %12)
%22 = call i32 @puts(i8* %15)
%23 = call i32 (...) @getch()
ret i32 0
}