#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*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int /*<<< orphan*/ system(char *);
int main() {
  char nome[61], vogais[11] = "aeiouAEIOU";
  int i, j, count, count2, consoantes;
  count = count2 = 0;
  printf("\nDigite o seu nome: ");
  gets(nome);
  printf("\n\nSeu nome é: %s\n", nome);
  printf("\nSeu nome invertido é: ");
  for (i = (strlen(nome) - 1); i >= 0; i--)
    printf("%c", nome[i]);
  printf("\n\nO número de caracteres contidos no seu nome é: %d\n",
         strlen(nome));
  for (i = 0; i < strlen(nome); i++) {
    if (nome[i] != ' ')
      count2++;
    for (j = 0; j < strlen(vogais); j++) {
      if (nome[i] == vogais[j])
        count++;
    }
  }
  consoantes = (count2 - count);
  printf("\nO número de vogais no seu nome é: %d\n", count);
  printf("\nO número de consoantes no seu nome é: %d\n\n", consoantes);
  system("pause");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x5b(%rbp)
mov    0xea4(%rip),%ax
mov    %ax,-0x53(%rbp)
mov    0xe9c(%rip),%al
mov    %al,-0x51(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x68(%rbp)
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x50(%rbp),%rdi
call   1060 <gets@plt>
lea    -0x50(%rbp),%rsi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x60(%rbp)
cmpl   $0x0,-0x60(%rbp)
jl     11f4 <main+0xb4>
movslq -0x60(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%esi
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x60(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x60(%rbp)
jmp    11c5 <main+0x85>
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x74(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x74(%rbp),%eax
cmp    %ecx,%eax
jge    12b7 <main+0x177>
movslq -0x60(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
cmp    $0x20,%eax
je     124b <main+0x10b>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x78(%rbp)
lea    -0x5b(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x78(%rbp),%eax
cmp    %ecx,%eax
jge    12a4 <main+0x164>
movslq -0x60(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
movslq -0x64(%rbp),%rcx
movsbl -0x5b(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    1291 <main+0x151>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1296 <main+0x156>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1252 <main+0x112>
jmp    12a9 <main+0x169>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1214 <main+0xd4>
mov    -0x6c(%rbp),%eax
sub    -0x68(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x68(%rbp),%esi
lea    0xdbc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x70(%rbp),%esi
lea    0xdd4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdf4(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movabs $0x494541756f696561,%rax
41 45 49
mov    %rax,0x10(%rsp)
movl   $0x554f49,0x17(%rsp)
lea    0xe8f(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1070 <gets@plt>
lea    0xe87(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe89(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    11e7 <main+0x97>
mov    %eax,%ebp
add    $0x1,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x2(%rbp),%eax
movsbl 0x20(%rsp,%rax,1),%edi
call   1030 <putchar@plt>
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%rbp
ja     11d0 <main+0x80>
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
lea    0xe51(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    $0x0,%r14d
test   %eax,%eax
jle    1296 <main+0x146>
xor    %ebp,%ebp
lea    0x10(%rsp),%r12
xor    %r14d,%r14d
xor    %ebx,%ebx
jmp    124f <main+0xff>
nopl   0x0(%rax,%rax,1)
mov    0xf(%rsp),%al
mov    %al,%r13b
add    %r13d,%r14d
add    $0x1,%rbp
lea    0x20(%rsp),%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbp
jge    1296 <main+0x146>
xor    %r13d,%r13d
cmpb   $0x20,0x20(%rsp,%rbp,1)
setne  %r15b
mov    %r12,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
mov    %r15b,0xf(%rsp)
jle    1230 <main+0xe0>
xor    %r15d,%r15d
nop
movzbl 0x20(%rsp,%rbp,1),%eax
xor    %ecx,%ecx
cmp    0x10(%rsp,%r15,1),%al
sete   %cl
add    %ecx,%ebx
add    $0x1,%r15
mov    %r12,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%r15
jl     1270 <main+0x120>
jmp    1230 <main+0xe0>
sub    %ebx,%r14d
lea    0xde3(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdfc(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe19(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.vogais = [11 x i8] c"aeiouAEIOU\00"
@.str = [21 x i8] c"\0ADigite o seu nome: \00"
@.str.1 = [19 x i8] c"\0A\0ASeu nome \C3\A9: %s\0A\00"
@.str.2 = [25 x i8] c"\0ASeu nome invertido \C3\A9: \00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [55 x i8] c"\0A\0AO n\C3\BAmero de caracteres contidos no seu nome \C3\A9: %d\0A\00"
@.str.5 = [41 x i8] c"\0AO n\C3\BAmero de vogais no seu nome \C3\A9: %d\0A\00"
@.str.6 = [46 x i8] c"\0AO n\C3\BAmero de consoantes no seu nome \C3\A9: %d\0A\0A\00"
@.str.7 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [61 x i8]
%3 = alloca [11 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [11 x i8]* %3 to i8*
store i32 0, i32* %7
store i32 0, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%11 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 0
%12 = call i32 @gets(i8* %11)
%13 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%16 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 0
%17 = call i32 @strlen(i8* %16)
%18 = sub nsw i32 %17, 1
store i32 %18, i32* %4
br label %19
19: ; preds = %29, %0
%20 = load i32, i32* %4
%21 = icmp sge i32 %20, 0
br i1 %21, label %22, label %32
22: ; preds = %19
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %27)
br label %29
29: ; preds = %22
%30 = load i32, i32* %4
%31 = add nsw i32 %30, -1
store i32 %31, i32* %4
br label %19
32: ; preds = %19
%33 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 0
%34 = call i32 @strlen(i8* %33)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %34)
store i32 0, i32* %4
br label %36
36: ; preds = %77, %32
%37 = load i32, i32* %4
%38 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 0
%39 = call i32 @strlen(i8* %38)
%40 = icmp slt i32 %37, %39
br i1 %40, label %41, label %80
41: ; preds = %36
%42 = load i32, i32* %4
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 32
br i1 %47, label %48, label %51
48: ; preds = %41
%49 = load i32, i32* %7
%50 = add nsw i32 %49, 1
store i32 %50, i32* %7
br label %51
51: ; preds = %48, %41
store i32 0, i32* %5
br label %52
52: ; preds = %73, %51
%53 = load i32, i32* %5
%54 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%55 = call i32 @strlen(i8* %54)
%56 = icmp slt i32 %53, %55
br i1 %56, label %57, label %76
57: ; preds = %52
%58 = load i32, i32* %4
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [61 x i8], [61 x i8]* %2, i64 0, i64 %59
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = load i32, i32* %5
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 %64
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %62, %67
br i1 %68, label %69, label %72
69: ; preds = %57
%70 = load i32, i32* %6
%71 = add nsw i32 %70, 1
store i32 %71, i32* %6
br label %72
72: ; preds = %69, %57
br label %73
73: ; preds = %72
%74 = load i32, i32* %5
%75 = add nsw i32 %74, 1
store i32 %75, i32* %5
br label %52
76: ; preds = %52
br label %77
77: ; preds = %76
%78 = load i32, i32* %4
%79 = add nsw i32 %78, 1
store i32 %79, i32* %4
br label %36
80: ; preds = %36
%81 = load i32, i32* %7
%82 = load i32, i32* %6
%83 = sub nsw i32 %81, %82
store i32 %83, i32* %8
%84 = load i32, i32* %6
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %84)
%86 = load i32, i32* %8
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i32 %86)
%88 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.vogais = [11 x i8] c"aeiouAEIOU\00"
@.str = [21 x i8] c"\0ADigite o seu nome: \00"
@.str.1 = [19 x i8] c"\0A\0ASeu nome \C3\A9: %s\0A\00"
@.str.2 = [25 x i8] c"\0ASeu nome invertido \C3\A9: \00"
@.str.4 = [55 x i8] c"\0A\0AO n\C3\BAmero de caracteres contidos no seu nome \C3\A9: %d\0A\00"
@.str.5 = [41 x i8] c"\0AO n\C3\BAmero de vogais no seu nome \C3\A9: %d\0A\00"
@.str.6 = [46 x i8] c"\0AO n\C3\BAmero de consoantes no seu nome \C3\A9: %d\0A\0A\00"
@.str.7 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [61 x i8]
%2 = alloca [11 x i8]
%3 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @gets(i8* %3)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @strlen(i8* %3)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %22
11: ; preds = %0
%12 = zext i32 %9 to i64
br label %13
13: ; preds = %11, %13
%14 = phi i64 [ %12, %11 ], [ %15, %13 ]
%15 = add nsw i64 %14, -1
%16 = and i64 %15, 4294967295
%17 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 @putchar(i32 %19)
%21 = icmp ugt i64 %14, 1
br i1 %21, label %13, label %22
22: ; preds = %13, %0
%23 = call i32 @strlen(i8* %3)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %23)
%25 = call i32 @strlen(i8* %3)
%26 = icmp sgt i32 %25, 0
br i1 %26, label %27, label %57
27: ; preds = %22, %51
%28 = phi i64 [ %53, %51 ], [ 0, %22 ]
%29 = phi i32 [ %35, %51 ], [ 0, %22 ]
%30 = phi i32 [ %52, %51 ], [ 0, %22 ]
%31 = getelementptr inbounds [61 x i8], [61 x i8]* %1, i64 0, i64 %28
%32 = load i8, i8* %31
%33 = icmp ne i8 %32, 32
%34 = zext i1 %33 to i32
%35 = add nuw nsw i32 %29, %34
%36 = call i32 @strlen(i8* %4)
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %51
38: ; preds = %27, %38
%39 = phi i64 [ %47, %38 ], [ 0, %27 ]
%40 = phi i32 [ %46, %38 ], [ %30, %27 ]
%41 = load i8, i8* %31
%42 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 %39
%43 = load i8, i8* %42
%44 = icmp eq i8 %41, %43
%45 = zext i1 %44 to i32
%46 = add nsw i32 %40, %45
%47 = add nuw nsw i64 %39, 1
%48 = call i32 @strlen(i8* %4)
%49 = sext i32 %48 to i64
%50 = icmp slt i64 %47, %49
br i1 %50, label %38, label %51
51: ; preds = %38, %27
%52 = phi i32 [ %30, %27 ], [ %46, %38 ]
%53 = add nuw nsw i64 %28, 1
%54 = call i32 @strlen(i8* %3)
%55 = sext i32 %54 to i64
%56 = icmp slt i64 %53, %55
br i1 %56, label %27, label %57
57: ; preds = %51, %22
%58 = phi i32 [ 0, %22 ], [ %52, %51 ]
%59 = phi i32 [ 0, %22 ], [ %35, %51 ]
%60 = sub nsw i32 %59, %58
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 %58)
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.6, i64 0, i64 0), i32 %60)
%63 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}