#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*/ putchar(int);
main() {
  int c1, c2, c3;
  while ((c1 = getchar()) != EOF) {
    if (c1 == '_') {
      if ((c2 = getchar()) == 'c') {
        if ((c3 = getchar()) == '_') {
          putchar(c3);
        } else {
          putchar(c1);
          putchar(c2);
          putchar(c3);
        }
      } else {
        putchar(c1);
        putchar(c2);
      }
    } else {
      putchar(c1);
    }
  }
}


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    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     11c4 <main+0xa4>
cmpl   $0x5f,-0x8(%rbp)
jne    11b7 <main+0x97>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x63,%eax
jne    11a2 <main+0x82>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x5f,%eax
jne    1185 <main+0x65>
mov    -0x10(%rbp),%edi
call   1030 <putchar@plt>
jmp    119d <main+0x7d>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%edi
call   1030 <putchar@plt>
jmp    11b2 <main+0x92>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%edi
call   1030 <putchar@plt>
jmp    11bf <main+0x9f>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
mov    -0x4(%rbp),%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    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    1141 <main+0x21>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %eax,%ebx
jmp    1171 <main+0x51>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%ebx
mov    $0x5f,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
cmp    (%r14),%eax
je     1137 <main+0x17>
cmp    $0x5f,%ebx
jne    115c <main+0x3c>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x63,%eax
jne    1150 <main+0x30>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
mov    $0x5f,%edi
call   1030 <putchar@plt>
cmp    $0x5f,%ebx
je     1163 <main+0x43>
mov    $0x63,%edi
jmp    1157 <main+0x37>

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

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