#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 bspline3(double u) {
  __CPROVER_assume(0.0 <= u && u <= 1.0);
  double res = (-((u * u) * u) / 6.0);
  __CPROVER_assert(-0.17 <= res && res <= 0.05, "postcondition");
  return res;
}


x86 assembly (clang, -O0):
<bspline3>:
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)
jb     1157 <bspline3+0x37>
movsd  0xeb4(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe7e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe5e(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x12(%rbp)
jb     11ca <bspline3+0xaa>
movsd  0xe59(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
lea    0xe47(%rip),%rsi
call   1040 <__CPROVER_assert@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bspline3>:
push   %rax
movsd  %xmm0,(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
movsd  0xec7(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <__CPROVER_assume@plt>
movsd  (%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
divsd  0xea5(%rip),%xmm1
movsd  %xmm1,(%rsp)
ucomisd 0xea0(%rip),%xmm1
setae  %al
movsd  0xe9d(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
lea    0xe92(%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 @bspline3(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp ole double 0.000000e+00, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ole double %7, 1.000000e+00
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 = fmul double %13, %14
%16 = load double, double* %2
%17 = fmul double %15, %16
%18 = fneg double %17
%19 = fdiv double %18, 6.000000e+00
store double %19, double* %3
%20 = load double, double* %3
%21 = fcmp ole double -1.700000e-01, %20
br i1 %21, label %22, label %25
22: ; preds = %9
%23 = load double, double* %3
%24 = fcmp ole double %23, 5.000000e-02
br label %25
25: ; preds = %22, %9
%26 = phi i1 [ false, %9 ], [ %24, %22 ]
%27 = zext i1 %26 to i32
%28 = call i32 @__CPROVER_assert(i32 %27, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%29 = load double, double* %3
ret double %29
}

LLVM IR (-O2):
@.str = [14 x i8] c"postcondition\00"
define double @bspline3(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fcmp ole double %0, 1.000000e+00
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
%6 = tail call i32 @__CPROVER_assume(i32 %5)
%7 = fneg double %0
%8 = fmul double %7, %0
%9 = fmul double %8, %0
%10 = fdiv double %9, 6.000000e+00
%11 = fcmp oge double %10, -1.700000e-01
%12 = fcmp ole double %10, 5.000000e-02
%13 = and i1 %11, %12
%14 = zext i1 %13 to i32
%15 = tail call i32 @__CPROVER_assert(i32 %14, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret double %10
}