; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/PostProcessing (DeboneProcess)

; 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.aiVector3t = type { float, float, float }
%class.aiMatrix4x4t = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%class.aiMatrix3x3t = type { float, float, float, float, float, float, float, float, float }
%struct.aiMesh = type { i32, i32, i32, ptr, ptr, ptr, ptr, [8 x ptr], [8 x ptr], [8 x i32], ptr, i32, ptr, i32, %struct.aiString, i32, ptr, i32, %struct.aiAABB, ptr }
%struct.aiString = type { i32, [1024 x i8] }
%struct.aiAABB = type { %class.aiVector3t, %class.aiVector3t }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Assimp13DeboneProcess14ApplyTransformEP6aiMeshRK12aiMatrix4x4tIfE(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(64) %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %class.aiVector3t, align 4
  %9 = alloca { <2 x float>, float }, align 8
  %10 = alloca %class.aiMatrix4x4t, align 4
  %11 = alloca %class.aiMatrix3x3t, align 4
  %12 = alloca i32, align 4
  %13 = alloca %class.aiVector3t, align 4
  %14 = alloca { <2 x float>, float }, align 8
  %15 = alloca i32, align 4
  %16 = alloca %class.aiVector3t, align 4
  %17 = alloca { <2 x float>, float }, align 8
  %18 = alloca %class.aiVector3t, align 4
  %19 = alloca { <2 x float>, float }, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZNK12aiMatrix4x4tIfE10IsIdentityEf(ptr noundef nonnull align 4 dereferenceable(64) %21, float noundef 0x3F847AE140000000)
  br i1 %22, label %138, label %23

23:                                               ; preds = %3
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call noundef zeroext i1 @_ZNK6aiMesh12HasPositionsEv(ptr noundef nonnull align 8 dereferenceable(1320) %24)
  br i1 %25, label %26, label %53

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %49, %26
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.aiMesh, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !11
  %32 = icmp ult i32 %28, %31
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #7
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.aiMesh, ptr %36, i32 0, i32 3
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds %class.aiVector3t, ptr %38, i64 %40
  %42 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix4x4tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(64) %35, ptr noundef nonnull align 4 dereferenceable(12) %41)
  store { <2 x float>, float } %42, ptr %9, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 8 %9, i64 12, i1 false)
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.aiMesh, ptr %43, i32 0, i32 3
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds %class.aiVector3t, ptr %45, i64 %47
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %48, ptr align 4 %8, i64 12, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #7
  br label %49

49:                                               ; preds = %34
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = add i32 %50, 1
  store i32 %51, ptr %7, align 4, !tbaa !9
  br label %27, !llvm.loop !21

52:                                               ; preds = %33
  br label %53

53:                                               ; preds = %52, %23
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1320) %54)
  br i1 %55, label %59, label %56

56:                                               ; preds = %53
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1320) %57)
  br i1 %58, label %59, label %137

59:                                               ; preds = %56, %53
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #7
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %60, i64 64, i1 false), !tbaa.struct !23
  %61 = call noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE7InverseEv(ptr noundef nonnull align 4 dereferenceable(64) %10)
  %62 = call noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE9TransposeEv(ptr noundef nonnull align 4 dereferenceable(64) %61)
  call void @llvm.lifetime.start.p0(i64 36, ptr %11) #7
  call void @_ZN12aiMatrix3x3tIfEC2ERK12aiMatrix4x4tIfE(ptr noundef nonnull align 4 dereferenceable(36) %11, ptr noundef nonnull align 4 dereferenceable(64) %10)
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = call noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1320) %63)
  br i1 %64, label %65, label %92

65:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %88, %65
  %67 = load i32, ptr %12, align 4, !tbaa !9
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.aiMesh, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 4, !tbaa !11
  %71 = icmp ult i32 %67, %70
  br i1 %71, label %73, label %72

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

73:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.aiMesh, ptr %74, i32 0, i32 4
  %76 = load ptr, ptr %75, align 8, !tbaa !24
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds %class.aiVector3t, ptr %76, i64 %78
  %80 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix3x3tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(36) %11, ptr noundef nonnull align 4 dereferenceable(12) %79)
  store { <2 x float>, float } %80, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %14, i64 12, i1 false)
  %81 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %13)
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.aiMesh, ptr %82, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !24
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds %class.aiVector3t, ptr %84, i64 %86
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %87, ptr align 4 %81, i64 12, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  br label %88

88:                                               ; preds = %73
  %89 = load i32, ptr %12, align 4, !tbaa !9
  %90 = add i32 %89, 1
  store i32 %90, ptr %12, align 4, !tbaa !9
  br label %66, !llvm.loop !25

91:                                               ; preds = %72
  br label %92

92:                                               ; preds = %91, %59
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = call noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1320) %93)
  br i1 %94, label %95, label %136

95:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %132, %95
  %97 = load i32, ptr %15, align 4, !tbaa !9
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.aiMesh, ptr %98, i32 0, i32 1
  %100 = load i32, ptr %99, align 4, !tbaa !11
  %101 = icmp ult i32 %97, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %135

103:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.aiMesh, ptr %104, i32 0, i32 5
  %106 = load ptr, ptr %105, align 8, !tbaa !26
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds %class.aiVector3t, ptr %106, i64 %108
  %110 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix3x3tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(36) %11, ptr noundef nonnull align 4 dereferenceable(12) %109)
  store { <2 x float>, float } %110, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  %111 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %16)
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.aiMesh, ptr %112, i32 0, i32 5
  %114 = load ptr, ptr %113, align 8, !tbaa !26
  %115 = load i32, ptr %15, align 4, !tbaa !9
  %116 = zext i32 %115 to i64
  %117 = getelementptr inbounds %class.aiVector3t, ptr %114, i64 %116
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %117, ptr align 4 %111, i64 12, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #7
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.aiMesh, ptr %118, i32 0, i32 6
  %120 = load ptr, ptr %119, align 8, !tbaa !27
  %121 = load i32, ptr %15, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds %class.aiVector3t, ptr %120, i64 %122
  %124 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix3x3tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(36) %11, ptr noundef nonnull align 4 dereferenceable(12) %123)
  store { <2 x float>, float } %124, ptr %19, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 8 %19, i64 12, i1 false)
  %125 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %18)
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.aiMesh, ptr %126, i32 0, i32 6
  %128 = load ptr, ptr %127, align 8, !tbaa !27
  %129 = load i32, ptr %15, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds %class.aiVector3t, ptr %128, i64 %130
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %131, ptr align 4 %125, i64 12, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #7
  br label %132

132:                                              ; preds = %103
  %133 = load i32, ptr %15, align 4, !tbaa !9
  %134 = add i32 %133, 1
  store i32 %134, ptr %15, align 4, !tbaa !9
  br label %96, !llvm.loop !28

135:                                              ; preds = %102
  br label %136

136:                                              ; preds = %135, %92
  call void @llvm.lifetime.end.p0(i64 36, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #7
  br label %137

137:                                              ; preds = %136, %56
  br label %138

138:                                              ; preds = %137, %3
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK12aiMatrix4x4tIfE10IsIdentityEf(ptr noundef nonnull align 4 dereferenceable(64), float noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh12HasPositionsEv(ptr noundef nonnull align 8 dereferenceable(1320)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix4x4tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12)) #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) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1320)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1320)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE7InverseEv(ptr noundef nonnull align 4 dereferenceable(64)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE9TransposeEv(ptr noundef nonnull align 4 dereferenceable(64)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12aiMatrix3x3tIfEC2ERK12aiMatrix4x4tIfE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #2 align 2

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

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

attributes #0 = { 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 = { inlinehint 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 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = !{!12, !10, i64 4}
!12 = !{!"_ZTS6aiMesh", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !7, i64 48, !7, i64 112, !7, i64 176, !6, i64 208, !10, i64 216, !6, i64 224, !10, i64 232, !13, i64 236, !10, i64 1264, !6, i64 1272, !14, i64 1280, !15, i64 1284, !6, i64 1312}
!13 = !{!"_ZTS8aiString", !10, i64 0, !7, i64 4}
!14 = !{!"_ZTS16aiMorphingMethod", !7, i64 0}
!15 = !{!"_ZTS6aiAABB", !16, i64 0, !16, i64 12}
!16 = !{!"_ZTS10aiVector3tIfE", !17, i64 0, !17, i64 4, !17, i64 8}
!17 = !{!"float", !7, i64 0}
!18 = !{!12, !6, i64 16}
!19 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20}
!20 = !{!17, !17, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20, i64 12, i64 4, !20, i64 16, i64 4, !20, i64 20, i64 4, !20, i64 24, i64 4, !20, i64 28, i64 4, !20, i64 32, i64 4, !20, i64 36, i64 4, !20, i64 40, i64 4, !20, i64 44, i64 4, !20, i64 48, i64 4, !20, i64 52, i64 4, !20, i64 56, i64 4, !20, i64 60, i64 4, !20}
!24 = !{!12, !6, i64 24}
!25 = distinct !{!25, !22}
!26 = !{!12, !6, i64 32}
!27 = !{!12, !6, i64 40}
!28 = distinct !{!28, !22}


; 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.aiMatrix4x4t = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%class.aiMatrix3x3t = type { float, float, float, float, float, float, float, float, float }
%class.aiVector3t = type { float, float, 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 @_ZNK6Assimp13DeboneProcess14ApplyTransformEP6aiMeshRK12aiMatrix4x4tIfE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(64) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(64) %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %class.aiMatrix4x4t, align 4
  %5 = alloca %class.aiMatrix3x3t, align 4
  %6 = alloca %class.aiVector3t, align 8
  %7 = alloca %class.aiVector3t, align 8
  %8 = alloca %class.aiVector3t, align 8
  %9 = tail call noundef zeroext i1 @_ZNK12aiMatrix4x4tIfE10IsIdentityEf(ptr noundef nonnull align 4 dereferenceable(64) %2, float noundef 0x3F847AE140000000)
  br i1 %9, label %65, label %10

10:                                               ; preds = %3
  %11 = tail call noundef zeroext i1 @_ZNK6aiMesh12HasPositionsEv(ptr noundef nonnull align 8 dereferenceable(1320) %1)
  br i1 %11, label %.preheader50, label %.loopexit51

.preheader50:                                     ; preds = %10
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %.loopexit51, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader50
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  br label %15

15:                                               ; preds = %.lr.ph, %15
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %15 ]
  %16 = load ptr, ptr %14, align 8, !tbaa !16
  %17 = getelementptr inbounds %class.aiVector3t, ptr %16, i64 %indvars.iv
  %18 = tail call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix4x4tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(64) %2, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %.fca.0.extract18 = extractvalue { <2 x float>, float } %18, 0
  %.fca.1.extract19 = extractvalue { <2 x float>, float } %18, 1
  %19 = load ptr, ptr %14, align 8, !tbaa !16
  %20 = getelementptr inbounds %class.aiVector3t, ptr %19, i64 %indvars.iv
  store <2 x float> %.fca.0.extract18, ptr %20, align 4
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  store float %.fca.1.extract19, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr %12, align 4, !tbaa !5
  %22 = zext i32 %21 to i64
  %23 = icmp ult i64 %indvars.iv.next, %22
  br i1 %23, label %15, label %.loopexit51, !llvm.loop !18

.loopexit51:                                      ; preds = %15, %.preheader50, %10
  %24 = tail call noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1320) %1)
  br i1 %24, label %27, label %25

25:                                               ; preds = %.loopexit51
  %26 = tail call noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1320) %1)
  br i1 %26, label %27, label %65

