#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, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char listOfNames[5][20];
  for (int line = 0; line < 5; line++) {
    printf("Type the name %i: ", (line + 1));
    scanf("%s", listOfNames[line]);
  }
  for (int line = 0; line < 5; line++) {
    printf("The name at the line %i is: %s\n", (line + 1), listOfNames[line]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x5,-0x74(%rbp)
jge    1180 <main+0x60>
mov    -0x74(%rbp),%esi
add    $0x1,%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x74(%rbp),%rax
lea    -0x70(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
lea    0xea6(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1139 <main+0x19>
movl   $0x0,-0x78(%rbp)
cmpl   $0x5,-0x78(%rbp)
jge    11c2 <main+0xa2>
mov    -0x78(%rbp),%esi
add    $0x1,%esi
movslq -0x78(%rbp),%rax
lea    -0x70(%rbp),%rdx
imul   $0x14,%rax,%rax
add    %rax,%rdx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1187 <main+0x67>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xecb(%rip),%r12
mov    %r12,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec8(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %r12,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    %r12,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    %r12,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x3c(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
mov    %r12,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x50(%rsp),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
lea    0xe3d(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %rsp,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %r13,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Type the name %i: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [32 x i8] c"The name at the line %i is: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [20 x i8]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %5
5: ; preds = %17, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %20
8: ; preds = %5
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %2, i64 0, i64 %13
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %14, i64 0, i64 0
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %8
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %5
20: ; preds = %5
store i32 0, i32* %4
br label %21
21: ; preds = %32, %20
%22 = load i32, i32* %4
%23 = icmp slt i32 %22, 5
br i1 %23, label %24, label %35
24: ; preds = %21
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %2, i64 0, i64 %28
%30 = getelementptr inbounds [20 x i8], [20 x i8]* %29, i64 0, i64 0
%31 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 %26, i8* %30)
br label %32
32: ; preds = %24
%33 = load i32, i32* %4
%34 = add nsw i32 %33, 1
store i32 %34, i32* %4
br label %21
35: ; preds = %21
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Type the name %i: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [32 x i8] c"The name at the line %i is: %s\0A\00"
define i32 @main() {
%1 = alloca [5 x [20 x i8]]
%2 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 2)
%6 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 1, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 3)
%9 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 2, i64 0
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 4)
%12 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 3, i64 0
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 5)
%15 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 4, i64 0
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 1, i8* %2)
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 2, i8* %6)
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 3, i8* %9)
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 4, i8* %12)
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i32 5, i8* %15)
ret i32 0
}