#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*/ printf(char *, ...);
int /*<<< orphan*/ start_vet(char *, int);
int main(void) {
  int c, i;
  char vet[10000];
  char quoted = ' ';
  char commentary = ' ';
  start_vet(vet, 10000);
  for (i = 0; i < (10000 - 1) && (c = getchar()) != EOF; ++i) {
    if (c == '"' && commentary == ' ') {
      if (quoted == 'X')
        quoted = ' ';
      else if (quoted == ' ')
        quoted = 'X';
    }
    if (quoted == ' ') {
      if (c == '/') {
        if ((c = getchar()) == '*')
          commentary = 'X';
        c = getchar();
      } else if (c == '*') {
        if ((c = getchar()) == '/')
          commentary = ' ';
        c = getchar();
      }
    }
    if (commentary == ' ')
      vet[i] = c;
  }
  vet[i + 1] = '\0';
  printf("--------------------\n");
  printf("%s", vet);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2730,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x20,-0x2721(%rbp)
movb   $0x20,-0x2722(%rbp)
lea    -0x2720(%rbp),%rdi
mov    $0x2710,%esi
call   1050 <start_vet@plt>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x270f,-0xc(%rbp)
mov    %al,-0x2723(%rbp)
jge    1199 <main+0x69>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e5a(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x2723(%rbp)
mov    -0x2723(%rbp),%al
test   $0x1,%al
jne    11ac <main+0x7c>
jmp    12b1 <main+0x181>
cmpl   $0x22,-0x8(%rbp)
jne    1203 <main+0xd3>
movsbl -0x2722(%rbp),%eax
cmp    $0x20,%eax
jne    1203 <main+0xd3>
movsbl -0x2721(%rbp),%eax
cmp    $0x58,%eax
jne    11e2 <main+0xb2>
movb   $0x20,-0x2721(%rbp)
jmp    11fe <main+0xce>
movsbl -0x2721(%rbp),%eax
cmp    $0x20,%eax
jne    11f9 <main+0xc9>
movb   $0x58,-0x2721(%rbp)
jmp    11fe <main+0xce>
jmp    1203 <main+0xd3>
movsbl -0x2721(%rbp),%eax
cmp    $0x20,%eax
jne    127e <main+0x14e>
cmpl   $0x2f,-0x8(%rbp)
jne    1246 <main+0x116>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x2a,%eax
jne    1237 <main+0x107>
movb   $0x58,-0x2722(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    1279 <main+0x149>
cmpl   $0x2a,-0x8(%rbp)
jne    1274 <main+0x144>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x2f,%eax
jne    126a <main+0x13a>
movb   $0x20,-0x2722(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    1279 <main+0x149>
jmp    127e <main+0x14e>
movsbl -0x2722(%rbp),%eax
cmp    $0x20,%eax
jne    129e <main+0x16e>
mov    -0x8(%rbp),%eax
mov    %al,%cl
movslq -0xc(%rbp),%rax
mov    %cl,-0x2720(%rbp,%rax,1)
jmp    12a3 <main+0x173>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1168 <main+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x2720(%rbp,%rax,1)
lea    0xd38(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x2720(%rbp),%rsi
lea    0xd39(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2730,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x2710,%rsp
mov    %rsp,%rdi
mov    $0x2710,%esi
call   1060 <start_vet@plt>
mov    $0x20,%r15b
mov    0x2e82(%rip),%r14
xor    %ebx,%ebx
mov    $0x20,%r12b
jmp    1189 <main+0x49>
mov    $0x58,%cl
mov    %al,(%rsp,%rbx,1)
mov    $0x20,%r15b
mov    %ecx,%r12d
add    $0x1,%rbx
cmp    $0x270f,%rbx
je     1222 <main+0xe2>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%r14),%eax
je     1227 <main+0xe7>
cmp    $0x22,%eax
jne    11c0 <main+0x80>
cmp    $0x20,%r15b
jne    11c0 <main+0x80>
mov    $0x22,%eax
cmp    $0x20,%r12b
je     116d <main+0x2d>
mov    $0x20,%cl
cmp    $0x58,%r12b
je     116f <main+0x2f>
jmp    1210 <main+0xd0>
nopl   0x0(%rax)
cmp    $0x20,%r12b
jne    1210 <main+0xd0>
cmp    $0x2a,%eax
je     11ed <main+0xad>
cmp    $0x2f,%eax
jne    1210 <main+0xd0>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0x2a,%ebp
jne    1210 <main+0xd0>
mov    $0x20,%r12b
mov    $0x58,%r15b
jmp    1178 <main+0x38>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <getchar@plt>
mov    $0x20,%cl
cmp    $0x2f,%ebp
je     116f <main+0x2f>
nopl   0x0(%rax,%rax,1)
mov    %r12d,%ecx
cmp    $0x20,%r15b
je     116f <main+0x2f>
jmp    1178 <main+0x38>
mov    $0x270f,%ebx
add    $0x1,%ebx
movb   $0x0,(%rsp,%rbx,1)
lea    0xdce(%rip),%rdi
call   1030 <puts@plt>
lea    0xdbf(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x2710,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [22 x i8] c"--------------------\0A\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10000 x i8]
%5 = alloca i8
%6 = alloca i8
store i32 0, i32* %1
store i8 32, i8* %5
store i8 32, i8* %6
%7 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%8 = call i32 @start_vet(i8* %7, i32 10000)
store i32 0, i32* %3
br label %9
9: ; preds = %72, %0
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 9999
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = call i32 (...) @getchar()
store i32 %13, i32* %2
%14 = load i32, i32* @EOF
%15 = icmp ne i32 %13, %14
br label %16
16: ; preds = %12, %9
%17 = phi i1 [ false, %9 ], [ %15, %12 ]
br i1 %17, label %18, label %75
18: ; preds = %16
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 34
br i1 %20, label %21, label %37
21: ; preds = %18
%22 = load i8, i8* %6
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 32
br i1 %24, label %25, label %37
25: ; preds = %21
%26 = load i8, i8* %5
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 88
br i1 %28, label %29, label %30
29: ; preds = %25
store i8 32, i8* %5
br label %36
30: ; preds = %25
%31 = load i8, i8* %5
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 32
br i1 %33, label %34, label %35
34: ; preds = %30
store i8 88, i8* %5
br label %35
35: ; preds = %34, %30
br label %36
36: ; preds = %35, %29
br label %37
37: ; preds = %36, %21, %18
%38 = load i8, i8* %5
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 32
br i1 %40, label %41, label %61
41: ; preds = %37
%42 = load i32, i32* %2
%43 = icmp eq i32 %42, 47
br i1 %43, label %44, label %50
44: ; preds = %41
%45 = call i32 (...) @getchar()
store i32 %45, i32* %2
%46 = icmp eq i32 %45, 42
br i1 %46, label %47, label %48
47: ; preds = %44
store i8 88, i8* %6
br label %48
48: ; preds = %47, %44
%49 = call i32 (...) @getchar()
store i32 %49, i32* %2
br label %60
50: ; preds = %41
%51 = load i32, i32* %2
%52 = icmp eq i32 %51, 42
br i1 %52, label %53, label %59
53: ; preds = %50
%54 = call i32 (...) @getchar()
store i32 %54, i32* %2
%55 = icmp eq i32 %54, 47
br i1 %55, label %56, label %57
56: ; preds = %53
store i8 32, i8* %6
br label %57
57: ; preds = %56, %53
%58 = call i32 (...) @getchar()
store i32 %58, i32* %2
br label %59
59: ; preds = %57, %50
br label %60
60: ; preds = %59, %48
br label %61
61: ; preds = %60, %37
%62 = load i8, i8* %6
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 32
br i1 %64, label %65, label %71
65: ; preds = %61
%66 = load i32, i32* %2
%67 = trunc i32 %66 to i8
%68 = load i32, i32* %3
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 %69
store i8 %67, i8* %70
br label %71
71: ; preds = %65, %61
br label %72
72: ; preds = %71
%73 = load i32, i32* %3
%74 = add nsw i32 %73, 1
store i32 %74, i32* %3
br label %9
75: ; preds = %16
%76 = load i32, i32* %3
%77 = add nsw i32 %76, 1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 %78
store i8 0, i8* %79
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%81 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %81)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str.1 = [3 x i8] c"%s\00"
@str = [21 x i8] c"--------------------\00"
define i32 @main() {
%1 = alloca [10000 x i8]
%2 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 0
%3 = call i32 @start_vet(i8* %2, i32 10000)
br label %4
4: ; preds = %0, %35
%5 = phi i64 [ 0, %0 ], [ %38, %35 ]
%6 = phi i8 [ 32, %0 ], [ %36, %35 ]
%7 = phi i8 [ 32, %0 ], [ %37, %35 ]
%8 = call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %40, label %11
11: ; preds = %4
%12 = icmp eq i32 %8, 34
%13 = icmp eq i8 %6, 32
%14 = select i1 %12, i1 %13, i1 false
br i1 %14, label %15, label %16
15: ; preds = %11
switch i8 %7, label %27 [
i8 88, label %30
i8 32, label %29
]
16: ; preds = %11
%17 = icmp eq i8 %7, 32
br i1 %17, label %18, label %27
18: ; preds = %16
switch i32 %8, label %27 [
i32 47, label %19
i32 42, label %23
]
19: ; preds = %18
%20 = call i32 (...) @getchar()
%21 = icmp eq i32 %20, 42
%22 = call i32 (...) @getchar()
br i1 %21, label %35, label %27
23: ; preds = %18
%24 = call i32 (...) @getchar()
%25 = icmp eq i32 %24, 47
%26 = call i32 (...) @getchar()
br i1 %25, label %30, label %27
27: ; preds = %15, %23, %19, %18, %16
%28 = phi i32 [ %22, %19 ], [ %26, %23 ], [ %8, %16 ], [ %8, %18 ], [ 34, %15 ]
br i1 %13, label %30, label %35
29: ; preds = %15
br label %30
30: ; preds = %15, %29, %23, %27
%31 = phi i32 [ %28, %27 ], [ 34, %15 ], [ %26, %23 ], [ 34, %29 ]
%32 = phi i8 [ %7, %27 ], [ 32, %15 ], [ 32, %23 ], [ 88, %29 ]
%33 = trunc i32 %31 to i8
%34 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 %5
store i8 %33, i8* %34
br label %35
35: ; preds = %19, %27, %30
%36 = phi i8 [ %6, %27 ], [ 32, %30 ], [ 88, %19 ]
%37 = phi i8 [ %7, %27 ], [ %32, %30 ], [ 32, %19 ]
%38 = add nuw nsw i64 %5, 1
%39 = icmp eq i64 %38, 9999
br i1 %39, label %40, label %4
40: ; preds = %35, %4
%41 = phi i64 [ 9999, %35 ], [ %5, %4 ]
%42 = add nuw i64 %41, 1
%43 = and i64 %42, 4294967295
%44 = getelementptr inbounds [10000 x i8], [10000 x i8]* %1, i64 0, i64 %43
store i8 0, i8* %44
%45 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}