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

; 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] }
%class.Matrix33 = type { [9 x float] }
%"struct.geometry::types::polygon50_t" = type { i32, [50 x %class.Vector3] }
%"struct.geometry::types::polyhedronFeature_t" = type { %"struct.geometry::types::polygon50_t", %class.Vector3 }
%"struct.geometry::types::plane_t" = type { %class.Vector3, %class.Vector3 }
%"struct.geometry::types::isometricTransform_t" = type { %class.Matrix33, %class.Vector3 }
%"struct.geometry::types::gaussMapMesh_t" = type { i32, i32, i32, [1000 x %"struct.geometry::types::leanNeighborTriangle_t"], [500 x %class.Vector3], [1000 x %"struct.geometry::types::gaussMapFace_t"] }
%"struct.geometry::types::leanNeighborTriangle_t" = type { [3 x i32], [3 x i32] }
%"struct.geometry::types::gaussMapFace_t" = type { %class.Vector3, i32, i32 }

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types19polyhedronFeature_tC2Ev(ptr noundef nonnull align 4 dereferenceable(616)) unnamed_addr #3 align 2

declare void @_ZN8geometry4mesh15polygonFromFaceERKNS_5types14gaussMapMesh_tEj(ptr dead_on_unwind writable sret(%"struct.geometry::types::polygon50_t") align 4, ptr noundef nonnull align 4 dereferenceable(50012), i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(604) ptr @_ZN8geometry5types11polygon50_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(604), ptr noundef nonnull align 4 dereferenceable(604)) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry19mostParallelFeatureERKNS_5types20isometricTransform_tERKNS0_14gaussMapMesh_tERKNS0_7plane_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::polyhedronFeature_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(50012) %2, ptr noundef nonnull align 4 dereferenceable(24) %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %class.Vector3, align 4
  %11 = alloca %class.Matrix33, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %class.Vector3, align 4
  %18 = alloca float, align 4
  %19 = alloca %"struct.geometry::types::polygon50_t", align 4
  %20 = alloca %class.Vector3, align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.geometry::types::plane_t", ptr %21, i32 0, i32 1
  store ptr %22, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 36, ptr %11) #5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.geometry::types::isometricTransform_t", ptr %23, i32 0, i32 0
  call void @_ZNK8Matrix339transposeEv(ptr dead_on_unwind writable sret(%class.Matrix33) align 4 %11, ptr noundef nonnull align 4 dereferenceable(36) %24)
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %10, ptr noundef nonnull align 4 dereferenceable(36) %11, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.lifetime.end.p0(i64 36, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store float -1.000000e+00, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %50, %4
  %27 = load i32, ptr %14, align 4, !tbaa !9
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.geometry::types::gaussMapMesh_t", ptr %28, i32 0, i32 2
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = icmp ult i32 %27, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %53

33:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.geometry::types::gaussMapMesh_t", ptr %34, i32 0, i32 5
  %36 = load i32, ptr %14, align 4, !tbaa !9
  %37 = zext i32 %36 to i64
  %38 = getelementptr inbounds [1000 x %"struct.geometry::types::gaussMapFace_t"], ptr %35, i64 0, i64 %37
  %39 = getelementptr inbounds %"struct.geometry::types::gaussMapFace_t", ptr %38, i32 0, i32 0
  store ptr %39, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #5
  %40 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZNK7Vector310unitVectorEv(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %40)
  store ptr %17, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  %42 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %41, ptr noundef nonnull align 4 dereferenceable(12) %10)
  store float %42, ptr %18, align 4, !tbaa !11
  %43 = load float, ptr %18, align 4, !tbaa !11
  %44 = load float, ptr %13, align 4, !tbaa !11
  %45 = fcmp ogt float %43, %44
  br i1 %45, label %46, label %49

46:                                               ; preds = %33
  %47 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %47, ptr %12, align 4, !tbaa !9
  %48 = load float, ptr %18, align 4, !tbaa !11
  store float %48, ptr %13, align 4, !tbaa !11
  br label %49

49:                                               ; preds = %46, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %14, align 4, !tbaa !9
  %52 = add i32 %51, 1
  store i32 %52, ptr %14, align 4, !tbaa !9
  br label %26, !llvm.loop !15

53:                                               ; preds = %32
  call void @_ZN8geometry5types19polyhedronFeature_tC2Ev(ptr noundef nonnull align 4 dereferenceable(616) %0)
  call void @llvm.lifetime.start.p0(i64 604, ptr %19) #5
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = load i32, ptr %12, align 4, !tbaa !9
  call void @_ZN8geometry4mesh15polygonFromFaceERKNS_5types14gaussMapMesh_tEj(ptr dead_on_unwind writable sret(%"struct.geometry::types::polygon50_t") align 4 %19, ptr noundef nonnull align 4 dereferenceable(50012) %54, i32 noundef %55)
  %56 = getelementptr inbounds %"struct.geometry::types::polyhedronFeature_t", ptr %0, i32 0, i32 0
  %57 = call noundef nonnull align 4 dereferenceable(604) ptr @_ZN8geometry5types11polygon50_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(604) %56, ptr noundef nonnull align 4 dereferenceable(604) %19)
  call void @llvm.lifetime.end.p0(i64 604, ptr %19) #5
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.geometry::types::polyhedronFeature_t", ptr %0, i32 0, i32 0
  call void @_ZN8geometry7polygon19applyTransformationERKNS_5types20isometricTransform_tERNS1_11polygon50_tE(ptr noundef nonnull align 4 dereferenceable(48) %58, ptr noundef nonnull align 4 dereferenceable(604) %59)
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #5
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.geometry::types::isometricTransform_t", ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.geometry::types::gaussMapMesh_t", ptr %62, i32 0, i32 5
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds [1000 x %"struct.geometry::types::gaussMapFace_t"], ptr %63, i64 0, i64 %65
  %67 = getelementptr inbounds %"struct.geometry::types::gaussMapFace_t", ptr %66, i32 0, i32 0
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %20, ptr noundef nonnull align 4 dereferenceable(36) %61, ptr noundef nonnull align 4 dereferenceable(12) %67)
  %68 = getelementptr inbounds %"struct.geometry::types::polyhedronFeature_t", ptr %0, i32 0, i32 1
  %69 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %68, ptr noundef nonnull align 4 dereferenceable(12) %20)
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #5
  %70 = getelementptr inbounds %"struct.geometry::types::polyhedronFeature_t", ptr %0, i32 0, i32 1
  %71 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector39NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %70)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void
}

declare void @_ZN8geometry7polygon19applyTransformationERKNS_5types20isometricTransform_tERNS1_11polygon50_tE(ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(604)) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTSN8geometry5types14gaussMapMesh_tE", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 24012, !7, i64 30012}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; 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] }
%class.Matrix33 = type { [9 x float] }
%"struct.geometry::types::polygon50_t" = type { i32, [50 x %class.Vector3] }
%"struct.geometry::types::polyhedronFeature_t" = type { %"struct.geometry::types::polygon50_t", %class.Vector3 }
%"struct.geometry::types::gaussMapFace_t" = type { %class.Vector3, i32, i32 }

; 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 uwtable
declare dso_local void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types19polyhedronFeature_tC2Ev(ptr noundef nonnull align 4 dereferenceable(616)) unnamed_addr #3 align 2

declare void @_ZN8geometry4mesh15polygonFromFaceERKNS_5types14gaussMapMesh_tEj(ptr dead_on_unwind writable sret(%"struct.geometry::types::polygon50_t") align 4, ptr noundef nonnull align 4 dereferenceable(50012), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(604) ptr @_ZN8geometry5types11polygon50_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(604), ptr noundef nonnull align 4 dereferenceable(604)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry19mostParallelFeatureERKNS_5types20isometricTransform_tERKNS0_14gaussMapMesh_tERKNS0_7plane_tE(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::polyhedronFeature_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(50012) %2, ptr noundef nonnull align 4 dereferenceable(24) %3) local_unnamed_addr #1 {
  %5 = alloca %class.Vector3, align 4
  %6 = alloca %class.Matrix33, align 4
  %7 = alloca %class.Vector3, align 4
  %8 = alloca %"struct.geometry::types::polygon50_t", align 4
  %9 = alloca %class.Vector3, align 4
  %10 = getelementptr inbounds i8, ptr %3, i64 12
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %6) #5
  call void @_ZNK8Matrix339transposeEv(ptr dead_on_unwind nonnull writable sret(%class.Matrix33) align 4 %6, ptr noundef nonnull align 4 dereferenceable(36) %1)
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %5, ptr noundef nonnull align 4 dereferenceable(36) %6, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6) #5
  %11 = getelementptr inbounds i8, ptr %2, i64 8
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %13 = getelementptr inbounds i8, ptr %2, i64 30012
  br label %21

._crit_edge:                                      ; preds = %21, %4
  %.0.lcssa = phi i32 [ 0, %4 ], [ %.1, %21 ]
  call void @_ZN8geometry5types19polyhedronFeature_tC2Ev(ptr noundef nonnull align 4 dereferenceable(616) %0)
  call void @llvm.lifetime.start.p0(i64 604, ptr nonnull %8) #5
  call void @_ZN8geometry4mesh15polygonFromFaceERKNS_5types14gaussMapMesh_tEj(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::polygon50_t") align 4 %8, ptr noundef nonnull align 4 dereferenceable(50012) %2, i32 noundef %.0.lcssa)
  %14 = call noundef nonnull align 4 dereferenceable(604) ptr @_ZN8geometry5types11polygon50_taSEOS1_(ptr noundef nonnull align 4 dereferenceable(604) %0, ptr noundef nonnull align 4 dereferenceable(604) %8)
  call void @llvm.lifetime.end.p0(i64 604, ptr nonnull %8) #5
  call void @_ZN8geometry7polygon19applyTransformationERKNS_5types20isometricTransform_tERNS1_11polygon50_tE(ptr noundef nonnull align 4 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(604) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  %15 = getelementptr inbounds i8, ptr %2, i64 30012
  %16 = zext i32 %.0.lcssa to i64
  %17 = getelementptr inbounds [1000 x %"struct.geometry::types::gaussMapFace_t"], ptr %15, i64 0, i64 %16
  call void @_ZNK8Matrix33mlERK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %9, ptr noundef nonnull align 4 dereferenceable(36) %1, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %18 = getelementptr inbounds i8, ptr %0, i64 604
  %19 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  %20 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector39NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %18)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #5
  ret void

21:                                               ; preds = %.lr.ph, %21
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %21 ]
  %.025 = phi i32 [ 0, %.lr.ph ], [ %.1, %21 ]
  %.01924 = phi float [ -1.000000e+00, %.lr.ph ], [ %.120, %21 ]
  %22 = getelementptr inbounds [1000 x %"struct.geometry::types::gaussMapFace_t"], ptr %13, i64 0, i64 %indvars.iv
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #5
  call void @_ZNK7Vector310unitVectorEv(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %22)
  %23 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) %5)
  %24 = fcmp ogt float %23, %.01924
  %.120 = select i1 %24, float %23, float %.01924
  %25 = trunc nuw i64 %indvars.iv to i32
  %.1 = select i1 %24, i32 %25, i32 %.025
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr %11, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = icmp ult i64 %indvars.iv.next, %27
  br i1 %28, label %21, label %._crit_edge, !llvm.loop !10
}

declare void @_ZN8geometry7polygon19applyTransformationERKNS_5types20isometricTransform_tERNS1_11polygon50_tE(ptr noundef nonnull align 4 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(604)) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 8}
!6 = !{!"_ZTSN8geometry5types14gaussMapMesh_tE", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !8, i64 24012, !8, i64 30012}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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