#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 nome[100];
  char str[100];
  char fone[100], cidade[100], cep[10];
  printf("\nQual o seu nome?  ");
  scanf("%s", nome);
  printf("\nQual o seu endereço? ");
  scanf("%[^#32]s", str);
  printf("\nQual o seu telefone? ");
  scanf("%s", fone);
  printf("\nQual a sua cidade? ");
  scanf("%s", cidade);
  printf("\nQual o seu CEP? ");
  scanf("%s", cep);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xecb(%rip),%rdi
call   1040 <scanf@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1040 <scanf@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    -0x150(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1040 <scanf@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1c0(%rbp),%rsi
lea    0xe6e(%rip),%rdi
call   1040 <scanf@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1ca(%rbp),%rsi
lea    0xe4f(%rip),%rdi
call   1040 <scanf@plt>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x1d0,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rbx
lea    0x160(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
lea    0xf0(%rsp),%rsi
call   1040 <scanf@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
lea    0x80(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    0x6(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
xor    %eax,%eax
add    $0x1d0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0AQual o seu nome? \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [24 x i8] c"\0AQual o seu endere\C3\A7o? \00"
@.str.3 = [9 x i8] c"%[^]s\00"
@.str.4 = [23 x i8] c"\0AQual o seu telefone? \00"
@.str.5 = [21 x i8] c"\0AQual a sua cidade? \00"
@.str.6 = [18 x i8] c"\0AQual o seu CEP? \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [10 x i8]
store i32 0, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0AQual o seu nome? \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [24 x i8] c"\0AQual o seu endere\C3\A7o? \00"
@.str.3 = [9 x i8] c"%[^]s\00"
@.str.4 = [23 x i8] c"\0AQual o seu telefone? \00"
@.str.5 = [21 x i8] c"\0AQual a sua cidade? \00"
@.str.6 = [18 x i8] c"\0AQual o seu CEP? \00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [10 x i8]
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%15 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%19 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 0
}