#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*/ print(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main(int argc, char const *argv[]) {
  int x;
  int v[50];
  printf("\n");
  char c = 'a';
  int n;
  scanf("%d %d", &n, &x);
  char nome[51] = "ana";
  char aluna[51];
  scanf("%d", &n);
  scanf(" %[^\n]s", nome);
  strcpy(aluna, nome);
  char pessoa[101];
  scanf("%[^\n]s", pessoa);
  print("%s\n", pessoa);
  int i;
  int letras = 0;
  for (i = 0; pessoa[i] != '\0'; i++) {
    letras++;
  }
  printf("Letras = %d", letras);
  int letraFuncao = strlen(pessoa);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1e0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x61,-0xe1(%rbp)
lea    0xe6b(%rip),%rdi
lea    -0xe8(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1080 <scanf@plt>
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x33,%edx
call   1060 <memset@plt>
movb   $0x61,-0x120(%rbp)
movb   $0x6e,-0x11f(%rbp)
movb   $0x61,-0x11e(%rbp)
lea    0xe45(%rip),%rdi
lea    -0xe8(%rbp),%rsi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    -0x120(%rbp),%rsi
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    -0x160(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x1d0(%rbp),%rsi
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    -0x1d0(%rbp),%rsi
lea    0xddf(%rip),%rdi
call   1070 <print@plt>
movl   $0x0,-0x1d8(%rbp)
movl   $0x0,-0x1d4(%rbp)
movslq -0x1d4(%rbp),%rax
movsbl -0x1d0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1283 <main+0x123>
mov    -0x1d8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d8(%rbp)
mov    -0x1d4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1d4(%rbp)
jmp    1248 <main+0xe8>
mov    -0x1d8(%rbp),%esi
lea    0xd82(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x1d0(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1dc(%rbp)
xor    %eax,%eax
add    $0x1e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf8,%rsp
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe85(%rip),%rdi
xor    %ebx,%ebx
lea    0x8(%rsp),%r14
lea    0xc(%rsp),%rdx
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x3f(%rsp)
movw   $0x6e61,0x10(%rsp)
movb   $0x61,0x12(%rsp)
lea    0xe5d(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xe37(%rip),%rdi
lea    0x10(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xc0(%rsp),%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
lea    0xe12(%rip),%rdi
lea    0x50(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xe03(%rip),%rdi
mov    %r14,%rsi
call   1070 <print@plt>
cmpb   $0x0,0x50(%rsp)
je     122b <main+0xcb>
xor    %ebx,%ebx
nopl   0x0(%rax)
cmpb   $0x0,0x51(%rsp,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1220 <main+0xc0>
lea    0xde0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x50(%rsp),%rdi
call   1050 <strlen@plt>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [8 x i8] c" %[^\0A]s\00"
@.str.4 = [7 x i8] c"%[^\0A]s\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [12 x i8] c"Letras = %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [51 x i8]
%6 = alloca [51 x i8]
%7 = alloca [101 x i8]
%8 = bitcast i32* %3 to i8*
%9 = tail call i32 @putchar(i32 10)
%10 = bitcast i32* %4 to i8*
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %3)
%12 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 0
store i8 97, i8* %12
%13 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 1
store i8 110, i8* %13
%14 = getelementptr inbounds [51 x i8], [51 x i8]* %5, i64 0, i64 2
store i8 97, i8* %14
%15 = getelementptr inbounds [51 x i8], [51 x i8]* %6, i64 0, i64 0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %12)
%18 = call i32 @strcpy(i8* %15, i8* %12)
%19 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %19)
%21 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %19)
%22 = load i8, i8* %19
%23 = icmp eq i8 %22, 0
br i1 %23, label %32, label %24
24: ; preds = %2, %24
%25 = phi i64 [ %26, %24 ], [ 0, %2 ]
%26 = add nuw nsw i64 %25, 1
%27 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 0
br i1 %29, label %30, label %24
30: ; preds = %24
%31 = trunc i64 %26 to i32
br label %32
32: ; preds = %30, %2
%33 = phi i32 [ 0, %2 ], [ %31, %30 ]
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 %33)
%35 = call i32 @strlen(i8* %19)
ret i32 0
}