#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 */
char checkHaiku(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int main(void) {
  char haiku[300 + 1], lineWrong;
  while (1) {
    gets(haiku);
    if (strcmp(haiku, "e/o/i") == 0)
      break;
    lineWrong = checkHaiku(haiku);
    if (lineWrong)
      printf("%d\n", lineWrong);
    else
      printf("Y\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x140(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x140(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1180 <main+0x40>
jmp    11cc <main+0x8c>
lea    -0x140(%rbp),%rdi
call   1060 <checkHaiku@plt>
mov    %al,-0x141(%rbp)
cmpb   $0x0,-0x141(%rbp)
je     11b9 <main+0x79>
movsbl -0x141(%rbp),%esi
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11c7 <main+0x87>
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1152 <main+0x12>
xor    %eax,%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <gets@plt>
lea    0xe90(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11db <main+0x8b>
mov    %rsp,%rbx
lea    0xe83(%rip),%r14
lea    0xe72(%rip),%r15
lea    0xe71(%rip),%r12
jmp    11c0 <main+0x70>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1060 <gets@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     11db <main+0x8b>
mov    %rbx,%rdi
call   1070 <checkHaiku@plt>
test   %al,%al
je     11a0 <main+0x50>
movsbl %al,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11a8 <main+0x58>
xor    %eax,%eax
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"e/o/i\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [3 x i8] c"Y\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [301 x i8]
%3 = alloca i8
store i32 0, i32* %1
br label %4
4: ; preds = %0, %22
%5 = getelementptr inbounds [301 x i8], [301 x i8]* %2, i64 0, i64 0
%6 = call i32 @gets(i8* %5)
%7 = getelementptr inbounds [301 x i8], [301 x i8]* %2, i64 0, i64 0
%8 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %4
br label %23
11: ; preds = %4
%12 = getelementptr inbounds [301 x i8], [301 x i8]* %2, i64 0, i64 0
%13 = call signext i8 @checkHaiku(i8* %12)
store i8 %13, i8* %3
%14 = load i8, i8* %3
%15 = icmp ne i8 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %11
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %22
20: ; preds = %11
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %16
br label %4
23: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"e/o/i\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@str = [2 x i8] c"Y\00"
define i32 @main() {
%1 = alloca [301 x i8]
%2 = getelementptr inbounds [301 x i8], [301 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %0, %14
%7 = call signext i8 @checkHaiku(i8* %2)
%8 = icmp eq i8 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = sext i8 %7 to i32
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %14
12: ; preds = %6
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
%15 = call i32 @gets(i8* %2)
%16 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %6
18: ; preds = %14, %0
ret i32 0
}