; 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::face" = type <{ ptr, i32, [4 x i8] }>
%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.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] }>

@.str.284 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.343 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [23 x i8], align 1

; 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

declare i32 @printf(ptr noundef, ...) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

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

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

declare noundef double @_Z8orient3dPdS_S_S_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

; 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: mustprogress uwtable
declare dso_local noundef double @_ZN10tetgenmesh7triareaEPdS0_S0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef) #5 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN10tetgenmesh12randomnationEj(ptr noundef nonnull align 8 dereferenceable(1536), i32 noundef) #3 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN10tetgenmesh13sscoutsegmentEPNS_4faceEPdiii(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #5 align 2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [2 x %"class.tetgenmesh::face"], align 16
  %15 = alloca %"class.tetgenmesh::face", align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.tetgenmesh::face", align 8
  %28 = alloca ptr, align 8
  %29 = alloca [3 x double], align 16
  %30 = alloca [3 x double], align 16
  %31 = alloca double, align 8
  %32 = alloca double, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  %33 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  %34 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i32 0, i32 0
  %35 = getelementptr inbounds %"class.tetgenmesh::face", ptr %34, i64 2
  br label %36

36:                                               ; preds = %36, %6
  %37 = phi ptr [ %34, %6 ], [ %38, %36 ]
  call void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %37)
  %38 = getelementptr inbounds %"class.tetgenmesh::face", ptr %37, i64 1
  %39 = icmp eq ptr %38, %35
  br i1 %39, label %40, label %36

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store ptr null, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %41)
  store ptr %42, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %22, align 4, !tbaa !11
  %43 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 2
  %44 = load ptr, ptr %43, align 8, !tbaa !12
  %45 = getelementptr inbounds %class.tetgenbehavior, ptr %44, i32 0, i32 37
  %46 = load i32, ptr %45, align 4, !tbaa !18
  %47 = icmp sgt i32 %46, 2
  br i1 %47, label %48, label %54

48:                                               ; preds = %40
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  %50 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %49)
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %51)
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.343, i32 noundef %50, i32 noundef %52)
  br label %54

54:                                               ; preds = %48, %40
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = call noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %55, ptr noundef %56)
  store double %57, ptr %25, align 8, !tbaa !21
  br label %58

58:                                               ; preds = %272, %54
  br label %59

59:                                               ; preds = %58
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %60)
  store ptr %61, ptr %18, align 8, !tbaa !5
  %62 = load ptr, ptr %18, align 8, !tbaa !5
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = icmp eq ptr %62, %63
  br i1 %64, label %65, label %66

65:                                               ; preds = %59
  store i32 3, ptr %21, align 4, !tbaa !22
  br label %273

66:                                               ; preds = %59
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = call noundef ptr @_ZN10tetgenmesh5sapexERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %67)
  store ptr %68, ptr %20, align 8, !tbaa !5
  %69 = load ptr, ptr %20, align 8, !tbaa !5
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = icmp eq ptr %69, %70
  br i1 %71, label %72, label %75

72:                                               ; preds = %66
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh11senext2selfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %73)
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %74)
  store i32 3, ptr %21, align 4, !tbaa !22
  br label %273

75:                                               ; preds = %66
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = call noundef double @_ZN10tetgenmesh7triareaEPdS0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %76, ptr noundef %77, ptr noundef %78)
  %80 = call double @sqrt(double noundef %79) #7
  %81 = load double, ptr %25, align 8, !tbaa !21
  %82 = fdiv double %80, %81
  %83 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !12
  %85 = getelementptr inbounds %class.tetgenbehavior, ptr %84, i32 0, i32 70
  %86 = load double, ptr %85, align 8, !tbaa !24
  %87 = fcmp olt double %82, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %75
  store double 0.000000e+00, ptr %23, align 8, !tbaa !21
  br label %96

89:                                               ; preds = %75
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  %92 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 35
  %93 = load ptr, ptr %92, align 8, !tbaa !25
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %90, ptr noundef %91, ptr noundef %93, ptr noundef %94)
  store double %95, ptr %23, align 8, !tbaa !21
  br label %96

96:                                               ; preds = %89, %88
  %97 = load ptr, ptr %20, align 8, !tbaa !5
  %98 = load ptr, ptr %16, align 8, !tbaa !5
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = call noundef double @_ZN10tetgenmesh7triareaEPdS0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %97, ptr noundef %98, ptr noundef %99)
  %101 = call double @sqrt(double noundef %100) #7
  %102 = load double, ptr %25, align 8, !tbaa !21
  %103 = fdiv double %101, %102
  %104 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 2
  %105 = load ptr, ptr %104, align 8, !tbaa !12
  %106 = getelementptr inbounds %class.tetgenbehavior, ptr %105, i32 0, i32 70
  %107 = load double, ptr %106, align 8, !tbaa !24
  %108 = fcmp olt double %103, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %96
  store double 0.000000e+00, ptr %24, align 8, !tbaa !21
  br label %117

110:                                              ; preds = %96
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = load ptr, ptr %16, align 8, !tbaa !5
  %113 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 35
  %114 = load ptr, ptr %113, align 8, !tbaa !25
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %111, ptr noundef %112, ptr noundef %114, ptr noundef %115)
  store double %116, ptr %24, align 8, !tbaa !21
  br label %117

117:                                              ; preds = %110, %109
  %118 = load double, ptr %23, align 8, !tbaa !21
  %119 = fcmp olt double %118, 0.000000e+00
  br i1 %119, label %120, label %131

120:                                              ; preds = %117
  %121 = load double, ptr %24, align 8, !tbaa !21
  %122 = fcmp olt double %121, 0.000000e+00
  br i1 %122, label %123, label %129

123:                                              ; preds = %120
  %124 = call noundef i64 @_ZN10tetgenmesh12randomnationEj(ptr noundef nonnull align 8 dereferenceable(1536) %33, i32 noundef 2)
  %125 = icmp ne i64 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %123
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %128

127:                                              ; preds = %123
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %128

128:                                              ; preds = %127, %126
  br label %130

129:                                              ; preds = %120
  store i32 0, ptr %22, align 4, !tbaa !11
  br label %130

130:                                              ; preds = %129, %128
  br label %153

131:                                              ; preds = %117
  %132 = load double, ptr %24, align 8, !tbaa !21
  %133 = fcmp olt double %132, 0.000000e+00
  br i1 %133, label %134, label %135

134:                                              ; preds = %131
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %152

135:                                              ; preds = %131
  %136 = load double, ptr %23, align 8, !tbaa !21
  %137 = fcmp ogt double %136, 0.000000e+00
  br i1 %137, label %138, label %145

138:                                              ; preds = %135
  %139 = load double, ptr %24, align 8, !tbaa !21
  %140 = fcmp ogt double %139, 0.000000e+00
  br i1 %140, label %141, label %142

141:                                              ; preds = %138
  store i32 8, ptr %21, align 4, !tbaa !22
  br label %273

142:                                              ; preds = %138
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh11senext2selfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %143)
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %144)
  store i32 7, ptr %21, align 4, !tbaa !22
  br label %273

145:                                              ; preds = %135
  %146 = load double, ptr %24, align 8, !tbaa !21
  %147 = fcmp ogt double %146, 0.000000e+00
  br i1 %147, label %148, label %149

148:                                              ; preds = %145
  store i32 7, ptr %21, align 4, !tbaa !22
  br label %273

149:                                              ; preds = %145
  call void @_Z15terminatetetgenP10tetgenmeshi(ptr noundef %33, i32 noundef 2)
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151, %134
  br label %153

153:                                              ; preds = %152, %130
  %154 = load i32, ptr %22, align 4, !tbaa !11
  %155 = icmp eq i32 %154, 0
  br i1 %155, label %156, label %214

156:                                              ; preds = %153
  %157 = load i32, ptr %13, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %174

159:                                              ; preds = %156
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %"class.tetgenmesh::face", ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !26
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %"class.tetgenmesh::face", ptr %163, i32 0, i32 1
  %165 = load i32, ptr %164, align 8, !tbaa !27
  %166 = ashr i32 %165, 1
  %167 = add nsw i32 6, %166
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds ptr, ptr %162, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %173

172:                                              ; preds = %159
  store i32 8, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

173:                                              ; preds = %159
  br label %174

174:                                              ; preds = %173, %156
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %175, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %176 = getelementptr inbounds %"class.tetgenmesh::face", ptr %15, i32 0, i32 0
  %177 = load ptr, ptr %176, align 8, !tbaa !26
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %186

179:                                              ; preds = %174
  %180 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  %182 = icmp ne ptr %180, %181
  br i1 %182, label %183, label %184

183:                                              ; preds = %179
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  br label %184

184:                                              ; preds = %183, %179
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh6senextERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15, ptr noundef nonnull align 8 dereferenceable(12) %185)
  br label %213

186:                                              ; preds = %174
  %187 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh7senext2ERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %187, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %188 = load i32, ptr %13, align 4, !tbaa !9
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %205

190:                                              ; preds = %186
  %191 = getelementptr inbounds %"class.tetgenmesh::face", ptr %15, i32 0, i32 0
  %192 = load ptr, ptr %191, align 8, !tbaa !26
  %193 = getelementptr inbounds %"class.tetgenmesh::face", ptr %15, i32 0, i32 1
  %194 = load i32, ptr %193, align 8, !tbaa !27
  %195 = ashr i32 %194, 1
  %196 = add nsw i32 6, %195
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds ptr, ptr %192, i64 %197
  %199 = load ptr, ptr %198, align 8, !tbaa !5
  %200 = icmp ne ptr %199, null
  br i1 %200, label %201, label %204

201:                                              ; preds = %190
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %202, ptr noundef nonnull align 8 dereferenceable(12) %15)
  store i32 8, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

204:                                              ; preds = %190
  br label %205

205:                                              ; preds = %204, %186
  call void @_ZN10tetgenmesh10spivotselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %206 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %207 = load ptr, ptr %20, align 8, !tbaa !5
  %208 = icmp ne ptr %206, %207
  br i1 %208, label %209, label %210

209:                                              ; preds = %205
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  br label %210

210:                                              ; preds = %209, %205
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %211, ptr noundef nonnull align 8 dereferenceable(12) %15)
  br label %213

213:                                              ; preds = %210, %184
  br label %272

214:                                              ; preds = %153
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh7senext2ERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %215, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %216 = load i32, ptr %13, align 4, !tbaa !9
  %217 = icmp ne i32 %216, 0
  br i1 %217, label %218, label %233

218:                                              ; preds = %214
  %219 = getelementptr inbounds %"class.tetgenmesh::face", ptr %15, i32 0, i32 0
  %220 = load ptr, ptr %219, align 8, !tbaa !26
  %221 = getelementptr inbounds %"class.tetgenmesh::face", ptr %15, i32 0, i32 1
  %222 = load i32, ptr %221, align 8, !tbaa !27
  %223 = ashr i32 %222, 1
  %224 = add nsw i32 6, %223
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds ptr, ptr %220, i64 %225
  %227 = load ptr, ptr %226, align 8, !tbaa !5
  %228 = icmp ne ptr %227, null
  br i1 %228, label %229, label %232

