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

; 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.Attr = type { [4 x float] }
%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.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 }

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._Z13debugSimplifyRK4MeshRS_S2_ffbb = external hidden unnamed_addr constant [75 x i8], align 1
@_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette = external hidden constant [5 x %struct.Attr], align 16

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; 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) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13debugSimplifyRK4MeshRS_S2_ffbb(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull align 8 dereferenceable(256) %2, float noundef %3, float noundef %4, i1 noundef zeroext %5, i1 noundef zeroext %6) #5 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca %struct.Mesh, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca %struct.Stream, align 8
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store float %3, ptr %11, align 4, !tbaa !9
  store float %4, ptr %12, align 4, !tbaa !9
  %33 = zext i1 %5 to i8
  store i8 %33, ptr %13, align 1, !tbaa !11
  %34 = zext i1 %6 to i8
  store i8 %34, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 256, ptr %15) #8
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN4MeshC2ERKS_(ptr noundef nonnull align 8 dereferenceable(256) %15, ptr noundef nonnull align 8 dereferenceable(256) %35)
  %36 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 6
  %37 = load i32, ptr %36, align 8, !tbaa !13
  %38 = icmp eq i32 %37, 5
  br i1 %38, label %39, label %40

39:                                               ; preds = %7
  br label %42

40:                                               ; preds = %7
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 1129, ptr noundef @__PRETTY_FUNCTION__._Z13debugSimplifyRK4MeshRS_S2_ffbb) #9
  unreachable

41:                                               ; No predecessors!
  br label %42

42:                                               ; preds = %41, %39
  invoke void @_ZL11filterBonesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %15)
          to label %43 unwind label %77

43:                                               ; preds = %42
  %44 = load i8, ptr %14, align 1, !tbaa !11, !range !47, !noundef !48
  %45 = trunc i8 %44 to i1
  invoke void @_ZL11reindexMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256) %15, i1 noundef zeroext %45)
          to label %46 unwind label %77

46:                                               ; preds = %43
  invoke void @_ZL15filterTrianglesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %15)
          to label %47 unwind label %77

47:                                               ; preds = %46
  %48 = load float, ptr %11, align 4, !tbaa !9
  %49 = load float, ptr %12, align 4, !tbaa !9
  %50 = load i8, ptr %13, align 1, !tbaa !11, !range !47, !noundef !48
  %51 = trunc i8 %50 to i1
  invoke void @_ZL12simplifyMeshR4Meshffbbbb(ptr noundef nonnull align 8 dereferenceable(256) %15, float noundef %48, float noundef %49, i1 noundef zeroext %51, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext true)
          to label %52 unwind label %77

52:                                               ; preds = %47
  %53 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 1
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.Mesh, ptr %54, i32 0, i32 1
  %56 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP10cgltf_nodeSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 8 dereferenceable(24) %53)
          to label %57 unwind label %77

57:                                               ; preds = %52
  %58 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !49
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.Mesh, ptr %60, i32 0, i32 4
  store ptr %59, ptr %61, align 8, !tbaa !49
  %62 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 1
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.Mesh, ptr %63, i32 0, i32 1
  %65 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP10cgltf_nodeSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(24) %62)
          to label %66 unwind label %77

66:                                               ; preds = %57
  %67 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 4
  %68 = load ptr, ptr %67, align 8, !tbaa !49
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.Mesh, ptr %69, i32 0, i32 4
  store ptr %68, ptr %70, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 0, ptr %18, align 8, !tbaa !50
  br label %71

71:                                               ; preds = %118, %66
  %72 = load i64, ptr %18, align 8, !tbaa !50
  %73 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 7
  %74 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #8
  %75 = icmp ult i64 %72, %74
  br i1 %75, label %81, label %76

76:                                               ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %121

77:                                               ; preds = %57, %52, %47, %46, %43, %42
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %16, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %17, align 4
  br label %234

81:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %82 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 7
  %83 = load i64, ptr %18, align 8, !tbaa !50
  %84 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %83) #8
  store ptr %84, ptr %19, align 8, !tbaa !5
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.Stream, ptr %85, i32 0, i32 2
  %87 = load i32, ptr %86, align 8, !tbaa !51
  %88 = icmp eq i32 %87, 0
  br i1 %88, label %89, label %117

89:                                               ; preds = %81
  %90 = load ptr, ptr %19, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.Stream, ptr %90, i32 0, i32 0
  %92 = load i32, ptr %91, align 8, !tbaa !58
  %93 = icmp eq i32 %92, 1
  br i1 %93, label %104, label %94

94:                                               ; preds = %89
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.Stream, ptr %95, i32 0, i32 0
  %97 = load i32, ptr %96, align 8, !tbaa !58
  %98 = icmp eq i32 %97, 6
  br i1 %98, label %104, label %99

99:                                               ; preds = %94
  %100 = load ptr, ptr %19, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.Stream, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !58
  %103 = icmp eq i32 %102, 7
  br i1 %103, label %104, label %117

104:                                              ; preds = %99, %94, %89
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.Mesh, ptr %105, i32 0, i32 7
  %107 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %106, ptr noundef nonnull align 8 dereferenceable(48) %107)
          to label %108 unwind label %113

108:                                              ; preds = %104
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.Mesh, ptr %109, i32 0, i32 7
  %111 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %110, ptr noundef nonnull align 8 dereferenceable(48) %111)
          to label %112 unwind label %113

112:                                              ; preds = %108
  br label %117

113:                                              ; preds = %108, %104
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %16, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %234

117:                                              ; preds = %112, %99, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %118

118:                                              ; preds = %117
  %119 = load i64, ptr %18, align 8, !tbaa !50
  %120 = add i64 %119, 1
  store i64 %120, ptr %18, align 8, !tbaa !50
  br label %71, !llvm.loop !59

121:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %122 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 7
  %123 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef 0) #8
  %124 = getelementptr inbounds %struct.Stream, ptr %123, i32 0, i32 4
  %125 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %124) #8
  store i64 %125, ptr %20, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 48, ptr %21) #8
  %126 = getelementptr inbounds %struct.Stream, ptr %21, i32 0, i32 0
  store i32 5, ptr %126, align 8, !tbaa !58
  %127 = getelementptr inbounds %struct.Stream, ptr %21, i32 0, i32 1
  store i32 0, ptr %127, align 4, !tbaa !61
  %128 = getelementptr inbounds %struct.Stream, ptr %21, i32 0, i32 2
  store i32 0, ptr %128, align 8, !tbaa !51
  %129 = getelementptr inbounds %struct.Stream, ptr %21, i32 0, i32 3
  store ptr null, ptr %129, align 8, !tbaa !62
  %130 = getelementptr inbounds %struct.Stream, ptr %21, i32 0, i32 4
  call void @llvm.memset.p0.i64(ptr align 8 %130, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorI4AttrSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %130) #8
  %131 = getelementptr inbounds %struct.Stream, ptr %21, i32 0, i32 4
  %132 = load i64, ptr %20, align 8, !tbaa !50
  invoke void @_ZNSt6vectorI4AttrSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %131, i64 noundef %132, ptr noundef nonnull align 4 dereferenceable(16) @_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette)
          to label %133 unwind label %144

133:                                              ; preds = %121
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.Mesh, ptr %134, i32 0, i32 6
  store i32 1, ptr %135, align 8, !tbaa !13
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.Mesh, ptr %136, i32 0, i32 6
  store i32 2, ptr %137, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store i64 0, ptr %22, align 8, !tbaa !50
  br label %138

138:                                              ; preds = %223, %133
  %139 = load i64, ptr %22, align 8, !tbaa !50
  %140 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 8
  %141 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %140) #8
  %142 = icmp ult i64 %139, %141
  br i1 %142, label %148, label %143

143:                                              ; preds = %138
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %226

144:                                              ; preds = %229, %226, %121
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %16, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %17, align 4
  br label %233

148:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !63
  br label %149

149:                                              ; preds = %218, %148
  %150 = load i32, ptr %24, align 4, !tbaa !63
  %151 = icmp slt i32 %150, 3
  br i1 %151, label %153, label %152

152:                                              ; preds = %149
  store i32 8, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %222

153:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 268435455, ptr %25, align 4, !tbaa !63
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  %154 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 8
  %155 = load i64, ptr %22, align 8, !tbaa !50
  %156 = load i32, ptr %24, align 4, !tbaa !63
  %157 = sext i32 %156 to i64
  %158 = add i64 %155, %157
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %154, i64 noundef %158) #8
  %160 = load i32, ptr %159, align 4, !tbaa !63
  store i32 %160, ptr %26, align 4, !tbaa !63
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  %161 = getelementptr inbounds %struct.Mesh, ptr %15, i32 0, i32 8
  %162 = load i64, ptr %22, align 8, !tbaa !50
  %163 = load i32, ptr %24, align 4, !tbaa !63
  %164 = add nsw i32 %163, 1
  %165 = srem i32 %164, 3
  %166 = sext i32 %165 to i64
  %167 = add i64 %162, %166
  %168 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %167) #8
  %169 = load i32, ptr %168, align 4, !tbaa !63
  store i32 %169, ptr %27, align 4, !tbaa !63
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  %170 = load i32, ptr %26, align 4, !tbaa !63
  %171 = lshr i32 %170, 28
  %172 = and i32 %171, 7
  store i32 %172, ptr %28, align 4, !tbaa !63
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %173 = load i32, ptr %26, align 4, !tbaa !63
  %174 = lshr i32 %173, 31
  store i32 %174, ptr %29, align 4, !tbaa !63
  %175 = load i32, ptr %28, align 4, !tbaa !63
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %195

177:                                              ; preds = %153
  %178 = load i32, ptr %28, align 4, !tbaa !63
  %179 = zext i32 %178 to i64
  %180 = getelementptr inbounds [5 x %struct.Attr], ptr @_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette, i64 0, i64 %179
  %181 = getelementptr inbounds %struct.Stream, ptr %21, i32 0, i32 4
  %182 = load i32, ptr %26, align 4, !tbaa !63
  %183 = and i32 %182, 268435455
  %184 = zext i32 %183 to i64
  %185 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %184) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %185, ptr align 16 %180, i64 16, i1 false), !tbaa.struct !64
  %186 = load ptr, ptr %9, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.Mesh, ptr %186, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  %188 = load i32, ptr %26, align 4, !tbaa !63
  %189 = and i32 %188, 268435455
  store i32 %189, ptr %30, align 4, !tbaa !63
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %187, ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %190 unwind label %191

190:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %195

191:                                              ; preds = %177
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %16, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %221

195:                                              ; preds = %190, %153
  %196 = load i32, ptr %29, align 4, !tbaa !63
  %197 = icmp ne i32 %196, 0
  br i1 %197, label %198, label %217

198:                                              ; preds = %195
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.Mesh, ptr %199, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %201 = load i32, ptr %26, align 4, !tbaa !63
  %202 = and i32 %201, 268435455
  store i32 %202, ptr %31, align 4, !tbaa !63
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %200, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %203 unwind label %209

203:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  %204 = load ptr, ptr %10, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.Mesh, ptr %204, i32 0, i32 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %206 = load i32, ptr %27, align 4, !tbaa !63
  %207 = and i32 %206, 268435455
  store i32 %207, ptr %32, align 4, !tbaa !63
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %205, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %208 unwind label %213

208:                                              ; preds = %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %217

209:                                              ; preds = %198
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %16, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %221

213:                                              ; preds = %203
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %16, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %221

217:                                              ; preds = %208, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %24, align 4, !tbaa !63
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %24, align 4, !tbaa !63
  br label %149, !llvm.loop !66

221:                                              ; preds = %213, %209, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %233

222:                                              ; preds = %152
  br label %223

223:                                              ; preds = %222
  %224 = load i64, ptr %22, align 8, !tbaa !50
  %225 = add i64 %224, 3
  store i64 %225, ptr %22, align 8, !tbaa !50
  br label %138, !llvm.loop !67

226:                                              ; preds = %143
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.Mesh, ptr %227, i32 0, i32 7
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %228, ptr noundef nonnull align 8 dereferenceable(48) %21)
          to label %229 unwind label %144

229:                                              ; preds = %226
  %230 = load ptr, ptr %10, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.Mesh, ptr %230, i32 0, i32 7
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %231, ptr noundef nonnull align 8 dereferenceable(48) %21)
          to label %232 unwind label %144

232:                                              ; preds = %229
  call void @_ZN6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %15) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %15) #8
  ret void

233:                                              ; preds = %221, %144
  call void @_ZN6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %234

234:                                              ; preds = %233, %113, %77
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %15) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr %15) #8
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %16, align 8
  %237 = load i32, ptr %17, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) #5 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4AttrSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(16)) #5 align 2

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

; 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) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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 = { 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 #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 = { 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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { 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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !26, i64 96}
!14 = !{!"_ZTS4Mesh", !15, i64 0, !16, i64 8, !20, i64 32, !6, i64 56, !6, i64 64, !24, i64 72, !26, i64 96, !27, i64 104, !31, i64 128, !12, i64 152, !7, i64 160, !25, i64 176, !35, i64 184, !39, i64 208, !43, i64 232}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIP10cgltf_nodeSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIP10cgltf_nodeSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorI9TransformSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseI9TransformSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTS12cgltf_extras", !25, i64 0, !25, i64 8, !6, i64 16}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTS20cgltf_primitive_type", !7, i64 0}
!27 = !{!"_ZTSSt6vectorI6StreamSaIS0_EE", !28, i64 0}
!28 = !{!"_ZTSSt12_Vector_baseI6StreamSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE12_Vector_implE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!31 = !{!"_ZTSSt6vectorIjSaIjEE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTSSt6vectorIfSaIfEE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSSt6vectorI22cgltf_material_mappingSaIS0_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = !{!14, !6, i64 64}
!50 = !{!25, !25, i64 0}
!51 = !{!52, !15, i64 8}
!52 = !{!"_ZTS6Stream", !53, i64 0, !15, i64 4, !15, i64 8, !6, i64 16, !54, i64 24}
!53 = !{!"_ZTS20cgltf_attribute_type", !7, i64 0}
!54 = !{!"_ZTSSt6vectorI4AttrSaIS0_EE", !55, i64 0}
!55 = !{!"_ZTSSt12_Vector_baseI4AttrSaIS0_EE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE12_Vector_implE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!58 = !{!52, !53, i64 0}
!59 = distinct !{!59, !60}
!60 = !{!"llvm.loop.mustprogress"}
!61 = !{!52, !15, i64 4}
!62 = !{!52, !6, i64 16}
!63 = !{!15, !15, i64 0}
!64 = !{i64 0, i64 16, !65}
!65 = !{!7, !7, i64 0}
!66 = distinct !{!66, !60}
!67 = distinct !{!67, !60}


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

%struct.Attr = type { [4 x float] }
%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.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 }

@.str.1 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._Z13debugSimplifyRK4MeshRS_S2_ffbb = external hidden unnamed_addr constant [75 x i8], align 1
@_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette = external hidden constant [5 x %struct.Attr], align 16

; 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 i64 @_ZNKSt6vectorI6StreamSaIS0_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(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 i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; 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 #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13debugSimplifyRK4MeshRS_S2_ffbb(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull align 8 dereferenceable(256) %2, float noundef %3, float noundef %4, i1 noundef zeroext %5, i1 noundef zeroext %6) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %8 = alloca %struct.Mesh, align 8
  %9 = alloca %struct.Stream, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %8) #8
  call void @_ZN4MeshC2ERKS_(ptr noundef nonnull align 8 dereferenceable(256) %8, ptr noundef nonnull align 8 dereferenceable(256) %0)
  %13 = getelementptr inbounds i8, ptr %8, i64 96
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %15 = icmp eq i32 %14, 5
  br i1 %15, label %17, label %16

16:                                               ; preds = %7
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 1129, ptr noundef nonnull @__PRETTY_FUNCTION__._Z13debugSimplifyRK4MeshRS_S2_ffbb) #9
  unreachable

17:                                               ; preds = %7
  invoke void @_ZL11filterBonesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %8)
          to label %18 unwind label %45

18:                                               ; preds = %17
  invoke void @_ZL11reindexMeshR4Meshb(ptr noundef nonnull align 8 dereferenceable(256) %8, i1 noundef zeroext %6)
          to label %19 unwind label %45

19:                                               ; preds = %18
  invoke void @_ZL15filterTrianglesR4Mesh(ptr noundef nonnull align 8 dereferenceable(256) %8)
          to label %20 unwind label %45

20:                                               ; preds = %19
  invoke void @_ZL12simplifyMeshR4Meshffbbbb(ptr noundef nonnull align 8 dereferenceable(256) %8, float noundef %3, float noundef %4, i1 noundef zeroext %5, i1 noundef zeroext false, i1 noundef zeroext false, i1 noundef zeroext true)
          to label %21 unwind label %45

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %8, i64 8
  %23 = getelementptr inbounds i8, ptr %1, i64 8
  %24 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP10cgltf_nodeSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %25 unwind label %45

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %8, i64 64
  %27 = load ptr, ptr %26, align 8, !tbaa !43
  %28 = getelementptr inbounds i8, ptr %1, i64 64
  store ptr %27, ptr %28, align 8, !tbaa !43
  %29 = getelementptr inbounds i8, ptr %2, i64 8
  %30 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIP10cgltf_nodeSaIS1_EEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %31 unwind label %45

31:                                               ; preds = %25
  %32 = load ptr, ptr %26, align 8, !tbaa !43
  %33 = getelementptr inbounds i8, ptr %2, i64 64
  store ptr %32, ptr %33, align 8, !tbaa !43
  %34 = getelementptr inbounds i8, ptr %8, i64 104
  %35 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #8
  %.not64 = icmp eq i64 %35, 0
  br i1 %.not64, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %31
  %36 = getelementptr inbounds i8, ptr %1, i64 104
  %37 = getelementptr inbounds i8, ptr %2, i64 104
  br label %47

._crit_edge:                                      ; preds = %58, %31
  %38 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef 0) #8
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #8
  store i32 5, ptr %9, align 8, !tbaa !44
  %41 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 0, ptr %41, align 4, !tbaa !51
  %42 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 0, ptr %42, align 8, !tbaa !52
  %43 = getelementptr inbounds i8, ptr %9, i64 16
  %44 = getelementptr inbounds i8, ptr %9, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %43, i8 0, i64 32, i1 false)
  call void @_ZNSt6vectorI4AttrSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %44) #8
  invoke void @_ZNSt6vectorI4AttrSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %40, ptr noundef nonnull align 4 dereferenceable(16) @_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette)
          to label %62 unwind label %77

45:                                               ; preds = %25, %21, %20, %19, %18, %17
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %147

47:                                               ; preds = %.lr.ph, %58
  %.04960 = phi i64 [ 0, %.lr.ph ], [ %59, %58 ]
  %48 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef %.04960) #8
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = load i32, ptr %49, align 8, !tbaa !52
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %58

