; LLVM IR from ThePhysicsGuys/Physics3D :: graphics/debug (guiDebug)

; 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.P3D::Triangle" = type { %union.anon.5 }
%union.anon.5 = type { %struct.anon.6 }
%struct.anon.6 = type { i32, i32, i32 }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"struct.P3D::Vector" = type { %union.anon.3 }
%union.anon.3 = type { [3 x double] }
%"struct.P3D::Vector.7" = type { %union.anon.8 }
%union.anon.8 = type { [3 x float] }
%"class.P3D::MeshPrototype" = type { %"class.P3D::UniqueAlignedPointer", %"class.P3D::UniqueAlignedPointer.4", i32, i32 }
%"class.P3D::UniqueAlignedPointer" = type { ptr }
%"class.P3D::UniqueAlignedPointer.4" = type { ptr }

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3P3D8Graphics8AppDebug7Logging8logShapeERKNS_10PolyhedronERKNS_12GlobalCFrameE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(96) %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.P3D::Triangle", align 4
  %8 = alloca { i64, i32 }, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.P3D::PositionTemplate", align 8
  %11 = alloca %"struct.P3D::Vector", align 8
  %12 = alloca %"struct.P3D::Vector.7", align 4
  %13 = alloca { <2 x float>, float }, align 8
  %14 = alloca %"struct.P3D::Vector", align 8
  %15 = alloca %"struct.P3D::Vector", align 8
  %16 = alloca %"struct.P3D::Vector.7", align 4
  %17 = alloca %"struct.P3D::Vector.7", align 4
  %18 = alloca { <2 x float>, float }, align 8
  %19 = alloca %"struct.P3D::Vector.7", align 4
  %20 = alloca { <2 x float>, float }, align 8
  %21 = alloca { <2 x float>, float }, align 8
  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 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %72, %2
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.P3D::MeshPrototype", ptr %24, i32 0, i32 3
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = icmp slt i32 %23, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %22
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %75

29:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = call { i64, i32 } @_ZNK3P3D13MeshPrototype11getTriangleEi(ptr noundef nonnull align 8 dereferenceable(24) %30, i32 noundef %31)
  %33 = getelementptr inbounds %"struct.P3D::Triangle", ptr %7, i32 0, i32 0
  %34 = getelementptr inbounds %union.anon.5, ptr %33, i32 0, i32 0
  store { i64, i32 } %32, ptr %8, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %8, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %68, %29
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = icmp slt i32 %36, 3
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %71

39:                                               ; preds = %35
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = load i32, ptr %9, align 4, !tbaa !9
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %7, i32 noundef %42)
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %41, i32 noundef %44)
  %46 = getelementptr inbounds %"struct.P3D::Vector.7", ptr %12, i32 0, i32 0
  %47 = getelementptr inbounds %union.anon.8, ptr %46, i32 0, i32 0
  store { <2 x float>, float } %45, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 8 %13, i64 12, i1 false)
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %11, ptr noundef nonnull align 4 dereferenceable(12) %12) #6
  call void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.P3D::PositionTemplate") align 8 %10, ptr noundef nonnull align 8 dereferenceable(96) %40, ptr noundef nonnull align 8 dereferenceable(24) %11)
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #6
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = add nsw i32 %50, 1
  %52 = srem i32 %51, 3
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %7, i32 noundef %52)
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %49, i32 noundef %54)
  %56 = getelementptr inbounds %"struct.P3D::Vector.7", ptr %17, i32 0, i32 0
  %57 = getelementptr inbounds %union.anon.8, ptr %56, i32 0, i32 0
  store { <2 x float>, float } %55, ptr %18, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %57, ptr align 8 %18, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #6
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %7, i32 noundef %59)
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %58, i32 noundef %61)
  %63 = getelementptr inbounds %"struct.P3D::Vector.7", ptr %19, i32 0, i32 0
  %64 = getelementptr inbounds %union.anon.8, ptr %63, i32 0, i32 0
  store { <2 x float>, float } %62, ptr %20, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %64, ptr align 8 %20, i64 12, i1 false)
  %65 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(12) %19) #6
  %66 = getelementptr inbounds %"struct.P3D::Vector.7", ptr %16, i32 0, i32 0
  %67 = getelementptr inbounds %union.anon.8, ptr %66, i32 0, i32 0
  store { <2 x float>, float } %65, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 8 %21, i64 12, i1 false)
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %15, ptr noundef nonnull align 4 dereferenceable(12) %16) #6
  call void @_ZNK3P3D12GlobalCFrame15localToRelativeERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(96) %48, ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @_ZN3P3D5Debug9logVectorENS_16PositionTemplateINS_3FixILl32EEEEENS_6VectorIdLm3EEENS0_10VectorTypeE(ptr noundef byval(%"struct.P3D::PositionTemplate") align 8 %10, ptr noundef byval(%"struct.P3D::Vector") align 8 %14, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #6
  br label %68

68:                                               ; preds = %39
  %69 = load i32, ptr %9, align 4, !tbaa !9
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %9, align 4, !tbaa !9
  br label %35, !llvm.loop !15

71:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %5, align 4, !tbaa !9
  br label %22, !llvm.loop !17

75:                                               ; preds = %28
  ret void
}

