; LLVM IR from MIT-SPARK/Kimera-VIO :: third_party/triangle/src (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.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, float, float, float, float }
%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, float, float, float, float, float, 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 }

@.str.66 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @trimalloc(i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @trifree(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @traversalinit(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @vertextraverse(ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @removeghosts(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i64 @divconqdelaunay(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.otri, align 8
  %7 = alloca %struct.otri, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.behavior, ptr %11, i32 0, i32 29
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %2
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.66)
  br label %17

17:                                               ; preds = %15, %2
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.mesh, ptr %18, i32 0, i32 18
  %20 = load i32, ptr %19, align 4, !tbaa !13
  %21 = mul nsw i32 %20, 8
  %22 = call ptr @trimalloc(i32 noundef %21)
  store ptr %22, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.mesh, ptr %23, i32 0, i32 2
  call void @traversalinit(ptr noundef %24)
  store i32 0, ptr %9, align 4, !tbaa !18
  br label %25

25:                                               ; preds = %38, %17
  %26 = load i32, ptr %9, align 4, !tbaa !18
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.mesh, ptr %27, i32 0, i32 18
  %29 = load i32, ptr %28, align 4, !tbaa !13
  %30 = icmp slt i32 %26, %29
  br i1 %30, label %31, label %41

31:                                               ; preds = %25
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = call ptr @vertextraverse(ptr noundef %32)
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i32, ptr %9, align 4, !tbaa !18
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %34, i64 %36
  store ptr %33, ptr %37, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %31
  %39 = load i32, ptr %9, align 4, !tbaa !18
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %9, align 4, !tbaa !18
  br label %25, !llvm.loop !19

41:                                               ; preds = %25
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.mesh, ptr %43, i32 0, i32 18
  %45 = load i32, ptr %44, align 4, !tbaa !13
  call void @vertexsort(ptr noundef %42, i32 noundef %45)
  store i32 0, ptr %9, align 4, !tbaa !18
  store i32 1, ptr %10, align 4, !tbaa !18
  br label %46

46:                                               ; preds = %136, %41
  %47 = load i32, ptr %10, align 4, !tbaa !18
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.mesh, ptr %48, i32 0, i32 18
  %50 = load i32, ptr %49, align 4, !tbaa !13
  %51 = icmp slt i32 %47, %50
  br i1 %51, label %52, label %139

52:                                               ; preds = %46
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !18
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds ptr, ptr %53, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = getelementptr inbounds float, ptr %57, i64 0
  %59 = load float, ptr %58, align 4, !tbaa !21
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = load i32, ptr %10, align 4, !tbaa !18
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds ptr, ptr %60, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds float, ptr %64, i64 0
  %66 = load float, ptr %65, align 4, !tbaa !21
  %67 = fcmp oeq float %59, %66
  br i1 %67, label %68, label %123

68:                                               ; preds = %52
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load i32, ptr %9, align 4, !tbaa !18
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds ptr, ptr %69, i64 %71
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds float, ptr %73, i64 1
  %75 = load float, ptr %74, align 4, !tbaa !21
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load i32, ptr %10, align 4, !tbaa !18
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds ptr, ptr %76, i64 %78
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds float, ptr %80, i64 1
  %82 = load float, ptr %81, align 4, !tbaa !21
  %83 = fcmp oeq float %75, %82
  br i1 %83, label %84, label %123

84:                                               ; preds = %68
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.behavior, ptr %85, i32 0, i32 28
  %87 = load i32, ptr %86, align 4, !tbaa !22
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %107, label %89

89:                                               ; preds = %84
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = load i32, ptr %10, align 4, !tbaa !18
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds ptr, ptr %90, i64 %92
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds float, ptr %94, i64 0
  %96 = load float, ptr %95, align 4, !tbaa !21
  %97 = fpext float %96 to double
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load i32, ptr %10, align 4, !tbaa !18
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %98, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = getelementptr inbounds float, ptr %102, i64 1
  %104 = load float, ptr %103, align 4, !tbaa !21
  %105 = fpext float %104 to double
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.67, double noundef %97, double noundef %105)
  br label %107

107:                                              ; preds = %89, %84
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = load i32, ptr %10, align 4, !tbaa !18
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds ptr, ptr %108, i64 %110
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.mesh, ptr %113, i32 0, i32 30
  %115 = load i32, ptr %114, align 4, !tbaa !23
  %116 = add nsw i32 %115, 1
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %112, i64 %117
  store i32 -32767, ptr %118, align 4, !tbaa !18
  %119 = load ptr, ptr %3, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.mesh, ptr %119, i32 0, i32 23
  %121 = load i32, ptr %120, align 8, !tbaa !24
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %120, align 8, !tbaa !24
  br label %135

123:                                              ; preds = %68, %52
  %124 = load i32, ptr %9, align 4, !tbaa !18
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %9, align 4, !tbaa !18
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = load i32, ptr %10, align 4, !tbaa !18
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds ptr, ptr %126, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = load i32, ptr %9, align 4, !tbaa !18
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds ptr, ptr %131, i64 %133
  store ptr %130, ptr %134, align 8, !tbaa !5
  br label %135

135:                                              ; preds = %123, %107
  br label %136

136:                                              ; preds = %135
  %137 = load i32, ptr %10, align 4, !tbaa !18
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %10, align 4, !tbaa !18
  br label %46, !llvm.loop !25

139:                                              ; preds = %46
  %140 = load i32, ptr %9, align 4, !tbaa !18
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %9, align 4, !tbaa !18
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.behavior, ptr %142, i32 0, i32 25
  %144 = load i32, ptr %143, align 4, !tbaa !26
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %168

146:                                              ; preds = %139
  %147 = load i32, ptr %9, align 4, !tbaa !18
  %148 = ashr i32 %147, 1
  store i32 %148, ptr %8, align 4, !tbaa !18
  %149 = load i32, ptr %9, align 4, !tbaa !18
  %150 = load i32, ptr %8, align 4, !tbaa !18
  %151 = sub nsw i32 %149, %150
  %152 = icmp sge i32 %151, 2
  br i1 %152, label %153, label %167

153:                                              ; preds = %146
  %154 = load i32, ptr %8, align 4, !tbaa !18
  %155 = icmp sge i32 %154, 2
  br i1 %155, label %156, label %159

156:                                              ; preds = %153
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = load i32, ptr %8, align 4, !tbaa !18
  call void @alternateaxes(ptr noundef %157, i32 noundef %158, i32 noundef 1)
  br label %159

159:                                              ; preds = %156, %153
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = load i32, ptr %8, align 4, !tbaa !18
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds ptr, ptr %160, i64 %162
  %164 = load i32, ptr %9, align 4, !tbaa !18
  %165 = load i32, ptr %8, align 4, !tbaa !18
  %166 = sub nsw i32 %164, %165
  call void @alternateaxes(ptr noundef %163, i32 noundef %166, i32 noundef 1)
  br label %167

167:                                              ; preds = %159, %146
  br label %168

168:                                              ; preds = %167, %139
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.behavior, ptr %169, i32 0, i32 29
  %171 = load i32, ptr %170, align 4, !tbaa !9
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %175

173:                                              ; preds = %168
  %174 = call i32 (ptr, ...) @printf(ptr noundef @.str.68)
  br label %175

175:                                              ; preds = %173, %168
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = load i32, ptr %9, align 4, !tbaa !18
  call void @divconqrecurse(ptr noundef %176, ptr noundef %177, ptr noundef %178, i32 noundef %179, i32 noundef 0, ptr noundef %6, ptr noundef %7)
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  call void @trifree(ptr noundef %180)
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = call i64 @removeghosts(ptr noundef %181, ptr noundef %182, ptr noundef %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret i64 %183
}

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

!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, !11, i64 116}
!10 = !{!"behavior", !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, !12, i64 136, !12, i64 140, !12, i64 144, !12, i64 148}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !11, i64 82660}
!14 = !{!"mesh", !15, i64 0, !15, i64 88, !15, i64 176, !15, i64 264, !15, i64 352, !15, i64 440, !15, i64 528, !15, i64 616, !7, i64 704, !7, i64 33472, !7, i64 66240, !11, i64 82624, !6, i64 82632, !12, i64 82640, !12, i64 82644, !12, i64 82648, !12, i64 82652, !12, i64 82656, !11, i64 82660, !11, i64 82664, !11, i64 82668, !11, i64 82672, !11, i64 82676, !11, i64 82680, !16, i64 82688, !11, i64 82696, !11, i64 82700, !11, i64 82704, !16, i64 82712, !11, i64 82720, !11, i64 82724, !11, i64 82728, !11, i64 82732, !11, i64 82736, !11, i64 82740, !11, i64 82744, !11, i64 82748, !11, i64 82752, !16, i64 82760, !16, i64 82768, !16, i64 82776, !16, i64 82784, !16, i64 82792, !16, i64 82800, !16, i64 82808, !6, i64 82816, !6, i64 82824, !6, i64 82832, !6, i64 82840, !6, i64 82848, !6, i64 82856, !6, i64 82864, !17, i64 82872}
!15 = !{!"memorypool", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !16, i64 64, !16, i64 72, !11, i64 80, !11, i64 84}
!16 = !{!"long", !7, i64 0}
!17 = !{!"otri", !6, i64 0, !11, i64 8}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!12, !12, i64 0}
!22 = !{!10, !11, i64 112}
!23 = !{!14, !11, i64 82724}
!24 = !{!14, !11, i64 82680}
!25 = distinct !{!25, !20}
!26 = !{!10, !11, i64 100}


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

@.str.66 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @trimalloc(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: 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) #1

; Function Attrs: nounwind uwtable
declare dso_local void @trifree(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @traversalinit(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @vertextraverse(ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @removeghosts(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @divconqdelaunay(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.otri, align 8
  %4 = alloca %struct.otri, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %5 = getelementptr inbounds i8, ptr %1, i64 116
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %9, label %7

7:                                                ; preds = %2
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.66)
  br label %9

9:                                                ; preds = %7, %2
  %10 = getelementptr inbounds i8, ptr %0, i64 82660
  %11 = load i32, ptr %10, align 4, !tbaa !11
  %12 = shl nsw i32 %11, 3
  %13 = tail call ptr @trimalloc(i32 noundef %12)
  %14 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @traversalinit(ptr noundef nonnull %14)
  %15 = load i32, ptr %10, align 4, !tbaa !11
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %9, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %9 ]
  %17 = tail call ptr @vertextraverse(ptr noundef nonnull %0)
  %18 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv
  store ptr %17, ptr %18, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = load i32, ptr %10, align 4, !tbaa !11
  %20 = sext i32 %19 to i64
  %21 = icmp slt i64 %indvars.iv.next, %20
  br i1 %21, label %.lr.ph, label %._crit_edge, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %9
  %.lcssa = phi i32 [ %15, %9 ], [ %19, %.lr.ph ]
  tail call void @vertexsort(ptr noundef %13, i32 noundef %.lcssa)
  %22 = load i32, ptr %10, align 4, !tbaa !11
  %23 = icmp sgt i32 %22, 1
  br i1 %23, label %.lr.ph68, label %._crit_edge69

.lr.ph68:                                         ; preds = %._crit_edge
  %24 = getelementptr inbounds i8, ptr %1, i64 112
  %25 = getelementptr inbounds i8, ptr %0, i64 82724
  %26 = getelementptr inbounds i8, ptr %0, i64 82680
  br label %27

27:                                               ; preds = %.lr.ph68, %61
  %28 = phi i32 [ %22, %.lr.ph68 ], [ %62, %61 ]
  %indvars.iv73 = phi i64 [ 1, %.lr.ph68 ], [ %indvars.iv.next74, %61 ]
  %.165 = phi i32 [ 0, %.lr.ph68 ], [ %.2, %61 ]
  %29 = sext i32 %.165 to i64
  %30 = getelementptr inbounds ptr, ptr %13, i64 %29
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = load float, ptr %31, align 4, !tbaa !20
  %33 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv73
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  %35 = load float, ptr %34, align 4, !tbaa !20
  %36 = fcmp oeq float %32, %35
  br i1 %36, label %37, label %57

37:                                               ; preds = %27
  %38 = getelementptr inbounds i8, ptr %31, i64 4
  %39 = load float, ptr %38, align 4, !tbaa !20
  %40 = getelementptr inbounds i8, ptr %34, i64 4
  %41 = load float, ptr %40, align 4, !tbaa !20
  %42 = fcmp oeq float %39, %41
  br i1 %42, label %43, label %57

43:                                               ; preds = %37
  %44 = load i32, ptr %24, align 4, !tbaa !21
  %.not63 = icmp eq i32 %44, 0
  br i1 %.not63, label %45, label %49

45:                                               ; preds = %43
  %46 = fpext float %35 to double
  %47 = fpext float %41 to double
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.67, double noundef %46, double noundef %47)
  %.pre = load ptr, ptr %33, align 8, !tbaa !17
  br label %49

49:                                               ; preds = %45, %43
  %50 = phi ptr [ %.pre, %45 ], [ %34, %43 ]
  %51 = load i32, ptr %25, align 4, !tbaa !22
  %52 = sext i32 %51 to i64
  %53 = getelementptr i32, ptr %50, i64 %52
  %54 = getelementptr i8, ptr %53, i64 4
  store i32 -32767, ptr %54, align 4, !tbaa !23
  %55 = load i32, ptr %26, align 8, !tbaa !24
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %26, align 8, !tbaa !24
  %.pre76 = load i32, ptr %10, align 4, !tbaa !11
  br label %61

57:                                               ; preds = %37, %27
  %58 = add nsw i32 %.165, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds ptr, ptr %13, i64 %59
  store ptr %34, ptr %60, align 8, !tbaa !17
  br label %61

61:                                               ; preds = %49, %57
  %62 = phi i32 [ %.pre76, %49 ], [ %28, %57 ]
  %.2 = phi i32 [ %.165, %49 ], [ %58, %57 ]
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv.next74, %63
  br i1 %64, label %27, label %._crit_edge69.loopexit, !llvm.loop !25

._crit_edge69.loopexit:                           ; preds = %61
  %65 = add nsw i32 %.2, 1
  br label %._crit_edge69

._crit_edge69:                                    ; preds = %._crit_edge69.loopexit, %._crit_edge
  %.1.lcssa = phi i32 [ 1, %._crit_edge ], [ %65, %._crit_edge69.loopexit ]
  %66 = getelementptr inbounds i8, ptr %1, i64 100
  %67 = load i32, ptr %66, align 4, !tbaa !26
  %.not61 = icmp eq i32 %67, 0
  br i1 %.not61, label %78, label %68

68:                                               ; preds = %._crit_edge69
  %69 = ashr i32 %.1.lcssa, 1
  %70 = sub nsw i32 %.1.lcssa, %69
  %71 = icmp sgt i32 %70, 1
  br i1 %71, label %72, label %78

72:                                               ; preds = %68
  %73 = icmp sgt i32 %69, 1
  br i1 %73, label %74, label %75

74:                                               ; preds = %72
  tail call void @alternateaxes(ptr noundef %13, i32 noundef %69, i32 noundef 1)
  br label %75

75:                                               ; preds = %74, %72
  %76 = sext i32 %69 to i64
  %77 = getelementptr inbounds ptr, ptr %13, i64 %76
  tail call void @alternateaxes(ptr noundef %77, i32 noundef %70, i32 noundef 1)
  br label %78

78:                                               ; preds = %68, %75, %._crit_edge69
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %.not62 = icmp eq i32 %79, 0
  br i1 %.not62, label %82, label %80

80:                                               ; preds = %78
  %81 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.68)
  br label %82

82:                                               ; preds = %80, %78
  call void @divconqrecurse(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef %13, i32 noundef %.1.lcssa, i32 noundef 0, ptr noundef nonnull %3, ptr noundef nonnull %4)
  call void @trifree(ptr noundef %13)
  %83 = call i64 @removeghosts(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  ret i64 %83
}

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

!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 116}
!6 = !{!"behavior", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!12, !7, i64 82660}
!12 = !{!"mesh", !13, i64 0, !13, i64 88, !13, i64 176, !13, i64 264, !13, i64 352, !13, i64 440, !13, i64 528, !13, i64 616, !8, i64 704, !8, i64 33472, !8, i64 66240, !7, i64 82624, !14, i64 82632, !10, i64 82640, !10, i64 82644, !10, i64 82648, !10, i64 82652, !10, i64 82656, !7, i64 82660, !7, i64 82664, !7, i64 82668, !7, i64 82672, !7, i64 82676, !7, i64 82680, !15, i64 82688, !7, i64 82696, !7, i64 82700, !7, i64 82704, !15, i64 82712, !7, i64 82720, !7, i64 82724, !7, i64 82728, !7, i64 82732, !7, i64 82736, !7, i64 82740, !7, i64 82744, !7, i64 82748, !7, i64 82752, !15, i64 82760, !15, i64 82768, !15, i64 82776, !15, i64 82784, !15, i64 82792, !15, i64 82800, !15, i64 82808, !14, i64 82816, !14, i64 82824, !14, i64 82832, !14, i64 82840, !14, i64 82848, !14, i64 82856, !14, i64 82864, !16, i64 82872}
!13 = !{!"memorypool", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !15, i64 64, !15, i64 72, !7, i64 80, !7, i64 84}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"otri", !14, i64 0, !7, i64 8}
!17 = !{!14, !14, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!10, !10, i64 0}
!21 = !{!6, !7, i64 112}
!22 = !{!12, !7, i64 82724}
!23 = !{!7, !7, i64 0}
!24 = !{!12, !7, i64 82680}
!25 = distinct !{!25, !19}
!26 = !{!6, !7, i64 100}


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