#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
scalar_t__ feof(int /*<<< orphan*/ *);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
void copy(FILE *ffp, FILE *tfp) {
  register int c;
  while (1) {
    c = getc(ffp);
    if (c == EOF && feof(ffp))
      return;
    if (c != '\r' && c != 26)
      putc(c, tfp);
  }
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <getc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e92(%rip),%rcx
cmp    (%rcx),%eax
jne    1177 <copy+0x47>
mov    -0x8(%rbp),%rdi
call   1040 <feof@plt>
cmp    $0x0,%rax
je     1177 <copy+0x47>
add    $0x20,%rsp
pop    %rbp
ret
cmpl   $0xd,-0x14(%rbp)
je     1197 <copy+0x67>
cmpl   $0x1a,-0x14(%rbp)
je     1197 <copy+0x67>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <putc@plt>
jmp    1140 <copy+0x10>

x86 assembly (clang, -O2):
<copy>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ea4(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1050 <getc@plt>
mov    %eax,%ebp
cmp    (%r15),%eax
jne    116c <copy+0x3c>
mov    %rbx,%rdi
call   1040 <feof@plt>
test   %rax,%rax
jne    1182 <copy+0x52>
cmp    $0xd,%ebp
je     1150 <copy+0x20>
cmp    $0x1a,%ebp
je     1150 <copy+0x20>
mov    %ebp,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
jmp    1150 <copy+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @copy(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
br label %6
6: ; preds = %2, %27
%7 = load i32*, i32** %3
%8 = call i32 @getc(i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %6
%13 = load i32*, i32** %3
%14 = call i64 @feof(i32* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
ret void
17: ; preds = %12, %6
%18 = load i32, i32* %5
%19 = icmp ne i32 %18, 13
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i32, i32* %5
%22 = icmp ne i32 %21, 26
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = load i32, i32* %5
%25 = load i32*, i32** %4
%26 = call i32 @putc(i32 %24, i32* %25)
br label %27
27: ; preds = %23, %20, %17
br label %6
}

LLVM IR (-O2):
@EOF = global i32 0
define void @copy(i32* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %12, %2
%4 = tail call i32 @getc(i32* %0)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i64 @feof(i32* %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %7
ret void
11: ; preds = %7, %3
switch i32 %4, label %13 [
i32 26, label %12
i32 13, label %12
]
12: ; preds = %11, %11, %13
br label %3
13: ; preds = %11
%14 = tail call i32 @putc(i32 %4, i32* %1)
br label %12
}