; LLVM IR from Ubpa/USTC_CG :: Homeworks/6_MassSpring/documents/tetgen/src/TetGene (tetgen)

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

%class.tetgenmesh = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.tetgenmesh::triface", %"class.tetgenmesh::face", ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, [8 x [3 x [8 x i32]]], [8 x i32] }
%"class.tetgenmesh::triface" = type <{ ptr, i32, [4 x i8] }>
%"class.tetgenmesh::face" = type <{ ptr, i32, [4 x i8] }>
%class.tetgenbehavior = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, double, double, double, double, double, double, double, double, [1024 x i8], [1024 x i8], [1024 x i8], [1024 x i8], [1024 x i8], i32, [4 x i8] }>

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2 align 2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10tetgenmesh12circumsphereEPdS0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10tetgenmesh11projpt2faceEPdS0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10tetgenmesh17checkfac4encroachEPdS0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 align 2 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %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 double, align 8
  %18 = alloca [3 x double], align 16
  %19 = alloca [3 x double], align 16
  %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
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  %25 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZN10tetgenmesh12circumsphereEPdS0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef null, ptr noundef %29, ptr noundef %16)
  %31 = load double, ptr %16, align 8, !tbaa !9
  %32 = fcmp oeq double %31, 0.000000e+00
  br i1 %32, label %33, label %34

33:                                               ; preds = %7
  call void @_Z15terminatetetgenP10tetgenmeshi(ptr noundef %25, i32 noundef 2)
  br label %34

34:                                               ; preds = %33, %7
  %35 = load ptr, ptr %14, align 8, !tbaa !5
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = call noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %35, ptr noundef %36)
  store double %37, ptr %17, align 8, !tbaa !9
  %38 = load double, ptr %17, align 8, !tbaa !9
  %39 = load double, ptr %16, align 8, !tbaa !9
  %40 = fsub double %38, %39
  %41 = call double @llvm.fabs.f64(double %40)
  %42 = load double, ptr %16, align 8, !tbaa !9
  %43 = fdiv double %41, %42
  %44 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds %class.tetgenbehavior, ptr %45, i32 0, i32 70
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = fcmp olt double %43, %47
  br i1 %48, label %49, label %51

49:                                               ; preds = %34
  %50 = load double, ptr %16, align 8, !tbaa !9
  store double %50, ptr %17, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %49, %34
  %52 = load double, ptr %17, align 8, !tbaa !9
  %53 = load double, ptr %16, align 8, !tbaa !9
  %54 = fcmp olt double %52, %53
  br i1 %54, label %55, label %187

55:                                               ; preds = %51
  %56 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = getelementptr inbounds %class.tetgenbehavior, ptr %57, i32 0, i32 10
  %59 = load i32, ptr %58, align 8, !tbaa !20
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %183

61:                                               ; preds = %55
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 42
  %64 = load i32, ptr %63, align 4, !tbaa !21
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %62, i64 %65
  %67 = load double, ptr %66, align 8, !tbaa !9
  %68 = fcmp ogt double %67, 0.000000e+00
  br i1 %68, label %69, label %181

69:                                               ; preds = %61
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 42
  %72 = load i32, ptr %71, align 4, !tbaa !21
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds double, ptr %70, i64 %73
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = fcmp ogt double %75, 0.000000e+00
  br i1 %76, label %77, label %181

77:                                               ; preds = %69
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 42
  %80 = load i32, ptr %79, align 4, !tbaa !21
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %78, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = fcmp ogt double %83, 0.000000e+00
  br i1 %84, label %85, label %181

85:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  call void @_ZN10tetgenmesh11projpt2faceEPdS0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %86, ptr noundef %87, ptr noundef %88, ptr noundef %89, ptr noundef %90)
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %91, ptr noundef %92, ptr noundef %93, ptr noundef %94, i32 noundef 1, ptr noundef null)
  %95 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %96 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %97 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %95, ptr noundef %96)
  %98 = call double @sqrt(double noundef %97) #6
  store double %98, ptr %20, align 8, !tbaa !9
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %102 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %99, ptr noundef %100, ptr noundef %101, ptr noundef %102, i32 noundef 1, ptr noundef null)
  %103 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %104 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %105 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %103, ptr noundef %104)
  %106 = call double @sqrt(double noundef %105) #6
  store double %106, ptr %21, align 8, !tbaa !9
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %110 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %107, ptr noundef %108, ptr noundef %109, ptr noundef %110, i32 noundef 1, ptr noundef null)
  %111 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %112 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %113 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %111, ptr noundef %112)
  %114 = call double @sqrt(double noundef %113) #6
  store double %114, ptr %22, align 8, !tbaa !9
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %118 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %115, ptr noundef %116, ptr noundef %117, ptr noundef %118, i32 noundef 1, ptr noundef null)
  %119 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %120 = getelementptr inbounds [3 x double], ptr %19, i64 0, i64 0
  %121 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %119, ptr noundef %120)
  %122 = call double @sqrt(double noundef %121) #6
  store double %122, ptr %23, align 8, !tbaa !9
  %123 = load double, ptr %21, align 8, !tbaa !9
  %124 = load double, ptr %22, align 8, !tbaa !9
  %125 = fadd double %123, %124
  %126 = load double, ptr %23, align 8, !tbaa !9
  %127 = fadd double %125, %126
  %128 = load double, ptr %20, align 8, !tbaa !9
  %129 = fsub double %127, %128
  %130 = call double @llvm.fabs.f64(double %129)
  %131 = load double, ptr %20, align 8, !tbaa !9
  %132 = fdiv double %130, %131
  %133 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 2
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = getelementptr inbounds %class.tetgenbehavior, ptr %134, i32 0, i32 70
  %136 = load double, ptr %135, align 8, !tbaa !17
  %137 = fcmp olt double %132, %136
  br i1 %137, label %138, label %177

138:                                              ; preds = %85
  %139 = load double, ptr %21, align 8, !tbaa !9
  %140 = load double, ptr %20, align 8, !tbaa !9
  %141 = fdiv double %139, %140
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 42
  %144 = load i32, ptr %143, align 4, !tbaa !21
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %142, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !9
  %148 = load double, ptr %22, align 8, !tbaa !9
  %149 = load double, ptr %20, align 8, !tbaa !9
  %150 = fdiv double %148, %149
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 42
  %153 = load i32, ptr %152, align 4, !tbaa !21
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds double, ptr %151, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !9
  %157 = fmul double %150, %156
  %158 = call double @llvm.fmuladd.f64(double %141, double %147, double %157)
  %159 = load double, ptr %23, align 8, !tbaa !9
  %160 = load double, ptr %20, align 8, !tbaa !9
  %161 = fdiv double %159, %160
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = getelementptr inbounds %class.tetgenmesh, ptr %25, i32 0, i32 42
  %164 = load i32, ptr %163, align 4, !tbaa !21
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds double, ptr %162, i64 %165
  %167 = load double, ptr %166, align 8, !tbaa !9
  %168 = call double @llvm.fmuladd.f64(double %161, double %167, double %158)
  store double %168, ptr %16, align 8, !tbaa !9
  %169 = getelementptr inbounds [3 x double], ptr %18, i64 0, i64 0
  %170 = load ptr, ptr %13, align 8, !tbaa !5
  %171 = call noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %25, ptr noundef %169, ptr noundef %170)
  store double %171, ptr %17, align 8, !tbaa !9
  %172 = load double, ptr %17, align 8, !tbaa !9
  %173 = load double, ptr %16, align 8, !tbaa !9
  %174 = fcmp olt double %172, %173
  br i1 %174, label %175, label %176

175:                                              ; preds = %138
  store i32 1, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %178

176:                                              ; preds = %138
  br label %177

177:                                              ; preds = %176, %85
  store i32 0, ptr %24, align 4
  br label %178

178:                                              ; preds = %177, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  %179 = load i32, ptr %24, align 4
  switch i32 %179, label %188 [
    i32 0, label %180
  ]

180:                                              ; preds = %178
  br label %182

181:                                              ; preds = %77, %69, %61
  store i32 1, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %188

182:                                              ; preds = %180
  br label %186

183:                                              ; preds = %55
  %184 = load double, ptr %16, align 8, !tbaa !9
  %185 = load ptr, ptr %15, align 8, !tbaa !5
  store double %184, ptr %185, align 8, !tbaa !9
  store i32 1, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %188

186:                                              ; preds = %182
  br label %187

187:                                              ; preds = %186, %51
  store i32 0, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %188

188:                                              ; preds = %187, %183, %181, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %189 = load i32, ptr %8, align 4
  ret i32 %189
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 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 = { 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 #4 = { inlinehint 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"_ZTS10tetgenmesh", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !13, i64 288, !15, i64 304, !6, i64 320, !14, i64 328, !14, i64 332, !14, i64 336, !14, i64 340, !14, i64 344, !14, i64 348, !14, i64 352, !14, i64 356, !14, i64 360, !14, i64 364, !14, i64 368, !14, i64 372, !14, i64 376, !14, i64 380, !14, i64 384, !14, i64 388, !14, i64 392, !14, i64 396, !14, i64 400, !16, i64 408, !16, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !10, i64 520, !10, i64 528, !10, i64 536, !16, i64 544, !16, i64 552, !16, i64 560, !16, i64 568, !16, i64 576, !16, i64 584, !16, i64 592, !16, i64 600, !16, i64 608, !16, i64 616, !16, i64 624, !16, i64 632, !16, i64 640, !16, i64 648, !16, i64 656, !16, i64 664, !16, i64 672, !16, i64 680, !16, i64 688, !16, i64 696, !16, i64 704, !16, i64 712, !16, i64 720, !16, i64 728, !7, i64 736, !7, i64 1504}
!13 = !{!"_ZTSN10tetgenmesh7trifaceE", !6, i64 0, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN10tetgenmesh4faceE", !6, i64 0, !14, i64 8}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !10, i64 320}
!18 = !{!"_ZTS14tetgenbehavior", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !14, i64 132, !14, i64 136, !14, i64 140, !14, i64 144, !14, i64 148, !14, i64 152, !14, i64 156, !14, i64 160, !14, i64 164, !14, i64 168, !14, i64 172, !14, i64 176, !14, i64 180, !14, i64 184, !14, i64 188, !14, i64 192, !14, i64 196, !14, i64 200, !14, i64 204, !14, i64 208, !14, i64 212, !14, i64 216, !14, i64 220, !14, i64 224, !14, i64 228, !14, i64 232, !14, i64 236, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !7, i64 336, !7, i64 1360, !7, i64 2384, !7, i64 3408, !7, i64 4432, !19, i64 5456}
!19 = !{!"_ZTSN14tetgenbehavior10objecttypeE", !7, i64 0}
!20 = !{!18, !14, i64 40}
!21 = !{!12, !14, i64 340}


; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15terminatetetgenP10tetgenmeshi(ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10tetgenmesh12circumsphereEPdS0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10tetgenmesh11projpt2faceEPdS0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN10tetgenmesh17checkfac4encroachEPdS0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #2 align 2 {
  %8 = alloca double, align 8
  %9 = alloca [3 x double], align 16
  %10 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %11 = call noundef zeroext i1 @_ZN10tetgenmesh12circumsphereEPdS0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef null, ptr noundef %5, ptr noundef nonnull %8)
  %12 = load double, ptr %8, align 8, !tbaa !5
  %13 = fcmp oeq double %12, 0.000000e+00
  br i1 %13, label %14, label %15

14:                                               ; preds = %7
  call void @_Z15terminatetetgenP10tetgenmeshi(ptr noundef nonnull %0, i32 noundef 2)
  br label %15

15:                                               ; preds = %14, %7
  %16 = call noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %5, ptr noundef %4)
  %17 = load double, ptr %8, align 8, !tbaa !5
  %18 = fsub double %16, %17
  %19 = call double @llvm.fabs.f64(double %18)
  %20 = fdiv double %19, %17
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %22, i64 320
  %24 = load double, ptr %23, align 8, !tbaa !16
  %25 = fcmp olt double %20, %24
  %.044 = select i1 %25, double %17, double %16
  %26 = fcmp olt double %.044, %17
  br i1 %26, label %27, label %83

27:                                               ; preds = %15
  %28 = getelementptr inbounds i8, ptr %22, i64 40
  %29 = load i32, ptr %28, align 8, !tbaa !19
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %82, label %30

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %0, i64 340
  %32 = load i32, ptr %31, align 4, !tbaa !20
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %1, i64 %33
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = fcmp ogt double %35, 0.000000e+00
  br i1 %36, label %37, label %83

37:                                               ; preds = %30
  %38 = getelementptr inbounds double, ptr %2, i64 %33
  %39 = load double, ptr %38, align 8, !tbaa !5
  %40 = fcmp ogt double %39, 0.000000e+00
  br i1 %40, label %41, label %83

41:                                               ; preds = %37
  %42 = getelementptr inbounds double, ptr %3, i64 %33
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = fcmp ogt double %43, 0.000000e+00
  br i1 %44, label %45, label %83

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  call void @_ZN10tetgenmesh11projpt2faceEPdS0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %4, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %9)
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %10, i32 noundef 1, ptr noundef null)
  %46 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %10, ptr noundef nonnull %10)
  %47 = call double @sqrt(double noundef %46) #6
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 1, ptr noundef null)
  %48 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %10, ptr noundef nonnull %10)
  %49 = call double @sqrt(double noundef %48) #6
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 1, ptr noundef null)
  %50 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %10, ptr noundef nonnull %10)
  %51 = call double @sqrt(double noundef %50) #6
  call void @_ZN10tetgenmesh10facenormalEPdS0_S0_S0_iS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %3, ptr noundef nonnull %1, ptr noundef nonnull %9, ptr noundef nonnull %10, i32 noundef 1, ptr noundef null)
  %52 = call noundef double @_ZN10tetgenmesh3dotEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %10, ptr noundef nonnull %10)
  %53 = call double @sqrt(double noundef %52) #6
  %54 = fadd double %49, %51
  %55 = fadd double %54, %53
  %56 = fsub double %55, %47
  %57 = call double @llvm.fabs.f64(double %56)
  %58 = fdiv double %57, %47
  %59 = load ptr, ptr %21, align 8, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %59, i64 320
  %61 = load double, ptr %60, align 8, !tbaa !16
  %62 = fcmp olt double %58, %61
  br i1 %62, label %63, label %.critedge

63:                                               ; preds = %45
  %64 = fdiv double %49, %47
  %65 = load i32, ptr %31, align 4, !tbaa !20
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %3, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !5
  %69 = fdiv double %51, %47
  %70 = getelementptr inbounds double, ptr %1, i64 %66
  %71 = load double, ptr %70, align 8, !tbaa !5
  %72 = fmul double %69, %71
  %73 = call double @llvm.fmuladd.f64(double %64, double %68, double %72)
  %74 = fdiv double %53, %47
  %75 = getelementptr inbounds double, ptr %2, i64 %66
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = call double @llvm.fmuladd.f64(double %74, double %76, double %73)
  store double %77, ptr %8, align 8, !tbaa !5
  %78 = call noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %9, ptr noundef %4)
  %79 = load double, ptr %8, align 8, !tbaa !5
  %80 = fcmp olt double %78, %79
  br i1 %80, label %81, label %.critedge

.critedge:                                        ; preds = %63, %45
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %83

81:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %83

82:                                               ; preds = %27
  store double %17, ptr %6, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %15, %.critedge, %30, %37, %41, %81, %82
  %.1 = phi i32 [ 1, %81 ], [ 1, %82 ], [ 1, %41 ], [ 1, %37 ], [ 1, %30 ], [ 0, %.critedge ], [ 0, %15 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  ret i32 %.1
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { inlinehint 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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"}
!9 = !{!10, !11, i64 16}
!10 = !{!"_ZTS10tetgenmesh", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !12, i64 288, !14, i64 304, !11, i64 320, !13, i64 328, !13, i64 332, !13, i64 336, !13, i64 340, !13, i64 344, !13, i64 348, !13, i64 352, !13, i64 356, !13, i64 360, !13, i64 364, !13, i64 368, !13, i64 372, !13, i64 376, !13, i64 380, !13, i64 384, !13, i64 388, !13, i64 392, !13, i64 396, !13, i64 400, !15, i64 408, !15, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !15, i64 544, !15, i64 552, !15, i64 560, !15, i64 568, !15, i64 576, !15, i64 584, !15, i64 592, !15, i64 600, !15, i64 608, !15, i64 616, !15, i64 624, !15, i64 632, !15, i64 640, !15, i64 648, !15, i64 656, !15, i64 664, !15, i64 672, !15, i64 680, !15, i64 688, !15, i64 696, !15, i64 704, !15, i64 712, !15, i64 720, !15, i64 728, !7, i64 736, !7, i64 1504}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTSN10tetgenmesh7trifaceE", !11, i64 0, !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN10tetgenmesh4faceE", !11, i64 0, !13, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 320}
!17 = !{!"_ZTS14tetgenbehavior", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148, !13, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !13, i64 172, !13, i64 176, !13, i64 180, !13, i64 184, !13, i64 188, !13, i64 192, !13, i64 196, !13, i64 200, !13, i64 204, !13, i64 208, !13, i64 212, !13, i64 216, !13, i64 220, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !7, i64 336, !7, i64 1360, !7, i64 2384, !7, i64 3408, !7, i64 4432, !18, i64 5456}
!18 = !{!"_ZTSN14tetgenbehavior10objecttypeE", !7, i64 0}
!19 = !{!17, !13, i64 40}
!20 = !{!10, !13, i64 340}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass