#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();
int /*<<< orphan*/ go_to_comment_end();
int /*<<< orphan*/ print_quoted(char);
int /*<<< orphan*/ putchar(char);
int main(void) {
  char c, d;
  while ((c = getchar()) != EOF) {
    if (c == '/') {
      d = getchar();
      if (d == '*') {
        go_to_comment_end();
      } else {
        putchar(c);
        putchar(d);
      }
    } else if (c == '\'' || c == '"') {
      print_quoted(c);
    } else {
      putchar(c);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
mov    0x2e85(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     11f0 <main+0xb0>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    11b5 <main+0x75>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
cmp    $0x2a,%eax
jne    119e <main+0x5e>
mov    $0x0,%al
call   1050 <go_to_comment_end@plt>
jmp    11b0 <main+0x70>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x6(%rbp),%edi
call   1030 <putchar@plt>
jmp    11eb <main+0xab>
movsbl -0x5(%rbp),%eax
cmp    $0x27,%eax
je     11cf <main+0x8f>
movsbl -0x5(%rbp),%eax
cmp    $0x22,%eax
jne    11dd <main+0x9d>
movsbl -0x5(%rbp),%edi
call   1060 <print_quoted@plt>
jmp    11e6 <main+0xa6>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    11eb <main+0xab>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2e96(%rip),%r14
jmp    116f <main+0x2f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
call   1060 <print_quoted@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%al
je     11bb <main+0x7b>
cmp    $0x22,%al
je     1160 <main+0x20>
cmp    $0x27,%al
je     1160 <main+0x20>
cmp    $0x2f,%al
jne    11a0 <main+0x60>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x2a,%al
jne    11a5 <main+0x65>
xor    %eax,%eax
call   1050 <go_to_comment_end@plt>
jmp    1168 <main+0x28>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
jmp    11b4 <main+0x74>
mov    %eax,%ebx
mov    $0x2f,%edi
call   1030 <putchar@plt>
movsbl %bl,%edi
call   1030 <putchar@plt>
jmp    1168 <main+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i8 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
br label %4
4: ; preds = %42, %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 %43
10: ; preds = %4
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 47
br i1 %13, label %14, label %27
14: ; preds = %10
%15 = call signext i8 (...) @getchar()
store i8 %15, i8* %3
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 42
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = call i32 (...) @go_to_comment_end()
br label %26
21: ; preds = %14
%22 = load i8, i8* %2
%23 = call i32 @putchar(i8 signext %22)
%24 = load i8, i8* %3
%25 = call i32 @putchar(i8 signext %24)
br label %26
26: ; preds = %21, %19
br label %42
27: ; preds = %10
%28 = load i8, i8* %2
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 39
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load i8, i8* %2
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 34
br i1 %34, label %35, label %38
35: ; preds = %31, %27
%36 = load i8, i8* %2
%37 = call i32 @print_quoted(i8 signext %36)
br label %41
38: ; preds = %31
%39 = load i8, i8* %2
%40 = call i32 @putchar(i8 signext %39)
br label %41
41: ; preds = %38, %35
br label %42
42: ; preds = %41, %26
br label %4
43: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@EOF = global i8 0
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i8, i8* @EOF
%3 = icmp eq i8 %1, %2
br i1 %3, label %22, label %4
4: ; preds = %0, %18
%5 = phi i8 [ %19, %18 ], [ %1, %0 ]
switch i8 %5, label %16 [
i8 47, label %6
i8 39, label %14
i8 34, label %14
]
6: ; preds = %4
%7 = tail call signext i8 (...) @getchar()
%8 = icmp eq i8 %7, 42
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @go_to_comment_end()
br label %18
11: ; preds = %6
%12 = tail call i32 @putchar(i8 signext 47)
%13 = tail call i32 @putchar(i8 signext %7)
br label %18
14: ; preds = %4, %4
%15 = tail call i32 @print_quoted(i8 signext %5)
br label %18
16: ; preds = %4
%17 = tail call i32 @putchar(i8 signext %5)
br label %18
18: ; preds = %14, %16, %9, %11
%19 = tail call signext i8 (...) @getchar()
%20 = load i8, i8* @EOF
%21 = icmp eq i8 %19, %20
br i1 %21, label %22, label %4
22: ; preds = %18, %0
ret i32 0
}