; LLVM IR from thuhcsi/Crystal.TTVS :: Xface/XFace/src/XEngine/Transform.ll (ZN7XEngine9Transform6updateERKN5XMath7Matrix4E)

; 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.XMath::Matrix4" = type { [16 x float] }
%"class.XEngine::Transform" = type <{ ptr, i8, [3 x i8], %"class.XMath::Quaternion", %"class.XMath::Vector3", %"class.XMath::Vector3", %"class.XMath::Matrix4", %"class.XMath::Matrix4", [4 x i8] }>
%"class.XMath::Quaternion" = type { float, float, float, float }
%"class.XMath::Vector3" = type { float, float, float }

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5XMath7Matrix4C1Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #0

declare void @_ZN5XMath7Matrix412loadIdentityEv(ptr noundef nonnull align 4 dereferenceable(64)) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7XEngine9Transform6updateERKN5XMath7Matrix4E(ptr noundef nonnull align 8 dereferenceable(180) %0, ptr noundef nonnull align 4 dereferenceable(64) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.XMath::Matrix4", align 4
  %6 = alloca %"class.XMath::Matrix4", align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.XMath::Matrix4", align 4
  %10 = alloca %"class.XMath::Matrix4", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  %12 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 1
  %13 = load i8, ptr %12, align 8, !tbaa !9, !range !16, !noundef !17
  %14 = trunc i8 %13 to i1
  br i1 %14, label %15, label %76

15:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #4
  %16 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 3
  call void @_ZNK5XMath10Quaternion16ToRotationMatrixEv(ptr dead_on_unwind writable sret(%"class.XMath::Matrix4") align 4 %5, ptr noundef nonnull align 4 dereferenceable(16) %16)
  call void @llvm.lifetime.start.p0(i64 64, ptr %6) #4
  invoke void @_ZN5XMath7Matrix4C1Ev(ptr noundef nonnull align 4 dereferenceable(64) %6)
          to label %17 unwind label %57

17:                                               ; preds = %15
  invoke void @_ZN5XMath7Matrix412loadIdentityEv(ptr noundef nonnull align 4 dereferenceable(64) %6)
          to label %18 unwind label %61

18:                                               ; preds = %17
  %19 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 5
  %20 = getelementptr inbounds %"class.XMath::Vector3", ptr %19, i32 0, i32 0
  %21 = load float, ptr %20, align 8, !tbaa !18
  %22 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %6, i32 noundef 0)
          to label %23 unwind label %61

23:                                               ; preds = %18
  store float %21, ptr %22, align 4, !tbaa !19
  %24 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 5
  %25 = getelementptr inbounds %"class.XMath::Vector3", ptr %24, i32 0, i32 1
  %26 = load float, ptr %25, align 4, !tbaa !20
  %27 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %6, i32 noundef 5)
          to label %28 unwind label %61

28:                                               ; preds = %23
  store float %26, ptr %27, align 4, !tbaa !19
  %29 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 5
  %30 = getelementptr inbounds %"class.XMath::Vector3", ptr %29, i32 0, i32 2
  %31 = load float, ptr %30, align 8, !tbaa !21
  %32 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %6, i32 noundef 10)
          to label %33 unwind label %61

33:                                               ; preds = %28
  store float %31, ptr %32, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #4
  invoke void @_ZN5XMath7Matrix4mlERKS0_(ptr dead_on_unwind writable sret(%"class.XMath::Matrix4") align 4 %9, ptr noundef nonnull align 4 dereferenceable(64) %5, ptr noundef nonnull align 4 dereferenceable(64) %6)
          to label %34 unwind label %65

34:                                               ; preds = %33
  %35 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 6
  %36 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN5XMath7Matrix4aSERKS0_(ptr noundef nonnull align 4 dereferenceable(64) %35, ptr noundef nonnull align 4 dereferenceable(64) %9)
          to label %37 unwind label %69

37:                                               ; preds = %34
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #4
  %38 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 4
  %39 = getelementptr inbounds %"class.XMath::Vector3", ptr %38, i32 0, i32 0
  %40 = load float, ptr %39, align 4, !tbaa !22
  %41 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 6
  %42 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %41, i32 noundef 12)
          to label %43 unwind label %61

43:                                               ; preds = %37
  store float %40, ptr %42, align 4, !tbaa !19
  %44 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 4
  %45 = getelementptr inbounds %"class.XMath::Vector3", ptr %44, i32 0, i32 1
  %46 = load float, ptr %45, align 4, !tbaa !23
  %47 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 6
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %47, i32 noundef 13)
          to label %49 unwind label %61

49:                                               ; preds = %43
  store float %46, ptr %48, align 4, !tbaa !19
  %50 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 4
  %51 = getelementptr inbounds %"class.XMath::Vector3", ptr %50, i32 0, i32 2
  %52 = load float, ptr %51, align 4, !tbaa !24
  %53 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 6
  %54 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %53, i32 noundef 14)
          to label %55 unwind label %61

55:                                               ; preds = %49
  store float %52, ptr %54, align 4, !tbaa !19
  %56 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 1
  store i8 0, ptr %56, align 8, !tbaa !9
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %6) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #4
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %5) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #4
  br label %76

57:                                               ; preds = %15
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %7, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %8, align 4
  br label %75

61:                                               ; preds = %49, %43, %37, %28, %23, %18, %17
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  br label %74

65:                                               ; preds = %33
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  br label %73

69:                                               ; preds = %34
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %9) #4
  br label %73

73:                                               ; preds = %69, %65
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #4
  br label %74

74:                                               ; preds = %73, %61
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %6) #4
  br label %75

75:                                               ; preds = %74, %57
  call void @llvm.lifetime.end.p0(i64 64, ptr %6) #4
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %5) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #4
  br label %86

76:                                               ; preds = %55, %2
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #4
  %77 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 6
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN5XMath7Matrix4mlERKS0_(ptr dead_on_unwind writable sret(%"class.XMath::Matrix4") align 4 %10, ptr noundef nonnull align 4 dereferenceable(64) %77, ptr noundef nonnull align 4 dereferenceable(64) %78)
  %79 = getelementptr inbounds %"class.XEngine::Transform", ptr %11, i32 0, i32 7
  %80 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN5XMath7Matrix4aSERKS0_(ptr noundef nonnull align 4 dereferenceable(64) %79, ptr noundef nonnull align 4 dereferenceable(64) %10)
          to label %81 unwind label %82

81:                                               ; preds = %76
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #4
  ret void

82:                                               ; preds = %76
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %7, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %8, align 4
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #4
  br label %86

86:                                               ; preds = %82, %75
  %87 = load ptr, ptr %7, align 8
  %88 = load i32, ptr %8, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

declare void @_ZNK5XMath10Quaternion16ToRotationMatrixEv(ptr dead_on_unwind writable sret(%"class.XMath::Matrix4") align 4, ptr noundef nonnull align 4 dereferenceable(16)) #0

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

declare void @_ZN5XMath7Matrix4mlERKS0_(ptr dead_on_unwind writable sret(%"class.XMath::Matrix4") align 4, ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) #0

declare noundef nonnull align 4 dereferenceable(64) ptr @_ZN5XMath7Matrix4aSERKS0_(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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, !11, i64 8}
!10 = !{!"_ZTSN7XEngine9TransformE", !11, i64 8, !12, i64 12, !14, i64 28, !14, i64 40, !15, i64 52, !15, i64 116}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSN5XMath10QuaternionE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSN5XMath7Vector3E", !13, i64 0, !13, i64 4, !13, i64 8}
!15 = !{!"_ZTSN5XMath7Matrix4E", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!10, !13, i64 40}
!19 = !{!13, !13, i64 0}
!20 = !{!10, !13, i64 44}
!21 = !{!10, !13, i64 48}
!22 = !{!10, !13, i64 28}
!23 = !{!10, !13, i64 32}
!24 = !{!10, !13, i64 36}


; 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.XMath::Matrix4" = type { [16 x float] }

declare i32 @__gxx_personality_v0(...)

declare void @_ZN5XMath7Matrix4C1Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #0

declare void @_ZN5XMath7Matrix412loadIdentityEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7XEngine9Transform6updateERKN5XMath7Matrix4E(ptr noundef nonnull align 8 dereferenceable(180) %0, ptr noundef nonnull align 4 dereferenceable(64) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.XMath::Matrix4", align 4
  %4 = alloca %"class.XMath::Matrix4", align 4
  %5 = alloca %"class.XMath::Matrix4", align 4
  %6 = alloca %"class.XMath::Matrix4", align 4
  %7 = getelementptr inbounds i8, ptr %0, i64 8
  %8 = load i8, ptr %7, align 8, !tbaa !5, !range !14, !noundef !15
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %47

10:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  call void @_ZNK5XMath10Quaternion16ToRotationMatrixEv(ptr dead_on_unwind nonnull writable sret(%"class.XMath::Matrix4") align 4 %3, ptr noundef nonnull align 4 dereferenceable(16) %11)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #4
  invoke void @_ZN5XMath7Matrix4C1Ev(ptr noundef nonnull align 4 dereferenceable(64) %4)
          to label %12 unwind label %36

12:                                               ; preds = %10
  invoke void @_ZN5XMath7Matrix412loadIdentityEv(ptr noundef nonnull align 4 dereferenceable(64) %4)
          to label %13 unwind label %38

13:                                               ; preds = %12
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = load float, ptr %14, align 8, !tbaa !16
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef 0)
  store float %15, ptr %16, align 4, !tbaa !17
  %17 = getelementptr inbounds i8, ptr %0, i64 44
  %18 = load float, ptr %17, align 4, !tbaa !18
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef 5)
  store float %18, ptr %19, align 4, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = load float, ptr %20, align 8, !tbaa !19
  %22 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %4, i32 noundef 10)
  store float %21, ptr %22, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #4
  invoke void @_ZN5XMath7Matrix4mlERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.XMath::Matrix4") align 4 %5, ptr noundef nonnull align 4 dereferenceable(64) %3, ptr noundef nonnull align 4 dereferenceable(64) %4)
          to label %23 unwind label %40

23:                                               ; preds = %13
  %24 = getelementptr inbounds i8, ptr %0, i64 52
  %25 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN5XMath7Matrix4aSERKS0_(ptr noundef nonnull align 4 dereferenceable(64) %24, ptr noundef nonnull align 4 dereferenceable(64) %5)
          to label %26 unwind label %42

26:                                               ; preds = %23
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %5) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #4
  %27 = getelementptr inbounds i8, ptr %0, i64 28
  %28 = load float, ptr %27, align 4, !tbaa !20
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %24, i32 noundef 12)
  store float %28, ptr %29, align 4, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %0, i64 32
  %31 = load float, ptr %30, align 8, !tbaa !21
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %24, i32 noundef 13)
  store float %31, ptr %32, align 4, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %0, i64 36
  %34 = load float, ptr %33, align 4, !tbaa !22
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN5XMath7Matrix4ixEi(ptr noundef nonnull align 4 dereferenceable(64) %24, i32 noundef 14)
  store float %34, ptr %35, align 4, !tbaa !17
  store i8 0, ptr %7, align 8, !tbaa !5
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %4) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #4
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %3) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #4
  br label %47

36:                                               ; preds = %10
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %46

38:                                               ; preds = %12
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %45

40:                                               ; preds = %13
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %23
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %5) #4
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #4
  br label %45

45:                                               ; preds = %44, %38
  %.pn.pn = phi { ptr, i32 } [ %.pn, %44 ], [ %39, %38 ]
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %4) #4
  br label %46

46:                                               ; preds = %45, %36
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %45 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #4
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %3) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #4
  br label %54

47:                                               ; preds = %26, %2
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #4
  %48 = getelementptr inbounds i8, ptr %0, i64 52
  call void @_ZN5XMath7Matrix4mlERKS0_(ptr dead_on_unwind nonnull writable sret(%"class.XMath::Matrix4") align 4 %6, ptr noundef nonnull align 4 dereferenceable(64) %48, ptr noundef nonnull align 4 dereferenceable(64) %1)
  %49 = getelementptr inbounds i8, ptr %0, i64 116
  %50 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN5XMath7Matrix4aSERKS0_(ptr noundef nonnull align 4 dereferenceable(64) %49, ptr noundef nonnull align 4 dereferenceable(64) %6)
          to label %51 unwind label %52

51:                                               ; preds = %47
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %6) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  ret void

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5XMath7Matrix4D2Ev(ptr noundef nonnull align 4 dereferenceable(64) %6) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #4
  br label %54

54:                                               ; preds = %52, %46
  %.pn10 = phi { ptr, i32 } [ %53, %52 ], [ %.pn.pn.pn, %46 ]
  resume { ptr, i32 } %.pn10
}

declare void @_ZNK5XMath10Quaternion16ToRotationMatrixEv(ptr dead_on_unwind writable sret(%"class.XMath::Matrix4") align 4, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

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

declare void @_ZN5XMath7Matrix4mlERKS0_(ptr dead_on_unwind writable sret(%"class.XMath::Matrix4") align 4, ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #0

declare noundef nonnull align 4 dereferenceable(64) ptr @_ZN5XMath7Matrix4aSERKS0_(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = !{!"_ZTSN7XEngine9TransformE", !7, i64 8, !10, i64 12, !12, i64 28, !12, i64 40, !13, i64 52, !13, i64 116}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN5XMath10QuaternionE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!11 = !{!"float", !8, i64 0}
!12 = !{!"_ZTSN5XMath7Vector3E", !11, i64 0, !11, i64 4, !11, i64 8}
!13 = !{!"_ZTSN5XMath7Matrix4E", !8, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!6, !11, i64 40}
!17 = !{!11, !11, i64 0}
!18 = !{!6, !11, i64 44}
!19 = !{!6, !11, i64 48}
!20 = !{!6, !11, i64 28}
!21 = !{!6, !11, i64 32}
!22 = !{!6, !11, i64 36}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass