#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 input();
int /*<<< orphan*/ unput(char);
comment() {
  char c, c1;
loop:
  while ((c = input()) != '*' && c != 0)
    ;
  if ((c1 = input()) != '/' && c != 0) {
    unput(c1);
    goto loop;
  }
}


x86 assembly (clang, -O0):
<comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
jmp    112d <comment+0xd>
mov    $0x0,%al
call   1030 <input@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x2a,%ecx
mov    %al,-0x7(%rbp)
je     1155 <comment+0x35>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x7(%rbp)
mov    -0x7(%rbp),%al
test   $0x1,%al
jne    1165 <comment+0x45>
jmp    116a <comment+0x4a>
jmp    112d <comment+0xd>
mov    $0x0,%al
call   1030 <input@plt>
mov    %al,-0x6(%rbp)
movsbl %al,%eax
cmp    $0x2f,%eax
je     119b <comment+0x7b>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
je     119b <comment+0x7b>
movsbl -0x6(%rbp),%edi
call   1040 <unput@plt>
jmp    1128 <comment+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comment>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <input@plt>
mov    %eax,%ebx
cmp    $0x2a,%al
je     1141 <comment+0x21>
test   %bl,%bl
jne    1130 <comment+0x10>
xor    %eax,%eax
call   1030 <input@plt>
cmp    $0x2f,%al
je     115a <comment+0x3a>
test   %bl,%bl
je     115a <comment+0x3a>
movsbl %al,%edi
call   1040 <unput@plt>
jmp    1130 <comment+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @comment() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
br label %4
4: ; preds = %24, %0
br label %5
5: ; preds = %15, %4
%6 = call signext i8 (...) @input()
store i8 %6, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 42
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ false, %5 ], [ %12, %9 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %5
16: ; preds = %13
%17 = call signext i8 (...) @input()
store i8 %17, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 47
br i1 %19, label %20, label %27
20: ; preds = %16
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load i8, i8* %3
%26 = call i32 @unput(i8 signext %25)
br label %4
27: ; preds = %20, %16
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
define i32 @comment() {
br label %1
1: ; preds = %3, %0
%2 = tail call signext i8 (...) @input()
switch i8 %2, label %3 [
i8 42, label %4
i8 0, label %4
]
3: ; preds = %1, %9
br label %1
4: ; preds = %1, %1
%5 = icmp ne i8 %2, 0
%6 = tail call signext i8 (...) @input()
%7 = icmp ne i8 %6, 47
%8 = select i1 %7, i1 %5, i1 false
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 @unput(i8 signext %6)
br label %3
11: ; preds = %4
ret i32 undef
}