#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};
  float org[] = {1, 5, -10, 30, 20};
  float slope[] = {4, -15, 40, -10, 0};
  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 = org[i] + slope[i] * (t - min[i]) / (max[i] - min[i]);
  __VERIFIER_assert(z >= -10.f && z <= 30.f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xec3(%rip),%eax
mov    %eax,-0x40(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0x60(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x80(%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,-0x91(%rbp)
jb     11fd <main+0xcd>
movss  -0x10(%rbp),%xmm1
movss  -0x40(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
mov    %al,-0x91(%rbp)
mov    -0x91(%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    1252 <main+0x122>
movss  -0x10(%rbp),%xmm1
movslq -0x8(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm0
ucomiss %xmm1,%xmm0
jb     123f <main+0x10f>
jmp    1252 <main+0x122>
jmp    1244 <main+0x114>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1214 <main+0xe4>
movslq -0x8(%rbp),%rax
movss  -0x70(%rbp,%rax,4),%xmm0
movslq -0x8(%rbp),%rax
movss  -0x90(%rbp,%rax,4),%xmm1
ff ff
movss  -0x10(%rbp),%xmm2
movslq -0x8(%rbp),%rax
subss  -0x30(%rbp,%rax,4),%xmm2
mulss  %xmm2,%xmm1
movslq -0x8(%rbp),%rax
movss  -0x50(%rbp,%rax,4),%xmm2
movslq -0x8(%rbp),%rax
subss  -0x30(%rbp,%rax,4),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
xor    %eax,%eax
movss  0xd54(%rip),%xmm1
ucomiss %xmm1,%xmm0
mov    %al,-0x92(%rbp)
jb     12d0 <main+0x1a0>
movss  0xd41(%rip),%xmm0
ucomiss -0xc(%rbp),%xmm0
setae  %al
mov    %al,-0x92(%rbp)
mov    -0x92(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0xa0,%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    0xe93(%rip),%rax
lea    0xeac(%rip),%rcx
lea    0xe45(%rip),%rdx
movss  (%rdx,%rbx,4),%xmm0
subss  %xmm0,%xmm2
mulss  (%rcx,%rbx,4),%xmm2
lea    0xe50(%rip),%rcx
movss  (%rcx,%rbx,4),%xmm1
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
addss  (%rax,%rbx,4),%xmm2
ucomiss 0xe0f(%rip),%xmm2
setae  %al
movss  0xdfc(%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]
@__const.main.org = [5 x float] [float 1.000000e+00, float 5.000000e+00, float -1.000000e+01, float 3.000000e+01, float 2.000000e+01]
@__const.main.slope = [5 x float] [float 4.000000e+00, float -1.500000e+01, float 4.000000e+01, float -1.000000e+01, float 0.000000e+00]
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]
%7 = alloca [5 x float]
%8 = alloca [5 x float]
store i32 0, i32* %1
%9 = bitcast [5 x float]* %5 to i8*
%10 = bitcast [5 x float]* %6 to i8*
%11 = bitcast [5 x float]* %7 to i8*
%12 = bitcast [5 x float]* %8 to i8*
%13 = call float (...) @__VERIFIER_nondet_float()
store float %13, float* %4
%14 = load float, float* %4
%15 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 0
%16 = load float, float* %15
%17 = fcmp oge float %14, %16
br i1 %17, label %18, label %23
18: ; preds = %0
%19 = load float, float* %4
%20 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 4
%21 = load float, float* %20
%22 = fcmp ole float %19, %21
br label %23
23: ; preds = %18, %0
%24 = phi i1 [ false, %0 ], [ %22, %18 ]
%25 = zext i1 %24 to i32
%26 = call i32 @__VERIFIER_assume(i32 %25)
store i32 0, i32* %2
br label %27
27: ; preds = %40, %23
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = icmp ult i64 %29, 5
br i1 %30, label %31, label %43
31: ; preds = %27
%32 = load float, float* %4
%33 = load i32, i32* %2
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 %34
%36 = load float, float* %35
%37 = fcmp ole float %32, %36
br i1 %37, label %38, label %39
38: ; preds = %31
br label %43
39: ; preds = %31
br label %40
40: ; preds = %39
%41 = load i32, i32* %2
%42 = add nsw i32 %41, 1
store i32 %42, i32* %2
br label %27
43: ; preds = %38, %27
%44 = load i32, i32* %2
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [5 x float], [5 x float]* %7, i64 0, i64 %45
%47 = load float, float* %46
%48 = load i32, i32* %2
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 %49
%51 = load float, float* %50
%52 = load float, float* %4
%53 = load i32, i32* %2
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 %54
%56 = load float, float* %55
%57 = fsub float %52, %56
%58 = fmul float %51, %57
%59 = load i32, i32* %2
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [5 x float], [5 x float]* %6, i64 0, i64 %60
%62 = load float, float* %61
%63 = load i32, i32* %2
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [5 x float], [5 x float]* %5, i64 0, i64 %64
%66 = load float, float* %65
%67 = fsub float %62, %66
%68 = fdiv float %58, %67
%69 = fadd float %47, %68
store float %69, float* %3
%70 = load float, float* %3
%71 = fcmp oge float %70, -1.000000e+01
br i1 %71, label %72, label %75
72: ; preds = %43
%73 = load float, float* %3
%74 = fcmp ole float %73, 3.000000e+01
br label %75
75: ; preds = %72, %43
%76 = phi i1 [ false, %43 ], [ %74, %72 ]
%77 = zext i1 %76 to i32
%78 = call i32 @__VERIFIER_assert(i32 %77)
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]
@__const.main.org = [5 x float] [float 1.000000e+00, float 5.000000e+00, float -1.000000e+01, float 3.000000e+01, float 2.000000e+01]
@__const.main.slope = [5 x float] [float 4.000000e+00, float -1.500000e+01, float 4.000000e+01, float -1.000000e+01, float 0.000000e+00]
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.org, i64 0, i64 %18
%20 = load float, float* %19
%21 = getelementptr inbounds [5 x float], [5 x float]* @__const.main.slope, i64 0, i64 %18
%22 = load float, float* %21
%23 = getelementptr inbounds [5 x float], [5 x float]* @__const.main.min, i64 0, i64 %18
%24 = load float, float* %23
%25 = fsub float %1, %24
%26 = fmul float %22, %25
%27 = getelementptr inbounds [5 x float], [5 x float]* @__const.main.max, i64 0, i64 %18
%28 = load float, float* %27
%29 = fsub float %28, %24
%30 = fdiv float %26, %29
%31 = fadd float %20, %30
%32 = fcmp oge float %31, -1.000000e+01
%33 = fcmp ole float %31, 3.000000e+01
%34 = and i1 %32, %33
%35 = zext i1 %34 to i32
%36 = tail call i32 @__VERIFIER_assert(i32 %35)
ret i32 0
}