; LLVM IR from Slingshot-Physics/slingshot-community :: common/geometry/src (epa_types)

; 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.Vector3 = type { [3 x float] }
%"struct.geometry::types::epa::epaMesh_t" = type { %"class.geometry::mesh::TriangleGraphMesh", [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], i32 }
%"class.geometry::mesh::TriangleGraphMesh" = type { i32, [128 x %"struct.geometry::types::leanNeighborTriangle_t"] }
%"struct.geometry::types::leanNeighborTriangle_t" = type { [3 x i32], [3 x i32] }
%"struct.geometry::types::minkowskiDiffVertex_t" = type { i32, i32, %class.Vector3, %class.Vector3, %class.Vector3 }
%struct.data_triangleMesh_s = type { i32, [1000 x %struct.meshTriangle], i32, [500 x %struct.vector3] }
%struct.meshTriangle = type { [3 x i32], %struct.vector3 }
%struct.vector3 = type { [3 x float] }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj128EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(3076)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry5types3epa9epaMesh_t16to_triangle_meshEP19data_triangleMesh_s(ptr noundef nonnull align 4 dereferenceable(19976) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.Vector3, align 4
  %6 = alloca i32, align 4
  %7 = alloca %class.Vector3, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %class.Vector3, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %3, align 8
  %14 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 2
  %15 = load i32, ptr %14, align 4, !tbaa !9
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.data_triangleMesh_s, ptr %16, i32 0, i32 2
  store i32 %15, ptr %17, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #4
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !15
  br label %18

18:                                               ; preds = %44, %2
  %19 = load i32, ptr %6, align 4, !tbaa !15
  %20 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 2
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = icmp ult i32 %19, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %47

24:                                               ; preds = %18
  %25 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 1
  %26 = load i32, ptr %6, align 4, !tbaa !15
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %25, i64 0, i64 %27
  %29 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %28, i32 0, i32 2
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.data_triangleMesh_s, ptr %30, i32 0, i32 3
  %32 = load i32, ptr %6, align 4, !tbaa !15
  %33 = zext i32 %32 to i64
  %34 = getelementptr inbounds [500 x %struct.vector3], ptr %31, i64 0, i64 %33
  call void @_ZN8geometry10converters6to_podERK7Vector3P7vector3(ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef %34)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #4
  %35 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 1
  %36 = load i32, ptr %6, align 4, !tbaa !15
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %35, i64 0, i64 %37
  %39 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %38, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %40 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 2
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = uitofp i32 %41 to float
  store float %42, ptr %8, align 4, !tbaa !16
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %43 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #4
  br label %44

44:                                               ; preds = %24
  %45 = load i32, ptr %6, align 4, !tbaa !15
  %46 = add i32 %45, 1
  store i32 %46, ptr %6, align 4, !tbaa !15
  br label %18, !llvm.loop !18

47:                                               ; preds = %23
  %48 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 0
  %49 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj128EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(3076) %48)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.data_triangleMesh_s, ptr %50, i32 0, i32 0
  store i32 %49, ptr %51, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !15
  br label %52

52:                                               ; preds = %121, %47
  %53 = load i32, ptr %9, align 4, !tbaa !15
  %54 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 0
  %55 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj128EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(3076) %54)
  %56 = icmp ult i32 %53, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %52
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %124

58:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !15
  br label %59

59:                                               ; preds = %81, %58
  %60 = load i32, ptr %11, align 4, !tbaa !15
  %61 = icmp slt i32 %60, 3
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %84

63:                                               ; preds = %59
  %64 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 0
  %65 = load i32, ptr %9, align 4, !tbaa !15
  %66 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %64, i32 noundef %65)
  %67 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %66, i32 0, i32 0
  %68 = load i32, ptr %11, align 4, !tbaa !15
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [3 x i32], ptr %67, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !15
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.data_triangleMesh_s, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %9, align 4, !tbaa !15
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds [1000 x %struct.meshTriangle], ptr %73, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.meshTriangle, ptr %76, i32 0, i32 0
  %78 = load i32, ptr %11, align 4, !tbaa !15
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [3 x i32], ptr %77, i64 0, i64 %79
  store i32 %71, ptr %80, align 4, !tbaa !15
  br label %81

81:                                               ; preds = %63
  %82 = load i32, ptr %11, align 4, !tbaa !15
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %11, align 4, !tbaa !15
  br label %59, !llvm.loop !21

84:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #4
  %85 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 1
  %86 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 0
  %87 = load i32, ptr %9, align 4, !tbaa !15
  %88 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %86, i32 noundef %87)
  %89 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds [3 x i32], ptr %89, i64 0, i64 0
  %91 = load i32, ptr %90, align 4, !tbaa !15
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %85, i64 0, i64 %92
  %94 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 1
  %96 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 0
  %97 = load i32, ptr %9, align 4, !tbaa !15
  %98 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %96, i32 noundef %97)
  %99 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds [3 x i32], ptr %99, i64 0, i64 1
  %101 = load i32, ptr %100, align 4, !tbaa !15
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %95, i64 0, i64 %102
  %104 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %103, i32 0, i32 2
  %105 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 1
  %106 = getelementptr inbounds %"struct.geometry::types::epa::epaMesh_t", ptr %13, i32 0, i32 0
  %107 = load i32, ptr %9, align 4, !tbaa !15
  %108 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %106, i32 noundef %107)
  %109 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds [3 x i32], ptr %109, i64 0, i64 2
  %111 = load i32, ptr %110, align 4, !tbaa !15
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %105, i64 0, i64 %112
  %114 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %113, i32 0, i32 2
  call void @_ZN8geometry10calcNormalERK7Vector3S2_S2_S2_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %94, ptr noundef nonnull align 4 dereferenceable(12) %104, ptr noundef nonnull align 4 dereferenceable(12) %114, ptr noundef nonnull align 4 dereferenceable(12) %5)
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.data_triangleMesh_s, ptr %115, i32 0, i32 1
  %117 = load i32, ptr %9, align 4, !tbaa !15
  %118 = zext i32 %117 to i64
  %119 = getelementptr inbounds [1000 x %struct.meshTriangle], ptr %116, i64 0, i64 %118
  %120 = getelementptr inbounds %struct.meshTriangle, ptr %119, i32 0, i32 1
  call void @_ZN8geometry10converters6to_podERK7Vector3P7vector3(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef %120)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #4
  br label %121

121:                                              ; preds = %84
  %122 = load i32, ptr %9, align 4, !tbaa !15
  %123 = add i32 %122, 1
  store i32 %123, ptr %9, align 4, !tbaa !15
  br label %52, !llvm.loop !22

124:                                              ; preds = %57
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

declare void @_ZN8geometry10converters6to_podERK7Vector3P7vector3(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3dvERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076), i32 noundef) #1 align 2

declare void @_ZN8geometry10calcNormalERK7Vector3S2_S2_S2_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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++ TBAA"}
!9 = !{!10, !12, i64 19972}
!10 = !{!"_ZTSN8geometry5types3epa9epaMesh_tE", !11, i64 0, !7, i64 3076, !12, i64 19972}
!11 = !{!"_ZTSN8geometry4mesh17TriangleGraphMeshILj128EEE", !12, i64 0, !7, i64 4}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 24004}
!14 = !{!"_ZTS19data_triangleMesh_s", !12, i64 0, !7, i64 4, !12, i64 24004, !7, i64 24008}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!14, !12, i64 0}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


; 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.Vector3 = type { [3 x float] }
%"struct.geometry::types::minkowskiDiffVertex_t" = type { i32, i32, %class.Vector3, %class.Vector3, %class.Vector3 }
%struct.vector3 = type { [3 x float] }
%struct.meshTriangle = type { [3 x i32], %struct.vector3 }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj128EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(3076)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry5types3epa9epaMesh_t16to_triangle_meshEP19data_triangleMesh_s(ptr noundef nonnull align 4 dereferenceable(19976) %0, ptr noundef %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %class.Vector3, align 4
  %4 = alloca %class.Vector3, align 4
  %5 = alloca float, align 4
  %6 = alloca %class.Vector3, align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 19972
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 24004
  store i32 %8, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #4
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %3)
  %10 = load i32, ptr %7, align 4, !tbaa !5
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 3076
  %12 = getelementptr inbounds i8, ptr %1, i64 24008
  br label %17

._crit_edge:                                      ; preds = %17, %2
  %13 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj128EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(3076) %0)
  store i32 %13, ptr %1, align 4, !tbaa !13
  %14 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj128EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(3076) %0)
  %.not28 = icmp eq i32 %14, 0
  br i1 %.not28, label %._crit_edge27, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  %16 = getelementptr inbounds i8, ptr %0, i64 3076
  br label %.preheader

17:                                               ; preds = %.lr.ph, %17
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %17 ]
  %18 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %11, i64 0, i64 %indvars.iv, i32 2
  %19 = getelementptr inbounds [500 x %struct.vector3], ptr %12, i64 0, i64 %indvars.iv
  call void @_ZN8geometry10converters6to_podERK7Vector3P7vector3(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull %19)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = uitofp i32 %20 to float
  store float %21, ptr %5, align 4, !tbaa !14
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %4, ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %22 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = icmp ult i64 %indvars.iv.next, %24
  br i1 %25, label %17, label %._crit_edge, !llvm.loop !16

.preheader:                                       ; preds = %.preheader.lr.ph, %.preheader
  %indvars.iv33 = phi i64 [ 0, %.preheader.lr.ph ], [ %indvars.iv.next34, %.preheader ]
  %26 = getelementptr inbounds [1000 x %struct.meshTriangle], ptr %15, i64 0, i64 %indvars.iv33
  %27 = trunc nuw i64 %indvars.iv33 to i32
  %28 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %0, i32 noundef %27)
  %29 = load i32, ptr %28, align 4, !tbaa !18
  store i32 %29, ptr %26, align 4, !tbaa !18
  %30 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %0, i32 noundef %27)
  %31 = getelementptr inbounds i8, ptr %30, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !18
  %33 = getelementptr inbounds i8, ptr %26, i64 4
  store i32 %32, ptr %33, align 4, !tbaa !18
  %34 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %0, i32 noundef %27)
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load i32, ptr %35, align 4, !tbaa !18
  %37 = getelementptr inbounds i8, ptr %26, i64 8
  store i32 %36, ptr %37, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #4
  %38 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %0, i32 noundef %27)
  %39 = load i32, ptr %38, align 4, !tbaa !18
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %16, i64 0, i64 %40, i32 2
  %42 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %0, i32 noundef %27)
  %43 = getelementptr inbounds i8, ptr %42, i64 4
  %44 = load i32, ptr %43, align 4, !tbaa !18
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %16, i64 0, i64 %45, i32 2
  %47 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076) %0, i32 noundef %27)
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = load i32, ptr %48, align 4, !tbaa !18
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [384 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %16, i64 0, i64 %50, i32 2
  call void @_ZN8geometry10calcNormalERK7Vector3S2_S2_S2_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %46, ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %52 = getelementptr inbounds [1000 x %struct.meshTriangle], ptr %15, i64 0, i64 %indvars.iv33, i32 1
  call void @_ZN8geometry10converters6to_podERK7Vector3P7vector3(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull %52)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1
  %53 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj128EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(3076) %0)
  %54 = zext i32 %53 to i64
  %55 = icmp ult i64 %indvars.iv.next34, %54
  br i1 %55, label %.preheader, label %._crit_edge27, !llvm.loop !19

._crit_edge27:                                    ; preds = %.preheader, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

declare void @_ZN8geometry10converters6to_podERK7Vector3P7vector3(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3dvERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj128EEixEj(ptr noundef nonnull align 4 dereferenceable(3076), i32 noundef) local_unnamed_addr #1 align 2

declare void @_ZN8geometry10calcNormalERK7Vector3S2_S2_S2_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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, !8, i64 19972}
!6 = !{!"_ZTSN8geometry5types3epa9epaMesh_tE", !7, i64 0, !9, i64 3076, !8, i64 19972}
!7 = !{!"_ZTSN8geometry4mesh17TriangleGraphMeshILj128EEE", !8, i64 0, !9, i64 4}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !8, i64 24004}
!12 = !{!"_ZTS19data_triangleMesh_s", !8, i64 0, !9, i64 4, !8, i64 24004, !9, i64 24008}
!13 = !{!12, !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !9, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!8, !8, i64 0}
!19 = distinct !{!19, !17}


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