; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/Common/BaseImporter.ll (ZN6Assimp11BatchLoader9GetImportEj)

; 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::_List_iterator" = type { ptr }
%"struct.std::_List_const_iterator" = type { ptr }
%"class.Assimp::BatchLoader" = type { ptr }
%"struct.Assimp::BatchData" = type <{ ptr, ptr, %"class.std::__cxx11::list", %"class.std::__cxx11::basic_string", i32, i8, [3 x i8] }>
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<Assimp::LoadRequest, std::allocator<Assimp::LoadRequest>>::_List_impl" }
%"struct.std::__cxx11::_List_base<Assimp::LoadRequest, std::allocator<Assimp::LoadRequest>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.Assimp::LoadRequest" = type <{ %"class.std::__cxx11::basic_string", i32, i32, ptr, i8, [7 x i8], %"struct.Assimp::BatchLoader::PropertyMap", i32, [4 x i8] }>
%"struct.Assimp::BatchLoader::PropertyMap" = type { %"class.std::map", %"class.std::map.42", %"class.std::map.47", %"class.std::map.52" }
%"class.std::map" = type { %"class.std::_Rb_tree.37" }
%"class.std::_Rb_tree.37" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, int>, std::_Select1st<std::pair<const unsigned int, int>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, int>, std::_Select1st<std::pair<const unsigned int, int>>, std::less<unsigned int>>::_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.42" = type { %"class.std::_Rb_tree.43" }
%"class.std::_Rb_tree.43" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, float>, std::_Select1st<std::pair<const unsigned int, float>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, float>, std::_Select1st<std::pair<const unsigned int, float>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.47" = type { %"class.std::_Rb_tree.48" }
%"class.std::_Rb_tree.48" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const unsigned int, std::__cxx11::basic_string<char>>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const unsigned int, std::__cxx11::basic_string<char>>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.52" = type { %"class.std::_Rb_tree.53" }
%"class.std::_Rb_tree.53" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, aiMatrix4x4t<float>>, std::_Select1st<std::pair<const unsigned int, aiMatrix4x4t<float>>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, aiMatrix4x4t<float>>, std::_Select1st<std::pair<const unsigned int, aiMatrix4x4t<float>>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef ptr @_ZN6Assimp11BatchLoader9GetImportEj(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::_List_iterator", align 8
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::_List_const_iterator", align 8
  %11 = alloca %"struct.std::_List_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  %13 = getelementptr inbounds %"class.Assimp::BatchLoader", ptr %12, i32 0, i32 0
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %"struct.Assimp::BatchData", ptr %14, i32 0, i32 2
  %16 = call ptr @_ZNSt7__cxx114listIN6Assimp11LoadRequestESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #2
  %17 = getelementptr inbounds %"struct.std::_List_iterator", ptr %6, i32 0, i32 0
  store ptr %16, ptr %17, align 8
  br label %18

18:                                               ; preds = %57, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  %19 = getelementptr inbounds %"class.Assimp::BatchLoader", ptr %12, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds %"struct.Assimp::BatchData", ptr %20, i32 0, i32 2
  %22 = call ptr @_ZNSt7__cxx114listIN6Assimp11LoadRequestESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #2
  %23 = getelementptr inbounds %"struct.std::_List_iterator", ptr %7, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  %24 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN6Assimp11LoadRequestEES4_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  br i1 %24, label %26, label %25

25:                                               ; preds = %18
  store i32 2, ptr %8, align 4
  br label %59

26:                                               ; preds = %18
  %27 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  %28 = getelementptr inbounds %"struct.Assimp::LoadRequest", ptr %27, i32 0, i32 7
  %29 = load i32, ptr %28, align 8, !tbaa !13
  %30 = load i32, ptr %5, align 4, !tbaa !9
  %31 = icmp eq i32 %29, %30
  br i1 %31, label %32, label %56

32:                                               ; preds = %26
  %33 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  %34 = getelementptr inbounds %"struct.Assimp::LoadRequest", ptr %33, i32 0, i32 4
  %35 = load i8, ptr %34, align 8, !tbaa !37, !range !38, !noundef !39
  %36 = trunc i8 %35 to i1
  br i1 %36, label %37, label %56

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %38 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  %39 = getelementptr inbounds %"struct.Assimp::LoadRequest", ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !40
  store ptr %40, ptr %9, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  %42 = getelementptr inbounds %"struct.Assimp::LoadRequest", ptr %41, i32 0, i32 2
  %43 = load i32, ptr %42, align 4, !tbaa !41
  %44 = add i32 %43, -1
  store i32 %44, ptr %42, align 4, !tbaa !41
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %54, label %46

46:                                               ; preds = %37
  %47 = getelementptr inbounds %"class.Assimp::BatchLoader", ptr %12, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = getelementptr inbounds %"struct.Assimp::BatchData", ptr %48, i32 0, i32 2
  call void @_ZNSt20_List_const_iteratorIN6Assimp11LoadRequestEEC2ERKSt14_List_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  %50 = getelementptr inbounds %"struct.std::_List_const_iterator", ptr %10, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8
  %52 = call ptr @_ZNSt7__cxx114listIN6Assimp11LoadRequestESaIS2_EE5eraseESt20_List_const_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr %51) #2
  %53 = getelementptr inbounds %"struct.std::_List_iterator", ptr %11, i32 0, i32 0
  store ptr %52, ptr %53, align 8
  br label %54

54:                                               ; preds = %46, %37
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %55, ptr %3, align 8
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  br label %59

56:                                               ; preds = %32, %26
  br label %57

57:                                               ; preds = %56
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN6Assimp11LoadRequestEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #2
  br label %18, !llvm.loop !42

59:                                               ; preds = %54, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  %60 = load i32, ptr %8, align 4
  switch i32 %60, label %64 [
    i32 2, label %61
    i32 1, label %62
  ]

61:                                               ; preds = %59
  store ptr null, ptr %3, align 8
  br label %62

62:                                               ; preds = %61, %59
  %63 = load ptr, ptr %3, align 8
  ret ptr %63

64:                                               ; preds = %59
  unreachable
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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, !6, i64 0}
!12 = !{!"_ZTSN6Assimp11BatchLoaderE", !6, i64 0}
!13 = !{!14, !10, i64 248}
!14 = !{!"_ZTSN6Assimp11LoadRequestE", !15, i64 0, !10, i64 32, !10, i64 36, !6, i64 40, !18, i64 48, !19, i64 56, !10, i64 248}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN6Assimp11BatchLoader11PropertyMapE", !20, i64 0, !28, i64 48, !31, i64 96, !34, i64 144}
!20 = !{!"_ZTSSt3mapIjiSt4lessIjESaISt4pairIKjiEEE", !21, i64 0}
!21 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjiESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjiESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !23, i64 0, !25, i64 8}
!23 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !24, i64 0}
!24 = !{!"_ZTSSt4lessIjE"}
!25 = !{!"_ZTSSt15_Rb_tree_header", !26, i64 0, !17, i64 32}
!26 = !{!"_ZTSSt18_Rb_tree_node_base", !27, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!28 = !{!"_ZTSSt3mapIjfSt4lessIjESaISt4pairIKjfEEE", !29, i64 0}
!29 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjfESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !30, i64 0}
!30 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjfESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !23, i64 0, !25, i64 8}
!31 = !{!"_ZTSSt3mapIjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIjESaISt4pairIKjS5_EEE", !32, i64 0}
!32 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIjESaIS8_EE", !33, i64 0}
!33 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIjESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !23, i64 0, !25, i64 8}
!34 = !{!"_ZTSSt3mapIj12aiMatrix4x4tIfESt4lessIjESaISt4pairIKjS1_EEE", !35, i64 0}
!35 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKj12aiMatrix4x4tIfEESt10_Select1stIS4_ESt4lessIjESaIS4_EE", !36, i64 0}
!36 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKj12aiMatrix4x4tIfEESt10_Select1stIS4_ESt4lessIjESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !23, i64 0, !25, i64 8}
!37 = !{!14, !18, i64 48}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!14, !6, i64 40}
!41 = !{!14, !10, i64 36}
!42 = distinct !{!42, !43}
!43 = !{!"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.std::_List_iterator" = type { ptr }
%"struct.std::_List_const_iterator" = type { ptr }

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef ptr @_ZN6Assimp11BatchLoader9GetImportEj(ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"struct.std::_List_iterator", align 8
  %4 = alloca %"struct.std::_List_iterator", align 8
  %5 = alloca %"struct.std::_List_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #2
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = tail call ptr @_ZNSt7__cxx114listIN6Assimp11LoadRequestESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #2
  store ptr %8, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #2
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %11 = tail call ptr @_ZNSt7__cxx114listIN6Assimp11LoadRequestESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #2
  store ptr %11, ptr %4, align 8
  %12 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN6Assimp11LoadRequestEES4_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #2
  br i1 %12, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %2, %35
  %13 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #2
  %14 = getelementptr inbounds i8, ptr %13, i64 248
  %15 = load i32, ptr %14, align 8, !tbaa !10
  %16 = icmp eq i32 %15, %1
  br i1 %16, label %17, label %35

17:                                               ; preds = %.lr.ph
  %18 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #2
  %19 = getelementptr inbounds i8, ptr %18, i64 48
  %20 = load i8, ptr %19, align 8, !tbaa !35, !range !36, !noundef !37
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %22, label %35

22:                                               ; preds = %17
  %23 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #2
  %24 = getelementptr inbounds i8, ptr %23, i64 40
  %25 = load ptr, ptr %24, align 8, !tbaa !38
  %26 = call noundef nonnull align 8 dereferenceable(252) ptr @_ZNKSt14_List_iteratorIN6Assimp11LoadRequestEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #2
  %27 = getelementptr inbounds i8, ptr %26, i64 36
  %28 = load i32, ptr %27, align 4, !tbaa !39
  %29 = add i32 %28, -1
  store i32 %29, ptr %27, align 4, !tbaa !39
  %.not = icmp eq i32 %29, 0
  br i1 %.not, label %30, label %.loopexit

30:                                               ; preds = %22
  %31 = load ptr, ptr %0, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  call void @_ZNSt20_List_const_iteratorIN6Assimp11LoadRequestEEC2ERKSt14_List_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %3) #2
  %33 = load ptr, ptr %5, align 8
  %34 = call ptr @_ZNSt7__cxx114listIN6Assimp11LoadRequestESaIS2_EE5eraseESt20_List_const_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr %33) #2
  br label %.loopexit

