; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/AssetLib/FBX (FBXConverter)

; 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.std::_Rb_tree_const_iterator.332" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%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 }
%"class.Assimp::FBX::FBXConverter" = type <{ i32, [4 x i8], %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5", %"class.std::vector.10", %"class.std::vector.15", %"class.std::vector.20", %"class.std::map", %"class.std::map.28", %"class.std::map.34", %"class.std::map.40", %"class.std::map.40", %"class.std::map.46", double, %"class.std::vector.52", ptr, ptr, i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<aiMesh *, std::allocator<aiMesh *>>::_Vector_impl" }
%"struct.std::_Vector_base<aiMesh *, std::allocator<aiMesh *>>::_Vector_impl" = type { %"struct.std::_Vector_base<aiMesh *, std::allocator<aiMesh *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aiMesh *, std::allocator<aiMesh *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<aiMaterial *, std::allocator<aiMaterial *>>::_Vector_impl" }
%"struct.std::_Vector_base<aiMaterial *, std::allocator<aiMaterial *>>::_Vector_impl" = type { %"struct.std::_Vector_base<aiMaterial *, std::allocator<aiMaterial *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aiMaterial *, std::allocator<aiMaterial *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<aiAnimation *, std::allocator<aiAnimation *>>::_Vector_impl" }
%"struct.std::_Vector_base<aiAnimation *, std::allocator<aiAnimation *>>::_Vector_impl" = type { %"struct.std::_Vector_base<aiAnimation *, std::allocator<aiAnimation *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aiAnimation *, std::allocator<aiAnimation *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<aiLight *, std::allocator<aiLight *>>::_Vector_impl" }
%"struct.std::_Vector_base<aiLight *, std::allocator<aiLight *>>::_Vector_impl" = type { %"struct.std::_Vector_base<aiLight *, std::allocator<aiLight *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aiLight *, std::allocator<aiLight *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<aiCamera *, std::allocator<aiCamera *>>::_Vector_impl" }
%"struct.std::_Vector_base<aiCamera *, std::allocator<aiCamera *>>::_Vector_impl" = type { %"struct.std::_Vector_base<aiCamera *, std::allocator<aiCamera *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aiCamera *, std::allocator<aiCamera *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<aiTexture *, std::allocator<aiTexture *>>::_Vector_impl" }
%"struct.std::_Vector_base<aiTexture *, std::allocator<aiTexture *>>::_Vector_impl" = type { %"struct.std::_Vector_base<aiTexture *, std::allocator<aiTexture *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aiTexture *, std::allocator<aiTexture *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<const Assimp::FBX::Material *, std::pair<const Assimp::FBX::Material *const, unsigned int>, std::_Select1st<std::pair<const Assimp::FBX::Material *const, unsigned int>>, std::less<const Assimp::FBX::Material *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const Assimp::FBX::Material *, std::pair<const Assimp::FBX::Material *const, unsigned int>, std::_Select1st<std::pair<const Assimp::FBX::Material *const, unsigned int>>, std::less<const Assimp::FBX::Material *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.28" = type { %"class.std::_Rb_tree.29" }
%"class.std::_Rb_tree.29" = type { %"struct.std::_Rb_tree<const Assimp::FBX::Video *, std::pair<const Assimp::FBX::Video *const, unsigned int>, std::_Select1st<std::pair<const Assimp::FBX::Video *const, unsigned int>>, std::less<const Assimp::FBX::Video *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const Assimp::FBX::Video *, std::pair<const Assimp::FBX::Video *const, unsigned int>, std::_Select1st<std::pair<const Assimp::FBX::Video *const, unsigned int>>, std::less<const Assimp::FBX::Video *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.34" = type { %"class.std::_Rb_tree.35" }
%"class.std::_Rb_tree.35" = type { %"struct.std::_Rb_tree<const Assimp::FBX::Geometry *, std::pair<const Assimp::FBX::Geometry *const, std::vector<unsigned int>>, std::_Select1st<std::pair<const Assimp::FBX::Geometry *const, std::vector<unsigned int>>>, std::less<const Assimp::FBX::Geometry *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const Assimp::FBX::Geometry *, std::pair<const Assimp::FBX::Geometry *const, std::vector<unsigned int>>, std::_Select1st<std::pair<const Assimp::FBX::Geometry *const, std::vector<unsigned int>>>, std::less<const Assimp::FBX::Geometry *>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.40" = type { %"class.std::_Rb_tree.41" }
%"class.std::_Rb_tree.41" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, unsigned int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, unsigned int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.46" = type { %"class.std::_Rb_tree.47" }
%"class.std::_Rb_tree.47" = type { %"struct.std::_Rb_tree<const std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, aiBone *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, aiBone *>>, std::less<const std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<const std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, aiBone *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, aiBone *>>, std::less<const std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.52" = type { %"struct.std::_Vector_base.53" }
%"struct.std::_Vector_base.53" = type { %"struct.std::_Vector_base<aiSkeleton *, std::allocator<aiSkeleton *>>::_Vector_impl" }
%"struct.std::_Vector_base<aiSkeleton *, std::allocator<aiSkeleton *>>::_Vector_impl" = type { %"struct.std::_Vector_base<aiSkeleton *, std::allocator<aiSkeleton *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<aiSkeleton *, std::allocator<aiSkeleton *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.333" = type <{ ptr, i32, [4 x i8] }>

@.str.74 = external hidden unnamed_addr constant [55 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: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; 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
declare dso_local noundef i32 @_ZN6Assimp3FBX12FBXConverter15ConvertMaterialERKNS0_8MaterialEPKNS0_12MeshGeometryE(ptr noundef nonnull align 8 dereferenceable(489), ptr noundef nonnull align 8 dereferenceable(208), ptr noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp12LogFunctionsINS_11FBXImporterEE8LogErrorIJRA55_KcEEEvDpOT_(ptr noundef nonnull align 1 dereferenceable(55)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Assimp3FBX12FBXConverter18GetDefaultMaterialEv(ptr noundef nonnull align 8 dereferenceable(489)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp3FBX12FBXConverter22ConvertMaterialForMeshEP6aiMeshRKNS0_5ModelERKNS0_12MeshGeometryEi(ptr noundef nonnull align 8 dereferenceable(489) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(208) %2, ptr noundef nonnull align 8 dereferenceable(1000) %3, i32 noundef %4) #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator.332", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator.332", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  %18 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6Assimp3FBX5Model12GetMaterialsEv(ptr noundef nonnull align 8 dereferenceable(208) %19)
  store ptr %20, ptr %11, align 8, !tbaa !5
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = zext i32 %21 to i64
  %23 = load ptr, ptr %11, align 8, !tbaa !5
  %24 = call noundef i64 @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #3
  %25 = icmp uge i64 %22, %24
  br i1 %25, label %29, label %26

26:                                               ; preds = %5
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = icmp slt i32 %27, 0
  br i1 %28, label %29, label %33

29:                                               ; preds = %26, %5
  call void @_ZN6Assimp12LogFunctionsINS_11FBXImporterEE8LogErrorIJRA55_KcEEEvDpOT_(ptr noundef nonnull align 1 dereferenceable(55) @.str.74)
  %30 = call noundef i32 @_ZN6Assimp3FBX12FBXConverter18GetDefaultMaterialEv(ptr noundef nonnull align 8 dereferenceable(489) %18)
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.aiMesh, ptr %31, i32 0, i32 13
  store i32 %30, ptr %32, align 8, !tbaa !11
  store i32 1, ptr %12, align 4
  br label %64

33:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %36) #3
  %38 = load ptr, ptr %37, align 8, !tbaa !5
  store ptr %38, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %39 = getelementptr inbounds %"class.Assimp::FBX::FBXConverter", ptr %18, i32 0, i32 8
  %40 = call ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(48) %39, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %41 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %15, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEC2ERKSt17_Rb_tree_iteratorIS7_E(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %42 = getelementptr inbounds %"class.Assimp::FBX::FBXConverter", ptr %18, i32 0, i32 8
  %43 = call ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %42) #3
  %44 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEC2ERKSt17_Rb_tree_iteratorIS7_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #3
  %45 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br i1 %45, label %46, label %52

46:                                               ; preds = %33
  %47 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #3
  %48 = getelementptr inbounds %"struct.std::pair.333", ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 8, !tbaa !18
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.aiMesh, ptr %50, i32 0, i32 13
  store i32 %49, ptr %51, align 8, !tbaa !11
  store i32 1, ptr %12, align 4
  br label %63

52:                                               ; preds = %33
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = call noundef i32 @_ZN6Assimp3FBX12FBXConverter15ConvertMaterialERKNS0_8MaterialEPKNS0_12MeshGeometryE(ptr noundef nonnull align 8 dereferenceable(489) %18, ptr noundef nonnull align 8 dereferenceable(208) %53, ptr noundef %54)
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.aiMesh, ptr %56, i32 0, i32 13
  store i32 %55, ptr %57, align 8, !tbaa !11
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.aiMesh, ptr %58, i32 0, i32 13
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = getelementptr inbounds %"class.Assimp::FBX::FBXConverter", ptr %18, i32 0, i32 8
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %61, ptr noundef nonnull align 8 dereferenceable(8) %13)
  store i32 %60, ptr %62, align 4, !tbaa !9
  store i32 0, ptr %12, align 4
  br label %63

63:                                               ; preds = %52, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %64

64:                                               ; preds = %63, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %65 = load i32, ptr %12, align 4
  switch i32 %65, label %67 [
    i32 0, label %66
    i32 1, label %66
  ]

66:                                               ; preds = %64, %64
  ret void

67:                                               ; preds = %64
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6Assimp3FBX5Model12GetMaterialsEv(ptr noundef nonnull align 8 dereferenceable(208)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 232}
!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 = !{!19, !10, i64 8}
!19 = !{!"_ZTSSt4pairIKPKN6Assimp3FBX8MaterialEjE", !6, i64 0, !10, i64 8}


; 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.std::_Rb_tree_const_iterator.332" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@.str.74 = external hidden unnamed_addr constant [55 x i8], align 1

; 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 uwtable
declare dso_local ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; 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
declare dso_local noundef i32 @_ZN6Assimp3FBX12FBXConverter15ConvertMaterialERKNS0_8MaterialEPKNS0_12MeshGeometryE(ptr noundef nonnull align 8 dereferenceable(489), ptr noundef nonnull align 8 dereferenceable(208), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Assimp12LogFunctionsINS_11FBXImporterEE8LogErrorIJRA55_KcEEEvDpOT_(ptr noundef nonnull align 1 dereferenceable(55)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Assimp3FBX12FBXConverter18GetDefaultMaterialEv(ptr noundef nonnull align 8 dereferenceable(489)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6Assimp3FBX12FBXConverter22ConvertMaterialForMeshEP6aiMeshRKNS0_5ModelERKNS0_12MeshGeometryEi(ptr noundef nonnull align 8 dereferenceable(489) %0, ptr nocapture noundef writeonly %1, ptr noundef nonnull align 8 dereferenceable(208) %2, ptr noundef nonnull align 8 dereferenceable(1000) %3, i32 noundef %4) local_unnamed_addr #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator.332", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator.332", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6Assimp3FBX5Model12GetMaterialsEv(ptr noundef nonnull align 8 dereferenceable(208) %2)
  %12 = zext i32 %4 to i64
  %13 = tail call noundef i64 @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #3
  %14 = icmp ule i64 %13, %12
  %15 = icmp slt i32 %4, 0
  %or.cond = or i1 %15, %14
  br i1 %or.cond, label %16, label %19

16:                                               ; preds = %5
  tail call void @_ZN6Assimp12LogFunctionsINS_11FBXImporterEE8LogErrorIJRA55_KcEEEvDpOT_(ptr noundef nonnull align 1 dereferenceable(55) @.str.74)
  %17 = tail call noundef i32 @_ZN6Assimp3FBX12FBXConverter18GetDefaultMaterialEv(ptr noundef nonnull align 8 dereferenceable(489) %0)
  %18 = getelementptr inbounds i8, ptr %1, i64 232
  store i32 %17, ptr %18, align 8, !tbaa !5
  br label %37

19:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %12) #3
  %21 = load ptr, ptr %20, align 8, !tbaa !16
  store ptr %21, ptr %6, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %22 = getelementptr inbounds i8, ptr %0, i64 152
  %23 = call ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(48) %22, ptr noundef nonnull align 8 dereferenceable(8) %6)
  store ptr %23, ptr %8, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEC2ERKSt17_Rb_tree_iteratorIS7_E(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  %24 = call ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %22) #3
  store ptr %24, ptr %10, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEC2ERKSt17_Rb_tree_iteratorIS7_E(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  %25 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEESA_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  br i1 %25, label %26, label %31

26:                                               ; preds = %19
  %27 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = load i32, ptr %28, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %1, i64 232
  store i32 %29, ptr %30, align 8, !tbaa !5
  br label %36

31:                                               ; preds = %19
  %32 = load ptr, ptr %6, align 8, !tbaa !16
  %33 = call noundef i32 @_ZN6Assimp3FBX12FBXConverter15ConvertMaterialERKNS0_8MaterialEPKNS0_12MeshGeometryE(ptr noundef nonnull align 8 dereferenceable(489) %0, ptr noundef nonnull align 8 dereferenceable(208) %32, ptr noundef nonnull %3)
  %34 = getelementptr inbounds i8, ptr %1, i64 232
  store i32 %33, ptr %34, align 8, !tbaa !5
  %35 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48) %22, ptr noundef nonnull align 8 dereferenceable(8) %6)
  store i32 %33, ptr %35, align 4, !tbaa !19
  br label %36

36:                                               ; preds = %31, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  br label %37

37:                                               ; preds = %36, %16
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6Assimp3FBX5Model12GetMaterialsEv(ptr noundef nonnull align 8 dereferenceable(208)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPKN6Assimp3FBX8MaterialESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKPKN6Assimp3FBX8MaterialEjEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIPKN6Assimp3FBX8MaterialEjSt4lessIS4_ESaISt4pairIKS4_jEEEixERS8_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 232}
!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 = !{!10, !10, i64 0}
!17 = !{!18, !7, i64 8}
!18 = !{!"_ZTSSt4pairIKPKN6Assimp3FBX8MaterialEjE", !10, i64 0, !7, i64 8}
!19 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass