#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 EOF;
char getchar();
int number_prime(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, float *);
int main() {
  float nummer;
  int wrong = 0;
  int i;
  char letter;
  if (scanf("%f", &nummer)) {
    letter = getchar();
    if (!((letter == '\n') || (letter == EOF)) || ((int)nummer != nummer))
      wrong = 1;
  } else
    wrong = 1;
  if (wrong) {
    printf("-1");
  } else {
    printf("%d", number_prime((int)nummer));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xea3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
cmp    $0x0,%rax
je     11c7 <main+0x87>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0xa,%eax
je     119d <main+0x5d>
movsbl -0x11(%rbp),%eax
mov    0x2e56(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    11bb <main+0x7b>
cvttss2si -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    11bb <main+0x7b>
jp     11bb <main+0x7b>
jmp    11c2 <main+0x82>
movl   $0x1,-0xc(%rbp)
jmp    11ce <main+0x8e>
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     11eb <main+0xab>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1205 <main+0xc5>
cvttss2si -0x8(%rbp),%edi
call   1030 <number_prime@plt>
mov    %eax,%esi
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
test   %rax,%rax
je     1181 <main+0x41>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%al
je     116d <main+0x2d>
mov    0x2e7f(%rip),%rcx
cmp    (%rcx),%al
jne    1181 <main+0x41>
movss  0x4(%rsp),%xmm0
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1181 <main+0x41>
jnp    1193 <main+0x53>
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
cvttss2si %xmm0,%edi
call   1030 <number_prime@plt>
lea    0xe63(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    118f <main+0x4f>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@EOF = global i8 0
@.str.1 = [3 x i8] c"-1\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 0, i32* %1
store i32 0, i32* %3
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %0
%9 = call signext i8 (...) @getchar()
store i8 %9, i8* %5
%10 = load i8, i8* %5
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 10
br i1 %12, label %19, label %13
13: ; preds = %8
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = load i8, i8* @EOF
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %15, %17
br i1 %18, label %19, label %25
19: ; preds = %13, %8
%20 = load float, float* %2
%21 = fptosi float %20 to i32
%22 = sitofp i32 %21 to float
%23 = load float, float* %2
%24 = fcmp une float %22, %23
br i1 %24, label %25, label %26
25: ; preds = %19, %13
store i32 1, i32* %3
br label %26
26: ; preds = %25, %19
br label %28
27: ; preds = %0
store i32 1, i32* %3
br label %28
28: ; preds = %27, %26
%29 = load i32, i32* %3
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %38
33: ; preds = %28
%34 = load float, float* %2
%35 = fptosi float %34 to i32
%36 = call i32 @number_prime(i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %36)
br label %38
38: ; preds = %33, %31
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@EOF = global i8 0
@.str.1 = [3 x i8] c"-1\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %0
%6 = call signext i8 (...) @getchar()
%7 = icmp eq i8 %6, 10
%8 = load i8, i8* @EOF
%9 = icmp eq i8 %6, %8
%10 = select i1 %7, i1 true, i1 %9
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = load float, float* %1
%13 = fptosi float %12 to i32
%14 = sitofp i32 %13 to float
%15 = fcmp une float %12, %14
br i1 %15, label %16, label %18
16: ; preds = %11, %5, %0
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %21
18: ; preds = %11
%19 = call i32 @number_prime(i32 %13)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %21
21: ; preds = %18, %16
ret i32 0
}