#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 */
#define EOF 128
char fgetc(int /*<<< orphan*/ *);
int CtiData(FILE *aVstup, unsigned *aPocSlov, unsigned *aPocRadku) {
  *aPocRadku = 0;
  *aPocSlov = 0;
  if (aVstup == NULL)
    return 1;
  bool byloPismeno = false;
  while (1) {
    char c = fgetc(aVstup);
    switch (c) {
    case '-':
    case ' ':
    case '\t':
      byloPismeno = false;
      (*aPocSlov)++;
      break;
    case '\n':
      byloPismeno = false;
      (*aPocRadku)++;
      (*aPocSlov)++;
      break;
    case EOF:
      if (byloPismeno)
        (*aPocSlov)++;
      return 0;
    default:
      byloPismeno = true;
    }
  }
}


x86 assembly (clang, -O0):
<CtiData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x10(%rbp)
jne    114f <CtiData+0x3f>
movl   $0x1,-0x4(%rbp)
jmp    1223 <CtiData+0x113>
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x25(%rbp)
movsbl -0x25(%rbp),%eax
mov    %eax,-0x2c(%rbp)
sub    $0x9,%eax
je     11bd <CtiData+0xad>
jmp    1177 <CtiData+0x67>
mov    -0x2c(%rbp),%eax
sub    $0xa,%eax
je     11d4 <CtiData+0xc4>
jmp    1188 <CtiData+0x78>
mov    -0x2c(%rbp),%eax
sub    $0x20,%eax
je     11bd <CtiData+0xad>
jmp    1199 <CtiData+0x89>
mov    -0x2c(%rbp),%eax
sub    $0x2d,%eax
je     11bd <CtiData+0xad>
jmp    11aa <CtiData+0x9a>
mov    -0x2c(%rbp),%eax
sub    $0x80,%eax
je     11f6 <CtiData+0xe6>
jmp    1217 <CtiData+0x107>
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    121e <CtiData+0x10e>
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    121e <CtiData+0x10e>
cmpl   $0x0,-0x24(%rbp)
je     120b <CtiData+0xfb>
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1223 <CtiData+0x113>
movl   $0x1,-0x24(%rbp)
jmp    1156 <CtiData+0x46>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CtiData>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
movl   $0x0,(%rdx)
movl   $0x0,(%rsi)
test   %rdi,%rdi
je     1164 <CtiData+0x54>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
lea    0xec7(%rip),%rbx
jmp    1148 <CtiData+0x38>
nopl   0x0(%rax,%rax,1)
addl   $0x1,(%r14)
addl   $0x1,(%r15)
mov    %r12,%rdi
call   1030 <fgetc@plt>
movsbl %al,%eax
add    $0xfffffff7,%eax
cmp    $0x24,%eax
ja     1148 <CtiData+0x38>
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @CtiData(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i8
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%10 = load i32*, i32** %7
store i32 0, i32* %10
%11 = load i32*, i32** %6
store i32 0, i32* %11
%12 = load i32*, i32** %5
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 1, i32* %4
br label %42
15: ; preds = %3
store i32 0, i32* %8
br label %16
16: ; preds = %15, %41
%17 = load i32*, i32** %5
%18 = call signext i8 @fgetc(i32* %17)
store i8 %18, i8* %9
%19 = load i8, i8* %9
%20 = sext i8 %19 to i32
switch i32 %20, label %40 [
i32 45, label %21
i32 32, label %21
i32 9, label %21
i32 10, label %25
i32 128, label %32
]
21: ; preds = %16, %16, %16
store i32 0, i32* %8
%22 = load i32*, i32** %6
%23 = load i32, i32* %22
%24 = add i32 %23, 1
store i32 %24, i32* %22
br label %41
25: ; preds = %16
store i32 0, i32* %8
%26 = load i32*, i32** %7
%27 = load i32, i32* %26
%28 = add i32 %27, 1
store i32 %28, i32* %26
%29 = load i32*, i32** %6
%30 = load i32, i32* %29
%31 = add i32 %30, 1
store i32 %31, i32* %29
br label %41
32: ; preds = %16
%33 = load i32, i32* %8
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = load i32*, i32** %6
%37 = load i32, i32* %36
%38 = add i32 %37, 1
store i32 %38, i32* %36
br label %39
39: ; preds = %35, %32
store i32 0, i32* %4
br label %42
40: ; preds = %16
store i32 1, i32* %8
br label %41
41: ; preds = %40, %25, %21
br label %16
42: ; preds = %39, %14
%43 = load i32, i32* %4
ret i32 %43
}

LLVM IR (-O2):
define i32 @CtiData(i32* %0, i32* nocapture %1, i32* nocapture %2) {
store i32 0, i32* %2
store i32 0, i32* %1
%4 = icmp eq i32* %0, null
br i1 %4, label %15, label %5
5: ; preds = %3, %14
%6 = tail call signext i8 @fgetc(i32* %0)
%7 = sext i8 %6 to i32
switch i32 %7, label %14 [
i32 45, label %11
i32 32, label %11
i32 9, label %11
i32 10, label %8
]
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add i32 %9, 1
store i32 %10, i32* %2
br label %11
11: ; preds = %5, %5, %5, %8
%12 = load i32, i32* %1
%13 = add i32 %12, 1
store i32 %13, i32* %1
br label %14
14: ; preds = %11, %5
br label %5
15: ; preds = %3
ret i32 1
}