declare { i64, i32 } @_ZNK3P3D13MeshPrototype11getTriangleEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3

declare void @_ZN3P3D5Debug9logVectorENS_16PositionTemplateINS_3FixILl32EEEEENS_6VectorIdLm3EEENS0_10VectorTypeE(ptr noundef byval(%"struct.P3D::PositionTemplate") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8, i32 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::PositionTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

declare { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 4 dereferenceable(12)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame15localToRelativeERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #5 = { 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 #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 = !{!"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, !10, i64 20}
!12 = !{!"_ZTSN3P3D13MeshPrototypeE", !13, i64 0, !14, i64 8, !10, i64 16, !10, i64 20}
!13 = !{!"_ZTSN3P3D20UniqueAlignedPointerIfEE", !6, i64 0}
!14 = !{!"_ZTSN3P3D20UniqueAlignedPointerIiEE", !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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.P3D::Triangle" = type { %union.anon.5 }
%union.anon.5 = type { %struct.anon.6 }
%struct.anon.6 = type { i32, i32, i32 }
%"struct.P3D::PositionTemplate" = type { %"struct.P3D::Fix", %"struct.P3D::Fix", %"struct.P3D::Fix" }
%"struct.P3D::Fix" = type { i64 }
%"struct.P3D::Vector" = type { %union.anon.3 }
%union.anon.3 = type { [3 x double] }
%"struct.P3D::Vector.7" = type { %union.anon.8 }
%union.anon.8 = type { [3 x float] }

; 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 uwtable
define dso_local void @_ZN3P3D8Graphics8AppDebug7Logging8logShapeERKNS_10PolyhedronERKNS_12GlobalCFrameE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(96) %1) local_unnamed_addr #1 {
  %3 = alloca %"struct.P3D::Triangle", align 8
  %4 = alloca %"struct.P3D::PositionTemplate", align 8
  %5 = alloca %"struct.P3D::Vector", align 8
  %6 = alloca %"struct.P3D::Vector.7", align 8
  %7 = alloca %"struct.P3D::Vector", align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca %"struct.P3D::Vector.7", align 8
  %10 = alloca %"struct.P3D::Vector.7", align 8
  %11 = alloca %"struct.P3D::Vector.7", align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 20
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.212.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  br label %15

._crit_edge:                                      ; preds = %15, %2
  ret void

15:                                               ; preds = %.lr.ph, %15
  %.032 = phi i32 [ 0, %.lr.ph ], [ %47, %15 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #5
  %16 = call { i64, i32 } @_ZNK3P3D13MeshPrototype11getTriangleEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %.032)
  %.fca.0.extract17 = extractvalue { i64, i32 } %16, 0
  %.fca.1.extract18 = extractvalue { i64, i32 } %16, 1
  store i64 %.fca.0.extract17, ptr %3, align 8
  store i32 %.fca.1.extract18, ptr %.sroa.220.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 0)
  %18 = load i32, ptr %17, align 4, !tbaa !13
  %19 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %18)
  %.fca.0.extract9 = extractvalue { <2 x float>, float } %19, 0
  %.fca.1.extract10 = extractvalue { <2 x float>, float } %19, 1
  store <2 x float> %.fca.0.extract9, ptr %6, align 8
  store float %.fca.1.extract10, ptr %.sroa.212.0..sroa_idx, align 8
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  call void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::PositionTemplate") align 8 %4, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 1)
  %21 = load i32, ptr %20, align 4, !tbaa !13
  %22 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %21)
  %.fca.0.extract5 = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract6 = extractvalue { <2 x float>, float } %22, 1
  store <2 x float> %.fca.0.extract5, ptr %10, align 8
  store float %.fca.1.extract6, ptr %.sroa.28.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 0)
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %25 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %24)
  %.fca.0.extract1 = extractvalue { <2 x float>, float } %25, 0
  %.fca.1.extract2 = extractvalue { <2 x float>, float } %25, 1
  store <2 x float> %.fca.0.extract1, ptr %11, align 8
  store float %.fca.1.extract2, ptr %.sroa.24.0..sroa_idx, align 8
  %26 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  %.fca.0.extract = extractvalue { <2 x float>, float } %26, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %26, 1
  store <2 x float> %.fca.0.extract, ptr %9, align 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 4 dereferenceable(12) %9) #5
  call void @_ZNK3P3D12GlobalCFrame15localToRelativeERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @_ZN3P3D5Debug9logVectorENS_16PositionTemplateINS_3FixILl32EEEEENS_6VectorIdLm3EEENS0_10VectorTypeE(ptr noundef nonnull byval(%"struct.P3D::PositionTemplate") align 8 %4, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %7, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 1)
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %28)
  %.fca.0.extract9.1 = extractvalue { <2 x float>, float } %29, 0
  %.fca.1.extract10.1 = extractvalue { <2 x float>, float } %29, 1
  store <2 x float> %.fca.0.extract9.1, ptr %6, align 8
  store float %.fca.1.extract10.1, ptr %.sroa.212.0..sroa_idx, align 8
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  call void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::PositionTemplate") align 8 %4, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 2)
  %31 = load i32, ptr %30, align 4, !tbaa !13
  %32 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %31)
  %.fca.0.extract5.1 = extractvalue { <2 x float>, float } %32, 0
  %.fca.1.extract6.1 = extractvalue { <2 x float>, float } %32, 1
  store <2 x float> %.fca.0.extract5.1, ptr %10, align 8
  store float %.fca.1.extract6.1, ptr %.sroa.28.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 1)
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %34)
  %.fca.0.extract1.1 = extractvalue { <2 x float>, float } %35, 0
  %.fca.1.extract2.1 = extractvalue { <2 x float>, float } %35, 1
  store <2 x float> %.fca.0.extract1.1, ptr %11, align 8
  store float %.fca.1.extract2.1, ptr %.sroa.24.0..sroa_idx, align 8
  %36 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  %.fca.0.extract.1 = extractvalue { <2 x float>, float } %36, 0
  %.fca.1.extract.1 = extractvalue { <2 x float>, float } %36, 1
  store <2 x float> %.fca.0.extract.1, ptr %9, align 8
  store float %.fca.1.extract.1, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 4 dereferenceable(12) %9) #5
  call void @_ZNK3P3D12GlobalCFrame15localToRelativeERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @_ZN3P3D5Debug9logVectorENS_16PositionTemplateINS_3FixILl32EEEEENS_6VectorIdLm3EEENS0_10VectorTypeE(ptr noundef nonnull byval(%"struct.P3D::PositionTemplate") align 8 %4, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %7, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 2)
  %38 = load i32, ptr %37, align 4, !tbaa !13
  %39 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %38)
  %.fca.0.extract9.2 = extractvalue { <2 x float>, float } %39, 0
  %.fca.1.extract10.2 = extractvalue { <2 x float>, float } %39, 1
  store <2 x float> %.fca.0.extract9.2, ptr %6, align 8
  store float %.fca.1.extract10.2, ptr %.sroa.212.0..sroa_idx, align 8
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 4 dereferenceable(12) %6) #5
  call void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::PositionTemplate") align 8 %4, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 0)
  %41 = load i32, ptr %40, align 4, !tbaa !13
  %42 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %41)
  %.fca.0.extract5.2 = extractvalue { <2 x float>, float } %42, 0
  %.fca.1.extract6.2 = extractvalue { <2 x float>, float } %42, 1
  store <2 x float> %.fca.0.extract5.2, ptr %10, align 8
  store float %.fca.1.extract6.2, ptr %.sroa.28.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #5
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3P3D8TriangleixEi(ptr noundef nonnull align 4 dereferenceable(12) %3, i32 noundef 2)
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = call { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %44)
  %.fca.0.extract1.2 = extractvalue { <2 x float>, float } %45, 0
  %.fca.1.extract2.2 = extractvalue { <2 x float>, float } %45, 1
  store <2 x float> %.fca.0.extract1.2, ptr %11, align 8
  store float %.fca.1.extract2.2, ptr %.sroa.24.0..sroa_idx, align 8
  %46 = call { <2 x float>, float } @_ZN3P3DmiIffLm3EEENS_6VectorIDTmiixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11) #5
  %.fca.0.extract.2 = extractvalue { <2 x float>, float } %46, 0
  %.fca.1.extract.2 = extractvalue { <2 x float>, float } %46, 1
  store <2 x float> %.fca.0.extract.2, ptr %9, align 8
  store float %.fca.1.extract.2, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 4 dereferenceable(12) %9) #5
  call void @_ZNK3P3D12GlobalCFrame15localToRelativeERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @_ZN3P3D5Debug9logVectorENS_16PositionTemplateINS_3FixILl32EEEEENS_6VectorIdLm3EEENS0_10VectorTypeE(ptr noundef nonnull byval(%"struct.P3D::PositionTemplate") align 8 %4, ptr noundef nonnull byval(%"struct.P3D::Vector") align 8 %7, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #5
  %47 = add nuw nsw i32 %.032, 1
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %15, label %._crit_edge, !llvm.loop !14
}

declare { i64, i32 } @_ZNK3P3D13MeshPrototype11getTriangleEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2

declare void @_ZN3P3D5Debug9logVectorENS_16PositionTemplateINS_3FixILl32EEEEENS_6VectorIdLm3EEENS0_10VectorTypeE(ptr noundef byval(%"struct.P3D::PositionTemplate") align 8, ptr noundef byval(%"struct.P3D::Vector") align 8, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame13localToGlobalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::PositionTemplate") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

declare { <2 x float>, float } @_ZNK3P3D13MeshPrototype9getVertexEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3P3D6VectorIfLm3EEcvNS0_IT_Lm3EEEIdEEv(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3P3D12GlobalCFrame15localToRelativeERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 #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, !12, i64 20}
!6 = !{!"_ZTSN3P3D13MeshPrototypeE", !7, i64 0, !11, i64 8, !12, i64 16, !12, i64 20}
!7 = !{!"_ZTSN3P3D20UniqueAlignedPointerIfEE", !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN3P3D20UniqueAlignedPointerIiEE", !8, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!12, !12, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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