#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 EOF;
int getchar();
int /*<<< orphan*/ putnonblank(int);
int /*<<< orphan*/ skipblock();
int /*<<< orphan*/ skipline();
void afterslash() {
  int c;
  while ((c = getchar()) != EOF) {
    if (c == '/')
      skipline();
    else if (c == '*')
      skipblock();
    else {
      putnonblank(c);
      return;
    }
  }
}


x86 assembly (clang, -O0):
<afterslash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    0x2e8f(%rip),%rcx
cmp    (%rcx),%eax
je     11a4 <afterslash+0x64>
cmpl   $0x2f,-0x4(%rbp)
jne    1177 <afterslash+0x37>
mov    $0x0,%al
call   1030 <skipline@plt>
jmp    119f <afterslash+0x5f>
cmpl   $0x2a,-0x4(%rbp)
jne    118d <afterslash+0x4d>
mov    $0x0,%al
call   1060 <skipblock@plt>
jmp    119a <afterslash+0x5a>
mov    -0x4(%rbp),%edi
call   1040 <putnonblank@plt>
jmp    11a4 <afterslash+0x64>
jmp    119f <afterslash+0x5f>
jmp    1148 <afterslash+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afterslash>:
push   %rbx
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2e99(%rip),%rbx
jmp    116e <afterslash+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <skipblock@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%rbx),%eax
je     1185 <afterslash+0x45>
cmp    $0x2a,%eax
je     1160 <afterslash+0x20>
cmp    $0x2f,%eax
jne    1187 <afterslash+0x47>
xor    %eax,%eax
call   1030 <skipline@plt>
jmp    1167 <afterslash+0x27>
pop    %rbx
ret
mov    %eax,%edi
pop    %rbx
jmp    1040 <putnonblank@plt>

LLVM IR (-O0):
@EOF = global i32 0
define void @afterslash() {
%1 = alloca i32
br label %2
2: ; preds = %20, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
br i1 %5, label %6, label %21
6: ; preds = %2
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 47
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @skipline()
br label %20
11: ; preds = %6
%12 = load i32, i32* %1
%13 = icmp eq i32 %12, 42
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @skipblock()
br label %19
16: ; preds = %11
%17 = load i32, i32* %1
%18 = call i32 @putnonblank(i32 %17)
br label %21
19: ; preds = %14
br label %20
20: ; preds = %19, %9
br label %2
21: ; preds = %16, %2
ret void
}

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