#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 EOF;
char getchar();
char eatBlockComment() {
  char e, f;
  while ((e = getchar()) != EOF && e != '*')
    ;
  if (e == '*') {
    f = getchar();
    if (f == '/')
      return '/';
    else if (f == EOF)
      return EOF;
    else
      return eatBlockComment();
  } else
    return EOF;
}


x86 assembly (clang, -O0):
<eatBlockComment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x2(%rbp)
movsbl %al,%ecx
mov    0x2eac(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x4(%rbp)
je     1159 <eatBlockComment+0x39>
movsbl -0x2(%rbp),%eax
cmp    $0x2a,%eax
setne  %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
test   $0x1,%al
jne    1169 <eatBlockComment+0x49>
jmp    116e <eatBlockComment+0x4e>
jmp    1128 <eatBlockComment+0x8>
movsbl -0x2(%rbp),%eax
cmp    $0x2a,%eax
jne    11cf <eatBlockComment+0xaf>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x2f,%eax
jne    119b <eatBlockComment+0x7b>
movb   $0x2f,-0x1(%rbp)
jmp    11db <eatBlockComment+0xbb>
movsbl -0x3(%rbp),%eax
mov    0x2e42(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    11c2 <eatBlockComment+0xa2>
mov    0x2e30(%rip),%rax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
jmp    11db <eatBlockComment+0xbb>
call   1040 <eatBlockComment@plt>
mov    %al,-0x1(%rbp)
jmp    11db <eatBlockComment+0xbb>
mov    0x2e12(%rip),%rax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eatBlockComment>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ecx
movzbl (%rbx),%eax
cmp    $0x2a,%cl
je     1135 <eatBlockComment+0x25>
cmp    %al,%cl
jne    1120 <eatBlockComment+0x10>
cmp    $0x2a,%cl
jne    1149 <eatBlockComment+0x39>
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0x2f,%al
je     114b <eatBlockComment+0x3b>
cmp    (%rbx),%al
jne    1120 <eatBlockComment+0x10>
pop    %rbx
ret
mov    $0x2f,%al
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i8 0
define signext i8 @eatBlockComment() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
br label %4
4: ; preds = %16, %0
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* @EOF
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %6, %8
br i1 %9, label %10, label %14
10: ; preds = %4
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 42
br label %14
14: ; preds = %10, %4
%15 = phi i1 [ false, %4 ], [ %13, %10 ]
br i1 %15, label %16, label %17
16: ; preds = %14
br label %4
17: ; preds = %14
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 42
br i1 %20, label %21, label %37
21: ; preds = %17
%22 = call signext i8 (...) @getchar()
store i8 %22, i8* %3
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 47
br i1 %25, label %26, label %27
26: ; preds = %21
store i8 47, i8* %1
br label %39
27: ; preds = %21
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = load i8, i8* @EOF
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %29, %31
br i1 %32, label %33, label %35
33: ; preds = %27
%34 = load i8, i8* @EOF
store i8 %34, i8* %1
br label %39
35: ; preds = %27
%36 = call signext i8 @eatBlockComment()
store i8 %36, i8* %1
br label %39
37: ; preds = %17
%38 = load i8, i8* @EOF
store i8 %38, i8* %1
br label %39
39: ; preds = %37, %35, %33, %26
%40 = load i8, i8* %1
ret i8 %40
}

LLVM IR (-O2):
@EOF = global i8 0
define signext i8 @eatBlockComment() {
br label %1
1: ; preds = %7, %0
%2 = tail call signext i8 (...) @getchar()
%3 = load i8, i8* @EOF
%4 = icmp ne i8 %2, %3
%5 = icmp ne i8 %2, 42
%6 = and i1 %5, %4
br i1 %6, label %7, label %8
7: ; preds = %1, %13
br label %1
8: ; preds = %1
%9 = icmp eq i8 %2, 42
br i1 %9, label %10, label %16
10: ; preds = %8
%11 = tail call signext i8 (...) @getchar()
%12 = icmp eq i8 %11, 47
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i8, i8* @EOF
%15 = icmp eq i8 %11, %14
br i1 %15, label %16, label %7
16: ; preds = %8, %13, %10
%17 = phi i8 [ 47, %10 ], [ %11, %13 ], [ %3, %8 ]
ret i8 %17
}