; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/Common (SceneCombiner)

; 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.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 }
%class.aiVector3t = type { float, float, float }
%struct.aiFace = type { i32, 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP6aiMeshPKS1_(ptr noundef %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = icmp eq ptr null, %10
  br i1 %11, label %15, label %12

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp eq ptr null, %13
  br i1 %14, label %15, label %16

15:                                               ; preds = %12, %2
  br label %147

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %17 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1320) #8
  call void @_ZN6aiMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(1320) %17) #7
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %17, ptr %18, align 8, !tbaa !5
  store ptr %17, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(1320) ptr @_ZN6aiMeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(1320) %20, ptr noundef nonnull align 8 dereferenceable(1320) %19)
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.aiMesh, ptr %22, i32 0, i32 3
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.aiMesh, ptr %24, i32 0, i32 1
  %26 = load i32, ptr %25, align 4, !tbaa !9
  call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef %26)
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.aiMesh, ptr %27, i32 0, i32 4
  %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 !9
  call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef %31)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.aiMesh, ptr %32, i32 0, i32 5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.aiMesh, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !9
  call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 noundef %36)
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.aiMesh, ptr %37, i32 0, i32 6
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.aiMesh, ptr %39, i32 0, i32 1
  %41 = load i32, ptr %40, align 4, !tbaa !9
  call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef %41)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !17
  br label %42

42:                                               ; preds = %46, %16
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = load i32, ptr %6, align 4, !tbaa !17
  %45 = call noundef zeroext i1 @_ZNK6aiMesh16HasTextureCoordsEj(ptr noundef nonnull align 8 dereferenceable(1320) %43, i32 noundef %44)
  br i1 %45, label %46, label %56

46:                                               ; preds = %42
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.aiMesh, ptr %47, i32 0, i32 8
  %49 = load i32, ptr %6, align 4, !tbaa !17
  %50 = add i32 %49, 1
  store i32 %50, ptr %6, align 4, !tbaa !17
  %51 = zext i32 %49 to i64
  %52 = getelementptr inbounds [8 x ptr], ptr %48, i64 0, i64 %51
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.aiMesh, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !9
  call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %52, i32 noundef %55)
  br label %42, !llvm.loop !18

56:                                               ; preds = %42
  store i32 0, ptr %6, align 4, !tbaa !17
  br label %57

57:                                               ; preds = %61, %56
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !17
  %60 = call noundef zeroext i1 @_ZNK6aiMesh15HasVertexColorsEj(ptr noundef nonnull align 8 dereferenceable(1320) %58, i32 noundef %59)
  br i1 %60, label %61, label %71

61:                                               ; preds = %57
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.aiMesh, ptr %62, i32 0, i32 7
  %64 = load i32, ptr %6, align 4, !tbaa !17
  %65 = add i32 %64, 1
  store i32 %65, ptr %6, align 4, !tbaa !17
  %66 = zext i32 %64 to i64
  %67 = getelementptr inbounds [8 x ptr], ptr %63, i64 0, i64 %66
  %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 !9
  call void @_ZN6Assimp12GetArrayCopyI9aiColor4tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %67, i32 noundef %70)
  br label %57, !llvm.loop !20

71:                                               ; preds = %57
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.aiMesh, ptr %72, i32 0, i32 12
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.aiMesh, ptr %74, i32 0, i32 12
  %76 = load ptr, ptr %75, align 8, !tbaa !21
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.aiMesh, ptr %77, i32 0, i32 11
  %79 = load i32, ptr %78, align 8, !tbaa !22
  call void @_ZN6Assimp12CopyPtrArrayI6aiBoneEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %73, ptr noundef %76, i32 noundef %79)
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.aiMesh, ptr %80, i32 0, i32 10
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.aiMesh, ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 8, !tbaa !23
  call void @_ZN6Assimp12GetArrayCopyI6aiFaceEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %81, i32 noundef %84)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !17
  br label %85

85:                                               ; preds = %104, %71
  %86 = load i32, ptr %7, align 4, !tbaa !17
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.aiMesh, ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 8, !tbaa !23
  %90 = icmp ult i32 %86, %89
  br i1 %90, label %92, label %91

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

92:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.aiMesh, ptr %93, i32 0, i32 10
  %95 = load ptr, ptr %94, align 8, !tbaa !24
  %96 = load i32, ptr %7, align 4, !tbaa !17
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds %struct.aiFace, ptr %95, i64 %97
  store ptr %98, ptr %8, align 8, !tbaa !5
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.aiFace, ptr %99, i32 0, i32 1
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.aiFace, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 8, !tbaa !25
  call void @_ZN6Assimp12GetArrayCopyIjEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %100, i32 noundef %103)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %104

104:                                              ; preds = %92
  %105 = load i32, ptr %7, align 4, !tbaa !17
  %106 = add i32 %105, 1
  store i32 %106, ptr %7, align 4, !tbaa !17
  br label %85, !llvm.loop !27

107:                                              ; preds = %91
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.aiMesh, ptr %108, i32 0, i32 16
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.aiMesh, ptr %110, i32 0, i32 16
  %112 = load ptr, ptr %111, align 8, !tbaa !28
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.aiMesh, ptr %113, i32 0, i32 15
  %115 = load i32, ptr %114, align 8, !tbaa !29
  call void @_ZN6Assimp12CopyPtrArrayI10aiAnimMeshEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef %112, i32 noundef %115)
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.aiMesh, ptr %116, i32 0, i32 19
  %118 = load ptr, ptr %117, align 8, !tbaa !30
  %119 = icmp ne ptr %118, null
  br i1 %119, label %120, label %146

120:                                              ; preds = %107
  %121 = call noalias noundef nonnull ptr @_Znam(i64 noundef 64) #8
  call void @llvm.memset.p0.i64(ptr align 8 %121, i8 0, i64 64, i1 false)
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.aiMesh, ptr %122, i32 0, i32 19
  store ptr %121, ptr %123, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !17
  br label %124

124:                                              ; preds = %142, %120
  %125 = load i32, ptr %9, align 4, !tbaa !17
  %126 = icmp ult i32 %125, 8
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %145

128:                                              ; preds = %124
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.aiMesh, ptr %129, i32 0, i32 19
  %131 = load ptr, ptr %130, align 8, !tbaa !30
  %132 = load i32, ptr %9, align 4, !tbaa !17
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds ptr, ptr %131, i64 %133
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.aiMesh, ptr %135, i32 0, i32 19
  %137 = load ptr, ptr %136, align 8, !tbaa !30
  %138 = load i32, ptr %9, align 4, !tbaa !17
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds ptr, ptr %137, i64 %139
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef %134, ptr noundef %141)
  br label %142

142:                                              ; preds = %128
  %143 = load i32, ptr %9, align 4, !tbaa !17
  %144 = add i32 %143, 1
  store i32 %144, ptr %9, align 4, !tbaa !17
  br label %124, !llvm.loop !31

145:                                              ; preds = %127
  br label %146

146:                                              ; preds = %145, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %147

147:                                              ; preds = %146, %15
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6aiMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(1320)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(1320) ptr @_ZN6aiMeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(1320), ptr noundef nonnull align 8 dereferenceable(1320)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyI9aiColor4tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12CopyPtrArrayI6aiBoneEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyI6aiFaceEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyIjEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12CopyPtrArrayI10aiAnimMeshEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef, ptr noundef) #2 align 2

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

!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 4}
!10 = !{!"_ZTS6aiMesh", !11, i64 0, !11, i64 4, !11, 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, !11, i64 216, !6, i64 224, !11, i64 232, !12, i64 236, !11, i64 1264, !6, i64 1272, !13, i64 1280, !14, i64 1284, !6, i64 1312}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS8aiString", !11, i64 0, !7, i64 4}
!13 = !{!"_ZTS16aiMorphingMethod", !7, i64 0}
!14 = !{!"_ZTS6aiAABB", !15, i64 0, !15, i64 12}
!15 = !{!"_ZTS10aiVector3tIfE", !16, i64 0, !16, i64 4, !16, i64 8}
!16 = !{!"float", !7, i64 0}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!10, !6, i64 224}
!22 = !{!10, !11, i64 216}
!23 = !{!10, !11, i64 8}
!24 = !{!10, !6, i64 208}
!25 = !{!26, !11, i64 0}
!26 = !{!"_ZTS6aiFace", !11, i64 0, !6, i64 8}
!27 = distinct !{!27, !19}
!28 = !{!10, !6, i64 1272}
!29 = !{!10, !11, i64 1264}
!30 = !{!10, !6, i64 1312}
!31 = distinct !{!31, !19}


; 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.aiFace = type { i32, ptr }

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP6aiMeshPKS1_(ptr noundef writeonly %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = icmp eq ptr %0, null
  %4 = icmp eq ptr %1, null
  %or.cond = or i1 %3, %4
  br i1 %or.cond, label %.loopexit, label %5

5:                                                ; preds = %2
  %6 = tail call noalias noundef nonnull dereferenceable(1320) ptr @_Znwm(i64 noundef 1320) #6
  tail call void @_ZN6aiMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(1320) %6) #7
  store ptr %6, ptr %0, align 8, !tbaa !5
  %7 = tail call noundef nonnull align 8 dereferenceable(1320) ptr @_ZN6aiMeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(1320) %6, ptr noundef nonnull align 8 dereferenceable(1320) %1)
  %8 = getelementptr inbounds i8, ptr %6, i64 16
  %9 = getelementptr inbounds i8, ptr %6, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !9
  tail call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef %10)
  %11 = getelementptr inbounds i8, ptr %6, i64 24
  %12 = load i32, ptr %9, align 4, !tbaa !9
  tail call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %12)
  %13 = getelementptr inbounds i8, ptr %6, i64 32
  %14 = load i32, ptr %9, align 4, !tbaa !9
  tail call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %14)
  %15 = getelementptr inbounds i8, ptr %6, i64 40
  %16 = load i32, ptr %9, align 4, !tbaa !9
  tail call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef %16)
  %17 = tail call noundef zeroext i1 @_ZNK6aiMesh16HasTextureCoordsEj(ptr noundef nonnull align 8 dereferenceable(1320) %6, i32 noundef 0)
  br i1 %17, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %5
  %18 = getelementptr inbounds i8, ptr %6, i64 112
  br label %21

.preheader:                                       ; preds = %21, %5
  %19 = tail call noundef zeroext i1 @_ZNK6aiMesh15HasVertexColorsEj(ptr noundef nonnull align 8 dereferenceable(1320) %6, i32 noundef 0)
  br i1 %19, label %.lr.ph52, label %._crit_edge

.lr.ph52:                                         ; preds = %.preheader
  %20 = getelementptr inbounds i8, ptr %6, i64 48
  br label %27

21:                                               ; preds = %.lr.ph, %21
  %.04650 = phi i32 [ 0, %.lr.ph ], [ %22, %21 ]
  %22 = add i32 %.04650, 1
  %23 = zext i32 %.04650 to i64
  %24 = getelementptr inbounds [8 x ptr], ptr %18, i64 0, i64 %23
  %25 = load i32, ptr %9, align 4, !tbaa !9
  tail call void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %24, i32 noundef %25)
  %26 = tail call noundef zeroext i1 @_ZNK6aiMesh16HasTextureCoordsEj(ptr noundef nonnull align 8 dereferenceable(1320) %6, i32 noundef %22)
  br i1 %26, label %21, label %.preheader, !llvm.loop !17

27:                                               ; preds = %.lr.ph52, %27
  %.151 = phi i32 [ 0, %.lr.ph52 ], [ %28, %27 ]
  %28 = add i32 %.151, 1
  %29 = zext i32 %.151 to i64
  %30 = getelementptr inbounds [8 x ptr], ptr %20, i64 0, i64 %29
  %31 = load i32, ptr %9, align 4, !tbaa !9
  tail call void @_ZN6Assimp12GetArrayCopyI9aiColor4tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %30, i32 noundef %31)
  %32 = tail call noundef zeroext i1 @_ZNK6aiMesh15HasVertexColorsEj(ptr noundef nonnull align 8 dereferenceable(1320) %6, i32 noundef %28)
  br i1 %32, label %27, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %27, %.preheader
  %33 = getelementptr inbounds i8, ptr %6, i64 224
  %34 = load ptr, ptr %33, align 8, !tbaa !20
  %35 = getelementptr inbounds i8, ptr %6, i64 216
  %36 = load i32, ptr %35, align 8, !tbaa !21
  tail call void @_ZN6Assimp12CopyPtrArrayI6aiBoneEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef %34, i32 noundef %36)
  %37 = getelementptr inbounds i8, ptr %6, i64 208
  %38 = getelementptr inbounds i8, ptr %6, i64 8
  %39 = load i32, ptr %38, align 8, !tbaa !22
  tail call void @_ZN6Assimp12GetArrayCopyI6aiFaceEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 noundef %39)
  %40 = load i32, ptr %38, align 8, !tbaa !22
  %.not58 = icmp eq i32 %40, 0
  br i1 %.not58, label %._crit_edge56, label %.lr.ph55

._crit_edge56:                                    ; preds = %.lr.ph55, %._crit_edge
  %41 = getelementptr inbounds i8, ptr %6, i64 1272
  %42 = load ptr, ptr %41, align 8, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %6, i64 1264
  %44 = load i32, ptr %43, align 8, !tbaa !24
  tail call void @_ZN6Assimp12CopyPtrArrayI10aiAnimMeshEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef %42, i32 noundef %44)
  %45 = getelementptr inbounds i8, ptr %1, i64 1312
  %46 = load ptr, ptr %45, align 8, !tbaa !25
  %.not = icmp eq ptr %46, null
  br i1 %.not, label %.loopexit, label %.loopexit.loopexit

.lr.ph55:                                         ; preds = %._crit_edge, %.lr.ph55
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph55 ], [ 0, %._crit_edge ]
  %47 = load ptr, ptr %37, align 8, !tbaa !26
  %48 = getelementptr inbounds %struct.aiFace, ptr %47, i64 %indvars.iv
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load i32, ptr %48, align 8, !tbaa !27
  tail call void @_ZN6Assimp12GetArrayCopyIjEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8) %49, i32 noundef %50)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %51 = load i32, ptr %38, align 8, !tbaa !22
  %52 = zext i32 %51 to i64
  %53 = icmp ult i64 %indvars.iv.next, %52
  br i1 %53, label %.lr.ph55, label %._crit_edge56, !llvm.loop !29

.loopexit.loopexit:                               ; preds = %._crit_edge56
  %54 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znam(i64 noundef 64) #6
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %54, i8 0, i64 64, i1 false)
  %55 = getelementptr inbounds i8, ptr %6, i64 1312
  store ptr %54, ptr %55, align 8, !tbaa !25
  %56 = load ptr, ptr %46, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %54, ptr noundef %56)
  %57 = load ptr, ptr %55, align 8, !tbaa !25
  %58 = getelementptr inbounds i8, ptr %57, i64 8
  %59 = load ptr, ptr %45, align 8, !tbaa !25
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %58, ptr noundef %61)
  %62 = load ptr, ptr %55, align 8, !tbaa !25
  %63 = getelementptr inbounds i8, ptr %62, i64 16
  %64 = load ptr, ptr %45, align 8, !tbaa !25
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %63, ptr noundef %66)
  %67 = load ptr, ptr %55, align 8, !tbaa !25
  %68 = getelementptr inbounds i8, ptr %67, i64 24
  %69 = load ptr, ptr %45, align 8, !tbaa !25
  %70 = getelementptr inbounds i8, ptr %69, i64 24
  %71 = load ptr, ptr %70, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %68, ptr noundef %71)
  %72 = load ptr, ptr %55, align 8, !tbaa !25
  %73 = getelementptr inbounds i8, ptr %72, i64 32
  %74 = load ptr, ptr %45, align 8, !tbaa !25
  %75 = getelementptr inbounds i8, ptr %74, i64 32
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %73, ptr noundef %76)
  %77 = load ptr, ptr %55, align 8, !tbaa !25
  %78 = getelementptr inbounds i8, ptr %77, i64 40
  %79 = load ptr, ptr %45, align 8, !tbaa !25
  %80 = getelementptr inbounds i8, ptr %79, i64 40
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %78, ptr noundef %81)
  %82 = load ptr, ptr %55, align 8, !tbaa !25
  %83 = getelementptr inbounds i8, ptr %82, i64 48
  %84 = load ptr, ptr %45, align 8, !tbaa !25
  %85 = getelementptr inbounds i8, ptr %84, i64 48
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %83, ptr noundef %86)
  %87 = load ptr, ptr %55, align 8, !tbaa !25
  %88 = getelementptr inbounds i8, ptr %87, i64 56
  %89 = load ptr, ptr %45, align 8, !tbaa !25
  %90 = getelementptr inbounds i8, ptr %89, i64 56
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef nonnull %88, ptr noundef %91)
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %._crit_edge56, %2
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6aiMeshC2Ev(ptr noundef nonnull align 8 dereferenceable(1320)) unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(1320) ptr @_ZN6aiMeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(1320), ptr noundef nonnull align 8 dereferenceable(1320)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyI10aiVector3tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyI9aiColor4tIfEEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12CopyPtrArrayI6aiBoneEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyI6aiFaceEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12GetArrayCopyIjEEvRPT_j(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12CopyPtrArrayI10aiAnimMeshEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP8aiStringPKS1_(ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

attributes #0 = { nobuiltin allocsize(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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = { 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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { builtin allocsize(0) }
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, !11, i64 4}
!10 = !{!"_ZTS6aiMesh", !11, i64 0, !11, i64 4, !11, 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, !11, i64 216, !6, i64 224, !11, i64 232, !12, i64 236, !11, i64 1264, !6, i64 1272, !13, i64 1280, !14, i64 1284, !6, i64 1312}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS8aiString", !11, i64 0, !7, i64 4}
!13 = !{!"_ZTS16aiMorphingMethod", !7, i64 0}
!14 = !{!"_ZTS6aiAABB", !15, i64 0, !15, i64 12}
!15 = !{!"_ZTS10aiVector3tIfE", !16, i64 0, !16, i64 4, !16, i64 8}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{!10, !6, i64 224}
!21 = !{!10, !11, i64 216}
!22 = !{!10, !11, i64 8}
!23 = !{!10, !6, i64 1272}
!24 = !{!10, !11, i64 1264}
!25 = !{!10, !6, i64 1312}
!26 = !{!10, !6, i64 208}
!27 = !{!28, !11, i64 0}
!28 = !{!"_ZTS6aiFace", !11, i64 0, !6, i64 8}
!29 = distinct !{!29, !18}


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