; LLVM IR from jasonlmfong/Model-Modifier :: Model-Modifier/src/scene/Mesh.ll (ZN4Mesh16BuildFaceNormalsEv)

; 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.glm::vec" = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%class.Mesh = type { %class.Object, i32, %"class.std::vector", i32, ptr, i32, ptr }
%class.Object = type { %"struct.glm::vec", %"struct.glm::vec", %"class.std::vector", %"class.std::vector.2", %"class.std::vector.2", %"class.std::unordered_map" }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<std::vector<unsigned int>, std::allocator<std::vector<unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned int>, std::allocator<std::vector<unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned int>, std::allocator<std::vector<unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned int>, std::allocator<std::vector<unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<glm::vec<3, float>, std::allocator<glm::vec<3, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::vec<3, float>, std::allocator<glm::vec<3, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::vec<3, float>, std::allocator<glm::vec<3, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::vec<3, float>, std::allocator<glm::vec<3, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Mesh16BuildFaceNormalsEv(ptr noundef nonnull align 8 dereferenceable(216) %0) #0 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.glm::vec", align 4
  %8 = alloca %"struct.glm::vec", align 4
  %9 = alloca %"struct.glm::vec", align 4
  %10 = alloca { <2 x float>, float }, align 8
  %11 = alloca %"struct.glm::vec", align 4
  %12 = alloca { <2 x float>, float }, align 8
  %13 = alloca { <2 x float>, float }, align 8
  %14 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  %16 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 2
  %17 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %18 = getelementptr inbounds %class.Object, ptr %17, i32 0, i32 4
  %19 = call noundef i64 @_ZNKSt6vectorIS_IjSaIjEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %78, %1
  %21 = load i32, ptr %3, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %24 = getelementptr inbounds %class.Object, ptr %23, i32 0, i32 4
  %25 = call noundef i64 @_ZNKSt6vectorIS_IjSaIjEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %26 = icmp ult i64 %22, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %81

28:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %29 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %30 = getelementptr inbounds %class.Object, ptr %29, i32 0, i32 4
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %32) #7
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef 0) #7
  %35 = load i32, ptr %34, align 4, !tbaa !9
  store i32 %35, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %36 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %37 = getelementptr inbounds %class.Object, ptr %36, i32 0, i32 4
  %38 = load i32, ptr %3, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %39) #7
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef 1) #7
  %42 = load i32, ptr %41, align 4, !tbaa !9
  store i32 %42, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %43 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %44 = getelementptr inbounds %class.Object, ptr %43, i32 0, i32 4
  %45 = load i32, ptr %3, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %46) #7
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef 2) #7
  %49 = load i32, ptr %48, align 4, !tbaa !9
  store i32 %49, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #7
  %50 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %51 = getelementptr inbounds %class.Object, ptr %50, i32 0, i32 2
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %51, i64 noundef %53) #7
  %55 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %56 = getelementptr inbounds %class.Object, ptr %55, i32 0, i32 2
  %57 = load i32, ptr %4, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef %58) #7
  %60 = call { <2 x float>, float } @_ZN3glmmiIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %59)
  store { <2 x float>, float } %60, ptr %10, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 8 %10, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #7
  %61 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %62 = getelementptr inbounds %class.Object, ptr %61, i32 0, i32 2
  %63 = load i32, ptr %6, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #7
  %66 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 0
  %67 = getelementptr inbounds %class.Object, ptr %66, i32 0, i32 2
  %68 = load i32, ptr %4, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %67, i64 noundef %69) #7
  %71 = call { <2 x float>, float } @_ZN3glmmiIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12) %65, ptr noundef nonnull align 4 dereferenceable(12) %70)
  store { <2 x float>, float } %71, ptr %12, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %12, i64 12, i1 false)
  %72 = call { <2 x float>, float } @_ZN3glm5crossIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %11)
  store { <2 x float>, float } %72, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %13, i64 12, i1 false)
  %73 = call { <2 x float>, float } @_ZN3glm9normalizeILi3EfLNS_9qualifierE0EEENS_3vecIXT_ET0_XT1_EEERKS4_(ptr noundef nonnull align 4 dereferenceable(12) %8)
  store { <2 x float>, float } %73, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 8 %14, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  %74 = getelementptr inbounds %class.Mesh, ptr %15, i32 0, i32 2
  %75 = load i32, ptr %3, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %76) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %77, ptr align 4 %7, i64 12, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %78

78:                                               ; preds = %28
  %79 = load i32, ptr %3, align 4, !tbaa !9
  %80 = add i32 %79, 1
  store i32 %80, ptr %3, align 4, !tbaa !9
  br label %20, !llvm.loop !13

81:                                               ; preds = %27
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIS_IjSaIjEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3glm9normalizeILi3EfLNS_9qualifierE0EEENS_3vecIXT_ET0_XT1_EEERKS4_(ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3glm5crossIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3glmmiIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !12, i64 8, i64 4, !12}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

%"struct.glm::vec" = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Mesh16BuildFaceNormalsEv(ptr noundef nonnull align 8 dereferenceable(216) %0) local_unnamed_addr #0 align 2 {
  %2 = alloca %"struct.glm::vec", align 8
  %3 = alloca %"struct.glm::vec", align 8
  %4 = alloca %"struct.glm::vec", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 160
  %6 = getelementptr inbounds i8, ptr %0, i64 72
  %7 = tail call noundef i64 @_ZNKSt6vectorIS_IjSaIjEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  tail call void @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %7)
  %8 = tail call noundef i64 @_ZNKSt6vectorIS_IjSaIjEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %.sroa.212.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  br label %10

._crit_edge:                                      ; preds = %10, %1
  ret void

10:                                               ; preds = %.lr.ph, %10
  %11 = phi i64 [ 0, %.lr.ph ], [ %34, %10 ]
  %.024 = phi i32 [ 0, %.lr.ph ], [ %33, %10 ]
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %11) #6
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0) #6
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %11) #6
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef 1) #6
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %11) #6
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef 2) #6
  %20 = load i32, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #6
  %21 = zext i32 %17 to i64
  %22 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %21) #6
  %23 = zext i32 %14 to i64
  %24 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %23) #6
  %25 = call { <2 x float>, float } @_ZN3glmmiIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %24)
  %.fca.0.extract9 = extractvalue { <2 x float>, float } %25, 0
  %.fca.1.extract10 = extractvalue { <2 x float>, float } %25, 1
  store <2 x float> %.fca.0.extract9, ptr %3, align 8
  store float %.fca.1.extract10, ptr %.sroa.212.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  %26 = zext i32 %20 to i64
  %27 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %26) #6
  %28 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %23) #6
  %29 = call { <2 x float>, float } @_ZN3glmmiIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(12) %28)
  %.fca.0.extract5 = extractvalue { <2 x float>, float } %29, 0
  %.fca.1.extract6 = extractvalue { <2 x float>, float } %29, 1
  store <2 x float> %.fca.0.extract5, ptr %4, align 8
  store float %.fca.1.extract6, ptr %.sroa.28.0..sroa_idx, align 8
  %30 = call { <2 x float>, float } @_ZN3glm5crossIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.fca.0.extract1 = extractvalue { <2 x float>, float } %30, 0
  %.fca.1.extract2 = extractvalue { <2 x float>, float } %30, 1
  store <2 x float> %.fca.0.extract1, ptr %2, align 8
  store float %.fca.1.extract2, ptr %.sroa.24.0..sroa_idx, align 8
  %31 = call { <2 x float>, float } @_ZN3glm9normalizeILi3EfLNS_9qualifierE0EEENS_3vecIXT_ET0_XT1_EEERKS4_(ptr noundef nonnull align 4 dereferenceable(12) %2)
  %.fca.0.extract = extractvalue { <2 x float>, float } %31, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %31, 1
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #6
  %32 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %11) #6
  store <2 x float> %.fca.0.extract, ptr %32, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 8
  store float %.fca.1.extract, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !9
  %33 = add i32 %.024, 1
  %34 = zext i32 %33 to i64
  %35 = call noundef i64 @_ZNKSt6vectorIS_IjSaIjEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %36 = icmp ugt i64 %35, %34
  br i1 %36, label %10, label %._crit_edge, !llvm.loop !10
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3glm3vecILi3EfLNS0_9qualifierE0EEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIS_IjSaIjEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IjSaIjEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3glm9normalizeILi3EfLNS_9qualifierE0EEENS_3vecIXT_ET0_XT1_EEERKS4_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3glm5crossIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN3glmmiIfLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass