#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 */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main() {
  char vogais[6] = "aeiou";
  char str[50];
  int i, j;
  fgets(str, sizeof(str), stdin);
  char subs;
  scanf("%c", &subs);
  for (i = 0; i < strlen(str); i++) {
    for (j = 0; j < strlen(vogais); j++) {
      if (str[i] == vogais[j]) {
        str[i] = subs;
      }
    }
  }
  for (i = 0; i < strlen(str); i++) {
    printf("%c", str[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeab(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xea5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0x40(%rbp),%rdi
mov    0x2e7a(%rip),%rax
mov    (%rax),%edx
mov    $0x32,%esi
call   1050 <fgets@plt>
lea    0xe85(%rip),%rdi
lea    -0x49(%rbp),%rsi
call   1060 <scanf@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x50(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
cmp    %ecx,%eax
jge    121b <main+0xdb>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x54(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x54(%rbp),%eax
cmp    %ecx,%eax
jge    1208 <main+0xc8>
movslq -0x44(%rbp),%rax
movsbl -0x40(%rbp,%rax,1),%eax
movslq -0x48(%rbp),%rcx
movsbl -0xa(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    11f5 <main+0xb5>
mov    -0x49(%rbp),%cl
movslq -0x44(%rbp),%rax
mov    %cl,-0x40(%rbp,%rax,1)
jmp    11fa <main+0xba>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11b4 <main+0x74>
jmp    120d <main+0xcd>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1191 <main+0x51>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x58(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%eax
cmp    %ecx,%eax
jge    1261 <main+0x121>
movslq -0x44(%rbp),%rax
lea    0xdbd(%rip),%rdi
movsbl -0x40(%rbp,%rax,1),%esi
call   1040 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1222 <main+0xe2>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
movw   $0x75,0xc(%rsp)
movl   $0x6f696561,0x8(%rsp)
6f
mov    0x2e87(%rip),%rax
mov    (%rax),%edx
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x32,%esi
call   1050 <fgets@plt>
lea    0xe8a(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    120b <main+0xcb>
xor    %r12d,%r12d
lea    0x8(%rsp),%r15
lea    0x10(%rsp),%r14
jmp    11c3 <main+0x83>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%r12
jge    120b <main+0xcb>
mov    %r15,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    11b0 <main+0x70>
xor    %ebx,%ebx
jmp    11f3 <main+0xb3>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    11b0 <main+0x70>
movzbl 0x10(%rsp,%r12,1),%eax
cmp    0x8(%rsp,%rbx,1),%al
jne    11e0 <main+0xa0>
movzbl 0x7(%rsp),%eax
mov    %al,0x10(%rsp,%r12,1)
jmp    11e0 <main+0xa0>
lea    0x10(%rsp),%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    1250 <main+0x110>
xor    %ebx,%ebx
lea    0xde4(%rip),%r14
lea    0x10(%rsp),%r15
nopw   0x0(%rax,%rax,1)
movsbl 0x10(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1230 <main+0xf0>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.vogais = [6 x i8] c"aeiou\00"
@stdin = global i32 0
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [50 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i32 0, i32* %1
%7 = bitcast [6 x i8]* %2 to i8*
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 50, i32 %9)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
store i32 0, i32* %4
br label %12
12: ; preds = %45, %0
%13 = load i32, i32* %4
%14 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%15 = call i32 @strlen(i8* %14)
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %48
17: ; preds = %12
store i32 0, i32* %5
br label %18
18: ; preds = %41, %17
%19 = load i32, i32* %5
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%21 = call i32 @strlen(i8* %20)
%22 = icmp slt i32 %19, %21
br i1 %22, label %23, label %44
23: ; preds = %18
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %28, %33
br i1 %34, label %35, label %40
35: ; preds = %23
%36 = load i8, i8* %6
%37 = load i32, i32* %4
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 %38
store i8 %36, i8* %39
br label %40
40: ; preds = %35, %23
br label %41
41: ; preds = %40
%42 = load i32, i32* %5
%43 = add nsw i32 %42, 1
store i32 %43, i32* %5
br label %18
44: ; preds = %18
br label %45
45: ; preds = %44
%46 = load i32, i32* %4
%47 = add nsw i32 %46, 1
store i32 %47, i32* %4
br label %12
48: ; preds = %12
store i32 0, i32* %4
br label %49
49: ; preds = %60, %48
%50 = load i32, i32* %4
%51 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%52 = call i32 @strlen(i8* %51)
%53 = icmp slt i32 %50, %52
br i1 %53, label %54, label %63
54: ; preds = %49
%55 = load i32, i32* %4
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %58)
br label %60
60: ; preds = %54
%61 = load i32, i32* %4
%62 = add nsw i32 %61, 1
store i32 %62, i32* %4
br label %49
63: ; preds = %49
ret i32 0
}

LLVM IR (-O2):
@__const.main.vogais = [6 x i8] c"aeiou\00"
@stdin = global i32 0
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [50 x i8]
%3 = alloca i8
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %5, i32 50, i32 %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%9 = call i32 @strlen(i8* %5)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %0, %33
%12 = phi i64 [ %34, %33 ], [ 0, %0 ]
%13 = call i32 @strlen(i8* %4)
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %33
15: ; preds = %11
%16 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 %12
br label %20
17: ; preds = %33, %0
%18 = call i32 @strlen(i8* %5)
%19 = icmp sgt i32 %18, 0
br i1 %19, label %38, label %47
20: ; preds = %15, %28
%21 = phi i64 [ 0, %15 ], [ %29, %28 ]
%22 = load i8, i8* %16
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 %21
%24 = load i8, i8* %23
%25 = icmp eq i8 %22, %24
br i1 %25, label %26, label %28
26: ; preds = %20
%27 = load i8, i8* %3
store i8 %27, i8* %16
br label %28
28: ; preds = %20, %26
%29 = add nuw nsw i64 %21, 1
%30 = call i32 @strlen(i8* %4)
%31 = sext i32 %30 to i64
%32 = icmp slt i64 %29, %31
br i1 %32, label %20, label %33
33: ; preds = %28, %11
%34 = add nuw nsw i64 %12, 1
%35 = call i32 @strlen(i8* %5)
%36 = sext i32 %35 to i64
%37 = icmp slt i64 %34, %36
br i1 %37, label %11, label %17
38: ; preds = %17, %38
%39 = phi i64 [ %43, %38 ], [ 0, %17 ]
%40 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %41)
%43 = add nuw nsw i64 %39, 1
%44 = call i32 @strlen(i8* %5)
%45 = sext i32 %44 to i64
%46 = icmp slt i64 %43, %45
br i1 %46, label %38, label %47
47: ; preds = %38, %17
ret i32 0
}