#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*/ errAbort(char *);
scalar_t__ isinf(double);
double sqrt(int);
void findLinesIntersection(int cw, double m0, double b0, double m1, double b1,
                           double px, double py, int posDeltaX, int posDeltaY,
                           double *ix, double *iy) {
  if ((isinf(m0) && isinf(m1)) && (b0 == b1)) {
    if (cw ^ posDeltaY)
      *ix = px + 1;
    else
      *ix = px - 1;
    *iy = py;
  } else if (((m0 == 0) && (m1 == 0)) && (b0 == b1)) {
    if (cw ^ posDeltaX)
      *iy = py + 1;
    else
      *iy = py - 1;
    *ix = px;
  } else if ((m0 == m1) && (b0 == b1)) {
    double dx, dy;
    double m = -1 / m0;
    dx = sqrt(1 / (1 + m * m));
    dy = m * dx;
    if (!(cw ^ posDeltaX)) {
      *ix = px + dx;
      *iy = py + dy;
    } else {
      *ix = px - dx;
      *iy = py - dy;
    }
  } else {
    if (isinf(m0) && isinf(m1)) {
      errAbort("pscmGfx: m0 and m1 both inf, shouldn't get here");
    } else if (!isinf(m0) && isinf(m1)) {
      *ix = b1;
      *iy = m0 * (*ix) + b0;
    } else if (isinf(m0) && !isinf(m1)) {
      *ix = b0;
      *iy = m1 * (*ix) + b1;
    } else if (!isinf(m0) && !isinf(m1)) {
      *ix = -(b1 - b0) / (m1 - m0);
      *iy = m0 * (*ix) + b0;
    }
  }
}


x86 assembly (clang, -O0):
<findLinesIntersection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%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)
mov    %esi,-0x3c(%rbp)
mov    %edx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     11f9 <findLinesIntersection+0xc9>
movsd  -0x20(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     11f9 <findLinesIntersection+0xc9>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jne    11f9 <findLinesIntersection+0xc9>
jp     11f9 <findLinesIntersection+0xc9>
mov    -0x4(%rbp),%eax
xor    -0x40(%rbp),%eax
cmp    $0x0,%eax
je     11ce <findLinesIntersection+0x9e>
movsd  0xe44(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    11e7 <findLinesIntersection+0xb7>
movsd  -0x30(%rbp),%xmm0
movsd  0xe25(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1505 <findLinesIntersection+0x3d5>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1293 <findLinesIntersection+0x163>
jp     1293 <findLinesIntersection+0x163>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1293 <findLinesIntersection+0x163>
jp     1293 <findLinesIntersection+0x163>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jne    1293 <findLinesIntersection+0x163>
jp     1293 <findLinesIntersection+0x163>
mov    -0x4(%rbp),%eax
xor    -0x3c(%rbp),%eax
cmp    $0x0,%eax
je     1268 <findLinesIntersection+0x138>
movsd  0xdaa(%rip),%xmm0
addsd  -0x38(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1281 <findLinesIntersection+0x151>
movsd  -0x38(%rbp),%xmm0
movsd  0xd8b(%rip),%xmm1
subsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1500 <findLinesIntersection+0x3d0>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1375 <findLinesIntersection+0x245>
jp     1375 <findLinesIntersection+0x245>
movsd  -0x18(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jne    1375 <findLinesIntersection+0x245>
jp     1375 <findLinesIntersection+0x245>
movsd  0xd41(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd19(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xd0d(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x3c(%rbp),%eax
cmp    $0x0,%eax
jne    134c <findLinesIntersection+0x21c>
movsd  -0x30(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1370 <findLinesIntersection+0x240>
movsd  -0x30(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14fb <findLinesIntersection+0x3cb>
movsd  -0x10(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     13ae <findLinesIntersection+0x27e>
movsd  -0x20(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     13ae <findLinesIntersection+0x27e>
lea    0xc6c(%rip),%rdi
call   1030 <errAbort@plt>
jmp    14f6 <findLinesIntersection+0x3c6>
movsd  -0x10(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    140a <findLinesIntersection+0x2da>
movsd  -0x20(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     140a <findLinesIntersection+0x2da>
movsd  -0x28(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14f1 <findLinesIntersection+0x3c1>
movsd  -0x10(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     1466 <findLinesIntersection+0x336>
movsd  -0x20(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    1466 <findLinesIntersection+0x336>
movsd  -0x18(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14ec <findLinesIntersection+0x3bc>
movsd  -0x10(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    14e7 <findLinesIntersection+0x3b7>
movsd  -0x20(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    14e7 <findLinesIntersection+0x3b7>
movsd  -0x28(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14ec <findLinesIntersection+0x3bc>
jmp    14f1 <findLinesIntersection+0x3c1>
jmp    14f6 <findLinesIntersection+0x3c6>
jmp    14fb <findLinesIntersection+0x3cb>
jmp    1500 <findLinesIntersection+0x3d0>
jmp    1505 <findLinesIntersection+0x3d5>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findLinesIntersection>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%ebp
mov    %esi,%r12d
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,0x20(%rsp)
movapd %xmm3,0x30(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x18(%rsp)
mov    %edi,%ebx
movsd  %xmm0,0x10(%rsp)
call   1050 <isinf@plt>
test   %rax,%rax
je     11c0 <findLinesIntersection+0x90>
movsd  0x8(%rsp),%xmm0
call   1050 <isinf@plt>
movsd  0x18(%rsp),%xmm0
ucomisd 0x30(%rsp),%xmm0
jne    11c0 <findLinesIntersection+0x90>
jp     11c0 <findLinesIntersection+0x90>
test   %rax,%rax
je     11c0 <findLinesIntersection+0x90>
xor    %eax,%eax
cmp    %ebp,%ebx
sete   %al
lea    0xe5b(%rip),%rcx
movsd  0x20(%rsp),%xmm0
addsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%r15)
movsd  0x28(%rsp),%xmm0
jmp    1378 <findLinesIntersection+0x248>
xorpd  %xmm0,%xmm0
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    121f <findLinesIntersection+0xef>
jp     121f <findLinesIntersection+0xef>
movsd  0x8(%rsp),%xmm2
ucomisd %xmm0,%xmm2
jne    121f <findLinesIntersection+0xef>
jp     121f <findLinesIntersection+0xef>
movsd  0x18(%rsp),%xmm0
ucomisd 0x30(%rsp),%xmm0
jne    121f <findLinesIntersection+0xef>
jp     121f <findLinesIntersection+0xef>
xor    %eax,%eax
cmp    %r12d,%ebx
sete   %al
lea    0xe01(%rip),%rcx
movsd  0x28(%rsp),%xmm0
addsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%r14)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%r15)
jmp    137d <findLinesIntersection+0x24d>
ucomisd 0x8(%rsp),%xmm1
jne    1296 <findLinesIntersection+0x166>
jp     1296 <findLinesIntersection+0x166>
movsd  0x18(%rsp),%xmm0
ucomisd 0x30(%rsp),%xmm0
jne    1296 <findLinesIntersection+0x166>
jp     1296 <findLinesIntersection+0x166>
movsd  0xddf(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm0,%xmm0
movsd  0xdd1(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
mulsd  %xmm0,%xmm2
cmp    %r12d,%ebx
jne    135f <findLinesIntersection+0x22f>
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%r15)
addsd  0x28(%rsp),%xmm2
movsd  %xmm2,(%r14)
jmp    137d <findLinesIntersection+0x24d>
movapd %xmm1,%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
je     12cc <findLinesIntersection+0x19c>
movsd  0x8(%rsp),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
je     12cc <findLinesIntersection+0x19c>
lea    0xd75(%rip),%rdi
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <errAbort@plt>
movsd  0x10(%rsp),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
je     138a <findLinesIntersection+0x25a>
movsd  0x10(%rsp),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
je     1304 <findLinesIntersection+0x1d4>
movsd  0x8(%rsp),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
je     13c0 <findLinesIntersection+0x290>
movsd  0x10(%rsp),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
jne    137d <findLinesIntersection+0x24d>
movsd  0x8(%rsp),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
jne    137d <findLinesIntersection+0x24d>
movapd 0x30(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
subsd  %xmm1,%xmm0
xorpd  0xcd4(%rip),%xmm0
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm3
subsd  %xmm2,%xmm3
divsd  %xmm3,%xmm0
movsd  %xmm0,(%r15)
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
jmp    1378 <findLinesIntersection+0x248>
movsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r15)
movsd  0x28(%rsp),%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,(%r14)
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
movsd  0x8(%rsp),%xmm0
call   1050 <isinf@plt>
test   %rax,%rax
je     12e0 <findLinesIntersection+0x1b0>
movapd 0x30(%rsp),%xmm0
movsd  %xmm0,(%r15)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x18(%rsp),%xmm1
movsd  %xmm1,(%r14)
jmp    137d <findLinesIntersection+0x24d>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r15)
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x30(%rsp),%xmm1
movsd  %xmm1,(%r14)
jmp    137d <findLinesIntersection+0x24d>

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

LLVM IR (-O2):
@.str = [48 x i8] c"pscmGfx: m0 and m1 both inf, shouldn't get here\00"
define void @findLinesIntersection(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, i32 %7, i32 %8, double* nocapture writeonly %9, double* nocapture writeonly %10) {
%12 = tail call i64 @isinf(double %1)
%13 = icmp eq i64 %12, 0
br i1 %13, label %23, label %14
14: ; preds = %11
%15 = tail call i64 @isinf(double %3)
%16 = icmp ne i64 %15, 0
%17 = fcmp oeq double %2, %4
%18 = and i1 %17, %16
br i1 %18, label %19, label %23
19: ; preds = %14
%20 = icmp eq i32 %0, %8
%21 = select i1 %20, double -1.000000e+00, double 1.000000e+00
%22 = fadd double %21, %5
store double %22, double* %9
store double %6, double* %10
br label %88
23: ; preds = %14, %11
%24 = fcmp oeq double %1, 0.000000e+00
%25 = fcmp oeq double %3, 0.000000e+00
%26 = and i1 %24, %25
%27 = fcmp oeq double %2, %4
%28 = and i1 %26, %27
br i1 %28, label %29, label %33
29: ; preds = %23
%30 = icmp eq i32 %0, %7
%31 = select i1 %30, double -1.000000e+00, double 1.000000e+00
%32 = fadd double %31, %6
store double %32, double* %10
store double %5, double* %9
br label %88
33: ; preds = %23
%34 = fcmp oeq double %1, %3
%35 = and i1 %34, %27
br i1 %35, label %36, label %52
36: ; preds = %33
%37 = fdiv double -1.000000e+00, %1
%38 = tail call double @llvm.fmuladd.f64(double %37, double %37, double 1.000000e+00)
%39 = fdiv double 1.000000e+00, %38
%40 = fptosi double %39 to i32
%41 = tail call double @sqrt(i32 %40)
%42 = fmul double %37, %41
%43 = icmp eq i32 %0, %7
br i1 %43, label %44, label %47
44: ; preds = %36
%45 = fadd double %41, %5
store double %45, double* %9
%46 = fadd double %42, %6
br label %50
47: ; preds = %36
%48 = fsub double %5, %41
store double %48, double* %9
%49 = fsub double %6, %42
br label %50
50: ; preds = %47, %44
%51 = phi double [ %46, %44 ], [ %49, %47 ]
store double %51, double* %10
br label %88
52: ; preds = %33
%53 = tail call i64 @isinf(double %1)
%54 = icmp eq i64 %53, 0
br i1 %54, label %60, label %55
55: ; preds = %52
%56 = tail call i64 @isinf(double %3)
%57 = icmp eq i64 %56, 0
br i1 %57, label %60, label %58
58: ; preds = %55
%59 = tail call i32 @errAbort(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
br label %88
60: ; preds = %55, %52
%61 = tail call i64 @isinf(double %1)
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %68
63: ; preds = %60
%64 = tail call i64 @isinf(double %3)
%65 = icmp eq i64 %64, 0
br i1 %65, label %68, label %66
66: ; preds = %63
store double %4, double* %9
%67 = tail call double @llvm.fmuladd.f64(double %1, double %4, double %2)
store double %67, double* %10
br label %88
68: ; preds = %63, %60
%69 = tail call i64 @isinf(double %1)
%70 = icmp eq i64 %69, 0
br i1 %70, label %76, label %71
71: ; preds = %68
%72 = tail call i64 @isinf(double %3)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %76
74: ; preds = %71
store double %2, double* %9
%75 = tail call double @llvm.fmuladd.f64(double %3, double %2, double %4)
store double %75, double* %10
br label %88
76: ; preds = %71, %68
%77 = tail call i64 @isinf(double %1)
%78 = icmp eq i64 %77, 0
br i1 %78, label %79, label %88
79: ; preds = %76
%80 = tail call i64 @isinf(double %3)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %88
82: ; preds = %79
%83 = fsub double %4, %2
%84 = fneg double %83
%85 = fsub double %3, %1
%86 = fdiv double %84, %85
store double %86, double* %9
%87 = tail call double @llvm.fmuladd.f64(double %1, double %86, double %2)
store double %87, double* %10
br label %88
88: ; preds = %29, %58, %74, %82, %79, %76, %66, %50, %19
ret void
}