52:                                               ; preds = %47
  %53 = load i32, ptr %48, align 8, !tbaa !44
  switch i32 %53, label %58 [
    i32 1, label %54
    i32 6, label %54
    i32 7, label %54
  ]

54:                                               ; preds = %52, %52, %52
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(48) %48)
          to label %55 unwind label %56

55:                                               ; preds = %54
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(48) %48)
          to label %58 unwind label %56

56:                                               ; preds = %55, %54
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %147

58:                                               ; preds = %52, %55, %47
  %59 = add nuw i64 %.04960, 1
  %60 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #8
  %61 = icmp ult i64 %59, %60
  br i1 %61, label %47, label %._crit_edge, !llvm.loop !53

62:                                               ; preds = %._crit_edge
  %63 = getelementptr inbounds i8, ptr %1, i64 96
  store i32 1, ptr %63, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %2, i64 96
  store i32 2, ptr %64, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %8, i64 128
  %66 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #8
  %.not65 = icmp eq i64 %66, 0
  br i1 %.not65, label %._crit_edge63, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %62
  %67 = getelementptr inbounds i8, ptr %1, i64 128
  %68 = getelementptr inbounds i8, ptr %2, i64 128
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %139
  %.05062 = phi i64 [ 0, %.preheader.lr.ph ], [ %140, %139 ]
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %.05062) #8
  %70 = load i32, ptr %69, align 4, !tbaa !55
  %71 = add nuw i64 %.05062, 1
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %71) #8
  %73 = load i32, ptr %72, align 4, !tbaa !55
  %74 = lshr i32 %70, 28
  %75 = and i32 %74, 7
  %.not = icmp eq i32 %75, 0
  br i1 %.not, label %88, label %79

._crit_edge63:                                    ; preds = %139, %62
  %76 = getelementptr inbounds i8, ptr %1, i64 104
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %143 unwind label %77

77:                                               ; preds = %143, %._crit_edge63, %._crit_edge
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %146

79:                                               ; preds = %.preheader
  %80 = zext nneg i32 %75 to i64
  %81 = getelementptr inbounds [5 x %struct.Attr], ptr @_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette, i64 0, i64 %80
  %82 = and i32 %70, 268435455
  %83 = zext nneg i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %83) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %84, ptr noundef nonnull align 16 dereferenceable(16) %81, i64 16, i1 false), !tbaa.struct !56
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 %82, ptr %10, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %67, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %85 unwind label %86

85:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %88

86:                                               ; preds = %126, %106, %79
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %146

88:                                               ; preds = %85, %.preheader
  %.not54 = icmp sgt i32 %70, -1
  br i1 %.not54, label %98, label %89

89:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %90 = and i32 %70, 268435455
  store i32 %90, ptr %11, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %91 unwind label %94

91:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %92 = and i32 %73, 268435455
  store i32 %92, ptr %12, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %93 unwind label %96

93:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br label %98

94:                                               ; preds = %134, %114, %89
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  br label %146

96:                                               ; preds = %136, %116, %91
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br label %146

98:                                               ; preds = %93, %88
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %71) #8
  %100 = load i32, ptr %99, align 4, !tbaa !55
  %101 = add i64 %.05062, 2
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %101) #8
  %103 = load i32, ptr %102, align 4, !tbaa !55
  %104 = lshr i32 %100, 28
  %105 = and i32 %104, 7
  %.not.1 = icmp eq i32 %105, 0
  br i1 %.not.1, label %113, label %106

106:                                              ; preds = %98
  %107 = zext nneg i32 %105 to i64
  %108 = getelementptr inbounds [5 x %struct.Attr], ptr @_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette, i64 0, i64 %107
  %109 = and i32 %100, 268435455
  %110 = zext nneg i32 %109 to i64
  %111 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %110) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %111, ptr noundef nonnull align 16 dereferenceable(16) %108, i64 16, i1 false), !tbaa.struct !56
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 %109, ptr %10, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %67, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %112 unwind label %86

112:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %113

113:                                              ; preds = %112, %98
  %.not54.1 = icmp sgt i32 %100, -1
  br i1 %.not54.1, label %119, label %114

114:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %115 = and i32 %100, 268435455
  store i32 %115, ptr %11, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %116 unwind label %94

116:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %117 = and i32 %103, 268435455
  store i32 %117, ptr %12, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %118 unwind label %96

118:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br label %119

119:                                              ; preds = %118, %113
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %101) #8
  %121 = load i32, ptr %120, align 4, !tbaa !55
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %.05062) #8
  %123 = load i32, ptr %122, align 4, !tbaa !55
  %124 = lshr i32 %121, 28
  %125 = and i32 %124, 7
  %.not.2 = icmp eq i32 %125, 0
  br i1 %.not.2, label %133, label %126

126:                                              ; preds = %119
  %127 = zext nneg i32 %125 to i64
  %128 = getelementptr inbounds [5 x %struct.Attr], ptr @_ZZ13debugSimplifyRK4MeshRS_S2_ffbbE8kPalette, i64 0, i64 %127
  %129 = and i32 %121, 268435455
  %130 = zext nneg i32 %129 to i64
  %131 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %130) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %131, ptr noundef nonnull align 16 dereferenceable(16) %128, i64 16, i1 false), !tbaa.struct !56
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #8
  store i32 %129, ptr %10, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %67, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %132 unwind label %86

132:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #8
  br label %133

133:                                              ; preds = %132, %119
  %.not54.2 = icmp sgt i32 %121, -1
  br i1 %.not54.2, label %139, label %134

134:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %135 = and i32 %121, 268435455
  store i32 %135, ptr %11, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %136 unwind label %94

136:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %137 = and i32 %123, 268435455
  store i32 %137, ptr %12, align 4, !tbaa !55
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %68, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %138 unwind label %96

138:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  br label %139

139:                                              ; preds = %138, %133
  %140 = add i64 %.05062, 3
  %141 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #8
  %142 = icmp ult i64 %140, %141
  br i1 %142, label %.preheader, label %._crit_edge63, !llvm.loop !58

143:                                              ; preds = %._crit_edge63
  %144 = getelementptr inbounds i8, ptr %2, i64 104
  invoke void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %144, ptr noundef nonnull align 8 dereferenceable(48) %9)
          to label %145 unwind label %77

145:                                              ; preds = %143
  call void @_ZN6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #8
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %8) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #8
  ret void

146:                                              ; preds = %86, %94, %96, %77
  %.pn.pn = phi { ptr, i32 } [ %78, %77 ], [ %97, %96 ], [ %95, %94 ], [ %87, %86 ]
  call void @_ZN6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #8
  br label %147

147:                                              ; preds = %146, %56, %45
  %.pn57 = phi { ptr, i32 } [ %57, %56 ], [ %.pn.pn, %146 ], [ %46, %45 ]
  call void @_ZN4MeshD2Ev(ptr noundef nonnull align 8 dereferenceable(256) %8) #8
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %8) #8
  resume { ptr, i32 } %.pn57
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6StreamSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI4AttrSaIS0_EE6resizeEmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress 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) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6StreamD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 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 = { 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 #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 = { 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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { 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 = !{!6, !14, i64 64}
!44 = !{!45, !46, i64 0}
!45 = !{!"_ZTS6Stream", !46, i64 0, !7, i64 4, !7, i64 8, !14, i64 16, !47, i64 24}
!46 = !{!"_ZTS20cgltf_attribute_type", !8, i64 0}
!47 = !{!"_ZTSSt6vectorI4AttrSaIS0_EE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseI4AttrSaIS0_EE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!51 = !{!45, !7, i64 4}
!52 = !{!45, !7, i64 8}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}
!55 = !{!7, !7, i64 0}
!56 = !{i64 0, i64 16, !57}
!57 = !{!8, !8, i64 0}
!58 = distinct !{!58, !54}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass