#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 sqrt(double);
double triangle1(double a, double c, double b) {
  __CPROVER_assume(1.0 <= a && a <= 9.0);
  __CPROVER_assume(1.0 <= b && b <= 9.0);
  __CPROVER_assume(1.0 <= c && c <= 9.0);
  __CPROVER_assume(a + b > c + 0.1);
  __CPROVER_assume(a + c > b + 0.1);
  __CPROVER_assume(b + c > a + 0.1);
  double s = (((a + b) + c) / 2.0);
  double res = sqrt((((s * (s - a)) * (s - b)) * (s - c)));
  __CPROVER_assert(0.29 <= res && res <= 35.1, "postcondition");
  return res;
}


x86 assembly (clang, -O0):
<triangle1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x29(%rbp)
jb     1176 <triangle1+0x46>
movsd  0xe9d(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe6e(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x2a(%rbp)
jb     11b2 <triangle1+0x82>
movsd  0xe61(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0x2a(%rbp)
mov    -0x2a(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe32(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x2b(%rbp)
jb     11ee <triangle1+0xbe>
movsd  0xe25(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x2b(%rbp)
mov    -0x2b(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xe13(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xdeb(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xdc3(%rip),%xmm1
addsd  -0x8(%rbp),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CPROVER_assume@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xd8e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd35(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x2c(%rbp)
jb     12fb <triangle1+0x1cb>
movsd  0xd38(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x2c(%rbp)
mov    -0x2c(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
lea    0xd26(%rip),%rsi
call   1050 <__CPROVER_assert@plt>
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triangle1>:
sub    $0x28,%rsp
movsd  %xmm0,0x18(%rsp)
ucomisd 0xebe(%rip),%xmm0
setae  %al
movsd  0xebb(%rip),%xmm3
ucomisd %xmm0,%xmm3
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <__CPROVER_assume@plt>
movsd  0x8(%rsp),%xmm0
ucomisd 0xe88(%rip),%xmm0
setae  %al
movsd  0xe85(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <__CPROVER_assume@plt>
movsd  0x10(%rsp),%xmm0
ucomisd 0xe5e(%rip),%xmm0
setae  %al
movsd  0xe5b(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <__CPROVER_assume@plt>
movsd  0x18(%rsp),%xmm1
addsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0xe32(%rip),%xmm0
xor    %edi,%edi
ucomisd %xmm0,%xmm1
seta   %dil
call   1030 <__CPROVER_assume@plt>
movsd  0x18(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  0xe09(%rip),%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
seta   %dil
call   1030 <__CPROVER_assume@plt>
movsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0xde6(%rip),%xmm1
addsd  0x18(%rsp),%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
seta   %dil
call   1030 <__CPROVER_assume@plt>
movsd  0x10(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
addsd  %xmm2,%xmm3
mulsd  0xdc1(%rip),%xmm3
movapd %xmm3,%xmm0
subsd  0x18(%rsp),%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm3,%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
movapd %xmm3,%xmm0
jb     128f <triangle1+0x15f>
sqrtsd %xmm0,%xmm0
jmp    1294 <triangle1+0x164>
call   1040 <sqrt@plt>
ucomisd 0xd84(%rip),%xmm0
setae  %al
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0xd77(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
lea    0xd6c(%rip),%rsi
call   1050 <__CPROVER_assert@plt>
movsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"postcondition\00"
define double @triangle1(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = fcmp ole double 1.000000e+00, %9
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load double, double* %4
%13 = fcmp ole double %12, 9.000000e+00
br label %14
14: ; preds = %11, %3
%15 = phi i1 [ false, %3 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
%17 = call i32 @__CPROVER_assume(i32 %16)
%18 = load double, double* %6
%19 = fcmp ole double 1.000000e+00, %18
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = load double, double* %6
%22 = fcmp ole double %21, 9.000000e+00
br label %23
23: ; preds = %20, %14
%24 = phi i1 [ false, %14 ], [ %22, %20 ]
%25 = zext i1 %24 to i32
%26 = call i32 @__CPROVER_assume(i32 %25)
%27 = load double, double* %5
%28 = fcmp ole double 1.000000e+00, %27
br i1 %28, label %29, label %32
29: ; preds = %23
%30 = load double, double* %5
%31 = fcmp ole double %30, 9.000000e+00
br label %32
32: ; preds = %29, %23
%33 = phi i1 [ false, %23 ], [ %31, %29 ]
%34 = zext i1 %33 to i32
%35 = call i32 @__CPROVER_assume(i32 %34)
%36 = load double, double* %4
%37 = load double, double* %6
%38 = fadd double %36, %37
%39 = load double, double* %5
%40 = fadd double %39, 1.000000e-01
%41 = fcmp ogt double %38, %40
%42 = zext i1 %41 to i32
%43 = call i32 @__CPROVER_assume(i32 %42)
%44 = load double, double* %4
%45 = load double, double* %5
%46 = fadd double %44, %45
%47 = load double, double* %6
%48 = fadd double %47, 1.000000e-01
%49 = fcmp ogt double %46, %48
%50 = zext i1 %49 to i32
%51 = call i32 @__CPROVER_assume(i32 %50)
%52 = load double, double* %6
%53 = load double, double* %5
%54 = fadd double %52, %53
%55 = load double, double* %4
%56 = fadd double %55, 1.000000e-01
%57 = fcmp ogt double %54, %56
%58 = zext i1 %57 to i32
%59 = call i32 @__CPROVER_assume(i32 %58)
%60 = load double, double* %4
%61 = load double, double* %6
%62 = fadd double %60, %61
%63 = load double, double* %5
%64 = fadd double %62, %63
%65 = fdiv double %64, 2.000000e+00
store double %65, double* %7
%66 = load double, double* %7
%67 = load double, double* %7
%68 = load double, double* %4
%69 = fsub double %67, %68
%70 = fmul double %66, %69
%71 = load double, double* %7
%72 = load double, double* %6
%73 = fsub double %71, %72
%74 = fmul double %70, %73
%75 = load double, double* %7
%76 = load double, double* %5
%77 = fsub double %75, %76
%78 = fmul double %74, %77
%79 = call double @sqrt(double %78)
store double %79, double* %8
%80 = load double, double* %8
%81 = fcmp ole double 2.900000e-01, %80
br i1 %81, label %82, label %85
82: ; preds = %32
%83 = load double, double* %8
%84 = fcmp ole double %83, 3.510000e+01
br label %85
85: ; preds = %82, %32
%86 = phi i1 [ false, %32 ], [ %84, %82 ]
%87 = zext i1 %86 to i32
%88 = call i32 @__CPROVER_assert(i32 %87, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%89 = load double, double* %8
ret double %89
}

LLVM IR (-O2):
@.str = [14 x i8] c"postcondition\00"
define double @triangle1(double %0, double %1, double %2) {
%4 = fcmp oge double %0, 1.000000e+00
%5 = fcmp ole double %0, 9.000000e+00
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @__CPROVER_assume(i32 %7)
%9 = fcmp oge double %2, 1.000000e+00
%10 = fcmp ole double %2, 9.000000e+00
%11 = and i1 %9, %10
%12 = zext i1 %11 to i32
%13 = tail call i32 @__CPROVER_assume(i32 %12)
%14 = fcmp oge double %1, 1.000000e+00
%15 = fcmp ole double %1, 9.000000e+00
%16 = and i1 %14, %15
%17 = zext i1 %16 to i32
%18 = tail call i32 @__CPROVER_assume(i32 %17)
%19 = fadd double %0, %2
%20 = fadd double %1, 1.000000e-01
%21 = fcmp ogt double %19, %20
%22 = zext i1 %21 to i32
%23 = tail call i32 @__CPROVER_assume(i32 %22)
%24 = fadd double %0, %1
%25 = fadd double %2, 1.000000e-01
%26 = fcmp ogt double %24, %25
%27 = zext i1 %26 to i32
%28 = tail call i32 @__CPROVER_assume(i32 %27)
%29 = fadd double %1, %2
%30 = fadd double %0, 1.000000e-01
%31 = fcmp ogt double %29, %30
%32 = zext i1 %31 to i32
%33 = tail call i32 @__CPROVER_assume(i32 %32)
%34 = fadd double %19, %1
%35 = fmul double %34, 5.000000e-01
%36 = fsub double %35, %0
%37 = fmul double %35, %36
%38 = fsub double %35, %2
%39 = fmul double %38, %37
%40 = fsub double %35, %1
%41 = fmul double %40, %39
%42 = tail call double @sqrt(double %41)
%43 = fcmp oge double %42, 2.900000e-01
%44 = fcmp ole double %42, 3.510000e+01
%45 = and i1 %43, %44
%46 = zext i1 %45 to i32
%47 = tail call i32 @__CPROVER_assert(i32 %46, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret double %42
}