#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 */
typedef int /*<<< orphan*/ min;
typedef int /*<<< orphan*/ max;

/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int /*<<< orphan*/ __VERIFIER_assume(int);
float __VERIFIER_nondet_float();
int main() {
  int i;
  float z, t;
  float min[] = {5, 10, 12, 30, 150};
  float max[] = {10, 12, 30, 150, 300};
  t = __VERIFIER_nondet_float();
  __VERIFIER_assume(t >= min[0] && t <= max[sizeof(max) / sizeof(max[0]) - 1]);
  for (i = 0; i < sizeof(min) / sizeof(min[0]); i++) {
    if (t <= max[i])
      break;
  }
  z = (t - min[i]) / (max[i] - min[i]);
  __VERIFIER_assert(z >= 0.f && z <= 1.f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xec6(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_float@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomiss -0x30(%rbp),%xmm0
mov    %al,-0x51(%rbp)
jb     11b0 <main+0x80>
movss  -0x10(%rbp),%xmm1
movss  -0x40(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assume@plt>
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x5,%rax
jae    1202 <main+0xd2>
movss  -0x10(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm0
ucomiss %xmm1,%xmm0
jb     11ef <main+0xbf>
jmp    1202 <main+0xd2>
jmp    11f4 <main+0xc4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11c4 <main+0x94>
movss  -0x10(%rbp),%xmm0
movslq -0x8(%rbp),%rax
subss  -0x30(%rbp,%rax,4),%xmm0
movslq -0x8(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm1
movslq -0x8(%rbp),%rax
subss  -0x30(%rbp,%rax,4),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x52(%rbp)
jb     1256 <main+0x126>
movss  0xdb4(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
setae  %al
mov    %al,-0x52(%rbp)
mov    -0x52(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_float@plt>
movss  %xmm0,0xc(%rsp)
ucomiss 0xeb5(%rip),%xmm0
setae  %al
movss  0xeae(%rip),%xmm1
ucomiss %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1040 <__VERIFIER_assume@plt>
movss  0xc(%rsp),%xmm2
movss  0xe94(%rip),%xmm0
ucomiss %xmm2,%xmm0
jae    11c6 <main+0x96>
movss  0xe83(%rip),%xmm1
mov    $0x1,%ebx
movss  0xe7e(%rip),%xmm0
ucomiss %xmm2,%xmm0
jae    11c6 <main+0x96>
mov    $0x2,%ebx
movss  0xe70(%rip),%xmm0
ucomiss %xmm2,%xmm0
jae    11c6 <main+0x96>
mov    $0x3,%ebx
movss  0xe62(%rip),%xmm0
ucomiss %xmm2,%xmm0
jae    11c6 <main+0x96>
mov    $0x4,%ebx
ucomiss %xmm2,%xmm1
jae    11c6 <main+0x96>
mov    $0x5,%ebx
lea    0xe53(%rip),%rax
movss  (%rax,%rbx,4),%xmm0
subss  %xmm0,%xmm2
lea    0xe63(%rip),%rax
movss  (%rax,%rbx,4),%xmm1
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
setae  %al
movss  0xe1d(%rip),%xmm0
ucomiss %xmm2,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.min = [5 x float] [float 5.000000e+00, float 1.000000e+01, float 1.200000e+01, float 3.000000e+01, float 1.500000e+02]
@__const.main.max = [5 x float] [float 1.000000e+01, float 1.200000e+01, float 3.000000e+01, float 1.500000e+02, float 3.000000e+02]
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca [5 x float]
%6 = alloca [5 x float]
store i32 0, i32* %1
%7 = bitcast [5 x float]* %5 to i8*
%8 = bitcast [5 x float]* %6 to i8*
%9 = call float (...) @__VERIFIER_nondet_float()
store float %9, float* %4
%10 = load float, float* %4
%11 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 0
%12 = load float, float* %11
%13 = fcmp oge float %10, %12
br i1 %13, label %14, label %19
14: ; preds = %0
%15 = load float, float* %4
%16 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 4
%17 = load float, float* %16
%18 = fcmp ole float %15, %17
br label %19
19: ; preds = %14, %0
%20 = phi i1 [ false, %0 ], [ %18, %14 ]
%21 = zext i1 %20 to i32
%22 = call i32 @__VERIFIER_assume(i32 %21)
store i32 0, i32* %2
br label %23
23: ; preds = %36, %19
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = icmp ult i64 %25, 5
br i1 %26, label %27, label %39
27: ; preds = %23
%28 = load float, float* %4
%29 = load i32, i32* %2
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 %30
%32 = load float, float* %31
%33 = fcmp ole float %28, %32
br i1 %33, label %34, label %35
34: ; preds = %27
br label %39
35: ; preds = %27
br label %36
36: ; preds = %35
%37 = load i32, i32* %2
%38 = add nsw i32 %37, 1
store i32 %38, i32* %2
br label %23
39: ; preds = %34, %23
%40 = load float, float* %4
%41 = load i32, i32* %2
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 %42
%44 = load float, float* %43
%45 = fsub float %40, %44
%46 = load i32, i32* %2
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 %47
%49 = load float, float* %48
%50 = load i32, i32* %2
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 %51
%53 = load float, float* %52
%54 = fsub float %49, %53
%55 = fdiv float %45, %54
store float %55, float* %3
%56 = load float, float* %3
%57 = fcmp oge float %56, 0.000000e+00
br i1 %57, label %58, label %61
58: ; preds = %39
%59 = load float, float* %3
%60 = fcmp ole float %59, 1.000000e+00
br label %61
61: ; preds = %58, %39
%62 = phi i1 [ false, %39 ], [ %60, %58 ]
%63 = zext i1 %62 to i32
%64 = call i32 @__VERIFIER_assert(i32 %63)
ret i32 0
}

LLVM IR (-O2):
@__const.main.min = [5 x float] [float 5.000000e+00, float 1.000000e+01, float 1.200000e+01, float 3.000000e+01, float 1.500000e+02]
@__const.main.max = [5 x float] [float 1.000000e+01, float 1.200000e+01, float 3.000000e+01, float 1.500000e+02, float 3.000000e+02]
define i32 @main() {
%1 = tail call float (...) @__VERIFIER_nondet_float()
%2 = fcmp oge float %1, 5.000000e+00
%3 = fcmp ole float %1, 3.000000e+02
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @__VERIFIER_assume(i32 %5)
%7 = fcmp ugt float %1, 1.000000e+01
br i1 %7, label %8, label %17
8: ; preds = %0
%9 = fcmp ugt float %1, 1.200000e+01
br i1 %9, label %10, label %17
10: ; preds = %8
%11 = fcmp ugt float %1, 3.000000e+01
br i1 %11, label %12, label %17
12: ; preds = %10
%13 = fcmp ugt float %1, 1.500000e+02
br i1 %13, label %14, label %17
14: ; preds = %12
%15 = fcmp ugt float %1, 3.000000e+02
br i1 %15, label %16, label %17
16: ; preds = %14
br label %17
17: ; preds = %16, %14, %12, %10, %8, %0
%18 = phi i64 [ 0, %0 ], [ 1, %8 ], [ 2, %10 ], [ 3, %12 ], [ 4, %14 ], [ 5, %16 ]
%19 = getelementptr inbounds [5 x float], [5 x float]* @__const.main.min, i64 0, i64 %18
%20 = load float, float* %19
%21 = fsub float %1, %20
%22 = getelementptr inbounds [5 x float], [5 x float]* @__const.main.max, i64 0, i64 %18
%23 = load float, float* %22
%24 = fsub float %23, %20
%25 = fdiv float %21, %24
%26 = fcmp oge float %25, 0.000000e+00
%27 = fcmp ole float %25, 1.000000e+00
%28 = and i1 %26, %27
%29 = zext i1 %28 to i32
%30 = tail call i32 @__VERIFIER_assert(i32 %29)
ret i32 0
}