#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 */
char EOF;
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char);
int Vystup(FILE *aInput, FILE *aOutput, unsigned aPocRadku,
           unsigned aUlozRadku) {
  if ((aInput == NULL) || (aOutput == NULL))
    return -1;
  int preskocRadku = aPocRadku - aUlozRadku;
  if (preskocRadku < 0)
    preskocRadku = 0;
  for (int i = 0; i < preskocRadku; i++)
    while (fgetc(aInput) != '\n')
      ;
  while (1) {
    char c = fgetc(aInput);
    if (c == EOF)
      return 0;
    fprintf(aOutput, "%c", c);
  }
}


x86 assembly (clang, -O0):
<Vystup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <Vystup+0x2c>
cmpq   $0x0,-0x18(%rbp)
jne    1158 <Vystup+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1203 <Vystup+0xe3>
mov    -0x1c(%rbp),%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1172 <Vystup+0x52>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11b7 <Vystup+0x97>
jmp    118a <Vystup+0x6a>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     11a4 <Vystup+0x84>
jmp    118a <Vystup+0x6a>
jmp    11a9 <Vystup+0x89>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1179 <Vystup+0x59>
jmp    11bc <Vystup+0x9c>
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
mov    0x2e15(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    11ea <Vystup+0xca>
movl   $0x0,-0x4(%rbp)
jmp    1203 <Vystup+0xe3>
mov    -0x18(%rbp),%rdi
lea    0xe0b(%rip),%rsi
movsbl -0x29(%rbp),%edx
call   1040 <fprintf@plt>
jmp    11bc <Vystup+0x9c>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vystup>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0xffffffff,%r14d
test   %rdi,%rdi
je     11a7 <Vystup+0x87>
mov    %rsi,%r15
test   %rsi,%rsi
je     11a7 <Vystup+0x87>
mov    %edx,%r12d
mov    %rdi,%rbp
sub    %ecx,%r12d
xor    %r14d,%r14d
test   %r12d,%r12d
cmovs  %r14d,%r12d
jle    1174 <Vystup+0x54>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1030 <fgetc@plt>
cmp    $0xa,%al
jne    1160 <Vystup+0x40>
add    $0x1,%ebx
cmp    %r12d,%ebx
jne    1160 <Vystup+0x40>
mov    %rbp,%rdi
call   1030 <fgetc@plt>
mov    0x2e65(%rip),%rbx
cmp    (%rbx),%al
je     11a7 <Vystup+0x87>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
mov    %r15,%rsi
call   1040 <fputc@plt>
mov    %rbp,%rdi
call   1030 <fgetc@plt>
cmp    (%rbx),%al
jne    1190 <Vystup+0x70>
mov    %r14d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i8 0
@.str = [3 x i8] c"%c\00"
define i32 @Vystup(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%13 = load i32*, i32** %6
%14 = icmp eq i32* %13, null
br i1 %14, label %18, label %15
15: ; preds = %4
%16 = load i32*, i32** %7
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %19
18: ; preds = %15, %4
store i32 -1, i32* %5
br label %56
19: ; preds = %15
%20 = load i32, i32* %8
%21 = load i32, i32* %9
%22 = sub i32 %20, %21
store i32 %22, i32* %10
%23 = load i32, i32* %10
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %19
store i32 0, i32* %10
br label %26
26: ; preds = %25, %19
store i32 0, i32* %11
br label %27
27: ; preds = %39, %26
%28 = load i32, i32* %11
%29 = load i32, i32* %10
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %42
31: ; preds = %27
br label %32
32: ; preds = %37, %31
%33 = load i32*, i32** %6
%34 = call signext i8 @fgetc(i32* %33)
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %35, 10
br i1 %36, label %37, label %38
37: ; preds = %32
br label %32
38: ; preds = %32
br label %39
39: ; preds = %38
%40 = load i32, i32* %11
%41 = add nsw i32 %40, 1
store i32 %41, i32* %11
br label %27
42: ; preds = %27
br label %43
43: ; preds = %42, %52
%44 = load i32*, i32** %6
%45 = call signext i8 @fgetc(i32* %44)
store i8 %45, i8* %12
%46 = load i8, i8* %12
%47 = sext i8 %46 to i32
%48 = load i8, i8* @EOF
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %47, %49
br i1 %50, label %51, label %52
51: ; preds = %43
store i32 0, i32* %5
br label %56
52: ; preds = %43
%53 = load i32*, i32** %7
%54 = load i8, i8* %12
%55 = call i32 @fprintf(i32* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %54)
br label %43
56: ; preds = %51, %18
%57 = load i32, i32* %5
ret i32 %57
}

LLVM IR (-O2):
@EOF = global i8 0
define i32 @Vystup(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = icmp eq i32* %0, null
%6 = icmp eq i32* %1, null
%7 = or i1 %5, %6
br i1 %7, label %31, label %8
8: ; preds = %4
%9 = sub i32 %2, %3
%10 = icmp sgt i32 %9, 0
%11 = select i1 %10, i32 %9, i32 0
br i1 %10, label %12, label %14
12: ; preds = %8, %21
%13 = phi i32 [ %22, %21 ], [ 0, %8 ]
br label %18
14: ; preds = %21, %8
%15 = tail call signext i8 @fgetc(i32* %0)
%16 = load i8, i8* @EOF
%17 = icmp eq i8 %15, %16
br i1 %17, label %31, label %24
18: ; preds = %12, %18
%19 = tail call signext i8 @fgetc(i32* %0)
%20 = icmp eq i8 %19, 10
br i1 %20, label %21, label %18
21: ; preds = %18
%22 = add nuw nsw i32 %13, 1
%23 = icmp eq i32 %22, %11
br i1 %23, label %14, label %12
24: ; preds = %14, %24
%25 = phi i8 [ %28, %24 ], [ %15, %14 ]
%26 = sext i8 %25 to i32
%27 = tail call i32 @fputc(i32 %26, i32* %1)
%28 = tail call signext i8 @fgetc(i32* %0)
%29 = load i8, i8* @EOF
%30 = icmp eq i8 %28, %29
br i1 %30, label %31, label %24
31: ; preds = %24, %14, %4
%32 = phi i32 [ -1, %4 ], [ 0, %14 ], [ 0, %24 ]
ret i32 %32
}