int G_intersect_line_segments(double ax1, double ay1, double ax2, double ay2,
                              double bx1, double by1, double bx2, double by2,
                              double *ra, double *rb, double *x, double *y) {
  double d;
  d = ((ax2 - ax1) * (by1 - by2) - (ay2 - ay1) * (bx1 - bx2));
  if (d) {
    *ra = ((bx1 - ax1) * (by1 - by2) - (by1 - ay1) * (bx1 - bx2)) / d;
    *rb = ((ax2 - ax1) * (by1 - ay1) - (ay2 - ay1) * (bx1 - ax1)) / d;
    *x = ax1 + (*ra) * (ax2 - ax1);
    *y = ay1 + (*ra) * (ay2 - ay1);
    return (*ra >= 0.0 && *ra <= 1.0 && *rb >= 0.0 && *rb <= 1.0);
  }
  if (((bx1 - ax1) * (by1 - by2) - (by1 - ay1) * (bx1 - bx2)) ||
      ((ax2 - ax1) * (by1 - ay1) - (ay2 - ay1) * (bx1 - ax1)))
    return -1;
  if (ax1 > ax2) {
    {
      int t;
      t = ax1;
      ax1 = ax2;
      ax2 = t;
    }
  }
  if (bx1 > bx2) {
    {
      int t;
      t = bx1;
      bx1 = bx2;
      bx2 = t;
    }
  }
  if (ax1 > bx2)
    return -1;
  if (ax2 < bx1)
    return -1;
  if (ax1 == bx2) {
    *x = ax1;
    *y = ay1;
    return 1;
  }
  if (ax2 == bx1) {
    *x = ax2;
    *y = ay2;
    return 1;
  }
  return 2;
}


x86 assembly (clang, -O0):
<G_intersect_line_segments>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
movsd  %xmm7,-0x48(%rbp)
mov    %rdi,-0x50(%rbp)
mov    %rsi,-0x58(%rbp)
mov    %rdx,-0x60(%rbp)
mov    %rcx,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
subsd  -0x48(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
subsd  -0x40(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11a9 <G_intersect_line_segments+0xa9>
jp     11a9 <G_intersect_line_segments+0xa9>
jmp    131c <G_intersect_line_segments+0x21c>
movsd  -0x30(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
subsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
subsd  -0x40(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x70(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x70(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm1
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x20(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm1
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x28(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x68(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x79(%rbp)
jb     130c <G_intersect_line_segments+0x20c>
mov    -0x50(%rbp),%rcx
xor    %eax,%eax
movsd  0xd31(%rip),%xmm0
ucomisd (%rcx),%xmm0
mov    %al,-0x79(%rbp)
jb     130c <G_intersect_line_segments+0x20c>
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x79(%rbp)
jb     130c <G_intersect_line_segments+0x20c>
mov    -0x58(%rbp),%rax
movsd  0xcfe(%rip),%xmm0
ucomisd (%rax),%xmm0
setae  %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    14fc <G_intersect_line_segments+0x3fc>
movsd  -0x30(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
subsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
subsd  -0x40(%rbp),%xmm3
mulsd  %xmm3,%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
jne    13dd <G_intersect_line_segments+0x2dd>
jp     13dd <G_intersect_line_segments+0x2dd>
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
subsd  -0x18(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm3
subsd  -0x10(%rbp),%xmm3
mulsd  %xmm3,%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
jne    13dd <G_intersect_line_segments+0x2dd>
jp     13dd <G_intersect_line_segments+0x2dd>
jmp    13e9 <G_intersect_line_segments+0x2e9>
movl   $0xffffffff,-0x4(%rbp)
jmp    14fc <G_intersect_line_segments+0x3fc>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1415 <G_intersect_line_segments+0x315>
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x74(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdl -0x74(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x30(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1441 <G_intersect_line_segments+0x341>
cvttsd2si -0x30(%rbp),%eax
mov    %eax,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x78(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    145d <G_intersect_line_segments+0x35d>
movl   $0xffffffff,-0x4(%rbp)
jmp    14fc <G_intersect_line_segments+0x3fc>
movsd  -0x20(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    147d <G_intersect_line_segments+0x37d>
movl   $0xffffffff,-0x4(%rbp)
jmp    14fc <G_intersect_line_segments+0x3fc>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x40(%rbp),%xmm0
jne    14b9 <G_intersect_line_segments+0x3b9>
jp     14b9 <G_intersect_line_segments+0x3b9>
movsd  -0x10(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x68(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    14fc <G_intersect_line_segments+0x3fc>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jne    14f5 <G_intersect_line_segments+0x3f5>
jp     14f5 <G_intersect_line_segments+0x3f5>
movsd  -0x20(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x68(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    14fc <G_intersect_line_segments+0x3fc>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<G_intersect_line_segments>:
movapd %xmm2,%xmm8
subsd  %xmm0,%xmm8
movapd %xmm5,%xmm11
subsd  %xmm7,%xmm11
movapd %xmm3,%xmm12
subsd  %xmm1,%xmm12
movapd %xmm4,%xmm7
subsd  %xmm6,%xmm7
movapd 0xed1(%rip),%xmm10
xorpd  %xmm12,%xmm10
movapd %xmm7,%xmm9
mulsd  %xmm12,%xmm9
movapd %xmm8,%xmm14
mulsd  %xmm11,%xmm14
subsd  %xmm9,%xmm14
xorpd  %xmm9,%xmm9
ucomisd %xmm9,%xmm14
movapd %xmm4,%xmm13
subsd  %xmm0,%xmm13
subsd  %xmm1,%xmm5
mulsd  %xmm5,%xmm7
mulsd  %xmm13,%xmm11
subsd  %xmm7,%xmm11
jne    1177 <G_intersect_line_segments+0x77>
jnp    11ea <G_intersect_line_segments+0xea>
divsd  %xmm14,%xmm11
movsd  %xmm11,(%rdi)
mulsd  %xmm10,%xmm13
mulsd  %xmm8,%xmm5
addsd  %xmm13,%xmm5
divsd  %xmm14,%xmm5
movsd  %xmm5,(%rsi)
mulsd  (%rdi),%xmm8
addsd  %xmm0,%xmm8
movsd  %xmm8,(%rdx)
mulsd  (%rdi),%xmm12
addsd  %xmm1,%xmm12
movsd  %xmm12,(%rcx)
movsd  (%rdi),%xmm1
xor    %eax,%eax
ucomisd %xmm9,%xmm1
jb     11f8 <G_intersect_line_segments+0xf8>
movsd  0xe44(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     11f8 <G_intersect_line_segments+0xf8>
movsd  (%rsi),%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jb     11f8 <G_intersect_line_segments+0xf8>
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
ret
mov    $0xffffffff,%eax
ucomisd %xmm9,%xmm11
jne    11f8 <G_intersect_line_segments+0xf8>
jnp    11f9 <G_intersect_line_segments+0xf9>
ret
mulsd  %xmm10,%xmm13
mulsd  %xmm5,%xmm8
addsd  %xmm13,%xmm8
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm8
jne    11f8 <G_intersect_line_segments+0xf8>
jp     11f8 <G_intersect_line_segments+0xf8>
movapd %xmm2,%xmm8
minsd  %xmm0,%xmm8
cvttpd2dq %xmm4,%xmm5
cvtdq2pd %xmm5,%xmm9
movapd %xmm6,%xmm7
cmpltsd %xmm4,%xmm7
movapd %xmm7,%xmm5
andnpd %xmm6,%xmm5
andpd  %xmm9,%xmm7
orpd   %xmm5,%xmm7
ucomisd %xmm7,%xmm8
ja     11f8 <G_intersect_line_segments+0xf8>
cvttpd2dq %xmm0,%xmm5
cvtdq2pd %xmm5,%xmm9
movapd %xmm2,%xmm5
cmpltsd %xmm0,%xmm5
movapd %xmm5,%xmm0
andnpd %xmm2,%xmm0
andpd  %xmm9,%xmm5
orpd   %xmm0,%xmm5
minsd  %xmm4,%xmm6
ucomisd %xmm5,%xmm6
ja     11f8 <G_intersect_line_segments+0xf8>
ucomisd %xmm7,%xmm8
jne    128a <G_intersect_line_segments+0x18a>
jp     128a <G_intersect_line_segments+0x18a>
movsd  %xmm8,(%rdx)
movsd  %xmm1,(%rcx)
jmp    129a <G_intersect_line_segments+0x19a>
ucomisd %xmm6,%xmm5
jne    12a0 <G_intersect_line_segments+0x1a0>
jp     12a0 <G_intersect_line_segments+0x1a0>
movsd  %xmm5,(%rdx)
movsd  %xmm3,(%rcx)
mov    $0x1,%eax
ret
mov    $0x2,%eax
ret

LLVM IR (-O0):
define i32 @G_intersect_line_segments(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double* %8, double* %9, double* %10, double* %11) {
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double
%27 = alloca i32
%28 = alloca i32
store double %0, double* %14
store double %1, double* %15
store double %2, double* %16
store double %3, double* %17
store double %4, double* %18
store double %5, double* %19
store double %6, double* %20
store double %7, double* %21
store double* %8, double** %22
store double* %9, double** %23
store double* %10, double** %24
store double* %11, double** %25
%29 = load double, double* %16
%30 = load double, double* %14
%31 = fsub double %29, %30
%32 = load double, double* %19
%33 = load double, double* %21
%34 = fsub double %32, %33
%35 = load double, double* %17
%36 = load double, double* %15
%37 = fsub double %35, %36
%38 = load double, double* %18
%39 = load double, double* %20
%40 = fsub double %38, %39
%41 = fmul double %37, %40
%42 = fneg double %41
%43 = call double @llvm.fmuladd.f64(double %31, double %34, double %42)
store double %43, double* %26
%44 = load double, double* %26
%45 = fcmp une double %44, 0.000000e+00
br i1 %45, label %46, label %117
46: ; preds = %12
%47 = load double, double* %18
%48 = load double, double* %14
%49 = fsub double %47, %48
%50 = load double, double* %19
%51 = load double, double* %21
%52 = fsub double %50, %51
%53 = load double, double* %19
%54 = load double, double* %15
%55 = fsub double %53, %54
%56 = load double, double* %18
%57 = load double, double* %20
%58 = fsub double %56, %57
%59 = fmul double %55, %58
%60 = fneg double %59
%61 = call double @llvm.fmuladd.f64(double %49, double %52, double %60)
%62 = load double, double* %26
%63 = fdiv double %61, %62
%64 = load double*, double** %22
store double %63, double* %64
%65 = load double, double* %16
%66 = load double, double* %14
%67 = fsub double %65, %66
%68 = load double, double* %19
%69 = load double, double* %15
%70 = fsub double %68, %69
%71 = load double, double* %17
%72 = load double, double* %15
%73 = fsub double %71, %72
%74 = load double, double* %18
%75 = load double, double* %14
%76 = fsub double %74, %75
%77 = fmul double %73, %76
%78 = fneg double %77
%79 = call double @llvm.fmuladd.f64(double %67, double %70, double %78)
%80 = load double, double* %26
%81 = fdiv double %79, %80
%82 = load double*, double** %23
store double %81, double* %82
%83 = load double, double* %14
%84 = load double*, double** %22
%85 = load double, double* %84
%86 = load double, double* %16
%87 = load double, double* %14
%88 = fsub double %86, %87
%89 = call double @llvm.fmuladd.f64(double %85, double %88, double %83)
%90 = load double*, double** %24
store double %89, double* %90
%91 = load double, double* %15
%92 = load double*, double** %22
%93 = load double, double* %92
%94 = load double, double* %17
%95 = load double, double* %15
%96 = fsub double %94, %95
%97 = call double @llvm.fmuladd.f64(double %93, double %96, double %91)
%98 = load double*, double** %25
store double %97, double* %98
%99 = load double*, double** %22
%100 = load double, double* %99
%101 = fcmp oge double %100, 0.000000e+00
br i1 %101, label %102, label %114
102: ; preds = %46
%103 = load double*, double** %22
%104 = load double, double* %103
%105 = fcmp ole double %104, 1.000000e+00
br i1 %105, label %106, label %114
106: ; preds = %102
%107 = load double*, double** %23
%108 = load double, double* %107
%109 = fcmp oge double %108, 0.000000e+00
br i1 %109, label %110, label %114
110: ; preds = %106
%111 = load double*, double** %23
%112 = load double, double* %111
%113 = fcmp ole double %112, 1.000000e+00
br label %114
114: ; preds = %110, %106, %102, %46
%115 = phi i1 [ false, %106 ], [ false, %102 ], [ false, %46 ], [ %113, %110 ]
%116 = zext i1 %115 to i32
store i32 %116, i32* %13
br label %201
117: ; preds = %12
%118 = load double, double* %18
%119 = load double, double* %14
%120 = fsub double %118, %119
%121 = load double, double* %19
%122 = load double, double* %21
%123 = fsub double %121, %122
%124 = load double, double* %19
%125 = load double, double* %15
%126 = fsub double %124, %125
%127 = load double, double* %18
%128 = load double, double* %20
%129 = fsub double %127, %128
%130 = fmul double %126, %129
%131 = fneg double %130
%132 = call double @llvm.fmuladd.f64(double %120, double %123, double %131)
%133 = fcmp une double %132, 0.000000e+00
br i1 %133, label %151, label %134
134: ; preds = %117
%135 = load double, double* %16
%136 = load double, double* %14
%137 = fsub double %135, %136
%138 = load double, double* %19
%139 = load double, double* %15
%140 = fsub double %138, %139
%141 = load double, double* %17
%142 = load double, double* %15
%143 = fsub double %141, %142
%144 = load double, double* %18
%145 = load double, double* %14
%146 = fsub double %144, %145
%147 = fmul double %143, %146
%148 = fneg double %147
%149 = call double @llvm.fmuladd.f64(double %137, double %140, double %148)
%150 = fcmp une double %149, 0.000000e+00
br i1 %150, label %151, label %152
151: ; preds = %134, %117
store i32 -1, i32* %13
br label %201
152: ; preds = %134
%153 = load double, double* %14
%154 = load double, double* %16
%155 = fcmp ogt double %153, %154
br i1 %155, label %156, label %162
156: ; preds = %152
%157 = load double, double* %14
%158 = fptosi double %157 to i32
store i32 %158, i32* %27
%159 = load double, double* %16
store double %159, double* %14
%160 = load i32, i32* %27
%161 = sitofp i32 %160 to double
store double %161, double* %16
br label %162
162: ; preds = %156, %152
%163 = load double, double* %18
%164 = load double, double* %20
%165 = fcmp ogt double %163, %164
br i1 %165, label %166, label %172
166: ; preds = %162
%167 = load double, double* %18
%168 = fptosi double %167 to i32
store i32 %168, i32* %28
%169 = load double, double* %20
store double %169, double* %18
%170 = load i32, i32* %28
%171 = sitofp i32 %170 to double
store double %171, double* %20
br label %172
172: ; preds = %166, %162
%173 = load double, double* %14
%174 = load double, double* %20
%175 = fcmp ogt double %173, %174
br i1 %175, label %176, label %177
176: ; preds = %172
store i32 -1, i32* %13
br label %201
177: ; preds = %172
%178 = load double, double* %16
%179 = load double, double* %18
%180 = fcmp olt double %178, %179
br i1 %180, label %181, label %182
181: ; preds = %177
store i32 -1, i32* %13
br label %201
182: ; preds = %177
%183 = load double, double* %14
%184 = load double, double* %20
%185 = fcmp oeq double %183, %184
br i1 %185, label %186, label %191
186: ; preds = %182
%187 = load double, double* %14
%188 = load double*, double** %24
store double %187, double* %188
%189 = load double, double* %15
%190 = load double*, double** %25
store double %189, double* %190
store i32 1, i32* %13
br label %201
191: ; preds = %182
%192 = load double, double* %16
%193 = load double, double* %18
%194 = fcmp oeq double %192, %193
br i1 %194, label %195, label %200
195: ; preds = %191
%196 = load double, double* %16
%197 = load double*, double** %24
store double %196, double* %197
%198 = load double, double* %17
%199 = load double*, double** %25
store double %198, double* %199
store i32 1, i32* %13
br label %201
200: ; preds = %191
store i32 2, i32* %13
br label %201
201: ; preds = %200, %195, %186, %181, %176, %151, %114
%202 = load i32, i32* %13
ret i32 %202
}

LLVM IR (-O2):
define i32 @G_intersect_line_segments(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double* nocapture %8, double* nocapture %9, double* nocapture writeonly %10, double* nocapture writeonly %11) {
%13 = fsub double %2, %0
%14 = fsub double %5, %7
%15 = fsub double %3, %1
%16 = fsub double %4, %6
%17 = fneg double %15
%18 = fmul double %16, %17
%19 = tail call double @llvm.fmuladd.f64(double %13, double %14, double %18)
%20 = fcmp une double %19, 0.000000e+00
%21 = fsub double %4, %0
%22 = fsub double %5, %1
%23 = fneg double %22
%24 = fmul double %16, %23
%25 = tail call double @llvm.fmuladd.f64(double %21, double %14, double %24)
br i1 %20, label %26, label %45
26: ; preds = %12
%27 = fdiv double %25, %19
store double %27, double* %8
%28 = fmul double %21, %17
%29 = tail call double @llvm.fmuladd.f64(double %13, double %22, double %28)
%30 = fdiv double %29, %19
store double %30, double* %9
%31 = load double, double* %8
%32 = tail call double @llvm.fmuladd.f64(double %31, double %13, double %0)
store double %32, double* %10
%33 = load double, double* %8
%34 = tail call double @llvm.fmuladd.f64(double %33, double %15, double %1)
store double %34, double* %11
%35 = load double, double* %8
%36 = fcmp ult double %35, 0.000000e+00
%37 = fcmp ugt double %35, 1.000000e+00
%38 = or i1 %36, %37
br i1 %38, label %71, label %39
39: ; preds = %26
%40 = load double, double* %9
%41 = fcmp ult double %40, 0.000000e+00
br i1 %41, label %71, label %42
42: ; preds = %39
%43 = fcmp ole double %40, 1.000000e+00
%44 = zext i1 %43 to i32
br label %71
45: ; preds = %12
%46 = fcmp une double %25, 0.000000e+00
br i1 %46, label %71, label %47
47: ; preds = %45
%48 = fmul double %21, %17
%49 = tail call double @llvm.fmuladd.f64(double %13, double %22, double %48)
%50 = fcmp une double %49, 0.000000e+00
br i1 %50, label %71, label %51
51: ; preds = %47
%52 = fcmp ogt double %0, %2
%53 = fptosi double %0 to i32
%54 = sitofp i32 %53 to double
%55 = select i1 %52, double %54, double %2
%56 = select i1 %52, double %2, double %0
%57 = fcmp ogt double %4, %6
%58 = fptosi double %4 to i32
%59 = sitofp i32 %58 to double
%60 = select i1 %57, double %59, double %6
%61 = select i1 %57, double %6, double %4
%62 = fcmp ogt double %56, %60
%63 = fcmp olt double %55, %61
%64 = select i1 %62, i1 true, i1 %63
br i1 %64, label %71, label %65
65: ; preds = %51
%66 = fcmp oeq double %56, %60
br i1 %66, label %67, label %68
67: ; preds = %65
store double %56, double* %10
store double %1, double* %11
br label %71
68: ; preds = %65
%69 = fcmp oeq double %55, %61
br i1 %69, label %70, label %71
70: ; preds = %68
store double %55, double* %10
store double %3, double* %11
br label %71
71: ; preds = %68, %51, %45, %47, %26, %39, %42, %70, %67
%72 = phi i32 [ 1, %67 ], [ 1, %70 ], [ 0, %39 ], [ 0, %26 ], [ %44, %42 ], [ -1, %47 ], [ -1, %45 ], [ -1, %51 ], [ 2, %68 ]
ret i32 %72
}