#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 sine(double x) {
  __CPROVER_assume(-1.57079632679 < x);
  __CPROVER_assume(x < 1.57079632679);
  double res =
      (((x - (((x * x) * x) / 6.0)) + (((((x * x) * x) * x) * x) / 120.0)) -
       (((((((x * x) * x) * x) * x) * x) * x) / 5040.0));
  __CPROVER_assert(-1.0 < res && res < 1.0, "postcondition");
  return res;
}


x86 assembly (clang, -O0):
<sine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  0xecd(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe97(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe66(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xe2b(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe07(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jbe    1219 <sine+0xf9>
movsd  0xe22(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
lea    0xe10(%rip),%rsi
call   1040 <__CPROVER_assert@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sine>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %edi,%edi
ucomisd 0xed0(%rip),%xmm0
seta   %dil
call   1030 <__CPROVER_assume@plt>
movsd  0xec7(%rip),%xmm0
xor    %edi,%edi
ucomisd (%rsp),%xmm0
seta   %dil
call   1030 <__CPROVER_assume@plt>
movsd  (%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm0,%xmm2
divsd  0xea2(%rip),%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
unpcklpd %xmm1,%xmm0
divpd  0xe9e(%rip),%xmm0
addsd  %xmm0,%xmm2
unpckhpd %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rsp)
ucomisd 0xe6d(%rip),%xmm2
seta   %al
movsd  0xe6a(%rip),%xmm0
ucomisd %xmm2,%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%edi
lea    0xe77(%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 @sine(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp olt double 0xBFF921FB5443D6F4, %4
%6 = zext i1 %5 to i32
%7 = call i32 @__CPROVER_assume(i32 %6)
%8 = load double, double* %2
%9 = fcmp olt double %8, 0x3FF921FB5443D6F4
%10 = zext i1 %9 to i32
%11 = call i32 @__CPROVER_assume(i32 %10)
%12 = load double, double* %2
%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 = fdiv double %17, 6.000000e+00
%19 = fsub double %12, %18
%20 = load double, double* %2
%21 = load double, double* %2
%22 = fmul double %20, %21
%23 = load double, double* %2
%24 = fmul double %22, %23
%25 = load double, double* %2
%26 = fmul double %24, %25
%27 = load double, double* %2
%28 = fmul double %26, %27
%29 = fdiv double %28, 1.200000e+02
%30 = fadd double %19, %29
%31 = load double, double* %2
%32 = load double, double* %2
%33 = fmul double %31, %32
%34 = load double, double* %2
%35 = fmul double %33, %34
%36 = load double, double* %2
%37 = fmul double %35, %36
%38 = load double, double* %2
%39 = fmul double %37, %38
%40 = load double, double* %2
%41 = fmul double %39, %40
%42 = load double, double* %2
%43 = fmul double %41, %42
%44 = fdiv double %43, 5.040000e+03
%45 = fsub double %30, %44
store double %45, double* %3
%46 = load double, double* %3
%47 = fcmp olt double -1.000000e+00, %46
br i1 %47, label %48, label %51
48: ; preds = %1
%49 = load double, double* %3
%50 = fcmp olt double %49, 1.000000e+00
br label %51
51: ; preds = %48, %1
%52 = phi i1 [ false, %1 ], [ %50, %48 ]
%53 = zext i1 %52 to i32
%54 = call i32 @__CPROVER_assert(i32 %53, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%55 = load double, double* %3
ret double %55
}

LLVM IR (-O2):
@.str = [14 x i8] c"postcondition\00"
define double @sine(double %0) {
%2 = fcmp ogt double %0, 0xBFF921FB5443D6F4
%3 = zext i1 %2 to i32
%4 = tail call i32 @__CPROVER_assume(i32 %3)
%5 = fcmp olt double %0, 0x3FF921FB5443D6F4
%6 = zext i1 %5 to i32
%7 = tail call i32 @__CPROVER_assume(i32 %6)
%8 = fmul double %0, %0
%9 = fmul double %8, %0
%10 = fdiv double %9, 6.000000e+00
%11 = fsub double %0, %10
%12 = fmul double %9, %0
%13 = fmul double %12, %0
%14 = fmul double %13, %0
%15 = fmul double %14, %0
%16 = insertelement <2 x double> poison, double %13, i64 0
%17 = insertelement <2 x double> %16, double %15, i64 1
%18 = fdiv <2 x double> %17, <double 1.200000e+02, double 5.040000e+03>
%19 = extractelement <2 x double> %18, i64 0
%20 = fadd double %11, %19
%21 = extractelement <2 x double> %18, i64 1
%22 = fsub double %20, %21
%23 = fcmp ogt double %22, -1.000000e+00
%24 = fcmp olt double %22, 1.000000e+00
%25 = and i1 %23, %24
%26 = zext i1 %25 to i32
%27 = tail call i32 @__CPROVER_assert(i32 %26, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret double %22
}