#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*/ isect2(double *, double *, double *, double, double, double,
                          double, double, double, double *, double *, double *,
                          double *);
int compute_intervals_isectline(double VERT0[3], double VERT1[3],
                                double VERT2[3], double VV0, double VV1,
                                double VV2, double D0, double D1, double D2,
                                double D0D1, double D0D2, double *isect0,
                                double *isect1, double isectpoint0[3],
                                double isectpoint1[3]) {
  if (D0D1 > 0.0f) {
    isect2(VERT2, VERT0, VERT1, VV2, VV0, VV1, D2, D0, D1, isect0, isect1,
           isectpoint0, isectpoint1);
  } else if (D0D2 > 0.0f) {
    isect2(VERT1, VERT0, VERT2, VV1, VV0, VV2, D1, D0, D2, isect0, isect1,
           isectpoint0, isectpoint1);
  } else if (D1 * D2 > 0.0f || D0 != 0.0f) {
    isect2(VERT0, VERT1, VERT2, VV0, VV1, VV2, D0, D1, D2, isect0, isect1,
           isectpoint0, isectpoint1);
  } else if (D1 != 0.0f) {
    isect2(VERT1, VERT0, VERT2, VV1, VV0, VV2, D1, D0, D2, isect0, isect1,
           isectpoint0, isectpoint1);
  } else if (D2 != 0.0f) {
    isect2(VERT2, VERT0, VERT1, VV2, VV0, VV1, D2, D0, D1, isect0, isect1,
           isectpoint0, isectpoint1);
  } else {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compute_intervals_isectline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm2,-0x38(%rbp)
movsd  %xmm3,-0x40(%rbp)
movsd  %xmm4,-0x48(%rbp)
movsd  %xmm5,-0x50(%rbp)
movsd  %xmm6,-0x58(%rbp)
movsd  %xmm7,-0x60(%rbp)
mov    %rcx,-0x68(%rbp)
mov    %r8,-0x70(%rbp)
mov    %r9,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11b9 <compute_intervals_isectline+0xa9>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    1379 <compute_intervals_isectline+0x269>
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1213 <compute_intervals_isectline+0x103>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x50(%rbp),%xmm5
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    1374 <compute_intervals_isectline+0x264>
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     1247 <compute_intervals_isectline+0x137>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1247 <compute_intervals_isectline+0x137>
jp     1247 <compute_intervals_isectline+0x137>
jmp    128f <compute_intervals_isectline+0x17f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  -0x50(%rbp),%xmm5
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    136f <compute_intervals_isectline+0x25f>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12ac <compute_intervals_isectline+0x19c>
jp     12ac <compute_intervals_isectline+0x19c>
jmp    12f4 <compute_intervals_isectline+0x1e4>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x50(%rbp),%xmm5
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    136a <compute_intervals_isectline+0x25a>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1311 <compute_intervals_isectline+0x201>
jp     1311 <compute_intervals_isectline+0x201>
jmp    1359 <compute_intervals_isectline+0x249>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x38(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
mov    -0x68(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    1365 <compute_intervals_isectline+0x255>
movl   $0x1,-0x4(%rbp)
jmp    1380 <compute_intervals_isectline+0x270>
jmp    136a <compute_intervals_isectline+0x25a>
jmp    136f <compute_intervals_isectline+0x25f>
jmp    1374 <compute_intervals_isectline+0x264>
jmp    1379 <compute_intervals_isectline+0x269>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_intervals_isectline>:
push   %rax
movapd %xmm4,%xmm8
movapd %xmm3,%xmm4
movapd %xmm1,%xmm3
movapd %xmm0,%xmm1
mov    %rsi,%rax
mov    %rdi,%rsi
mov    0x10(%rsp),%rdi
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm6
jbe    1154 <compute_intervals_isectline+0x44>
mov    %rdi,(%rsp)
mov    %rdx,%rdi
mov    %rax,%rdx
movapd %xmm2,%xmm0
movapd %xmm3,%xmm2
movapd %xmm5,%xmm3
movapd %xmm8,%xmm5
jmp    11af <compute_intervals_isectline+0x9f>
ucomisd %xmm0,%xmm7
ja     1182 <compute_intervals_isectline+0x72>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm4
jne    1194 <compute_intervals_isectline+0x84>
jp     1194 <compute_intervals_isectline+0x84>
movapd %xmm8,%xmm6
mulsd  %xmm5,%xmm6
ucomisd %xmm0,%xmm6
ja     1194 <compute_intervals_isectline+0x84>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm8
jne    1182 <compute_intervals_isectline+0x72>
jnp    11b8 <compute_intervals_isectline+0xa8>
mov    %rdi,(%rsp)
mov    %rax,%rdi
movapd %xmm3,%xmm0
movapd %xmm8,%xmm3
jmp    11af <compute_intervals_isectline+0x9f>
mov    %rdi,(%rsp)
mov    %rsi,%rdi
mov    %rax,%rsi
movapd %xmm1,%xmm0
movapd %xmm3,%xmm1
movapd %xmm4,%xmm3
movapd %xmm8,%xmm4
call   1030 <isect2@plt>
xor    %eax,%eax
pop    %rcx
ret
ucomisd %xmm0,%xmm5
jne    1137 <compute_intervals_isectline+0x27>
jp     1137 <compute_intervals_isectline+0x27>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @compute_intervals_isectline(double* %0, double* %1, double* %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double* %11, double* %12, double* %13, double* %14) {
%16 = alloca i32
%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 double
%28 = alloca double*
%29 = alloca double*
%30 = alloca double*
%31 = alloca double*
store double* %0, double** %17
store double* %1, double** %18
store double* %2, double** %19
store double %3, double* %20
store double %4, double* %21
store double %5, double* %22
store double %6, double* %23
store double %7, double* %24
store double %8, double* %25
store double %9, double* %26
store double %10, double* %27
store double* %11, double** %28
store double* %12, double** %29
store double* %13, double** %30
store double* %14, double** %31
%32 = load double, double* %26
%33 = fcmp ogt double %32, 0.000000e+00
br i1 %33, label %34, label %49
34: ; preds = %15
%35 = load double*, double** %19
%36 = load double*, double** %17
%37 = load double*, double** %18
%38 = load double, double* %22
%39 = load double, double* %20
%40 = load double, double* %21
%41 = load double, double* %25
%42 = load double, double* %23
%43 = load double, double* %24
%44 = load double*, double** %28
%45 = load double*, double** %29
%46 = load double*, double** %30
%47 = load double*, double** %31
%48 = call i32 @isect2(double* %35, double* %36, double* %37, double %38, double %39, double %40, double %41, double %42, double %43, double* %44, double* %45, double* %46, double* %47)
br label %131
49: ; preds = %15
%50 = load double, double* %27
%51 = fcmp ogt double %50, 0.000000e+00
br i1 %51, label %52, label %67
52: ; preds = %49
%53 = load double*, double** %18
%54 = load double*, double** %17
%55 = load double*, double** %19
%56 = load double, double* %21
%57 = load double, double* %20
%58 = load double, double* %22
%59 = load double, double* %24
%60 = load double, double* %23
%61 = load double, double* %25
%62 = load double*, double** %28
%63 = load double*, double** %29
%64 = load double*, double** %30
%65 = load double*, double** %31
%66 = call i32 @isect2(double* %53, double* %54, double* %55, double %56, double %57, double %58, double %59, double %60, double %61, double* %62, double* %63, double* %64, double* %65)
br label %130
67: ; preds = %49
%68 = load double, double* %24
%69 = load double, double* %25
%70 = fmul double %68, %69
%71 = fcmp ogt double %70, 0.000000e+00
br i1 %71, label %75, label %72
72: ; preds = %67
%73 = load double, double* %23
%74 = fcmp une double %73, 0.000000e+00
br i1 %74, label %75, label %90
75: ; preds = %72, %67
%76 = load double*, double** %17
%77 = load double*, double** %18
%78 = load double*, double** %19
%79 = load double, double* %20
%80 = load double, double* %21
%81 = load double, double* %22
%82 = load double, double* %23
%83 = load double, double* %24
%84 = load double, double* %25
%85 = load double*, double** %28
%86 = load double*, double** %29
%87 = load double*, double** %30
%88 = load double*, double** %31
%89 = call i32 @isect2(double* %76, double* %77, double* %78, double %79, double %80, double %81, double %82, double %83, double %84, double* %85, double* %86, double* %87, double* %88)
br label %129
90: ; preds = %72
%91 = load double, double* %24
%92 = fcmp une double %91, 0.000000e+00
br i1 %92, label %93, label %108
93: ; preds = %90
%94 = load double*, double** %18
%95 = load double*, double** %17
%96 = load double*, double** %19
%97 = load double, double* %21
%98 = load double, double* %20
%99 = load double, double* %22
%100 = load double, double* %24
%101 = load double, double* %23
%102 = load double, double* %25
%103 = load double*, double** %28
%104 = load double*, double** %29
%105 = load double*, double** %30
%106 = load double*, double** %31
%107 = call i32 @isect2(double* %94, double* %95, double* %96, double %97, double %98, double %99, double %100, double %101, double %102, double* %103, double* %104, double* %105, double* %106)
br label %128
108: ; preds = %90
%109 = load double, double* %25
%110 = fcmp une double %109, 0.000000e+00
br i1 %110, label %111, label %126
111: ; preds = %108
%112 = load double*, double** %19
%113 = load double*, double** %17
%114 = load double*, double** %18
%115 = load double, double* %22
%116 = load double, double* %20
%117 = load double, double* %21
%118 = load double, double* %25
%119 = load double, double* %23
%120 = load double, double* %24
%121 = load double*, double** %28
%122 = load double*, double** %29
%123 = load double*, double** %30
%124 = load double*, double** %31
%125 = call i32 @isect2(double* %112, double* %113, double* %114, double %115, double %116, double %117, double %118, double %119, double %120, double* %121, double* %122, double* %123, double* %124)
br label %127
126: ; preds = %108
store i32 1, i32* %16
br label %132
127: ; preds = %111
br label %128
128: ; preds = %127, %93
br label %129
129: ; preds = %128, %75
br label %130
130: ; preds = %129, %52
br label %131
131: ; preds = %130, %34
store i32 0, i32* %16
br label %132
132: ; preds = %131, %126
%133 = load i32, i32* %16
ret i32 %133
}

LLVM IR (-O2):
define i32 @compute_intervals_isectline(double* %0, double* %1, double* %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double* %11, double* %12, double* %13, double* %14) {
%16 = fcmp ogt double %9, 0.000000e+00
br i1 %16, label %17, label %19
17: ; preds = %15
%18 = tail call i32 @isect2(double* %2, double* %0, double* %1, double %5, double %3, double %4, double %8, double %6, double %7, double* %11, double* %12, double* %13, double* %14)
br label %38
19: ; preds = %15
%20 = fcmp ogt double %10, 0.000000e+00
br i1 %20, label %21, label %23
21: ; preds = %19
%22 = tail call i32 @isect2(double* %1, double* %0, double* %2, double %4, double %3, double %5, double %7, double %6, double %8, double* %11, double* %12, double* %13, double* %14)
br label %38
23: ; preds = %19
%24 = fmul double %7, %8
%25 = fcmp ogt double %24, 0.000000e+00
%26 = fcmp une double %6, 0.000000e+00
%27 = or i1 %26, %25
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = tail call i32 @isect2(double* %0, double* %1, double* %2, double %3, double %4, double %5, double %6, double %7, double %8, double* %11, double* %12, double* %13, double* %14)
br label %38
30: ; preds = %23
%31 = fcmp une double %7, 0.000000e+00
br i1 %31, label %32, label %34
32: ; preds = %30
%33 = tail call i32 @isect2(double* %1, double* %0, double* %2, double %4, double %3, double %5, double %7, double %6, double %8, double* %11, double* %12, double* %13, double* %14)
br label %38
34: ; preds = %30
%35 = fcmp une double %8, 0.000000e+00
br i1 %35, label %36, label %38
36: ; preds = %34
%37 = tail call i32 @isect2(double* %2, double* %0, double* %1, double %5, double %3, double %4, double %8, double %6, double %7, double* %11, double* %12, double* %13, double* %14)
br label %38
38: ; preds = %17, %28, %36, %32, %21, %34
%39 = phi i32 [ 1, %34 ], [ 0, %21 ], [ 0, %32 ], [ 0, %36 ], [ 0, %28 ], [ 0, %17 ]
ret i32 %39
}