27:                                               ; preds = %25, %.loopexit51
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) %4, ptr noundef nonnull align 4 dereferenceable(64) %2, i64 64, i1 false), !tbaa.struct !20
  %28 = call noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE7InverseEv(ptr noundef nonnull align 4 dereferenceable(64) %4)
  %29 = call noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE9TransposeEv(ptr noundef nonnull align 4 dereferenceable(64) %28)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %5) #7
  call void @_ZN12aiMatrix3x3tIfEC2ERK12aiMatrix4x4tIfE(ptr noundef nonnull align 4 dereferenceable(36) %5, ptr noundef nonnull align 4 dereferenceable(64) %4)
  %30 = call noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1320) %1)
  br i1 %30, label %.preheader48, label %.loopexit49

.preheader48:                                     ; preds = %27
  %31 = getelementptr inbounds i8, ptr %1, i64 4
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %.not57 = icmp eq i32 %32, 0
  br i1 %.not57, label %.loopexit49, label %.lr.ph54

.lr.ph54:                                         ; preds = %.preheader48
  %33 = getelementptr inbounds i8, ptr %1, i64 24
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  br label %34

34:                                               ; preds = %.lr.ph54, %34
  %indvars.iv60 = phi i64 [ 0, %.lr.ph54 ], [ %indvars.iv.next61, %34 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #7
  %35 = load ptr, ptr %33, align 8, !tbaa !21
  %36 = getelementptr inbounds %class.aiVector3t, ptr %35, i64 %indvars.iv60
  %37 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix3x3tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(36) %5, ptr noundef nonnull align 4 dereferenceable(12) %36)
  %.fca.0.extract10 = extractvalue { <2 x float>, float } %37, 0
  %.fca.1.extract11 = extractvalue { <2 x float>, float } %37, 1
  store <2 x float> %.fca.0.extract10, ptr %6, align 8
  store float %.fca.1.extract11, ptr %.sroa.213.0..sroa_idx, align 8
  %38 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %6)
  %39 = load ptr, ptr %33, align 8, !tbaa !21
  %40 = getelementptr inbounds %class.aiVector3t, ptr %39, i64 %indvars.iv60
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %38, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #7
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %41 = load i32, ptr %31, align 4, !tbaa !5
  %42 = zext i32 %41 to i64
  %43 = icmp ult i64 %indvars.iv.next61, %42
  br i1 %43, label %34, label %.loopexit49, !llvm.loop !23

.loopexit49:                                      ; preds = %34, %.preheader48, %27
  %44 = call noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1320) %1)
  br i1 %44, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.loopexit49
  %45 = getelementptr inbounds i8, ptr %1, i64 4
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %.not58 = icmp eq i32 %46, 0
  br i1 %.not58, label %.loopexit, label %.lr.ph56

.lr.ph56:                                         ; preds = %.preheader
  %47 = getelementptr inbounds i8, ptr %1, i64 32
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  %48 = getelementptr inbounds i8, ptr %1, i64 40
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  br label %49

49:                                               ; preds = %.lr.ph56, %49
  %indvars.iv63 = phi i64 [ 0, %.lr.ph56 ], [ %indvars.iv.next64, %49 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #7
  %50 = load ptr, ptr %47, align 8, !tbaa !24
  %51 = getelementptr inbounds %class.aiVector3t, ptr %50, i64 %indvars.iv63
  %52 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix3x3tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(36) %5, ptr noundef nonnull align 4 dereferenceable(12) %51)
  %.fca.0.extract1 = extractvalue { <2 x float>, float } %52, 0
  %.fca.1.extract2 = extractvalue { <2 x float>, float } %52, 1
  store <2 x float> %.fca.0.extract1, ptr %7, align 8
  store float %.fca.1.extract2, ptr %.sroa.24.0..sroa_idx, align 8
  %53 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %7)
  %54 = load ptr, ptr %47, align 8, !tbaa !24
  %55 = getelementptr inbounds %class.aiVector3t, ptr %54, i64 %indvars.iv63
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %55, ptr noundef nonnull align 4 dereferenceable(12) %53, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #7
  %56 = load ptr, ptr %48, align 8, !tbaa !25
  %57 = getelementptr inbounds %class.aiVector3t, ptr %56, i64 %indvars.iv63
  %58 = call { <2 x float>, float } @_ZmlIfE10aiVector3tIT_ERK12aiMatrix3x3tIS1_ERKS2_(ptr noundef nonnull align 4 dereferenceable(36) %5, ptr noundef nonnull align 4 dereferenceable(12) %57)
  %.fca.0.extract = extractvalue { <2 x float>, float } %58, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %58, 1
  store <2 x float> %.fca.0.extract, ptr %8, align 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %59 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN10aiVector3tIfE9NormalizeEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %60 = load ptr, ptr %48, align 8, !tbaa !25
  %61 = getelementptr inbounds %class.aiVector3t, ptr %60, i64 %indvars.iv63
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %61, ptr noundef nonnull align 4 dereferenceable(12) %59, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #7
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %62 = load i32, ptr %45, align 4, !tbaa !5
  %63 = zext i32 %62 to i64
  %64 = icmp ult i64 %indvars.iv.next64, %63
  br i1 %64, label %49, label %.loopexit, !llvm.loop !26

.loopexit:                                        ; preds = %49, %.preheader, %.loopexit49
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #7
  br label %65

65:                                               ; preds = %25, %.loopexit, %3
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK12aiMatrix4x4tIfE10IsIdentityEf(ptr noundef nonnull align 4 dereferenceable(64), float noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh12HasPositionsEv(ptr noundef nonnull align 8 dereferenceable(1320)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress 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) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh10HasNormalsEv(ptr noundef nonnull align 8 dereferenceable(1320)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6aiMesh24HasTangentsAndBitangentsEv(ptr noundef nonnull align 8 dereferenceable(1320)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE7InverseEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(64) ptr @_ZN12aiMatrix4x4tIfE9TransposeEv(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12aiMatrix3x3tIfEC2ERK12aiMatrix4x4tIfE(ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #2 align 2

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

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

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 = { inlinehint 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 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !7, i64 4}
!6 = !{!"_ZTS6aiMesh", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !8, i64 48, !8, i64 112, !8, i64 176, !10, i64 208, !7, i64 216, !10, i64 224, !7, i64 232, !11, i64 236, !7, i64 1264, !10, i64 1272, !12, i64 1280, !13, i64 1284, !10, i64 1312}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS8aiString", !7, i64 0, !8, i64 4}
!12 = !{!"_ZTS16aiMorphingMethod", !8, i64 0}
!13 = !{!"_ZTS6aiAABB", !14, i64 0, !14, i64 12}
!14 = !{!"_ZTS10aiVector3tIfE", !15, i64 0, !15, i64 4, !15, i64 8}
!15 = !{!"float", !8, i64 0}
!16 = !{!6, !10, i64 16}
!17 = !{!15, !15, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{i64 0, i64 4, !17, i64 4, i64 4, !17, i64 8, i64 4, !17, i64 12, i64 4, !17, i64 16, i64 4, !17, i64 20, i64 4, !17, i64 24, i64 4, !17, i64 28, i64 4, !17, i64 32, i64 4, !17, i64 36, i64 4, !17, i64 40, i64 4, !17, i64 44, i64 4, !17, i64 48, i64 4, !17, i64 52, i64 4, !17, i64 56, i64 4, !17, i64 60, i64 4, !17}
!21 = !{!6, !10, i64 24}
!22 = !{i64 0, i64 4, !17, i64 4, i64 4, !17, i64 8, i64 4, !17}
!23 = distinct !{!23, !19}
!24 = !{!6, !10, i64 32}
!25 = !{!6, !10, i64 40}
!26 = distinct !{!26, !19}


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