#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 *, char *);
int /*<<< orphan*/ px(char **);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char *str[5];
  char s[100][100];
  int i;
  for (i = 0; i < 5; i++)
    str[i] = s[i];
  for (i = 0; i < 5; i++) {
    scanf("%s", str[i]);
  }
  px(str);
  for (i = 0; i < 5; i++)
    printf("%s\n", str[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2750,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x2744(%rbp)
cmpl   $0x5,-0x2744(%rbp)
jge    118e <main+0x5e>
movslq -0x2744(%rbp),%rax
lea    -0x2740(%rbp),%rcx
imul   $0x64,%rax,%rax
add    %rax,%rcx
movslq -0x2744(%rbp),%rax
mov    %rcx,-0x30(%rbp,%rax,8)
mov    -0x2744(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2744(%rbp)
jmp    114c <main+0x1c>
movl   $0x0,-0x2744(%rbp)
cmpl   $0x5,-0x2744(%rbp)
jge    11d1 <main+0xa1>
movslq -0x2744(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rsi
lea    0xe48(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x2744(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2744(%rbp)
jmp    1198 <main+0x68>
lea    -0x30(%rbp),%rdi
call   1040 <px@plt>
movl   $0x0,-0x2744(%rbp)
cmpl   $0x5,-0x2744(%rbp)
jge    121d <main+0xed>
movslq -0x2744(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rsi
lea    0xdff(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2744(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2744(%rbp)
jmp    11e4 <main+0xb4>
xor    %eax,%eax
add    $0x2750,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2740,%rsp
lea    0x30(%rsp),%rsi
mov    %rsi,(%rsp)
lea    0x94(%rsp),%r13
mov    %r13,0x8(%rsp)
lea    0xf8(%rsp),%r14
mov    %r14,0x10(%rsp)
lea    0x15c(%rsp),%r15
mov    %r15,0x18(%rsp)
lea    0x1c0(%rsp),%r12
mov    %r12,0x20(%rsp)
lea    0xe7c(%rip),%rbx
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
mov    %rsp,%rdi
call   1040 <px@plt>
mov    (%rsp),%rsi
lea    0xe38(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2740,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8*]
%3 = alloca [100 x [100 x i8]]
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
br label %5
5: ; preds = %16, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %3, i64 0, i64 %10
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %14
store i8* %12, i8** %15
br label %16
16: ; preds = %8
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
br label %5
19: ; preds = %5
store i32 0, i32* %4
br label %20
20: ; preds = %29, %19
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 5
br i1 %22, label %23, label %32
23: ; preds = %20
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %27)
br label %29
29: ; preds = %23
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %20
32: ; preds = %20
%33 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 0
%34 = call i32 @px(i8** %33)
store i32 0, i32* %4
br label %35
35: ; preds = %44, %32
%36 = load i32, i32* %4
%37 = icmp slt i32 %36, 5
br i1 %37, label %38, label %47
38: ; preds = %35
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %40
%42 = load i8*, i8** %41
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %42)
br label %44
44: ; preds = %38
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %35
47: ; preds = %35
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [5 x i8*]
%2 = alloca [100 x [100 x i8]]
%3 = bitcast [5 x i8*]* %1 to i8*
%4 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 0
store i8* %4, i8** %5
%6 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 1, i64 0
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 1
store i8* %6, i8** %7
%8 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 2, i64 0
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 2
store i8* %8, i8** %9
%10 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 3, i64 0
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 3
store i8* %10, i8** %11
%12 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %2, i64 0, i64 4, i64 0
%13 = getelementptr inbounds [5 x i8*], [5 x i8*]* %1, i64 0, i64 4
store i8* %12, i8** %13
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
%19 = call i32 @px(i8** %5)
%20 = load i8*, i8** %5
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %20)
%22 = load i8*, i8** %7
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %22)
%24 = load i8*, i8** %9
%25 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %24)
%26 = load i8*, i8** %11
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %26)
%28 = load i8*, i8** %13
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %28)
ret i32 0
}