229:                                              ; preds = %218
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %230, ptr noundef nonnull align 8 dereferenceable(12) %15)
  store i32 8, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

232:                                              ; preds = %218
  br label %233

233:                                              ; preds = %232, %214
  call void @_ZN10tetgenmesh10spivotselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %234 = getelementptr inbounds %"class.tetgenmesh::face", ptr %15, i32 0, i32 0
  %235 = load ptr, ptr %234, align 8, !tbaa !26
  %236 = icmp ne ptr %235, null
  br i1 %236, label %237, label %245

237:                                              ; preds = %233
  %238 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %239 = load ptr, ptr %20, align 8, !tbaa !5
  %240 = icmp ne ptr %238, %239
  br i1 %240, label %241, label %242

241:                                              ; preds = %237
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  br label %242

242:                                              ; preds = %241, %237
  %243 = load ptr, ptr %9, align 8, !tbaa !5
  %244 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %243, ptr noundef nonnull align 8 dereferenceable(12) %15)
  br label %271

245:                                              ; preds = %233
  %246 = load i32, ptr %13, align 4, !tbaa !9
  %247 = icmp ne i32 %246, 0
  br i1 %247, label %248, label %263

248:                                              ; preds = %245
  %249 = load ptr, ptr %9, align 8, !tbaa !5
  %250 = getelementptr inbounds %"class.tetgenmesh::face", ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !26
  %252 = load ptr, ptr %9, align 8, !tbaa !5
  %253 = getelementptr inbounds %"class.tetgenmesh::face", ptr %252, i32 0, i32 1
  %254 = load i32, ptr %253, align 8, !tbaa !27
  %255 = ashr i32 %254, 1
  %256 = add nsw i32 6, %255
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds ptr, ptr %251, i64 %257
  %259 = load ptr, ptr %258, align 8, !tbaa !5
  %260 = icmp ne ptr %259, null
  br i1 %260, label %261, label %262

261:                                              ; preds = %248
  store i32 8, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

262:                                              ; preds = %248
  br label %263

263:                                              ; preds = %262, %245
  %264 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %264, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %265 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %266 = load ptr, ptr %18, align 8, !tbaa !5
  %267 = icmp ne ptr %265, %266
  br i1 %267, label %268, label %269

268:                                              ; preds = %263
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15)
  br label %269

269:                                              ; preds = %268, %263
  %270 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh6senextERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15, ptr noundef nonnull align 8 dereferenceable(12) %270)
  br label %271

271:                                              ; preds = %269, %242
  br label %272

272:                                              ; preds = %271, %213
  br label %58, !llvm.loop !28

273:                                              ; preds = %148, %142, %141, %72, %65
  %274 = load i32, ptr %21, align 4, !tbaa !22
  %275 = icmp eq i32 %274, 3
  br i1 %275, label %276, label %293

276:                                              ; preds = %273
  %277 = load i32, ptr %11, align 4, !tbaa !9
  %278 = icmp ne i32 %277, 0
  br i1 %278, label %279, label %291

279:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  call void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %27)
  %280 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 6
  %281 = load ptr, ptr %280, align 8, !tbaa !30
  call void @_ZN10tetgenmesh13makeshellfaceEPNS_10memorypoolEPNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %281, ptr noundef %27)
  %282 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN10tetgenmesh7setsorgERNS_4faceEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef %282)
  %283 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN10tetgenmesh8setsdestERNS_4faceEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef %283)
  call void @_ZN10tetgenmesh8setsapexERNS_4faceEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef null)
  call void @_ZN10tetgenmesh12setshellmarkERNS_4faceEi(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %27, i32 noundef -1)
  %284 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh6ssbondERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %284, ptr noundef nonnull align 8 dereferenceable(12) %27)
  %285 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %285, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %286 = getelementptr inbounds %"class.tetgenmesh::face", ptr %15, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8, !tbaa !26
  %288 = icmp ne ptr %287, null
  br i1 %288, label %289, label %290

289:                                              ; preds = %279
  call void @_ZN10tetgenmesh6ssbondERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %15, ptr noundef nonnull align 8 dereferenceable(12) %27)
  br label %290

290:                                              ; preds = %289, %279
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  br label %291

291:                                              ; preds = %290, %276
  %292 = load i32, ptr %21, align 4, !tbaa !22
  store i32 %292, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

293:                                              ; preds = %273
  %294 = load i32, ptr %21, align 4, !tbaa !22
  %295 = icmp eq i32 %294, 7
  br i1 %295, label %296, label %324

296:                                              ; preds = %293
  %297 = load i32, ptr %12, align 4, !tbaa !9
  %298 = icmp ne i32 %297, 0
  br i1 %298, label %299, label %322

299:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %300 = load ptr, ptr %9, align 8, !tbaa !5
  %301 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %300)
  store ptr %301, ptr %28, align 8, !tbaa !5
  %302 = load ptr, ptr %9, align 8, !tbaa !5
  %303 = call noundef i32 @_ZN10tetgenmesh9shellmarkERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %302)
  %304 = call i32 (ptr, ...) @printf(ptr noundef @.str.344, i32 noundef %303)
  %305 = load ptr, ptr %28, align 8, !tbaa !5
  %306 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %305)
  %307 = load ptr, ptr %28, align 8, !tbaa !5
  %308 = getelementptr inbounds double, ptr %307, i64 0
  %309 = load double, ptr %308, align 8, !tbaa !21
  %310 = load ptr, ptr %28, align 8, !tbaa !5
  %311 = getelementptr inbounds double, ptr %310, i64 1
  %312 = load double, ptr %311, align 8, !tbaa !21
  %313 = load ptr, ptr %28, align 8, !tbaa !5
  %314 = getelementptr inbounds double, ptr %313, i64 2
  %315 = load double, ptr %314, align 8, !tbaa !21
  %316 = call i32 (ptr, ...) @printf(ptr noundef @.str.284, i32 noundef %306, double noundef %309, double noundef %312, double noundef %315)
  %317 = load ptr, ptr %16, align 8, !tbaa !5
  %318 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %317)
  %319 = load ptr, ptr %10, align 8, !tbaa !5
  %320 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %319)
  %321 = call i32 (ptr, ...) @printf(ptr noundef @.str.345, i32 noundef %318, i32 noundef %320)
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %322

322:                                              ; preds = %299, %296
  %323 = load i32, ptr %21, align 4, !tbaa !22
  store i32 %323, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

324:                                              ; preds = %293
  %325 = load i32, ptr %21, align 4, !tbaa !22
  %326 = icmp eq i32 %325, 8
  br i1 %326, label %327, label %421

327:                                              ; preds = %324
  %328 = load ptr, ptr %9, align 8, !tbaa !5
  %329 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  call void @_ZN10tetgenmesh6senextERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %328, ptr noundef nonnull align 8 dereferenceable(12) %329)
  %330 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %331 = getelementptr inbounds %"class.tetgenmesh::face", ptr %330, i32 0, i32 0
  %332 = load ptr, ptr %331, align 16, !tbaa !26
  %333 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %334 = getelementptr inbounds %"class.tetgenmesh::face", ptr %333, i32 0, i32 1
  %335 = load i32, ptr %334, align 8, !tbaa !27
  %336 = ashr i32 %335, 1
  %337 = add nsw i32 6, %336
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds ptr, ptr %332, i64 %338
  %340 = load ptr, ptr %339, align 8, !tbaa !5
  %341 = icmp ne ptr %340, null
  br i1 %341, label %342, label %375

342:                                              ; preds = %327
  %343 = load i32, ptr %12, align 4, !tbaa !9
  %344 = icmp ne i32 %343, 0
  br i1 %344, label %345, label %373

345:                                              ; preds = %342
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store double 0.000000e+00, ptr %31, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store double 0.000000e+00, ptr %32, align 8, !tbaa !21
  %346 = load ptr, ptr %16, align 8, !tbaa !5
  %347 = load ptr, ptr %10, align 8, !tbaa !5
  %348 = load ptr, ptr %18, align 8, !tbaa !5
  %349 = load ptr, ptr %20, align 8, !tbaa !5
  %350 = getelementptr inbounds [3 x double], ptr %29, i64 0, i64 0
  %351 = getelementptr inbounds [3 x double], ptr %30, i64 0, i64 0
  %352 = call noundef i32 @_ZN10tetgenmesh11linelineintEPdS0_S0_S0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %346, ptr noundef %347, ptr noundef %348, ptr noundef %349, ptr noundef %350, ptr noundef %351, ptr noundef %31, ptr noundef %32)
  %353 = getelementptr inbounds [3 x double], ptr %29, i64 0, i64 0
  %354 = load double, ptr %353, align 16, !tbaa !21
  %355 = getelementptr inbounds [3 x double], ptr %29, i64 0, i64 1
  %356 = load double, ptr %355, align 8, !tbaa !21
  %357 = getelementptr inbounds [3 x double], ptr %29, i64 0, i64 2
  %358 = load double, ptr %357, align 16, !tbaa !21
  %359 = call i32 (ptr, ...) @printf(ptr noundef @.str.346, double noundef %354, double noundef %356, double noundef %358)
  %360 = load ptr, ptr %9, align 8, !tbaa !5
  %361 = call noundef i32 @_ZN10tetgenmesh9shellmarkERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %360)
  %362 = call i32 (ptr, ...) @printf(ptr noundef @.str.347, i32 noundef %361)
  %363 = load ptr, ptr %18, align 8, !tbaa !5
  %364 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %363)
  %365 = load ptr, ptr %20, align 8, !tbaa !5
  %366 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %365)
  %367 = call i32 (ptr, ...) @printf(ptr noundef @.str.348, i32 noundef %364, i32 noundef %366)
  %368 = load ptr, ptr %16, align 8, !tbaa !5
  %369 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %368)
  %370 = load ptr, ptr %10, align 8, !tbaa !5
  %371 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %370)
  %372 = call i32 (ptr, ...) @printf(ptr noundef @.str.349, i32 noundef %369, i32 noundef %371)
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #7
  br label %373

373:                                              ; preds = %345, %342
  %374 = load i32, ptr %21, align 4, !tbaa !22
  store i32 %374, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

375:                                              ; preds = %327
  %376 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %377 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 1
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %376, ptr noundef nonnull align 8 dereferenceable(12) %377)
  %378 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 1
  %379 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %378)
  %380 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %381 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %380)
  %382 = icmp ne ptr %379, %381
  br i1 %382, label %383, label %385

383:                                              ; preds = %375
  %384 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 1
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %384)
  br label %385

385:                                              ; preds = %383, %375
  %386 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  call void @_ZN10tetgenmesh6flip22EPNS_4faceEii(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %386, i32 noundef 1, i32 noundef 0)
  %387 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 1
  %388 = call noundef ptr @_ZN10tetgenmesh5sapexERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %387)
  store ptr %388, ptr %17, align 8, !tbaa !5
  %389 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %390 = call noundef ptr @_ZN10tetgenmesh5sapexERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %389)
  store ptr %390, ptr %18, align 8, !tbaa !5
  %391 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %392 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %391)
  store ptr %392, ptr %20, align 8, !tbaa !5
  %393 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %394 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef nonnull align 8 dereferenceable(12) %393)
  store ptr %394, ptr %19, align 8, !tbaa !5
  %395 = load ptr, ptr %20, align 8, !tbaa !5
  %396 = load ptr, ptr %19, align 8, !tbaa !5
  %397 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 35
  %398 = load ptr, ptr %397, align 8, !tbaa !25
  %399 = load ptr, ptr %18, align 8, !tbaa !5
  %400 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %395, ptr noundef %396, ptr noundef %398, ptr noundef %399)
  store double %400, ptr %23, align 8, !tbaa !21
  %401 = load ptr, ptr %19, align 8, !tbaa !5
  %402 = load ptr, ptr %20, align 8, !tbaa !5
  %403 = getelementptr inbounds %class.tetgenmesh, ptr %33, i32 0, i32 35
  %404 = load ptr, ptr %403, align 8, !tbaa !25
  %405 = load ptr, ptr %17, align 8, !tbaa !5
  %406 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %401, ptr noundef %402, ptr noundef %404, ptr noundef %405)
  store double %406, ptr %24, align 8, !tbaa !21
  %407 = load double, ptr %23, align 8, !tbaa !21
  %408 = fcmp ole double %407, 0.000000e+00
  br i1 %408, label %409, label %411

409:                                              ; preds = %385
  %410 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  call void @_ZN10tetgenmesh10flipshpushEPNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %410)
  br label %417

411:                                              ; preds = %385
  %412 = load double, ptr %24, align 8, !tbaa !21
  %413 = fcmp ole double %412, 0.000000e+00
  br i1 %413, label %414, label %416

414:                                              ; preds = %411
  %415 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 1
  call void @_ZN10tetgenmesh10flipshpushEPNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %415)
  br label %416

416:                                              ; preds = %414, %411
  br label %417

417:                                              ; preds = %416, %409
  %418 = getelementptr inbounds [2 x %"class.tetgenmesh::face"], ptr %14, i64 0, i64 0
  %419 = load ptr, ptr %9, align 8, !tbaa !5
  %420 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %419, ptr noundef nonnull align 8 dereferenceable(12) %418)
  br label %421

421:                                              ; preds = %417, %324
  %422 = load ptr, ptr %9, align 8, !tbaa !5
  %423 = load ptr, ptr %10, align 8, !tbaa !5
  %424 = load i32, ptr %11, align 4, !tbaa !9
  %425 = load i32, ptr %12, align 4, !tbaa !9
  %426 = load i32, ptr %13, align 4, !tbaa !9
  %427 = call noundef i32 @_ZN10tetgenmesh13sscoutsegmentEPNS_4faceEPdiii(ptr noundef nonnull align 8 dereferenceable(1536) %33, ptr noundef %422, ptr noundef %423, i32 noundef %424, i32 noundef %425, i32 noundef %426)
  store i32 %427, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %428

428:                                              ; preds = %421, %373, %322, %291, %261, %229, %201, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  %429 = load i32, ptr %7, align 4
  ret i32 %429
}

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 = { "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 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 #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 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 #6 = { 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 #7 = { 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 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"_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, !14, i64 288, !15, i64 304, !6, i64 320, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !10, i64 388, !10, i64 392, !10, i64 396, !10, i64 400, !16, i64 408, !16, i64 416, !17, i64 424, !17, i64 432, !17, i64 440, !17, i64 448, !17, i64 456, !17, i64 464, !17, i64 472, !17, i64 480, !17, i64 488, !17, i64 496, !17, i64 504, !17, i64 512, !17, i64 520, !17, i64 528, !17, 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}
!14 = !{!"_ZTSN10tetgenmesh7trifaceE", !6, i64 0, !10, i64 8}
!15 = !{!"_ZTSN10tetgenmesh4faceE", !6, i64 0, !10, i64 8}
!16 = !{!"long", !7, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!19, !10, i64 148}
!19 = !{!"_ZTS14tetgenbehavior", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148, !10, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !17, i64 240, !17, i64 248, !17, i64 256, !17, i64 264, !17, i64 272, !17, i64 280, !17, i64 288, !17, i64 296, !17, i64 304, !17, i64 312, !17, i64 320, !17, i64 328, !7, i64 336, !7, i64 1360, !7, i64 2384, !7, i64 3408, !7, i64 4432, !20, i64 5456}
!20 = !{!"_ZTSN14tetgenbehavior10objecttypeE", !7, i64 0}
!21 = !{!17, !17, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"_ZTSN10tetgenmesh11interresultE", !7, i64 0}
!24 = !{!19, !17, i64 320}
!25 = !{!13, !6, i64 280}
!26 = !{!15, !6, i64 0}
!27 = !{!15, !10, i64 8}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!13, !6, i64 48}


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

%"class.tetgenmesh::face" = type <{ ptr, i32, [4 x i8] }>

@.str.284 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.343 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.344 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.345 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.346 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.347 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.348 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.349 = external hidden unnamed_addr constant [23 x i8], align 1

; 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; 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 nounwind uwtable
declare dso_local void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

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

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

declare noundef double @_Z8orient3dPdS_S_S_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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

; 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 uwtable
declare dso_local noundef double @_ZN10tetgenmesh7triareaEPdS0_S0_(ptr noundef nonnull align 8 dereferenceable(1536), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN10tetgenmesh12randomnationEj(ptr noundef nonnull align 8 dereferenceable(1536), i32 noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 3, 9) i32 @_ZN10tetgenmesh13sscoutsegmentEPNS_4faceEPdiii(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #5 align 2 {
  %7 = alloca [2 x %"class.tetgenmesh::face"], align 16
  %8 = alloca %"class.tetgenmesh::face", align 8
  %9 = alloca %"class.tetgenmesh::face", align 8
  %10 = alloca [3 x double], align 16
  %11 = alloca [3 x double], align 16
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  call void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %7)
  %.ptr.1 = getelementptr inbounds i8, ptr %7, i64 16
  call void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %.ptr.1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %8)
  %14 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 148
  %18 = load i32, ptr %17, align 4, !tbaa !15
  %19 = icmp sgt i32 %18, 2
  br i1 %19, label %20, label %24

20:                                               ; preds = %6
  %21 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %14)
  %22 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %2)
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.343, i32 noundef %21, i32 noundef %22)
  br label %24

24:                                               ; preds = %20, %6
  %25 = call noundef double @_ZN10tetgenmesh8distanceEPdS0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %14, ptr noundef %2)
  %26 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  %27 = icmp eq ptr %26, %2
  br i1 %27, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %24
  %28 = getelementptr inbounds i8, ptr %0, i64 280
  %.not115 = icmp eq i32 %5, 0
  %29 = getelementptr inbounds i8, ptr %8, i64 8
  %30 = getelementptr inbounds i8, ptr %1, i64 8
  br label %31

31:                                               ; preds = %.lr.ph, %132
  %32 = phi ptr [ %26, %.lr.ph ], [ %133, %132 ]
  %.0106187 = phi i32 [ 0, %.lr.ph ], [ %.1151, %132 ]
  %33 = call noundef ptr @_ZN10tetgenmesh5sapexERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  %34 = icmp eq ptr %33, %2
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  call void @_ZN10tetgenmesh11senext2selfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  br label %.loopexit

36:                                               ; preds = %31
  %37 = call noundef double @_ZN10tetgenmesh7triareaEPdS0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %14, ptr noundef %32, ptr noundef %2)
  %38 = call double @sqrt(double noundef %37) #8
  %39 = fdiv double %38, %25
  %40 = load ptr, ptr %15, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 320
  %42 = load double, ptr %41, align 8, !tbaa !18
  %43 = fcmp olt double %39, %42
  br i1 %43, label %47, label %44

44:                                               ; preds = %36
  %45 = load ptr, ptr %28, align 8, !tbaa !19
  %46 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %14, ptr noundef %32, ptr noundef %45, ptr noundef %2)
  br label %47

47:                                               ; preds = %36, %44
  %.0105 = phi double [ %46, %44 ], [ 0.000000e+00, %36 ]
  %48 = call noundef double @_ZN10tetgenmesh7triareaEPdS0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %33, ptr noundef %14, ptr noundef %2)
  %49 = call double @sqrt(double noundef %48) #8
  %50 = fdiv double %49, %25
  %51 = load ptr, ptr %15, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %51, i64 320
  %53 = load double, ptr %52, align 8, !tbaa !18
  %54 = fcmp olt double %50, %53
  br i1 %54, label %.thread, label %55

55:                                               ; preds = %47
  %56 = load ptr, ptr %28, align 8, !tbaa !19
  %57 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %33, ptr noundef %14, ptr noundef %56, ptr noundef %2)
  %58 = fcmp olt double %.0105, 0.000000e+00
  %59 = fcmp olt double %57, 0.000000e+00
  br i1 %58, label %61, label %64

.thread:                                          ; preds = %47
  %60 = fcmp olt double %.0105, 0.000000e+00
  br i1 %60, label %.thread149, label %.thread141

61:                                               ; preds = %55
  br i1 %59, label %62, label %.thread149

62:                                               ; preds = %61
  %63 = call noundef i64 @_ZN10tetgenmesh12randomnationEj(ptr noundef nonnull align 8 dereferenceable(1536) %0, i32 noundef 2)
  %.not = icmp eq i64 %63, 0
  br i1 %.not, label %.thread149, label %.thread154

64:                                               ; preds = %55
  br i1 %59, label %.thread154, label %65

65:                                               ; preds = %64
  %66 = fcmp ogt double %.0105, 0.000000e+00
  %67 = fcmp ogt double %57, 0.000000e+00
  br i1 %66, label %69, label %70

.thread141:                                       ; preds = %.thread
  %68 = fcmp ogt double %.0105, 0.000000e+00
  br i1 %68, label %.thread145, label %.thread147

69:                                               ; preds = %65
  br i1 %67, label %155, label %.thread145

.thread145:                                       ; preds = %.thread141, %69
  call void @_ZN10tetgenmesh11senext2selfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  br label %.loopexit169

70:                                               ; preds = %65
  br i1 %67, label %.loopexit169, label %.thread147

.thread147:                                       ; preds = %.thread141, %70
  call void @_Z15terminatetetgenP10tetgenmeshi(ptr noundef nonnull %0, i32 noundef 2)
  %71 = icmp eq i32 %.0106187, 0
  br i1 %71, label %.thread149, label %.thread154

.thread149:                                       ; preds = %62, %.thread, %61, %.thread147
  br i1 %.not115, label %80, label %72

72:                                               ; preds = %.thread149
  %73 = load ptr, ptr %1, align 8, !tbaa !20
  %74 = load i32, ptr %30, align 8, !tbaa !21
  %75 = ashr i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr ptr, ptr %73, i64 %76
  %78 = getelementptr i8, ptr %77, i64 48
  %79 = load ptr, ptr %78, align 8, !tbaa !22
  %.not122 = icmp eq ptr %79, null
  br i1 %.not122, label %80, label %.loopexit170

80:                                               ; preds = %72, %.thread149
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %81 = load ptr, ptr %8, align 8, !tbaa !20
  %.not123 = icmp eq ptr %81, null
  br i1 %.not123, label %86, label %82

82:                                               ; preds = %80
  %83 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %.not126 = icmp eq ptr %83, %32
  br i1 %.not126, label %85, label %84

84:                                               ; preds = %82
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %85

85:                                               ; preds = %84, %82
  call void @_ZN10tetgenmesh6senextERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %1)
  br label %132

86:                                               ; preds = %80
  call void @_ZN10tetgenmesh7senext2ERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br i1 %.not115, label %97, label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %8, align 8, !tbaa !20
  %89 = load i32, ptr %29, align 8, !tbaa !21
  %90 = ashr i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr ptr, ptr %88, i64 %91
  %93 = getelementptr i8, ptr %92, i64 48
  %94 = load ptr, ptr %93, align 8, !tbaa !22
  %.not124 = icmp eq ptr %94, null
  br i1 %.not124, label %97, label %95

95:                                               ; preds = %87
  %96 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %.loopexit170

97:                                               ; preds = %87, %86
  call void @_ZN10tetgenmesh10spivotselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %98 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %.not125 = icmp eq ptr %98, %33
  br i1 %.not125, label %100, label %99

99:                                               ; preds = %97
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %100

100:                                              ; preds = %99, %97
  %101 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %132

.thread154:                                       ; preds = %64, %62, %.thread147
  %.1156 = phi i32 [ %.0106187, %.thread147 ], [ 1, %62 ], [ 1, %64 ]
  call void @_ZN10tetgenmesh7senext2ERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br i1 %.not115, label %112, label %102

102:                                              ; preds = %.thread154
  %103 = load ptr, ptr %8, align 8, !tbaa !20
  %104 = load i32, ptr %29, align 8, !tbaa !21
  %105 = ashr i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = getelementptr ptr, ptr %103, i64 %106
  %108 = getelementptr i8, ptr %107, i64 48
  %109 = load ptr, ptr %108, align 8, !tbaa !22
  %.not116 = icmp eq ptr %109, null
  br i1 %.not116, label %.thread157, label %110

110:                                              ; preds = %102
  %111 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %.loopexit170

112:                                              ; preds = %.thread154
  call void @_ZN10tetgenmesh10spivotselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %113 = load ptr, ptr %8, align 8, !tbaa !20
  %.not117 = icmp eq ptr %113, null
  br i1 %.not117, label %128, label %115

.thread157:                                       ; preds = %102
  call void @_ZN10tetgenmesh10spivotselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %114 = load ptr, ptr %8, align 8, !tbaa !20
  %.not117158 = icmp eq ptr %114, null
  br i1 %.not117158, label %120, label %115

115:                                              ; preds = %.thread157, %112
  %116 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %.not120 = icmp eq ptr %116, %33
  br i1 %.not120, label %118, label %117

117:                                              ; preds = %115
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %118

118:                                              ; preds = %117, %115
  %119 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %132

120:                                              ; preds = %.thread157
  %121 = load ptr, ptr %1, align 8, !tbaa !20
  %122 = load i32, ptr %30, align 8, !tbaa !21
  %123 = ashr i32 %122, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr ptr, ptr %121, i64 %124
  %126 = getelementptr i8, ptr %125, i64 48
  %127 = load ptr, ptr %126, align 8, !tbaa !22
  %.not118 = icmp eq ptr %127, null
  br i1 %.not118, label %128, label %.loopexit170

128:                                              ; preds = %112, %120
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %129 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %.not119 = icmp eq ptr %129, %32
  br i1 %.not119, label %131, label %130

130:                                              ; preds = %128
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8)
  br label %131

131:                                              ; preds = %130, %128
  call void @_ZN10tetgenmesh6senextERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %1)
  br label %132

132:                                              ; preds = %118, %131, %85, %100
  %.1151 = phi i32 [ %.1156, %118 ], [ %.1156, %131 ], [ 0, %85 ], [ 0, %100 ]
  %133 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  %134 = icmp eq ptr %133, %2
  br i1 %134, label %.loopexit, label %31, !llvm.loop !23

.loopexit:                                        ; preds = %132, %24, %35
  %.not131 = icmp eq i32 %3, 0
  br i1 %.not131, label %.loopexit170, label %135

135:                                              ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #8
  call void @_ZN10tetgenmesh4faceC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %9)
  %136 = getelementptr inbounds i8, ptr %0, i64 48
  %137 = load ptr, ptr %136, align 8, !tbaa !25
  call void @_ZN10tetgenmesh13makeshellfaceEPNS_10memorypoolEPNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %137, ptr noundef nonnull %9)
  call void @_ZN10tetgenmesh7setsorgERNS_4faceEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef %14)
  call void @_ZN10tetgenmesh8setsdestERNS_4faceEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef %2)
  call void @_ZN10tetgenmesh8setsapexERNS_4faceEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef null)
  call void @_ZN10tetgenmesh12setshellmarkERNS_4faceEi(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %9, i32 noundef -1)
  call void @_ZN10tetgenmesh6ssbondERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %9)
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %8)
  %138 = load ptr, ptr %8, align 8, !tbaa !20
  %.not132 = icmp eq ptr %138, null
  br i1 %.not132, label %140, label %139

139:                                              ; preds = %135
  call void @_ZN10tetgenmesh6ssbondERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %9)
  br label %140

140:                                              ; preds = %139, %135
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #8
  br label %.loopexit170

.loopexit169:                                     ; preds = %70, %.thread145
  %.not130 = icmp eq i32 %4, 0
  br i1 %.not130, label %.loopexit170, label %141

141:                                              ; preds = %.loopexit169
  %142 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  %143 = call noundef i32 @_ZN10tetgenmesh9shellmarkERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  %144 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.344, i32 noundef %143)
  %145 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %142)
  %146 = load double, ptr %142, align 8, !tbaa !26
  %147 = getelementptr inbounds i8, ptr %142, i64 8
  %148 = load double, ptr %147, align 8, !tbaa !26
  %149 = getelementptr inbounds i8, ptr %142, i64 16
  %150 = load double, ptr %149, align 8, !tbaa !26
  %151 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.284, i32 noundef %145, double noundef %146, double noundef %148, double noundef %150)
  %152 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %14)
  %153 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %2)
  %154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.345, i32 noundef %152, i32 noundef %153)
  br label %.loopexit170

155:                                              ; preds = %69
  call void @_ZN10tetgenmesh6senextERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %7)
  %156 = load ptr, ptr %7, align 16, !tbaa !20
  %157 = getelementptr inbounds i8, ptr %7, i64 8
  %158 = load i32, ptr %157, align 8, !tbaa !21
  %159 = ashr i32 %158, 1
  %160 = sext i32 %159 to i64
  %161 = getelementptr ptr, ptr %156, i64 %160
  %162 = getelementptr i8, ptr %161, i64 48
  %163 = load ptr, ptr %162, align 8, !tbaa !22
  %.not127 = icmp eq ptr %163, null
  br i1 %.not127, label %181, label %164

164:                                              ; preds = %155
  %.not129 = icmp eq i32 %4, 0
  br i1 %.not129, label %.loopexit170, label %165

165:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  store double 0.000000e+00, ptr %12, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  store double 0.000000e+00, ptr %13, align 8, !tbaa !26
  %166 = call noundef i32 @_ZN10tetgenmesh11linelineintEPdS0_S0_S0_S0_S0_S0_S0_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %14, ptr noundef %2, ptr noundef %32, ptr noundef %33, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %167 = load double, ptr %10, align 16, !tbaa !26
  %168 = getelementptr inbounds i8, ptr %10, i64 8
  %169 = load double, ptr %168, align 8, !tbaa !26
  %170 = getelementptr inbounds i8, ptr %10, i64 16
  %171 = load double, ptr %170, align 16, !tbaa !26
  %172 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.346, double noundef %167, double noundef %169, double noundef %171)
  %173 = call noundef i32 @_ZN10tetgenmesh9shellmarkERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %1)
  %174 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.347, i32 noundef %173)
  %175 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %32)
  %176 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %33)
  %177 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.348, i32 noundef %175, i32 noundef %176)
  %178 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %14)
  %179 = call noundef i32 @_ZN10tetgenmesh9pointmarkEPd(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef %2)
  %180 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.349, i32 noundef %178, i32 noundef %179)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  br label %.loopexit170

181:                                              ; preds = %155
  call void @_ZN10tetgenmesh6spivotERNS_4faceES1_(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 8 dereferenceable(12) %.ptr.1)
  %182 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %.ptr.1)
  %183 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %7)
  %.not128 = icmp eq ptr %182, %183
  br i1 %.not128, label %185, label %184

184:                                              ; preds = %181
  call void @_ZN10tetgenmesh9sesymselfERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %.ptr.1)
  br label %185

185:                                              ; preds = %184, %181
  call void @_ZN10tetgenmesh6flip22EPNS_4faceEii(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %7, i32 noundef 1, i32 noundef 0)
  %186 = call noundef ptr @_ZN10tetgenmesh5sapexERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %.ptr.1)
  %187 = call noundef ptr @_ZN10tetgenmesh5sapexERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %7)
  %188 = call noundef ptr @_ZN10tetgenmesh4sorgERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %7)
  %189 = call noundef ptr @_ZN10tetgenmesh5sdestERNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull align 8 dereferenceable(12) %7)
  %190 = load ptr, ptr %28, align 8, !tbaa !19
  %191 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %188, ptr noundef %189, ptr noundef %190, ptr noundef %187)
  %192 = load ptr, ptr %28, align 8, !tbaa !19
  %193 = call noundef double @_Z8orient3dPdS_S_S_(ptr noundef %189, ptr noundef %188, ptr noundef %192, ptr noundef %186)
  %194 = fcmp ugt double %191, 0.000000e+00
  br i1 %194, label %195, label %.sink.split

195:                                              ; preds = %185
  %196 = fcmp ugt double %193, 0.000000e+00
  br i1 %196, label %197, label %.sink.split

.sink.split:                                      ; preds = %195, %185
  %.sink = phi ptr [ %7, %185 ], [ %.ptr.1, %195 ]
  call void @_ZN10tetgenmesh10flipshpushEPNS_4faceE(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %.sink)
  br label %197

197:                                              ; preds = %.sink.split, %195
  %198 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZN10tetgenmesh4faceaSERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef nonnull align 8 dereferenceable(12) %7)
  %199 = call noundef i32 @_ZN10tetgenmesh13sscoutsegmentEPNS_4faceEPdiii(ptr noundef nonnull align 8 dereferenceable(1536) %0, ptr noundef nonnull %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5)
  br label %.loopexit170

.loopexit170:                                     ; preds = %120, %72, %164, %165, %.loopexit169, %141, %.loopexit, %140, %197, %110, %95
  %.0 = phi i32 [ %199, %197 ], [ 8, %95 ], [ 8, %110 ], [ 3, %140 ], [ 3, %.loopexit ], [ 7, %141 ], [ 7, %.loopexit169 ], [ 8, %165 ], [ 8, %164 ], [ 8, %72 ], [ 8, %120 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  ret i32 %.0
}

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass