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

; 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] }
%"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 }
%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" }
%struct.MaterialInfo = type { i8, i8, i8, i8, i32, i32 }

; 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13filterStreamsR4MeshRK12MaterialInfo(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr noundef nonnull align 4 dereferenceable(12) %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.Attr, align 4
  %11 = alloca %struct.Attr, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %struct.Attr, align 4
  %17 = alloca %"class.std::vector.30", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 -1, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !13
  br label %20

20:                                               ; preds = %105, %2
  %21 = load i64, ptr %8, align 8, !tbaa !13
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.Mesh, ptr %22, i32 0, i32 7
  %24 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %25 = icmp ult i64 %21, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %108

27:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.Mesh, ptr %28, i32 0, i32 7
  %30 = load i64, ptr %8, align 8, !tbaa !13
  %31 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %30) #5
  store ptr %31, ptr %9, align 8, !tbaa !5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.Stream, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 8, !tbaa !15
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %79

36:                                               ; preds = %27
  %37 = load i8, ptr %5, align 1, !tbaa !9, !range !22, !noundef !23
  %38 = trunc i8 %37 to i1
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  br i1 %38, label %55, label %39

39:                                               ; preds = %36
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.Stream, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !24
  %43 = icmp eq i32 %42, 2
  br i1 %43, label %44, label %53

44:                                               ; preds = %39
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.Stream, ptr %45, i32 0, i32 4
  %47 = getelementptr inbounds %struct.Attr, ptr %10, i32 0, i32 0
  store float 0.000000e+00, ptr %47, align 4, !tbaa !25
  %48 = getelementptr inbounds float, ptr %47, i64 1
  store float 0.000000e+00, ptr %48, align 4, !tbaa !25
  %49 = getelementptr inbounds float, ptr %47, i64 2
  store float 0.000000e+00, ptr %49, align 4, !tbaa !25
  %50 = getelementptr inbounds float, ptr %47, i64 3
  store float 0.000000e+00, ptr %50, align 4, !tbaa !25
  %51 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 4 dereferenceable(16) %10, float noundef 0x3F847AE140000000)
  %52 = xor i1 %51, true
  br label %53

53:                                               ; preds = %44, %39
  %54 = phi i1 [ false, %39 ], [ %52, %44 ]
  br label %55

55:                                               ; preds = %53, %36
  %56 = phi i1 [ true, %36 ], [ %54, %53 ]
  %57 = zext i1 %56 to i8
  store i8 %57, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  %58 = load i8, ptr %6, align 1, !tbaa !9, !range !22, !noundef !23
  %59 = trunc i8 %58 to i1
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  br i1 %59, label %76, label %60

60:                                               ; preds = %55
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.Stream, ptr %61, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !24
  %64 = icmp eq i32 %63, 3
  br i1 %64, label %65, label %74

65:                                               ; preds = %60
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.Stream, ptr %66, i32 0, i32 4
  %68 = getelementptr inbounds %struct.Attr, ptr %11, i32 0, i32 0
  store float 0.000000e+00, ptr %68, align 4, !tbaa !25
  %69 = getelementptr inbounds float, ptr %68, i64 1
  store float 0.000000e+00, ptr %69, align 4, !tbaa !25
  %70 = getelementptr inbounds float, ptr %68, i64 2
  store float 0.000000e+00, ptr %70, align 4, !tbaa !25
  %71 = getelementptr inbounds float, ptr %68, i64 3
  store float 0.000000e+00, ptr %71, align 4, !tbaa !25
  %72 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %67, ptr noundef nonnull align 4 dereferenceable(16) %11, float noundef 0x3F847AE140000000)
  %73 = xor i1 %72, true
  br label %74

74:                                               ; preds = %65, %60
  %75 = phi i1 [ false, %60 ], [ %73, %65 ]
  br label %76

76:                                               ; preds = %74, %55
  %77 = phi i1 [ true, %55 ], [ %75, %74 ]
  %78 = zext i1 %77 to i8
  store i8 %78, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %79

79:                                               ; preds = %76, %27
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.Stream, ptr %80, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !24
  %83 = icmp eq i32 %82, 4
  br i1 %83, label %84, label %104

84:                                               ; preds = %79
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.Stream, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !27
  %88 = icmp slt i32 %87, 32
  br i1 %88, label %89, label %104

89:                                               ; preds = %84
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.MaterialInfo, ptr %90, i32 0, i32 4
  %92 = load i32, ptr %91, align 4, !tbaa !28
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.Stream, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !27
  %96 = shl i32 1, %95
  %97 = and i32 %92, %96
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %104

99:                                               ; preds = %89
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.Stream, ptr %100, i32 0, i32 1
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %101)
  %103 = load i32, ptr %102, align 4, !tbaa !11
  store i32 %103, ptr %7, align 4, !tbaa !11
  br label %104

104:                                              ; preds = %99, %89, %84, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %105

105:                                              ; preds = %104
  %106 = load i64, ptr %8, align 8, !tbaa !13
  %107 = add i64 %106, 1
  store i64 %107, ptr %8, align 8, !tbaa !13
  br label %20, !llvm.loop !30

108:                                              ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !13
  br label %109

109:                                              ; preds = %256, %108
  %110 = load i64, ptr %13, align 8, !tbaa !13
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.Mesh, ptr %111, i32 0, i32 7
  %113 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #5
  %114 = icmp ult i64 %110, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %109
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %263

116:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.Mesh, ptr %117, i32 0, i32 7
  %119 = load i64, ptr %13, align 8, !tbaa !13
  %120 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %119) #5
  store ptr %120, ptr %15, align 8, !tbaa !5
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.Stream, ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 8, !tbaa !24
  %124 = icmp eq i32 %123, 4
  br i1 %124, label %125, label %132

125:                                              ; preds = %116
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.Stream, ptr %126, i32 0, i32 1
  %128 = load i32, ptr %127, align 4, !tbaa !27
  %129 = load i32, ptr %7, align 4, !tbaa !11
  %130 = icmp sgt i32 %128, %129
  br i1 %130, label %131, label %132

131:                                              ; preds = %125
  store i32 7, ptr %14, align 4
  br label %253

132:                                              ; preds = %125, %116
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.Stream, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !24
  %136 = icmp eq i32 %135, 2
  br i1 %136, label %137, label %143

137:                                              ; preds = %132
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.MaterialInfo, ptr %138, i32 0, i32 3
  %140 = load i8, ptr %139, align 1, !tbaa !32, !range !22, !noundef !23
  %141 = trunc i8 %140 to i1
  br i1 %141, label %142, label %143

142:                                              ; preds = %137
  store i32 7, ptr %14, align 4
  br label %253

143:                                              ; preds = %137, %132
  %144 = load ptr, ptr %15, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.Stream, ptr %144, i32 0, i32 0
  %146 = load i32, ptr %145, align 8, !tbaa !24
  %147 = icmp eq i32 %146, 3
  br i1 %147, label %148, label %154

148:                                              ; preds = %143
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.MaterialInfo, ptr %149, i32 0, i32 2
  %151 = load i8, ptr %150, align 2, !tbaa !33, !range !22, !noundef !23
  %152 = trunc i8 %151 to i1
  br i1 %152, label %154, label %153

153:                                              ; preds = %148
  store i32 7, ptr %14, align 4
  br label %253

154:                                              ; preds = %148, %143
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.Stream, ptr %155, i32 0, i32 0
  %157 = load i32, ptr %156, align 8, !tbaa !24
  %158 = icmp eq i32 %157, 6
  br i1 %158, label %164, label %159

159:                                              ; preds = %154
  %160 = load ptr, ptr %15, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.Stream, ptr %160, i32 0, i32 0
  %162 = load i32, ptr %161, align 8, !tbaa !24
  %163 = icmp eq i32 %162, 7
  br i1 %163, label %164, label %170

164:                                              ; preds = %159, %154
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.Mesh, ptr %165, i32 0, i32 4
  %167 = load ptr, ptr %166, align 8, !tbaa !34
  %168 = icmp ne ptr %167, null
  br i1 %168, label %170, label %169

169:                                              ; preds = %164
  store i32 7, ptr %14, align 4
  br label %253

170:                                              ; preds = %164, %159
  %171 = load ptr, ptr %15, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.Stream, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 8, !tbaa !24
  %174 = icmp eq i32 %173, 5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  br i1 %174, label %175, label %183

175:                                              ; preds = %170
  %176 = load ptr, ptr %15, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.Stream, ptr %176, i32 0, i32 4
  %178 = getelementptr inbounds %struct.Attr, ptr %16, i32 0, i32 0
  store float 1.000000e+00, ptr %178, align 4, !tbaa !25
  %179 = getelementptr inbounds float, ptr %178, i64 1
  store float 1.000000e+00, ptr %179, align 4, !tbaa !25
  %180 = getelementptr inbounds float, ptr %178, i64 2
  store float 1.000000e+00, ptr %180, align 4, !tbaa !25
  %181 = getelementptr inbounds float, ptr %178, i64 3
  store float 1.000000e+00, ptr %181, align 4, !tbaa !25
  %182 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %177, ptr noundef nonnull align 4 dereferenceable(16) %16, float noundef 0x3F847AE140000000)
  br label %183

183:                                              ; preds = %175, %170
  %184 = phi i1 [ false, %170 ], [ %182, %175 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br i1 %184, label %185, label %186

185:                                              ; preds = %183
  store i32 7, ptr %14, align 4
  br label %253

186:                                              ; preds = %183
  %187 = load ptr, ptr %15, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.Stream, ptr %187, i32 0, i32 2
  %189 = load i32, ptr %188, align 8, !tbaa !15
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %200

191:                                              ; preds = %186
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.Stream, ptr %192, i32 0, i32 0
  %194 = load i32, ptr %193, align 8, !tbaa !24
  %195 = icmp eq i32 %194, 2
  br i1 %195, label %196, label %200

196:                                              ; preds = %191
  %197 = load i8, ptr %5, align 1, !tbaa !9, !range !22, !noundef !23
  %198 = trunc i8 %197 to i1
  br i1 %198, label %200, label %199

199:                                              ; preds = %196
  store i32 7, ptr %14, align 4
  br label %253

200:                                              ; preds = %196, %191, %186
  %201 = load ptr, ptr %15, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.Stream, ptr %201, i32 0, i32 2
  %203 = load i32, ptr %202, align 8, !tbaa !15
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %205, label %214

205:                                              ; preds = %200
  %206 = load ptr, ptr %15, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.Stream, ptr %206, i32 0, i32 0
  %208 = load i32, ptr %207, align 8, !tbaa !24
  %209 = icmp eq i32 %208, 3
  br i1 %209, label %210, label %214

210:                                              ; preds = %205
  %211 = load i8, ptr %6, align 1, !tbaa !9, !range !22, !noundef !23
  %212 = trunc i8 %211 to i1
  br i1 %212, label %214, label %213

213:                                              ; preds = %210
  store i32 7, ptr %14, align 4
  br label %253

214:                                              ; preds = %210, %205, %200
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.Mesh, ptr %215, i32 0, i32 6
  %217 = load i32, ptr %216, align 8, !tbaa !66
  %218 = icmp eq i32 %217, 1
  br i1 %218, label %219, label %236

219:                                              ; preds = %214
  %220 = load ptr, ptr %15, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.Stream, ptr %220, i32 0, i32 0
  %222 = load i32, ptr %221, align 8, !tbaa !24
  %223 = icmp eq i32 %222, 2
  br i1 %223, label %224, label %236

224:                                              ; preds = %219
  %225 = load ptr, ptr %15, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.Stream, ptr %225, i32 0, i32 4
  %227 = call noundef zeroext i1 @_ZNKSt6vectorI4AttrSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %226) #5
  br i1 %227, label %236, label %228

228:                                              ; preds = %224
  %229 = load ptr, ptr %15, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.Stream, ptr %229, i32 0, i32 4
  %231 = load ptr, ptr %15, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.Stream, ptr %231, i32 0, i32 4
  %233 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %232, i64 noundef 0) #5
  %234 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %230, ptr noundef nonnull align 4 dereferenceable(16) %233, float noundef 0x3F847AE140000000)
  br i1 %234, label %235, label %236

235:                                              ; preds = %228
  store i32 7, ptr %14, align 4
  br label %253

236:                                              ; preds = %228, %224, %219, %214
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  call void @_ZNSt6vectorI4AttrSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %237 = load ptr, ptr %15, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.Stream, ptr %237, i32 0, i32 4
  call void @_ZNSt6vectorI4AttrSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %238) #5
  %239 = load ptr, ptr %15, align 8, !tbaa !5
  %240 = load ptr, ptr %3, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.Mesh, ptr %240, i32 0, i32 7
  %242 = load i64, ptr %12, align 8, !tbaa !13
  %243 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %241, i64 noundef %242) #5
  %244 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN6StreamaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %243, ptr noundef nonnull align 8 dereferenceable(48) %239)
          to label %245 unwind label %259

245:                                              ; preds = %236
  %246 = load ptr, ptr %3, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.Mesh, ptr %246, i32 0, i32 7
  %248 = load i64, ptr %12, align 8, !tbaa !13
  %249 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %247, i64 noundef %248) #5
  %250 = getelementptr inbounds %struct.Stream, ptr %249, i32 0, i32 4
  call void @_ZNSt6vectorI4AttrSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %250, ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %251 = load i64, ptr %12, align 8, !tbaa !13
  %252 = add i64 %251, 1
  store i64 %252, ptr %12, align 8, !tbaa !13
  call void @_ZNSt6vectorI4AttrSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  store i32 0, ptr %14, align 4
  br label %253

253:                                              ; preds = %245, %235, %213, %199, %185, %169, %153, %142, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %254 = load i32, ptr %14, align 4
  switch i32 %254, label %272 [
    i32 0, label %255
    i32 7, label %256
  ]

255:                                              ; preds = %253
  br label %256

256:                                              ; preds = %255, %253
  %257 = load i64, ptr %13, align 8, !tbaa !13
  %258 = add i64 %257, 1
  store i64 %258, ptr %13, align 8, !tbaa !13
  br label %109, !llvm.loop !67

259:                                              ; preds = %236
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %18, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %19, align 4
  call void @_ZNSt6vectorI4AttrSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %267

263:                                              ; preds = %115
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.Mesh, ptr %264, i32 0, i32 7
  %266 = load i64, ptr %12, align 8, !tbaa !13
  call void @_ZNSt6vectorI6StreamSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %265, i64 noundef %266)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  ret void

267:                                              ; preds = %259
  %268 = load ptr, ptr %18, align 8
  %269 = load i32, ptr %19, align 4
  %270 = insertvalue { ptr, i32 } poison, ptr %268, 0
  %271 = insertvalue { ptr, i32 } %270, i32 %269, 1
  resume { ptr, i32 } %271

272:                                              ; preds = %253
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16), float noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorI4AttrSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN6StreamaSERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !12, i64 8}
!16 = !{!"_ZTS6Stream", !17, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !18, i64 24}
!17 = !{!"_ZTS20cgltf_attribute_type", !7, i64 0}
!18 = !{!"_ZTSSt6vectorI4AttrSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI4AttrSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!16, !17, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = !{!16, !12, i64 4}
!28 = !{!29, !12, i64 4}
!29 = !{!"_ZTS12MaterialInfo", !10, i64 0, !10, i64 1, !10, i64 2, !10, i64 3, !12, i64 4, !12, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!29, !10, i64 3}
!33 = !{!29, !10, i64 2}
!34 = !{!35, !6, i64 64}
!35 = !{!"_ZTS4Mesh", !12, i64 0, !36, i64 8, !40, i64 32, !6, i64 56, !6, i64 64, !44, i64 72, !45, i64 96, !46, i64 104, !50, i64 128, !10, i64 152, !7, i64 160, !14, i64 176, !54, i64 184, !58, i64 208, !62, i64 232}
!36 = !{!"_ZTSSt6vectorIP10cgltf_nodeSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIP10cgltf_nodeSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = !{!"_ZTSSt6vectorI9TransformSaIS0_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseI9TransformSaIS0_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!44 = !{!"_ZTS12cgltf_extras", !14, i64 0, !14, i64 8, !6, i64 16}
!45 = !{!"_ZTS20cgltf_primitive_type", !7, i64 0}
!46 = !{!"_ZTSSt6vectorI6StreamSaIS0_EE", !47, i64 0}
!47 = !{!"_ZTSSt12_Vector_baseI6StreamSaIS0_EE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE12_Vector_implE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!50 = !{!"_ZTSSt6vectorIjSaIjEE", !51, i64 0}
!51 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!"_ZTSSt6vectorIfSaIfEE", !55, i64 0}
!55 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!58 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !59, i64 0}
!59 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !61, i64 0}
!61 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!62 = !{!"_ZTSSt6vectorI22cgltf_material_mappingSaIS0_EE", !63, i64 0}
!63 = !{!"_ZTSSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE", !64, i64 0}
!64 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE12_Vector_implE", !65, i64 0}
!65 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!66 = !{!35, !45, i64 96}
!67 = distinct !{!67, !31}


; 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] }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl" }
%"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl" = type { %"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Attr, std::allocator<Attr>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13filterStreamsR4MeshRK12MaterialInfo(ptr noundef nonnull align 8 dereferenceable(256) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(12) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %struct.Attr, align 4
  %5 = alloca %struct.Attr, align 4
  %6 = alloca %struct.Attr, align 16
  %7 = alloca %"class.std::vector.30", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  store i32 -1, ptr %3, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 104
  %9 = tail call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %.not96 = icmp eq i64 %9, 0
  br i1 %.not96, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %10 = getelementptr inbounds i8, ptr %1, i64 4
  br label %18

.preheader.loopexit:                              ; preds = %59
  %11 = trunc nuw i8 %.155 to i1
  %12 = trunc nuw i8 %.1 to i1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %2
  %.054.lcssa = phi i1 [ false, %2 ], [ %11, %.preheader.loopexit ]
  %.0.lcssa = phi i1 [ false, %2 ], [ %12, %.preheader.loopexit ]
  %13 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %.not97 = icmp eq i64 %13, 0
  br i1 %.not97, label %._crit_edge, label %.lr.ph94

.lr.ph94:                                         ; preds = %.preheader
  %14 = getelementptr inbounds i8, ptr %1, i64 2
  %15 = getelementptr inbounds i8, ptr %1, i64 3
  %16 = getelementptr inbounds i8, ptr %0, i64 64
  %17 = getelementptr inbounds i8, ptr %0, i64 96
  br label %63

18:                                               ; preds = %.lr.ph, %59
  %.088 = phi i8 [ 0, %.lr.ph ], [ %.1, %59 ]
  %.05487 = phi i8 [ 0, %.lr.ph ], [ %.155, %59 ]
  %.05686 = phi i64 [ 0, %.lr.ph ], [ %60, %59 ]
  %19 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.05686) #6
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %.not64 = icmp eq i32 %21, 0
  br i1 %.not64, label %45, label %22

22:                                               ; preds = %18
  %23 = trunc nuw i8 %.088 to i1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  br i1 %23, label %31, label %24

24:                                               ; preds = %22
  %25 = load i32, ptr %19, align 8, !tbaa !17
  %26 = icmp eq i32 %25, 2
  br i1 %26, label %27, label %31

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %19, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  %29 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(16) %4, float noundef 0x3F847AE140000000)
  %30 = xor i1 %29, true
  br label %31

31:                                               ; preds = %24, %27, %22
  %32 = phi i1 [ true, %22 ], [ false, %24 ], [ %30, %27 ]
  %33 = zext i1 %32 to i8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  %34 = trunc nuw i8 %.05487 to i1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  br i1 %34, label %42, label %35

35:                                               ; preds = %31
  %36 = load i32, ptr %19, align 8, !tbaa !17
  %37 = icmp eq i32 %36, 3
  br i1 %37, label %38, label %42

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %19, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  %40 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %39, ptr noundef nonnull align 4 dereferenceable(16) %5, float noundef 0x3F847AE140000000)
  %41 = xor i1 %40, true
  br label %42

42:                                               ; preds = %35, %38, %31
  %43 = phi i1 [ true, %31 ], [ false, %35 ], [ %41, %38 ]
  %44 = zext i1 %43 to i8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  br label %45

45:                                               ; preds = %42, %18
  %.155 = phi i8 [ %44, %42 ], [ %.05487, %18 ]
  %.1 = phi i8 [ %33, %42 ], [ %.088, %18 ]
  %46 = load i32, ptr %19, align 8, !tbaa !17
  %47 = icmp eq i32 %46, 4
  br i1 %47, label %48, label %59

48:                                               ; preds = %45
  %49 = getelementptr inbounds i8, ptr %19, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !18
  %51 = icmp slt i32 %50, 32
  br i1 %51, label %52, label %59

52:                                               ; preds = %48
  %53 = load i32, ptr %10, align 4, !tbaa !19
  %54 = shl nuw i32 1, %50
  %55 = and i32 %53, %54
  %.not65 = icmp eq i32 %55, 0
  br i1 %.not65, label %59, label %56

56:                                               ; preds = %52
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %49)
  %58 = load i32, ptr %57, align 4, !tbaa !5
  store i32 %58, ptr %3, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %56, %52, %48, %45
  %60 = add nuw i64 %.05686, 1
  %61 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %18, label %.preheader.loopexit, !llvm.loop !22

._crit_edge:                                      ; preds = %109, %.preheader
  %.058.lcssa = phi i64 [ 0, %.preheader ], [ %.159, %109 ]
  call void @_ZNSt6vectorI6StreamSaIS0_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.058.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret void

63:                                               ; preds = %.lr.ph94, %109
  %.05793 = phi i64 [ 0, %.lr.ph94 ], [ %110, %109 ]
  %.05891 = phi i64 [ 0, %.lr.ph94 ], [ %.159, %109 ]
  %64 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.05793) #6
  %65 = load i32, ptr %64, align 8
  switch i32 %65, label %77 [
    i32 4, label %66
    i32 2, label %71
    i32 3, label %74
  ]

66:                                               ; preds = %63
  %67 = getelementptr inbounds i8, ptr %64, i64 4
  %68 = load i32, ptr %67, align 4, !tbaa !18
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = icmp sgt i32 %68, %69
  br i1 %70, label %109, label %.thread80

71:                                               ; preds = %63
  %72 = load i8, ptr %15, align 1, !tbaa !24, !range !25, !noundef !26
  %73 = trunc nuw i8 %72 to i1
  br i1 %73, label %109, label %.thread80

74:                                               ; preds = %63
  %75 = load i8, ptr %14, align 2, !tbaa !27, !range !25, !noundef !26
  %76 = trunc nuw i8 %75 to i1
  br i1 %76, label %.thread80, label %109

.thread80:                                        ; preds = %66, %71, %74
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  br label %.critedge

77:                                               ; preds = %63
  %78 = and i32 %65, -2
  %switch = icmp eq i32 %78, 6
  %79 = load ptr, ptr %16, align 8
  %.not = icmp eq ptr %79, null
  %or.cond72 = select i1 %switch, i1 %.not, i1 false
  br i1 %or.cond72, label %109, label %80

80:                                               ; preds = %77
  %81 = icmp eq i32 %65, 5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  br i1 %81, label %82, label %.critedge

82:                                               ; preds = %80
  %83 = getelementptr inbounds i8, ptr %64, i64 24
  store <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, ptr %6, align 16, !tbaa !28
  %84 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %83, ptr noundef nonnull align 4 dereferenceable(16) %6, float noundef 0x3F847AE140000000)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br i1 %84, label %109, label %._crit_edge98

._crit_edge98:                                    ; preds = %82
  %.pre = load i32, ptr %64, align 8
  br label %85

.critedge:                                        ; preds = %.thread80, %80
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %85

85:                                               ; preds = %._crit_edge98, %.critedge
  %86 = phi i32 [ %.pre, %._crit_edge98 ], [ %65, %.critedge ]
  %87 = getelementptr inbounds i8, ptr %64, i64 8
  %88 = load i32, ptr %87, align 8, !tbaa !9
  %.not62 = icmp ne i32 %88, 0
  %89 = icmp eq i32 %86, 2
  %or.cond = select i1 %.not62, i1 %89, i1 false
  br i1 %or.cond, label %90, label %91

90:                                               ; preds = %85
  br i1 %.0.lcssa, label %.thread81, label %109

91:                                               ; preds = %85
  %92 = icmp eq i32 %86, 3
  %or.cond68 = select i1 %.not62, i1 %92, i1 false
  br i1 %or.cond68, label %93, label %.thread81

93:                                               ; preds = %91
  br i1 %.054.lcssa, label %.thread83, label %109

.thread81:                                        ; preds = %90, %91
  %94 = load i32, ptr %17, align 8, !tbaa !30
  %95 = icmp eq i32 %94, 1
  %or.cond70 = select i1 %95, i1 %89, i1 false
  br i1 %or.cond70, label %96, label %.thread83

96:                                               ; preds = %.thread81
  %97 = getelementptr inbounds i8, ptr %64, i64 24
  %98 = call noundef zeroext i1 @_ZNKSt6vectorI4AttrSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %97) #6
  br i1 %98, label %.thread83, label %99

99:                                               ; preds = %96
  %100 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef 0) #6
  %101 = call noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24) %97, ptr noundef nonnull align 4 dereferenceable(16) %100, float noundef 0x3F847AE140000000)
  br i1 %101, label %109, label %.thread83

.thread83:                                        ; preds = %93, %99, %96, %.thread81
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorI4AttrSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %102 = getelementptr inbounds i8, ptr %64, i64 24
  call void @_ZNSt6vectorI4AttrSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %102) #6
  %103 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.05891) #6
  %104 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZN6StreamaSERKS_(ptr noundef nonnull align 8 dereferenceable(48) %103, ptr noundef nonnull align 8 dereferenceable(48) %64)
          to label %105 unwind label %113

105:                                              ; preds = %.thread83
  %106 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorI6StreamSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %.05891) #6
  %107 = getelementptr inbounds i8, ptr %106, i64 24
  call void @_ZNSt6vectorI4AttrSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %108 = add i64 %.05891, 1
  call void @_ZNSt6vectorI4AttrSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %109

109:                                              ; preds = %77, %99, %93, %90, %82, %74, %71, %66, %105
  %.159 = phi i64 [ %108, %105 ], [ %.05891, %66 ], [ %.05891, %71 ], [ %.05891, %74 ], [ %.05891, %82 ], [ %.05891, %90 ], [ %.05891, %93 ], [ %.05891, %99 ], [ %.05891, %77 ]
  %110 = add nuw i64 %.05793, 1
  %111 = call noundef i64 @_ZNKSt6vectorI6StreamSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %112 = icmp ult i64 %110, %111
  br i1 %112, label %63, label %._crit_edge, !llvm.loop !63

113:                                              ; preds = %.thread83
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI4AttrSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %114
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL10isConstantRKSt6vectorI4AttrSaIS0_EERKS0_f(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(16), float noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorI4AttrSaIS0_EE4swapERS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN6StreamaSERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTS6Stream", !11, i64 0, !6, i64 4, !6, i64 8, !12, i64 16, !13, i64 24}
!11 = !{!"_ZTS20cgltf_attribute_type", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSSt6vectorI4AttrSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseI4AttrSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!17 = !{!10, !11, i64 0}
!18 = !{!10, !6, i64 4}
!19 = !{!20, !6, i64 4}
!20 = !{!"_ZTS12MaterialInfo", !21, i64 0, !21, i64 1, !21, i64 2, !21, i64 3, !6, i64 4, !6, i64 8}
!21 = !{!"bool", !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!20, !21, i64 3}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!20, !21, i64 2}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = !{!31, !42, i64 96}
!31 = !{!"_ZTS4Mesh", !6, i64 0, !32, i64 8, !36, i64 32, !12, i64 56, !12, i64 64, !40, i64 72, !42, i64 96, !43, i64 104, !47, i64 128, !21, i64 152, !7, i64 160, !41, i64 176, !51, i64 184, !55, i64 208, !59, i64 232}
!32 = !{!"_ZTSSt6vectorIP10cgltf_nodeSaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt12_Vector_baseIP10cgltf_nodeSaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE12_Vector_implE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIP10cgltf_nodeSaIS1_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!36 = !{!"_ZTSSt6vectorI9TransformSaIS0_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseI9TransformSaIS0_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseI9TransformSaIS0_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!40 = !{!"_ZTS12cgltf_extras", !41, i64 0, !41, i64 8, !12, i64 16}
!41 = !{!"long", !7, i64 0}
!42 = !{!"_ZTS20cgltf_primitive_type", !7, i64 0}
!43 = !{!"_ZTSSt6vectorI6StreamSaIS0_EE", !44, i64 0}
!44 = !{!"_ZTSSt12_Vector_baseI6StreamSaIS0_EE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE12_Vector_implE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseI6StreamSaIS0_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!47 = !{!"_ZTSSt6vectorIjSaIjEE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!51 = !{!"_ZTSSt6vectorIfSaIfEE", !52, i64 0}
!52 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!55 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !56, i64 0}
!56 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !58, i64 0}
!58 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!59 = !{!"_ZTSSt6vectorI22cgltf_material_mappingSaIS0_EE", !60, i64 0}
!60 = !{!"_ZTSSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE", !61, i64 0}
!61 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE12_Vector_implE", !62, i64 0}
!62 = !{!"_ZTSNSt12_Vector_baseI22cgltf_material_mappingSaIS0_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!63 = distinct !{!63, !23}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass