#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() {
  int i, j;
  char msg[256 + 1];
  char fsg[256 + 1];
  printf("Inserisci una parola da convertire: ");
  scanf("%s", msg);
  for (i = 0, j = 0; msg[i] != '\0'; i++, j++) {
    fsg[j] = msg[i];
    if (msg[i] == 'a' || msg[i] == 'e' || msg[i] == 'i' || msg[i] == 'o' ||
        msg[i] == 'u') {
      j++;
      fsg[j] = 'f';
      j++;
      fsg[j] = msg[i];
    }
  }
  printf("%s\n%s\n", msg, fsg);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xed7(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0x8(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1245 <main+0x125>
movslq -0x8(%rbp),%rax
mov    -0x110(%rbp,%rax,1),%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0x220(%rbp,%rax,1)
movslq -0x8(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x61,%eax
je     11f5 <main+0xd5>
movslq -0x8(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x65,%eax
je     11f5 <main+0xd5>
movslq -0x8(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x69,%eax
je     11f5 <main+0xd5>
movslq -0x8(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x6f,%eax
je     11f5 <main+0xd5>
movslq -0x8(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0x75,%eax
jne    1229 <main+0x109>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
movb   $0x66,-0x220(%rbp,%rax,1)
66
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movslq -0x8(%rbp),%rax
mov    -0x110(%rbp,%rax,1),%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0x220(%rbp,%rax,1)
jmp    122e <main+0x10e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1161 <main+0x41>
lea    -0x110(%rbp),%rsi
lea    -0x220(%rbp),%rdx
lea    0xdce(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x220,%rsp
lea    0xed1(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    0x110(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x110(%rsp),%sil
test   %sil,%sil
je     11ac <main+0x8c>
lea    0x111(%rsp),%rax
mov    $0x495,%ecx
mov    %rsp,%r8
jmp    117f <main+0x5f>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
movzbl (%rax),%esi
add    $0x1,%rax
test   %sil,%sil
je     11ac <main+0x8c>
movslq %ebx,%rdi
mov    %sil,(%rsp,%rdi,1)
lea    -0x61(%rsi),%edx
ror    %dl
cmp    $0xa,%dl
ja     1170 <main+0x50>
movzbl %dl,%edx
bt     %rdx,%rcx
jae    1170 <main+0x50>
movb   $0x66,0x1(%rdi,%r8,1)
mov    %sil,0x2(%rsp,%rdi,1)
add    $0x2,%rdi
mov    %edi,%ebx
jmp    1170 <main+0x50>
lea    0xe75(%rip),%rdi
lea    0x110(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x220,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Inserisci una parola da convertire: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [7 x i8] c"%s\0A%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [257 x i8]
%5 = alloca [257 x i8]
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%7 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
store i32 0, i32* %2
store i32 0, i32* %3
br label %9
9: ; preds = %74, %0
%10 = load i32, i32* %2
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %79
16: ; preds = %9
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [257 x i8], [257 x i8]* %5, i64 0, i64 %22
store i8 %20, i8* %23
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 97
br i1 %29, label %58, label %30
30: ; preds = %16
%31 = load i32, i32* %2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %32
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 101
br i1 %36, label %58, label %37
37: ; preds = %30
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 105
br i1 %43, label %58, label %44
44: ; preds = %37
%45 = load i32, i32* %2
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 111
br i1 %50, label %58, label %51
51: ; preds = %44
%52 = load i32, i32* %2
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 117
br i1 %57, label %58, label %73
58: ; preds = %51, %44, %37, %30, %16
%59 = load i32, i32* %3
%60 = add nsw i32 %59, 1
store i32 %60, i32* %3
%61 = load i32, i32* %3
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [257 x i8], [257 x i8]* %5, i64 0, i64 %62
store i8 102, i8* %63
%64 = load i32, i32* %3
%65 = add nsw i32 %64, 1
store i32 %65, i32* %3
%66 = load i32, i32* %2
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = load i32, i32* %3
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [257 x i8], [257 x i8]* %5, i64 0, i64 %71
store i8 %69, i8* %72
br label %73
73: ; preds = %58, %51
br label %74
74: ; preds = %73
%75 = load i32, i32* %2
%76 = add nsw i32 %75, 1
store i32 %76, i32* %2
%77 = load i32, i32* %3
%78 = add nsw i32 %77, 1
store i32 %78, i32* %3
br label %9
79: ; preds = %9
%80 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 0
%81 = getelementptr inbounds [257 x i8], [257 x i8]* %5, i64 0, i64 0
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %80, i8* %81)
%83 = load i32, i32* %1
ret i32 %83
}

LLVM IR (-O2):
@.str = [37 x i8] c"Inserisci una parola da convertire: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [7 x i8] c"%s\0A%s\0A\00"
define i32 @main() {
%1 = alloca [257 x i8]
%2 = alloca [257 x i8]
%3 = getelementptr inbounds [257 x i8], [257 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [257 x i8], [257 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
br i1 %8, label %31, label %9
9: ; preds = %0, %24
%10 = phi i64 [ %26, %24 ], [ 0, %0 ]
%11 = phi i8 [ %29, %24 ], [ %7, %0 ]
%12 = phi i32 [ %27, %24 ], [ 0, %0 ]
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [257 x i8], [257 x i8]* %2, i64 0, i64 %13
store i8 %11, i8* %14
%15 = add i8 %11, -97
%16 = call i8 @llvm.fshl.i8(i8 %15, i8 %15, i8 7)
switch i8 %16, label %24 [
i8 0, label %17
i8 2, label %17
i8 4, label %17
i8 7, label %17
i8 10, label %17
]
17: ; preds = %9, %9, %9, %9, %9
%18 = add nsw i32 %12, 1
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [257 x i8], [257 x i8]* %2, i64 0, i64 %19
store i8 102, i8* %20
%21 = add nsw i32 %12, 2
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [257 x i8], [257 x i8]* %2, i64 0, i64 %22
store i8 %11, i8* %23
br label %24
24: ; preds = %9, %17
%25 = phi i32 [ %21, %17 ], [ %12, %9 ]
%26 = add nuw i64 %10, 1
%27 = add nsw i32 %25, 1
%28 = getelementptr inbounds [257 x i8], [257 x i8]* %1, i64 0, i64 %26
%29 = load i8, i8* %28
%30 = icmp eq i8 %29, 0
br i1 %30, label %31, label %9
31: ; preds = %24, %0
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %3, i8* %4)
ret i32 0
}