#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 */
char getchar();
int /*<<< orphan*/ printf(char *, int);
char vstup(int cislo) {
  char in;
  printf("  Je tve cislo > nez %d: ", cislo);
  while ((in = getchar()) == '\n')
    ;
  return (in == 'Y' || in == 'y' || in == 'J' || in == 'j' || in == 'A' ||
          in == 'a')
             ? 1
             : 0;
}


x86 assembly (clang, -O0):
<vstup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
jne    1155 <vstup+0x35>
jmp    113a <vstup+0x1a>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x59,%ecx
mov    %al,-0x6(%rbp)
je     11bc <vstup+0x9c>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x79,%ecx
mov    %al,-0x6(%rbp)
je     11bc <vstup+0x9c>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x4a,%ecx
mov    %al,-0x6(%rbp)
je     11bc <vstup+0x9c>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6a,%ecx
mov    %al,-0x6(%rbp)
je     11bc <vstup+0x9c>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x41,%ecx
mov    %al,-0x6(%rbp)
je     11bc <vstup+0x9c>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vstup>:
push   %rax
mov    %edi,%esi
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
nop
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
je     1130 <vstup+0x10>
lea    -0x41(%rax),%ecx
cmp    $0x38,%cl
ja     115a <vstup+0x3a>
movzbl %cl,%ecx
movabs $0x100020001000201,%rdx
bt     %rcx,%rdx
jae    115a <vstup+0x3a>
mov    $0x1,%al
pop    %rcx
ret
cmp    $0x61,%al
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c" Je tve cislo > nez %d: \00"
define signext i8 @vstup(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %10, %1
%7 = call signext i8 (...) @getchar()
store i8 %7, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br i1 %9, label %10, label %11
10: ; preds = %6
br label %6
11: ; preds = %6
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 89
br i1 %14, label %35, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 121
br i1 %18, label %35, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 74
br i1 %22, label %35, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 106
br i1 %26, label %35, label %27
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 65
br i1 %30, label %35, label %31
31: ; preds = %27
%32 = load i8, i8* %3
%33 = sext i8 %32 to i32
%34 = icmp eq i32 %33, 97
br label %35
35: ; preds = %31, %27, %23, %19, %15, %11
%36 = phi i1 [ true, %27 ], [ true, %23 ], [ true, %19 ], [ true, %15 ], [ true, %11 ], [ %34, %31 ]
%37 = zext i1 %36 to i64
%38 = select i1 %36, i32 1, i32 0
%39 = trunc i32 %38 to i8
ret i8 %39
}

LLVM IR (-O2):
@.str = [26 x i8] c" Je tve cislo > nez %d: \00"
define signext i8 @vstup(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %3
3: ; preds = %3, %1
%4 = tail call signext i8 (...) @getchar()
switch i8 %4, label %5 [
i8 10, label %3
i8 121, label %8
i8 106, label %8
i8 89, label %8
i8 74, label %8
i8 65, label %8
]
5: ; preds = %3
%6 = icmp eq i8 %4, 97
%7 = zext i1 %6 to i8
br label %8
8: ; preds = %3, %3, %3, %3, %3, %5
%9 = phi i8 [ %7, %5 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ], [ 1, %3 ]
ret i8 %9
}