#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main() {
  int i = 0, scount = 0;
  char word[20];
  printf("Please enter a string > ");
  fgets(word, 20, stdin);
  while (i != 20 - 1) {
    if ((word[i] == 'a') || (word[i] == 'e') || (word[i] == 'i') ||
        (word[i] == 'o') || (word[i] == 'u') || (word[i] == 'y')) {
      scount = scount + 1;
      i = i + 1;
    } else {
      i = i + 1;
    }
  }
  if ((scount = 19) || (i = 900)) {
    scount = scount - 1;
  }
  printf("The number of syllables is %d.\n", scount);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
mov    $0x14,%esi
call   1040 <fgets@plt>
cmpl   $0x13,-0x8(%rbp)
je     11fd <main+0xdd>
movslq -0x8(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x61,%eax
je     11d8 <main+0xb8>
movslq -0x8(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x65,%eax
je     11d8 <main+0xb8>
movslq -0x8(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x69,%eax
je     11d8 <main+0xb8>
movslq -0x8(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x6f,%eax
je     11d8 <main+0xb8>
movslq -0x8(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x75,%eax
je     11d8 <main+0xb8>
movslq -0x8(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x79,%eax
jne    11ef <main+0xcf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f8 <main+0xd8>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1162 <main+0x42>
movl   $0x13,-0xc(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1224 <main+0x104>
movl   $0x384,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1224 <main+0x104>
jmp    122d <main+0x10d>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x14,%esi
call   1040 <fgets@plt>
lea    0xeca(%rip),%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Please enter a string > \00"
@stdin = global i32 0
@.str.1 = [32 x i8] c"The number of syllables is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [20 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %6, i32 20, i32 %7)
br label %9
9: ; preds = %62, %0
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 19
br i1 %11, label %12, label %63
12: ; preds = %9
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 97
br i1 %18, label %54, label %19
19: ; preds = %12
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 101
br i1 %25, label %54, label %26
26: ; preds = %19
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 105
br i1 %32, label %54, label %33
33: ; preds = %26
%34 = load i32, i32* %2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 111
br i1 %39, label %54, label %40
40: ; preds = %33
%41 = load i32, i32* %2
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 117
br i1 %46, label %54, label %47
47: ; preds = %40
%48 = load i32, i32* %2
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp eq i32 %52, 121
br i1 %53, label %54, label %59
54: ; preds = %47, %40, %33, %26, %19, %12
%55 = load i32, i32* %3
%56 = add nsw i32 %55, 1
store i32 %56, i32* %3
%57 = load i32, i32* %2
%58 = add nsw i32 %57, 1
store i32 %58, i32* %2
br label %62
59: ; preds = %47
%60 = load i32, i32* %2
%61 = add nsw i32 %60, 1
store i32 %61, i32* %2
br label %62
62: ; preds = %59, %54
br label %9
63: ; preds = %9
store i32 19, i32* %3
br i1 true, label %65, label %64
64: ; preds = %63
store i32 900, i32* %2
br i1 true, label %65, label %68
65: ; preds = %64, %63
%66 = load i32, i32* %3
%67 = sub nsw i32 %66, 1
store i32 %67, i32* %3
br label %68
68: ; preds = %65, %64
%69 = load i32, i32* %3
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %69)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Please enter a string > \00"
@stdin = global i32 0
@.str.1 = [32 x i8] c"The number of syllables is %d.\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 20, i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 18)
ret i32 0
}