#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(float const *, float const *, float const *, float,
                          float, float, float, float, float, float *, float *,
                          float *, float *);
int compute_intervals_isectline(const float VERT0[3], const float VERT1[3],
                                const float VERT2[3], float VV0, float VV1,
                                float VV2, float D0, float D1, float D2,
                                float D0D1, float D0D2, float *isect0,
                                float *isect1, float isectpoint0[3],
                                float 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    $0x60,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movss  %xmm0,-0x24(%rbp)
movss  %xmm1,-0x28(%rbp)
movss  %xmm2,-0x2c(%rbp)
movss  %xmm3,-0x30(%rbp)
movss  %xmm4,-0x34(%rbp)
movss  %xmm5,-0x38(%rbp)
movss  %xmm6,-0x3c(%rbp)
movss  %xmm7,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
movss  -0x3c(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    11b5 <compute_intervals_isectline+0xa5>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movss  -0x2c(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movss  -0x28(%rbp),%xmm2
movss  -0x38(%rbp),%xmm3
movss  -0x30(%rbp),%xmm4
movss  -0x34(%rbp),%xmm5
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    1370 <compute_intervals_isectline+0x260>
movss  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    120e <compute_intervals_isectline+0xfe>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movss  -0x28(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movss  -0x2c(%rbp),%xmm2
movss  -0x34(%rbp),%xmm3
movss  -0x30(%rbp),%xmm4
movss  -0x38(%rbp),%xmm5
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    136b <compute_intervals_isectline+0x25b>
movss  -0x34(%rbp),%xmm0
mulss  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
ja     1240 <compute_intervals_isectline+0x130>
movss  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1240 <compute_intervals_isectline+0x130>
jp     1240 <compute_intervals_isectline+0x130>
jmp    1288 <compute_intervals_isectline+0x178>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
movss  -0x2c(%rbp),%xmm2
movss  -0x30(%rbp),%xmm3
movss  -0x34(%rbp),%xmm4
movss  -0x38(%rbp),%xmm5
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    1366 <compute_intervals_isectline+0x256>
movss  -0x34(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    12a4 <compute_intervals_isectline+0x194>
jp     12a4 <compute_intervals_isectline+0x194>
jmp    12ec <compute_intervals_isectline+0x1dc>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
movss  -0x28(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movss  -0x2c(%rbp),%xmm2
movss  -0x34(%rbp),%xmm3
movss  -0x30(%rbp),%xmm4
movss  -0x38(%rbp),%xmm5
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    1361 <compute_intervals_isectline+0x251>
movss  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1308 <compute_intervals_isectline+0x1f8>
jp     1308 <compute_intervals_isectline+0x1f8>
jmp    1350 <compute_intervals_isectline+0x240>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movss  -0x2c(%rbp),%xmm0
movss  -0x24(%rbp),%xmm1
movss  -0x28(%rbp),%xmm2
movss  -0x38(%rbp),%xmm3
movss  -0x30(%rbp),%xmm4
movss  -0x34(%rbp),%xmm5
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x10(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <isect2@plt>
jmp    135c <compute_intervals_isectline+0x24c>
movl   $0x1,-0x4(%rbp)
jmp    1377 <compute_intervals_isectline+0x267>
jmp    1361 <compute_intervals_isectline+0x251>
jmp    1366 <compute_intervals_isectline+0x256>
jmp    136b <compute_intervals_isectline+0x25b>
jmp    1370 <compute_intervals_isectline+0x260>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_intervals_isectline>:
push   %rax
movaps %xmm4,%xmm8
movaps %xmm3,%xmm4
movaps %xmm1,%xmm3
movaps %xmm0,%xmm1
mov    %rsi,%rax
mov    %rdi,%rsi
mov    0x10(%rsp),%rdi
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm6
jbe    114a <compute_intervals_isectline+0x3a>
mov    %rdi,(%rsp)
mov    %rdx,%rdi
mov    %rax,%rdx
movaps %xmm2,%xmm0
movaps %xmm3,%xmm2
movaps %xmm5,%xmm3
movaps %xmm8,%xmm5
jmp    1198 <compute_intervals_isectline+0x88>
ucomiss %xmm0,%xmm7
ja     1171 <compute_intervals_isectline+0x61>
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm4
jne    1181 <compute_intervals_isectline+0x71>
jp     1181 <compute_intervals_isectline+0x71>
movaps %xmm8,%xmm6
mulss  %xmm5,%xmm6
ucomiss %xmm0,%xmm6
ja     1181 <compute_intervals_isectline+0x71>
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm8
jne    1171 <compute_intervals_isectline+0x61>
jnp    11a1 <compute_intervals_isectline+0x91>
mov    %rdi,(%rsp)
mov    %rax,%rdi
movaps %xmm3,%xmm0
movaps %xmm8,%xmm3
jmp    1198 <compute_intervals_isectline+0x88>
mov    %rdi,(%rsp)
mov    %rsi,%rdi
mov    %rax,%rsi
movaps %xmm1,%xmm0
movaps %xmm3,%xmm1
movaps %xmm4,%xmm3
movaps %xmm8,%xmm4
call   1030 <isect2@plt>
xor    %eax,%eax
pop    %rcx
ret
ucomiss %xmm0,%xmm5
jne    1131 <compute_intervals_isectline+0x21>
jp     1131 <compute_intervals_isectline+0x21>
mov    $0x1,%eax
pop    %rcx
ret

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