; 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.aiScene = type { i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, %struct.aiString, i32, ptr, ptr }
%struct.aiString = type { i32, [1024 x i8] }
%"struct.Assimp::ScenePrivateData" = type <{ ptr, i32, i8, [3 x i8] }>

@.str.1 = external hidden unnamed_addr constant [114 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [16 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

declare void @_ZN7aiSceneC1Ev(ptr noundef nonnull align 8 dereferenceable(1168)) unnamed_addr #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: mustprogress uwtable
declare dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP6aiNodePKS1_(ptr noundef, ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp13SceneCombiner9CopySceneEPP7aiScenePKS1_b(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2) #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %10 = zext i1 %2 to i8
  store i8 %10, ptr %6, align 1, !tbaa !9
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = icmp eq ptr null, %11
  br i1 %12, label %16, label %13

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

16:                                               ; preds = %13, %3
  br label %161

17:                                               ; preds = %13
  %18 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %19 = trunc i8 %18 to i1
  br i1 %19, label %20, label %28

20:                                               ; preds = %17
  %21 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 1168) #6
  invoke void @_ZN7aiSceneC1Ev(ptr noundef nonnull align 8 dereferenceable(1168) %21)
          to label %22 unwind label %24

22:                                               ; preds = %20
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %21, ptr %23, align 8, !tbaa !5
  br label %28

24:                                               ; preds = %20
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %7, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %21, i64 noundef 1168) #7
  br label %162

28:                                               ; preds = %22, %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %30, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = icmp ne ptr null, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %28
  call void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 1026)
  br label %34

34:                                               ; preds = %33, %28
  %35 = phi i1 [ true, %28 ], [ false, %33 ]
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.aiScene, ptr %36, i32 0, i32 14
  %38 = load ptr, ptr %37, align 8, !tbaa !13
  %39 = icmp ne ptr null, %38
  br i1 %39, label %40, label %52

40:                                               ; preds = %34
  %41 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #6
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.aiScene, ptr %42, i32 0, i32 14
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  invoke void @_ZN10aiMetadataC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(24) %44)
          to label %45 unwind label %48

45:                                               ; preds = %40
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.aiScene, ptr %46, i32 0, i32 14
  store ptr %41, ptr %47, align 8, !tbaa !13
  br label %52

48:                                               ; preds = %40
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  call void @_ZdlPvm(ptr noundef %41, i64 noundef 24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %162

52:                                               ; preds = %45, %34
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.aiScene, ptr %53, i32 0, i32 6
  %55 = load i32, ptr %54, align 8, !tbaa !17
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.aiScene, ptr %56, i32 0, i32 6
  store i32 %55, ptr %57, align 8, !tbaa !17
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.aiScene, ptr %58, i32 0, i32 7
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.aiScene, ptr %60, i32 0, i32 7
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.aiScene, ptr %63, i32 0, i32 6
  %65 = load i32, ptr %64, align 8, !tbaa !17
  call void @_ZN6Assimp12CopyPtrArrayI11aiAnimationEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef %62, i32 noundef %65)
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.aiScene, ptr %66, i32 0, i32 8
  %68 = load i32, ptr %67, align 8, !tbaa !19
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.aiScene, ptr %69, i32 0, i32 8
  store i32 %68, ptr %70, align 8, !tbaa !19
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.aiScene, ptr %71, i32 0, i32 9
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.aiScene, ptr %73, i32 0, i32 9
  %75 = load ptr, ptr %74, align 8, !tbaa !20
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.aiScene, ptr %76, i32 0, i32 8
  %78 = load i32, ptr %77, align 8, !tbaa !19
  call void @_ZN6Assimp12CopyPtrArrayI9aiTextureEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef %75, i32 noundef %78)
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.aiScene, ptr %79, i32 0, i32 4
  %81 = load i32, ptr %80, align 8, !tbaa !21
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.aiScene, ptr %82, i32 0, i32 4
  store i32 %81, ptr %83, align 8, !tbaa !21
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.aiScene, ptr %84, i32 0, i32 5
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.aiScene, ptr %86, i32 0, i32 5
  %88 = load ptr, ptr %87, align 8, !tbaa !22
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.aiScene, ptr %89, i32 0, i32 4
  %91 = load i32, ptr %90, align 8, !tbaa !21
  call void @_ZN6Assimp12CopyPtrArrayI10aiMaterialEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef %88, i32 noundef %91)
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.aiScene, ptr %92, i32 0, i32 10
  %94 = load i32, ptr %93, align 8, !tbaa !23
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.aiScene, ptr %95, i32 0, i32 10
  store i32 %94, ptr %96, align 8, !tbaa !23
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.aiScene, ptr %97, i32 0, i32 11
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.aiScene, ptr %99, i32 0, i32 11
  %101 = load ptr, ptr %100, align 8, !tbaa !24
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.aiScene, ptr %102, i32 0, i32 10
  %104 = load i32, ptr %103, align 8, !tbaa !23
  call void @_ZN6Assimp12CopyPtrArrayI7aiLightEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef %101, i32 noundef %104)
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.aiScene, ptr %105, i32 0, i32 12
  %107 = load i32, ptr %106, align 8, !tbaa !25
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.aiScene, ptr %108, i32 0, i32 12
  store i32 %107, ptr %109, align 8, !tbaa !25
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.aiScene, ptr %110, i32 0, i32 13
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.aiScene, ptr %112, i32 0, i32 13
  %114 = load ptr, ptr %113, align 8, !tbaa !26
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.aiScene, ptr %115, i32 0, i32 12
  %117 = load i32, ptr %116, align 8, !tbaa !25
  call void @_ZN6Assimp12CopyPtrArrayI8aiCameraEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef %114, i32 noundef %117)
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.aiScene, ptr %118, i32 0, i32 2
  %120 = load i32, ptr %119, align 8, !tbaa !27
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.aiScene, ptr %121, i32 0, i32 2
  store i32 %120, ptr %122, align 8, !tbaa !27
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.aiScene, ptr %123, i32 0, i32 3
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.aiScene, ptr %125, i32 0, i32 3
  %127 = load ptr, ptr %126, align 8, !tbaa !28
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.aiScene, ptr %128, i32 0, i32 2
  %130 = load i32, ptr %129, align 8, !tbaa !27
  call void @_ZN6Assimp12CopyPtrArrayI6aiMeshEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef %127, i32 noundef %130)
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.aiScene, ptr %131, i32 0, i32 1
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.aiScene, ptr %133, i32 0, i32 1
  %135 = load ptr, ptr %134, align 8, !tbaa !29
  call void @_ZN6Assimp13SceneCombiner4CopyEPP6aiNodePKS1_(ptr noundef %132, ptr noundef %135)
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.aiScene, ptr %136, i32 0, i32 0
  %138 = load i32, ptr %137, align 8, !tbaa !30
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.aiScene, ptr %139, i32 0, i32 0
  store i32 %138, ptr %140, align 8, !tbaa !30
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.aiScene, ptr %141, i32 0, i32 18
  %143 = load ptr, ptr %142, align 8, !tbaa !31
  %144 = icmp ne ptr %143, null
  br i1 %144, label %145, label %160

145:                                              ; preds = %52
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = call noundef ptr @_ZN6Assimp9ScenePrivEPK7aiScene(ptr noundef %146)
  %148 = icmp ne ptr %147, null
  br i1 %148, label %149, label %154

149:                                              ; preds = %145
  %150 = load ptr, ptr %5, align 8, !tbaa !5
  %151 = call noundef ptr @_ZN6Assimp9ScenePrivEPK7aiScene(ptr noundef %150)
  %152 = getelementptr inbounds %"struct.Assimp::ScenePrivateData", ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 8, !tbaa !32
  br label %155

154:                                              ; preds = %145
  br label %155

155:                                              ; preds = %154, %149
  %156 = phi i32 [ %153, %149 ], [ 0, %154 ]
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = call noundef ptr @_ZN6Assimp9ScenePrivEP7aiScene(ptr noundef %157)
  %159 = getelementptr inbounds %"struct.Assimp::ScenePrivateData", ptr %158, i32 0, i32 1
  store i32 %156, ptr %159, align 8, !tbaa !32
  br label %160

160:                                              ; preds = %155, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %161

161:                                              ; preds = %160, %16
  ret void

162:                                              ; preds = %48, %24
  %163 = load ptr, ptr %7, align 8
  %164 = load i32, ptr %8, align 4
  %165 = insertvalue { ptr, i32 } poison, ptr %163, 0
  %166 = insertvalue { ptr, i32 } %165, i32 %164, 1
  resume { ptr, i32 } %166
}

