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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    (%rax,%rax,4),%rcx
lea    0xf(%rax,%rcx,8),%rdx
movabs $0x7ffffffff0,%rcx
and    %rcx,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b3 <main+0x83>
mov    -0x28(%rbp),%rsi
movslq -0x1c(%rbp),%rax
imul   $0x29,%rax,%rax
add    %rax,%rsi
lea    0xe60(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    117e <main+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0xffffffff,-0x20(%rbp)
jle    11e8 <main+0xb8>
mov    -0x28(%rbp),%rdi
movslq -0x20(%rbp),%rax
imul   $0x29,%rax,%rax
add    %rax,%rdi
call   1040 <afficheMot@plt>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    11bc <main+0x8c>
lea    0xe14(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
lea    0xeb8(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0x29(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0x52(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
lea    0x7b(%rsp),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
lea    0xa4(%rsp),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1050 <scanf@plt>
mov    %rbp,%rdi
call   1040 <afficheMot@plt>
mov    %r13,%rdi
call   1040 <afficheMot@plt>
mov    %r12,%rdi
call   1040 <afficheMot@plt>
mov    %r15,%rdi
call   1040 <afficheMot@plt>
mov    %r14,%rdi
call   1040 <afficheMot@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [5 x [41 x i8]]
%2 = getelementptr inbounds [5 x [41 x i8]], [5 x [41 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [5 x [41 x i8]], [5 x [41 x i8]]* %1, i64 0, i64 1, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [5 x [41 x i8]], [5 x [41 x i8]]* %1, i64 0, i64 2, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [5 x [41 x i8]], [5 x [41 x i8]]* %1, i64 0, i64 3, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [5 x [41 x i8]], [5 x [41 x i8]]* %1, i64 0, i64 4, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @afficheMot(i8* %10)
%13 = call i32 @afficheMot(i8* %8)
%14 = call i32 @afficheMot(i8* %6)
%15 = call i32 @afficheMot(i8* %4)
%16 = call i32 @afficheMot(i8* %2)
%17 = call i32 @putchar(i32 10)
ret i32 0
}