#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 */
double primes(float);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float x = -1;
  while (x <= 0 || x >= 1)
    scanf("%f", &x);
  printf("%f", primes(x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xeb9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
mov    %al,-0x9(%rbp)
jae    1174 <main+0x44>
movss  -0x8(%rbp),%xmm0
movss  0xe99(%rip),%xmm1
ucomiss %xmm1,%xmm0
setae  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1184 <main+0x54>
jmp    1199 <main+0x69>
lea    0xe7d(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
jmp    114c <main+0x1c>
movss  -0x8(%rbp),%xmm0
call   1050 <primes@plt>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0xbf800000,0x4(%rsp)
bf
lea    0xec5(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jae    1150 <main+0x20>
ucomiss 0xe90(%rip),%xmm0
jae    1150 <main+0x20>
call   1050 <primes@plt>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float -1.000000e+00, float* %2
br label %3
3: ; preds = %11, %0
%4 = load float, float* %2
%5 = fcmp ole float %4, 0.000000e+00
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load float, float* %2
%8 = fcmp oge float %7, 1.000000e+00
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ true, %3 ], [ %8, %6 ]
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
br label %3
13: ; preds = %9
%14 = load float, float* %2
%15 = call double @primes(float %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float -1.000000e+00, float* %1
br label %3
3: ; preds = %0, %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fcmp ole float %5, 0.000000e+00
%7 = fcmp oge float %5, 1.000000e+00
%8 = or i1 %6, %7
br i1 %8, label %3, label %9
9: ; preds = %3
%10 = call double @primes(float %5)
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}