; 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 #4 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6Assimp9ScenePrivEPK7aiScene(ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6Assimp9ScenePrivEP7aiScene(ptr noundef) #5

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 = { 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 = { 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 = { builtin allocsize(0) }
attributes #7 = { builtin nounwind }
attributes #8 = { 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 112}
!14 = !{!"_ZTS7aiScene", !15, i64 0, !6, i64 8, !15, i64 16, !6, i64 24, !15, i64 32, !6, i64 40, !15, i64 48, !6, i64 56, !15, i64 64, !6, i64 72, !15, i64 80, !6, i64 88, !15, i64 96, !6, i64 104, !6, i64 112, !16, i64 120, !15, i64 1148, !6, i64 1152, !6, i64 1160}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS8aiString", !15, i64 0, !7, i64 4}
!17 = !{!14, !15, i64 48}
!18 = !{!14, !6, i64 56}
!19 = !{!14, !15, i64 64}
!20 = !{!14, !6, i64 72}
!21 = !{!14, !15, i64 32}
!22 = !{!14, !6, i64 40}
!23 = !{!14, !15, i64 80}
!24 = !{!14, !6, i64 88}
!25 = !{!14, !15, i64 96}
!26 = !{!14, !6, i64 104}
!27 = !{!14, !15, i64 16}
!28 = !{!14, !6, i64 24}
!29 = !{!14, !6, i64 8}
!30 = !{!14, !15, i64 0}
!31 = !{!14, !6, i64 1160}
!32 = !{!33, !15, i64 8}
!33 = !{!"_ZTSN6Assimp16ScenePrivateDataE", !6, i64 0, !15, i64 8, !10, i64 12}


; 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"

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

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

declare void @_ZN7aiSceneC1Ev(ptr noundef nonnull align 8 dereferenceable(1168)) 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 uwtable
declare dso_local void @_ZN6Assimp13SceneCombiner4CopyEPP6aiNodePKS1_(ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

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

6:                                                ; preds = %3
  br i1 %2, label %7, label %11

7:                                                ; preds = %6
  %8 = tail call noalias noundef nonnull dereferenceable(1168) ptr @_Znwm(i64 noundef 1168) #5
  invoke void @_ZN7aiSceneC1Ev(ptr noundef nonnull align 8 dereferenceable(1168) %8)
          to label %.thread unwind label %9

.thread:                                          ; preds = %7
  store ptr %8, ptr %0, align 8, !tbaa !5
  br label %13

9:                                                ; preds = %7
  %10 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %8, i64 noundef 1168) #6
  br label %77

11:                                               ; preds = %6
  %.pr = load ptr, ptr %0, align 8, !tbaa !5
  %.not = icmp eq ptr %.pr, null
  br i1 %.not, label %12, label %13

12:                                               ; preds = %11
  tail call void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 1026)
  br label %13

13:                                               ; preds = %.thread, %12, %11
  %14 = phi ptr [ %8, %.thread ], [ null, %12 ], [ %.pr, %11 ]
  %15 = getelementptr inbounds i8, ptr %1, i64 112
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %.not52 = icmp eq ptr %16, null
  br i1 %.not52, label %23, label %17

17:                                               ; preds = %13
  %18 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #5
  invoke void @_ZN10aiMetadataC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %19 unwind label %21

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %14, i64 112
  store ptr %18, ptr %20, align 8, !tbaa !9
  br label %23

21:                                               ; preds = %17
  %22 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 24) #6
  br label %77

23:                                               ; preds = %19, %13
  %24 = getelementptr inbounds i8, ptr %1, i64 48
  %25 = load i32, ptr %24, align 8, !tbaa !13
  %26 = getelementptr inbounds i8, ptr %14, i64 48
  store i32 %25, ptr %26, align 8, !tbaa !13
  %27 = getelementptr inbounds i8, ptr %14, i64 56
  %28 = getelementptr inbounds i8, ptr %1, i64 56
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  tail call void @_ZN6Assimp12CopyPtrArrayI11aiAnimationEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef %29, i32 noundef %25)
  %30 = getelementptr inbounds i8, ptr %1, i64 64
  %31 = load i32, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %14, i64 64
  store i32 %31, ptr %32, align 8, !tbaa !15
  %33 = getelementptr inbounds i8, ptr %14, i64 72
  %34 = getelementptr inbounds i8, ptr %1, i64 72
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  tail call void @_ZN6Assimp12CopyPtrArrayI9aiTextureEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef %35, i32 noundef %31)
  %36 = getelementptr inbounds i8, ptr %1, i64 32
  %37 = load i32, ptr %36, align 8, !tbaa !17
  %38 = getelementptr inbounds i8, ptr %14, i64 32
  store i32 %37, ptr %38, align 8, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %14, i64 40
  %40 = getelementptr inbounds i8, ptr %1, i64 40
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  tail call void @_ZN6Assimp12CopyPtrArrayI10aiMaterialEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef %41, i32 noundef %37)
  %42 = getelementptr inbounds i8, ptr %1, i64 80
  %43 = load i32, ptr %42, align 8, !tbaa !19
  %44 = getelementptr inbounds i8, ptr %14, i64 80
  store i32 %43, ptr %44, align 8, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %14, i64 88
  %46 = getelementptr inbounds i8, ptr %1, i64 88
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  tail call void @_ZN6Assimp12CopyPtrArrayI7aiLightEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef %47, i32 noundef %43)
  %48 = getelementptr inbounds i8, ptr %1, i64 96
  %49 = load i32, ptr %48, align 8, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %14, i64 96
  store i32 %49, ptr %50, align 8, !tbaa !21
  %51 = getelementptr inbounds i8, ptr %14, i64 104
  %52 = getelementptr inbounds i8, ptr %1, i64 104
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  tail call void @_ZN6Assimp12CopyPtrArrayI8aiCameraEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef %53, i32 noundef %49)
  %54 = getelementptr inbounds i8, ptr %1, i64 16
  %55 = load i32, ptr %54, align 8, !tbaa !23
  %56 = getelementptr inbounds i8, ptr %14, i64 16
  store i32 %55, ptr %56, align 8, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %14, i64 24
  %58 = getelementptr inbounds i8, ptr %1, i64 24
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  tail call void @_ZN6Assimp12CopyPtrArrayI6aiMeshEEvRPPT_PKPKS2_j(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef %59, i32 noundef %55)
  %60 = getelementptr inbounds i8, ptr %14, i64 8
  %61 = getelementptr inbounds i8, ptr %1, i64 8
  %62 = load ptr, ptr %61, align 8, !tbaa !25
  tail call void @_ZN6Assimp13SceneCombiner4CopyEPP6aiNodePKS1_(ptr noundef nonnull %60, ptr noundef %62)
  %63 = load i32, ptr %1, align 8, !tbaa !26
  store i32 %63, ptr %14, align 8, !tbaa !26
  %64 = getelementptr inbounds i8, ptr %1, i64 1160
  %65 = load ptr, ptr %64, align 8, !tbaa !27
  %.not54 = icmp eq ptr %65, null
  br i1 %.not54, label %76, label %66

66:                                               ; preds = %23
  %67 = tail call noundef ptr @_ZN6Assimp9ScenePrivEPK7aiScene(ptr noundef nonnull %1)
  %.not55 = icmp eq ptr %67, null
  br i1 %.not55, label %72, label %68

68:                                               ; preds = %66
  %69 = tail call noundef ptr @_ZN6Assimp9ScenePrivEPK7aiScene(ptr noundef nonnull %1)
  %70 = getelementptr inbounds i8, ptr %69, i64 8
  %71 = load i32, ptr %70, align 8, !tbaa !28
  br label %72

72:                                               ; preds = %66, %68
  %73 = phi i32 [ %71, %68 ], [ 0, %66 ]
  %74 = tail call noundef ptr @_ZN6Assimp9ScenePrivEP7aiScene(ptr noundef nonnull %14)
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  store i32 %73, ptr %75, align 8, !tbaa !28
  br label %76

76:                                               ; preds = %23, %72, %3
  ret void

77:                                               ; preds = %21, %9
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %10, %9 ]
  resume { ptr, i32 } %.pn
}

; 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 #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6Assimp12CopyPtrArrayI11aiAnimationEEvRPPT_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 @_ZN6Assimp12CopyPtrArrayI9aiTextureEEvRPPT_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 @_ZN6Assimp12CopyPtrArrayI10aiMaterialEEvRPPT_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 @_ZN6Assimp12CopyPtrArrayI7aiLightEEvRPPT_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 @_ZN6Assimp12CopyPtrArrayI8aiCameraEEvRPPT_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 @_ZN6Assimp12CopyPtrArrayI6aiMeshEEvRPPT_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 noundef ptr @_ZN6Assimp9ScenePrivEPK7aiScene(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN6Assimp9ScenePrivEP7aiScene(ptr noundef) local_unnamed_addr #4

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 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 = { builtin allocsize(0) }
attributes #6 = { 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, !6, i64 112}
!10 = !{!"_ZTS7aiScene", !11, i64 0, !6, i64 8, !11, i64 16, !6, i64 24, !11, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !11, i64 64, !6, i64 72, !11, i64 80, !6, i64 88, !11, i64 96, !6, i64 104, !6, i64 112, !12, i64 120, !11, i64 1148, !6, i64 1152, !6, i64 1160}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS8aiString", !11, i64 0, !7, i64 4}
!13 = !{!10, !11, i64 48}
!14 = !{!10, !6, i64 56}
!15 = !{!10, !11, i64 64}
!16 = !{!10, !6, i64 72}
!17 = !{!10, !11, i64 32}
!18 = !{!10, !6, i64 40}
!19 = !{!10, !11, i64 80}
!20 = !{!10, !6, i64 88}
!21 = !{!10, !11, i64 96}
!22 = !{!10, !6, i64 104}
!23 = !{!10, !11, i64 16}
!24 = !{!10, !6, i64 24}
!25 = !{!10, !6, i64 8}
!26 = !{!10, !11, i64 0}
!27 = !{!10, !6, i64 1160}
!28 = !{!29, !11, i64 8}
!29 = !{!"_ZTSN6Assimp16ScenePrivateDataE", !6, i64 0, !11, i64 8, !30, i64 12}
!30 = !{!"bool", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass