; LLVM IR from bohanwang/libpgo :: src/core/mesh/predicates.ll (ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef, double noundef) #2

declare noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca i1, align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  store i32 %0, ptr %9, align 4, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %23 = load ptr, ptr %12, align 8, !tbaa !9
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds double, ptr %23, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !11
  store double %27, ptr %16, align 8, !tbaa !11
  %28 = load ptr, ptr %10, align 8, !tbaa !9
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds double, ptr %28, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !11
  %33 = load double, ptr %16, align 8, !tbaa !11
  %34 = fcmp olt double %32, %33
  br i1 %34, label %35, label %44

35:                                               ; preds = %7
  %36 = load ptr, ptr %11, align 8, !tbaa !9
  %37 = load i32, ptr %9, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds double, ptr %36, i64 %38
  %40 = load double, ptr %39, align 8, !tbaa !11
  %41 = load double, ptr %16, align 8, !tbaa !11
  %42 = fcmp olt double %40, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %35
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %207

44:                                               ; preds = %35, %7
  %45 = load ptr, ptr %10, align 8, !tbaa !9
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %45, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !11
  %50 = load double, ptr %16, align 8, !tbaa !11
  %51 = fcmp ogt double %49, %50
  br i1 %51, label %52, label %61

52:                                               ; preds = %44
  %53 = load ptr, ptr %11, align 8, !tbaa !9
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds double, ptr %53, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !11
  %58 = load double, ptr %16, align 8, !tbaa !11
  %59 = fcmp ogt double %57, %58
  br i1 %59, label %60, label %61

60:                                               ; preds = %52
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %207

61:                                               ; preds = %52, %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %62 = load ptr, ptr %10, align 8, !tbaa !9
  %63 = load ptr, ptr %11, align 8, !tbaa !9
  %64 = load ptr, ptr %14, align 8, !tbaa !9
  %65 = load ptr, ptr %15, align 8, !tbaa !9
  %66 = call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef %62, ptr noundef %63, ptr noundef %64, ptr noundef %65)
  store double %66, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %67 = load ptr, ptr %10, align 8, !tbaa !9
  %68 = load ptr, ptr %11, align 8, !tbaa !9
  %69 = load ptr, ptr %15, align 8, !tbaa !9
  %70 = load ptr, ptr %12, align 8, !tbaa !9
  %71 = call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef %67, ptr noundef %68, ptr noundef %69, ptr noundef %70)
  store double %71, ptr %19, align 8, !tbaa !11
  %72 = load double, ptr %18, align 8, !tbaa !11
  %73 = load double, ptr %19, align 8, !tbaa !11
  %74 = call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %72, double noundef %73)
  br i1 %74, label %76, label %75

75:                                               ; preds = %61
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %206

76:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %77 = load ptr, ptr %10, align 8, !tbaa !9
  %78 = load ptr, ptr %11, align 8, !tbaa !9
  %79 = load ptr, ptr %12, align 8, !tbaa !9
  %80 = load ptr, ptr %13, align 8, !tbaa !9
  %81 = call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef %80)
  store double %81, ptr %20, align 8, !tbaa !11
  %82 = load double, ptr %18, align 8, !tbaa !11
  %83 = load double, ptr %20, align 8, !tbaa !11
  %84 = call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %82, double noundef %83)
  br i1 %84, label %86, label %85

85:                                               ; preds = %76
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %205

86:                                               ; preds = %76
  %87 = load double, ptr %19, align 8, !tbaa !11
  %88 = load double, ptr %20, align 8, !tbaa !11
  %89 = call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %87, double noundef %88)
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %205

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %92 = load ptr, ptr %10, align 8, !tbaa !9
  %93 = load ptr, ptr %11, align 8, !tbaa !9
  %94 = load ptr, ptr %13, align 8, !tbaa !9
  %95 = load ptr, ptr %14, align 8, !tbaa !9
  %96 = call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef %92, ptr noundef %93, ptr noundef %94, ptr noundef %95)
  store double %96, ptr %21, align 8, !tbaa !11
  %97 = load double, ptr %18, align 8, !tbaa !11
  %98 = load double, ptr %21, align 8, !tbaa !11
  %99 = call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %97, double noundef %98)
  br i1 %99, label %101, label %100

100:                                              ; preds = %91
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %204

101:                                              ; preds = %91
  %102 = load double, ptr %19, align 8, !tbaa !11
  %103 = load double, ptr %21, align 8, !tbaa !11
  %104 = call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %102, double noundef %103)
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %204

106:                                              ; preds = %101
  %107 = load double, ptr %20, align 8, !tbaa !11
  %108 = load double, ptr %21, align 8, !tbaa !11
  %109 = call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %107, double noundef %108)
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %204

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %112 = load double, ptr %18, align 8, !tbaa !11
  %113 = load double, ptr %19, align 8, !tbaa !11
  %114 = fadd double %112, %113
  %115 = load double, ptr %20, align 8, !tbaa !11
  %116 = fadd double %114, %115
  %117 = load double, ptr %21, align 8, !tbaa !11
  %118 = fadd double %116, %117
  store double %118, ptr %22, align 8, !tbaa !11
  %119 = load ptr, ptr %10, align 8, !tbaa !9
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !11
  %124 = load double, ptr %16, align 8, !tbaa !11
  %125 = fcmp une double %123, %124
  br i1 %125, label %134, label %126

126:                                              ; preds = %111
  %127 = load ptr, ptr %11, align 8, !tbaa !9
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %127, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !11
  %132 = load double, ptr %16, align 8, !tbaa !11
  %133 = fcmp une double %131, %132
  br i1 %133, label %134, label %138

134:                                              ; preds = %126, %111
  %135 = load double, ptr %22, align 8, !tbaa !11
  %136 = fcmp une double %135, 0.000000e+00
  br i1 %136, label %137, label %138

137:                                              ; preds = %134
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

138:                                              ; preds = %134, %126
  %139 = load ptr, ptr %10, align 8, !tbaa !9
  %140 = load ptr, ptr %12, align 8, !tbaa !9
  %141 = load ptr, ptr %13, align 8, !tbaa !9
  %142 = load ptr, ptr %14, align 8, !tbaa !9
  %143 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %146

145:                                              ; preds = %138
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

146:                                              ; preds = %138
  %147 = load ptr, ptr %10, align 8, !tbaa !9
  %148 = load ptr, ptr %12, align 8, !tbaa !9
  %149 = load ptr, ptr %14, align 8, !tbaa !9
  %150 = load ptr, ptr %15, align 8, !tbaa !9
  %151 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef %147, ptr noundef %148, ptr noundef %149, ptr noundef %150, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %146
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

154:                                              ; preds = %146
  %155 = load ptr, ptr %11, align 8, !tbaa !9
  %156 = load ptr, ptr %12, align 8, !tbaa !9
  %157 = load ptr, ptr %13, align 8, !tbaa !9
  %158 = load ptr, ptr %14, align 8, !tbaa !9
  %159 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef %155, ptr noundef %156, ptr noundef %157, ptr noundef %158, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %162

161:                                              ; preds = %154
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

162:                                              ; preds = %154
  %163 = load ptr, ptr %11, align 8, !tbaa !9
  %164 = load ptr, ptr %12, align 8, !tbaa !9
  %165 = load ptr, ptr %14, align 8, !tbaa !9
  %166 = load ptr, ptr %15, align 8, !tbaa !9
  %167 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef %163, ptr noundef %164, ptr noundef %165, ptr noundef %166, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %170

169:                                              ; preds = %162
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

170:                                              ; preds = %162
  %171 = load ptr, ptr %10, align 8, !tbaa !9
  %172 = load ptr, ptr %11, align 8, !tbaa !9
  %173 = load ptr, ptr %12, align 8, !tbaa !9
  %174 = load ptr, ptr %13, align 8, !tbaa !9
  %175 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %174, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %178

177:                                              ; preds = %170
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

178:                                              ; preds = %170
  %179 = load ptr, ptr %10, align 8, !tbaa !9
  %180 = load ptr, ptr %11, align 8, !tbaa !9
  %181 = load ptr, ptr %13, align 8, !tbaa !9
  %182 = load ptr, ptr %14, align 8, !tbaa !9
  %183 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef %179, ptr noundef %180, ptr noundef %181, ptr noundef %182, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %185, label %186

185:                                              ; preds = %178
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

186:                                              ; preds = %178
  %187 = load ptr, ptr %10, align 8, !tbaa !9
  %188 = load ptr, ptr %11, align 8, !tbaa !9
  %189 = load ptr, ptr %14, align 8, !tbaa !9
  %190 = load ptr, ptr %15, align 8, !tbaa !9
  %191 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef %187, ptr noundef %188, ptr noundef %189, ptr noundef %190, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %194

193:                                              ; preds = %186
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

194:                                              ; preds = %186
  %195 = load ptr, ptr %10, align 8, !tbaa !9
  %196 = load ptr, ptr %11, align 8, !tbaa !9
  %197 = load ptr, ptr %15, align 8, !tbaa !9
  %198 = load ptr, ptr %12, align 8, !tbaa !9
  %199 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef %195, ptr noundef %196, ptr noundef %197, ptr noundef %198, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef %21)
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %202

201:                                              ; preds = %194
  store i1 true, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

202:                                              ; preds = %194
  store i1 false, ptr %8, align 1
  store i32 1, ptr %17, align 4
  br label %203

203:                                              ; preds = %202, %201, %193, %185, %177, %169, %161, %153, %145, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  br label %204

204:                                              ; preds = %203, %110, %105, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %205

205:                                              ; preds = %204, %90, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %206

206:                                              ; preds = %205, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %207

207:                                              ; preds = %206, %60, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %208 = load i1, ptr %8, align 1
  ret i1 %208
}

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef, double noundef) local_unnamed_addr #2

