; LLVM IR from Razakhel/RaZ :: extern/fastgltf/src (fastgltf)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.30 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.30 = type { i64, [8 x i8] }
%"class.__gnu_cxx::__normal_iterator.262" = type { ptr }
%"struct.fastgltf::visitor.488" = type { %class.anon.489, %class.anon.490, %class.anon.491, %class.anon.492, %class.anon.493 }
%class.anon.489 = type { ptr }
%class.anon.490 = type { ptr, ptr }
%class.anon.491 = type { ptr, ptr, ptr, ptr }
%class.anon.492 = type { ptr, ptr, ptr, ptr }
%class.anon.493 = type { ptr, ptr }
%"class.std::optional.467" = type { %"struct.std::_Optional_base.468" }
%"struct.std::_Optional_base.468" = type { %"struct.std::_Optional_payload.470" }
%"struct.std::_Optional_payload.470" = type { %"struct.std::_Optional_payload.base.474", [7 x i8] }
%"struct.std::_Optional_payload.base.474" = type { %"struct.std::_Optional_payload_base.base.473" }
%"struct.std::_Optional_payload_base.base.473" = type <{ %"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage" = type { %"class.std::__cxx11::basic_string" }
%"class.std::allocator" = type { i8 }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.fastgltf::Asset" = type <{ %"class.std::shared_ptr", %"class.std::optional", %"class.std::vector.88", %"class.std::vector.88", %"class.fastgltf::OptionalWithFlagValue", %"class.std::vector.91", %"class.std::vector.96", %"class.std::vector.101", %"class.std::vector.106", %"class.std::vector.111", %"class.std::vector.116", %"class.std::vector.121", %"class.std::vector.126", %"class.std::vector.131", %"class.std::vector.136", %"class.std::vector.141", %"class.std::vector.146", %"class.std::vector.151", %"class.std::vector.156", %"class.std::vector.161", i32, [4 x i8] }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload.base", [7 x i8] }
%"struct.std::_Optional_payload.base" = type { %"struct.std::_Optional_payload_base.base" }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<fastgltf::AssetInfo>::_Storage", i8 }>
%"union.std::_Optional_payload_base<fastgltf::AssetInfo>::_Storage" = type { %"struct.fastgltf::AssetInfo" }
%"struct.fastgltf::AssetInfo" = type { %"class.std::__cxx11::basic_string.74", %"class.std::__cxx11::basic_string.74", %"class.std::__cxx11::basic_string.74" }
%"class.std::__cxx11::basic_string.74" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>::_Alloc_hider", i64, %union.anon.76 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>::_Alloc_hider" = type { %"class.std::pmr::polymorphic_allocator.75", ptr }
%"class.std::pmr::polymorphic_allocator.75" = type { ptr }
%union.anon.76 = type { i64, [8 x i8] }
%"class.std::vector.88" = type { %"struct.std::_Vector_base.89" }
%"struct.std::_Vector_base.89" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>, std::pmr::polymorphic_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>, std::pmr::polymorphic_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>>>::_Vector_impl" = type { %"class.std::pmr::polymorphic_allocator.90", %"struct.std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>, std::pmr::polymorphic_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>>>::_Vector_impl_data" }
%"class.std::pmr::polymorphic_allocator.90" = type { ptr }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>, std::pmr::polymorphic_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::pmr::polymorphic_allocator<char>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.fastgltf::OptionalWithFlagValue" = type { %union.anon }
%union.anon = type { i64 }
%"class.std::vector.91" = type { %"struct.std::_Vector_base.92" }
%"struct.std::_Vector_base.92" = type { %"struct.std::_Vector_base<fastgltf::Accessor, std::allocator<fastgltf::Accessor>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Accessor, std::allocator<fastgltf::Accessor>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Accessor, std::allocator<fastgltf::Accessor>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Accessor, std::allocator<fastgltf::Accessor>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.96" = type { %"struct.std::_Vector_base.97" }
%"struct.std::_Vector_base.97" = type { %"struct.std::_Vector_base<fastgltf::Animation, std::allocator<fastgltf::Animation>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Animation, std::allocator<fastgltf::Animation>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Animation, std::allocator<fastgltf::Animation>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Animation, std::allocator<fastgltf::Animation>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.101" = type { %"struct.std::_Vector_base.102" }
%"struct.std::_Vector_base.102" = type { %"struct.std::_Vector_base<fastgltf::Buffer, std::allocator<fastgltf::Buffer>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Buffer, std::allocator<fastgltf::Buffer>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Buffer, std::allocator<fastgltf::Buffer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Buffer, std::allocator<fastgltf::Buffer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.106" = type { %"struct.std::_Vector_base.107" }
%"struct.std::_Vector_base.107" = type { %"struct.std::_Vector_base<fastgltf::BufferView, std::allocator<fastgltf::BufferView>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::BufferView, std::allocator<fastgltf::BufferView>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::BufferView, std::allocator<fastgltf::BufferView>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::BufferView, std::allocator<fastgltf::BufferView>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.111" = type { %"struct.std::_Vector_base.112" }
%"struct.std::_Vector_base.112" = type { %"struct.std::_Vector_base<fastgltf::Camera, std::allocator<fastgltf::Camera>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Camera, std::allocator<fastgltf::Camera>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Camera, std::allocator<fastgltf::Camera>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Camera, std::allocator<fastgltf::Camera>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.116" = type { %"struct.std::_Vector_base.117" }
%"struct.std::_Vector_base.117" = type { %"struct.std::_Vector_base<fastgltf::Image, std::allocator<fastgltf::Image>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Image, std::allocator<fastgltf::Image>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Image, std::allocator<fastgltf::Image>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Image, std::allocator<fastgltf::Image>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.121" = type { %"struct.std::_Vector_base.122" }
%"struct.std::_Vector_base.122" = type { %"struct.std::_Vector_base<fastgltf::Light, std::allocator<fastgltf::Light>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Light, std::allocator<fastgltf::Light>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Light, std::allocator<fastgltf::Light>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Light, std::allocator<fastgltf::Light>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.126" = type { %"struct.std::_Vector_base.127" }
%"struct.std::_Vector_base.127" = type { %"struct.std::_Vector_base<fastgltf::Material, std::allocator<fastgltf::Material>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Material, std::allocator<fastgltf::Material>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Material, std::allocator<fastgltf::Material>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Material, std::allocator<fastgltf::Material>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.131" = type { %"struct.std::_Vector_base.132" }
%"struct.std::_Vector_base.132" = type { %"struct.std::_Vector_base<fastgltf::Mesh, std::allocator<fastgltf::Mesh>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Mesh, std::allocator<fastgltf::Mesh>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Mesh, std::allocator<fastgltf::Mesh>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Mesh, std::allocator<fastgltf::Mesh>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.136" = type { %"struct.std::_Vector_base.137" }
%"struct.std::_Vector_base.137" = type { %"struct.std::_Vector_base<fastgltf::Node, std::allocator<fastgltf::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Node, std::allocator<fastgltf::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Node, std::allocator<fastgltf::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Node, std::allocator<fastgltf::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.141" = type { %"struct.std::_Vector_base.142" }
%"struct.std::_Vector_base.142" = type { %"struct.std::_Vector_base<fastgltf::Sampler, std::allocator<fastgltf::Sampler>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Sampler, std::allocator<fastgltf::Sampler>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Sampler, std::allocator<fastgltf::Sampler>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Sampler, std::allocator<fastgltf::Sampler>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.146" = type { %"struct.std::_Vector_base.147" }
%"struct.std::_Vector_base.147" = type { %"struct.std::_Vector_base<fastgltf::Scene, std::allocator<fastgltf::Scene>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Scene, std::allocator<fastgltf::Scene>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Scene, std::allocator<fastgltf::Scene>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Scene, std::allocator<fastgltf::Scene>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.151" = type { %"struct.std::_Vector_base.152" }
%"struct.std::_Vector_base.152" = type { %"struct.std::_Vector_base<fastgltf::Skin, std::allocator<fastgltf::Skin>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Skin, std::allocator<fastgltf::Skin>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Skin, std::allocator<fastgltf::Skin>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Skin, std::allocator<fastgltf::Skin>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.156" = type { %"struct.std::_Vector_base.157" }
%"struct.std::_Vector_base.157" = type { %"struct.std::_Vector_base<fastgltf::Texture, std::allocator<fastgltf::Texture>>::_Vector_impl" }
%"struct.std::_Vector_base<fastgltf::Texture, std::allocator<fastgltf::Texture>>::_Vector_impl" = type { %"struct.std::_Vector_base<fastgltf::Texture, std::allocator<fastgltf::Texture>>::_Vector_impl_data" }
%"struct.std::_Vector_base<fastgltf::Texture, std::allocator<fastgltf::Texture>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.161" = type { %"struct.std::_Vector_base.162" }
%"struct.std::_Vector_base.162" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.fastgltf::Image" = type { %"class.std::variant", %"class.std::__cxx11::basic_string.74" }
%"class.std::variant" = type { %"struct.std::__detail::__variant::_Variant_base.base", [7 x i8] }
%"struct.std::__detail::__variant::_Variant_base.base" = type { %"struct.std::__detail::__variant::_Move_assign_base.base" }
%"struct.std::__detail::__variant::_Move_assign_base.base" = type { %"struct.std::__detail::__variant::_Copy_assign_base.base" }
%"struct.std::__detail::__variant::_Copy_assign_base.base" = type { %"struct.std::__detail::__variant::_Move_ctor_base.base" }
%"struct.std::__detail::__variant::_Move_ctor_base.base" = type { %"struct.std::__detail::__variant::_Copy_ctor_base.base" }
%"struct.std::__detail::__variant::_Copy_ctor_base.base" = type { %"struct.std::__detail::__variant::_Variant_storage.base" }
%"struct.std::__detail::__variant::_Variant_storage.base" = type { %"union.std::__detail::__variant::_Variadic_union", i8 }
%"union.std::__detail::__variant::_Variadic_union" = type { %"union.std::__detail::__variant::_Variadic_union.40" }
%"union.std::__detail::__variant::_Variadic_union.40" = type { %"union.std::__detail::__variant::_Variadic_union.42" }
%"union.std::__detail::__variant::_Variadic_union.42" = type { %"struct.std::__detail::__variant::_Uninitialized.43" }
%"struct.std::__detail::__variant::_Uninitialized.43" = type { %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [184 x i8] }
%"class.fastgltf::Exporter" = type { i64, i64, i8, %"class.std::filesystem::__cxx11::path", %"class.std::filesystem::__cxx11::path", ptr, ptr, %"class.std::vector.461", %"class.std::vector.461" }
%"class.std::filesystem::__cxx11::path" = type { %"class.std::__cxx11::basic_string", %"struct.std::filesystem::__cxx11::path::_List" }
%"struct.std::filesystem::__cxx11::path::_List" = type { %"class.std::unique_ptr.31" }
%"class.std::unique_ptr.31" = type { %"struct.std::__uniq_ptr_data.32" }
%"struct.std::__uniq_ptr_data.32" = type { %"class.std::__uniq_ptr_impl.33" }
%"class.std::__uniq_ptr_impl.33" = type { %"class.std::tuple.34" }
%"class.std::tuple.34" = type { %"struct.std::_Tuple_impl.35" }
%"struct.std::_Tuple_impl.35" = type { %"struct.std::_Head_base.38" }
%"struct.std::_Head_base.38" = type { ptr }
%"class.std::vector.461" = type { %"struct.std::_Vector_base.462" }
%"struct.std::_Vector_base.462" = type { %"struct.std::_Vector_base<std::optional<std::filesystem::__cxx11::path>, std::allocator<std::optional<std::filesystem::__cxx11::path>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::optional<std::filesystem::__cxx11::path>, std::allocator<std::optional<std::filesystem::__cxx11::path>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::optional<std::filesystem::__cxx11::path>, std::allocator<std::optional<std::filesystem::__cxx11::path>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::optional<std::filesystem::__cxx11::path>, std::allocator<std::optional<std::filesystem::__cxx11::path>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.165 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [11 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

declare i32 @__gxx_personality_v0(...)

; 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 noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8fastgltf12escapeStringB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i64, ptr) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8fastgltf8Exporter11writeImagesERKNS_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(580) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %13 = alloca %"struct.fastgltf::visitor.488", align 8
  %14 = alloca %class.anon.489, align 8
  %15 = alloca %class.anon.490, align 8
  %16 = alloca %class.anon.491, align 8
  %17 = alloca %class.anon.492, align 8
  %18 = alloca %class.anon.493, align 8
  %19 = alloca %"class.std::optional.467", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::basic_string_view", align 8
  %31 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %32 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %4, align 8
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.fastgltf::Asset", ptr %34, i32 0, i32 10
  %36 = call noundef zeroext i1 @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #6
  br i1 %36, label %37, label %38

37:                                               ; preds = %3
  br label %219

38:                                               ; preds = %3
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %39) #6
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 93
  br i1 %43, label %50, label %44

44:                                               ; preds = %38
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %45) #6
  %47 = load i8, ptr %46, align 1, !tbaa !9
  %48 = sext i8 %47 to i32
  %49 = icmp eq i32 %48, 125
  br i1 %49, label %50, label %53

50:                                               ; preds = %44, %38
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %51, i8 noundef signext 44)
  br label %53

53:                                               ; preds = %50, %44
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %54, ptr noundef @.str.203)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.fastgltf::Asset", ptr %56, i32 0, i32 10
  %58 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #6
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %7, i32 0, i32 0
  store ptr %58, ptr %59, align 8
  br label %60

60:                                               ; preds = %211, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.fastgltf::Asset", ptr %61, i32 0, i32 10
  %63 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #6
  %64 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %8, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  %65 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br i1 %65, label %67, label %66

66:                                               ; preds = %60
  store i32 2, ptr %9, align 4
  br label %214

67:                                               ; preds = %60
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %68, i8 noundef signext 123)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.fastgltf::Asset", ptr %70, i32 0, i32 10
  %72 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #6
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %11, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !10
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %11, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %12, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8
  %78 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr %75, ptr %77)
  %79 = call noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef %78)
  store i64 %79, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 104, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %80 = getelementptr inbounds %class.anon.489, ptr %14, i32 0, i32 0
  store ptr %33, ptr %80, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %14, i64 8, i1 false), !tbaa.struct !10
  %81 = getelementptr inbounds i8, ptr %13, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %82 = getelementptr inbounds %class.anon.490, ptr %15, i32 0, i32 0
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %83, ptr %82, align 8, !tbaa !5
  %84 = getelementptr inbounds %class.anon.490, ptr %15, i32 0, i32 1
  store ptr %33, ptr %84, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %81, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !17
  %85 = getelementptr inbounds i8, ptr %13, i64 24
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %86 = getelementptr inbounds %class.anon.491, ptr %16, i32 0, i32 0
  store ptr %33, ptr %86, align 8, !tbaa !18
  %87 = getelementptr inbounds %class.anon.491, ptr %16, i32 0, i32 1
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %88, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds %class.anon.491, ptr %16, i32 0, i32 2
  store ptr %10, ptr %89, align 8, !tbaa !5
  %90 = getelementptr inbounds %class.anon.491, ptr %16, i32 0, i32 3
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %91, ptr %90, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %85, ptr align 8 %16, i64 32, i1 false), !tbaa.struct !20
  %92 = getelementptr inbounds i8, ptr %13, i64 56
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  %93 = getelementptr inbounds %class.anon.492, ptr %17, i32 0, i32 0
  store ptr %33, ptr %93, align 8, !tbaa !21
  %94 = getelementptr inbounds %class.anon.492, ptr %17, i32 0, i32 1
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %95, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds %class.anon.492, ptr %17, i32 0, i32 2
  store ptr %10, ptr %96, align 8, !tbaa !5
  %97 = getelementptr inbounds %class.anon.492, ptr %17, i32 0, i32 3
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %98, ptr %97, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %92, ptr align 8 %17, i64 32, i1 false), !tbaa.struct !20
  %99 = getelementptr inbounds i8, ptr %13, i64 88
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #6
  %100 = getelementptr inbounds %class.anon.493, ptr %18, i32 0, i32 0
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %101, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds %class.anon.493, ptr %18, i32 0, i32 1
  store ptr %33, ptr %102, align 8, !tbaa !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %99, ptr align 8 %18, i64 16, i1 false), !tbaa.struct !17
  %103 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %104 = getelementptr inbounds %"struct.fastgltf::Image", ptr %103, i32 0, i32 0
  call void @"_ZSt5visitIN8fastgltf7visitorIJZNS0_8Exporter11writeImagesERKNS0_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ZNS2_11writeImagesES5_SC_E3$_1ZNS2_11writeImagesES5_SC_E3$_2ZNS2_11writeImagesES5_SC_E3$_3ZNS2_11writeImagesES5_SC_E3$_4EEEJRKSt7variantIJSt9monostateNS0_7sources10BufferViewENSL_3URIENSL_5ArrayENSL_6VectorENSL_12CustomBufferENSL_8ByteViewENSL_8FallbackEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISZ_EEEEE4typeEE4typeEOS18_EEEE4typeEOSX_DpOSZ_"(ptr noundef nonnull align 8 dereferenceable(104) %13, ptr noundef nonnull align 8 dereferenceable(185) %104)
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 104, ptr %13) #6
  %105 = getelementptr inbounds %"class.fastgltf::Exporter", ptr %33, i32 0, i32 0
  %106 = load i64, ptr %105, align 8, !tbaa !25
  %107 = icmp ne i64 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %67
  store i32 1, ptr %9, align 4
  br label %208

109:                                              ; preds = %67
  %110 = getelementptr inbounds %"class.fastgltf::Exporter", ptr %33, i32 0, i32 6
  %111 = load ptr, ptr %110, align 8, !tbaa !44
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %151

113:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #6
  %114 = getelementptr inbounds %"class.fastgltf::Exporter", ptr %33, i32 0, i32 6
  %115 = load ptr, ptr %114, align 8, !tbaa !44
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %"class.fastgltf::Asset", ptr %116, i32 0, i32 10
  %118 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %117) #6
  %119 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %20, i32 0, i32 0
  store ptr %118, ptr %119, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !10
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %20, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8
  %122 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %21, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8
  %124 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr %121, ptr %123)
  %125 = call noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef %124)
  %126 = getelementptr inbounds %"class.fastgltf::Exporter", ptr %33, i32 0, i32 5
  %127 = load ptr, ptr %126, align 8, !tbaa !45
  call void %115(ptr dead_on_unwind writable sret(%"class.std::optional.467") align 8 %19, i64 noundef %125, i32 noundef 8, ptr noundef %127)
  %128 = call noundef zeroext i1 @_ZNKSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  br i1 %128, label %129, label %150

129:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.165, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %130 unwind label %136

130:                                              ; preds = %129
  %131 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %131)
          to label %132 unwind label %140

132:                                              ; preds = %130
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %133, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %135 unwind label %144

135:                                              ; preds = %132
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  br label %150

136:                                              ; preds = %129
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %25, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %26, align 4
  br label %149

140:                                              ; preds = %130
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %25, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %26, align 4
  br label %148

144:                                              ; preds = %132
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %25, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %26, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %148

148:                                              ; preds = %144, %140
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  br label %149

149:                                              ; preds = %148, %136
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #6
  call void @_ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #6
  br label %213

150:                                              ; preds = %135, %113
  call void @_ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #6
  br label %151

151:                                              ; preds = %150, %109
  %152 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %153 = getelementptr inbounds %"struct.fastgltf::Image", ptr %152, i32 0, i32 1
  %154 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(40) %153) #6
  br i1 %154, label %186, label %155

155:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #6
  %156 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %157 = getelementptr inbounds %"struct.fastgltf::Image", ptr %156, i32 0, i32 1
  %158 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(40) %157) #6
  %159 = getelementptr inbounds { i64, ptr }, ptr %30, i32 0, i32 0
  %160 = extractvalue { i64, ptr } %158, 0
  store i64 %160, ptr %159, align 8
  %161 = getelementptr inbounds { i64, ptr }, ptr %30, i32 0, i32 1
  %162 = extractvalue { i64, ptr } %158, 1
  store ptr %162, ptr %161, align 8
  %163 = getelementptr inbounds { i64, ptr }, ptr %30, i32 0, i32 0
  %164 = load i64, ptr %163, align 8
  %165 = getelementptr inbounds { i64, ptr }, ptr %30, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8
  call void @_ZN8fastgltf12escapeStringB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %29, i64 %164, ptr %166)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %28, ptr noundef @.str.166, ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %167 unwind label %172

167:                                              ; preds = %155
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %27, ptr noundef nonnull align 8 dereferenceable(32) %28, i8 noundef signext 34)
          to label %168 unwind label %176

168:                                              ; preds = %167
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %169, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %171 unwind label %180

171:                                              ; preds = %168
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  br label %186

172:                                              ; preds = %155
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %25, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %26, align 4
  br label %185

176:                                              ; preds = %167
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %25, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %26, align 4
  br label %184

180:                                              ; preds = %168
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %25, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %26, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  br label %184

184:                                              ; preds = %180, %176
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #6
  br label %185

185:                                              ; preds = %184, %172
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  br label %213

186:                                              ; preds = %171, %151
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %187, i8 noundef signext 125)
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %"class.fastgltf::Asset", ptr %189, i32 0, i32 10
  %191 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %190) #6
  %192 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %31, i32 0, i32 0
  store ptr %191, ptr %192, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %32, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !10
  %193 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %31, i32 0, i32 0
  %194 = load ptr, ptr %193, align 8
  %195 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.262", ptr %32, i32 0, i32 0
  %196 = load ptr, ptr %195, align 8
  %197 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr %194, ptr %196)
  %198 = call noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef %197)
  %199 = add i64 %198, 1
  %200 = load ptr, ptr %5, align 8, !tbaa !5
  %201 = getelementptr inbounds %"class.fastgltf::Asset", ptr %200, i32 0, i32 10
  %202 = call noundef i64 @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %201) #6
  %203 = icmp ult i64 %199, %202
  br i1 %203, label %204, label %207

204:                                              ; preds = %186
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %205, i8 noundef signext 44)
  br label %207

207:                                              ; preds = %204, %186
  store i32 0, ptr %9, align 4
  br label %208

208:                                              ; preds = %207, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %209 = load i32, ptr %9, align 4
  switch i32 %209, label %214 [
    i32 0, label %210
  ]

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210
  %212 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %60, !llvm.loop !46

213:                                              ; preds = %185, %149
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %220

214:                                              ; preds = %208, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %215 = load i32, ptr %9, align 4
  switch i32 %215, label %225 [
    i32 2, label %216
    i32 1, label %219
  ]

216:                                              ; preds = %214
  %217 = load ptr, ptr %6, align 8, !tbaa !5
  %218 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %217, i8 noundef signext 93)
  br label %219

219:                                              ; preds = %216, %214, %37
  ret void

220:                                              ; preds = %213
  %221 = load ptr, ptr %25, align 8
  %222 = load i32, ptr %26, align 4
  %223 = insertvalue { ptr, i32 } poison, ptr %221, 0
  %224 = insertvalue { ptr, i32 } %223, i32 %222, 1
  resume { ptr, i32 } %224

225:                                              ; preds = %214
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr, ptr) #3

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt5visitIN8fastgltf7visitorIJZNS0_8Exporter11writeImagesERKNS0_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ZNS2_11writeImagesES5_SC_E3$_1ZNS2_11writeImagesES5_SC_E3$_2ZNS2_11writeImagesES5_SC_E3$_3ZNS2_11writeImagesES5_SC_E3$_4EEEJRKSt7variantIJSt9monostateNS0_7sources10BufferViewENSL_3URIENSL_5ArrayENSL_6VectorENSL_12CustomBufferENSL_8ByteViewENSL_8FallbackEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISZ_EEEEE4typeEE4typeEOS18_EEEE4typeEOSX_DpOSZ_"(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(185)) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!7, !7, i64 0}
!10 = !{i64 0, i64 8, !5}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSZN8fastgltf8Exporter11writeImagesERKNS_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0", !6, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTSZN8fastgltf8Exporter11writeImagesERKNS_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_1", !6, i64 0, !6, i64 8}
!17 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSZN8fastgltf8Exporter11writeImagesERKNS_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_2", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTSZN8fastgltf8Exporter11writeImagesERKNS_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_3", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!23 = !{!24, !6, i64 8}
!24 = !{!"_ZTSZN8fastgltf8Exporter11writeImagesERKNS_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_4", !6, i64 0, !6, i64 8}
!25 = !{!26, !27, i64 0}
!26 = !{!"_ZTSN8fastgltf8ExporterE", !27, i64 0, !28, i64 8, !29, i64 16, !30, i64 24, !30, i64 64, !6, i64 104, !6, i64 112, !40, i64 120, !40, i64 144}
!27 = !{!"_ZTSN8fastgltf5ErrorE", !7, i64 0}
!28 = !{!"_ZTSN8fastgltf13ExportOptionsE", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSNSt10filesystem7__cxx114pathE", !31, i64 0, !33, i64 32}
!31 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !32, i64 0, !12, i64 8, !7, i64 16}
!32 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!33 = !{!"_ZTSNSt10filesystem7__cxx114path5_ListE", !34, i64 0}
!34 = !{!"_ZTSSt10unique_ptrINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !35, i64 0}
!35 = !{!"_ZTSSt15__uniq_ptr_dataINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterELb1ELb1EE", !36, i64 0}
!36 = !{!"_ZTSSt15__uniq_ptr_implINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !37, i64 0}
!37 = !{!"_ZTSSt5tupleIJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !38, i64 0}
!38 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !39, i64 0}
!39 = !{!"_ZTSSt10_Head_baseILm0EPNSt10filesystem7__cxx114path5_List5_ImplELb0EE", !6, i64 0}
!40 = !{!"_ZTSSt6vectorISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!44 = !{!26, !6, i64 112}
!45 = !{!26, !6, i64 104}
!46 = distinct !{!46, !47}
!47 = !{!"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"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.30 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.30 = type { i64, [8 x i8] }
%"class.__gnu_cxx::__normal_iterator.262" = type { ptr }
%"struct.fastgltf::visitor.488" = type { %class.anon.489, %class.anon.490, %class.anon.491, %class.anon.492, %class.anon.493 }
%class.anon.489 = type { ptr }
%class.anon.490 = type { ptr, ptr }
%class.anon.491 = type { ptr, ptr, ptr, ptr }
%class.anon.492 = type { ptr, ptr, ptr, ptr }
%class.anon.493 = type { ptr, ptr }
%"class.std::optional.467" = type { %"struct.std::_Optional_base.468" }
%"struct.std::_Optional_base.468" = type { %"struct.std::_Optional_payload.470" }
%"struct.std::_Optional_payload.470" = type { %"struct.std::_Optional_payload.base.474", [7 x i8] }
%"struct.std::_Optional_payload.base.474" = type { %"struct.std::_Optional_payload_base.base.473" }
%"struct.std::_Optional_payload_base.base.473" = type <{ %"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage", i8 }>
%"union.std::_Optional_payload_base<std::__cxx11::basic_string<char>>::_Storage" = type { %"class.std::__cxx11::basic_string" }
%"class.std::allocator" = type { i8 }

@.str.165 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.203 = external hidden unnamed_addr constant [11 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

declare i32 @__gxx_personality_v0(...)

; 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 noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8fastgltf12escapeStringB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i64, ptr) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8fastgltf8Exporter11writeImagesERKNS_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %0, ptr noundef nonnull align 8 dereferenceable(580) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.262", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"struct.fastgltf::visitor.488", align 8
  %8 = alloca %"class.std::optional.467", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = getelementptr inbounds i8, ptr %1, i64 336
  %16 = tail call noundef zeroext i1 @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  br i1 %16, label %107, label %17

17:                                               ; preds = %3
  %18 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  %19 = load i8, ptr %18, align 1, !tbaa !5
  %20 = icmp eq i8 %19, 93
  br i1 %20, label %25, label %21

21:                                               ; preds = %17
  %22 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4backEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  %23 = load i8, ptr %22, align 1, !tbaa !5
  %24 = icmp eq i8 %23, 125
  br i1 %24, label %25, label %27

25:                                               ; preds = %21, %17
  %26 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext 44)
  br label %27

27:                                               ; preds = %25, %21
  %28 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.203)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %29 = tail call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  store ptr %29, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %30 = tail call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  store ptr %30, ptr %5, align 8
  %31 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %31, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %27
  %32 = getelementptr inbounds i8, ptr %7, i64 8
  %.sroa.413.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 16
  %33 = getelementptr inbounds i8, ptr %7, i64 24
  %.sroa.49.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 32
  %.sroa.510.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 40
  %.sroa.611.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 48
  %34 = getelementptr inbounds i8, ptr %7, i64 56
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 64
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 72
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 80
  %35 = getelementptr inbounds i8, ptr %7, i64 88
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 96
  %36 = getelementptr inbounds i8, ptr %0, i64 112
  %37 = getelementptr inbounds i8, ptr %0, i64 104
  br label %38

38:                                               ; preds = %.lr.ph, %100
  %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext 123)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %40 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %.sroa.015.0.copyload = load ptr, ptr %4, align 8, !tbaa !8
  %41 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr %40, ptr %.sroa.015.0.copyload)
  %42 = call noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef %41)
  store i64 %42, ptr %6, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %7) #5
  store ptr %0, ptr %7, align 8, !tbaa !8
  store ptr %2, ptr %32, align 8, !tbaa !8
  store ptr %0, ptr %.sroa.413.0..sroa_idx, align 8, !tbaa !8
  store ptr %0, ptr %33, align 8, !tbaa !8
  store ptr %1, ptr %.sroa.49.0..sroa_idx, align 8, !tbaa !8
  store ptr %6, ptr %.sroa.510.0..sroa_idx, align 8, !tbaa !8
  store ptr %2, ptr %.sroa.611.0..sroa_idx, align 8, !tbaa !8
  store ptr %0, ptr %34, align 8, !tbaa !8
  store ptr %1, ptr %.sroa.47.0..sroa_idx, align 8, !tbaa !8
  store ptr %6, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !8
  store ptr %2, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !8
  store ptr %2, ptr %35, align 8, !tbaa !8
  store ptr %0, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !8
  %43 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @"_ZSt5visitIN8fastgltf7visitorIJZNS0_8Exporter11writeImagesERKNS0_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ZNS2_11writeImagesES5_SC_E3$_1ZNS2_11writeImagesES5_SC_E3$_2ZNS2_11writeImagesES5_SC_E3$_3ZNS2_11writeImagesES5_SC_E3$_4EEEJRKSt7variantIJSt9monostateNS0_7sources10BufferViewENSL_3URIENSL_5ArrayENSL_6VectorENSL_12CustomBufferENSL_8ByteViewENSL_8FallbackEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISZ_EEEEE4typeEE4typeEOS18_EEEE4typeEOSX_DpOSZ_"(ptr noundef nonnull align 8 dereferenceable(104) %7, ptr noundef nonnull align 8 dereferenceable(185) %43)
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #5
  %44 = load i64, ptr %0, align 8, !tbaa !12
  %.not = icmp eq i64 %44, 0
  br i1 %.not, label %45, label %105

