#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*/ __CPROVER_assert(int, char *);
int /*<<< orphan*/ __CPROVER_assume(int);
double cav10(double x) {
  __CPROVER_assume(0.0 < x && x < 10.0);
  double temp;
  if ((((x * x) - x) >= 0.0)) {
    temp = (x / 10.0);
  } else {
    temp = ((x * x) + 2.0);
  }
  __CPROVER_assert(0.0 <= temp && temp <= 3.0, "postcondition");
  return temp;
}


x86 assembly (clang, -O0):
<cav10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jbe    1157 <cav10+0x37>
movsd  0xeb4(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11ba <cav10+0x9a>
movsd  -0x8(%rbp),%xmm0
movsd  0xe54(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    11d9 <cav10+0xb9>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe38(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x12(%rbp)
jb     1203 <cav10+0xe3>
movsd  0xe18(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
lea    0xe06(%rip),%rsi
call   1040 <__CPROVER_assert@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cav10>:
push   %rax
movsd  %xmm0,(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
movsd  0xec7(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <__CPROVER_assume@plt>
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm1
ucomisd 0xeb1(%rip),%xmm1
jae    1177 <cav10+0x57>
addsd  0xe97(%rip),%xmm0
movapd %xmm0,%xmm2
jmp    117f <cav10+0x5f>
divsd  0xe81(%rip),%xmm2
movsd  %xmm2,(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
setae  %al
movsd  0xe79(%rip),%xmm0
ucomisd %xmm2,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
lea    0xe76(%rip),%rsi
call   1040 <__CPROVER_assert@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"postcondition\00"
define double @cav10(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp olt double 0.000000e+00, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp olt double %7, 1.000000e+01
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @__CPROVER_assume(i32 %11)
%13 = load double, double* %2
%14 = load double, double* %2
%15 = load double, double* %2
%16 = fneg double %15
%17 = call double @llvm.fmuladd.f64(double %13, double %14, double %16)
%18 = fcmp oge double %17, 0.000000e+00
br i1 %18, label %19, label %22
19: ; preds = %9
%20 = load double, double* %2
%21 = fdiv double %20, 1.000000e+01
store double %21, double* %3
br label %26
22: ; preds = %9
%23 = load double, double* %2
%24 = load double, double* %2
%25 = call double @llvm.fmuladd.f64(double %23, double %24, double 2.000000e+00)
store double %25, double* %3
br label %26
26: ; preds = %22, %19
%27 = load double, double* %3
%28 = fcmp ole double 0.000000e+00, %27
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load double, double* %3
%31 = fcmp ole double %30, 3.000000e+00
br label %32
32: ; preds = %29, %26
%33 = phi i1 [ false, %26 ], [ %31, %29 ]
%34 = zext i1 %33 to i32
%35 = call i32 @__CPROVER_assert(i32 %34, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%36 = load double, double* %3
ret double %36
}

LLVM IR (-O2):
@.str = [14 x i8] c"postcondition\00"
define double @cav10(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp olt double %0, 1.000000e+01
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @__CPROVER_assume(i32 %5)
%7 = fneg double %0
%8 = tail call double @llvm.fmuladd.f64(double %0, double %0, double %7)
%9 = fcmp ult double %8, 0.000000e+00
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = fdiv double %0, 1.000000e+01
br label %14
12: ; preds = %1
%13 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 2.000000e+00)
br label %14
14: ; preds = %12, %10
%15 = phi double [ %11, %10 ], [ %13, %12 ]
%16 = fcmp oge double %15, 0.000000e+00
%17 = fcmp ole double %15, 3.000000e+00
%18 = and i1 %16, %17
%19 = zext i1 %18 to i32
%20 = tail call i32 @__CPROVER_assert(i32 %19, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret double %15
}