35:                                               ; preds = %.lr.ph, %17
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorIN6Assimp11LoadRequestEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #2
  %37 = load ptr, ptr %0, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = call ptr @_ZNSt7__cxx114listIN6Assimp11LoadRequestESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #2
  store ptr %39, ptr %4, align 8
  %40 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorIN6Assimp11LoadRequestEES4_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #2
  br i1 %40, label %.lr.ph, label %.loopexit, !llvm.loop !40

.loopexit:                                        ; preds = %35, %2, %22, %30
  %spec.select = phi ptr [ %25, %30 ], [ %25, %22 ], [ null, %2 ], [ null, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #2
  ret ptr %spec.select
}

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = !{!"_ZTSN6Assimp11BatchLoaderE", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !15, i64 248}
!11 = !{!"_ZTSN6Assimp11LoadRequestE", !12, i64 0, !15, i64 32, !15, i64 36, !7, i64 40, !16, i64 48, !17, i64 56, !15, i64 248}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !14, i64 8, !8, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!"int", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTSN6Assimp11BatchLoader11PropertyMapE", !18, i64 0, !26, i64 48, !29, i64 96, !32, i64 144}
!18 = !{!"_ZTSSt3mapIjiSt4lessIjESaISt4pairIKjiEEE", !19, i64 0}
!19 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjiESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjiESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !21, i64 0, !23, i64 8}
!21 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !22, i64 0}
!22 = !{!"_ZTSSt4lessIjE"}
!23 = !{!"_ZTSSt15_Rb_tree_header", !24, i64 0, !14, i64 32}
!24 = !{!"_ZTSSt18_Rb_tree_node_base", !25, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!25 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!26 = !{!"_ZTSSt3mapIjfSt4lessIjESaISt4pairIKjfEEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjfESt10_Select1stIS2_ESt4lessIjESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjfESt10_Select1stIS2_ESt4lessIjESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !21, i64 0, !23, i64 8}
!29 = !{!"_ZTSSt3mapIjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIjESaISt4pairIKjS5_EEE", !30, i64 0}
!30 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIjESaIS8_EE", !31, i64 0}
!31 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKjNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt10_Select1stIS8_ESt4lessIjESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !21, i64 0, !23, i64 8}
!32 = !{!"_ZTSSt3mapIj12aiMatrix4x4tIfESt4lessIjESaISt4pairIKjS1_EEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeIjSt4pairIKj12aiMatrix4x4tIfEESt10_Select1stIS4_ESt4lessIjESaIS4_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeIjSt4pairIKj12aiMatrix4x4tIfEESt10_Select1stIS4_ESt4lessIjESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !21, i64 0, !23, i64 8}
!35 = !{!11, !16, i64 48}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = !{!11, !7, i64 40}
!39 = !{!11, !15, i64 36}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


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