declare noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3pgo4Mesh20intersectSegAABBFaceEiPKdS2_S2_S2_S2_S2_(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #0 {
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = sext i32 %0 to i64
  %13 = getelementptr inbounds double, ptr %3, i64 %12
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds double, ptr %1, i64 %12
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = fcmp olt double %16, %14
  br i1 %17, label %18, label %22

18:                                               ; preds = %7
  %19 = getelementptr inbounds double, ptr %2, i64 %12
  %20 = load double, ptr %19, align 8, !tbaa !5
  %21 = fcmp olt double %20, %14
  br i1 %21, label %75, label %22

22:                                               ; preds = %18, %7
  %23 = fcmp ogt double %16, %14
  br i1 %23, label %24, label %28

24:                                               ; preds = %22
  %25 = getelementptr inbounds double, ptr %2, i64 %12
  %26 = load double, ptr %25, align 8, !tbaa !5
  %27 = fcmp ogt double %26, %14
  br i1 %27, label %75, label %28

28:                                               ; preds = %24, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %29 = tail call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef %5, ptr noundef %6)
  store double %29, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %30 = tail call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef %6, ptr noundef nonnull %3)
  store double %30, ptr %9, align 8, !tbaa !5
  %31 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %29, double noundef %30)
  br i1 %31, label %32, label %74

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %33 = tail call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4)
  store double %33, ptr %10, align 8, !tbaa !5
  %34 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %29, double noundef %33)
  br i1 %34, label %35, label %73

35:                                               ; preds = %32
  %36 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %30, double noundef %33)
  br i1 %36, label %37, label %73

37:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %38 = tail call noundef double @_ZN3pgo4Mesh8orient3dEPKdS2_S2_S2_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef %4, ptr noundef %5)
  store double %38, ptr %11, align 8, !tbaa !5
  %39 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %29, double noundef %38)
  br i1 %39, label %40, label %72

40:                                               ; preds = %37
  %41 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %30, double noundef %38)
  br i1 %41, label %42, label %72

42:                                               ; preds = %40
  %43 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_19same_signEdd(double noundef %33, double noundef %38)
  br i1 %43, label %44, label %72

44:                                               ; preds = %42
  %45 = fadd double %29, %30
  %46 = fadd double %45, %33
  %47 = fadd double %46, %38
  %48 = load double, ptr %15, align 8, !tbaa !5
  %49 = fcmp une double %48, %14
  br i1 %49, label %55, label %50

50:                                               ; preds = %44
  %51 = getelementptr inbounds double, ptr %2, i64 %12
  %52 = load double, ptr %51, align 8, !tbaa !5
  %53 = fcmp une double %52, %14
  %54 = fcmp une double %47, 0.000000e+00
  %or.cond = and i1 %53, %54
  br i1 %or.cond, label %72, label %56

55:                                               ; preds = %44
  %.old1 = fcmp une double %47, 0.000000e+00
  br i1 %.old1, label %72, label %56

56:                                               ; preds = %55, %50
  %57 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef nonnull %1, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not = icmp eq i32 %57, 0
  br i1 %.not, label %58, label %72

58:                                               ; preds = %56
  %59 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef nonnull %1, ptr noundef nonnull %3, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not73 = icmp eq i32 %59, 0
  br i1 %.not73, label %60, label %72

60:                                               ; preds = %58
  %61 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not74 = icmp eq i32 %61, 0
  br i1 %.not74, label %62, label %72

62:                                               ; preds = %60
  %63 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not75 = icmp eq i32 %63, 0
  br i1 %.not75, label %64, label %72

64:                                               ; preds = %62
  %65 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef nonnull %1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not76 = icmp eq i32 %65, 0
  br i1 %.not76, label %66, label %72

66:                                               ; preds = %64
  %67 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not77 = icmp eq i32 %67, 0
  br i1 %.not77, label %68, label %72

68:                                               ; preds = %66
  %69 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not78 = icmp eq i32 %69, 0
  br i1 %.not78, label %70, label %72

70:                                               ; preds = %68
  %71 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef 2, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %6, ptr noundef nonnull %3, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %.not79 = icmp ne i32 %71, 0
  br label %72

72:                                               ; preds = %50, %55, %56, %58, %60, %62, %64, %66, %68, %70, %42, %40, %37
  %.1 = phi i1 [ false, %37 ], [ false, %40 ], [ false, %42 ], [ true, %50 ], [ true, %55 ], [ true, %56 ], [ true, %58 ], [ true, %60 ], [ true, %62 ], [ true, %64 ], [ true, %66 ], [ true, %68 ], [ %.not79, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br label %73

73:                                               ; preds = %35, %32, %72
  %.2 = phi i1 [ %.1, %72 ], [ false, %32 ], [ false, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %74

74:                                               ; preds = %28, %73
  %.3 = phi i1 [ %.2, %73 ], [ false, %28 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %75

75:                                               ; preds = %24, %18, %74
  %.4 = phi i1 [ %.3, %74 ], [ false, %18 ], [ false, %24 ]
  ret i1 %.4
}

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass