#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*/ input_stringa(char *);
int /*<<< orphan*/ input_stringhe(int, char **);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stampa_stringa(char *);
int /*<<< orphan*/ stampa_stringhe(int, char **);
int main() {
  char parola[100];
  char parole[5][100];
  int i;
  printf("Inserisci parola: ");
  scanf("%s", parola);
  stampa_stringa(parola);
  input_stringa(parola);
  stampa_stringa(parola);
  for (i = 0; i < 5; i++) {
    input_stringa(parole[i]);
  }
  stampa_stringhe(5, parole);
  input_stringhe(5, parole);
  stampa_stringhe(5, parole);
  printf("\n");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x280,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1080 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1060 <stampa_stringa@plt>
lea    -0x70(%rbp),%rdi
call   1070 <input_stringa@plt>
lea    -0x70(%rbp),%rdi
call   1060 <stampa_stringa@plt>
movl   $0x0,-0x274(%rbp)
cmpl   $0x5,-0x274(%rbp)
jge    11ee <main+0x8e>
movslq -0x274(%rbp),%rax
lea    -0x270(%rbp),%rdi
imul   $0x64,%rax,%rax
add    %rax,%rdi
call   1070 <input_stringa@plt>
mov    -0x274(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x274(%rbp)
jmp    11b3 <main+0x53>
lea    -0x270(%rbp),%rsi
mov    $0x5,%edi
call   1050 <stampa_stringhe@plt>
lea    -0x270(%rbp),%rsi
mov    $0x5,%edi
call   1040 <input_stringhe@plt>
lea    -0x270(%rbp),%rsi
mov    $0x5,%edi
call   1050 <stampa_stringhe@plt>
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x280,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x270,%rsp
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
lea    0xe88(%rip),%rdi
lea    0x200(%rsp),%rbx
mov    %rbx,%rsi
call   1090 <scanf@plt>
mov    %rbx,%rdi
call   1070 <stampa_stringa@plt>
mov    %rbx,%rdi
call   1080 <input_stringa@plt>
mov    %rbx,%rdi
call   1070 <stampa_stringa@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1080 <input_stringa@plt>
lea    0x64(%rsp),%rdi
call   1080 <input_stringa@plt>
lea    0xc8(%rsp),%rdi
call   1080 <input_stringa@plt>
lea    0x12c(%rsp),%rdi
call   1080 <input_stringa@plt>
lea    0x190(%rsp),%rdi
call   1080 <input_stringa@plt>
mov    $0x5,%edi
mov    %rbx,%rsi
call   1060 <stampa_stringhe@plt>
mov    $0x5,%edi
mov    %rbx,%rsi
call   1050 <input_stringhe@plt>
mov    $0x5,%edi
mov    %rbx,%rsi
call   1060 <stampa_stringhe@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%eax
add    $0x270,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"Inserisci parola: \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [5 x [100 x i8]]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %2, i64 0, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 @stampa_stringa(i8* %3)
%8 = call i32 @input_stringa(i8* %3)
%9 = call i32 @stampa_stringa(i8* %3)
%10 = call i32 @input_stringa(i8* %4)
%11 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %2, i64 0, i64 1, i64 0
%12 = call i32 @input_stringa(i8* %11)
%13 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %2, i64 0, i64 2, i64 0
%14 = call i32 @input_stringa(i8* %13)
%15 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %2, i64 0, i64 3, i64 0
%16 = call i32 @input_stringa(i8* %15)
%17 = getelementptr inbounds [5 x [100 x i8]], [5 x [100 x i8]]* %2, i64 0, i64 4, i64 0
%18 = call i32 @input_stringa(i8* %17)
%19 = bitcast [5 x [100 x i8]]* %2 to i8**
%20 = call i32 @stampa_stringhe(i32 5, i8** %19)
%21 = call i32 @input_stringhe(i32 5, i8** %19)
%22 = call i32 @stampa_stringhe(i32 5, i8** %19)
%23 = call i32 @putchar(i32 10)
ret i32 1
}