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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.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.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 }
%"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.Settings = type { i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, float, float, i8, i8, i8, float, i32, i8, i8, i8, i8, i8, [4 x float], [4 x i32], [4 x i32], [4 x i32], i32, i8, i8, i8, i8, i32 }

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._Z11processMeshR4MeshRK8Settings = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11processMeshR4MeshRK8Settings(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 4 dereferenceable(148) %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.Mesh, ptr %5, i32 0, i32 6
  %7 = load i32, ptr %6, align 8, !tbaa !9
  switch i32 %7, label %67 [
    i32 1, label %8
    i32 2, label %68
    i32 5, label %21
  ]

8:                                                ; preds = %2
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.Mesh, ptr %9, i32 0, i32 8
  %11 = call noundef zeroext i1 @_ZNKSt6vectorIjSaIjEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #3
  br i1 %11, label %12, label %13

12:                                               ; preds = %8
  br label %15

13:                                               ; preds = %8
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 1103, ptr noundef @__PRETTY_FUNCTION__._Z11processMeshR4MeshRK8Settings) #4
  unreachable

14:                                               ; No predecessors!
  br label %15

15:                                               ; preds = %14, %12
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Settings, ptr %17, i32 0, i32 20
  %19 = load float, ptr %18, align 4, !tbaa !44
  call void @_ZL17simplifyPointMeshR4Meshf(ptr noundef nonnull align 8 dereferenceable(256) %16, float noundef %19)
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZL13sortPointMeshR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %20)
  br label %68

21:                                               ; preds = %2
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZL11filterBonesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %22)
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.Settings, ptr %24, i32 0, i32 37
  %26 = load i8, ptr %25, align 4, !tbaa !47, !range !48, !noundef !49
  %27 = trunc i8 %26 to i1
  br i1 %27, label %28, label %34

28:                                               ; preds = %21
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.Settings, ptr %29, i32 0, i32 7
  %31 = load i8, ptr %30, align 1, !tbaa !50, !range !48, !noundef !49
  %32 = trunc i8 %31 to i1
  %33 = xor i1 %32, true
  br label %34

34:                                               ; preds = %28, %21
  %35 = phi i1 [ false, %21 ], [ %33, %28 ]
  call void @_ZL11reindexMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256) %23, i1 noundef zeroext %35)
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZL15filterTrianglesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %36)
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.Settings, ptr %37, i32 0, i32 20
  %39 = load float, ptr %38, align 4, !tbaa !44
  %40 = fcmp olt float %39, 1.000000e+00
  br i1 %40, label %41, label %61

41:                                               ; preds = %34
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Settings, ptr %43, i32 0, i32 20
  %45 = load float, ptr %44, align 4, !tbaa !44
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.Settings, ptr %46, i32 0, i32 21
  %48 = load float, ptr %47, align 4, !tbaa !51
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.Settings, ptr %49, i32 0, i32 24
  %51 = load i8, ptr %50, align 2, !tbaa !52, !range !48, !noundef !49
  %52 = trunc i8 %51 to i1
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.Settings, ptr %53, i32 0, i32 22
  %55 = load i8, ptr %54, align 4, !tbaa !53, !range !48, !noundef !49
  %56 = trunc i8 %55 to i1
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.Settings, ptr %57, i32 0, i32 23
  %59 = load i8, ptr %58, align 1, !tbaa !54, !range !48, !noundef !49
  %60 = trunc i8 %59 to i1
  call void @_ZL12simplifyMeshR4Meshffbbbb(ptr noundef nonnull align 8 dereferenceable(256) %42, float noundef %45, float noundef %48, i1 noundef zeroext %52, i1 noundef zeroext %56, i1 noundef zeroext %60, i1 noundef zeroext false)
  br label %61

61:                                               ; preds = %41, %34
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.Settings, ptr %63, i32 0, i32 39
  %65 = load i8, ptr %64, align 2, !tbaa !55, !range !48, !noundef !49
  %66 = trunc i8 %65 to i1
  call void @_ZL12optimizeMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256) %62, i1 noundef zeroext %66)
  br label %68

67:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 1121, ptr noundef @__PRETTY_FUNCTION__._Z11processMeshR4MeshRK8Settings) #4
  unreachable

68:                                               ; preds = %61, %15, %2
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17simplifyPointMeshR4Meshf(ptr noundef nonnull align 8 dereferenceable(256), float noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13sortPointMeshR4Mesh(ptr noundef nonnull align 8 dereferenceable(256)) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11filterBonesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256)) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11reindexMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15filterTrianglesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256)) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12simplifyMeshR4Meshffbbbb(ptr noundef nonnull align 8 dereferenceable(256), float noundef, float noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12optimizeMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) #2

attributes #0 = { 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 #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nounwind }
attributes #4 = { noreturn 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, !22, i64 96}
!10 = !{!"_ZTS4Mesh", !11, i64 0, !12, i64 8, !16, i64 32, !6, i64 56, !6, i64 64, !20, i64 72, !22, i64 96, !23, i64 104, !27, i64 128, !31, i64 152, !7, i64 160, !21, i64 176, !32, i64 184, !36, i64 208, !40, i64 232}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIP10cgltf_nodeSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIP10cgltf_nodeSaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorI9TransformSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI9TransformSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTS12cgltf_extras", !21, i64 0, !21, i64 8, !6, i64 16}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTS20cgltf_primitive_type", !7, i64 0}
!23 = !{!"_ZTSSt6vectorI6StreamSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseI6StreamSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSSt6vectorIjSaIjEE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"bool", !7, i64 0}
!32 = !{!"_ZTSSt6vectorIfSaIfEE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!36 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = !{!"_ZTSSt6vectorI22cgltf_material_mappingSaIS0_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!44 = !{!45, !46, i64 44}
!45 = !{!"_ZTS8Settings", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !31, i64 16, !31, i64 17, !31, i64 18, !31, i64 19, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !31, i64 36, !31, i64 37, !31, i64 38, !31, i64 39, !31, i64 40, !31, i64 41, !31, i64 42, !31, i64 43, !46, i64 44, !46, i64 48, !31, i64 52, !31, i64 53, !31, i64 54, !46, i64 56, !11, i64 60, !31, i64 64, !31, i64 65, !31, i64 66, !31, i64 67, !31, i64 68, !7, i64 72, !7, i64 88, !7, i64 104, !7, i64 120, !11, i64 136, !31, i64 140, !31, i64 141, !31, i64 142, !31, i64 143, !11, i64 144}
!46 = !{!"float", !7, i64 0}
!47 = !{!45, !31, i64 140}
!48 = !{i8 0, i8 2}
!49 = !{}
!50 = !{!45, !31, i64 19}
!51 = !{!45, !46, i64 48}
!52 = !{!45, !31, i64 54}
!53 = !{!45, !31, i64 52}
!54 = !{!45, !31, i64 53}
!55 = !{!45, !31, i64 142}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._Z11processMeshR4MeshRK8Settings = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11processMeshR4MeshRK8Settings(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(148) %1) local_unnamed_addr #2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 96
  %4 = load i32, ptr %3, align 8, !tbaa !5
  switch i32 %4, label %40 [
    i32 1, label %5
    i32 2, label %41
    i32 5, label %12
  ]

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 128
  %7 = tail call noundef zeroext i1 @_ZNKSt6vectorIjSaIjEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br i1 %7, label %9, label %8

8:                                                ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 1103, ptr noundef nonnull @__PRETTY_FUNCTION__._Z11processMeshR4MeshRK8Settings) #4
  unreachable

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %1, i64 44
  %11 = load float, ptr %10, align 4, !tbaa !43
  tail call void @_ZL17simplifyPointMeshR4Meshf(ptr noundef nonnull align 8 dereferenceable(256) %0, float noundef %11)
  tail call void @_ZL13sortPointMeshR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %0)
  br label %41

12:                                               ; preds = %2
  tail call void @_ZL11filterBonesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %0)
  %13 = getelementptr inbounds i8, ptr %1, i64 140
  %14 = load i8, ptr %13, align 4, !tbaa !46, !range !47, !noundef !48
  %15 = trunc nuw i8 %14 to i1
  %16 = getelementptr inbounds i8, ptr %1, i64 19
  %17 = load i8, ptr %16, align 1, !range !47
  %18 = trunc nuw i8 %17 to i1
  %19 = xor i1 %18, true
  %20 = select i1 %15, i1 %19, i1 false
  tail call void @_ZL11reindexMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256) %0, i1 noundef zeroext %20)
  tail call void @_ZL15filterTrianglesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %0)
  %21 = getelementptr inbounds i8, ptr %1, i64 44
  %22 = load float, ptr %21, align 4, !tbaa !43
  %23 = fcmp olt float %22, 1.000000e+00
  br i1 %23, label %24, label %36

24:                                               ; preds = %12
  %25 = getelementptr inbounds i8, ptr %1, i64 48
  %26 = load float, ptr %25, align 4, !tbaa !49
  %27 = getelementptr inbounds i8, ptr %1, i64 54
  %28 = load i8, ptr %27, align 2, !tbaa !50, !range !47, !noundef !48
  %29 = trunc nuw i8 %28 to i1
  %30 = getelementptr inbounds i8, ptr %1, i64 52
  %31 = load i8, ptr %30, align 4, !tbaa !51, !range !47, !noundef !48
  %32 = trunc nuw i8 %31 to i1
  %33 = getelementptr inbounds i8, ptr %1, i64 53
  %34 = load i8, ptr %33, align 1, !tbaa !52, !range !47, !noundef !48
  %35 = trunc nuw i8 %34 to i1
  tail call void @_ZL12simplifyMeshR4Meshffbbbb(ptr noundef nonnull align 8 dereferenceable(256) %0, float noundef %22, float noundef %26, i1 noundef zeroext %29, i1 noundef zeroext %32, i1 noundef zeroext %35, i1 noundef zeroext false)
  br label %36

36:                                               ; preds = %24, %12
  %37 = getelementptr inbounds i8, ptr %1, i64 142
  %38 = load i8, ptr %37, align 2, !tbaa !53, !range !47, !noundef !48
  %39 = trunc nuw i8 %38 to i1
  tail call void @_ZL12optimizeMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256) %0, i1 noundef zeroext %39)
  br label %41

40:                                               ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 1121, ptr noundef nonnull @__PRETTY_FUNCTION__._Z11processMeshR4MeshRK8Settings) #4
  unreachable

41:                                               ; preds = %36, %9, %2
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL17simplifyPointMeshR4Meshf(ptr noundef nonnull align 8 dereferenceable(256), float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL13sortPointMeshR4Mesh(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11filterBonesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11reindexMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL15filterTrianglesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12simplifyMeshR4Meshffbbbb(ptr noundef nonnull align 8 dereferenceable(256), float noundef, float noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL12optimizeMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256), i1 noundef zeroext) local_unnamed_addr #2

attributes #0 = { 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 #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nounwind }
attributes #4 = { noreturn 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 = !{!44, !45, i64 44}
!44 = !{!"_ZTS8Settings", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !30, i64 16, !30, i64 17, !30, i64 18, !30, i64 19, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !30, i64 36, !30, i64 37, !30, i64 38, !30, i64 39, !30, i64 40, !30, i64 41, !30, i64 42, !30, i64 43, !45, i64 44, !45, i64 48, !30, i64 52, !30, i64 53, !30, i64 54, !45, i64 56, !7, i64 60, !30, i64 64, !30, i64 65, !30, i64 66, !30, i64 67, !30, i64 68, !8, i64 72, !8, i64 88, !8, i64 104, !8, i64 120, !7, i64 136, !30, i64 140, !30, i64 141, !30, i64 142, !30, i64 143, !7, i64 144}
!45 = !{!"float", !8, i64 0}
!46 = !{!44, !30, i64 140}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = !{!44, !45, i64 48}
!50 = !{!44, !30, i64 54}
!51 = !{!44, !30, i64 52}
!52 = !{!44, !30, i64 53}
!53 = !{!44, !30, i64 142}


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