; 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.aiMetadata = type { i32, ptr, ptr }
%struct.aiString = type { i32, [1024 x i8] }
%struct.aiMetadataEntry = type { i32, ptr }

@.str.1 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1

; 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

declare void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef, ptr noundef, i32 noundef) #1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; 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 void @_ZN8aiStringC2ERKS_(ptr noundef nonnull align 4 dereferenceable(1028), ptr noundef nonnull align 4 dereferenceable(1028)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10aiMetadataC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP10aiMetadataPKS1_(ptr noundef %0, ptr noundef %1) #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, 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, !tbaa !5
  %12 = icmp eq ptr null, %11
  br i1 %12, label %16, label %13

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

16:                                               ; preds = %13, %2
  br label %157

17:                                               ; preds = %13
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.aiMetadata, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = icmp eq i32 0, %20
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  br label %157

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.aiMetadata, ptr %24, i32 0, i32 0
  %26 = load i32, ptr %25, align 8, !tbaa !9
  %27 = call noundef ptr @_ZN10aiMetadata5AllocEj(i32 noundef %26)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %27, ptr %28, align 8, !tbaa !5
  store ptr %27, ptr %5, align 8, !tbaa !5
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.aiMetadata, ptr %29, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !12
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.aiMetadata, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !12
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.aiMetadata, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !9
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds %struct.aiString, ptr %34, i64 %38
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.aiMetadata, ptr %40, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !12
  %43 = call noundef ptr @_ZSt4copyIP8aiStringS1_ET0_T_S3_S2_(ptr noundef %31, ptr noundef %39, ptr noundef %42)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !13
  br label %44

44:                                               ; preds = %152, %23
  %45 = load i32, ptr %6, align 4, !tbaa !13
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.aiMetadata, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !9
  %49 = icmp ult i32 %45, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %156

51:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.aiMetadata, ptr %52, i32 0, i32 2
  %54 = load ptr, ptr %53, align 8, !tbaa !14
  %55 = load i32, ptr %6, align 4, !tbaa !13
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds %struct.aiMetadataEntry, ptr %54, i64 %56
  store ptr %57, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.aiMetadata, ptr %58, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !14
  %61 = load i32, ptr %6, align 4, !tbaa !13
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds %struct.aiMetadataEntry, ptr %60, i64 %62
  store ptr %63, ptr %8, align 8, !tbaa !5
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.aiMetadataEntry, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !15
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.aiMetadataEntry, ptr %67, i32 0, i32 0
  store i32 %66, ptr %68, align 8, !tbaa !15
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.aiMetadata, ptr %69, i32 0, i32 2
  %71 = load ptr, ptr %70, align 8, !tbaa !14
  %72 = load i32, ptr %6, align 4, !tbaa !13
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds %struct.aiMetadataEntry, ptr %71, i64 %73
  %75 = getelementptr inbounds %struct.aiMetadataEntry, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !15
  switch i32 %76, label %150 [
    i32 0, label %77
    i32 1, label %87
    i32 2, label %95
    i32 3, label %103
    i32 4, label %111
    i32 5, label %119
    i32 6, label %131
    i32 7, label %138
  ]

77:                                               ; preds = %51
  %78 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1) #9
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.aiMetadataEntry, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !18
  %82 = load i8, ptr %81, align 1, !tbaa !19, !range !21, !noundef !22
  %83 = trunc i8 %82 to i1
  %84 = zext i1 %83 to i8
  store i8 %84, ptr %78, align 1, !tbaa !19
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.aiMetadataEntry, ptr %85, i32 0, i32 1
  store ptr %78, ptr %86, align 8, !tbaa !18
  br label %151

87:                                               ; preds = %51
  %88 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #9
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.aiMetadataEntry, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !18
  %92 = load i32, ptr %91, align 4, !tbaa !13
  store i32 %92, ptr %88, align 4, !tbaa !13
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.aiMetadataEntry, ptr %93, i32 0, i32 1
  store ptr %88, ptr %94, align 8, !tbaa !18
  br label %151

95:                                               ; preds = %51
  %96 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #9
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.aiMetadataEntry, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !18
  %100 = load i64, ptr %99, align 8, !tbaa !23
  store i64 %100, ptr %96, align 8, !tbaa !23
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.aiMetadataEntry, ptr %101, i32 0, i32 1
  store ptr %96, ptr %102, align 8, !tbaa !18
  br label %151

103:                                              ; preds = %51
  %104 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #9
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.aiMetadataEntry, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !18
  %108 = load float, ptr %107, align 4, !tbaa !25
  store float %108, ptr %104, align 4, !tbaa !25
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.aiMetadataEntry, ptr %109, i32 0, i32 1
  store ptr %104, ptr %110, align 8, !tbaa !18
  br label %151

111:                                              ; preds = %51
  %112 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #9
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.aiMetadataEntry, ptr %113, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !18
  %116 = load double, ptr %115, align 8, !tbaa !27
  store double %116, ptr %112, align 8, !tbaa !27
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.aiMetadataEntry, ptr %117, i32 0, i32 1
  store ptr %112, ptr %118, align 8, !tbaa !18
  br label %151

119:                                              ; preds = %51
  %120 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1028) #9
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.aiMetadataEntry, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !18
  invoke void @_ZN8aiStringC2ERKS_(ptr noundef nonnull align 4 dereferenceable(1028) %120, ptr noundef nonnull align 4 dereferenceable(1028) %123)
          to label %124 unwind label %127

124:                                              ; preds = %119
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.aiMetadataEntry, ptr %125, i32 0, i32 1
  store ptr %120, ptr %126, align 8, !tbaa !18
  br label %151

127:                                              ; preds = %119
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %9, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %120, i64 noundef 1028) #10
  br label %155

131:                                              ; preds = %51
  %132 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 12) #9
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.aiMetadataEntry, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %132, ptr align 4 %135, i64 12, i1 false), !tbaa.struct !29
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.aiMetadataEntry, ptr %136, i32 0, i32 1
  store ptr %132, ptr %137, align 8, !tbaa !18
  br label %151

138:                                              ; preds = %51
  %139 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #9
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.aiMetadataEntry, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !18
  invoke void @_ZN10aiMetadataC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %139, ptr noundef nonnull align 8 dereferenceable(24) %142)
          to label %143 unwind label %146

143:                                              ; preds = %138
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.aiMetadataEntry, ptr %144, i32 0, i32 1
  store ptr %139, ptr %145, align 8, !tbaa !18
  br label %151

146:                                              ; preds = %138
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %9, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %10, align 4
  call void @_ZdlPvm(ptr noundef %139, i64 noundef 24) #10
  br label %155

150:                                              ; preds = %51
  call void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 1366)
  br label %151

151:                                              ; preds = %150, %143, %131, %124, %111, %103, %95, %87, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %6, align 4, !tbaa !13
  %154 = add i32 %153, 1
  store i32 %154, ptr %6, align 4, !tbaa !13
  br label %44, !llvm.loop !30

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

156:                                              ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %157

157:                                              ; preds = %156, %22, %16
  ret void

158:                                              ; preds = %155
  %159 = load ptr, ptr %9, align 8
  %160 = load i32, ptr %10, align 4
  %161 = insertvalue { ptr, i32 } poison, ptr %159, 0
  %162 = insertvalue { ptr, i32 } %161, i32 %160, 1
  resume { ptr, i32 } %162
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN10aiMetadata5AllocEj(i32 noundef) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIP8aiStringS1_ET0_T_S3_S2_(ptr noundef, ptr noundef, ptr noundef) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 #3 = { nobuiltin nounwind "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 0}
!10 = !{!"_ZTS10aiMetadata", !11, i64 0, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 16}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS15aiMetadataEntry", !17, i64 0, !6, i64 8}
!17 = !{!"_ZTS14aiMetadataType", !7, i64 0}
!18 = !{!16, !6, i64 8}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!24, !24, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !7, i64 0}
!29 = !{i64 0, i64 4, !25, i64 4, i64 4, !25, i64 8, i64 4, !25}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.aiString = type { i32, [1024 x i8] }
%struct.aiMetadataEntry = type { i32, ptr }

@.str.1 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [6 x i8], align 1

declare void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) 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) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8aiStringC2ERKS_(ptr noundef nonnull align 4 dereferenceable(1028), ptr noundef nonnull align 4 dereferenceable(1028)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10aiMetadataC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP10aiMetadataPKS1_(ptr noundef writeonly %0, ptr noundef readonly %1) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %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 = load i32, ptr %1, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %.loopexit, label %8

8:                                                ; preds = %5
  %9 = tail call noundef ptr @_ZN10aiMetadata5AllocEj(i32 noundef %6)
  store ptr %9, ptr %0, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %12 = load i32, ptr %1, align 8, !tbaa !5
  %13 = zext i32 %12 to i64
  %14 = getelementptr inbounds %struct.aiString, ptr %11, i64 %13
  %15 = getelementptr inbounds i8, ptr %9, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = tail call noundef ptr @_ZSt4copyIP8aiStringS1_ET0_T_S3_S2_(ptr noundef %11, ptr noundef %14, ptr noundef %16)
  %18 = load i32, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i32 %18, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %8
  %19 = getelementptr inbounds i8, ptr %1, i64 16
  %20 = getelementptr inbounds i8, ptr %9, i64 16
  br label %21

21:                                               ; preds = %.lr.ph, %76
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %76 ]
  %22 = load ptr, ptr %19, align 8, !tbaa !13
  %23 = getelementptr inbounds %struct.aiMetadataEntry, ptr %22, i64 %indvars.iv
  %24 = load ptr, ptr %20, align 8, !tbaa !13
  %25 = getelementptr inbounds %struct.aiMetadataEntry, ptr %24, i64 %indvars.iv
  %26 = load i32, ptr %23, align 8, !tbaa !14
  store i32 %26, ptr %25, align 8, !tbaa !14
  switch i32 %26, label %75 [
    i32 0, label %27
    i32 1, label %33
    i32 2, label %39
    i32 3, label %45
    i32 4, label %51
    i32 5, label %57
    i32 6, label %62
    i32 7, label %67
  ]

27:                                               ; preds = %21
  %28 = tail call noalias noundef nonnull dereferenceable(1) ptr @_Znwm(i64 noundef 1) #7
  %29 = getelementptr inbounds i8, ptr %23, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = load i8, ptr %30, align 1, !tbaa !18, !range !20, !noundef !21
  store i8 %31, ptr %28, align 1, !tbaa !18
  %32 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %28, ptr %32, align 8, !tbaa !17
  br label %76

33:                                               ; preds = %21
  %34 = tail call noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #7
  %35 = getelementptr inbounds i8, ptr %23, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !17
  %37 = load i32, ptr %36, align 4, !tbaa !22
  store i32 %37, ptr %34, align 4, !tbaa !22
  %38 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %34, ptr %38, align 8, !tbaa !17
  br label %76

39:                                               ; preds = %21
  %40 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #7
  %41 = getelementptr inbounds i8, ptr %23, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = load i64, ptr %42, align 8, !tbaa !23
  store i64 %43, ptr %40, align 8, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %40, ptr %44, align 8, !tbaa !17
  br label %76

45:                                               ; preds = %21
  %46 = tail call noalias noundef nonnull dereferenceable(4) ptr @_Znwm(i64 noundef 4) #7
  %47 = getelementptr inbounds i8, ptr %23, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = load float, ptr %48, align 4, !tbaa !25
  store float %49, ptr %46, align 4, !tbaa !25
  %50 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %46, ptr %50, align 8, !tbaa !17
  br label %76

51:                                               ; preds = %21
  %52 = tail call noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #7
  %53 = getelementptr inbounds i8, ptr %23, i64 8
  %54 = load ptr, ptr %53, align 8, !tbaa !17
  %55 = load double, ptr %54, align 8, !tbaa !27
  store double %55, ptr %52, align 8, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %52, ptr %56, align 8, !tbaa !17
  br label %76

57:                                               ; preds = %21
  %58 = tail call noalias noundef nonnull dereferenceable(1028) ptr @_Znwm(i64 noundef 1028) #7
  %59 = getelementptr inbounds i8, ptr %23, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  tail call void @_ZN8aiStringC2ERKS_(ptr noundef nonnull align 4 dereferenceable(1028) %58, ptr noundef nonnull align 4 dereferenceable(1028) %60)
  %61 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %58, ptr %61, align 8, !tbaa !17
  br label %76

62:                                               ; preds = %21
  %63 = tail call noalias noundef nonnull dereferenceable(12) ptr @_Znwm(i64 noundef 12) #7
  %64 = getelementptr inbounds i8, ptr %23, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %63, ptr noundef nonnull align 4 dereferenceable(12) %65, i64 12, i1 false), !tbaa.struct !29
  %66 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %63, ptr %66, align 8, !tbaa !17
  br label %76

67:                                               ; preds = %21
  %68 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #7
  %69 = getelementptr inbounds i8, ptr %23, i64 8
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  invoke void @_ZN10aiMetadataC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 8 dereferenceable(24) %70)
          to label %71 unwind label %73

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %68, ptr %72, align 8, !tbaa !17
  br label %76

73:                                               ; preds = %67
  %74 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %68, i64 noundef 24) #8
  resume { ptr, i32 } %74

75:                                               ; preds = %21
  tail call void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 1366)
  br label %76

76:                                               ; preds = %75, %71, %62, %57, %51, %45, %39, %33, %27
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %77 = load i32, ptr %1, align 8, !tbaa !5
  %78 = zext i32 %77 to i64
  %79 = icmp ult i64 %indvars.iv.next, %78
  br i1 %79, label %21, label %.loopexit, !llvm.loop !30

.loopexit:                                        ; preds = %76, %8, %5, %2
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN10aiMetadata5AllocEj(i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIP8aiStringS1_ET0_T_S3_S2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

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 = { 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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = { 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 #7 = { builtin allocsize(0) }
attributes #8 = { builtin 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 0}
!6 = !{!"_ZTS10aiMetadata", !7, i64 0, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!6, !10, i64 16}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTS15aiMetadataEntry", !16, i64 0, !10, i64 8}
!16 = !{!"_ZTS14aiMetadataType", !8, i64 0}
!17 = !{!15, !10, i64 8}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !8, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"long", !8, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !8, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !8, i64 0}
!29 = !{i64 0, i64 4, !25, i64 4, i64 4, !25, i64 8, i64 4, !25}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}


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