int intersecta(double x, double y, double ix, double iy, int i, int j,
               double pb, double pp, int n, double *f, double *s, int dim) {
  int k;
  double jx, jy;
  double mx, Mx, my, My;
  double mox, Mox, moy, Moy;
  int m = 0;
  for (k = 0; k < n; k++) {
    if (k == i)
      continue;
    if (k == j)
      continue;
    jx = (f[k * 2 + 1] - pb) / (pp - f[k * 2]);
    jy = pp * jx + pb;
    mx = x <= ix ? x : ix;
    Mx = x >= ix ? x : ix;
    my = y <= iy ? y : iy;
    My = y >= iy ? y : iy;
    mox = s[k * dim + 0] <= s[k * dim + 2] ? s[k * dim + 0] : s[k * dim + 2];
    Mox = s[k * dim + 0] >= s[k * dim + 2] ? s[k * dim + 0] : s[k * dim + 2];
    moy = s[k * dim + 1] <= s[k * dim + 3] ? s[k * dim + 1] : s[k * dim + 3];
    Moy = s[k * dim + 1] >= s[k * dim + 3] ? s[k * dim + 1] : s[k * dim + 3];
    if ((mx <= jx) && (jx <= Mx) && (my <= jy) && (jy <= My) && (mox <= jx) &&
        (jx <= Mox) && (moy <= jy) && (jy <= Moy))
      m++;
  }
  return m;
}


x86 assembly (clang, -O0):
<intersecta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %edi,-0x24(%rbp)
mov    %esi,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
mov    %edx,-0x3c(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9d,-0x54(%rbp)
movl   $0x0,-0xac(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    15b0 <intersecta+0x4b0>
mov    -0x58(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    1169 <intersecta+0x69>
jmp    15a2 <intersecta+0x4a2>
mov    -0x58(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    117a <intersecta+0x7a>
jmp    15a2 <intersecta+0x4a2>
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
mov    -0x48(%rbp),%rax
mov    -0x58(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11f6 <intersecta+0xf6>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1203 <intersecta+0x103>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1232 <intersecta+0x132>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    123f <intersecta+0x13f>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1272 <intersecta+0x172>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    127f <intersecta+0x17f>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     12ae <intersecta+0x1ae>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    12bb <intersecta+0x1bb>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     1324 <intersecta+0x224>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1342 <intersecta+0x242>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     13a7 <intersecta+0x2a7>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
jmp    13c5 <intersecta+0x2c5>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     142e <intersecta+0x32e>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    144c <intersecta+0x34c>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jb     14b1 <intersecta+0x3b1>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
jmp    14cf <intersecta+0x3cf>
mov    -0x50(%rbp),%rax
mov    -0x58(%rbp),%ecx
imul   -0x54(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
movsd  -0x60(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
movsd  -0x80(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
movsd  -0x68(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
movsd  -0x60(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
movsd  -0x68(%rbp),%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jb     159d <intersecta+0x49d>
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    15a2 <intersecta+0x4a2>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    114c <intersecta+0x4c>
mov    -0xac(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intersecta>:
push   %rbp
push   %r14
push   %rbx
test   %edx,%edx
jle    12c6 <intersecta+0x1c6>
movapd %xmm0,%xmm8
cmplesd %xmm2,%xmm8
movapd %xmm8,%xmm6
andpd  %xmm0,%xmm6
andnpd %xmm2,%xmm8
orpd   %xmm6,%xmm8
movapd %xmm2,%xmm9
cmplesd %xmm0,%xmm9
andpd  %xmm9,%xmm0
andnpd %xmm2,%xmm9
orpd   %xmm0,%xmm9
movapd %xmm1,%xmm10
cmplesd %xmm3,%xmm10
movapd %xmm10,%xmm0
andpd  %xmm1,%xmm0
andnpd %xmm3,%xmm10
orpd   %xmm0,%xmm10
movapd %xmm3,%xmm11
cmplesd %xmm1,%xmm11
andpd  %xmm11,%xmm1
andnpd %xmm3,%xmm11
orpd   %xmm1,%xmm11
mov    %esi,%r10d
movslq %r9d,%r9
mov    %edi,%r11d
mov    %edx,%edi
shl    $0x4,%r11
add    $0x18,%r8
shl    $0x3,%r9
shl    $0x4,%r10
shl    $0x4,%rdi
xor    %esi,%esi
xor    %eax,%eax
jmp    11c0 <intersecta+0xc0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x10,%rsi
add    %r9,%r8
cmp    %rsi,%rdi
je     12c8 <intersecta+0x1c8>
cmp    %rsi,%r11
je     11b0 <intersecta+0xb0>
cmp    %rsi,%r10
je     11b0 <intersecta+0xb0>
movsd  0x8(%rcx,%rsi,1),%xmm13
subsd  %xmm4,%xmm13
movapd %xmm5,%xmm0
subsd  (%rcx,%rsi,1),%xmm0
divsd  %xmm0,%xmm13
movapd %xmm5,%xmm12
mulsd  %xmm13,%xmm12
addsd  %xmm4,%xmm12
movsd  -0x8(%r8),%xmm0
movsd  -0x18(%r8),%xmm6
movsd  -0x10(%r8),%xmm2
movapd %xmm6,%xmm3
cmplesd %xmm0,%xmm3
movapd %xmm3,%xmm7
andpd  %xmm6,%xmm7
andnpd %xmm0,%xmm3
orpd   %xmm7,%xmm3
movapd %xmm0,%xmm7
cmplesd %xmm6,%xmm7
andpd  %xmm7,%xmm6
andnpd %xmm0,%xmm7
orpd   %xmm6,%xmm7
movsd  (%r8),%xmm6
movapd %xmm2,%xmm0
cmplesd %xmm6,%xmm0
movapd %xmm0,%xmm1
andpd  %xmm2,%xmm1
andnpd %xmm6,%xmm0
orpd   %xmm1,%xmm0
movapd %xmm6,%xmm1
cmplesd %xmm2,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm6,%xmm1
ucomisd %xmm8,%xmm13
orpd   %xmm2,%xmm1
setae  %bpl
ucomisd %xmm13,%xmm9
setae  %bl
ucomisd %xmm10,%xmm12
setae  %dl
and    %bpl,%bl
and    %dl,%bl
ucomisd %xmm12,%xmm11
setae  %bpl
ucomisd %xmm3,%xmm13
setae  %dl
and    %bpl,%dl
and    %bl,%dl
ucomisd %xmm13,%xmm7
setae  %bpl
ucomisd %xmm0,%xmm12
setae  %r14b
and    %bpl,%r14b
ucomisd %xmm12,%xmm1
setae  %bl
and    %r14b,%bl
and    %dl,%bl
movzbl %bl,%edx
add    %edx,%eax
jmp    11b0 <intersecta+0xb0>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @intersecta(double %0, double %1, double %2, double %3, i32 %4, i32 %5, double %6, double %7, i32 %8, double* %9, double* %10, i32 %11) {
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca i32
%22 = alloca double*
%23 = alloca double*
%24 = alloca i32
%25 = alloca i32
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca i32
store double %0, double* %13
store double %1, double* %14
store double %2, double* %15
store double %3, double* %16
store i32 %4, i32* %17
store i32 %5, i32* %18
store double %6, double* %19
store double %7, double* %20
store i32 %8, i32* %21
store double* %9, double** %22
store double* %10, double** %23
store i32 %11, i32* %24
store i32 0, i32* %36
store i32 0, i32* %25
br label %37
37: ; preds = %293, %12
%38 = load i32, i32* %25
%39 = load i32, i32* %21
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %296
41: ; preds = %37
%42 = load i32, i32* %25
%43 = load i32, i32* %17
%44 = icmp eq i32 %42, %43
br i1 %44, label %45, label %46
45: ; preds = %41
br label %293
46: ; preds = %41
%47 = load i32, i32* %25
%48 = load i32, i32* %18
%49 = icmp eq i32 %47, %48
br i1 %49, label %50, label %51
50: ; preds = %46
br label %293
51: ; preds = %46
%52 = load double*, double** %22
%53 = load i32, i32* %25
%54 = mul nsw i32 %53, 2
%55 = add nsw i32 %54, 1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %52, i64 %56
%58 = load double, double* %57
%59 = load double, double* %19
%60 = fsub double %58, %59
%61 = load double, double* %20
%62 = load double*, double** %22
%63 = load i32, i32* %25
%64 = mul nsw i32 %63, 2
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %62, i64 %65
%67 = load double, double* %66
%68 = fsub double %61, %67
%69 = fdiv double %60, %68
store double %69, double* %26
%70 = load double, double* %20
%71 = load double, double* %26
%72 = load double, double* %19
%73 = call double @llvm.fmuladd.f64(double %70, double %71, double %72)
store double %73, double* %27
%74 = load double, double* %13
%75 = load double, double* %15
%76 = fcmp ole double %74, %75
br i1 %76, label %77, label %79
77: ; preds = %51
%78 = load double, double* %13
br label %81
79: ; preds = %51
%80 = load double, double* %15
br label %81
81: ; preds = %79, %77
%82 = phi double [ %78, %77 ], [ %80, %79 ]
store double %82, double* %28
%83 = load double, double* %13
%84 = load double, double* %15
%85 = fcmp oge double %83, %84
br i1 %85, label %86, label %88
86: ; preds = %81
%87 = load double, double* %13
br label %90
88: ; preds = %81
%89 = load double, double* %15
br label %90
90: ; preds = %88, %86
%91 = phi double [ %87, %86 ], [ %89, %88 ]
store double %91, double* %29
%92 = load double, double* %14
%93 = load double, double* %16
%94 = fcmp ole double %92, %93
br i1 %94, label %95, label %97
95: ; preds = %90
%96 = load double, double* %14
br label %99
97: ; preds = %90
%98 = load double, double* %16
br label %99
99: ; preds = %97, %95
%100 = phi double [ %96, %95 ], [ %98, %97 ]
store double %100, double* %30
%101 = load double, double* %14
%102 = load double, double* %16
%103 = fcmp oge double %101, %102
br i1 %103, label %104, label %106
104: ; preds = %99
%105 = load double, double* %14
br label %108
106: ; preds = %99
%107 = load double, double* %16
br label %108
108: ; preds = %106, %104
%109 = phi double [ %105, %104 ], [ %107, %106 ]
store double %109, double* %31
%110 = load double*, double** %23
%111 = load i32, i32* %25
%112 = load i32, i32* %24
%113 = mul nsw i32 %111, %112
%114 = add nsw i32 %113, 0
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %110, i64 %115
%117 = load double, double* %116
%118 = load double*, double** %23
%119 = load i32, i32* %25
%120 = load i32, i32* %24
%121 = mul nsw i32 %119, %120
%122 = add nsw i32 %121, 2
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %118, i64 %123
%125 = load double, double* %124
%126 = fcmp ole double %117, %125
br i1 %126, label %127, label %136
127: ; preds = %108
%128 = load double*, double** %23
%129 = load i32, i32* %25
%130 = load i32, i32* %24
%131 = mul nsw i32 %129, %130
%132 = add nsw i32 %131, 0
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %128, i64 %133
%135 = load double, double* %134
br label %145
136: ; preds = %108
%137 = load double*, double** %23
%138 = load i32, i32* %25
%139 = load i32, i32* %24
%140 = mul nsw i32 %138, %139
%141 = add nsw i32 %140, 2
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds double, double* %137, i64 %142
%144 = load double, double* %143
br label %145
145: ; preds = %136, %127
%146 = phi double [ %135, %127 ], [ %144, %136 ]
store double %146, double* %32
%147 = load double*, double** %23
%148 = load i32, i32* %25
%149 = load i32, i32* %24
%150 = mul nsw i32 %148, %149
%151 = add nsw i32 %150, 0
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %147, i64 %152
%154 = load double, double* %153
%155 = load double*, double** %23
%156 = load i32, i32* %25
%157 = load i32, i32* %24
%158 = mul nsw i32 %156, %157
%159 = add nsw i32 %158, 2
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %155, i64 %160
%162 = load double, double* %161
%163 = fcmp oge double %154, %162
br i1 %163, label %164, label %173
164: ; preds = %145
%165 = load double*, double** %23
%166 = load i32, i32* %25
%167 = load i32, i32* %24
%168 = mul nsw i32 %166, %167
%169 = add nsw i32 %168, 0
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds double, double* %165, i64 %170
%172 = load double, double* %171
br label %182
173: ; preds = %145
%174 = load double*, double** %23
%175 = load i32, i32* %25
%176 = load i32, i32* %24
%177 = mul nsw i32 %175, %176
%178 = add nsw i32 %177, 2
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds double, double* %174, i64 %179
%181 = load double, double* %180
br label %182
182: ; preds = %173, %164
%183 = phi double [ %172, %164 ], [ %181, %173 ]
store double %183, double* %33
%184 = load double*, double** %23
%185 = load i32, i32* %25
%186 = load i32, i32* %24
%187 = mul nsw i32 %185, %186
%188 = add nsw i32 %187, 1
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds double, double* %184, i64 %189
%191 = load double, double* %190
%192 = load double*, double** %23
%193 = load i32, i32* %25
%194 = load i32, i32* %24
%195 = mul nsw i32 %193, %194
%196 = add nsw i32 %195, 3
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds double, double* %192, i64 %197
%199 = load double, double* %198
%200 = fcmp ole double %191, %199
br i1 %200, label %201, label %210
201: ; preds = %182
%202 = load double*, double** %23
%203 = load i32, i32* %25
%204 = load i32, i32* %24
%205 = mul nsw i32 %203, %204
%206 = add nsw i32 %205, 1
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds double, double* %202, i64 %207
%209 = load double, double* %208
br label %219
210: ; preds = %182
%211 = load double*, double** %23
%212 = load i32, i32* %25
%213 = load i32, i32* %24
%214 = mul nsw i32 %212, %213
%215 = add nsw i32 %214, 3
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %211, i64 %216
%218 = load double, double* %217
br label %219
219: ; preds = %210, %201
%220 = phi double [ %209, %201 ], [ %218, %210 ]
store double %220, double* %34
%221 = load double*, double** %23
%222 = load i32, i32* %25
%223 = load i32, i32* %24
%224 = mul nsw i32 %222, %223
%225 = add nsw i32 %224, 1
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double, double* %221, i64 %226
%228 = load double, double* %227
%229 = load double*, double** %23
%230 = load i32, i32* %25
%231 = load i32, i32* %24
%232 = mul nsw i32 %230, %231
%233 = add nsw i32 %232, 3
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %229, i64 %234
%236 = load double, double* %235
%237 = fcmp oge double %228, %236
br i1 %237, label %238, label %247
238: ; preds = %219
%239 = load double*, double** %23
%240 = load i32, i32* %25
%241 = load i32, i32* %24
%242 = mul nsw i32 %240, %241
%243 = add nsw i32 %242, 1
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %239, i64 %244
%246 = load double, double* %245
br label %256
247: ; preds = %219
%248 = load double*, double** %23
%249 = load i32, i32* %25
%250 = load i32, i32* %24
%251 = mul nsw i32 %249, %250
%252 = add nsw i32 %251, 3
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds double, double* %248, i64 %253
%255 = load double, double* %254
br label %256
256: ; preds = %247, %238
%257 = phi double [ %246, %238 ], [ %255, %247 ]
store double %257, double* %35
%258 = load double, double* %28
%259 = load double, double* %26
%260 = fcmp ole double %258, %259
br i1 %260, label %261, label %292
261: ; preds = %256
%262 = load double, double* %26
%263 = load double, double* %29
%264 = fcmp ole double %262, %263
br i1 %264, label %265, label %292
265: ; preds = %261
%266 = load double, double* %30
%267 = load double, double* %27
%268 = fcmp ole double %266, %267
br i1 %268, label %269, label %292
269: ; preds = %265
%270 = load double, double* %27
%271 = load double, double* %31
%272 = fcmp ole double %270, %271
br i1 %272, label %273, label %292
273: ; preds = %269
%274 = load double, double* %32
%275 = load double, double* %26
%276 = fcmp ole double %274, %275
br i1 %276, label %277, label %292
277: ; preds = %273
%278 = load double, double* %26
%279 = load double, double* %33
%280 = fcmp ole double %278, %279
br i1 %280, label %281, label %292
281: ; preds = %277
%282 = load double, double* %34
%283 = load double, double* %27
%284 = fcmp ole double %282, %283
br i1 %284, label %285, label %292
285: ; preds = %281
%286 = load double, double* %27
%287 = load double, double* %35
%288 = fcmp ole double %286, %287
br i1 %288, label %289, label %292
289: ; preds = %285
%290 = load i32, i32* %36
%291 = add nsw i32 %290, 1
store i32 %291, i32* %36
br label %292
292: ; preds = %289, %285, %281, %277, %273, %269, %265, %261, %256
br label %293
293: ; preds = %292, %50, %45
%294 = load i32, i32* %25
%295 = add nsw i32 %294, 1
store i32 %295, i32* %25
br label %37
296: ; preds = %37
%297 = load i32, i32* %36
ret i32 %297
}

LLVM IR (-O2):
define i32 @intersecta(double %0, double %1, double %2, double %3, i32 %4, i32 %5, double %6, double %7, i32 %8, double* nocapture %9, double* nocapture %10, i32 %11) {
%13 = icmp sgt i32 %8, 0
br i1 %13, label %14, label %85
14: ; preds = %12
%15 = fcmp ole double %0, %2
%16 = select i1 %15, double %0, double %2
%17 = fcmp oge double %0, %2
%18 = select i1 %17, double %0, double %2
%19 = fcmp ole double %1, %3
%20 = select i1 %19, double %1, double %3
%21 = fcmp oge double %1, %3
%22 = select i1 %21, double %1, double %3
%23 = zext i32 %5 to i64
%24 = sext i32 %11 to i64
%25 = zext i32 %4 to i64
%26 = zext i32 %8 to i64
br label %27
27: ; preds = %14, %81
%28 = phi i64 [ 0, %14 ], [ %83, %81 ]
%29 = phi i32 [ 0, %14 ], [ %82, %81 ]
%30 = icmp eq i64 %28, %25
%31 = icmp eq i64 %28, %23
%32 = or i1 %30, %31
br i1 %32, label %81, label %33
33: ; preds = %27
%34 = shl nuw nsw i64 %28, 1
%35 = or i64 %34, 1
%36 = getelementptr inbounds double, double* %9, i64 %35
%37 = load double, double* %36
%38 = fsub double %37, %6
%39 = getelementptr inbounds double, double* %9, i64 %34
%40 = load double, double* %39
%41 = fsub double %7, %40
%42 = fdiv double %38, %41
%43 = tail call double @llvm.fmuladd.f64(double %7, double %42, double %6)
%44 = mul nsw i64 %28, %24
%45 = getelementptr inbounds double, double* %10, i64 %44
%46 = load double, double* %45
%47 = add nsw i64 %44, 2
%48 = getelementptr inbounds double, double* %10, i64 %47
%49 = load double, double* %48
%50 = fcmp ole double %46, %49
%51 = select i1 %50, double %46, double %49
%52 = fcmp oge double %46, %49
%53 = select i1 %52, double %46, double %49
%54 = add nsw i64 %44, 1
%55 = getelementptr inbounds double, double* %10, i64 %54
%56 = load double, double* %55
%57 = add nsw i64 %44, 3
%58 = getelementptr inbounds double, double* %10, i64 %57
%59 = load double, double* %58
%60 = fcmp ole double %56, %59
%61 = select i1 %60, double %56, double %59
%62 = fcmp oge double %56, %59
%63 = select i1 %62, double %56, double %59
%64 = fcmp ole double %16, %42
%65 = fcmp ole double %42, %18
%66 = fcmp ole double %20, %43
%67 = and i1 %64, %65
%68 = select i1 %67, i1 %66, i1 false
%69 = fcmp ole double %43, %22
%70 = select i1 %68, i1 %69, i1 false
%71 = fcmp ole double %51, %42
%72 = select i1 %70, i1 %71, i1 false
%73 = fcmp ole double %42, %53
%74 = select i1 %72, i1 %73, i1 false
%75 = fcmp ole double %61, %43
%76 = select i1 %74, i1 %75, i1 false
%77 = fcmp ole double %43, %63
%78 = select i1 %76, i1 %77, i1 false
%79 = zext i1 %78 to i32
%80 = add nsw i32 %29, %79
br label %81
81: ; preds = %33, %27
%82 = phi i32 [ %29, %27 ], [ %80, %33 ]
%83 = add nuw nsw i64 %28, 1
%84 = icmp eq i64 %83, %26
br i1 %84, label %85, label %27
85: ; preds = %81, %12
%86 = phi i32 [ 0, %12 ], [ %82, %81 ]
ret i32 %86
}