#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 fgetc(int /*<<< orphan*/);
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(void) {
  int c;
  long idx;
  fputs("\xc3KC-TAPE by AF. ", stdout);
  idx = 0;
  while (242) {
    c = fgetc(stdin);
    idx++;
    if (c == EOF)
      break;
    if ((idx % 130) == 0)
      continue;
    fputc(c, stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1030 <fputs@plt>
movq   $0x0,-0x10(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1040 <fgetc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2e5d(%rip),%rcx
cmp    (%rcx),%eax
jne    1190 <main+0x60>
jmp    11c3 <main+0x93>
mov    -0x10(%rbp),%rax
mov    $0x82,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    11ad <main+0x7d>
jmp    115c <main+0x2c>
mov    -0x8(%rbp),%edi
mov    0x2e19(%rip),%rax
mov    (%rax),%esi
call   1050 <fputc@plt>
jmp    115c <main+0x2c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e8e(%rip),%r14
mov    (%r14),%esi
lea    0xeb4(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e90(%rip),%r15
mov    (%r15),%edi
call   1040 <fgetc@plt>
mov    0x2e79(%rip),%r12
cmp    (%r12),%eax
jne    117e <main+0x4e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%edi
mov    $0x1,%r13d
mov    $0xffffffffffffffff,%rbx
movabs $0xfc0fc0fc0fc0fc1,%rbp
fc c0 0f
jmp    11b8 <main+0x88>
nopl   0x0(%rax)
mov    (%r15),%edi
call   1040 <fgetc@plt>
mov    %eax,%edi
add    $0x1,%r13
add    $0xffffffffffffffff,%rbx
cmp    (%r12),%eax
je     116d <main+0x3d>
mov    %r13,%rax
mul    %rbp
shr    $0x3,%rdx
mov    %rdx,%rax
shl    $0x7,%rax
lea    (%rax,%rdx,2),%rax
add    %rbx,%rax
je     11a0 <main+0x70>
mov    (%r14),%esi
call   1050 <fputc@plt>
jmp    11a0 <main+0x70>

LLVM IR (-O0):
@.str = [17 x i8] c"\C3KC-TAPE by AF. \00"
@stdout = global i32 0
@stdin = global i32 0
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %4)
store i64 0, i64* %3
br label %6
6: ; preds = %0, %19, %20
%7 = load i32, i32* @stdin
%8 = call i32 @fgetc(i32 %7)
store i32 %8, i32* %2
%9 = load i64, i64* %3
%10 = add nsw i64 %9, 1
store i64 %10, i64* %3
%11 = load i32, i32* %2
%12 = load i32, i32* @EOF
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %6
br label %24
15: ; preds = %6
%16 = load i64, i64* %3
%17 = srem i64 %16, 130
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %15
br label %6
20: ; preds = %15
%21 = load i32, i32* %2
%22 = load i32, i32* @stdout
%23 = call i32 @fputc(i32 %21, i32 %22)
br label %6
24: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"\C3KC-TAPE by AF. \00"
@stdout = global i32 0
@stdin = global i32 0
@EOF = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgetc(i32 %3)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %21, label %7
7: ; preds = %0, %15
%8 = phi i64 [ %18, %15 ], [ 1, %0 ]
%9 = phi i32 [ %17, %15 ], [ %4, %0 ]
%10 = urem i64 %8, 130
%11 = icmp eq i64 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = load i32, i32* @stdout
%14 = tail call i32 @fputc(i32 %9, i32 %13)
br label %15
15: ; preds = %12, %7
%16 = load i32, i32* @stdin
%17 = tail call i32 @fgetc(i32 %16)
%18 = add nuw nsw i64 %8, 1
%19 = load i32, i32* @EOF
%20 = icmp eq i32 %17, %19
br i1 %20, label %21, label %7
21: ; preds = %15, %0
ret i32 0
}