; LLVM IR from bohanwang/libpgo :: src/core/mesh (intersection_tunicate)

; 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"

@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__._ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_ = external hidden unnamed_addr constant [147 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #1 {
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca [2 x double], align 16
  %30 = alloca [2 x double], align 16
  %31 = alloca [2 x double], align 16
  %32 = alloca [2 x double], align 16
  %33 = alloca double, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca double, align 8
  %37 = alloca double, align 8
  %38 = alloca double, align 8
  %39 = alloca double, align 8
  store i32 %0, ptr %11, align 4, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !9
  store ptr %2, ptr %13, align 8, !tbaa !9
  store ptr %3, ptr %14, align 8, !tbaa !9
  store ptr %4, ptr %15, align 8, !tbaa !9
  store ptr %5, ptr %16, align 8, !tbaa !9
  store ptr %6, ptr %17, align 8, !tbaa !9
  store ptr %7, ptr %18, align 8, !tbaa !9
  store ptr %8, ptr %19, align 8, !tbaa !9
  %40 = load i32, ptr %11, align 4, !tbaa !5
  %41 = icmp sle i32 %40, 2
  br i1 %41, label %42, label %43

42:                                               ; preds = %9
  br label %45

43:                                               ; preds = %9
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 244, ptr noundef @__PRETTY_FUNCTION__._ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_) #4
  unreachable

44:                                               ; No predecessors!
  br label %45

45:                                               ; preds = %44, %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = load ptr, ptr %12, align 8, !tbaa !9
  %48 = getelementptr inbounds double, ptr %47, i64 1
  %49 = load ptr, ptr %13, align 8, !tbaa !9
  %50 = getelementptr inbounds double, ptr %49, i64 1
  %51 = load ptr, ptr %14, align 8, !tbaa !9
  %52 = getelementptr inbounds double, ptr %51, i64 1
  %53 = load ptr, ptr %15, align 8, !tbaa !9
  %54 = getelementptr inbounds double, ptr %53, i64 1
  %55 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %46, ptr noundef %48, ptr noundef %50, ptr noundef %52, ptr noundef %54, ptr noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %58, label %57

57:                                               ; preds = %45
  store i32 0, ptr %10, align 4
  store i32 1, ptr %24, align 4
  br label %569

58:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #5
  %59 = load ptr, ptr %12, align 8, !tbaa !9
  %60 = getelementptr inbounds double, ptr %59, i64 0
  %61 = load double, ptr %60, align 8, !tbaa !11
  store double %61, ptr %29, align 8, !tbaa !11
  %62 = getelementptr inbounds double, ptr %29, i64 1
  %63 = load ptr, ptr %12, align 8, !tbaa !9
  %64 = getelementptr inbounds double, ptr %63, i64 2
  %65 = load double, ptr %64, align 8, !tbaa !11
  store double %65, ptr %62, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #5
  %66 = load ptr, ptr %13, align 8, !tbaa !9
  %67 = getelementptr inbounds double, ptr %66, i64 0
  %68 = load double, ptr %67, align 8, !tbaa !11
  store double %68, ptr %30, align 8, !tbaa !11
  %69 = getelementptr inbounds double, ptr %30, i64 1
  %70 = load ptr, ptr %13, align 8, !tbaa !9
  %71 = getelementptr inbounds double, ptr %70, i64 2
  %72 = load double, ptr %71, align 8, !tbaa !11
  store double %72, ptr %69, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #5
  %73 = load ptr, ptr %14, align 8, !tbaa !9
  %74 = getelementptr inbounds double, ptr %73, i64 0
  %75 = load double, ptr %74, align 8, !tbaa !11
  store double %75, ptr %31, align 8, !tbaa !11
  %76 = getelementptr inbounds double, ptr %31, i64 1
  %77 = load ptr, ptr %14, align 8, !tbaa !9
  %78 = getelementptr inbounds double, ptr %77, i64 2
  %79 = load double, ptr %78, align 8, !tbaa !11
  store double %79, ptr %76, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #5
  %80 = load ptr, ptr %15, align 8, !tbaa !9
  %81 = getelementptr inbounds double, ptr %80, i64 0
  %82 = load double, ptr %81, align 8, !tbaa !11
  store double %82, ptr %32, align 8, !tbaa !11
  %83 = getelementptr inbounds double, ptr %32, i64 1
  %84 = load ptr, ptr %15, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %84, i64 2
  %86 = load double, ptr %85, align 8, !tbaa !11
  store double %86, ptr %83, align 8, !tbaa !11
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = getelementptr inbounds [2 x double], ptr %29, i64 0, i64 0
  %89 = getelementptr inbounds [2 x double], ptr %30, i64 0, i64 0
  %90 = getelementptr inbounds [2 x double], ptr %31, i64 0, i64 0
  %91 = getelementptr inbounds [2 x double], ptr %32, i64 0, i64 0
  %92 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %87, ptr noundef %88, ptr noundef %89, ptr noundef %90, ptr noundef %91, ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %28)
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %95, label %94

94:                                               ; preds = %58
  store i32 0, ptr %10, align 4
  store i32 1, ptr %24, align 4
  br label %568

95:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #5
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = load ptr, ptr %12, align 8, !tbaa !9
  %98 = load ptr, ptr %13, align 8, !tbaa !9
  %99 = load ptr, ptr %14, align 8, !tbaa !9
  %100 = load ptr, ptr %15, align 8, !tbaa !9
  %101 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %96, ptr noundef %97, ptr noundef %98, ptr noundef %99, ptr noundef %100, ptr noundef %33, ptr noundef %34, ptr noundef %35, ptr noundef %36)
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %104, label %103

103:                                              ; preds = %95
  store i32 0, ptr %10, align 4
  store i32 1, ptr %24, align 4
  br label %567

104:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #5
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = icmp eq i32 %105, 1
  br i1 %106, label %107, label %312

107:                                              ; preds = %104
  %108 = load double, ptr %20, align 8, !tbaa !11
  %109 = fneg double %108
  %110 = load ptr, ptr %12, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %110, i64 0
  %112 = load double, ptr %111, align 8, !tbaa !11
  %113 = load double, ptr %21, align 8, !tbaa !11
  %114 = load ptr, ptr %13, align 8, !tbaa !9
  %115 = getelementptr inbounds double, ptr %114, i64 0
  %116 = load double, ptr %115, align 8, !tbaa !11
  %117 = fmul double %113, %116
  %118 = call double @llvm.fmuladd.f64(double %109, double %112, double %117)
  %119 = load double, ptr %22, align 8, !tbaa !11
  %120 = load ptr, ptr %14, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %120, i64 0
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = call double @llvm.fmuladd.f64(double %119, double %122, double %118)
  %124 = load double, ptr %23, align 8, !tbaa !11
  %125 = load ptr, ptr %15, align 8, !tbaa !9
  %126 = getelementptr inbounds double, ptr %125, i64 0
  %127 = load double, ptr %126, align 8, !tbaa !11
  %128 = call double @llvm.fmuladd.f64(double %124, double %127, double %123)
  %129 = call double @llvm.fabs.f64(double %128)
  %130 = load double, ptr %20, align 8, !tbaa !11
  %131 = fneg double %130
  %132 = load ptr, ptr %12, align 8, !tbaa !9
  %133 = getelementptr inbounds double, ptr %132, i64 1
  %134 = load double, ptr %133, align 8, !tbaa !11
  %135 = load double, ptr %21, align 8, !tbaa !11
  %136 = load ptr, ptr %13, align 8, !tbaa !9
  %137 = getelementptr inbounds double, ptr %136, i64 1
  %138 = load double, ptr %137, align 8, !tbaa !11
  %139 = fmul double %135, %138
  %140 = call double @llvm.fmuladd.f64(double %131, double %134, double %139)
  %141 = load double, ptr %22, align 8, !tbaa !11
  %142 = load ptr, ptr %14, align 8, !tbaa !9
  %143 = getelementptr inbounds double, ptr %142, i64 1
  %144 = load double, ptr %143, align 8, !tbaa !11
  %145 = call double @llvm.fmuladd.f64(double %141, double %144, double %140)
  %146 = load double, ptr %23, align 8, !tbaa !11
  %147 = load ptr, ptr %15, align 8, !tbaa !9
  %148 = getelementptr inbounds double, ptr %147, i64 1
  %149 = load double, ptr %148, align 8, !tbaa !11
  %150 = call double @llvm.fmuladd.f64(double %146, double %149, double %145)
  %151 = call double @llvm.fabs.f64(double %150)
  %152 = fadd double %129, %151
  %153 = load double, ptr %20, align 8, !tbaa !11
  %154 = fneg double %153
  %155 = load ptr, ptr %12, align 8, !tbaa !9
  %156 = getelementptr inbounds double, ptr %155, i64 2
  %157 = load double, ptr %156, align 8, !tbaa !11
  %158 = load double, ptr %21, align 8, !tbaa !11
  %159 = load ptr, ptr %13, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %159, i64 2
  %161 = load double, ptr %160, align 8, !tbaa !11
  %162 = fmul double %158, %161
  %163 = call double @llvm.fmuladd.f64(double %154, double %157, double %162)
  %164 = load double, ptr %22, align 8, !tbaa !11
  %165 = load ptr, ptr %14, align 8, !tbaa !9
  %166 = getelementptr inbounds double, ptr %165, i64 2
  %167 = load double, ptr %166, align 8, !tbaa !11
  %168 = call double @llvm.fmuladd.f64(double %164, double %167, double %163)
  %169 = load double, ptr %23, align 8, !tbaa !11
  %170 = load ptr, ptr %15, align 8, !tbaa !9
  %171 = getelementptr inbounds double, ptr %170, i64 2
  %172 = load double, ptr %171, align 8, !tbaa !11
  %173 = call double @llvm.fmuladd.f64(double %169, double %172, double %168)
  %174 = call double @llvm.fabs.f64(double %173)
  %175 = fadd double %152, %174
  store double %175, ptr %37, align 8, !tbaa !11
  %176 = load double, ptr %25, align 8, !tbaa !11
  %177 = fneg double %176
  %178 = load ptr, ptr %12, align 8, !tbaa !9
  %179 = getelementptr inbounds double, ptr %178, i64 0
  %180 = load double, ptr %179, align 8, !tbaa !11
  %181 = load double, ptr %26, align 8, !tbaa !11
  %182 = load ptr, ptr %13, align 8, !tbaa !9
  %183 = getelementptr inbounds double, ptr %182, i64 0
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = fmul double %181, %184
  %186 = call double @llvm.fmuladd.f64(double %177, double %180, double %185)
  %187 = load double, ptr %27, align 8, !tbaa !11
  %188 = load ptr, ptr %14, align 8, !tbaa !9
  %189 = getelementptr inbounds double, ptr %188, i64 0
  %190 = load double, ptr %189, align 8, !tbaa !11
  %191 = call double @llvm.fmuladd.f64(double %187, double %190, double %186)
  %192 = load double, ptr %28, align 8, !tbaa !11
  %193 = load ptr, ptr %15, align 8, !tbaa !9
  %194 = getelementptr inbounds double, ptr %193, i64 0
  %195 = load double, ptr %194, align 8, !tbaa !11
  %196 = call double @llvm.fmuladd.f64(double %192, double %195, double %191)
  %197 = call double @llvm.fabs.f64(double %196)
  %198 = load double, ptr %25, align 8, !tbaa !11
  %199 = fneg double %198
  %200 = load ptr, ptr %12, align 8, !tbaa !9
  %201 = getelementptr inbounds double, ptr %200, i64 1
  %202 = load double, ptr %201, align 8, !tbaa !11
  %203 = load double, ptr %26, align 8, !tbaa !11
  %204 = load ptr, ptr %13, align 8, !tbaa !9
  %205 = getelementptr inbounds double, ptr %204, i64 1
  %206 = load double, ptr %205, align 8, !tbaa !11
  %207 = fmul double %203, %206
  %208 = call double @llvm.fmuladd.f64(double %199, double %202, double %207)
  %209 = load double, ptr %27, align 8, !tbaa !11
  %210 = load ptr, ptr %14, align 8, !tbaa !9
  %211 = getelementptr inbounds double, ptr %210, i64 1
  %212 = load double, ptr %211, align 8, !tbaa !11
  %213 = call double @llvm.fmuladd.f64(double %209, double %212, double %208)
  %214 = load double, ptr %28, align 8, !tbaa !11
  %215 = load ptr, ptr %15, align 8, !tbaa !9
  %216 = getelementptr inbounds double, ptr %215, i64 1
  %217 = load double, ptr %216, align 8, !tbaa !11
  %218 = call double @llvm.fmuladd.f64(double %214, double %217, double %213)
  %219 = call double @llvm.fabs.f64(double %218)
  %220 = fadd double %197, %219
  %221 = load double, ptr %25, align 8, !tbaa !11
  %222 = fneg double %221
  %223 = load ptr, ptr %12, align 8, !tbaa !9
  %224 = getelementptr inbounds double, ptr %223, i64 2
  %225 = load double, ptr %224, align 8, !tbaa !11
  %226 = load double, ptr %26, align 8, !tbaa !11
  %227 = load ptr, ptr %13, align 8, !tbaa !9
  %228 = getelementptr inbounds double, ptr %227, i64 2
  %229 = load double, ptr %228, align 8, !tbaa !11
  %230 = fmul double %226, %229
  %231 = call double @llvm.fmuladd.f64(double %222, double %225, double %230)
  %232 = load double, ptr %27, align 8, !tbaa !11
  %233 = load ptr, ptr %14, align 8, !tbaa !9
  %234 = getelementptr inbounds double, ptr %233, i64 2
  %235 = load double, ptr %234, align 8, !tbaa !11
  %236 = call double @llvm.fmuladd.f64(double %232, double %235, double %231)
  %237 = load double, ptr %28, align 8, !tbaa !11
  %238 = load ptr, ptr %15, align 8, !tbaa !9
  %239 = getelementptr inbounds double, ptr %238, i64 2
  %240 = load double, ptr %239, align 8, !tbaa !11
  %241 = call double @llvm.fmuladd.f64(double %237, double %240, double %236)
  %242 = call double @llvm.fabs.f64(double %241)
  %243 = fadd double %220, %242
  store double %243, ptr %38, align 8, !tbaa !11
  %244 = load double, ptr %33, align 8, !tbaa !11
  %245 = fneg double %244
  %246 = load ptr, ptr %12, align 8, !tbaa !9
  %247 = getelementptr inbounds double, ptr %246, i64 0
  %248 = load double, ptr %247, align 8, !tbaa !11
  %249 = load double, ptr %34, align 8, !tbaa !11
  %250 = load ptr, ptr %13, align 8, !tbaa !9
  %251 = getelementptr inbounds double, ptr %250, i64 0
  %252 = load double, ptr %251, align 8, !tbaa !11
  %253 = fmul double %249, %252
  %254 = call double @llvm.fmuladd.f64(double %245, double %248, double %253)
  %255 = load double, ptr %35, align 8, !tbaa !11
  %256 = load ptr, ptr %14, align 8, !tbaa !9
  %257 = getelementptr inbounds double, ptr %256, i64 0
  %258 = load double, ptr %257, align 8, !tbaa !11
  %259 = call double @llvm.fmuladd.f64(double %255, double %258, double %254)
  %260 = load double, ptr %36, align 8, !tbaa !11
  %261 = load ptr, ptr %15, align 8, !tbaa !9
  %262 = getelementptr inbounds double, ptr %261, i64 0
  %263 = load double, ptr %262, align 8, !tbaa !11
  %264 = call double @llvm.fmuladd.f64(double %260, double %263, double %259)
  %265 = call double @llvm.fabs.f64(double %264)
  %266 = load double, ptr %33, align 8, !tbaa !11
  %267 = fneg double %266
  %268 = load ptr, ptr %12, align 8, !tbaa !9
  %269 = getelementptr inbounds double, ptr %268, i64 1
  %270 = load double, ptr %269, align 8, !tbaa !11
  %271 = load double, ptr %34, align 8, !tbaa !11
  %272 = load ptr, ptr %13, align 8, !tbaa !9
  %273 = getelementptr inbounds double, ptr %272, i64 1
  %274 = load double, ptr %273, align 8, !tbaa !11
  %275 = fmul double %271, %274
  %276 = call double @llvm.fmuladd.f64(double %267, double %270, double %275)
  %277 = load double, ptr %35, align 8, !tbaa !11
  %278 = load ptr, ptr %14, align 8, !tbaa !9
  %279 = getelementptr inbounds double, ptr %278, i64 1
  %280 = load double, ptr %279, align 8, !tbaa !11
  %281 = call double @llvm.fmuladd.f64(double %277, double %280, double %276)
  %282 = load double, ptr %36, align 8, !tbaa !11
  %283 = load ptr, ptr %15, align 8, !tbaa !9
  %284 = getelementptr inbounds double, ptr %283, i64 1
  %285 = load double, ptr %284, align 8, !tbaa !11
  %286 = call double @llvm.fmuladd.f64(double %282, double %285, double %281)
  %287 = call double @llvm.fabs.f64(double %286)
  %288 = fadd double %265, %287
  %289 = load double, ptr %33, align 8, !tbaa !11
  %290 = fneg double %289
  %291 = load ptr, ptr %12, align 8, !tbaa !9
  %292 = getelementptr inbounds double, ptr %291, i64 2
  %293 = load double, ptr %292, align 8, !tbaa !11
  %294 = load double, ptr %34, align 8, !tbaa !11
  %295 = load ptr, ptr %13, align 8, !tbaa !9
  %296 = getelementptr inbounds double, ptr %295, i64 2
  %297 = load double, ptr %296, align 8, !tbaa !11
  %298 = fmul double %294, %297
  %299 = call double @llvm.fmuladd.f64(double %290, double %293, double %298)
  %300 = load double, ptr %35, align 8, !tbaa !11
  %301 = load ptr, ptr %14, align 8, !tbaa !9
  %302 = getelementptr inbounds double, ptr %301, i64 2
  %303 = load double, ptr %302, align 8, !tbaa !11
  %304 = call double @llvm.fmuladd.f64(double %300, double %303, double %299)
  %305 = load double, ptr %36, align 8, !tbaa !11
  %306 = load ptr, ptr %15, align 8, !tbaa !9
  %307 = getelementptr inbounds double, ptr %306, i64 2
  %308 = load double, ptr %307, align 8, !tbaa !11
  %309 = call double @llvm.fmuladd.f64(double %305, double %308, double %304)
  %310 = call double @llvm.fabs.f64(double %309)
  %311 = fadd double %288, %310
  store double %311, ptr %39, align 8, !tbaa !11
  br label %526

312:                                              ; preds = %104
  %313 = load double, ptr %20, align 8, !tbaa !11
  %314 = fneg double %313
  %315 = load ptr, ptr %12, align 8, !tbaa !9
  %316 = getelementptr inbounds double, ptr %315, i64 0
  %317 = load double, ptr %316, align 8, !tbaa !11
  %318 = load double, ptr %21, align 8, !tbaa !11
  %319 = load ptr, ptr %13, align 8, !tbaa !9
  %320 = getelementptr inbounds double, ptr %319, i64 0
  %321 = load double, ptr %320, align 8, !tbaa !11
  %322 = fmul double %318, %321
  %323 = fneg double %322
  %324 = call double @llvm.fmuladd.f64(double %314, double %317, double %323)
  %325 = load double, ptr %22, align 8, !tbaa !11
  %326 = load ptr, ptr %14, align 8, !tbaa !9
  %327 = getelementptr inbounds double, ptr %326, i64 0
  %328 = load double, ptr %327, align 8, !tbaa !11
  %329 = call double @llvm.fmuladd.f64(double %325, double %328, double %324)
  %330 = load double, ptr %23, align 8, !tbaa !11
  %331 = load ptr, ptr %15, align 8, !tbaa !9
  %332 = getelementptr inbounds double, ptr %331, i64 0
  %333 = load double, ptr %332, align 8, !tbaa !11
  %334 = call double @llvm.fmuladd.f64(double %330, double %333, double %329)
  %335 = call double @llvm.fabs.f64(double %334)
  %336 = load double, ptr %20, align 8, !tbaa !11
  %337 = fneg double %336
  %338 = load ptr, ptr %12, align 8, !tbaa !9
  %339 = getelementptr inbounds double, ptr %338, i64 1
  %340 = load double, ptr %339, align 8, !tbaa !11
  %341 = load double, ptr %21, align 8, !tbaa !11
  %342 = load ptr, ptr %13, align 8, !tbaa !9
  %343 = getelementptr inbounds double, ptr %342, i64 1
  %344 = load double, ptr %343, align 8, !tbaa !11
  %345 = fmul double %341, %344
  %346 = fneg double %345
  %347 = call double @llvm.fmuladd.f64(double %337, double %340, double %346)
  %348 = load double, ptr %22, align 8, !tbaa !11
  %349 = load ptr, ptr %14, align 8, !tbaa !9
  %350 = getelementptr inbounds double, ptr %349, i64 1
  %351 = load double, ptr %350, align 8, !tbaa !11
  %352 = call double @llvm.fmuladd.f64(double %348, double %351, double %347)
  %353 = load double, ptr %23, align 8, !tbaa !11
  %354 = load ptr, ptr %15, align 8, !tbaa !9
  %355 = getelementptr inbounds double, ptr %354, i64 1
  %356 = load double, ptr %355, align 8, !tbaa !11
  %357 = call double @llvm.fmuladd.f64(double %353, double %356, double %352)
  %358 = call double @llvm.fabs.f64(double %357)
  %359 = fadd double %335, %358
  %360 = load double, ptr %20, align 8, !tbaa !11
  %361 = fneg double %360
  %362 = load ptr, ptr %12, align 8, !tbaa !9
  %363 = getelementptr inbounds double, ptr %362, i64 2
  %364 = load double, ptr %363, align 8, !tbaa !11
  %365 = load double, ptr %21, align 8, !tbaa !11
  %366 = load ptr, ptr %13, align 8, !tbaa !9
  %367 = getelementptr inbounds double, ptr %366, i64 2
  %368 = load double, ptr %367, align 8, !tbaa !11
  %369 = fmul double %365, %368
  %370 = fneg double %369
  %371 = call double @llvm.fmuladd.f64(double %361, double %364, double %370)
  %372 = load double, ptr %22, align 8, !tbaa !11
  %373 = load ptr, ptr %14, align 8, !tbaa !9
  %374 = getelementptr inbounds double, ptr %373, i64 2
  %375 = load double, ptr %374, align 8, !tbaa !11
  %376 = call double @llvm.fmuladd.f64(double %372, double %375, double %371)
  %377 = load double, ptr %23, align 8, !tbaa !11
  %378 = load ptr, ptr %15, align 8, !tbaa !9
  %379 = getelementptr inbounds double, ptr %378, i64 2
  %380 = load double, ptr %379, align 8, !tbaa !11
  %381 = call double @llvm.fmuladd.f64(double %377, double %380, double %376)
  %382 = call double @llvm.fabs.f64(double %381)
  %383 = fadd double %359, %382
  store double %383, ptr %37, align 8, !tbaa !11
  %384 = load double, ptr %25, align 8, !tbaa !11
  %385 = fneg double %384
  %386 = load ptr, ptr %12, align 8, !tbaa !9
  %387 = getelementptr inbounds double, ptr %386, i64 0
  %388 = load double, ptr %387, align 8, !tbaa !11
  %389 = load double, ptr %26, align 8, !tbaa !11
  %390 = load ptr, ptr %13, align 8, !tbaa !9
  %391 = getelementptr inbounds double, ptr %390, i64 0
  %392 = load double, ptr %391, align 8, !tbaa !11
  %393 = fmul double %389, %392
  %394 = fneg double %393
  %395 = call double @llvm.fmuladd.f64(double %385, double %388, double %394)
  %396 = load double, ptr %27, align 8, !tbaa !11
  %397 = load ptr, ptr %14, align 8, !tbaa !9
  %398 = getelementptr inbounds double, ptr %397, i64 0
  %399 = load double, ptr %398, align 8, !tbaa !11
  %400 = call double @llvm.fmuladd.f64(double %396, double %399, double %395)
  %401 = load double, ptr %28, align 8, !tbaa !11
  %402 = load ptr, ptr %15, align 8, !tbaa !9
  %403 = getelementptr inbounds double, ptr %402, i64 0
  %404 = load double, ptr %403, align 8, !tbaa !11
  %405 = call double @llvm.fmuladd.f64(double %401, double %404, double %400)
  %406 = call double @llvm.fabs.f64(double %405)
  %407 = load double, ptr %25, align 8, !tbaa !11
  %408 = fneg double %407
  %409 = load ptr, ptr %12, align 8, !tbaa !9
  %410 = getelementptr inbounds double, ptr %409, i64 1
  %411 = load double, ptr %410, align 8, !tbaa !11
  %412 = load double, ptr %26, align 8, !tbaa !11
  %413 = load ptr, ptr %13, align 8, !tbaa !9
  %414 = getelementptr inbounds double, ptr %413, i64 1
  %415 = load double, ptr %414, align 8, !tbaa !11
  %416 = fmul double %412, %415
  %417 = fneg double %416
  %418 = call double @llvm.fmuladd.f64(double %408, double %411, double %417)
  %419 = load double, ptr %27, align 8, !tbaa !11
  %420 = load ptr, ptr %14, align 8, !tbaa !9
  %421 = getelementptr inbounds double, ptr %420, i64 1
  %422 = load double, ptr %421, align 8, !tbaa !11
  %423 = call double @llvm.fmuladd.f64(double %419, double %422, double %418)
  %424 = load double, ptr %28, align 8, !tbaa !11
  %425 = load ptr, ptr %15, align 8, !tbaa !9
  %426 = getelementptr inbounds double, ptr %425, i64 1
  %427 = load double, ptr %426, align 8, !tbaa !11
  %428 = call double @llvm.fmuladd.f64(double %424, double %427, double %423)
  %429 = call double @llvm.fabs.f64(double %428)
  %430 = fadd double %406, %429
  %431 = load double, ptr %25, align 8, !tbaa !11
  %432 = fneg double %431
  %433 = load ptr, ptr %12, align 8, !tbaa !9
  %434 = getelementptr inbounds double, ptr %433, i64 2
  %435 = load double, ptr %434, align 8, !tbaa !11
  %436 = load double, ptr %26, align 8, !tbaa !11
  %437 = load ptr, ptr %13, align 8, !tbaa !9
  %438 = getelementptr inbounds double, ptr %437, i64 2
  %439 = load double, ptr %438, align 8, !tbaa !11
  %440 = fmul double %436, %439
  %441 = fneg double %440
  %442 = call double @llvm.fmuladd.f64(double %432, double %435, double %441)
  %443 = load double, ptr %27, align 8, !tbaa !11
  %444 = load ptr, ptr %14, align 8, !tbaa !9
  %445 = getelementptr inbounds double, ptr %444, i64 2
  %446 = load double, ptr %445, align 8, !tbaa !11
  %447 = call double @llvm.fmuladd.f64(double %443, double %446, double %442)
  %448 = load double, ptr %28, align 8, !tbaa !11
  %449 = load ptr, ptr %15, align 8, !tbaa !9
  %450 = getelementptr inbounds double, ptr %449, i64 2
  %451 = load double, ptr %450, align 8, !tbaa !11
  %452 = call double @llvm.fmuladd.f64(double %448, double %451, double %447)
  %453 = call double @llvm.fabs.f64(double %452)
  %454 = fadd double %430, %453
  store double %454, ptr %38, align 8, !tbaa !11
  %455 = load double, ptr %33, align 8, !tbaa !11
  %456 = fneg double %455
  %457 = load ptr, ptr %12, align 8, !tbaa !9
  %458 = getelementptr inbounds double, ptr %457, i64 0
  %459 = load double, ptr %458, align 8, !tbaa !11
  %460 = load double, ptr %34, align 8, !tbaa !11
  %461 = load ptr, ptr %13, align 8, !tbaa !9
  %462 = getelementptr inbounds double, ptr %461, i64 0
  %463 = load double, ptr %462, align 8, !tbaa !11
  %464 = fmul double %460, %463
  %465 = fneg double %464
  %466 = call double @llvm.fmuladd.f64(double %456, double %459, double %465)
  %467 = load double, ptr %35, align 8, !tbaa !11
  %468 = load ptr, ptr %14, align 8, !tbaa !9
  %469 = getelementptr inbounds double, ptr %468, i64 0
  %470 = load double, ptr %469, align 8, !tbaa !11
  %471 = call double @llvm.fmuladd.f64(double %467, double %470, double %466)
  %472 = load double, ptr %36, align 8, !tbaa !11
  %473 = load ptr, ptr %15, align 8, !tbaa !9
  %474 = getelementptr inbounds double, ptr %473, i64 0
  %475 = load double, ptr %474, align 8, !tbaa !11
  %476 = call double @llvm.fmuladd.f64(double %472, double %475, double %471)
  %477 = call double @llvm.fabs.f64(double %476)
  %478 = load double, ptr %33, align 8, !tbaa !11
  %479 = fneg double %478
  %480 = load ptr, ptr %12, align 8, !tbaa !9
  %481 = getelementptr inbounds double, ptr %480, i64 1
  %482 = load double, ptr %481, align 8, !tbaa !11
  %483 = load double, ptr %34, align 8, !tbaa !11
  %484 = load ptr, ptr %13, align 8, !tbaa !9
  %485 = getelementptr inbounds double, ptr %484, i64 1
  %486 = load double, ptr %485, align 8, !tbaa !11
  %487 = fmul double %483, %486
  %488 = fneg double %487
  %489 = call double @llvm.fmuladd.f64(double %479, double %482, double %488)
  %490 = load double, ptr %35, align 8, !tbaa !11
  %491 = load ptr, ptr %14, align 8, !tbaa !9
  %492 = getelementptr inbounds double, ptr %491, i64 1
  %493 = load double, ptr %492, align 8, !tbaa !11
  %494 = call double @llvm.fmuladd.f64(double %490, double %493, double %489)
  %495 = load double, ptr %36, align 8, !tbaa !11
  %496 = load ptr, ptr %15, align 8, !tbaa !9
  %497 = getelementptr inbounds double, ptr %496, i64 1
  %498 = load double, ptr %497, align 8, !tbaa !11
  %499 = call double @llvm.fmuladd.f64(double %495, double %498, double %494)
  %500 = call double @llvm.fabs.f64(double %499)
  %501 = fadd double %477, %500
  %502 = load double, ptr %33, align 8, !tbaa !11
  %503 = fneg double %502
  %504 = load ptr, ptr %12, align 8, !tbaa !9
  %505 = getelementptr inbounds double, ptr %504, i64 2
  %506 = load double, ptr %505, align 8, !tbaa !11
  %507 = load double, ptr %34, align 8, !tbaa !11
  %508 = load ptr, ptr %13, align 8, !tbaa !9
  %509 = getelementptr inbounds double, ptr %508, i64 2
  %510 = load double, ptr %509, align 8, !tbaa !11
  %511 = fmul double %507, %510
  %512 = fneg double %511
  %513 = call double @llvm.fmuladd.f64(double %503, double %506, double %512)
  %514 = load double, ptr %35, align 8, !tbaa !11
  %515 = load ptr, ptr %14, align 8, !tbaa !9
  %516 = getelementptr inbounds double, ptr %515, i64 2
  %517 = load double, ptr %516, align 8, !tbaa !11
  %518 = call double @llvm.fmuladd.f64(double %514, double %517, double %513)
  %519 = load double, ptr %36, align 8, !tbaa !11
  %520 = load ptr, ptr %15, align 8, !tbaa !9
  %521 = getelementptr inbounds double, ptr %520, i64 2
  %522 = load double, ptr %521, align 8, !tbaa !11
  %523 = call double @llvm.fmuladd.f64(double %519, double %522, double %518)
  %524 = call double @llvm.fabs.f64(double %523)
  %525 = fadd double %501, %524
  store double %525, ptr %39, align 8, !tbaa !11
  br label %526

526:                                              ; preds = %312, %107
  %527 = load double, ptr %37, align 8, !tbaa !11
  %528 = load double, ptr %38, align 8, !tbaa !11
  %529 = fcmp ole double %527, %528
  br i1 %529, label %530, label %543

530:                                              ; preds = %526
  %531 = load double, ptr %37, align 8, !tbaa !11
  %532 = load double, ptr %39, align 8, !tbaa !11
  %533 = fcmp ole double %531, %532
  br i1 %533, label %534, label %543

534:                                              ; preds = %530
  %535 = load double, ptr %20, align 8, !tbaa !11
  %536 = load ptr, ptr %16, align 8, !tbaa !9
  store double %535, ptr %536, align 8, !tbaa !11
  %537 = load double, ptr %21, align 8, !tbaa !11
  %538 = load ptr, ptr %17, align 8, !tbaa !9
  store double %537, ptr %538, align 8, !tbaa !11
  %539 = load double, ptr %22, align 8, !tbaa !11
  %540 = load ptr, ptr %18, align 8, !tbaa !9
  store double %539, ptr %540, align 8, !tbaa !11
  %541 = load double, ptr %23, align 8, !tbaa !11
  %542 = load ptr, ptr %18, align 8, !tbaa !9
  store double %541, ptr %542, align 8, !tbaa !11
  br label %566

543:                                              ; preds = %530, %526
  %544 = load double, ptr %38, align 8, !tbaa !11
  %545 = load double, ptr %39, align 8, !tbaa !11
  %546 = fcmp ole double %544, %545
  br i1 %546, label %547, label %556

547:                                              ; preds = %543
  %548 = load double, ptr %25, align 8, !tbaa !11
  %549 = load ptr, ptr %16, align 8, !tbaa !9
  store double %548, ptr %549, align 8, !tbaa !11
  %550 = load double, ptr %26, align 8, !tbaa !11
  %551 = load ptr, ptr %17, align 8, !tbaa !9
  store double %550, ptr %551, align 8, !tbaa !11
  %552 = load double, ptr %27, align 8, !tbaa !11
  %553 = load ptr, ptr %18, align 8, !tbaa !9
  store double %552, ptr %553, align 8, !tbaa !11
  %554 = load double, ptr %28, align 8, !tbaa !11
  %555 = load ptr, ptr %18, align 8, !tbaa !9
  store double %554, ptr %555, align 8, !tbaa !11
  br label %565

556:                                              ; preds = %543
  %557 = load double, ptr %33, align 8, !tbaa !11
  %558 = load ptr, ptr %16, align 8, !tbaa !9
  store double %557, ptr %558, align 8, !tbaa !11
  %559 = load double, ptr %34, align 8, !tbaa !11
  %560 = load ptr, ptr %17, align 8, !tbaa !9
  store double %559, ptr %560, align 8, !tbaa !11
  %561 = load double, ptr %35, align 8, !tbaa !11
  %562 = load ptr, ptr %18, align 8, !tbaa !9
  store double %561, ptr %562, align 8, !tbaa !11
  %563 = load double, ptr %36, align 8, !tbaa !11
  %564 = load ptr, ptr %18, align 8, !tbaa !9
  store double %563, ptr %564, align 8, !tbaa !11
  br label %565

565:                                              ; preds = %556, %547
  br label %566

566:                                              ; preds = %565, %534
  store i32 1, ptr %10, align 4
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #5
  br label %567

567:                                              ; preds = %566, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #5
  br label %568

568:                                              ; preds = %567, %94
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %569

569:                                              ; preds = %568, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %570 = load i32, ptr %10, align 4
  ret i32 %570
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #3

attributes #0 = { noreturn nounwind "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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { noreturn nounwind }
attributes #5 = { 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"

@.str.1 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@__PRETTY_FUNCTION__._ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_ = external hidden unnamed_addr constant [147 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_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 #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6, ptr nocapture noundef writeonly %7, ptr nocapture noundef readnone %8) local_unnamed_addr #1 {
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca [2 x double], align 16
  %19 = alloca [2 x double], align 16
  %20 = alloca [2 x double], align 16
  %21 = alloca [2 x double], align 16
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = icmp slt i32 %0, 3
  br i1 %26, label %28, label %27

27:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 244, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3pgo4Mesh22simplex_intersection3dEiPKdS2_S2_S2_PdS3_S3_S3_) #5
  unreachable

28:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %29 = getelementptr inbounds i8, ptr %1, i64 8
  %30 = getelementptr inbounds i8, ptr %2, i64 8
  %31 = getelementptr inbounds i8, ptr %3, i64 8
  %32 = getelementptr inbounds i8, ptr %4, i64 8
  %33 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %0, ptr noundef nonnull %29, ptr noundef nonnull %30, ptr noundef nonnull %31, ptr noundef nonnull %32, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %264, label %34

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #6
  %35 = load double, ptr %1, align 8, !tbaa !5
  store double %35, ptr %18, align 16, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %18, i64 8
  %37 = getelementptr inbounds i8, ptr %1, i64 16
  %38 = load double, ptr %37, align 8, !tbaa !5
  store double %38, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #6
  %39 = load double, ptr %2, align 8, !tbaa !5
  store double %39, ptr %19, align 16, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %19, i64 8
  %41 = getelementptr inbounds i8, ptr %2, i64 16
  %42 = load double, ptr %41, align 8, !tbaa !5
  store double %42, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #6
  %43 = load double, ptr %3, align 8, !tbaa !5
  store double %43, ptr %20, align 16, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %20, i64 8
  %45 = getelementptr inbounds i8, ptr %3, i64 16
  %46 = load double, ptr %45, align 8, !tbaa !5
  store double %46, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #6
  %47 = load double, ptr %4, align 8, !tbaa !5
  store double %47, ptr %21, align 16, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %21, i64 8
  %49 = getelementptr inbounds i8, ptr %4, i64 16
  %50 = load double, ptr %49, align 8, !tbaa !5
  store double %50, ptr %48, align 8, !tbaa !5
  %51 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %0, ptr noundef nonnull %18, ptr noundef nonnull %19, ptr noundef nonnull %20, ptr noundef nonnull %21, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17)
  %.not115 = icmp eq i32 %51, 0
  br i1 %.not115, label %263, label %52

52:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #6
  %53 = call noundef i32 @_ZN3pgo4Mesh22simplex_intersection2dEiPKdS2_S2_S2_PdS3_S3_S3_(i32 noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %22, ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25)
  %.not116 = icmp eq i32 %53, 0
  br i1 %.not116, label %262, label %54

54:                                               ; preds = %52
  %55 = icmp eq i32 %0, 1
  %56 = load double, ptr %10, align 8, !tbaa !5
  %57 = fneg double %56
  %58 = load double, ptr %1, align 8, !tbaa !5
  %59 = load double, ptr %11, align 8, !tbaa !5
  %60 = load double, ptr %2, align 8, !tbaa !5
  br i1 %55, label %61, label %152

61:                                               ; preds = %54
  %62 = load double, ptr %12, align 8, !tbaa !5
  %63 = load double, ptr %3, align 8, !tbaa !5
  %64 = load double, ptr %13, align 8, !tbaa !5
  %65 = load double, ptr %4, align 8, !tbaa !5
  %66 = load double, ptr %14, align 8, !tbaa !5
  %67 = fneg double %66
  %68 = load double, ptr %15, align 8, !tbaa !5
  %69 = load double, ptr %16, align 8, !tbaa !5
  %70 = load double, ptr %17, align 8, !tbaa !5
  %71 = load double, ptr %22, align 8, !tbaa !5
  %72 = fneg double %71
  %73 = load double, ptr %23, align 8, !tbaa !5
  %74 = fmul double %60, %73
  %75 = call double @llvm.fmuladd.f64(double %72, double %58, double %74)
  %76 = load double, ptr %24, align 8, !tbaa !5
  %77 = call double @llvm.fmuladd.f64(double %76, double %63, double %75)
  %78 = load double, ptr %25, align 8, !tbaa !5
  %79 = call double @llvm.fmuladd.f64(double %78, double %65, double %77)
  %80 = call double @llvm.fabs.f64(double %79)
  %81 = load <2 x double>, ptr %30, align 8, !tbaa !5
  %82 = load <2 x double>, ptr %29, align 8, !tbaa !5
  %83 = load <2 x double>, ptr %31, align 8, !tbaa !5
  %84 = load <2 x double>, ptr %32, align 8, !tbaa !5
  %85 = insertelement <2 x double> poison, double %59, i64 0
  %86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
  %87 = shufflevector <2 x double> %81, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %88 = insertelement <2 x double> %87, double %60, i64 0
  %89 = fmul <2 x double> %86, %88
  %90 = insertelement <2 x double> poison, double %57, i64 0
  %91 = shufflevector <2 x double> %90, <2 x double> poison, <2 x i32> zeroinitializer
  %92 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %93 = insertelement <2 x double> %92, double %58, i64 0
  %94 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %91, <2 x double> %93, <2 x double> %89)
  %95 = insertelement <2 x double> poison, double %62, i64 0
  %96 = shufflevector <2 x double> %95, <2 x double> poison, <2 x i32> zeroinitializer
  %97 = shufflevector <2 x double> %83, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %98 = insertelement <2 x double> %97, double %63, i64 0
  %99 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %96, <2 x double> %98, <2 x double> %94)
  %100 = insertelement <2 x double> poison, double %64, i64 0
  %101 = shufflevector <2 x double> %100, <2 x double> poison, <2 x i32> zeroinitializer
  %102 = shufflevector <2 x double> %84, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %103 = insertelement <2 x double> %102, double %65, i64 0
  %104 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %101, <2 x double> %103, <2 x double> %99)
  %105 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %104)
  %shift = shufflevector <2 x double> %105, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %106 = fadd <2 x double> %105, %shift
  %107 = insertelement <2 x double> poison, double %73, i64 0
  %108 = insertelement <2 x double> %107, double %59, i64 1
  %109 = fmul <2 x double> %108, %81
  %110 = insertelement <2 x double> poison, double %72, i64 0
  %111 = insertelement <2 x double> %110, double %57, i64 1
  %112 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %111, <2 x double> %82, <2 x double> %109)
  %113 = insertelement <2 x double> poison, double %76, i64 0
  %114 = insertelement <2 x double> %113, double %62, i64 1
  %115 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %114, <2 x double> %83, <2 x double> %112)
  %116 = insertelement <2 x double> poison, double %78, i64 0
  %117 = insertelement <2 x double> %116, double %64, i64 1
  %118 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %117, <2 x double> %84, <2 x double> %115)
  %119 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %118)
  %120 = insertelement <2 x double> poison, double %68, i64 0
  %121 = shufflevector <2 x double> %120, <2 x double> poison, <2 x i32> zeroinitializer
  %122 = fmul <2 x double> %88, %121
  %123 = insertelement <2 x double> poison, double %67, i64 0
  %124 = shufflevector <2 x double> %123, <2 x double> poison, <2 x i32> zeroinitializer
  %125 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %124, <2 x double> %93, <2 x double> %122)
  %126 = insertelement <2 x double> poison, double %69, i64 0
  %127 = shufflevector <2 x double> %126, <2 x double> poison, <2 x i32> zeroinitializer
  %128 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %127, <2 x double> %98, <2 x double> %125)
  %129 = insertelement <2 x double> poison, double %70, i64 0
  %130 = shufflevector <2 x double> %129, <2 x double> poison, <2 x i32> zeroinitializer
  %131 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %130, <2 x double> %103, <2 x double> %128)
  %132 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %131)
  %shift123 = shufflevector <2 x double> %132, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %133 = fadd <2 x double> %132, %shift123
  %134 = extractelement <2 x double> %133, i64 0
  %135 = extractelement <2 x double> %81, i64 1
  %136 = fmul double %135, %68
  %137 = extractelement <2 x double> %82, i64 1
  %138 = call double @llvm.fmuladd.f64(double %67, double %137, double %136)
  %139 = extractelement <2 x double> %83, i64 1
  %140 = call double @llvm.fmuladd.f64(double %69, double %139, double %138)
  %141 = extractelement <2 x double> %84, i64 1
  %142 = call double @llvm.fmuladd.f64(double %70, double %141, double %140)
  %143 = call double @llvm.fabs.f64(double %142)
  %144 = fadd double %143, %134
  %145 = insertelement <2 x double> poison, double %80, i64 0
  %146 = shufflevector <2 x double> %145, <2 x double> %106, <2 x i32> <i32 0, i32 2>
  %147 = fadd <2 x double> %146, %119
  %148 = fmul double %135, %73
  %149 = call double @llvm.fmuladd.f64(double %72, double %137, double %148)
  %150 = call double @llvm.fmuladd.f64(double %76, double %139, double %149)
  %151 = call double @llvm.fmuladd.f64(double %78, double %141, double %150)
  br label %245

152:                                              ; preds = %54
  %153 = load double, ptr %12, align 8, !tbaa !5
  %154 = load double, ptr %3, align 8, !tbaa !5
  %155 = load double, ptr %13, align 8, !tbaa !5
  %156 = load double, ptr %4, align 8, !tbaa !5
  %157 = load double, ptr %14, align 8, !tbaa !5
  %158 = fneg double %157
  %159 = load double, ptr %15, align 8, !tbaa !5
  %160 = fneg double %159
  %161 = load double, ptr %16, align 8, !tbaa !5
  %162 = load double, ptr %17, align 8, !tbaa !5
  %163 = load double, ptr %22, align 8, !tbaa !5
  %164 = fneg double %163
  %165 = load double, ptr %23, align 8, !tbaa !5
  %166 = load double, ptr %24, align 8, !tbaa !5
  %167 = load double, ptr %25, align 8, !tbaa !5
  %168 = insertelement <2 x double> poison, double %165, i64 0
  %169 = insertelement <2 x double> %168, double %59, i64 1
  %170 = fneg <2 x double> %169
  %171 = load <2 x double>, ptr %30, align 8, !tbaa !5
  %172 = load <2 x double>, ptr %29, align 8, !tbaa !5
  %173 = load <2 x double>, ptr %31, align 8, !tbaa !5
  %174 = load <2 x double>, ptr %32, align 8, !tbaa !5
  %175 = shufflevector <2 x double> %171, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %176 = insertelement <2 x double> %175, double %60, i64 0
  %177 = shufflevector <2 x double> %170, <2 x double> poison, <2 x i32> <i32 1, i32 1>
  %178 = fmul <2 x double> %176, %177
  %179 = insertelement <2 x double> poison, double %57, i64 0
  %180 = shufflevector <2 x double> %179, <2 x double> poison, <2 x i32> zeroinitializer
  %181 = shufflevector <2 x double> %172, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %182 = insertelement <2 x double> %181, double %58, i64 0
  %183 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %180, <2 x double> %182, <2 x double> %178)
  %184 = insertelement <2 x double> poison, double %153, i64 0
  %185 = shufflevector <2 x double> %184, <2 x double> poison, <2 x i32> zeroinitializer
  %186 = shufflevector <2 x double> %173, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %187 = insertelement <2 x double> %186, double %154, i64 0
  %188 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %185, <2 x double> %187, <2 x double> %183)
  %189 = insertelement <2 x double> poison, double %155, i64 0
  %190 = shufflevector <2 x double> %189, <2 x double> poison, <2 x i32> zeroinitializer
  %191 = shufflevector <2 x double> %174, <2 x double> poison, <2 x i32> <i32 poison, i32 0>
  %192 = insertelement <2 x double> %191, double %156, i64 0
  %193 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %190, <2 x double> %192, <2 x double> %188)
  %194 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %193)
  %shift124 = shufflevector <2 x double> %194, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %195 = fadd <2 x double> %194, %shift124
  %196 = fmul <2 x double> %171, %170
  %197 = insertelement <2 x double> poison, double %164, i64 0
  %198 = insertelement <2 x double> %197, double %57, i64 1
  %199 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %198, <2 x double> %172, <2 x double> %196)
  %200 = insertelement <2 x double> poison, double %166, i64 0
  %201 = insertelement <2 x double> %200, double %153, i64 1
  %202 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %201, <2 x double> %173, <2 x double> %199)
  %203 = insertelement <2 x double> poison, double %167, i64 0
  %204 = insertelement <2 x double> %203, double %155, i64 1
  %205 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %204, <2 x double> %174, <2 x double> %202)
  %206 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %205)
  %207 = insertelement <2 x double> poison, double %160, i64 0
  %208 = shufflevector <2 x double> %207, <2 x double> poison, <2 x i32> zeroinitializer
  %209 = fmul <2 x double> %176, %208
  %210 = insertelement <2 x double> poison, double %158, i64 0
  %211 = shufflevector <2 x double> %210, <2 x double> poison, <2 x i32> zeroinitializer
  %212 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %211, <2 x double> %182, <2 x double> %209)
  %213 = insertelement <2 x double> poison, double %161, i64 0
  %214 = shufflevector <2 x double> %213, <2 x double> poison, <2 x i32> zeroinitializer
  %215 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %214, <2 x double> %187, <2 x double> %212)
  %216 = insertelement <2 x double> poison, double %162, i64 0
  %217 = shufflevector <2 x double> %216, <2 x double> poison, <2 x i32> zeroinitializer
  %218 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %217, <2 x double> %192, <2 x double> %215)
  %219 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %218)
  %shift125 = shufflevector <2 x double> %219, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %220 = fadd <2 x double> %219, %shift125
  %221 = extractelement <2 x double> %220, i64 0
  %222 = extractelement <2 x double> %171, i64 1
  %223 = fmul double %222, %160
  %224 = extractelement <2 x double> %172, i64 1
  %225 = call double @llvm.fmuladd.f64(double %158, double %224, double %223)
  %226 = extractelement <2 x double> %173, i64 1
  %227 = call double @llvm.fmuladd.f64(double %161, double %226, double %225)
  %228 = extractelement <2 x double> %174, i64 1
  %229 = call double @llvm.fmuladd.f64(double %162, double %228, double %227)
  %230 = call double @llvm.fabs.f64(double %229)
  %231 = fadd double %230, %221
  %232 = extractelement <2 x double> %170, i64 0
  %233 = fmul double %60, %232
  %234 = call double @llvm.fmuladd.f64(double %164, double %58, double %233)
  %235 = call double @llvm.fmuladd.f64(double %166, double %154, double %234)
  %236 = call double @llvm.fmuladd.f64(double %167, double %156, double %235)
  %237 = call double @llvm.fabs.f64(double %236)
  %238 = insertelement <2 x double> poison, double %237, i64 0
  %239 = shufflevector <2 x double> %238, <2 x double> %195, <2 x i32> <i32 0, i32 2>
  %240 = fadd <2 x double> %239, %206
  %241 = fmul double %222, %232
  %242 = call double @llvm.fmuladd.f64(double %164, double %224, double %241)
  %243 = call double @llvm.fmuladd.f64(double %166, double %226, double %242)
  %244 = call double @llvm.fmuladd.f64(double %167, double %228, double %243)
  br label %245

245:                                              ; preds = %152, %61
  %.sink118 = phi double [ %244, %152 ], [ %151, %61 ]
  %246 = phi double [ %167, %152 ], [ %78, %61 ]
  %247 = phi double [ %165, %152 ], [ %73, %61 ]
  %248 = phi double [ %163, %152 ], [ %71, %61 ]
  %249 = phi double [ %162, %152 ], [ %70, %61 ]
  %250 = phi double [ %159, %152 ], [ %68, %61 ]
  %251 = phi double [ %157, %152 ], [ %66, %61 ]
  %252 = phi double [ %155, %152 ], [ %64, %61 ]
  %.0111 = phi double [ %231, %152 ], [ %144, %61 ]
  %253 = phi <2 x double> [ %240, %152 ], [ %147, %61 ]
  %254 = call double @llvm.fabs.f64(double %.sink118)
  %255 = extractelement <2 x double> %253, i64 0
  %256 = fadd double %254, %255
  %257 = extractelement <2 x double> %253, i64 1
  %258 = fcmp ugt double %257, %.0111
  %259 = fcmp ugt double %257, %256
  %or.cond = select i1 %258, i1 true, i1 %259
  br i1 %or.cond, label %260, label %.sink.split

260:                                              ; preds = %245
  %261 = fcmp ugt double %.0111, %256
  %. = select i1 %261, double %248, double %251
  %.121 = select i1 %261, double %247, double %250
  %.122 = select i1 %261, double %246, double %249
  br label %.sink.split

.sink.split:                                      ; preds = %260, %245
  %.sink120 = phi double [ %56, %245 ], [ %., %260 ]
  %.sink119 = phi double [ %59, %245 ], [ %.121, %260 ]
  %.sink = phi double [ %252, %245 ], [ %.122, %260 ]
  store double %.sink120, ptr %5, align 8, !tbaa !5
  store double %.sink119, ptr %6, align 8, !tbaa !5
  store double %.sink, ptr %7, align 8, !tbaa !5
  br label %262

262:                                              ; preds = %.sink.split, %52
  %.0113 = phi i32 [ 0, %52 ], [ 1, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #6
  br label %263

263:                                              ; preds = %34, %262
  %.1 = phi i32 [ %.0113, %262 ], [ 0, %34 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %264

264:                                              ; preds = %28, %263
  %.2 = phi i32 [ %.1, %263 ], [ 0, %28 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  ret i32 %.2
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fabs.v2f64(<2 x double>) #4

attributes #0 = { noreturn nounwind "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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass