#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 *, ...);
int /*<<< orphan*/ scanf(char *, float *);
void biasDef(float *bias, int min, int max) {
  printf("Podaj wartosc bias:\n");
  printf("Wartosc bias powinna byc z przedzialu %d - %d\n", min, max);
  do {
    scanf("%f", &*bias);
    if (*bias > (float)max || *bias < (float)min) {
      printf("\nPodales liczbe spoza zakresu\n");
    }
  } while (*bias > (float)max || *bias < (float)min);
}


x86 assembly (clang, -O0):
<biasDef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xee5(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
ucomiss %xmm1,%xmm0
ja     1190 <biasDef+0x70>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    119e <biasDef+0x7e>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a3 <biasDef+0x83>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtsi2ssl -0x10(%rbp),%xmm1
mov    $0x1,%al
ucomiss %xmm1,%xmm0
mov    %al,-0x11(%rbp)
ja     11d4 <biasDef+0xb4>
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1154 <biasDef+0x34>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<biasDef>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
lea    0xeae(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cvtsi2ss %ebp,%xmm0
movss  %xmm0,0x4(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
movss  %xmm0,(%rsp)
lea    0xeb3(%rip),%r14
lea    0xec3(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movss  (%rbx),%xmm0
ucomiss 0x4(%rsp),%xmm0
ja     11b0 <biasDef+0x80>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    11bc <biasDef+0x8c>
mov    %r15,%rdi
call   1030 <puts@plt>
movss  (%rbx),%xmm0
ucomiss 0x4(%rsp),%xmm0
ja     1190 <biasDef+0x60>
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
ja     1190 <biasDef+0x60>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Podaj wartosc bias:\0A\00"
@.str.1 = [47 x i8] c"Wartosc bias powinna byc z przedzialu %d - %d\0A\00"
@.str.2 = [3 x i8] c"%f\00"
@.str.3 = [31 x i8] c"\0APodales liczbe spoza zakresu\0A\00"
define void @biasDef(float* %0, i32 %1, i32 %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
store float* %0, float** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %40, %3
%12 = load float*, float** %4
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %12)
%14 = load float*, float** %4
%15 = load float, float* %14
%16 = load i32, i32* %6
%17 = sitofp i32 %16 to float
%18 = fcmp ogt float %15, %17
br i1 %18, label %25, label %19
19: ; preds = %11
%20 = load float*, float** %4
%21 = load float, float* %20
%22 = load i32, i32* %5
%23 = sitofp i32 %22 to float
%24 = fcmp olt float %21, %23
br i1 %24, label %25, label %27
25: ; preds = %19, %11
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %27
27: ; preds = %25, %19
br label %28
28: ; preds = %27
%29 = load float*, float** %4
%30 = load float, float* %29
%31 = load i32, i32* %6
%32 = sitofp i32 %31 to float
%33 = fcmp ogt float %30, %32
br i1 %33, label %40, label %34
34: ; preds = %28
%35 = load float*, float** %4
%36 = load float, float* %35
%37 = load i32, i32* %5
%38 = sitofp i32 %37 to float
%39 = fcmp olt float %36, %38
br label %40
40: ; preds = %34, %28
%41 = phi i1 [ true, %28 ], [ %39, %34 ]
br i1 %41, label %11, label %42
42: ; preds = %40
ret void
}

LLVM IR (-O2):
@.str.1 = [47 x i8] c"Wartosc bias powinna byc z przedzialu %d - %d\0A\00"
@.str.2 = [3 x i8] c"%f\00"
@str = [20 x i8] c"Podaj wartosc bias:\00"
@str.4 = [30 x i8] c"\0APodales liczbe spoza zakresu\00"
define void @biasDef(float* %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i32 %1, i32 %2)
%6 = sitofp i32 %2 to float
%7 = sitofp i32 %1 to float
br label %8
8: ; preds = %17, %3
%9 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), float* %0)
%10 = load float, float* %0
%11 = fcmp ogt float %10, %6
%12 = fcmp olt float %10, %7
%13 = or i1 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %8
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.4, i64 0, i64 0))
%16 = load float, float* %0
br label %17
17: ; preds = %8, %14
%18 = phi float [ %10, %8 ], [ %16, %14 ]
%19 = fcmp ogt float %18, %6
%20 = fcmp olt float %18, %7
%21 = or i1 %19, %20
br i1 %21, label %8, label %22
22: ; preds = %17
ret void
}