; LLVM IR from ETH3D/dataset-pipeline :: thirdparty/cork/cork/isct (triangle)

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

%struct.otri = type { ptr, i32 }
%struct.badtriang = type { ptr, double, ptr, ptr, ptr, ptr }
%struct.behavior = 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, double, double, double, double, [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8], [2048 x i8] }
%struct.mesh = type { %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, %struct.memorypool, [4096 x ptr], [4096 x ptr], [4096 x i32], i32, ptr, double, double, double, double, double, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.otri }
%struct.memorypool = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i64, i64, i32, i32 }

@plus1mod3 = external dso_local global [3 x i32], align 4
@minus1mod3 = external dso_local global [3 x i32], align 4
@.str.944 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1046 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.1047 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.1048 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1049 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.1050 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.1051 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.1052 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.1053 = external hidden unnamed_addr constant [41 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @poolalloc(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @vertexdealloc(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @findcircumcenter(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @insertvertex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @undovertex(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @precisionerror() #3

; Function Attrs: nounwind uwtable
define dso_local void @splittriangle(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.otri, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.badtriang, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = ptrtoint ptr %19 to i64
  %21 = and i64 %20, 3
  %22 = trunc i64 %21 to i32
  %23 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  store i32 %22, ptr %23, align 8, !tbaa !12
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.badtriang, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = ptrtoint ptr %26 to i64
  %28 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  %29 = load i32, ptr %28, align 8, !tbaa !12
  %30 = sext i32 %29 to i64
  %31 = xor i64 %27, %30
  %32 = inttoptr i64 %31 to ptr
  %33 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 0
  store ptr %32, ptr %33, align 8, !tbaa !15
  %34 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  %36 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  %37 = load i32, ptr %36, align 8, !tbaa !12
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !16
  %41 = add nsw i32 %40, 3
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds ptr, ptr %35, i64 %42
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  store ptr %44, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  %48 = load i32, ptr %47, align 8, !tbaa !12
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !16
  %52 = add nsw i32 %51, 3
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds ptr, ptr %46, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  store ptr %55, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  %59 = load i32, ptr %58, align 8, !tbaa !12
  %60 = add nsw i32 %59, 3
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds ptr, ptr %57, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  store ptr %63, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !15
  %66 = getelementptr inbounds ptr, ptr %65, i64 1
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = icmp eq ptr %67, null
  br i1 %68, label %356, label %69

69:                                               ; preds = %3
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.badtriang, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !17
  %74 = icmp eq ptr %70, %73
  br i1 %74, label %75, label %356

75:                                               ; preds = %69
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.badtriang, ptr %77, i32 0, i32 3
  %79 = load ptr, ptr %78, align 8, !tbaa !18
  %80 = icmp eq ptr %76, %79
  br i1 %80, label %81, label %356

81:                                               ; preds = %75
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.badtriang, ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = icmp eq ptr %82, %85
  br i1 %86, label %87, label %356

87:                                               ; preds = %81
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.behavior, ptr %88, i32 0, i32 29
  %90 = load i32, ptr %89, align 4, !tbaa !20
  %91 = icmp sgt i32 %90, 1
  br i1 %91, label %92, label %113

92:                                               ; preds = %87
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.1046)
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds double, ptr %94, i64 0
  %96 = load double, ptr %95, align 8, !tbaa !22
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds double, ptr %97, i64 1
  %99 = load double, ptr %98, align 8, !tbaa !22
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds double, ptr %100, i64 0
  %102 = load double, ptr %101, align 8, !tbaa !22
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = getelementptr inbounds double, ptr %103, i64 1
  %105 = load double, ptr %104, align 8, !tbaa !22
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = getelementptr inbounds double, ptr %106, i64 0
  %108 = load double, ptr %107, align 8, !tbaa !22
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds double, ptr %109, i64 1
  %111 = load double, ptr %110, align 8, !tbaa !22
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.944, double noundef %96, double noundef %99, double noundef %102, double noundef %105, double noundef %108, double noundef %111)
  br label %113

113:                                              ; preds = %92, %87
  store i32 0, ptr %15, align 4, !tbaa !16
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.mesh, ptr %114, i32 0, i32 2
  %116 = call ptr @poolalloc(ptr noundef %115)
  store ptr %116, ptr %11, align 8, !tbaa !5
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  call void @findcircumcenter(ptr noundef %117, ptr noundef %118, ptr noundef %119, ptr noundef %120, ptr noundef %121, ptr noundef %122, ptr noundef %12, ptr noundef %13, i32 noundef 1)
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = getelementptr inbounds double, ptr %123, i64 0
  %125 = load double, ptr %124, align 8, !tbaa !22
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds double, ptr %126, i64 0
  %128 = load double, ptr %127, align 8, !tbaa !22
  %129 = fcmp oeq double %125, %128
  br i1 %129, label %130, label %138

130:                                              ; preds = %113
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = getelementptr inbounds double, ptr %131, i64 1
  %133 = load double, ptr %132, align 8, !tbaa !22
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds double, ptr %134, i64 1
  %136 = load double, ptr %135, align 8, !tbaa !22
  %137 = fcmp oeq double %133, %136
  br i1 %137, label %170, label %138

138:                                              ; preds = %130, %113
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = getelementptr inbounds double, ptr %139, i64 0
  %141 = load double, ptr %140, align 8, !tbaa !22
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds double, ptr %142, i64 0
  %144 = load double, ptr %143, align 8, !tbaa !22
  %145 = fcmp oeq double %141, %144
  br i1 %145, label %146, label %154

146:                                              ; preds = %138
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = getelementptr inbounds double, ptr %147, i64 1
  %149 = load double, ptr %148, align 8, !tbaa !22
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds double, ptr %150, i64 1
  %152 = load double, ptr %151, align 8, !tbaa !22
  %153 = fcmp oeq double %149, %152
  br i1 %153, label %170, label %154

154:                                              ; preds = %146, %138
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds double, ptr %155, i64 0
  %157 = load double, ptr %156, align 8, !tbaa !22
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = getelementptr inbounds double, ptr %158, i64 0
  %160 = load double, ptr %159, align 8, !tbaa !22
  %161 = fcmp oeq double %157, %160
  br i1 %161, label %162, label %186

162:                                              ; preds = %154
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = getelementptr inbounds double, ptr %163, i64 1
  %165 = load double, ptr %164, align 8, !tbaa !22
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = getelementptr inbounds double, ptr %166, i64 1
  %168 = load double, ptr %167, align 8, !tbaa !22
  %169 = fcmp oeq double %165, %168
  br i1 %169, label %170, label %186

170:                                              ; preds = %162, %146, %130
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.behavior, ptr %171, i32 0, i32 28
  %173 = load i32, ptr %172, align 8, !tbaa !23
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %183, label %175

175:                                              ; preds = %170
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  %177 = getelementptr inbounds double, ptr %176, i64 0
  %178 = load double, ptr %177, align 8, !tbaa !22
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = getelementptr inbounds double, ptr %179, i64 1
  %181 = load double, ptr %180, align 8, !tbaa !22
  %182 = call i32 (ptr, ...) @printf(ptr noundef @.str.1047, double noundef %178, double noundef %181)
  store i32 1, ptr %15, align 4, !tbaa !16
  br label %183

183:                                              ; preds = %175, %170
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vertexdealloc(ptr noundef %184, ptr noundef %185)
  br label %321

186:                                              ; preds = %162, %154
  store i32 2, ptr %16, align 4, !tbaa !16
  br label %187

187:                                              ; preds = %230, %186
  %188 = load i32, ptr %16, align 4, !tbaa !16
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.mesh, ptr %189, i32 0, i32 26
  %191 = load i32, ptr %190, align 4, !tbaa !24
  %192 = add nsw i32 2, %191
  %193 = icmp slt i32 %188, %192
  br i1 %193, label %194, label %233

194:                                              ; preds = %187
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = load i32, ptr %16, align 4, !tbaa !16
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds double, ptr %195, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !22
  %200 = load double, ptr %12, align 8, !tbaa !22
  %201 = load ptr, ptr %9, align 8, !tbaa !5
  %202 = load i32, ptr %16, align 4, !tbaa !16
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds double, ptr %201, i64 %203
  %205 = load double, ptr %204, align 8, !tbaa !22
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = load i32, ptr %16, align 4, !tbaa !16
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds double, ptr %206, i64 %208
  %210 = load double, ptr %209, align 8, !tbaa !22
  %211 = fsub double %205, %210
  %212 = call double @llvm.fmuladd.f64(double %200, double %211, double %199)
  %213 = load double, ptr %13, align 8, !tbaa !22
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = load i32, ptr %16, align 4, !tbaa !16
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds double, ptr %214, i64 %216
  %218 = load double, ptr %217, align 8, !tbaa !22
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = load i32, ptr %16, align 4, !tbaa !16
  %221 = sext i32 %220 to i64
  %222 = getelementptr inbounds double, ptr %219, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !22
  %224 = fsub double %218, %223
  %225 = call double @llvm.fmuladd.f64(double %213, double %224, double %212)
  %226 = load ptr, ptr %11, align 8, !tbaa !5
  %227 = load i32, ptr %16, align 4, !tbaa !16
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds double, ptr %226, i64 %228
  store double %225, ptr %229, align 8, !tbaa !22
  br label %230

230:                                              ; preds = %194
  %231 = load i32, ptr %16, align 4, !tbaa !16
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %16, align 4, !tbaa !16
  br label %187, !llvm.loop !28

233:                                              ; preds = %187
  %234 = load ptr, ptr %11, align 8, !tbaa !5
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.mesh, ptr %235, i32 0, i32 30
  %237 = load i32, ptr %236, align 4, !tbaa !30
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds i32, ptr %234, i64 %238
  store i32 0, ptr %239, align 4, !tbaa !16
  %240 = load ptr, ptr %11, align 8, !tbaa !5
  %241 = load ptr, ptr %4, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.mesh, ptr %241, i32 0, i32 30
  %243 = load i32, ptr %242, align 4, !tbaa !30
  %244 = add nsw i32 %243, 1
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds i32, ptr %240, i64 %245
  store i32 2, ptr %246, align 4, !tbaa !16
  %247 = load double, ptr %13, align 8, !tbaa !22
  %248 = load double, ptr %12, align 8, !tbaa !22
  %249 = fcmp olt double %247, %248
  br i1 %249, label %250, label %257

250:                                              ; preds = %233
  %251 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  %252 = load i32, ptr %251, align 8, !tbaa !12
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !16
  %256 = getelementptr inbounds %struct.otri, ptr %7, i32 0, i32 1
  store i32 %255, ptr %256, align 8, !tbaa !12
  br label %257

257:                                              ; preds = %250, %233
  %258 = load ptr, ptr %4, align 8, !tbaa !5
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = load ptr, ptr %11, align 8, !tbaa !5
  %261 = call i32 @insertvertex(ptr noundef %258, ptr noundef %259, ptr noundef %260, ptr noundef %7, ptr noundef null, i32 noundef 1, i32 noundef 1)
  store i32 %261, ptr %14, align 4, !tbaa !16
  %262 = load i32, ptr %14, align 4, !tbaa !16
  %263 = icmp eq i32 %262, 0
  br i1 %263, label %264, label %275

264:                                              ; preds = %257
  %265 = load ptr, ptr %4, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.mesh, ptr %265, i32 0, i32 29
  %267 = load i32, ptr %266, align 8, !tbaa !31
  %268 = icmp sgt i32 %267, 0
  br i1 %268, label %269, label %274

269:                                              ; preds = %264
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.mesh, ptr %270, i32 0, i32 29
  %272 = load i32, ptr %271, align 8, !tbaa !31
  %273 = add nsw i32 %272, -1
  store i32 %273, ptr %271, align 8, !tbaa !31
  br label %274

274:                                              ; preds = %269, %264
  br label %320

275:                                              ; preds = %257
  %276 = load i32, ptr %14, align 4, !tbaa !16
  %277 = icmp eq i32 %276, 1
  br i1 %277, label %278, label %296

278:                                              ; preds = %275
  %279 = load ptr, ptr %4, align 8, !tbaa !5
  %280 = load ptr, ptr %5, align 8, !tbaa !5
  call void @undovertex(ptr noundef %279, ptr noundef %280)
  %281 = load ptr, ptr %5, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.behavior, ptr %281, i32 0, i32 29
  %283 = load i32, ptr %282, align 4, !tbaa !20
  %284 = icmp sgt i32 %283, 1
  br i1 %284, label %285, label %293

285:                                              ; preds = %278
  %286 = load ptr, ptr %11, align 8, !tbaa !5
  %287 = getelementptr inbounds double, ptr %286, i64 0
  %288 = load double, ptr %287, align 8, !tbaa !22
  %289 = load ptr, ptr %11, align 8, !tbaa !5
  %290 = getelementptr inbounds double, ptr %289, i64 1
  %291 = load double, ptr %290, align 8, !tbaa !22
  %292 = call i32 (ptr, ...) @printf(ptr noundef @.str.1048, double noundef %288, double noundef %291)
  br label %293

293:                                              ; preds = %285, %278
  %294 = load ptr, ptr %4, align 8, !tbaa !5
  %295 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vertexdealloc(ptr noundef %294, ptr noundef %295)
  br label %319

296:                                              ; preds = %275
  %297 = load i32, ptr %14, align 4, !tbaa !16
  %298 = icmp eq i32 %297, 2
  br i1 %298, label %299, label %302

299:                                              ; preds = %296
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vertexdealloc(ptr noundef %300, ptr noundef %301)
  br label %318

302:                                              ; preds = %296
  %303 = load ptr, ptr %5, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.behavior, ptr %303, i32 0, i32 28
  %305 = load i32, ptr %304, align 8, !tbaa !23
  %306 = icmp ne i32 %305, 0
  br i1 %306, label %315, label %307

307:                                              ; preds = %302
  %308 = load ptr, ptr %11, align 8, !tbaa !5
  %309 = getelementptr inbounds double, ptr %308, i64 0
  %310 = load double, ptr %309, align 8, !tbaa !22
  %311 = load ptr, ptr %11, align 8, !tbaa !5
  %312 = getelementptr inbounds double, ptr %311, i64 1
  %313 = load double, ptr %312, align 8, !tbaa !22
  %314 = call i32 (ptr, ...) @printf(ptr noundef @.str.1047, double noundef %310, double noundef %313)
  store i32 1, ptr %15, align 4, !tbaa !16
  br label %315

315:                                              ; preds = %307, %302
  %316 = load ptr, ptr %4, align 8, !tbaa !5
  %317 = load ptr, ptr %11, align 8, !tbaa !5
  call void @vertexdealloc(ptr noundef %316, ptr noundef %317)
  br label %318

318:                                              ; preds = %315, %299
  br label %319

319:                                              ; preds = %318, %293
  br label %320

320:                                              ; preds = %319, %274
  br label %321

321:                                              ; preds = %320, %183
  %322 = load i32, ptr %15, align 4, !tbaa !16
  %323 = icmp ne i32 %322, 0
  br i1 %323, label %324, label %355

324:                                              ; preds = %321
  %325 = load ptr, ptr %5, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.behavior, ptr %325, i32 0, i32 29
  %327 = load i32, ptr %326, align 4, !tbaa !20
  %328 = icmp ne i32 %327, 0
  br i1 %328, label %329, label %350

329:                                              ; preds = %324
  %330 = call i32 (ptr, ...) @printf(ptr noundef @.str.1049)
  %331 = load ptr, ptr %8, align 8, !tbaa !5
  %332 = getelementptr inbounds double, ptr %331, i64 0
  %333 = load double, ptr %332, align 8, !tbaa !22
  %334 = load ptr, ptr %8, align 8, !tbaa !5
  %335 = getelementptr inbounds double, ptr %334, i64 1
  %336 = load double, ptr %335, align 8, !tbaa !22
  %337 = load ptr, ptr %9, align 8, !tbaa !5
  %338 = getelementptr inbounds double, ptr %337, i64 0
  %339 = load double, ptr %338, align 8, !tbaa !22
  %340 = load ptr, ptr %9, align 8, !tbaa !5
  %341 = getelementptr inbounds double, ptr %340, i64 1
  %342 = load double, ptr %341, align 8, !tbaa !22
  %343 = load ptr, ptr %10, align 8, !tbaa !5
  %344 = getelementptr inbounds double, ptr %343, i64 0
  %345 = load double, ptr %344, align 8, !tbaa !22
  %346 = load ptr, ptr %10, align 8, !tbaa !5
  %347 = getelementptr inbounds double, ptr %346, i64 1
  %348 = load double, ptr %347, align 8, !tbaa !22
  %349 = call i32 (ptr, ...) @printf(ptr noundef @.str.944, double noundef %333, double noundef %336, double noundef %339, double noundef %342, double noundef %345, double noundef %348)
  br label %350

350:                                              ; preds = %329, %324
  %351 = call i32 (ptr, ...) @printf(ptr noundef @.str.1050)
  %352 = call i32 (ptr, ...) @printf(ptr noundef @.str.1051)
  %353 = call i32 (ptr, ...) @printf(ptr noundef @.str.1052)
  %354 = call i32 (ptr, ...) @printf(ptr noundef @.str.1053)
  call void @precisionerror()
  br label %355

355:                                              ; preds = %350, %321
  br label %356

356:                                              ; preds = %355, %81, %75, %69, %3
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 = { 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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"badtriang", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !14, i64 8}
!13 = !{!"otri", !6, i64 0, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!13, !6, i64 0}
!16 = !{!14, !14, i64 0}
!17 = !{!10, !6, i64 16}
!18 = !{!10, !6, i64 24}
!19 = !{!10, !6, i64 32}
!20 = !{!21, !14, i64 116}
!21 = !{!"behavior", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !14, i64 128, !14, i64 132, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !7, i64 168, !7, i64 2216, !7, i64 4264, !7, i64 6312, !7, i64 8360, !7, i64 10408, !7, i64 12456, !7, i64 14504, !7, i64 16552, !7, i64 18600, !7, i64 20648, !7, i64 22696}
!22 = !{!11, !11, i64 0}
!23 = !{!21, !14, i64 112}
!24 = !{!25, !14, i64 82716}
!25 = !{!"mesh", !26, i64 0, !26, i64 88, !26, i64 176, !26, i64 264, !26, i64 352, !26, i64 440, !26, i64 528, !26, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !14, i64 82624, !6, i64 82632, !11, i64 82640, !11, i64 82648, !11, i64 82656, !11, i64 82664, !11, i64 82672, !14, i64 82680, !14, i64 82684, !14, i64 82688, !14, i64 82692, !14, i64 82696, !14, i64 82700, !27, i64 82704, !14, i64 82712, !14, i64 82716, !14, i64 82720, !27, i64 82728, !14, i64 82736, !14, i64 82740, !14, i64 82744, !14, i64 82748, !14, i64 82752, !14, i64 82756, !14, i64 82760, !14, i64 82764, !14, i64 82768, !27, i64 82776, !27, i64 82784, !27, i64 82792, !27, i64 82800, !27, i64 82808, !27, i64 82816, !27, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !6, i64 82872, !6, i64 82880, !13, i64 82888}
!26 = !{!"memorypool", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !27, i64 64, !27, i64 72, !14, i64 80, !14, i64 84}
!27 = !{!"long", !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!25, !14, i64 82740}
!31 = !{!25, !14, i64 82736}


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

%struct.otri = type { ptr, i32 }

@plus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4
@minus1mod3 = external dso_local local_unnamed_addr global [3 x i32], align 4
@.str.944 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.1046 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.1047 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.1048 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.1049 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.1050 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.1051 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.1052 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.1053 = external hidden unnamed_addr constant [41 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @poolalloc(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @vertexdealloc(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @findcircumcenter(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @insertvertex(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @undovertex(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @precisionerror() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @splittriangle(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #3 {
  %4 = alloca %struct.otri, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = ptrtoint ptr %7 to i64
  %9 = trunc i64 %8 to i32
  %10 = and i32 %9, 3
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %10, ptr %11, align 8, !tbaa !11
  %12 = and i64 %8, 3
  %13 = and i64 %8, -4
  %14 = inttoptr i64 %13 to ptr
  store ptr %14, ptr %4, align 8, !tbaa !14
  %15 = getelementptr inbounds [3 x i32], ptr @plus1mod3, i64 0, i64 %12
  %16 = load i32, ptr %15, align 4, !tbaa !15
  %17 = sext i32 %16 to i64
  %18 = getelementptr ptr, ptr %14, i64 %17
  %19 = getelementptr i8, ptr %18, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  %21 = ptrtoint ptr %20 to i64
  %22 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %12
  %23 = load i32, ptr %22, align 4, !tbaa !15
  %24 = sext i32 %23 to i64
  %25 = getelementptr ptr, ptr %14, i64 %24
  %26 = getelementptr i8, ptr %25, i64 24
  %27 = load ptr, ptr %26, align 8, !tbaa !16
  %28 = ptrtoint ptr %27 to i64
  %29 = getelementptr inbounds ptr, ptr %14, i64 %12
  %30 = getelementptr inbounds i8, ptr %29, i64 24
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = ptrtoint ptr %31 to i64
  %33 = getelementptr inbounds i8, ptr %14, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = icmp eq ptr %34, null
  br i1 %35, label %.thread, label %36

36:                                               ; preds = %3
  %37 = getelementptr inbounds i8, ptr %2, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = icmp eq ptr %20, %38
  br i1 %39, label %40, label %.thread

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %2, i64 24
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %43 = icmp eq ptr %27, %42
  br i1 %43, label %44, label %.thread

44:                                               ; preds = %40
  %45 = getelementptr inbounds i8, ptr %2, i64 32
  %46 = load ptr, ptr %45, align 8, !tbaa !19
  %47 = icmp eq ptr %31, %46
  br i1 %47, label %48, label %.thread

48:                                               ; preds = %44
  %49 = getelementptr inbounds i8, ptr %1, i64 116
  %50 = load i32, ptr %49, align 4, !tbaa !20
  %51 = icmp sgt i32 %50, 1
  br i1 %51, label %52, label %64

52:                                               ; preds = %48
  %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1046)
  %54 = load double, ptr %20, align 8, !tbaa !22
  %55 = getelementptr inbounds i8, ptr %20, i64 8
  %56 = load double, ptr %55, align 8, !tbaa !22
  %57 = load double, ptr %27, align 8, !tbaa !22
  %58 = getelementptr inbounds i8, ptr %27, i64 8
  %59 = load double, ptr %58, align 8, !tbaa !22
  %60 = load double, ptr %31, align 8, !tbaa !22
  %61 = getelementptr inbounds i8, ptr %31, i64 8
  %62 = load double, ptr %61, align 8, !tbaa !22
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.944, double noundef %54, double noundef %56, double noundef %57, double noundef %59, double noundef %60, double noundef %62)
  br label %64

64:                                               ; preds = %52, %48
  %65 = getelementptr inbounds i8, ptr %0, i64 176
  %66 = tail call ptr @poolalloc(ptr noundef nonnull %65)
  %67 = ptrtoint ptr %66 to i64
  call void @findcircumcenter(ptr noundef %0, ptr noundef nonnull %1, ptr noundef %20, ptr noundef %27, ptr noundef %31, ptr noundef %66, ptr noundef nonnull %5, ptr noundef nonnull %6, i32 noundef 1)
  %68 = load double, ptr %66, align 8, !tbaa !22
  %69 = load double, ptr %20, align 8, !tbaa !22
  %70 = fcmp oeq double %68, %69
  br i1 %70, label %71, label %77

71:                                               ; preds = %64
  %72 = getelementptr inbounds i8, ptr %66, i64 8
  %73 = load double, ptr %72, align 8, !tbaa !22
  %74 = getelementptr inbounds i8, ptr %20, i64 8
  %75 = load double, ptr %74, align 8, !tbaa !22
  %76 = fcmp oeq double %73, %75
  br i1 %76, label %95, label %77

77:                                               ; preds = %71, %64
  %78 = load double, ptr %27, align 8, !tbaa !22
  %79 = fcmp oeq double %68, %78
  br i1 %79, label %80, label %86

80:                                               ; preds = %77
  %81 = getelementptr inbounds i8, ptr %66, i64 8
  %82 = load double, ptr %81, align 8, !tbaa !22
  %83 = getelementptr inbounds i8, ptr %27, i64 8
  %84 = load double, ptr %83, align 8, !tbaa !22
  %85 = fcmp oeq double %82, %84
  br i1 %85, label %95, label %86

86:                                               ; preds = %80, %77
  %87 = load double, ptr %31, align 8, !tbaa !22
  %88 = fcmp oeq double %68, %87
  br i1 %88, label %89, label %102

89:                                               ; preds = %86
  %90 = getelementptr inbounds i8, ptr %66, i64 8
  %91 = load double, ptr %90, align 8, !tbaa !22
  %92 = getelementptr inbounds i8, ptr %31, i64 8
  %93 = load double, ptr %92, align 8, !tbaa !22
  %94 = fcmp oeq double %91, %93
  br i1 %94, label %95, label %102

95:                                               ; preds = %89, %80, %71
  %96 = phi double [ %91, %89 ], [ %82, %80 ], [ %73, %71 ]
  %97 = getelementptr inbounds i8, ptr %1, i64 112
  %98 = load i32, ptr %97, align 8, !tbaa !23
  %.not93 = icmp eq i32 %98, 0
  br i1 %.not93, label %99, label %101

99:                                               ; preds = %95
  %100 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1047, double noundef %68, double noundef %96)
  br label %101

101:                                              ; preds = %99, %95
  %.087 = phi i32 [ 0, %95 ], [ 1, %99 ]
  call void @vertexdealloc(ptr noundef %0, ptr noundef nonnull %66)
  br label %204

102:                                              ; preds = %89, %86
  %103 = getelementptr inbounds i8, ptr %0, i64 82716
  %104 = load i32, ptr %103, align 4, !tbaa !24
  %105 = icmp sgt i32 %104, 0
  %.pre102 = load double, ptr %6, align 8, !tbaa !22
  %.pre103 = load double, ptr %5, align 8, !tbaa !22
  br i1 %105, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %102
  %106 = add nuw i32 %104, 2
  %wide.trip.count = zext i32 %106 to i64
  %107 = zext nneg i32 %104 to i64
  %min.iters.check = icmp ult i32 %104, 6
  br i1 %min.iters.check, label %.lr.ph.preheader114, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %108 = sub i64 %67, %21
  %diff.check = icmp ult i64 %108, 32
  %109 = sub i64 %67, %28
  %diff.check104 = icmp ult i64 %109, 32
  %conflict.rdx = or i1 %diff.check, %diff.check104
  %110 = sub i64 %67, %32
  %diff.check105 = icmp ult i64 %110, 32
  %conflict.rdx106 = or i1 %conflict.rdx, %diff.check105
  br i1 %conflict.rdx106, label %.lr.ph.preheader114, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %107, 2147483644
  %ind.end = or disjoint i64 %n.vec, 2
  %broadcast.splatinsert = insertelement <2 x double> poison, double %.pre103, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert112 = insertelement <2 x double> poison, double %.pre102, i64 0
  %broadcast.splat113 = shufflevector <2 x double> %broadcast.splatinsert112, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 2
  %111 = getelementptr inbounds double, ptr %20, i64 %offset.idx
  %112 = getelementptr inbounds i8, ptr %111, i64 16
  %wide.load = load <2 x double>, ptr %111, align 8, !tbaa !22
  %wide.load107 = load <2 x double>, ptr %112, align 8, !tbaa !22
  %113 = getelementptr inbounds double, ptr %27, i64 %offset.idx
  %114 = getelementptr inbounds i8, ptr %113, i64 16
  %wide.load108 = load <2 x double>, ptr %113, align 8, !tbaa !22
  %wide.load109 = load <2 x double>, ptr %114, align 8, !tbaa !22
  %115 = fsub <2 x double> %wide.load108, %wide.load
  %116 = fsub <2 x double> %wide.load109, %wide.load107
  %117 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %115, <2 x double> %wide.load)
  %118 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %116, <2 x double> %wide.load107)
  %119 = getelementptr inbounds double, ptr %31, i64 %offset.idx
  %120 = getelementptr inbounds i8, ptr %119, i64 16
  %wide.load110 = load <2 x double>, ptr %119, align 8, !tbaa !22
  %wide.load111 = load <2 x double>, ptr %120, align 8, !tbaa !22
  %121 = fsub <2 x double> %wide.load110, %wide.load
  %122 = fsub <2 x double> %wide.load111, %wide.load107
  %123 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat113, <2 x double> %121, <2 x double> %117)
  %124 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat113, <2 x double> %122, <2 x double> %118)
  %125 = getelementptr inbounds double, ptr %66, i64 %offset.idx
  %126 = getelementptr inbounds i8, ptr %125, i64 16
  store <2 x double> %123, ptr %125, align 8, !tbaa !22
  store <2 x double> %124, ptr %126, align 8, !tbaa !22
  %index.next = add nuw i64 %index, 4
  %127 = icmp eq i64 %index.next, %n.vec
  br i1 %127, label %middle.block, label %vector.body, !llvm.loop !28

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %107
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader114

.lr.ph.preheader114:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 2, %vector.memcheck ], [ 2, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %128 = sub nsw i64 %wide.trip.count, %indvars.iv.ph
  %xtraiter = and i64 %128, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader114
  %129 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.ph
  %130 = load double, ptr %129, align 8, !tbaa !22
  %131 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.ph
  %132 = load double, ptr %131, align 8, !tbaa !22
  %133 = fsub double %132, %130
  %134 = call double @llvm.fmuladd.f64(double %.pre103, double %133, double %130)
  %135 = getelementptr inbounds double, ptr %31, i64 %indvars.iv.ph
  %136 = load double, ptr %135, align 8, !tbaa !22
  %137 = fsub double %136, %130
  %138 = call double @llvm.fmuladd.f64(double %.pre102, double %137, double %134)
  %139 = getelementptr inbounds double, ptr %66, i64 %indvars.iv.ph
  store double %138, ptr %139, align 8, !tbaa !22
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader114
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader114 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %140 = add nsw i64 %wide.trip.count, -1
  %141 = icmp eq i64 %indvars.iv.ph, %140
  br i1 %141, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %142 = getelementptr inbounds double, ptr %20, i64 %indvars.iv
  %143 = load double, ptr %142, align 8, !tbaa !22
  %144 = getelementptr inbounds double, ptr %27, i64 %indvars.iv
  %145 = load double, ptr %144, align 8, !tbaa !22
  %146 = fsub double %145, %143
  %147 = call double @llvm.fmuladd.f64(double %.pre103, double %146, double %143)
  %148 = getelementptr inbounds double, ptr %31, i64 %indvars.iv
  %149 = load double, ptr %148, align 8, !tbaa !22
  %150 = fsub double %149, %143
  %151 = call double @llvm.fmuladd.f64(double %.pre102, double %150, double %147)
  %152 = getelementptr inbounds double, ptr %66, i64 %indvars.iv
  store double %151, ptr %152, align 8, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %153 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next
  %154 = load double, ptr %153, align 8, !tbaa !22
  %155 = getelementptr inbounds double, ptr %27, i64 %indvars.iv.next
  %156 = load double, ptr %155, align 8, !tbaa !22
  %157 = fsub double %156, %154
  %158 = call double @llvm.fmuladd.f64(double %.pre103, double %157, double %154)
  %159 = getelementptr inbounds double, ptr %31, i64 %indvars.iv.next
  %160 = load double, ptr %159, align 8, !tbaa !22
  %161 = fsub double %160, %154
  %162 = call double @llvm.fmuladd.f64(double %.pre102, double %161, double %158)
  %163 = getelementptr inbounds double, ptr %66, i64 %indvars.iv.next
  store double %162, ptr %163, align 8, !tbaa !22
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.1, label %._crit_edge, label %.lr.ph, !llvm.loop !32

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %102
  %164 = getelementptr inbounds i8, ptr %0, i64 82740
  %165 = load i32, ptr %164, align 4, !tbaa !33
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i32, ptr %66, i64 %166
  store i32 0, ptr %167, align 4, !tbaa !15
  %168 = load i32, ptr %164, align 4, !tbaa !33
  %169 = sext i32 %168 to i64
  %170 = getelementptr i32, ptr %66, i64 %169
  %171 = getelementptr i8, ptr %170, i64 4
  store i32 2, ptr %171, align 4, !tbaa !15
  %172 = fcmp olt double %.pre102, %.pre103
  br i1 %172, label %173, label %177

173:                                              ; preds = %._crit_edge
  %174 = and i64 %8, 3
  %175 = getelementptr inbounds [3 x i32], ptr @minus1mod3, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !15
  store i32 %176, ptr %11, align 8, !tbaa !11
  br label %177

177:                                              ; preds = %173, %._crit_edge
  %178 = call i32 @insertvertex(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %66, ptr noundef nonnull %4, ptr noundef null, i32 noundef 1, i32 noundef 1)
  switch i32 %178, label %195 [
    i32 0, label %179
    i32 1, label %185
    i32 2, label %194
  ]

179:                                              ; preds = %177
  %180 = getelementptr inbounds i8, ptr %0, i64 82736
  %181 = load i32, ptr %180, align 8, !tbaa !34
  %182 = icmp sgt i32 %181, 0
  br i1 %182, label %183, label %.thread

183:                                              ; preds = %179
  %184 = add nsw i32 %181, -1
  store i32 %184, ptr %180, align 8, !tbaa !34
  br label %.thread

185:                                              ; preds = %177
  call void @undovertex(ptr noundef nonnull %0, ptr noundef %1)
  %186 = load i32, ptr %49, align 4, !tbaa !20
  %187 = icmp sgt i32 %186, 1
  br i1 %187, label %188, label %193

188:                                              ; preds = %185
  %189 = load double, ptr %66, align 8, !tbaa !22
  %190 = getelementptr inbounds i8, ptr %66, i64 8
  %191 = load double, ptr %190, align 8, !tbaa !22
  %192 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1048, double noundef %189, double noundef %191)
  br label %193

193:                                              ; preds = %188, %185
  call void @vertexdealloc(ptr noundef nonnull %0, ptr noundef nonnull %66)
  br label %.thread

194:                                              ; preds = %177
  call void @vertexdealloc(ptr noundef nonnull %0, ptr noundef nonnull %66)
  br label %.thread

195:                                              ; preds = %177
  %196 = getelementptr inbounds i8, ptr %1, i64 112
  %197 = load i32, ptr %196, align 8, !tbaa !23
  %.not = icmp eq i32 %197, 0
  br i1 %.not, label %198, label %203

198:                                              ; preds = %195
  %199 = load double, ptr %66, align 8, !tbaa !22
  %200 = getelementptr inbounds i8, ptr %66, i64 8
  %201 = load double, ptr %200, align 8, !tbaa !22
  %202 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1047, double noundef %199, double noundef %201)
  br label %203

203:                                              ; preds = %198, %195
  %.1 = phi i32 [ 0, %195 ], [ 1, %198 ]
  call void @vertexdealloc(ptr noundef nonnull %0, ptr noundef nonnull %66)
  br label %204

204:                                              ; preds = %203, %101
  %.2 = phi i32 [ %.087, %101 ], [ %.1, %203 ]
  %.not94 = icmp eq i32 %.2, 0
  br i1 %.not94, label %.thread, label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %49, align 4, !tbaa !20
  %.not95 = icmp eq i32 %206, 0
  br i1 %.not95, label %219, label %207

207:                                              ; preds = %205
  %208 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1049)
  %209 = load double, ptr %20, align 8, !tbaa !22
  %210 = getelementptr inbounds i8, ptr %20, i64 8
  %211 = load double, ptr %210, align 8, !tbaa !22
  %212 = load double, ptr %27, align 8, !tbaa !22
  %213 = getelementptr inbounds i8, ptr %27, i64 8
  %214 = load double, ptr %213, align 8, !tbaa !22
  %215 = load double, ptr %31, align 8, !tbaa !22
  %216 = getelementptr inbounds i8, ptr %31, i64 8
  %217 = load double, ptr %216, align 8, !tbaa !22
  %218 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.944, double noundef %209, double noundef %211, double noundef %212, double noundef %214, double noundef %215, double noundef %217)
  br label %219

219:                                              ; preds = %207, %205
  %220 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1050)
  %221 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1051)
  %222 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1052)
  %223 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1053)
  call void @precisionerror()
  br label %.thread

.thread:                                          ; preds = %194, %193, %179, %183, %204, %219, %44, %40, %36, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  ret void
}

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"badtriang", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"otri", !7, i64 0, !13, i64 8}
!13 = !{!"int", !8, i64 0}
!14 = !{!12, !7, i64 0}
!15 = !{!13, !13, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!6, !7, i64 16}
!18 = !{!6, !7, i64 24}
!19 = !{!6, !7, i64 32}
!20 = !{!21, !13, i64 116}
!21 = !{!"behavior", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !13, i64 124, !13, i64 128, !13, i64 132, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !8, i64 168, !8, i64 2216, !8, i64 4264, !8, i64 6312, !8, i64 8360, !8, i64 10408, !8, i64 12456, !8, i64 14504, !8, i64 16552, !8, i64 18600, !8, i64 20648, !8, i64 22696}
!22 = !{!10, !10, i64 0}
!23 = !{!21, !13, i64 112}
!24 = !{!25, !13, i64 82716}
!25 = !{!"mesh", !26, i64 0, !26, i64 88, !26, i64 176, !26, i64 264, !26, i64 352, !26, i64 440, !26, i64 528, !26, i64 616, !8, i64 704, !8, i64 33472, !8, i64 66240, !13, i64 82624, !7, i64 82632, !10, i64 82640, !10, i64 82648, !10, i64 82656, !10, i64 82664, !10, i64 82672, !13, i64 82680, !13, i64 82684, !13, i64 82688, !13, i64 82692, !13, i64 82696, !13, i64 82700, !27, i64 82704, !13, i64 82712, !13, i64 82716, !13, i64 82720, !27, i64 82728, !13, i64 82736, !13, i64 82740, !13, i64 82744, !13, i64 82748, !13, i64 82752, !13, i64 82756, !13, i64 82760, !13, i64 82764, !13, i64 82768, !27, i64 82776, !27, i64 82784, !27, i64 82792, !27, i64 82800, !27, i64 82808, !27, i64 82816, !27, i64 82824, !7, i64 82832, !7, i64 82840, !7, i64 82848, !7, i64 82856, !7, i64 82864, !7, i64 82872, !7, i64 82880, !12, i64 82888}
!26 = !{!"memorypool", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !27, i64 64, !27, i64 72, !13, i64 80, !13, i64 84}
!27 = !{!"long", !8, i64 0}
!28 = distinct !{!28, !29, !30, !31}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = distinct !{!32, !29, !30}
!33 = !{!25, !13, i64 82740}
!34 = !{!25, !13, i64 82736}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass