#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 */
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ scanf(char *, float *);
float erfasse_gleitkomma_zahl(float min, float max) {
  float eingabe = 0.0;
  do {
    scanf("\n%f", &eingabe);
    if (eingabe < min && eingabe > max) {
      printf("\nBitte eine Zahl zwischen %f und %f eingeben!\n", min, max);
    } else {
    }
  } while (eingabe < min && eingabe > max);
  return eingabe;
}


x86 assembly (clang, -O0):
<erfasse_gleitkomma_zahl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xebf(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1187 <erfasse_gleitkomma_zahl+0x67>
movss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1187 <erfasse_gleitkomma_zahl+0x67>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
jmp    118c <erfasse_gleitkomma_zahl+0x6c>
jmp    118c <erfasse_gleitkomma_zahl+0x6c>
jmp    1191 <erfasse_gleitkomma_zahl+0x71>
movss  -0xc(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
xor    %eax,%eax
ucomiss %xmm1,%xmm0
mov    %al,-0xd(%rbp)
jbe    11b8 <erfasse_gleitkomma_zahl+0x98>
movss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    113a <erfasse_gleitkomma_zahl+0x1a>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erfasse_gleitkomma_zahl>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x4(%rsp)
movss  %xmm0,0x8(%rsp)
movl   $0x0,0xc(%rsp)
lea    0xebc(%rip),%r14
lea    0xc(%rsp),%rbx
lea    0xeb4(%rip),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    118d <erfasse_gleitkomma_zahl+0x6d>
ucomiss 0x4(%rsp),%xmm0
jbe    118d <erfasse_gleitkomma_zahl+0x6d>
mov    %r15,%rdi
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    119f <erfasse_gleitkomma_zahl+0x7f>
ucomiss 0x4(%rsp),%xmm0
ja     1150 <erfasse_gleitkomma_zahl+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0A%f\00"
@.str.1 = [47 x i8] c"\0ABitte eine Zahl zwischen %f und %f eingeben!\0A\00"
define float @erfasse_gleitkomma_zahl(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
store float 0.000000e+00, float* %5
br label %6
6: ; preds = %29, %2
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %5)
%8 = load float, float* %5
%9 = load float, float* %3
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %19
11: ; preds = %6
%12 = load float, float* %5
%13 = load float, float* %4
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load float, float* %3
%17 = load float, float* %4
%18 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), float %16, float %17)
br label %20
19: ; preds = %11, %6
br label %20
20: ; preds = %19, %15
br label %21
21: ; preds = %20
%22 = load float, float* %5
%23 = load float, float* %3
%24 = fcmp olt float %22, %23
br i1 %24, label %25, label %29
25: ; preds = %21
%26 = load float, float* %5
%27 = load float, float* %4
%28 = fcmp ogt float %26, %27
br label %29
29: ; preds = %25, %21
%30 = phi i1 [ false, %21 ], [ %28, %25 ]
br i1 %30, label %6, label %31
31: ; preds = %29
%32 = load float, float* %5
ret float %32
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%f\00"
@.str.1 = [47 x i8] c"\0ABitte eine Zahl zwischen %f und %f eingeben!\0A\00"
define float @erfasse_gleitkomma_zahl(float %0, float %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
br label %5
5: ; preds = %14, %2
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %3)
%7 = load float, float* %3
%8 = fcmp olt float %7, %0
%9 = fcmp ogt float %7, %1
%10 = and i1 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %5
%12 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), float %0, float %1)
%13 = load float, float* %3
br label %14
14: ; preds = %11, %5
%15 = phi float [ %13, %11 ], [ %7, %5 ]
%16 = fcmp olt float %15, %0
%17 = fcmp ogt float %15, %1
%18 = and i1 %16, %17
br i1 %18, label %5, label %19
19: ; preds = %14
ret float %15
}