45:                                               ; preds = %38
  %46 = load ptr, ptr %36, align 8, !tbaa !31
  %.not50 = icmp eq ptr %46, null
  br i1 %.not50, label %68, label %47

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #5
  %48 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %.sroa.03.0.copyload = load ptr, ptr %4, align 8, !tbaa !8
  %49 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr %48, ptr %.sroa.03.0.copyload)
  %50 = call noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef %49)
  %51 = load ptr, ptr %37, align 8, !tbaa !32
  call void %46(ptr dead_on_unwind nonnull writable sret(%"class.std::optional.467") align 8 %8, i64 noundef %50, i32 noundef 8, ptr noundef %51)
  %52 = call noundef zeroext i1 @_ZNKSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE9has_valueEv(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  br i1 %52, label %53, label %67

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.165, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %54 unwind label %59

54:                                               ; preds = %53
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %55)
          to label %56 unwind label %61

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %58 unwind label %63

58:                                               ; preds = %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  br label %67

59:                                               ; preds = %53
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %66

61:                                               ; preds = %54
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %56
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %66

66:                                               ; preds = %65, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %60, %59 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  call void @_ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  br label %104

67:                                               ; preds = %58, %47
  call void @_ZNSt14_Optional_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb0ELb0EED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  br label %68

68:                                               ; preds = %67, %45
  %69 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %70 = getelementptr inbounds i8, ptr %69, i64 192
  %71 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(40) %70) #5
  br i1 %71, label %90, label %72

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #5
  %73 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %74 = getelementptr inbounds i8, ptr %73, i64 192
  %75 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcENSt3pmr21polymorphic_allocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(40) %74) #5
  %76 = extractvalue { i64, ptr } %75, 0
  %77 = extractvalue { i64, ptr } %75, 1
  call void @_ZN8fastgltf12escapeStringB5cxx11ESt17basic_string_viewIcSt11char_traitsIcEE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, i64 %76, ptr %77)
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull @.str.166, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %78 unwind label %82

78:                                               ; preds = %72
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, i8 noundef signext 34)
          to label %79 unwind label %84

79:                                               ; preds = %78
  %80 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %81 unwind label %86

81:                                               ; preds = %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %90

82:                                               ; preds = %72
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %89

84:                                               ; preds = %78
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %88

86:                                               ; preds = %79
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %88

88:                                               ; preds = %86, %84
  %.pn53 = phi { ptr, i32 } [ %87, %86 ], [ %85, %84 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %89

89:                                               ; preds = %88, %82
  %.pn53.pn = phi { ptr, i32 } [ %.pn53, %88 ], [ %83, %82 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %104

90:                                               ; preds = %81, %68
  %91 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext 125)
  %92 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %.sroa.0.0.copyload = load ptr, ptr %4, align 8, !tbaa !8
  %93 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr %92, ptr %.sroa.0.0.copyload)
  %94 = call noundef i64 @_ZN8fastgltf4uabsIlEENSt13make_unsignedIT_E4typeES2_(i64 noundef %93)
  %95 = add i64 %94, 1
  %96 = call noundef i64 @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %98, label %100

98:                                               ; preds = %90
  %99 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext 44)
  br label %100

100:                                              ; preds = %98, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %102 = call ptr @_ZNKSt6vectorIN8fastgltf5ImageESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #5
  store ptr %102, ptr %5, align 8
  %103 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br i1 %103, label %38, label %._crit_edge, !llvm.loop !33

104:                                              ; preds = %89, %66
  %.pn53.pn.pn = phi { ptr, i32 } [ %.pn53.pn, %89 ], [ %.pn.pn, %66 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn53.pn.pn

105:                                              ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %107

._crit_edge:                                      ; preds = %100, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %106 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc(ptr noundef nonnull align 8 dereferenceable(32) %2, i8 noundef signext 93)
  br label %107

107:                                              ; preds = %105, %3, %._crit_edge
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS3_SaIS3_EEEEENSt15iterator_traitsIT_E15difference_typeESB_SB_(ptr, ptr) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZSt5visitIN8fastgltf7visitorIJZNS0_8Exporter11writeImagesERKNS0_5AssetERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0ZNS2_11writeImagesES5_SC_E3$_1ZNS2_11writeImagesES5_SC_E3$_2ZNS2_11writeImagesES5_SC_E3$_3ZNS2_11writeImagesES5_SC_E3$_4EEEJRKSt7variantIJSt9monostateNS0_7sources10BufferViewENSL_3URIENSL_5ArrayENSL_6VectorENSL_12CustomBufferENSL_8ByteViewENSL_8FallbackEEEEENSt13invoke_resultIT_JDpNSt13__conditionalIX21is_lvalue_reference_vIT0_EEE4typeIRNSt19variant_alternativeILm0ENSt16remove_referenceIDTclsr9__variantE4__asclsr3stdE7declvalISZ_EEEEE4typeEE4typeEOS18_EEEE4typeEOSX_DpOSZ_"(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(185)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN8fastgltf5ImageESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 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 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !6, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTSN8fastgltf8ExporterE", !14, i64 0, !15, i64 8, !16, i64 16, !17, i64 24, !17, i64 64, !9, i64 104, !9, i64 112, !27, i64 120, !27, i64 144}
!14 = !{!"_ZTSN8fastgltf5ErrorE", !6, i64 0}
!15 = !{!"_ZTSN8fastgltf13ExportOptionsE", !6, i64 0}
!16 = !{!"bool", !6, i64 0}
!17 = !{!"_ZTSNSt10filesystem7__cxx114pathE", !18, i64 0, !20, i64 32}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !11, i64 8, !6, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!20 = !{!"_ZTSNSt10filesystem7__cxx114path5_ListE", !21, i64 0}
!21 = !{!"_ZTSSt10unique_ptrINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_dataINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterELb1ELb1EE", !23, i64 0}
!23 = !{!"_ZTSSt15__uniq_ptr_implINSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEE", !24, i64 0}
!24 = !{!"_ZTSSt5tupleIJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !25, i64 0}
!25 = !{!"_ZTSSt11_Tuple_implILm0EJPNSt10filesystem7__cxx114path5_List5_ImplENS3_13_Impl_deleterEEE", !26, i64 0}
!26 = !{!"_ZTSSt10_Head_baseILm0EPNSt10filesystem7__cxx114path5_List5_ImplELb0EE", !9, i64 0}
!27 = !{!"_ZTSSt6vectorISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt8optionalINSt10filesystem7__cxx114pathEESaIS4_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!31 = !{!13, !9, i64 112}
!32 = !{!13, !9, i64 104}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}


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