#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*/ LC_ALL;
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main() {
  setlocale(LC_ALL, "");
  int size_char = 0;
  printf("Insira o tamanho da string: ");
  scanf("%d", &size_char);
  char *string;
  string = (char *)malloc(size_char * sizeof(char));
  printf("Insira o conteúdo da String: ");
  setbuf(stdin, NULL);
  fgets(string, (size_char + 2), stdin);
  int i = 0, j = 0, flag = 0;
  char vogais[5];
  vogais[0] = 'a';
  vogais[1] = 'e';
  vogais[2] = 'i';
  vogais[3] = 'o';
  vogais[4] = 'u';
  printf("String sem vogais: ");
  for (i = 0; i < strlen(string); i++) {
    flag = 0;
    if (string[i] == '\n')
      break;
    for (j = 0; j < 5; j++) {
      if (string[i] == vogais[j]) {
        flag = 1;
      }
    }
    if (flag == 0) {
      printf("%c", string[i]);
    }
  }
  printf("\n");
  free(string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
call   1090 <setlocale@plt>
movl   $0x0,-0x8(%rbp)
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe5d(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   10a0 <scanf@plt>
movslq -0x8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <setbuf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
add    $0x2,%esi
mov    0x2ddb(%rip),%rax
mov    (%rax),%edx
call   1070 <fgets@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movb   $0x61,-0x21(%rbp)
movb   $0x65,-0x20(%rbp)
movb   $0x69,-0x1f(%rbp)
movb   $0x6f,-0x1e(%rbp)
movb   $0x75,-0x1d(%rbp)
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
cmp    %ecx,%eax
jge    130e <main+0x18e>
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    128f <main+0x10f>
jmp    130e <main+0x18e>
movl   $0x0,-0x18(%rbp)
cmpl   $0x5,-0x18(%rbp)
jge    12d7 <main+0x157>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movslq -0x18(%rbp),%rcx
movsbl -0x21(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    12c4 <main+0x144>
movl   $0x1,-0x1c(%rbp)
jmp    12c9 <main+0x149>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1296 <main+0x116>
cmpl   $0x0,-0x1c(%rbp)
jne    12fb <main+0x17b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1300 <main+0x180>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1252 <main+0xd2>
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
lea    0xe95(%rip),%rsi
call   10a0 <setlocale@plt>
movl   $0x0,0xc(%rsp)
lea    0xe43(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xe52(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10b0 <scanf@plt>
mov    0xc(%rsp),%edi
call   1090 <malloc@plt>
mov    %rax,%r14
lea    0xe38(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2df2(%rip),%rbx
mov    (%rbx),%edi
xor    %esi,%esi
call   1060 <setbuf@plt>
mov    0xc(%rsp),%esi
add    $0x2,%esi
mov    (%rbx),%edx
mov    %r14,%rdi
call   1080 <fgets@plt>
lea    0xe28(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    126b <main+0xdb>
xor    %ebx,%ebx
mov    $0x104111,%r15d
jmp    1253 <main+0xc3>
cmp    $0xa,%al
je     126b <main+0xdb>
movsbl %al,%edi
call   1040 <putchar@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1050 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    126b <main+0xdb>
movzbl (%r14,%rbx,1),%eax
lea    -0x61(%rax),%ecx
cmp    $0x14,%cl
ja     1234 <main+0xa4>
movzbl %cl,%ecx
bt     %rcx,%r15
jb     1240 <main+0xb0>
jmp    1234 <main+0xa4>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [29 x i8] c"Insira o tamanho da string: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [31 x i8] c"Insira o conte\C3\BAdo da String: \00"
@stdin = global i32 0
@.str.4 = [20 x i8] c"String sem vogais: \00"
@.str.5 = [3 x i8] c"%c\00"
@.str.6 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [5 x i8]
store i32 0, i32* %1
%8 = load i32, i32* @LC_ALL
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = mul i64 %13, 1
%15 = trunc i64 %14 to i32
%16 = call i64 @malloc(i32 %15)
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32, i32* @stdin
%20 = call i32 @setbuf(i32 %19, i32* null)
%21 = load i8*, i8** %3
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 2
%24 = load i32, i32* @stdin
%25 = call i32 @fgets(i8* %21, i32 %23, i32 %24)
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%26 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
store i8 97, i8* %26
%27 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 1
store i8 101, i8* %27
%28 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 2
store i8 105, i8* %28
%29 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 3
store i8 111, i8* %29
%30 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 4
store i8 117, i8* %30
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %4
br label %32
32: ; preds = %80, %0
%33 = load i32, i32* %4
%34 = load i8*, i8** %3
%35 = call i32 @strlen(i8* %34)
%36 = icmp slt i32 %33, %35
br i1 %36, label %37, label %83
37: ; preds = %32
store i32 0, i32* %6
%38 = load i8*, i8** %3
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %38, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 10
br i1 %44, label %45, label %46
45: ; preds = %37
br label %83
46: ; preds = %37
store i32 0, i32* %5
br label %47
47: ; preds = %65, %46
%48 = load i32, i32* %5
%49 = icmp slt i32 %48, 5
br i1 %49, label %50, label %68
50: ; preds = %47
%51 = load i8*, i8** %3
%52 = load i32, i32* %4
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = load i32, i32* %5
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 %58
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %56, %61
br i1 %62, label %63, label %64
63: ; preds = %50
store i32 1, i32* %6
br label %64
64: ; preds = %63, %50
br label %65
65: ; preds = %64
%66 = load i32, i32* %5
%67 = add nsw i32 %66, 1
store i32 %67, i32* %5
br label %47
68: ; preds = %47
%69 = load i32, i32* %6
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %79
71: ; preds = %68
%72 = load i8*, i8** %3
%73 = load i32, i32* %4
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8, i8* %72, i64 %74
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %77)
br label %79
79: ; preds = %71, %68
br label %80
80: ; preds = %79
%81 = load i32, i32* %4
%82 = add nsw i32 %81, 1
store i32 %82, i32* %4
br label %32
83: ; preds = %45, %32
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%85 = load i8*, i8** %3
%86 = call i32 @free(i8* %85)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [29 x i8] c"Insira o tamanho da string: \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [31 x i8] c"Insira o conte\C3\BAdo da String: \00"
@stdin = global i32 0
@.str.4 = [20 x i8] c"String sem vogais: \00"
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32, i32* @stdin
%12 = call i32 @setbuf(i32 %11, i32* null)
%13 = load i32, i32* %1
%14 = add nsw i32 %13, 2
%15 = load i32, i32* @stdin
%16 = call i32 @fgets(i8* %9, i32 %14, i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 @strlen(i8* %9)
%19 = icmp sgt i32 %18, 0
br i1 %19, label %20, label %32
20: ; preds = %0, %27
%21 = phi i64 [ %28, %27 ], [ 0, %0 ]
%22 = getelementptr inbounds i8, i8* %9, i64 %21
%23 = load i8, i8* %22
switch i8 %23, label %24 [
i8 10, label %32
i8 117, label %27
i8 111, label %27
i8 105, label %27
i8 101, label %27
i8 97, label %27
]
24: ; preds = %20
%25 = sext i8 %23 to i32
%26 = call i32 @putchar(i32 %25)
br label %27
27: ; preds = %20, %20, %20, %20, %20, %24
%28 = add nuw nsw i64 %21, 1
%29 = call i32 @strlen(i8* %9)
%30 = sext i32 %29 to i64
%31 = icmp slt i64 %28, %30
br i1 %31, label %20, label %32
32: ; preds = %20, %27, %0
%33 = call i32 @putchar(i32 10)
%34 = call i32 @free(i8* %9)
ret i32 0
}