#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 /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str[3][30];
  printf("DIGITE QUALQUER STRING: ");
  scanf("%s", str[0]);
  printf("%s\n", str[0]);
  printf("DIGITE OUTRA STRING: ");
  scanf("%s", str[1]);
  printf("%s\n", str[1]);
  printf("DIGITE MAIS OUTRA: ");
  scanf("%s", str[2]);
  printf("%s\n", str[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rsi
lea    0xed8(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x60(%rbp),%rsi
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rsi
add    $0x1e,%rsi
lea    0xea4(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x60(%rbp),%rsi
add    $0x1e,%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rsi
add    $0x3c,%rsi
lea    0xe6c(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x60(%rbp),%rsi
add    $0x3c,%rsi
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xec2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xeb3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x1e(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xea3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x3c(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [25 x i8] c"DIGITE QUALQUER STRING: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [4 x i8] c"%s\0A\00"
@.str.3 = [22 x i8] c"DIGITE OUTRA STRING: \00"
@.str.4 = [20 x i8] c"DIGITE MAIS OUTRA: \00"
define i32 @main() {
%1 = alloca [3 x [30 x i8]]
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 0
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 0
%7 = getelementptr inbounds [30 x i8], [30 x i8]* %6, i64 0, i64 0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 1
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %10, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 1
%14 = getelementptr inbounds [30 x i8], [30 x i8]* %13, i64 0, i64 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%17 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 2
%18 = getelementptr inbounds [30 x i8], [30 x i8]* %17, i64 0, i64 0
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %18)
%20 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 2
%21 = getelementptr inbounds [30 x i8], [30 x i8]* %20, i64 0, i64 0
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"DIGITE QUALQUER STRING: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.3 = [22 x i8] c"DIGITE OUTRA STRING: \00"
@.str.4 = [20 x i8] c"DIGITE MAIS OUTRA: \00"
define i32 @main() {
%1 = alloca [3 x [30 x i8]]
%2 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @puts(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%7 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 1, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 @puts(i8* %7)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%11 = getelementptr inbounds [3 x [30 x i8]], [3 x [30 x i8]]* %1, i64 0, i64 2, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 @puts(i8* %11)
ret i32 0
}