; LLVM IR from zeux/meshoptimizer :: gltf/mesh.ll (Z17filterEmptyMeshesRSt6vectorI4MeshSaIS0_EE)

; 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::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl" }
%"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl" = type { %"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Mesh = type { i32, %"class.std::vector", %"class.std::vector.0", ptr, ptr, %struct.cgltf_extras, i32, %"class.std::vector.5", %"class.std::vector.10", i8, [2 x i64], i64, %"class.std::vector.15", %"class.std::vector.20", %"class.std::vector.25" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<cgltf_node *, std::allocator<cgltf_node *>>::_Vector_impl" }
%"struct.std::_Vector_base<cgltf_node *, std::allocator<cgltf_node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<cgltf_node *, std::allocator<cgltf_node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cgltf_node *, std::allocator<cgltf_node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Transform, std::allocator<Transform>>::_Vector_impl" }
%"struct.std::_Vector_base<Transform, std::allocator<Transform>>::_Vector_impl" = type { %"struct.std::_Vector_base<Transform, std::allocator<Transform>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Transform, std::allocator<Transform>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.cgltf_extras = type { i64, i64, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<cgltf_material_mapping, std::allocator<cgltf_material_mapping>>::_Vector_impl" }
%"struct.std::_Vector_base<cgltf_material_mapping, std::allocator<cgltf_material_mapping>>::_Vector_impl" = type { %"struct.std::_Vector_base<cgltf_material_mapping, std::allocator<cgltf_material_mapping>>::_Vector_impl_data" }
%"struct.std::_Vector_base<cgltf_material_mapping, std::allocator<cgltf_material_mapping>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.Stream = type { i32, i32, i32, ptr, %"class.std::vector.30" }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl" }
%"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl" = type { %"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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 noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17filterEmptyMeshesRSt6vectorI4MeshSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::vector.5", align 8
  %8 = alloca %"class.std::vector.10", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store i64 0, ptr %4, align 8, !tbaa !9
  br label %11

11:                                               ; preds = %66, %1
  %12 = load i64, ptr %4, align 8, !tbaa !9
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %15 = icmp ult i64 %12, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %11
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %73

17:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = load i64, ptr %4, align 8, !tbaa !9
  %20 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %19) #4
  store ptr %20, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.Mesh, ptr %21, i32 0, i32 7
  %23 = call noundef zeroext i1 @_ZNKSt6vectorI6StreamSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  br i1 %23, label %24, label %25

24:                                               ; preds = %17
  store i32 4, ptr %5, align 4
  br label %63

25:                                               ; preds = %17
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.Mesh, ptr %26, i32 0, i32 7
  %28 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef 0) #4
  %29 = getelementptr inbounds %struct.Stream, ptr %28, i32 0, i32 4
  %30 = call noundef zeroext i1 @_ZNKSt6vectorI4AttrSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  br i1 %30, label %31, label %32

31:                                               ; preds = %25
  store i32 4, ptr %5, align 4
  br label %63

32:                                               ; preds = %25
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.Mesh, ptr %33, i32 0, i32 6
  %35 = load i32, ptr %34, align 8, !tbaa !11
  %36 = icmp ne i32 %35, 1
  br i1 %36, label %37, label %42

37:                                               ; preds = %32
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.Mesh, ptr %38, i32 0, i32 8
  %40 = call noundef zeroext i1 @_ZNKSt6vectorIjSaIjEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #4
  br i1 %40, label %41, label %42

41:                                               ; preds = %37
  store i32 4, ptr %5, align 4
  br label %63

42:                                               ; preds = %37, %32
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @_ZNSt6vectorI6StreamSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Mesh, ptr %43, i32 0, i32 7
  call void @_ZNSt6vectorI6StreamSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %44) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Mesh, ptr %45, i32 0, i32 8
  call void @_ZNSt6vectorIjSaIjEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %46) #4
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = load i64, ptr %3, align 8, !tbaa !9
  %50 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %49) #4
  %51 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN4MeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(256) %50, ptr noundef nonnull align 8 dereferenceable(256) %47)
          to label %52 unwind label %69

52:                                               ; preds = %42
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = load i64, ptr %3, align 8, !tbaa !9
  %55 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54) #4
  %56 = getelementptr inbounds %struct.Mesh, ptr %55, i32 0, i32 7
  call void @_ZNSt6vectorI6StreamSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  %57 = load ptr, ptr %2, align 8, !tbaa !5
  %58 = load i64, ptr %3, align 8, !tbaa !9
  %59 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %58) #4
  %60 = getelementptr inbounds %struct.Mesh, ptr %59, i32 0, i32 8
  call void @_ZNSt6vectorIjSaIjEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %60, ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  %61 = load i64, ptr %3, align 8, !tbaa !9
  %62 = add i64 %61, 1
  store i64 %62, ptr %3, align 8, !tbaa !9
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorI6StreamSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  store i32 0, ptr %5, align 4
  br label %63

63:                                               ; preds = %52, %41, %31, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %64 = load i32, ptr %5, align 4
  switch i32 %64, label %81 [
    i32 0, label %65
    i32 4, label %66
  ]

65:                                               ; preds = %63
  br label %66

66:                                               ; preds = %65, %63
  %67 = load i64, ptr %4, align 8, !tbaa !9
  %68 = add i64 %67, 1
  store i64 %68, ptr %4, align 8, !tbaa !9
  br label %11, !llvm.loop !45

69:                                               ; preds = %42
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %9, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %10, align 4
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorI6StreamSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %76

73:                                               ; preds = %16
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = load i64, ptr %3, align 8, !tbaa !9
  call void @_ZNSt6vectorI4MeshSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %74, i64 noundef %75)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void

76:                                               ; preds = %69
  %77 = load ptr, ptr %9, align 8
  %78 = load i32, ptr %10, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80

81:                                               ; preds = %63
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZN4MeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4MeshSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 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 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !23, i64 96}
!12 = !{!"_ZTS4Mesh", !13, i64 0, !14, i64 8, !18, i64 32, !6, i64 56, !6, i64 64, !22, i64 72, !23, i64 96, !24, i64 104, !28, i64 128, !32, i64 152, !7, i64 160, !10, i64 176, !33, i64 184, !37, i64 208, !41, i64 232}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIP10cgltf_nodeSaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIP10cgltf_nodeSaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorI9TransformSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI9TransformSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTS12cgltf_extras", !10, i64 0, !10, i64 8, !6, i64 16}
!23 = !{!"_ZTS20cgltf_primitive_type", !7, i64 0}
!24 = !{!"_ZTSSt6vectorI6StreamSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseI6StreamSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"_ZTSSt6vectorIjSaIjEE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!"bool", !7, i64 0}
!33 = !{!"_ZTSSt6vectorIfSaIfEE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!37 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSSt6vectorI22cgltf_material_mappingSaIS0_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = distinct !{!45, !46}
!46 = !{!"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::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl" }
%"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl" = type { %"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Stream, std::allocator<Stream>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, 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 noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(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(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17filterEmptyMeshesRSt6vectorI4MeshSaIS0_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.5", align 8
  %3 = alloca %"class.std::vector.10", align 8
  %4 = tail call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %.not26 = icmp eq i64 %4, 0
  br i1 %.not26, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %28, %1
  %.0.lcssa = phi i64 [ 0, %1 ], [ %.1, %28 ]
  call void @_ZNSt6vectorI4MeshSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.0.lcssa)
  ret void

.lr.ph:                                           ; preds = %1, %28
  %.025 = phi i64 [ %.1, %28 ], [ 0, %1 ]
  %.02224 = phi i64 [ %29, %28 ], [ 0, %1 ]
  %5 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.02224) #4
  %6 = getelementptr inbounds i8, ptr %5, i64 104
  %7 = call noundef zeroext i1 @_ZNKSt6vectorI6StreamSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br i1 %7, label %28, label %8

8:                                                ; preds = %.lr.ph
  %9 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #4
  %10 = getelementptr inbounds i8, ptr %9, i64 24
  %11 = call noundef zeroext i1 @_ZNKSt6vectorI4AttrSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br i1 %11, label %28, label %12

12:                                               ; preds = %8
  %13 = getelementptr inbounds i8, ptr %5, i64 96
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %.not = icmp eq i32 %14, 1
  br i1 %.not, label %18, label %15

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %5, i64 128
  %17 = call noundef zeroext i1 @_ZNKSt6vectorIjSaIjEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  br i1 %17, label %28, label %18

18:                                               ; preds = %15, %12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZNSt6vectorI6StreamSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZNSt6vectorI6StreamSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %19 = getelementptr inbounds i8, ptr %5, i64 128
  call void @_ZNSt6vectorIjSaIjEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  %20 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.025) #4
  %21 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN4MeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(256) %20, ptr noundef nonnull align 8 dereferenceable(256) %5)
          to label %22 unwind label %32

22:                                               ; preds = %18
  %23 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.025) #4
  %24 = getelementptr inbounds i8, ptr %23, i64 104
  call void @_ZNSt6vectorI6StreamSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %25 = call noundef nonnull align 8 dereferenceable(256) ptr @_ZNSt6vectorI4MeshSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %.025) #4
  %26 = getelementptr inbounds i8, ptr %25, i64 128
  call void @_ZNSt6vectorIjSaIjEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %27 = add i64 %.025, 1
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorI6StreamSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  br label %28

28:                                               ; preds = %15, %8, %.lr.ph, %22
  %.1 = phi i64 [ %27, %22 ], [ %.025, %.lr.ph ], [ %.025, %8 ], [ %.025, %15 ]
  %29 = add nuw i64 %.02224, 1
  %30 = call noundef i64 @_ZNKSt6vectorI4MeshSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  %31 = icmp ult i64 %29, %30
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !43

32:                                               ; preds = %18
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorI6StreamSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  resume { ptr, i32 } %33
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(256) ptr @_ZN4MeshaSERKS_(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4MeshSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 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 = { 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 = { 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, !21, i64 96}
!6 = !{!"_ZTS4Mesh", !7, i64 0, !10, i64 8, !15, i64 32, !14, i64 56, !14, i64 64, !19, i64 72, !21, i64 96, !22, i64 104, !26, i64 128, !30, i64 152, !8, i64 160, !20, i64 176, !31, i64 184, !35, i64 208, !39, i64 232}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIP10cgltf_nodeSaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIP10cgltf_nodeSaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorI9TransformSaIS0_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseI9TransformSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"_ZTS12cgltf_extras", !20, i64 0, !20, i64 8, !14, i64 16}
!20 = !{!"long", !8, i64 0}
!21 = !{!"_ZTS20cgltf_primitive_type", !8, i64 0}
!22 = !{!"_ZTSSt6vectorI6StreamSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI6StreamSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!26 = !{!"_ZTSSt6vectorIjSaIjEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!30 = !{!"bool", !8, i64 0}
!31 = !{!"_ZTSSt6vectorIfSaIfEE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!35 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!39 = !{!"_ZTSSt6vectorI22cgltf_material_mappingSaIS0_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}


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