int checkfix(double Cf[4], double n) {
  double A, B, uthr, lthr, fixed = 0;
  uthr = 0.95;
  lthr = 0.05;
  A = Cf[0] + Cf[1];
  B = Cf[0] + Cf[2];
  if (A > uthr || A < lthr)
    fixed = 1;
  if (B > uthr || B < lthr)
    fixed = 1;
  return fixed;
}


x86 assembly (clang, -O0):
<checkfix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeeb(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xed6(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
ja     117f <checkfix+0x7f>
movsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    118c <checkfix+0x8c>
movsd  0xe89(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
ja     11b0 <checkfix+0xb0>
movsd  -0x20(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    11bd <checkfix+0xbd>
movsd  0xe58(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
cvttsd2si -0x38(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkfix>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
addsd  %xmm0,%xmm1
addsd  0x10(%rdi),%xmm0
movsd  0xee6(%rip),%xmm2
ucomisd %xmm2,%xmm1
seta   %al
movsd  0xedf(%rip),%xmm3
ucomisd %xmm1,%xmm3
seta   %cl
or     %al,%cl
ucomisd %xmm2,%xmm0
seta   %al
ucomisd %xmm0,%xmm3
seta   %dl
or     %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @checkfix(double* %0, double %1) {
%3 = alloca double*
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double* %0, double** %3
store double %1, double* %4
store double 0.000000e+00, double* %9
store double 0x3FEE666666666666, double* %7
store double 5.000000e-02, double* %8
%10 = load double*, double** %3
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = load double*, double** %3
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = fadd double %12, %15
store double %16, double* %5
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 0
%19 = load double, double* %18
%20 = load double*, double** %3
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = fadd double %19, %22
store double %23, double* %6
%24 = load double, double* %5
%25 = load double, double* %7
%26 = fcmp ogt double %24, %25
br i1 %26, label %31, label %27
27: ; preds = %2
%28 = load double, double* %5
%29 = load double, double* %8
%30 = fcmp olt double %28, %29
br i1 %30, label %31, label %32
31: ; preds = %27, %2
store double 1.000000e+00, double* %9
br label %32
32: ; preds = %31, %27
%33 = load double, double* %6
%34 = load double, double* %7
%35 = fcmp ogt double %33, %34
br i1 %35, label %40, label %36
36: ; preds = %32
%37 = load double, double* %6
%38 = load double, double* %8
%39 = fcmp olt double %37, %38
br i1 %39, label %40, label %41
40: ; preds = %36, %32
store double 1.000000e+00, double* %9
br label %41
41: ; preds = %40, %36
%42 = load double, double* %9
%43 = fptosi double %42 to i32
ret i32 %43
}

LLVM IR (-O2):
define i32 @checkfix(double* nocapture %0, double %1) {
%3 = load double, double* %0
%4 = getelementptr inbounds double, double* %0, i64 1
%5 = load double, double* %4
%6 = fadd double %3, %5
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = fadd double %3, %8
%10 = fcmp ogt double %6, 0x3FEE666666666666
%11 = fcmp olt double %6, 5.000000e-02
%12 = or i1 %10, %11
%13 = fcmp ogt double %9, 0x3FEE666666666666
%14 = fcmp olt double %9, 5.000000e-02
%15 = or i1 %13, %14
%16 = select i1 %15, i1 true, i1 %12
%17 = zext i1 %16 to i32
ret i32 %17
}