; LLVM IR from zeux/meshoptimizer :: gltf (stream)

; 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.StreamFormat = type { i32, i32, i8, i64, i32 }
%struct.Stream = type { i32, i32, i32, ptr, %"class.std::vector.50" }
%"class.std::vector.50" = type { %"struct.std::_Vector_base.51" }
%"struct.std::_Vector_base.51" = 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.Settings = type { i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, float, float, i8, i8, i8, float, i32, i8, i8, i8, i8, i8, [4 x float], [4 x i32], [4 x i32], [4 x i32], i32, i8, i8, i8, i8, i32 }
%struct.QuantizationPosition = type { [3 x float], float, i32, i8, float }
%struct.Attr = type { [4 x float] }
%struct.QuantizationTexture = type { [2 x float], [2 x float], i32, i8 }

@.str.2 = external hidden unnamed_addr constant [68 x i8], align 1
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.4 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.5 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.6 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings = external hidden unnamed_addr constant [139 x i8], align 1
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.8 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.9 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.10 = external hidden unnamed_addr constant %struct.StreamFormat, align 8

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef, i32 noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings(ptr dead_on_unwind noalias writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 4 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(148) %5) #6 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca [4 x i16], align 2
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca [4 x i8], align 1
  %26 = alloca i32, align 4
  %27 = alloca i64, align 8
  %28 = alloca ptr, align 8
  %29 = alloca [4 x i16], align 2
  %30 = alloca [2 x float], align 4
  %31 = alloca i64, align 8
  %32 = alloca ptr, align 8
  %33 = alloca [2 x i16], align 2
  %34 = alloca i8, align 1
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i32, align 4
  %40 = alloca i8, align 1
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i64, align 8
  %44 = alloca i64, align 8
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca i64, align 8
  %48 = alloca ptr, align 8
  %49 = alloca [4 x i16], align 2
  %50 = alloca [4 x i8], align 1
  %51 = alloca i64, align 8
  %52 = alloca ptr, align 8
  %53 = alloca float, align 4
  %54 = alloca float, align 4
  %55 = alloca [4 x i8], align 1
  %56 = alloca i32, align 4
  %57 = alloca i64, align 8
  %58 = alloca i32, align 4
  %59 = alloca i64, align 8
  %60 = alloca ptr, align 8
  %61 = alloca [4 x i8], align 1
  %62 = alloca i64, align 8
  %63 = alloca ptr, align 8
  %64 = alloca [4 x i16], align 2
  %65 = alloca i32, align 4
  %66 = alloca i64, align 8
  %67 = alloca i32, align 4
  %68 = alloca i64, align 8
  %69 = alloca ptr, align 8
  %70 = alloca i32, align 4
  %71 = alloca i32, align 4
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.Stream, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !9
  %75 = icmp eq i32 %74, 1
  br i1 %75, label %76, label %459

76:                                               ; preds = %6
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.Settings, ptr %77, i32 0, i32 37
  %79 = load i8, ptr %78, align 4, !tbaa !17, !range !21, !noundef !22
  %80 = trunc i8 %79 to i1
  br i1 %80, label %84, label %81

81:                                               ; preds = %76
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %82, ptr noundef nonnull align 8 dereferenceable(48) %83, i32 noundef 3, i64 noundef 3)
  br label %1184

84:                                               ; preds = %76
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.Settings, ptr %85, i32 0, i32 5
  %87 = load i8, ptr %86, align 1, !tbaa !23, !range !21, !noundef !22
  %88 = trunc i8 %87 to i1
  br i1 %88, label %89, label %102

89:                                               ; preds = %84
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.QuantizationPosition, ptr %93, i32 0, i32 2
  %95 = load i32, ptr %94, align 4, !tbaa !24
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.Settings, ptr %96, i32 0, i32 39
  %98 = load i8, ptr %97, align 2, !tbaa !26, !range !21, !noundef !22
  %99 = trunc i8 %98 to i1
  %100 = zext i1 %99 to i64
  %101 = select i1 %99, i32 2, i32 0
  call void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %90, ptr noundef nonnull align 8 dereferenceable(48) %91, i32 noundef 3, i32 noundef 3, ptr noundef nonnull align 4 dereferenceable(148) %92, i32 noundef %95, i32 noundef %101)
  br label %1184

102:                                              ; preds = %84
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.Stream, ptr %103, i32 0, i32 2
  %105 = load i32, ptr %104, align 8, !tbaa !27
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %107, label %200

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.QuantizationPosition, ptr %108, i32 0, i32 1
  %110 = load float, ptr %109, align 4, !tbaa !28
  %111 = fcmp oeq float %110, 0.000000e+00
  br i1 %111, label %112, label %113

112:                                              ; preds = %107
  br label %118

113:                                              ; preds = %107
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.QuantizationPosition, ptr %114, i32 0, i32 1
  %116 = load float, ptr %115, align 4, !tbaa !28
  %117 = fdiv float 1.000000e+00, %116
  br label %118

118:                                              ; preds = %113, %112
  %119 = phi float [ 0.000000e+00, %112 ], [ %117, %113 ]
  store float %119, ptr %12, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store i64 0, ptr %13, align 8, !tbaa !30
  br label %120

120:                                              ; preds = %186, %118
  %121 = load i64, ptr %13, align 8, !tbaa !30
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.Stream, ptr %122, i32 0, i32 4
  %124 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #8
  %125 = icmp ult i64 %121, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %189

127:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.Stream, ptr %128, i32 0, i32 4
  %130 = load i64, ptr %13, align 8, !tbaa !30
  %131 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %129, i64 noundef %130) #8
  store ptr %131, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %132 = load ptr, ptr %14, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.Attr, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds [4 x float], ptr %133, i64 0, i64 0
  %135 = load float, ptr %134, align 4, !tbaa !29
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.QuantizationPosition, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds [3 x float], ptr %137, i64 0, i64 0
  %139 = load float, ptr %138, align 4, !tbaa !29
  %140 = fsub float %135, %139
  %141 = load float, ptr %12, align 4, !tbaa !29
  %142 = fmul float %140, %141
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.QuantizationPosition, ptr %143, i32 0, i32 2
  %145 = load i32, ptr %144, align 4, !tbaa !24
  %146 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %142, i32 noundef %145)
  %147 = trunc i32 %146 to i16
  store i16 %147, ptr %15, align 2, !tbaa !32
  %148 = getelementptr inbounds i16, ptr %15, i64 1
  %149 = load ptr, ptr %14, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.Attr, ptr %149, i32 0, i32 0
  %151 = getelementptr inbounds [4 x float], ptr %150, i64 0, i64 1
  %152 = load float, ptr %151, align 4, !tbaa !29
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.QuantizationPosition, ptr %153, i32 0, i32 0
  %155 = getelementptr inbounds [3 x float], ptr %154, i64 0, i64 1
  %156 = load float, ptr %155, align 4, !tbaa !29
  %157 = fsub float %152, %156
  %158 = load float, ptr %12, align 4, !tbaa !29
  %159 = fmul float %157, %158
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.QuantizationPosition, ptr %160, i32 0, i32 2
  %162 = load i32, ptr %161, align 4, !tbaa !24
  %163 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %159, i32 noundef %162)
  %164 = trunc i32 %163 to i16
  store i16 %164, ptr %148, align 2, !tbaa !32
  %165 = getelementptr inbounds i16, ptr %15, i64 2
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.Attr, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds [4 x float], ptr %167, i64 0, i64 2
  %169 = load float, ptr %168, align 4, !tbaa !29
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.QuantizationPosition, ptr %170, i32 0, i32 0
  %172 = getelementptr inbounds [3 x float], ptr %171, i64 0, i64 2
  %173 = load float, ptr %172, align 4, !tbaa !29
  %174 = fsub float %169, %173
  %175 = load float, ptr %12, align 4, !tbaa !29
  %176 = fmul float %174, %175
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.QuantizationPosition, ptr %177, i32 0, i32 2
  %179 = load i32, ptr %178, align 4, !tbaa !24
  %180 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %176, i32 noundef %179)
  %181 = trunc i32 %180 to i16
  store i16 %181, ptr %165, align 2, !tbaa !32
  %182 = getelementptr inbounds i16, ptr %15, i64 3
  store i16 0, ptr %182, align 2, !tbaa !32
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  %184 = getelementptr inbounds [4 x i16], ptr %15, i64 0, i64 0
  %185 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %183, ptr noundef %184, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %186

186:                                              ; preds = %127
  %187 = load i64, ptr %13, align 8, !tbaa !30
  %188 = add i64 %187, 1
  store i64 %188, ptr %13, align 8, !tbaa !30
  br label %120, !llvm.loop !34

189:                                              ; preds = %126
  %190 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 0
  store i32 3, ptr %190, align 8, !tbaa !36
  %191 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 1
  store i32 4, ptr %191, align 4, !tbaa !41
  %192 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 2
  %193 = load ptr, ptr %9, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.QuantizationPosition, ptr %193, i32 0, i32 3
  %195 = load i8, ptr %194, align 4, !tbaa !42, !range !21, !noundef !22
  %196 = trunc i8 %195 to i1
  %197 = zext i1 %196 to i8
  store i8 %197, ptr %192, align 8, !tbaa !43
  %198 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 3
  store i64 8, ptr %198, align 8, !tbaa !44
  %199 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 4
  store i32 0, ptr %199, align 8, !tbaa !45
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %1184

200:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %201 = load ptr, ptr %9, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.QuantizationPosition, ptr %201, i32 0, i32 1
  %203 = load float, ptr %202, align 4, !tbaa !28
  %204 = fcmp oeq float %203, 0.000000e+00
  br i1 %204, label %205, label %206

205:                                              ; preds = %200
  br label %218

206:                                              ; preds = %200
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.QuantizationPosition, ptr %207, i32 0, i32 1
  %209 = load float, ptr %208, align 4, !tbaa !28
  %210 = fdiv float 1.000000e+00, %209
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.QuantizationPosition, ptr %211, i32 0, i32 3
  %213 = load i8, ptr %212, align 4, !tbaa !42, !range !21, !noundef !22
  %214 = trunc i8 %213 to i1
  %215 = zext i1 %214 to i64
  %216 = select i1 %214, float 0x3FDFFFE000000000, float 1.000000e+00
  %217 = fmul float %210, %216
  br label %218

218:                                              ; preds = %206, %205
  %219 = phi float [ 0.000000e+00, %205 ], [ %217, %206 ]
  store float %219, ptr %16, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 0, ptr %18, align 8, !tbaa !30
  br label %220

220:                                              ; preds = %271, %218
  %221 = load i64, ptr %18, align 8, !tbaa !30
  %222 = load ptr, ptr %8, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.Stream, ptr %222, i32 0, i32 4
  %224 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %223) #8
  %225 = icmp ult i64 %221, %224
  br i1 %225, label %227, label %226

226:                                              ; preds = %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %274

227:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.Stream, ptr %228, i32 0, i32 4
  %230 = load i64, ptr %18, align 8, !tbaa !30
  %231 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %229, i64 noundef %230) #8
  store ptr %231, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %232 = load ptr, ptr %19, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.Attr, ptr %232, i32 0, i32 0
  %234 = getelementptr inbounds [4 x float], ptr %233, i64 0, i64 0
  %235 = load float, ptr %234, align 4, !tbaa !29
  %236 = call float @llvm.fabs.f32(float %235)
  %237 = load float, ptr %16, align 4, !tbaa !29
  %238 = fmul float %236, %237
  %239 = load ptr, ptr %9, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.QuantizationPosition, ptr %239, i32 0, i32 2
  %241 = load i32, ptr %240, align 4, !tbaa !24
  %242 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %238, i32 noundef %241)
  store i32 %242, ptr %20, align 4, !tbaa !46
  %243 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %244 = load i32, ptr %243, align 4, !tbaa !46
  store i32 %244, ptr %17, align 4, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %245 = load ptr, ptr %19, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.Attr, ptr %245, i32 0, i32 0
  %247 = getelementptr inbounds [4 x float], ptr %246, i64 0, i64 1
  %248 = load float, ptr %247, align 4, !tbaa !29
  %249 = call float @llvm.fabs.f32(float %248)
  %250 = load float, ptr %16, align 4, !tbaa !29
  %251 = fmul float %249, %250
  %252 = load ptr, ptr %9, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.QuantizationPosition, ptr %252, i32 0, i32 2
  %254 = load i32, ptr %253, align 4, !tbaa !24
  %255 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %251, i32 noundef %254)
  store i32 %255, ptr %21, align 4, !tbaa !46
  %256 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %257 = load i32, ptr %256, align 4, !tbaa !46
  store i32 %257, ptr %17, align 4, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %258 = load ptr, ptr %19, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.Attr, ptr %258, i32 0, i32 0
  %260 = getelementptr inbounds [4 x float], ptr %259, i64 0, i64 2
  %261 = load float, ptr %260, align 4, !tbaa !29
  %262 = call float @llvm.fabs.f32(float %261)
  %263 = load float, ptr %16, align 4, !tbaa !29
  %264 = fmul float %262, %263
  %265 = load ptr, ptr %9, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.QuantizationPosition, ptr %265, i32 0, i32 2
  %267 = load i32, ptr %266, align 4, !tbaa !24
  %268 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %264, i32 noundef %267)
  store i32 %268, ptr %22, align 4, !tbaa !46
  %269 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %270 = load i32, ptr %269, align 4, !tbaa !46
  store i32 %270, ptr %17, align 4, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %271

271:                                              ; preds = %227
  %272 = load i64, ptr %18, align 8, !tbaa !30
  %273 = add i64 %272, 1
  store i64 %273, ptr %18, align 8, !tbaa !30
  br label %220, !llvm.loop !47

274:                                              ; preds = %226
  %275 = load i32, ptr %17, align 4, !tbaa !46
  %276 = icmp sle i32 %275, 127
  br i1 %276, label %277, label %365

277:                                              ; preds = %274
  %278 = load ptr, ptr %9, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.QuantizationPosition, ptr %278, i32 0, i32 3
  %280 = load i8, ptr %279, align 4, !tbaa !42, !range !21, !noundef !22
  %281 = trunc i8 %280 to i1
  br i1 %281, label %365, label %282

282:                                              ; preds = %277
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  store i64 0, ptr %23, align 8, !tbaa !30
  br label %283

283:                                              ; preds = %361, %282
  %284 = load i64, ptr %23, align 8, !tbaa !30
  %285 = load ptr, ptr %8, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.Stream, ptr %285, i32 0, i32 4
  %287 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %286) #8
  %288 = icmp ult i64 %284, %287
  br i1 %288, label %290, label %289

289:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %364

290:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %291 = load ptr, ptr %8, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.Stream, ptr %291, i32 0, i32 4
  %293 = load i64, ptr %23, align 8, !tbaa !30
  %294 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %292, i64 noundef %293) #8
  store ptr %294, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %295 = load ptr, ptr %24, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.Attr, ptr %295, i32 0, i32 0
  %297 = getelementptr inbounds [4 x float], ptr %296, i64 0, i64 0
  %298 = load float, ptr %297, align 4, !tbaa !29
  %299 = fcmp oge float %298, 0.000000e+00
  %300 = zext i1 %299 to i64
  %301 = select i1 %299, i32 1, i32 -1
  %302 = load ptr, ptr %24, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.Attr, ptr %302, i32 0, i32 0
  %304 = getelementptr inbounds [4 x float], ptr %303, i64 0, i64 0
  %305 = load float, ptr %304, align 4, !tbaa !29
  %306 = call float @llvm.fabs.f32(float %305)
  %307 = load float, ptr %16, align 4, !tbaa !29
  %308 = fmul float %306, %307
  %309 = load ptr, ptr %9, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.QuantizationPosition, ptr %309, i32 0, i32 2
  %311 = load i32, ptr %310, align 4, !tbaa !24
  %312 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %308, i32 noundef %311)
  %313 = mul nsw i32 %301, %312
  %314 = trunc i32 %313 to i8
  store i8 %314, ptr %25, align 1, !tbaa !48
  %315 = getelementptr inbounds i8, ptr %25, i64 1
  %316 = load ptr, ptr %24, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.Attr, ptr %316, i32 0, i32 0
  %318 = getelementptr inbounds [4 x float], ptr %317, i64 0, i64 1
  %319 = load float, ptr %318, align 4, !tbaa !29
  %320 = fcmp oge float %319, 0.000000e+00
  %321 = zext i1 %320 to i64
  %322 = select i1 %320, i32 1, i32 -1
  %323 = load ptr, ptr %24, align 8, !tbaa !5
  %324 = getelementptr inbounds %struct.Attr, ptr %323, i32 0, i32 0
  %325 = getelementptr inbounds [4 x float], ptr %324, i64 0, i64 1
  %326 = load float, ptr %325, align 4, !tbaa !29
  %327 = call float @llvm.fabs.f32(float %326)
  %328 = load float, ptr %16, align 4, !tbaa !29
  %329 = fmul float %327, %328
  %330 = load ptr, ptr %9, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.QuantizationPosition, ptr %330, i32 0, i32 2
  %332 = load i32, ptr %331, align 4, !tbaa !24
  %333 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %329, i32 noundef %332)
  %334 = mul nsw i32 %322, %333
  %335 = trunc i32 %334 to i8
  store i8 %335, ptr %315, align 1, !tbaa !48
  %336 = getelementptr inbounds i8, ptr %25, i64 2
  %337 = load ptr, ptr %24, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.Attr, ptr %337, i32 0, i32 0
  %339 = getelementptr inbounds [4 x float], ptr %338, i64 0, i64 2
  %340 = load float, ptr %339, align 4, !tbaa !29
  %341 = fcmp oge float %340, 0.000000e+00
  %342 = zext i1 %341 to i64
  %343 = select i1 %341, i32 1, i32 -1
  %344 = load ptr, ptr %24, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.Attr, ptr %344, i32 0, i32 0
  %346 = getelementptr inbounds [4 x float], ptr %345, i64 0, i64 2
  %347 = load float, ptr %346, align 4, !tbaa !29
  %348 = call float @llvm.fabs.f32(float %347)
  %349 = load float, ptr %16, align 4, !tbaa !29
  %350 = fmul float %348, %349
  %351 = load ptr, ptr %9, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.QuantizationPosition, ptr %351, i32 0, i32 2
  %353 = load i32, ptr %352, align 4, !tbaa !24
  %354 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %350, i32 noundef %353)
  %355 = mul nsw i32 %343, %354
  %356 = trunc i32 %355 to i8
  store i8 %356, ptr %336, align 1, !tbaa !48
  %357 = getelementptr inbounds i8, ptr %25, i64 3
  store i8 0, ptr %357, align 1, !tbaa !48
  %358 = load ptr, ptr %7, align 8, !tbaa !5
  %359 = getelementptr inbounds [4 x i8], ptr %25, i64 0, i64 0
  %360 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %358, ptr noundef %359, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %361

361:                                              ; preds = %290
  %362 = load i64, ptr %23, align 8, !tbaa !30
  %363 = add i64 %362, 1
  store i64 %363, ptr %23, align 8, !tbaa !30
  br label %283, !llvm.loop !49

364:                                              ; preds = %289
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format, i64 32, i1 false)
  store i32 1, ptr %26, align 4
  br label %458

365:                                              ; preds = %277, %274
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store i64 0, ptr %27, align 8, !tbaa !30
  br label %366

366:                                              ; preds = %444, %365
  %367 = load i64, ptr %27, align 8, !tbaa !30
  %368 = load ptr, ptr %8, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.Stream, ptr %368, i32 0, i32 4
  %370 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %369) #8
  %371 = icmp ult i64 %367, %370
  br i1 %371, label %373, label %372

372:                                              ; preds = %366
  store i32 11, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %447

373:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %374 = load ptr, ptr %8, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.Stream, ptr %374, i32 0, i32 4
  %376 = load i64, ptr %27, align 8, !tbaa !30
  %377 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %375, i64 noundef %376) #8
  store ptr %377, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %378 = load ptr, ptr %28, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.Attr, ptr %378, i32 0, i32 0
  %380 = getelementptr inbounds [4 x float], ptr %379, i64 0, i64 0
  %381 = load float, ptr %380, align 4, !tbaa !29
  %382 = fcmp oge float %381, 0.000000e+00
  %383 = zext i1 %382 to i64
  %384 = select i1 %382, i32 1, i32 -1
  %385 = load ptr, ptr %28, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.Attr, ptr %385, i32 0, i32 0
  %387 = getelementptr inbounds [4 x float], ptr %386, i64 0, i64 0
  %388 = load float, ptr %387, align 4, !tbaa !29
  %389 = call float @llvm.fabs.f32(float %388)
  %390 = load float, ptr %16, align 4, !tbaa !29
  %391 = fmul float %389, %390
  %392 = load ptr, ptr %9, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.QuantizationPosition, ptr %392, i32 0, i32 2
  %394 = load i32, ptr %393, align 4, !tbaa !24
  %395 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %391, i32 noundef %394)
  %396 = mul nsw i32 %384, %395
  %397 = trunc i32 %396 to i16
  store i16 %397, ptr %29, align 2, !tbaa !32
  %398 = getelementptr inbounds i16, ptr %29, i64 1
  %399 = load ptr, ptr %28, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.Attr, ptr %399, i32 0, i32 0
  %401 = getelementptr inbounds [4 x float], ptr %400, i64 0, i64 1
  %402 = load float, ptr %401, align 4, !tbaa !29
  %403 = fcmp oge float %402, 0.000000e+00
  %404 = zext i1 %403 to i64
  %405 = select i1 %403, i32 1, i32 -1
  %406 = load ptr, ptr %28, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct.Attr, ptr %406, i32 0, i32 0
  %408 = getelementptr inbounds [4 x float], ptr %407, i64 0, i64 1
  %409 = load float, ptr %408, align 4, !tbaa !29
  %410 = call float @llvm.fabs.f32(float %409)
  %411 = load float, ptr %16, align 4, !tbaa !29
  %412 = fmul float %410, %411
  %413 = load ptr, ptr %9, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct.QuantizationPosition, ptr %413, i32 0, i32 2
  %415 = load i32, ptr %414, align 4, !tbaa !24
  %416 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %412, i32 noundef %415)
  %417 = mul nsw i32 %405, %416
  %418 = trunc i32 %417 to i16
  store i16 %418, ptr %398, align 2, !tbaa !32
  %419 = getelementptr inbounds i16, ptr %29, i64 2
  %420 = load ptr, ptr %28, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.Attr, ptr %420, i32 0, i32 0
  %422 = getelementptr inbounds [4 x float], ptr %421, i64 0, i64 2
  %423 = load float, ptr %422, align 4, !tbaa !29
  %424 = fcmp oge float %423, 0.000000e+00
  %425 = zext i1 %424 to i64
  %426 = select i1 %424, i32 1, i32 -1
  %427 = load ptr, ptr %28, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.Attr, ptr %427, i32 0, i32 0
  %429 = getelementptr inbounds [4 x float], ptr %428, i64 0, i64 2
  %430 = load float, ptr %429, align 4, !tbaa !29
  %431 = call float @llvm.fabs.f32(float %430)
  %432 = load float, ptr %16, align 4, !tbaa !29
  %433 = fmul float %431, %432
  %434 = load ptr, ptr %9, align 8, !tbaa !5
  %435 = getelementptr inbounds %struct.QuantizationPosition, ptr %434, i32 0, i32 2
  %436 = load i32, ptr %435, align 4, !tbaa !24
  %437 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %433, i32 noundef %436)
  %438 = mul nsw i32 %426, %437
  %439 = trunc i32 %438 to i16
  store i16 %439, ptr %419, align 2, !tbaa !32
  %440 = getelementptr inbounds i16, ptr %29, i64 3
  store i16 0, ptr %440, align 2, !tbaa !32
  %441 = load ptr, ptr %7, align 8, !tbaa !5
  %442 = getelementptr inbounds [4 x i16], ptr %29, i64 0, i64 0
  %443 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %441, ptr noundef %442, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %444

444:                                              ; preds = %373
  %445 = load i64, ptr %27, align 8, !tbaa !30
  %446 = add i64 %445, 1
  store i64 %446, ptr %27, align 8, !tbaa !30
  br label %366, !llvm.loop !50

447:                                              ; preds = %372
  %448 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 0
  store i32 3, ptr %448, align 8, !tbaa !36
  %449 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 1
  store i32 3, ptr %449, align 4, !tbaa !41
  %450 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 2
  %451 = load ptr, ptr %9, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct.QuantizationPosition, ptr %451, i32 0, i32 3
  %453 = load i8, ptr %452, align 4, !tbaa !42, !range !21, !noundef !22
  %454 = trunc i8 %453 to i1
  %455 = zext i1 %454 to i8
  store i8 %455, ptr %450, align 8, !tbaa !43
  %456 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 3
  store i64 8, ptr %456, align 8, !tbaa !44
  %457 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 4
  store i32 0, ptr %457, align 8, !tbaa !45
  store i32 1, ptr %26, align 4
  br label %458

458:                                              ; preds = %447, %364
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %1184

459:                                              ; preds = %6
  %460 = load ptr, ptr %8, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.Stream, ptr %460, i32 0, i32 0
  %462 = load i32, ptr %461, align 8, !tbaa !9
  %463 = icmp eq i32 %462, 4
  br i1 %463, label %464, label %584

464:                                              ; preds = %459
  %465 = load ptr, ptr %11, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct.Settings, ptr %465, i32 0, i32 37
  %467 = load i8, ptr %466, align 4, !tbaa !17, !range !21, !noundef !22
  %468 = trunc i8 %467 to i1
  br i1 %468, label %472, label %469

469:                                              ; preds = %464
  %470 = load ptr, ptr %7, align 8, !tbaa !5
  %471 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %470, ptr noundef nonnull align 8 dereferenceable(48) %471, i32 noundef 2, i64 noundef 2)
  br label %1184

472:                                              ; preds = %464
  %473 = load ptr, ptr %11, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct.Settings, ptr %473, i32 0, i32 6
  %475 = load i8, ptr %474, align 2, !tbaa !51, !range !21, !noundef !22
  %476 = trunc i8 %475 to i1
  br i1 %476, label %477, label %490

477:                                              ; preds = %472
  %478 = load ptr, ptr %7, align 8, !tbaa !5
  %479 = load ptr, ptr %8, align 8, !tbaa !5
  %480 = load ptr, ptr %11, align 8, !tbaa !5
  %481 = load ptr, ptr %10, align 8, !tbaa !5
  %482 = getelementptr inbounds %struct.QuantizationTexture, ptr %481, i32 0, i32 2
  %483 = load i32, ptr %482, align 4, !tbaa !52
  %484 = load ptr, ptr %11, align 8, !tbaa !5
  %485 = getelementptr inbounds %struct.Settings, ptr %484, i32 0, i32 39
  %486 = load i8, ptr %485, align 2, !tbaa !26, !range !21, !noundef !22
  %487 = trunc i8 %486 to i1
  %488 = zext i1 %487 to i64
  %489 = select i1 %487, i32 2, i32 3
  call void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %478, ptr noundef nonnull align 8 dereferenceable(48) %479, i32 noundef 2, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(148) %480, i32 noundef %483, i32 noundef %489)
  br label %1184

490:                                              ; preds = %472
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %491 = load ptr, ptr %10, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.QuantizationTexture, ptr %491, i32 0, i32 1
  %493 = getelementptr inbounds [2 x float], ptr %492, i64 0, i64 0
  %494 = load float, ptr %493, align 4, !tbaa !29
  %495 = fcmp oeq float %494, 0.000000e+00
  br i1 %495, label %496, label %497

496:                                              ; preds = %490
  br label %503

497:                                              ; preds = %490
  %498 = load ptr, ptr %10, align 8, !tbaa !5
  %499 = getelementptr inbounds %struct.QuantizationTexture, ptr %498, i32 0, i32 1
  %500 = getelementptr inbounds [2 x float], ptr %499, i64 0, i64 0
  %501 = load float, ptr %500, align 4, !tbaa !29
  %502 = fdiv float 1.000000e+00, %501
  br label %503

503:                                              ; preds = %497, %496
  %504 = phi float [ 0.000000e+00, %496 ], [ %502, %497 ]
  store float %504, ptr %30, align 4, !tbaa !29
  %505 = getelementptr inbounds float, ptr %30, i64 1
  %506 = load ptr, ptr %10, align 8, !tbaa !5
  %507 = getelementptr inbounds %struct.QuantizationTexture, ptr %506, i32 0, i32 1
  %508 = getelementptr inbounds [2 x float], ptr %507, i64 0, i64 1
  %509 = load float, ptr %508, align 4, !tbaa !29
  %510 = fcmp oeq float %509, 0.000000e+00
  br i1 %510, label %511, label %512

511:                                              ; preds = %503
  br label %518

512:                                              ; preds = %503
  %513 = load ptr, ptr %10, align 8, !tbaa !5
  %514 = getelementptr inbounds %struct.QuantizationTexture, ptr %513, i32 0, i32 1
  %515 = getelementptr inbounds [2 x float], ptr %514, i64 0, i64 1
  %516 = load float, ptr %515, align 4, !tbaa !29
  %517 = fdiv float 1.000000e+00, %516
  br label %518

518:                                              ; preds = %512, %511
  %519 = phi float [ 0.000000e+00, %511 ], [ %517, %512 ]
  store float %519, ptr %505, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  store i64 0, ptr %31, align 8, !tbaa !30
  br label %520

520:                                              ; preds = %570, %518
  %521 = load i64, ptr %31, align 8, !tbaa !30
  %522 = load ptr, ptr %8, align 8, !tbaa !5
  %523 = getelementptr inbounds %struct.Stream, ptr %522, i32 0, i32 4
  %524 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %523) #8
  %525 = icmp ult i64 %521, %524
  br i1 %525, label %527, label %526

526:                                              ; preds = %520
  store i32 14, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %573

527:                                              ; preds = %520
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %528 = load ptr, ptr %8, align 8, !tbaa !5
  %529 = getelementptr inbounds %struct.Stream, ptr %528, i32 0, i32 4
  %530 = load i64, ptr %31, align 8, !tbaa !30
  %531 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %529, i64 noundef %530) #8
  store ptr %531, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %532 = load ptr, ptr %32, align 8, !tbaa !5
  %533 = getelementptr inbounds %struct.Attr, ptr %532, i32 0, i32 0
  %534 = getelementptr inbounds [4 x float], ptr %533, i64 0, i64 0
  %535 = load float, ptr %534, align 4, !tbaa !29
  %536 = load ptr, ptr %10, align 8, !tbaa !5
  %537 = getelementptr inbounds %struct.QuantizationTexture, ptr %536, i32 0, i32 0
  %538 = getelementptr inbounds [2 x float], ptr %537, i64 0, i64 0
  %539 = load float, ptr %538, align 4, !tbaa !29
  %540 = fsub float %535, %539
  %541 = getelementptr inbounds [2 x float], ptr %30, i64 0, i64 0
  %542 = load float, ptr %541, align 4, !tbaa !29
  %543 = fmul float %540, %542
  %544 = load ptr, ptr %10, align 8, !tbaa !5
  %545 = getelementptr inbounds %struct.QuantizationTexture, ptr %544, i32 0, i32 2
  %546 = load i32, ptr %545, align 4, !tbaa !52
  %547 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %543, i32 noundef %546)
  %548 = trunc i32 %547 to i16
  store i16 %548, ptr %33, align 2, !tbaa !32
  %549 = getelementptr inbounds i16, ptr %33, i64 1
  %550 = load ptr, ptr %32, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.Attr, ptr %550, i32 0, i32 0
  %552 = getelementptr inbounds [4 x float], ptr %551, i64 0, i64 1
  %553 = load float, ptr %552, align 4, !tbaa !29
  %554 = load ptr, ptr %10, align 8, !tbaa !5
  %555 = getelementptr inbounds %struct.QuantizationTexture, ptr %554, i32 0, i32 0
  %556 = getelementptr inbounds [2 x float], ptr %555, i64 0, i64 1
  %557 = load float, ptr %556, align 4, !tbaa !29
  %558 = fsub float %553, %557
  %559 = getelementptr inbounds [2 x float], ptr %30, i64 0, i64 1
  %560 = load float, ptr %559, align 4, !tbaa !29
  %561 = fmul float %558, %560
  %562 = load ptr, ptr %10, align 8, !tbaa !5
  %563 = getelementptr inbounds %struct.QuantizationTexture, ptr %562, i32 0, i32 2
  %564 = load i32, ptr %563, align 4, !tbaa !52
  %565 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %561, i32 noundef %564)
  %566 = trunc i32 %565 to i16
  store i16 %566, ptr %549, align 2, !tbaa !32
  %567 = load ptr, ptr %7, align 8, !tbaa !5
  %568 = getelementptr inbounds [2 x i16], ptr %33, i64 0, i64 0
  %569 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %567, ptr noundef %568, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %570

570:                                              ; preds = %527
  %571 = load i64, ptr %31, align 8, !tbaa !30
  %572 = add i64 %571, 1
  store i64 %572, ptr %31, align 8, !tbaa !30
  br label %520, !llvm.loop !54

573:                                              ; preds = %526
  %574 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 0
  store i32 2, ptr %574, align 8, !tbaa !36
  %575 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 1
  store i32 4, ptr %575, align 4, !tbaa !41
  %576 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 2
  %577 = load ptr, ptr %10, align 8, !tbaa !5
  %578 = getelementptr inbounds %struct.QuantizationTexture, ptr %577, i32 0, i32 3
  %579 = load i8, ptr %578, align 4, !tbaa !55, !range !21, !noundef !22
  %580 = trunc i8 %579 to i1
  %581 = zext i1 %580 to i8
  store i8 %581, ptr %576, align 8, !tbaa !43
  %582 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 3
  store i64 4, ptr %582, align 8, !tbaa !44
  %583 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 4
  store i32 0, ptr %583, align 8, !tbaa !45
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %1184

584:                                              ; preds = %459
  %585 = load ptr, ptr %8, align 8, !tbaa !5
  %586 = getelementptr inbounds %struct.Stream, ptr %585, i32 0, i32 0
  %587 = load i32, ptr %586, align 8, !tbaa !9
  %588 = icmp eq i32 %587, 2
  br i1 %588, label %589, label %701

589:                                              ; preds = %584
  %590 = load ptr, ptr %11, align 8, !tbaa !5
  %591 = getelementptr inbounds %struct.Settings, ptr %590, i32 0, i32 37
  %592 = load i8, ptr %591, align 4, !tbaa !17, !range !21, !noundef !22
  %593 = trunc i8 %592 to i1
  br i1 %593, label %597, label %594

594:                                              ; preds = %589
  %595 = load ptr, ptr %7, align 8, !tbaa !5
  %596 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %595, ptr noundef nonnull align 8 dereferenceable(48) %596, i32 noundef 3, i64 noundef 3)
  br label %1184

597:                                              ; preds = %589
  %598 = load ptr, ptr %11, align 8, !tbaa !5
  %599 = getelementptr inbounds %struct.Settings, ptr %598, i32 0, i32 7
  %600 = load i8, ptr %599, align 1, !tbaa !56, !range !21, !noundef !22
  %601 = trunc i8 %600 to i1
  br i1 %601, label %602, label %622

602:                                              ; preds = %597
  %603 = load ptr, ptr %7, align 8, !tbaa !5
  %604 = load ptr, ptr %8, align 8, !tbaa !5
  %605 = load ptr, ptr %11, align 8, !tbaa !5
  %606 = load ptr, ptr %11, align 8, !tbaa !5
  %607 = getelementptr inbounds %struct.Settings, ptr %606, i32 0, i32 2
  %608 = load i32, ptr %607, align 4, !tbaa !57
  %609 = load ptr, ptr %11, align 8, !tbaa !5
  %610 = getelementptr inbounds %struct.Settings, ptr %609, i32 0, i32 39
  %611 = load i8, ptr %610, align 2, !tbaa !26, !range !21, !noundef !22
  %612 = trunc i8 %611 to i1
  br i1 %612, label %618, label %613

613:                                              ; preds = %602
  %614 = load ptr, ptr %8, align 8, !tbaa !5
  %615 = getelementptr inbounds %struct.Stream, ptr %614, i32 0, i32 2
  %616 = load i32, ptr %615, align 8, !tbaa !27
  %617 = icmp ne i32 %616, 0
  br label %618

618:                                              ; preds = %613, %602
  %619 = phi i1 [ true, %602 ], [ %617, %613 ]
  %620 = zext i1 %619 to i64
  %621 = select i1 %619, i32 2, i32 3
  call void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %603, ptr noundef nonnull align 8 dereferenceable(48) %604, i32 noundef 3, i32 noundef 3, ptr noundef nonnull align 4 dereferenceable(148) %605, i32 noundef %608, i32 noundef %621)
  br label %1184

622:                                              ; preds = %597
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #8
  %623 = load ptr, ptr %11, align 8, !tbaa !5
  %624 = getelementptr inbounds %struct.Settings, ptr %623, i32 0, i32 39
  %625 = load i8, ptr %624, align 2, !tbaa !26, !range !21, !noundef !22
  %626 = trunc i8 %625 to i1
  br i1 %626, label %627, label %632

627:                                              ; preds = %622
  %628 = load ptr, ptr %8, align 8, !tbaa !5
  %629 = getelementptr inbounds %struct.Stream, ptr %628, i32 0, i32 2
  %630 = load i32, ptr %629, align 8, !tbaa !27
  %631 = icmp eq i32 %630, 0
  br label %632

632:                                              ; preds = %627, %622
  %633 = phi i1 [ false, %622 ], [ %631, %627 ]
  %634 = zext i1 %633 to i8
  store i8 %634, ptr %34, align 1, !tbaa !58
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %635 = load ptr, ptr %11, align 8, !tbaa !5
  %636 = getelementptr inbounds %struct.Settings, ptr %635, i32 0, i32 2
  %637 = load i32, ptr %636, align 4, !tbaa !57
  store i32 %637, ptr %35, align 4, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %638 = load i8, ptr %34, align 1, !tbaa !58, !range !21, !noundef !22
  %639 = trunc i8 %638 to i1
  %640 = zext i1 %639 to i64
  %641 = select i1 %639, i32 1, i32 0
  store i32 %641, ptr %36, align 4, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %642 = load ptr, ptr %7, align 8, !tbaa !5
  %643 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %642) #8
  store i64 %643, ptr %37, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %644 = load i32, ptr %35, align 4, !tbaa !46
  %645 = icmp sgt i32 %644, 8
  %646 = zext i1 %645 to i64
  %647 = select i1 %645, i32 8, i32 4
  %648 = sext i32 %647 to i64
  store i64 %648, ptr %38, align 8, !tbaa !30
  %649 = load ptr, ptr %7, align 8, !tbaa !5
  %650 = load ptr, ptr %7, align 8, !tbaa !5
  %651 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %650) #8
  %652 = load ptr, ptr %8, align 8, !tbaa !5
  %653 = getelementptr inbounds %struct.Stream, ptr %652, i32 0, i32 4
  %654 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %653) #8
  %655 = load i64, ptr %38, align 8, !tbaa !30
  %656 = mul i64 %654, %655
  %657 = add i64 %651, %656
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %649, i64 noundef %657)
  %658 = load i8, ptr %34, align 1, !tbaa !58, !range !21, !noundef !22
  %659 = trunc i8 %658 to i1
  br i1 %659, label %660, label %674

660:                                              ; preds = %632
  %661 = load ptr, ptr %7, align 8, !tbaa !5
  %662 = load i64, ptr %37, align 8, !tbaa !30
  %663 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %661, i64 noundef %662)
  %664 = load ptr, ptr %8, align 8, !tbaa !5
  %665 = getelementptr inbounds %struct.Stream, ptr %664, i32 0, i32 4
  %666 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %665) #8
  %667 = load i64, ptr %38, align 8, !tbaa !30
  %668 = load i32, ptr %35, align 4, !tbaa !46
  %669 = load ptr, ptr %8, align 8, !tbaa !5
  %670 = getelementptr inbounds %struct.Stream, ptr %669, i32 0, i32 4
  %671 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %670, i64 noundef 0) #8
  %672 = getelementptr inbounds %struct.Attr, ptr %671, i32 0, i32 0
  %673 = getelementptr inbounds [4 x float], ptr %672, i64 0, i64 0
  call void @meshopt_encodeFilterOct(ptr noundef %663, i64 noundef %666, i64 noundef %667, i32 noundef %668, ptr noundef %673)
  br label %688

674:                                              ; preds = %632
  %675 = load ptr, ptr %7, align 8, !tbaa !5
  %676 = load i64, ptr %37, align 8, !tbaa !30
  %677 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %675, i64 noundef %676)
  %678 = load ptr, ptr %8, align 8, !tbaa !5
  %679 = getelementptr inbounds %struct.Stream, ptr %678, i32 0, i32 4
  %680 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %679) #8
  %681 = load i64, ptr %38, align 8, !tbaa !30
  %682 = load i32, ptr %35, align 4, !tbaa !46
  %683 = load ptr, ptr %8, align 8, !tbaa !5
  %684 = getelementptr inbounds %struct.Stream, ptr %683, i32 0, i32 4
  %685 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %684, i64 noundef 0) #8
  %686 = getelementptr inbounds %struct.Attr, ptr %685, i32 0, i32 0
  %687 = getelementptr inbounds [4 x float], ptr %686, i64 0, i64 0
  call void @_ZL11encodeSnormPvmmiPKf(ptr noundef %677, i64 noundef %680, i64 noundef %681, i32 noundef %682, ptr noundef %687)
  br label %688

688:                                              ; preds = %674, %660
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %689 = load i32, ptr %35, align 4, !tbaa !46
  %690 = icmp sgt i32 %689, 8
  %691 = zext i1 %690 to i64
  %692 = select i1 %690, i32 3, i32 1
  store i32 %692, ptr %39, align 4, !tbaa !60
  %693 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 0
  store i32 3, ptr %693, align 8, !tbaa !36
  %694 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 1
  %695 = load i32, ptr %39, align 4, !tbaa !60
  store i32 %695, ptr %694, align 4, !tbaa !41
  %696 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 2
  store i8 1, ptr %696, align 8, !tbaa !43
  %697 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 3
  %698 = load i64, ptr %38, align 8, !tbaa !30
  store i64 %698, ptr %697, align 8, !tbaa !44
  %699 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 4
  %700 = load i32, ptr %36, align 4, !tbaa !59
  store i32 %700, ptr %699, align 8, !tbaa !45
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #8
  br label %1184

701:                                              ; preds = %584
  %702 = load ptr, ptr %8, align 8, !tbaa !5
  %703 = getelementptr inbounds %struct.Stream, ptr %702, i32 0, i32 0
  %704 = load i32, ptr %703, align 8, !tbaa !9
  %705 = icmp eq i32 %704, 3
  br i1 %705, label %706, label %797

706:                                              ; preds = %701
  %707 = load ptr, ptr %11, align 8, !tbaa !5
  %708 = getelementptr inbounds %struct.Settings, ptr %707, i32 0, i32 37
  %709 = load i8, ptr %708, align 4, !tbaa !17, !range !21, !noundef !22
  %710 = trunc i8 %709 to i1
  br i1 %710, label %714, label %711

711:                                              ; preds = %706
  %712 = load ptr, ptr %7, align 8, !tbaa !5
  %713 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %712, ptr noundef nonnull align 8 dereferenceable(48) %713, i32 noundef 4, i64 noundef 4)
  br label %1184

714:                                              ; preds = %706
  call void @llvm.lifetime.start.p0(i64 1, ptr %40) #8
  %715 = load ptr, ptr %11, align 8, !tbaa !5
  %716 = getelementptr inbounds %struct.Settings, ptr %715, i32 0, i32 39
  %717 = load i8, ptr %716, align 2, !tbaa !26, !range !21, !noundef !22
  %718 = trunc i8 %717 to i1
  br i1 %718, label %719, label %724

719:                                              ; preds = %714
  %720 = load ptr, ptr %8, align 8, !tbaa !5
  %721 = getelementptr inbounds %struct.Stream, ptr %720, i32 0, i32 2
  %722 = load i32, ptr %721, align 8, !tbaa !27
  %723 = icmp eq i32 %722, 0
  br label %724

724:                                              ; preds = %719, %714
  %725 = phi i1 [ false, %714 ], [ %723, %719 ]
  %726 = zext i1 %725 to i8
  store i8 %726, ptr %40, align 1, !tbaa !58
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %727 = load ptr, ptr %11, align 8, !tbaa !5
  %728 = getelementptr inbounds %struct.Settings, ptr %727, i32 0, i32 2
  %729 = load i32, ptr %728, align 4, !tbaa !57
  %730 = icmp sgt i32 %729, 8
  br i1 %730, label %731, label %732

731:                                              ; preds = %724
  br label %736

732:                                              ; preds = %724
  %733 = load ptr, ptr %11, align 8, !tbaa !5
  %734 = getelementptr inbounds %struct.Settings, ptr %733, i32 0, i32 2
  %735 = load i32, ptr %734, align 4, !tbaa !57
  br label %736

736:                                              ; preds = %732, %731
  %737 = phi i32 [ 8, %731 ], [ %735, %732 ]
  store i32 %737, ptr %41, align 4, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  %738 = load i8, ptr %40, align 1, !tbaa !58, !range !21, !noundef !22
  %739 = trunc i8 %738 to i1
  %740 = zext i1 %739 to i64
  %741 = select i1 %739, i32 1, i32 0
  store i32 %741, ptr %42, align 4, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %742 = load ptr, ptr %7, align 8, !tbaa !5
  %743 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %742) #8
  store i64 %743, ptr %43, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  store i64 4, ptr %44, align 8, !tbaa !30
  %744 = load ptr, ptr %7, align 8, !tbaa !5
  %745 = load ptr, ptr %7, align 8, !tbaa !5
  %746 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %745) #8
  %747 = load ptr, ptr %8, align 8, !tbaa !5
  %748 = getelementptr inbounds %struct.Stream, ptr %747, i32 0, i32 4
  %749 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %748) #8
  %750 = load i64, ptr %44, align 8, !tbaa !30
  %751 = mul i64 %749, %750
  %752 = add i64 %746, %751
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %744, i64 noundef %752)
  %753 = load i8, ptr %40, align 1, !tbaa !58, !range !21, !noundef !22
  %754 = trunc i8 %753 to i1
  br i1 %754, label %755, label %769

755:                                              ; preds = %736
  %756 = load ptr, ptr %7, align 8, !tbaa !5
  %757 = load i64, ptr %43, align 8, !tbaa !30
  %758 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %756, i64 noundef %757)
  %759 = load ptr, ptr %8, align 8, !tbaa !5
  %760 = getelementptr inbounds %struct.Stream, ptr %759, i32 0, i32 4
  %761 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %760) #8
  %762 = load i64, ptr %44, align 8, !tbaa !30
  %763 = load i32, ptr %41, align 4, !tbaa !46
  %764 = load ptr, ptr %8, align 8, !tbaa !5
  %765 = getelementptr inbounds %struct.Stream, ptr %764, i32 0, i32 4
  %766 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %765, i64 noundef 0) #8
  %767 = getelementptr inbounds %struct.Attr, ptr %766, i32 0, i32 0
  %768 = getelementptr inbounds [4 x float], ptr %767, i64 0, i64 0
  call void @meshopt_encodeFilterOct(ptr noundef %758, i64 noundef %761, i64 noundef %762, i32 noundef %763, ptr noundef %768)
  br label %783

769:                                              ; preds = %736
  %770 = load ptr, ptr %7, align 8, !tbaa !5
  %771 = load i64, ptr %43, align 8, !tbaa !30
  %772 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %770, i64 noundef %771)
  %773 = load ptr, ptr %8, align 8, !tbaa !5
  %774 = getelementptr inbounds %struct.Stream, ptr %773, i32 0, i32 4
  %775 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %774) #8
  %776 = load i64, ptr %44, align 8, !tbaa !30
  %777 = load i32, ptr %41, align 4, !tbaa !46
  %778 = load ptr, ptr %8, align 8, !tbaa !5
  %779 = getelementptr inbounds %struct.Stream, ptr %778, i32 0, i32 4
  %780 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %779, i64 noundef 0) #8
  %781 = getelementptr inbounds %struct.Attr, ptr %780, i32 0, i32 0
  %782 = getelementptr inbounds [4 x float], ptr %781, i64 0, i64 0
  call void @_ZL11encodeSnormPvmmiPKf(ptr noundef %772, i64 noundef %775, i64 noundef %776, i32 noundef %777, ptr noundef %782)
  br label %783

783:                                              ; preds = %769, %755
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #8
  %784 = load ptr, ptr %8, align 8, !tbaa !5
  %785 = getelementptr inbounds %struct.Stream, ptr %784, i32 0, i32 2
  %786 = load i32, ptr %785, align 8, !tbaa !27
  %787 = icmp eq i32 %786, 0
  %788 = zext i1 %787 to i64
  %789 = select i1 %787, i32 4, i32 3
  store i32 %789, ptr %45, align 4, !tbaa !61
  %790 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 0
  %791 = load i32, ptr %45, align 4, !tbaa !61
  store i32 %791, ptr %790, align 8, !tbaa !36
  %792 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 1
  store i32 1, ptr %792, align 4, !tbaa !41
  %793 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 2
  store i8 1, ptr %793, align 8, !tbaa !43
  %794 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 3
  store i64 4, ptr %794, align 8, !tbaa !44
  %795 = getelementptr inbounds %struct.StreamFormat, ptr %0, i32 0, i32 4
  %796 = load i32, ptr %42, align 4, !tbaa !59
  store i32 %796, ptr %795, align 8, !tbaa !45
  store i32 1, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #8
  br label %1184

797:                                              ; preds = %701
  %798 = load ptr, ptr %8, align 8, !tbaa !5
  %799 = getelementptr inbounds %struct.Stream, ptr %798, i32 0, i32 0
  %800 = load i32, ptr %799, align 8, !tbaa !9
  %801 = icmp eq i32 %800, 5
  br i1 %801, label %802, label %900

802:                                              ; preds = %797
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  %803 = load ptr, ptr %11, align 8, !tbaa !5
  %804 = getelementptr inbounds %struct.Settings, ptr %803, i32 0, i32 3
  %805 = load i32, ptr %804, align 4, !tbaa !62
  store i32 %805, ptr %46, align 4, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  store i64 0, ptr %47, align 8, !tbaa !30
  br label %806

806:                                              ; preds = %891, %802
  %807 = load i64, ptr %47, align 8, !tbaa !30
  %808 = load ptr, ptr %8, align 8, !tbaa !5
  %809 = getelementptr inbounds %struct.Stream, ptr %808, i32 0, i32 4
  %810 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %809) #8
  %811 = icmp ult i64 %807, %810
  br i1 %811, label %813, label %812

812:                                              ; preds = %806
  store i32 17, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  br label %894

813:                                              ; preds = %806
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %814 = load ptr, ptr %8, align 8, !tbaa !5
  %815 = getelementptr inbounds %struct.Stream, ptr %814, i32 0, i32 4
  %816 = load i64, ptr %47, align 8, !tbaa !30
  %817 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %815, i64 noundef %816) #8
  store ptr %817, ptr %48, align 8, !tbaa !5
  %818 = load i32, ptr %46, align 4, !tbaa !46
  %819 = icmp sgt i32 %818, 8
  br i1 %819, label %820, label %855

820:                                              ; preds = %813
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #8
  %821 = load ptr, ptr %48, align 8, !tbaa !5
  %822 = getelementptr inbounds %struct.Attr, ptr %821, i32 0, i32 0
  %823 = getelementptr inbounds [4 x float], ptr %822, i64 0, i64 0
  %824 = load float, ptr %823, align 4, !tbaa !29
  %825 = load i32, ptr %46, align 4, !tbaa !46
  %826 = call noundef i32 @_ZL13quantizeColorfii(float noundef %824, i32 noundef 16, i32 noundef %825)
  %827 = trunc i32 %826 to i16
  store i16 %827, ptr %49, align 2, !tbaa !32
  %828 = getelementptr inbounds i16, ptr %49, i64 1
  %829 = load ptr, ptr %48, align 8, !tbaa !5
  %830 = getelementptr inbounds %struct.Attr, ptr %829, i32 0, i32 0
  %831 = getelementptr inbounds [4 x float], ptr %830, i64 0, i64 1
  %832 = load float, ptr %831, align 4, !tbaa !29
  %833 = load i32, ptr %46, align 4, !tbaa !46
  %834 = call noundef i32 @_ZL13quantizeColorfii(float noundef %832, i32 noundef 16, i32 noundef %833)
  %835 = trunc i32 %834 to i16
  store i16 %835, ptr %828, align 2, !tbaa !32
  %836 = getelementptr inbounds i16, ptr %49, i64 2
  %837 = load ptr, ptr %48, align 8, !tbaa !5
  %838 = getelementptr inbounds %struct.Attr, ptr %837, i32 0, i32 0
  %839 = getelementptr inbounds [4 x float], ptr %838, i64 0, i64 2
  %840 = load float, ptr %839, align 4, !tbaa !29
  %841 = load i32, ptr %46, align 4, !tbaa !46
  %842 = call noundef i32 @_ZL13quantizeColorfii(float noundef %840, i32 noundef 16, i32 noundef %841)
  %843 = trunc i32 %842 to i16
  store i16 %843, ptr %836, align 2, !tbaa !32
  %844 = getelementptr inbounds i16, ptr %49, i64 3
  %845 = load ptr, ptr %48, align 8, !tbaa !5
  %846 = getelementptr inbounds %struct.Attr, ptr %845, i32 0, i32 0
  %847 = getelementptr inbounds [4 x float], ptr %846, i64 0, i64 3
  %848 = load float, ptr %847, align 4, !tbaa !29
  %849 = load i32, ptr %46, align 4, !tbaa !46
  %850 = call noundef i32 @_ZL13quantizeColorfii(float noundef %848, i32 noundef 16, i32 noundef %849)
  %851 = trunc i32 %850 to i16
  store i16 %851, ptr %844, align 2, !tbaa !32
  %852 = load ptr, ptr %7, align 8, !tbaa !5
  %853 = getelementptr inbounds [4 x i16], ptr %49, i64 0, i64 0
  %854 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %852, ptr noundef %853, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #8
  br label %890

855:                                              ; preds = %813
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  %856 = load ptr, ptr %48, align 8, !tbaa !5
  %857 = getelementptr inbounds %struct.Attr, ptr %856, i32 0, i32 0
  %858 = getelementptr inbounds [4 x float], ptr %857, i64 0, i64 0
  %859 = load float, ptr %858, align 4, !tbaa !29
  %860 = load i32, ptr %46, align 4, !tbaa !46
  %861 = call noundef i32 @_ZL13quantizeColorfii(float noundef %859, i32 noundef 8, i32 noundef %860)
  %862 = trunc i32 %861 to i8
  store i8 %862, ptr %50, align 1, !tbaa !48
  %863 = getelementptr inbounds i8, ptr %50, i64 1
  %864 = load ptr, ptr %48, align 8, !tbaa !5
  %865 = getelementptr inbounds %struct.Attr, ptr %864, i32 0, i32 0
  %866 = getelementptr inbounds [4 x float], ptr %865, i64 0, i64 1
  %867 = load float, ptr %866, align 4, !tbaa !29
  %868 = load i32, ptr %46, align 4, !tbaa !46
  %869 = call noundef i32 @_ZL13quantizeColorfii(float noundef %867, i32 noundef 8, i32 noundef %868)
  %870 = trunc i32 %869 to i8
  store i8 %870, ptr %863, align 1, !tbaa !48
  %871 = getelementptr inbounds i8, ptr %50, i64 2
  %872 = load ptr, ptr %48, align 8, !tbaa !5
  %873 = getelementptr inbounds %struct.Attr, ptr %872, i32 0, i32 0
  %874 = getelementptr inbounds [4 x float], ptr %873, i64 0, i64 2
  %875 = load float, ptr %874, align 4, !tbaa !29
  %876 = load i32, ptr %46, align 4, !tbaa !46
  %877 = call noundef i32 @_ZL13quantizeColorfii(float noundef %875, i32 noundef 8, i32 noundef %876)
  %878 = trunc i32 %877 to i8
  store i8 %878, ptr %871, align 1, !tbaa !48
  %879 = getelementptr inbounds i8, ptr %50, i64 3
  %880 = load ptr, ptr %48, align 8, !tbaa !5
  %881 = getelementptr inbounds %struct.Attr, ptr %880, i32 0, i32 0
  %882 = getelementptr inbounds [4 x float], ptr %881, i64 0, i64 3
  %883 = load float, ptr %882, align 4, !tbaa !29
  %884 = load i32, ptr %46, align 4, !tbaa !46
  %885 = call noundef i32 @_ZL13quantizeColorfii(float noundef %883, i32 noundef 8, i32 noundef %884)
  %886 = trunc i32 %885 to i8
  store i8 %886, ptr %879, align 1, !tbaa !48
  %887 = load ptr, ptr %7, align 8, !tbaa !5
  %888 = getelementptr inbounds [4 x i8], ptr %50, i64 0, i64 0
  %889 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %887, ptr noundef %888, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  br label %890

890:                                              ; preds = %855, %820
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  br label %891

891:                                              ; preds = %890
  %892 = load i64, ptr %47, align 8, !tbaa !30
  %893 = add i64 %892, 1
  store i64 %893, ptr %47, align 8, !tbaa !30
  br label %806, !llvm.loop !63

894:                                              ; preds = %812
  %895 = load i32, ptr %46, align 4, !tbaa !46
  %896 = icmp sgt i32 %895, 8
  br i1 %896, label %897, label %898

897:                                              ; preds = %894
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.4, i64 32, i1 false)
  store i32 1, ptr %26, align 4
  br label %899

898:                                              ; preds = %894
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.5, i64 32, i1 false)
  store i32 1, ptr %26, align 4
  br label %899

899:                                              ; preds = %898, %897
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %1184

900:                                              ; preds = %797
  %901 = load ptr, ptr %8, align 8, !tbaa !5
  %902 = getelementptr inbounds %struct.Stream, ptr %901, i32 0, i32 0
  %903 = load i32, ptr %902, align 8, !tbaa !9
  %904 = icmp eq i32 %903, 7
  br i1 %904, label %905, label %991

905:                                              ; preds = %900
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  store i64 0, ptr %51, align 8, !tbaa !30
  br label %906

906:                                              ; preds = %987, %905
  %907 = load i64, ptr %51, align 8, !tbaa !30
  %908 = load ptr, ptr %8, align 8, !tbaa !5
  %909 = getelementptr inbounds %struct.Stream, ptr %908, i32 0, i32 4
  %910 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %909) #8
  %911 = icmp ult i64 %907, %910
  br i1 %911, label %913, label %912

912:                                              ; preds = %906
  store i32 20, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  br label %990

913:                                              ; preds = %906
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %914 = load ptr, ptr %8, align 8, !tbaa !5
  %915 = getelementptr inbounds %struct.Stream, ptr %914, i32 0, i32 4
  %916 = load i64, ptr %51, align 8, !tbaa !30
  %917 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %915, i64 noundef %916) #8
  store ptr %917, ptr %52, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #8
  %918 = load ptr, ptr %52, align 8, !tbaa !5
  %919 = getelementptr inbounds %struct.Attr, ptr %918, i32 0, i32 0
  %920 = getelementptr inbounds [4 x float], ptr %919, i64 0, i64 0
  %921 = load float, ptr %920, align 4, !tbaa !29
  %922 = load ptr, ptr %52, align 8, !tbaa !5
  %923 = getelementptr inbounds %struct.Attr, ptr %922, i32 0, i32 0
  %924 = getelementptr inbounds [4 x float], ptr %923, i64 0, i64 1
  %925 = load float, ptr %924, align 4, !tbaa !29
  %926 = fadd float %921, %925
  %927 = load ptr, ptr %52, align 8, !tbaa !5
  %928 = getelementptr inbounds %struct.Attr, ptr %927, i32 0, i32 0
  %929 = getelementptr inbounds [4 x float], ptr %928, i64 0, i64 2
  %930 = load float, ptr %929, align 4, !tbaa !29
  %931 = fadd float %926, %930
  %932 = load ptr, ptr %52, align 8, !tbaa !5
  %933 = getelementptr inbounds %struct.Attr, ptr %932, i32 0, i32 0
  %934 = getelementptr inbounds [4 x float], ptr %933, i64 0, i64 3
  %935 = load float, ptr %934, align 4, !tbaa !29
  %936 = fadd float %931, %935
  store float %936, ptr %53, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #8
  %937 = load float, ptr %53, align 4, !tbaa !29
  %938 = fcmp oeq float %937, 0.000000e+00
  br i1 %938, label %939, label %940

939:                                              ; preds = %913
  br label %943

940:                                              ; preds = %913
  %941 = load float, ptr %53, align 4, !tbaa !29
  %942 = fdiv float 1.000000e+00, %941
  br label %943

943:                                              ; preds = %940, %939
  %944 = phi float [ 0.000000e+00, %939 ], [ %942, %940 ]
  store float %944, ptr %54, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #8
  %945 = load ptr, ptr %52, align 8, !tbaa !5
  %946 = getelementptr inbounds %struct.Attr, ptr %945, i32 0, i32 0
  %947 = getelementptr inbounds [4 x float], ptr %946, i64 0, i64 0
  %948 = load float, ptr %947, align 4, !tbaa !29
  %949 = load float, ptr %54, align 4, !tbaa !29
  %950 = fmul float %948, %949
  %951 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %950, i32 noundef 8)
  %952 = trunc i32 %951 to i8
  store i8 %952, ptr %55, align 1, !tbaa !48
  %953 = getelementptr inbounds i8, ptr %55, i64 1
  %954 = load ptr, ptr %52, align 8, !tbaa !5
  %955 = getelementptr inbounds %struct.Attr, ptr %954, i32 0, i32 0
  %956 = getelementptr inbounds [4 x float], ptr %955, i64 0, i64 1
  %957 = load float, ptr %956, align 4, !tbaa !29
  %958 = load float, ptr %54, align 4, !tbaa !29
  %959 = fmul float %957, %958
  %960 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %959, i32 noundef 8)
  %961 = trunc i32 %960 to i8
  store i8 %961, ptr %953, align 1, !tbaa !48
  %962 = getelementptr inbounds i8, ptr %55, i64 2
  %963 = load ptr, ptr %52, align 8, !tbaa !5
  %964 = getelementptr inbounds %struct.Attr, ptr %963, i32 0, i32 0
  %965 = getelementptr inbounds [4 x float], ptr %964, i64 0, i64 2
  %966 = load float, ptr %965, align 4, !tbaa !29
  %967 = load float, ptr %54, align 4, !tbaa !29
  %968 = fmul float %966, %967
  %969 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %968, i32 noundef 8)
  %970 = trunc i32 %969 to i8
  store i8 %970, ptr %962, align 1, !tbaa !48
  %971 = getelementptr inbounds i8, ptr %55, i64 3
  %972 = load ptr, ptr %52, align 8, !tbaa !5
  %973 = getelementptr inbounds %struct.Attr, ptr %972, i32 0, i32 0
  %974 = getelementptr inbounds [4 x float], ptr %973, i64 0, i64 3
  %975 = load float, ptr %974, align 4, !tbaa !29
  %976 = load float, ptr %54, align 4, !tbaa !29
  %977 = fmul float %975, %976
  %978 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %977, i32 noundef 8)
  %979 = trunc i32 %978 to i8
  store i8 %979, ptr %971, align 1, !tbaa !48
  %980 = load float, ptr %54, align 4, !tbaa !29
  %981 = fcmp une float %980, 0.000000e+00
  br i1 %981, label %982, label %983

982:                                              ; preds = %943
  call void @_ZL18renormalizeWeightsRA4_h(ptr noundef nonnull align 1 dereferenceable(4) %55)
  br label %983

983:                                              ; preds = %982, %943
  %984 = load ptr, ptr %7, align 8, !tbaa !5
  %985 = getelementptr inbounds [4 x i8], ptr %55, i64 0, i64 0
  %986 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %984, ptr noundef %985, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  br label %987

987:                                              ; preds = %983
  %988 = load i64, ptr %51, align 8, !tbaa !30
  %989 = add i64 %988, 1
  store i64 %989, ptr %51, align 8, !tbaa !30
  br label %906, !llvm.loop !64

990:                                              ; preds = %912
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.6, i64 32, i1 false)
  br label %1184

991:                                              ; preds = %900
  %992 = load ptr, ptr %8, align 8, !tbaa !5
  %993 = getelementptr inbounds %struct.Stream, ptr %992, i32 0, i32 0
  %994 = load i32, ptr %993, align 8, !tbaa !9
  %995 = icmp eq i32 %994, 6
  br i1 %995, label %996, label %1114

996:                                              ; preds = %991
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #8
  store i32 0, ptr %56, align 4, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #8
  store i64 0, ptr %57, align 8, !tbaa !30
  br label %997

997:                                              ; preds = %1015, %996
  %998 = load i64, ptr %57, align 8, !tbaa !30
  %999 = load ptr, ptr %8, align 8, !tbaa !5
  %1000 = getelementptr inbounds %struct.Stream, ptr %999, i32 0, i32 4
  %1001 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1000) #8
  %1002 = icmp ult i64 %998, %1001
  br i1 %1002, label %1004, label %1003

1003:                                             ; preds = %997
  store i32 23, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  br label %1018

1004:                                             ; preds = %997
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #8
  %1005 = load ptr, ptr %8, align 8, !tbaa !5
  %1006 = getelementptr inbounds %struct.Stream, ptr %1005, i32 0, i32 4
  %1007 = load i64, ptr %57, align 8, !tbaa !30
  %1008 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1006, i64 noundef %1007) #8
  %1009 = getelementptr inbounds %struct.Attr, ptr %1008, i32 0, i32 0
  %1010 = getelementptr inbounds [4 x float], ptr %1009, i64 0, i64 0
  %1011 = load float, ptr %1010, align 4, !tbaa !29
  %1012 = fptoui float %1011 to i32
  store i32 %1012, ptr %58, align 4, !tbaa !46
  %1013 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %56, ptr noundef nonnull align 4 dereferenceable(4) %58)
  %1014 = load i32, ptr %1013, align 4, !tbaa !46
  store i32 %1014, ptr %56, align 4, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #8
  br label %1015

1015:                                             ; preds = %1004
  %1016 = load i64, ptr %57, align 8, !tbaa !30
  %1017 = add i64 %1016, 1
  store i64 %1017, ptr %57, align 8, !tbaa !30
  br label %997, !llvm.loop !65

1018:                                             ; preds = %1003
  %1019 = load i32, ptr %56, align 4, !tbaa !46
  %1020 = icmp ule i32 %1019, 65535
  br i1 %1020, label %1021, label %1022

1021:                                             ; preds = %1018
  br label %1024

1022:                                             ; preds = %1018
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.2, i32 noundef 602, ptr noundef @__PRETTY_FUNCTION__._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings) #9
  unreachable

1023:                                             ; No predecessors!
  br label %1024

1024:                                             ; preds = %1023, %1021
  %1025 = load i32, ptr %56, align 4, !tbaa !46
  %1026 = icmp ule i32 %1025, 255
  br i1 %1026, label %1027, label %1070

1027:                                             ; preds = %1024
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #8
  store i64 0, ptr %59, align 8, !tbaa !30
  br label %1028

1028:                                             ; preds = %1066, %1027
  %1029 = load i64, ptr %59, align 8, !tbaa !30
  %1030 = load ptr, ptr %8, align 8, !tbaa !5
  %1031 = getelementptr inbounds %struct.Stream, ptr %1030, i32 0, i32 4
  %1032 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1031) #8
  %1033 = icmp ult i64 %1029, %1032
  br i1 %1033, label %1035, label %1034

1034:                                             ; preds = %1028
  store i32 26, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #8
  br label %1069

1035:                                             ; preds = %1028
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #8
  %1036 = load ptr, ptr %8, align 8, !tbaa !5
  %1037 = getelementptr inbounds %struct.Stream, ptr %1036, i32 0, i32 4
  %1038 = load i64, ptr %59, align 8, !tbaa !30
  %1039 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1037, i64 noundef %1038) #8
  store ptr %1039, ptr %60, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #8
  %1040 = load ptr, ptr %60, align 8, !tbaa !5
  %1041 = getelementptr inbounds %struct.Attr, ptr %1040, i32 0, i32 0
  %1042 = getelementptr inbounds [4 x float], ptr %1041, i64 0, i64 0
  %1043 = load float, ptr %1042, align 4, !tbaa !29
  %1044 = fptoui float %1043 to i8
  store i8 %1044, ptr %61, align 1, !tbaa !48
  %1045 = getelementptr inbounds i8, ptr %61, i64 1
  %1046 = load ptr, ptr %60, align 8, !tbaa !5
  %1047 = getelementptr inbounds %struct.Attr, ptr %1046, i32 0, i32 0
  %1048 = getelementptr inbounds [4 x float], ptr %1047, i64 0, i64 1
  %1049 = load float, ptr %1048, align 4, !tbaa !29
  %1050 = fptoui float %1049 to i8
  store i8 %1050, ptr %1045, align 1, !tbaa !48
  %1051 = getelementptr inbounds i8, ptr %61, i64 2
  %1052 = load ptr, ptr %60, align 8, !tbaa !5
  %1053 = getelementptr inbounds %struct.Attr, ptr %1052, i32 0, i32 0
  %1054 = getelementptr inbounds [4 x float], ptr %1053, i64 0, i64 2
  %1055 = load float, ptr %1054, align 4, !tbaa !29
  %1056 = fptoui float %1055 to i8
  store i8 %1056, ptr %1051, align 1, !tbaa !48
  %1057 = getelementptr inbounds i8, ptr %61, i64 3
  %1058 = load ptr, ptr %60, align 8, !tbaa !5
  %1059 = getelementptr inbounds %struct.Attr, ptr %1058, i32 0, i32 0
  %1060 = getelementptr inbounds [4 x float], ptr %1059, i64 0, i64 3
  %1061 = load float, ptr %1060, align 4, !tbaa !29
  %1062 = fptoui float %1061 to i8
  store i8 %1062, ptr %1057, align 1, !tbaa !48
  %1063 = load ptr, ptr %7, align 8, !tbaa !5
  %1064 = getelementptr inbounds [4 x i8], ptr %61, i64 0, i64 0
  %1065 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1063, ptr noundef %1064, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  br label %1066

1066:                                             ; preds = %1035
  %1067 = load i64, ptr %59, align 8, !tbaa !30
  %1068 = add i64 %1067, 1
  store i64 %1068, ptr %59, align 8, !tbaa !30
  br label %1028, !llvm.loop !66

1069:                                             ; preds = %1034
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.8, i64 32, i1 false)
  store i32 1, ptr %26, align 4
  br label %1113

1070:                                             ; preds = %1024
  call void @llvm.lifetime.start.p0(i64 8, ptr %62) #8
  store i64 0, ptr %62, align 8, !tbaa !30
  br label %1071

1071:                                             ; preds = %1109, %1070
  %1072 = load i64, ptr %62, align 8, !tbaa !30
  %1073 = load ptr, ptr %8, align 8, !tbaa !5
  %1074 = getelementptr inbounds %struct.Stream, ptr %1073, i32 0, i32 4
  %1075 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1074) #8
  %1076 = icmp ult i64 %1072, %1075
  br i1 %1076, label %1078, label %1077

1077:                                             ; preds = %1071
  store i32 29, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %62) #8
  br label %1112

1078:                                             ; preds = %1071
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #8
  %1079 = load ptr, ptr %8, align 8, !tbaa !5
  %1080 = getelementptr inbounds %struct.Stream, ptr %1079, i32 0, i32 4
  %1081 = load i64, ptr %62, align 8, !tbaa !30
  %1082 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1080, i64 noundef %1081) #8
  store ptr %1082, ptr %63, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #8
  %1083 = load ptr, ptr %63, align 8, !tbaa !5
  %1084 = getelementptr inbounds %struct.Attr, ptr %1083, i32 0, i32 0
  %1085 = getelementptr inbounds [4 x float], ptr %1084, i64 0, i64 0
  %1086 = load float, ptr %1085, align 4, !tbaa !29
  %1087 = fptoui float %1086 to i16
  store i16 %1087, ptr %64, align 2, !tbaa !32
  %1088 = getelementptr inbounds i16, ptr %64, i64 1
  %1089 = load ptr, ptr %63, align 8, !tbaa !5
  %1090 = getelementptr inbounds %struct.Attr, ptr %1089, i32 0, i32 0
  %1091 = getelementptr inbounds [4 x float], ptr %1090, i64 0, i64 1
  %1092 = load float, ptr %1091, align 4, !tbaa !29
  %1093 = fptoui float %1092 to i16
  store i16 %1093, ptr %1088, align 2, !tbaa !32
  %1094 = getelementptr inbounds i16, ptr %64, i64 2
  %1095 = load ptr, ptr %63, align 8, !tbaa !5
  %1096 = getelementptr inbounds %struct.Attr, ptr %1095, i32 0, i32 0
  %1097 = getelementptr inbounds [4 x float], ptr %1096, i64 0, i64 2
  %1098 = load float, ptr %1097, align 4, !tbaa !29
  %1099 = fptoui float %1098 to i16
  store i16 %1099, ptr %1094, align 2, !tbaa !32
  %1100 = getelementptr inbounds i16, ptr %64, i64 3
  %1101 = load ptr, ptr %63, align 8, !tbaa !5
  %1102 = getelementptr inbounds %struct.Attr, ptr %1101, i32 0, i32 0
  %1103 = getelementptr inbounds [4 x float], ptr %1102, i64 0, i64 3
  %1104 = load float, ptr %1103, align 4, !tbaa !29
  %1105 = fptoui float %1104 to i16
  store i16 %1105, ptr %1100, align 2, !tbaa !32
  %1106 = load ptr, ptr %7, align 8, !tbaa !5
  %1107 = getelementptr inbounds [4 x i16], ptr %64, i64 0, i64 0
  %1108 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1106, ptr noundef %1107, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #8
  br label %1109

1109:                                             ; preds = %1078
  %1110 = load i64, ptr %62, align 8, !tbaa !30
  %1111 = add i64 %1110, 1
  store i64 %1111, ptr %62, align 8, !tbaa !30
  br label %1071, !llvm.loop !67

1112:                                             ; preds = %1077
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.9, i64 32, i1 false)
  store i32 1, ptr %26, align 4
  br label %1113

1113:                                             ; preds = %1112, %1069
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #8
  br label %1184

1114:                                             ; preds = %991
  %1115 = load ptr, ptr %8, align 8, !tbaa !5
  %1116 = getelementptr inbounds %struct.Stream, ptr %1115, i32 0, i32 0
  %1117 = load i32, ptr %1116, align 8, !tbaa !9
  %1118 = icmp eq i32 %1117, 8
  br i1 %1118, label %1119, label %1181

1119:                                             ; preds = %1114
  %1120 = load ptr, ptr %11, align 8, !tbaa !5
  %1121 = getelementptr inbounds %struct.Settings, ptr %1120, i32 0, i32 39
  %1122 = load i8, ptr %1121, align 2, !tbaa !26, !range !21, !noundef !22
  %1123 = trunc i8 %1122 to i1
  br i1 %1123, label %1127, label %1124

1124:                                             ; preds = %1119
  %1125 = load ptr, ptr %7, align 8, !tbaa !5
  %1126 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1125, ptr noundef nonnull align 8 dereferenceable(48) %1126, i32 noundef 1, i64 noundef 1)
  br label %1184

1127:                                             ; preds = %1119
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #8
  store i32 0, ptr %65, align 4, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 8, ptr %66) #8
  store i64 0, ptr %66, align 8, !tbaa !30
  br label %1128

1128:                                             ; preds = %1146, %1127
  %1129 = load i64, ptr %66, align 8, !tbaa !30
  %1130 = load ptr, ptr %8, align 8, !tbaa !5
  %1131 = getelementptr inbounds %struct.Stream, ptr %1130, i32 0, i32 4
  %1132 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1131) #8
  %1133 = icmp ult i64 %1129, %1132
  br i1 %1133, label %1135, label %1134

1134:                                             ; preds = %1128
  store i32 32, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %66) #8
  br label %1149

1135:                                             ; preds = %1128
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #8
  %1136 = load ptr, ptr %8, align 8, !tbaa !5
  %1137 = getelementptr inbounds %struct.Stream, ptr %1136, i32 0, i32 4
  %1138 = load i64, ptr %66, align 8, !tbaa !30
  %1139 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1137, i64 noundef %1138) #8
  %1140 = getelementptr inbounds %struct.Attr, ptr %1139, i32 0, i32 0
  %1141 = getelementptr inbounds [4 x float], ptr %1140, i64 0, i64 0
  %1142 = load float, ptr %1141, align 4, !tbaa !29
  %1143 = fptoui float %1142 to i32
  store i32 %1143, ptr %67, align 4, !tbaa !46
  %1144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %65, ptr noundef nonnull align 4 dereferenceable(4) %67)
  %1145 = load i32, ptr %1144, align 4, !tbaa !46
  store i32 %1145, ptr %65, align 4, !tbaa !46
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #8
  br label %1146

1146:                                             ; preds = %1135
  %1147 = load i64, ptr %66, align 8, !tbaa !30
  %1148 = add i64 %1147, 1
  store i64 %1148, ptr %66, align 8, !tbaa !30
  br label %1128, !llvm.loop !68

1149:                                             ; preds = %1134
  %1150 = load i32, ptr %65, align 4, !tbaa !46
  %1151 = icmp uge i32 %1150, 8388608
  br i1 %1151, label %1152, label %1155

1152:                                             ; preds = %1149
  %1153 = load ptr, ptr %7, align 8, !tbaa !5
  %1154 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1153, ptr noundef nonnull align 8 dereferenceable(48) %1154, i32 noundef 1, i64 noundef 1)
  store i32 1, ptr %26, align 4
  br label %1180

1155:                                             ; preds = %1149
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #8
  store i64 0, ptr %68, align 8, !tbaa !30
  br label %1156

1156:                                             ; preds = %1176, %1155
  %1157 = load i64, ptr %68, align 8, !tbaa !30
  %1158 = load ptr, ptr %8, align 8, !tbaa !5
  %1159 = getelementptr inbounds %struct.Stream, ptr %1158, i32 0, i32 4
  %1160 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1159) #8
  %1161 = icmp ult i64 %1157, %1160
  br i1 %1161, label %1163, label %1162

1162:                                             ; preds = %1156
  store i32 35, ptr %26, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #8
  br label %1179

1163:                                             ; preds = %1156
  call void @llvm.lifetime.start.p0(i64 8, ptr %69) #8
  %1164 = load ptr, ptr %8, align 8, !tbaa !5
  %1165 = getelementptr inbounds %struct.Stream, ptr %1164, i32 0, i32 4
  %1166 = load i64, ptr %68, align 8, !tbaa !30
  %1167 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1165, i64 noundef %1166) #8
  store ptr %1167, ptr %69, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %70) #8
  %1168 = load ptr, ptr %69, align 8, !tbaa !5
  %1169 = getelementptr inbounds %struct.Attr, ptr %1168, i32 0, i32 0
  %1170 = getelementptr inbounds [4 x float], ptr %1169, i64 0, i64 0
  %1171 = load float, ptr %1170, align 4, !tbaa !29
  %1172 = fptoui float %1171 to i32
  store i32 %1172, ptr %70, align 4, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 4, ptr %71) #8
  %1173 = load i32, ptr %70, align 4, !tbaa !46
  store i32 %1173, ptr %71, align 4, !tbaa !46
  %1174 = load ptr, ptr %7, align 8, !tbaa !5
  %1175 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1174, ptr noundef %71, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %71) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %69) #8
  br label %1176

1176:                                             ; preds = %1163
  %1177 = load i64, ptr %68, align 8, !tbaa !30
  %1178 = add i64 %1177, 1
  store i64 %1178, ptr %68, align 8, !tbaa !30
  br label %1156, !llvm.loop !69

1179:                                             ; preds = %1162
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.10, i64 32, i1 false)
  store i32 1, ptr %26, align 4
  br label %1180

1180:                                             ; preds = %1179, %1152
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #8
  br label %1184

1181:                                             ; preds = %1114
  %1182 = load ptr, ptr %7, align 8, !tbaa !5
  %1183 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1182, ptr noundef nonnull align 8 dereferenceable(48) %1183, i32 noundef 4, i64 noundef 4)
  br label %1184

1184:                                             ; preds = %1181, %1180, %1124, %1113, %990, %899, %783, %711, %688, %618, %594, %573, %477, %469, %458, %189, %89, %81
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind noalias writable sret(%struct.StreamFormat) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i64 noundef) #6

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind noalias writable sret(%struct.StreamFormat) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(148), i32 noundef, i32 noundef) #6

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

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

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

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

declare void @meshopt_encodeFilterOct(ptr noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef) #7

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11encodeSnormPvmmiPKf(ptr noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL13quantizeColorfii(float noundef, i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL18renormalizeWeightsRA4_h(ptr noundef nonnull align 1 dereferenceable(4)) #3

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { "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 #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, !11, i64 0}
!10 = !{!"_ZTS6Stream", !11, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !13, i64 24}
!11 = !{!"_ZTS20cgltf_attribute_type", !7, i64 0}
!12 = !{!"int", !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", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!18, !19, i64 140}
!18 = !{!"_ZTS8Settings", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !19, i64 16, !19, i64 17, !19, i64 18, !19, i64 19, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !19, i64 36, !19, i64 37, !19, i64 38, !19, i64 39, !19, i64 40, !19, i64 41, !19, i64 42, !19, i64 43, !20, i64 44, !20, i64 48, !19, i64 52, !19, i64 53, !19, i64 54, !20, i64 56, !12, i64 60, !19, i64 64, !19, i64 65, !19, i64 66, !19, i64 67, !19, i64 68, !7, i64 72, !7, i64 88, !7, i64 104, !7, i64 120, !12, i64 136, !19, i64 140, !19, i64 141, !19, i64 142, !19, i64 143, !12, i64 144}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"float", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!18, !19, i64 17}
!24 = !{!25, !12, i64 16}
!25 = !{!"_ZTS20QuantizationPosition", !7, i64 0, !20, i64 12, !12, i64 16, !19, i64 20, !20, i64 24}
!26 = !{!18, !19, i64 142}
!27 = !{!10, !12, i64 8}
!28 = !{!25, !20, i64 12}
!29 = !{!20, !20, i64 0}
!30 = !{!31, !31, i64 0}
!31 = !{!"long", !7, i64 0}
!32 = !{!33, !33, i64 0}
!33 = !{!"short", !7, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!37, !38, i64 0}
!37 = !{!"_ZTS12StreamFormat", !38, i64 0, !39, i64 4, !19, i64 8, !31, i64 16, !40, i64 24}
!38 = !{!"_ZTS10cgltf_type", !7, i64 0}
!39 = !{!"_ZTS20cgltf_component_type", !7, i64 0}
!40 = !{!"_ZTSN12StreamFormat6FilterE", !7, i64 0}
!41 = !{!37, !39, i64 4}
!42 = !{!25, !19, i64 20}
!43 = !{!37, !19, i64 8}
!44 = !{!37, !31, i64 16}
!45 = !{!37, !40, i64 24}
!46 = !{!12, !12, i64 0}
!47 = distinct !{!47, !35}
!48 = !{!7, !7, i64 0}
!49 = distinct !{!49, !35}
!50 = distinct !{!50, !35}
!51 = !{!18, !19, i64 18}
!52 = !{!53, !12, i64 16}
!53 = !{!"_ZTS19QuantizationTexture", !7, i64 0, !7, i64 8, !12, i64 16, !19, i64 20}
!54 = distinct !{!54, !35}
!55 = !{!53, !19, i64 20}
!56 = !{!18, !19, i64 19}
!57 = !{!18, !12, i64 8}
!58 = !{!19, !19, i64 0}
!59 = !{!40, !40, i64 0}
!60 = !{!39, !39, i64 0}
!61 = !{!38, !38, i64 0}
!62 = !{!18, !12, i64 12}
!63 = distinct !{!63, !35}
!64 = distinct !{!64, !35}
!65 = distinct !{!65, !35}
!66 = distinct !{!66, !35}
!67 = distinct !{!67, !35}
!68 = distinct !{!68, !35}
!69 = distinct !{!69, !35}


; 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.StreamFormat = type { i32, i32, i8, i64, i32 }

@.str.2 = external hidden unnamed_addr constant [68 x i8], align 1
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.4 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.5 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.6 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings = external hidden unnamed_addr constant [139 x i8], align 1
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.8 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.9 = external hidden unnamed_addr constant %struct.StreamFormat, align 8
@__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.10 = external hidden unnamed_addr constant %struct.StreamFormat, align 8

; 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 nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings(ptr dead_on_unwind noalias writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr nocapture noundef nonnull readonly align 4 dereferenceable(28) %3, ptr nocapture noundef nonnull readonly align 4 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(148) %5) local_unnamed_addr #6 {
  %7 = alloca [4 x i16], align 2
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [4 x i8], align 1
  %13 = alloca [4 x i16], align 2
  %14 = alloca [2 x i16], align 2
  %15 = alloca [4 x i16], align 2
  %16 = alloca [4 x i8], align 1
  %17 = alloca [4 x i8], align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca [4 x i8], align 4
  %21 = alloca [4 x i16], align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = load i32, ptr %2, align 8, !tbaa !5
  switch i32 %25, label %526 [
    i32 1, label %31
    i32 4, label %233
    i32 2, label %292
    i32 3, label %342
    i32 5, label %378
    i32 7, label %.preheader296
    i32 6, label %467
    i32 8, label %499
  ]

.preheader296:                                    ; preds = %6
  %26 = getelementptr inbounds i8, ptr %2, i64 24
  %27 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #9
  %.not349 = icmp eq i64 %27, 0
  br i1 %.not349, label %._crit_edge319, label %.lr.ph318

.lr.ph318:                                        ; preds = %.preheader296
  %28 = getelementptr inbounds i8, ptr %17, i64 1
  %29 = getelementptr inbounds i8, ptr %17, i64 2
  %30 = getelementptr inbounds i8, ptr %17, i64 3
  br label %430

31:                                               ; preds = %6
  %32 = getelementptr inbounds i8, ptr %5, i64 140
  %33 = load i8, ptr %32, align 4, !tbaa !16, !range !20, !noundef !21
  %34 = trunc nuw i8 %33 to i1
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  tail call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 3, i64 noundef 3)
  br label %527

36:                                               ; preds = %31
  %37 = getelementptr inbounds i8, ptr %5, i64 17
  %38 = load i8, ptr %37, align 1, !tbaa !22, !range !20, !noundef !21
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %40, label %47

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %3, i64 16
  %42 = load i32, ptr %41, align 4, !tbaa !23
  %43 = getelementptr inbounds i8, ptr %5, i64 142
  %44 = load i8, ptr %43, align 2, !tbaa !25, !range !20, !noundef !21
  %45 = trunc nuw i8 %44 to i1
  %46 = select i1 %45, i32 2, i32 0
  tail call void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 3, i32 noundef 3, ptr noundef nonnull align 4 dereferenceable(148) %5, i32 noundef %42, i32 noundef %46)
  br label %527

47:                                               ; preds = %36
  %48 = getelementptr inbounds i8, ptr %2, i64 8
  %49 = load i32, ptr %48, align 8, !tbaa !26
  %50 = icmp eq i32 %49, 0
  %51 = getelementptr inbounds i8, ptr %3, i64 12
  %52 = load float, ptr %51, align 4, !tbaa !27
  %53 = fcmp oeq float %52, 0.000000e+00
  br i1 %50, label %54, label %100

54:                                               ; preds = %47
  %55 = fdiv float 1.000000e+00, %52
  %56 = select i1 %53, float 0.000000e+00, float %55
  %57 = getelementptr inbounds i8, ptr %2, i64 24
  %58 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #9
  %.not355 = icmp eq i64 %58, 0
  br i1 %.not355, label %._crit_edge343, label %.lr.ph342

.lr.ph342:                                        ; preds = %54
  %59 = getelementptr inbounds i8, ptr %3, i64 16
  %60 = getelementptr inbounds i8, ptr %7, i64 2
  %61 = getelementptr inbounds i8, ptr %3, i64 4
  %62 = getelementptr inbounds i8, ptr %7, i64 4
  %63 = getelementptr inbounds i8, ptr %3, i64 8
  %64 = getelementptr inbounds i8, ptr %7, i64 6
  br label %71

._crit_edge343:                                   ; preds = %71, %54
  store i32 3, ptr %0, align 8, !tbaa !28
  %65 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 4, ptr %65, align 4, !tbaa !34
  %66 = getelementptr inbounds i8, ptr %0, i64 8
  %67 = getelementptr inbounds i8, ptr %3, i64 20
  %68 = load i8, ptr %67, align 4, !tbaa !35, !range !20, !noundef !21
  store i8 %68, ptr %66, align 8, !tbaa !36
  %69 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 8, ptr %69, align 8, !tbaa !37
  %70 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %70, align 8, !tbaa !38
  br label %527

71:                                               ; preds = %.lr.ph342, %71
  %.0340 = phi i64 [ 0, %.lr.ph342 ], [ %97, %71 ]
  %72 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %.0340) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %73 = load float, ptr %72, align 4, !tbaa !39
  %74 = load float, ptr %3, align 4, !tbaa !39
  %75 = fsub float %73, %74
  %76 = fmul float %56, %75
  %77 = load i32, ptr %59, align 4, !tbaa !23
  %78 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %76, i32 noundef %77)
  %79 = trunc i32 %78 to i16
  store i16 %79, ptr %7, align 2, !tbaa !40
  %80 = getelementptr inbounds i8, ptr %72, i64 4
  %81 = load float, ptr %80, align 4, !tbaa !39
  %82 = load float, ptr %61, align 4, !tbaa !39
  %83 = fsub float %81, %82
  %84 = fmul float %56, %83
  %85 = load i32, ptr %59, align 4, !tbaa !23
  %86 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %84, i32 noundef %85)
  %87 = trunc i32 %86 to i16
  store i16 %87, ptr %60, align 2, !tbaa !40
  %88 = getelementptr inbounds i8, ptr %72, i64 8
  %89 = load float, ptr %88, align 4, !tbaa !39
  %90 = load float, ptr %63, align 4, !tbaa !39
  %91 = fsub float %89, %90
  %92 = fmul float %56, %91
  %93 = load i32, ptr %59, align 4, !tbaa !23
  %94 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %92, i32 noundef %93)
  %95 = trunc i32 %94 to i16
  store i16 %95, ptr %62, align 2, !tbaa !40
  store i16 0, ptr %64, align 2, !tbaa !40
  %96 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %7, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  %97 = add nuw i64 %.0340, 1
  %98 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57) #9
  %99 = icmp ult i64 %97, %98
  br i1 %99, label %71, label %._crit_edge343, !llvm.loop !42

100:                                              ; preds = %47
  br i1 %53, label %108, label %101

101:                                              ; preds = %100
  %102 = fdiv float 1.000000e+00, %52
  %103 = getelementptr inbounds i8, ptr %3, i64 20
  %104 = load i8, ptr %103, align 4, !tbaa !35, !range !20, !noundef !21
  %105 = trunc nuw i8 %104 to i1
  %106 = select i1 %105, float 0x3FDFFFE000000000, float 1.000000e+00
  %107 = fmul float %102, %106
  br label %108

108:                                              ; preds = %100, %101
  %109 = phi float [ %107, %101 ], [ 0.000000e+00, %100 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #9
  store i32 0, ptr %8, align 4, !tbaa !44
  %110 = getelementptr inbounds i8, ptr %2, i64 24
  %111 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #9
  %.not352 = icmp eq i64 %111, 0
  br i1 %.not352, label %._crit_edge331.thread, label %.lr.ph330

.lr.ph330:                                        ; preds = %108
  %112 = getelementptr inbounds i8, ptr %3, i64 16
  br label %114

._crit_edge331:                                   ; preds = %114
  %.pre357 = load i32, ptr %8, align 4, !tbaa !44
  %113 = icmp slt i32 %.pre357, 128
  br i1 %113, label %._crit_edge331.thread, label %185

114:                                              ; preds = %.lr.ph330, %114
  %.0277328 = phi i64 [ 0, %.lr.ph330 ], [ %139, %114 ]
  %115 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %.0277328) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  %116 = load float, ptr %115, align 4, !tbaa !39
  %117 = call float @llvm.fabs.f32(float %116)
  %118 = fmul float %109, %117
  %119 = load i32, ptr %112, align 4, !tbaa !23
  %120 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %118, i32 noundef %119)
  store i32 %120, ptr %9, align 4, !tbaa !44
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %122 = load i32, ptr %121, align 4, !tbaa !44
  store i32 %122, ptr %8, align 4, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  %123 = getelementptr inbounds i8, ptr %115, i64 4
  %124 = load float, ptr %123, align 4, !tbaa !39
  %125 = call float @llvm.fabs.f32(float %124)
  %126 = fmul float %109, %125
  %127 = load i32, ptr %112, align 4, !tbaa !23
  %128 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %126, i32 noundef %127)
  store i32 %128, ptr %10, align 4, !tbaa !44
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %130 = load i32, ptr %129, align 4, !tbaa !44
  store i32 %130, ptr %8, align 4, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  %131 = getelementptr inbounds i8, ptr %115, i64 8
  %132 = load float, ptr %131, align 4, !tbaa !39
  %133 = call float @llvm.fabs.f32(float %132)
  %134 = fmul float %109, %133
  %135 = load i32, ptr %112, align 4, !tbaa !23
  %136 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %134, i32 noundef %135)
  store i32 %136, ptr %11, align 4, !tbaa !44
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %138 = load i32, ptr %137, align 4, !tbaa !44
  store i32 %138, ptr %8, align 4, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  %139 = add nuw i64 %.0277328, 1
  %140 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #9
  %141 = icmp ult i64 %139, %140
  br i1 %141, label %114, label %._crit_edge331, !llvm.loop !45

._crit_edge331.thread:                            ; preds = %108, %._crit_edge331
  %142 = getelementptr inbounds i8, ptr %3, i64 20
  %143 = load i8, ptr %142, align 4, !tbaa !35, !range !20, !noundef !21
  %144 = trunc nuw i8 %143 to i1
  br i1 %144, label %185, label %.preheader

.preheader:                                       ; preds = %._crit_edge331.thread
  %145 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #9
  %.not353 = icmp eq i64 %145, 0
  br i1 %.not353, label %._crit_edge335, label %.lr.ph334

.lr.ph334:                                        ; preds = %.preheader
  %146 = getelementptr inbounds i8, ptr %3, i64 16
  %147 = getelementptr inbounds i8, ptr %12, i64 1
  %148 = getelementptr inbounds i8, ptr %12, i64 2
  %149 = getelementptr inbounds i8, ptr %12, i64 3
  br label %150

._crit_edge335:                                   ; preds = %150, %.preheader
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format, i64 32, i1 false)
  br label %232

150:                                              ; preds = %.lr.ph334, %150
  %.0280333 = phi i64 [ 0, %.lr.ph334 ], [ %182, %150 ]
  %151 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %.0280333) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #9
  %152 = load float, ptr %151, align 4, !tbaa !39
  %153 = fcmp oge float %152, 0.000000e+00
  %154 = call float @llvm.fabs.f32(float %152)
  %155 = fmul float %109, %154
  %156 = load i32, ptr %146, align 4, !tbaa !23
  %157 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %155, i32 noundef %156)
  %158 = sub nsw i32 0, %157
  %159 = select i1 %153, i32 %157, i32 %158
  %160 = trunc i32 %159 to i8
  store i8 %160, ptr %12, align 1, !tbaa !46
  %161 = getelementptr inbounds i8, ptr %151, i64 4
  %162 = load float, ptr %161, align 4, !tbaa !39
  %163 = fcmp oge float %162, 0.000000e+00
  %164 = call float @llvm.fabs.f32(float %162)
  %165 = fmul float %109, %164
  %166 = load i32, ptr %146, align 4, !tbaa !23
  %167 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %165, i32 noundef %166)
  %168 = sub nsw i32 0, %167
  %169 = select i1 %163, i32 %167, i32 %168
  %170 = trunc i32 %169 to i8
  store i8 %170, ptr %147, align 1, !tbaa !46
  %171 = getelementptr inbounds i8, ptr %151, i64 8
  %172 = load float, ptr %171, align 4, !tbaa !39
  %173 = fcmp oge float %172, 0.000000e+00
  %174 = call float @llvm.fabs.f32(float %172)
  %175 = fmul float %109, %174
  %176 = load i32, ptr %146, align 4, !tbaa !23
  %177 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %175, i32 noundef %176)
  %178 = sub nsw i32 0, %177
  %179 = select i1 %173, i32 %177, i32 %178
  %180 = trunc i32 %179 to i8
  store i8 %180, ptr %148, align 1, !tbaa !46
  store i8 0, ptr %149, align 1, !tbaa !46
  %181 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %12, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #9
  %182 = add nuw i64 %.0280333, 1
  %183 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #9
  %184 = icmp ult i64 %182, %183
  br i1 %184, label %150, label %._crit_edge335, !llvm.loop !47

185:                                              ; preds = %._crit_edge331.thread, %._crit_edge331
  %186 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #9
  %.not354 = icmp eq i64 %186, 0
  br i1 %.not354, label %._crit_edge339, label %.lr.ph338

.lr.ph338:                                        ; preds = %185
  %187 = getelementptr inbounds i8, ptr %3, i64 16
  %188 = getelementptr inbounds i8, ptr %13, i64 2
  %189 = getelementptr inbounds i8, ptr %13, i64 4
  %190 = getelementptr inbounds i8, ptr %13, i64 6
  br label %197

._crit_edge339:                                   ; preds = %197, %185
  store i32 3, ptr %0, align 8, !tbaa !28
  %191 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 3, ptr %191, align 4, !tbaa !34
  %192 = getelementptr inbounds i8, ptr %0, i64 8
  %193 = getelementptr inbounds i8, ptr %3, i64 20
  %194 = load i8, ptr %193, align 4, !tbaa !35, !range !20, !noundef !21
  store i8 %194, ptr %192, align 8, !tbaa !36
  %195 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 8, ptr %195, align 8, !tbaa !37
  %196 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %196, align 8, !tbaa !38
  br label %232

197:                                              ; preds = %.lr.ph338, %197
  %.0284336 = phi i64 [ 0, %.lr.ph338 ], [ %229, %197 ]
  %198 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %110, i64 noundef %.0284336) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #9
  %199 = load float, ptr %198, align 4, !tbaa !39
  %200 = fcmp oge float %199, 0.000000e+00
  %201 = call float @llvm.fabs.f32(float %199)
  %202 = fmul float %109, %201
  %203 = load i32, ptr %187, align 4, !tbaa !23
  %204 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %202, i32 noundef %203)
  %205 = sub nsw i32 0, %204
  %206 = select i1 %200, i32 %204, i32 %205
  %207 = trunc i32 %206 to i16
  store i16 %207, ptr %13, align 2, !tbaa !40
  %208 = getelementptr inbounds i8, ptr %198, i64 4
  %209 = load float, ptr %208, align 4, !tbaa !39
  %210 = fcmp oge float %209, 0.000000e+00
  %211 = call float @llvm.fabs.f32(float %209)
  %212 = fmul float %109, %211
  %213 = load i32, ptr %187, align 4, !tbaa !23
  %214 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %212, i32 noundef %213)
  %215 = sub nsw i32 0, %214
  %216 = select i1 %210, i32 %214, i32 %215
  %217 = trunc i32 %216 to i16
  store i16 %217, ptr %188, align 2, !tbaa !40
  %218 = getelementptr inbounds i8, ptr %198, i64 8
  %219 = load float, ptr %218, align 4, !tbaa !39
  %220 = fcmp oge float %219, 0.000000e+00
  %221 = call float @llvm.fabs.f32(float %219)
  %222 = fmul float %109, %221
  %223 = load i32, ptr %187, align 4, !tbaa !23
  %224 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %222, i32 noundef %223)
  %225 = sub nsw i32 0, %224
  %226 = select i1 %220, i32 %224, i32 %225
  %227 = trunc i32 %226 to i16
  store i16 %227, ptr %189, align 2, !tbaa !40
  store i16 0, ptr %190, align 2, !tbaa !40
  %228 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %13, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #9
  %229 = add nuw i64 %.0284336, 1
  %230 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %110) #9
  %231 = icmp ult i64 %229, %230
  br i1 %231, label %197, label %._crit_edge339, !llvm.loop !48

232:                                              ; preds = %._crit_edge339, %._crit_edge335
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #9
  br label %527

233:                                              ; preds = %6
  %234 = getelementptr inbounds i8, ptr %5, i64 140
  %235 = load i8, ptr %234, align 4, !tbaa !16, !range !20, !noundef !21
  %236 = trunc nuw i8 %235 to i1
  br i1 %236, label %238, label %237

237:                                              ; preds = %233
  tail call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 2, i64 noundef 2)
  br label %527

238:                                              ; preds = %233
  %239 = getelementptr inbounds i8, ptr %5, i64 18
  %240 = load i8, ptr %239, align 2, !tbaa !49, !range !20, !noundef !21
  %241 = trunc nuw i8 %240 to i1
  br i1 %241, label %242, label %249

242:                                              ; preds = %238
  %243 = getelementptr inbounds i8, ptr %4, i64 16
  %244 = load i32, ptr %243, align 4, !tbaa !50
  %245 = getelementptr inbounds i8, ptr %5, i64 142
  %246 = load i8, ptr %245, align 2, !tbaa !25, !range !20, !noundef !21
  %247 = trunc nuw i8 %246 to i1
  %248 = select i1 %247, i32 2, i32 3
  tail call void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 2, i32 noundef 2, ptr noundef nonnull align 4 dereferenceable(148) %5, i32 noundef %244, i32 noundef %248)
  br label %527

249:                                              ; preds = %238
  %250 = getelementptr inbounds i8, ptr %4, i64 8
  %251 = load float, ptr %250, align 4, !tbaa !39
  %252 = fcmp oeq float %251, 0.000000e+00
  %253 = fdiv float 1.000000e+00, %251
  %254 = select i1 %252, float 0.000000e+00, float %253
  %255 = getelementptr inbounds i8, ptr %4, i64 12
  %256 = load float, ptr %255, align 4, !tbaa !39
  %257 = fcmp oeq float %256, 0.000000e+00
  %258 = fdiv float 1.000000e+00, %256
  %259 = select i1 %257, float 0.000000e+00, float %258
  %260 = getelementptr inbounds i8, ptr %2, i64 24
  %261 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %260) #9
  %.not351 = icmp eq i64 %261, 0
  br i1 %.not351, label %._crit_edge327, label %.lr.ph326

.lr.ph326:                                        ; preds = %249
  %262 = getelementptr inbounds i8, ptr %4, i64 16
  %263 = getelementptr inbounds i8, ptr %14, i64 2
  %264 = getelementptr inbounds i8, ptr %4, i64 4
  br label %271

._crit_edge327:                                   ; preds = %271, %249
  store i32 2, ptr %0, align 8, !tbaa !28
  %265 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 4, ptr %265, align 4, !tbaa !34
  %266 = getelementptr inbounds i8, ptr %0, i64 8
  %267 = getelementptr inbounds i8, ptr %4, i64 20
  %268 = load i8, ptr %267, align 4, !tbaa !52, !range !20, !noundef !21
  store i8 %268, ptr %266, align 8, !tbaa !36
  %269 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 4, ptr %269, align 8, !tbaa !37
  %270 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %270, align 8, !tbaa !38
  br label %527

271:                                              ; preds = %.lr.ph326, %271
  %.0285324 = phi i64 [ 0, %.lr.ph326 ], [ %289, %271 ]
  %272 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %260, i64 noundef %.0285324) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #9
  %273 = load float, ptr %272, align 4, !tbaa !39
  %274 = load float, ptr %4, align 4, !tbaa !39
  %275 = fsub float %273, %274
  %276 = fmul float %254, %275
  %277 = load i32, ptr %262, align 4, !tbaa !50
  %278 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %276, i32 noundef %277)
  %279 = trunc i32 %278 to i16
  store i16 %279, ptr %14, align 2, !tbaa !40
  %280 = getelementptr inbounds i8, ptr %272, i64 4
  %281 = load float, ptr %280, align 4, !tbaa !39
  %282 = load float, ptr %264, align 4, !tbaa !39
  %283 = fsub float %281, %282
  %284 = fmul float %259, %283
  %285 = load i32, ptr %262, align 4, !tbaa !50
  %286 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %284, i32 noundef %285)
  %287 = trunc i32 %286 to i16
  store i16 %287, ptr %263, align 2, !tbaa !40
  %288 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %14, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #9
  %289 = add nuw i64 %.0285324, 1
  %290 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %260) #9
  %291 = icmp ult i64 %289, %290
  br i1 %291, label %271, label %._crit_edge327, !llvm.loop !53

292:                                              ; preds = %6
  %293 = getelementptr inbounds i8, ptr %5, i64 140
  %294 = load i8, ptr %293, align 4, !tbaa !16, !range !20, !noundef !21
  %295 = trunc nuw i8 %294 to i1
  br i1 %295, label %297, label %296

296:                                              ; preds = %292
  tail call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 3, i64 noundef 3)
  br label %527

297:                                              ; preds = %292
  %298 = getelementptr inbounds i8, ptr %5, i64 19
  %299 = load i8, ptr %298, align 1, !tbaa !54, !range !20, !noundef !21
  %300 = trunc nuw i8 %299 to i1
  br i1 %300, label %301, label %311

301:                                              ; preds = %297
  %302 = getelementptr inbounds i8, ptr %5, i64 8
  %303 = load i32, ptr %302, align 4, !tbaa !55
  %304 = getelementptr inbounds i8, ptr %5, i64 142
  %305 = load i8, ptr %304, align 2, !tbaa !25, !range !20, !noundef !21
  %306 = trunc nuw i8 %305 to i1
  %307 = getelementptr inbounds i8, ptr %2, i64 8
  %308 = load i32, ptr %307, align 8
  %.not = icmp eq i32 %308, 0
  %309 = select i1 %.not, i32 3, i32 2
  %310 = select i1 %306, i32 2, i32 %309
  tail call void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 3, i32 noundef 3, ptr noundef nonnull align 4 dereferenceable(148) %5, i32 noundef %303, i32 noundef %310)
  br label %527

311:                                              ; preds = %297
  %312 = getelementptr inbounds i8, ptr %5, i64 142
  %313 = load i8, ptr %312, align 2, !tbaa !25, !range !20, !noundef !21
  %314 = trunc nuw i8 %313 to i1
  %315 = getelementptr inbounds i8, ptr %2, i64 8
  %316 = load i32, ptr %315, align 8
  %317 = icmp eq i32 %316, 0
  %318 = select i1 %314, i1 %317, i1 false
  %319 = getelementptr inbounds i8, ptr %5, i64 8
  %320 = load i32, ptr %319, align 4, !tbaa !55
  %321 = zext i1 %318 to i32
  %322 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %323 = icmp sgt i32 %320, 8
  %324 = select i1 %323, i64 8, i64 4
  %325 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %326 = getelementptr inbounds i8, ptr %2, i64 24
  %327 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %326) #9
  %328 = select i1 %323, i64 3, i64 2
  %329 = shl i64 %327, %328
  %330 = add i64 %329, %325
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %330)
  %331 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %322)
  %332 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %326) #9
  %333 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %326, i64 noundef 0) #9
  br i1 %318, label %334, label %335

334:                                              ; preds = %311
  tail call void @meshopt_encodeFilterOct(ptr noundef nonnull %331, i64 noundef %332, i64 noundef %324, i32 noundef %320, ptr noundef nonnull %333)
  br label %336

335:                                              ; preds = %311
  tail call void @_ZL11encodeSnormPvmmiPKf(ptr noundef nonnull %331, i64 noundef %332, i64 noundef %324, i32 noundef %320, ptr noundef nonnull %333)
  br label %336

336:                                              ; preds = %335, %334
  %337 = select i1 %323, i32 3, i32 1
  store i32 3, ptr %0, align 8, !tbaa !28
  %338 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %337, ptr %338, align 4, !tbaa !34
  %339 = getelementptr inbounds i8, ptr %0, i64 8
  store i8 1, ptr %339, align 8, !tbaa !36
  %340 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %324, ptr %340, align 8, !tbaa !37
  %341 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %321, ptr %341, align 8, !tbaa !38
  br label %527

342:                                              ; preds = %6
  %343 = getelementptr inbounds i8, ptr %5, i64 140
  %344 = load i8, ptr %343, align 4, !tbaa !16, !range !20, !noundef !21
  %345 = trunc nuw i8 %344 to i1
  br i1 %345, label %347, label %346

346:                                              ; preds = %342
  tail call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 4, i64 noundef 4)
  br label %527

347:                                              ; preds = %342
  %348 = getelementptr inbounds i8, ptr %5, i64 142
  %349 = load i8, ptr %348, align 2, !tbaa !25, !range !20, !noundef !21
  %350 = trunc nuw i8 %349 to i1
  %351 = getelementptr inbounds i8, ptr %2, i64 8
  %352 = load i32, ptr %351, align 8
  %353 = icmp eq i32 %352, 0
  %354 = select i1 %350, i1 %353, i1 false
  %355 = getelementptr inbounds i8, ptr %5, i64 8
  %356 = load i32, ptr %355, align 4, !tbaa !55
  %357 = tail call i32 @llvm.smin.i32(i32 %356, i32 8)
  %358 = zext i1 %354 to i32
  %359 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %360 = tail call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %361 = getelementptr inbounds i8, ptr %2, i64 24
  %362 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %361) #9
  %363 = shl i64 %362, 2
  %364 = add i64 %363, %360
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %364)
  %365 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %359)
  %366 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %361) #9
  %367 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %361, i64 noundef 0) #9
  br i1 %354, label %368, label %369

368:                                              ; preds = %347
  tail call void @meshopt_encodeFilterOct(ptr noundef nonnull %365, i64 noundef %366, i64 noundef 4, i32 noundef %357, ptr noundef nonnull %367)
  br label %370

369:                                              ; preds = %347
  tail call void @_ZL11encodeSnormPvmmiPKf(ptr noundef nonnull %365, i64 noundef %366, i64 noundef 4, i32 noundef %357, ptr noundef nonnull %367)
  br label %370

370:                                              ; preds = %369, %368
  %371 = load i32, ptr %351, align 8, !tbaa !26
  %372 = icmp eq i32 %371, 0
  %373 = select i1 %372, i32 4, i32 3
  store i32 %373, ptr %0, align 8, !tbaa !28
  %374 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 1, ptr %374, align 4, !tbaa !34
  %375 = getelementptr inbounds i8, ptr %0, i64 8
  store i8 1, ptr %375, align 8, !tbaa !36
  %376 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 4, ptr %376, align 8, !tbaa !37
  %377 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %358, ptr %377, align 8, !tbaa !38
  br label %527

378:                                              ; preds = %6
  %379 = getelementptr inbounds i8, ptr %5, i64 12
  %380 = load i32, ptr %379, align 4, !tbaa !56
  %381 = getelementptr inbounds i8, ptr %2, i64 24
  %382 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %381) #9
  %.not350 = icmp eq i64 %382, 0
  br i1 %.not350, label %._crit_edge323, label %.lr.ph322

.lr.ph322:                                        ; preds = %378
  %383 = icmp sgt i32 %380, 8
  %384 = getelementptr inbounds i8, ptr %16, i64 1
  %385 = getelementptr inbounds i8, ptr %16, i64 2
  %386 = getelementptr inbounds i8, ptr %16, i64 3
  %387 = getelementptr inbounds i8, ptr %15, i64 2
  %388 = getelementptr inbounds i8, ptr %15, i64 4
  %389 = getelementptr inbounds i8, ptr %15, i64 6
  br label %391

._crit_edge323:                                   ; preds = %424, %378
  %390 = icmp sgt i32 %380, 8
  br i1 %390, label %428, label %429

391:                                              ; preds = %.lr.ph322, %424
  %.0286320 = phi i64 [ 0, %.lr.ph322 ], [ %425, %424 ]
  %392 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %381, i64 noundef %.0286320) #9
  %393 = getelementptr inbounds i8, ptr %392, i64 4
  %394 = getelementptr inbounds i8, ptr %392, i64 8
  %395 = getelementptr inbounds i8, ptr %392, i64 12
  br i1 %383, label %396, label %410

396:                                              ; preds = %391
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #9
  %397 = load float, ptr %392, align 4, !tbaa !39
  %398 = call noundef i32 @_ZL13quantizeColorfii(float noundef %397, i32 noundef 16, i32 noundef %380)
  %399 = trunc i32 %398 to i16
  store i16 %399, ptr %15, align 2, !tbaa !40
  %400 = load float, ptr %393, align 4, !tbaa !39
  %401 = call noundef i32 @_ZL13quantizeColorfii(float noundef %400, i32 noundef 16, i32 noundef %380)
  %402 = trunc i32 %401 to i16
  store i16 %402, ptr %387, align 2, !tbaa !40
  %403 = load float, ptr %394, align 4, !tbaa !39
  %404 = call noundef i32 @_ZL13quantizeColorfii(float noundef %403, i32 noundef 16, i32 noundef %380)
  %405 = trunc i32 %404 to i16
  store i16 %405, ptr %388, align 2, !tbaa !40
  %406 = load float, ptr %395, align 4, !tbaa !39
  %407 = call noundef i32 @_ZL13quantizeColorfii(float noundef %406, i32 noundef 16, i32 noundef %380)
  %408 = trunc i32 %407 to i16
  store i16 %408, ptr %389, align 2, !tbaa !40
  %409 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %15, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #9
  br label %424

410:                                              ; preds = %391
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  %411 = load float, ptr %392, align 4, !tbaa !39
  %412 = call noundef i32 @_ZL13quantizeColorfii(float noundef %411, i32 noundef 8, i32 noundef %380)
  %413 = trunc i32 %412 to i8
  store i8 %413, ptr %16, align 1, !tbaa !46
  %414 = load float, ptr %393, align 4, !tbaa !39
  %415 = call noundef i32 @_ZL13quantizeColorfii(float noundef %414, i32 noundef 8, i32 noundef %380)
  %416 = trunc i32 %415 to i8
  store i8 %416, ptr %384, align 1, !tbaa !46
  %417 = load float, ptr %394, align 4, !tbaa !39
  %418 = call noundef i32 @_ZL13quantizeColorfii(float noundef %417, i32 noundef 8, i32 noundef %380)
  %419 = trunc i32 %418 to i8
  store i8 %419, ptr %385, align 1, !tbaa !46
  %420 = load float, ptr %395, align 4, !tbaa !39
  %421 = call noundef i32 @_ZL13quantizeColorfii(float noundef %420, i32 noundef 8, i32 noundef %380)
  %422 = trunc i32 %421 to i8
  store i8 %422, ptr %386, align 1, !tbaa !46
  %423 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %16, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  br label %424

424:                                              ; preds = %410, %396
  %425 = add nuw i64 %.0286320, 1
  %426 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %381) #9
  %427 = icmp ult i64 %425, %426
  br i1 %427, label %391, label %._crit_edge323, !llvm.loop !57

428:                                              ; preds = %._crit_edge323
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.4, i64 32, i1 false)
  br label %527

429:                                              ; preds = %._crit_edge323
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.5, i64 32, i1 false)
  br label %527

._crit_edge319:                                   ; preds = %462, %.preheader296
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.6, i64 32, i1 false)
  br label %527

430:                                              ; preds = %.lr.ph318, %462
  %.0287317 = phi i64 [ 0, %.lr.ph318 ], [ %464, %462 ]
  %431 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef %.0287317) #9
  %432 = load float, ptr %431, align 4, !tbaa !39
  %433 = getelementptr inbounds i8, ptr %431, i64 4
  %434 = load float, ptr %433, align 4, !tbaa !39
  %435 = fadd float %432, %434
  %436 = getelementptr inbounds i8, ptr %431, i64 8
  %437 = load float, ptr %436, align 4, !tbaa !39
  %438 = fadd float %435, %437
  %439 = getelementptr inbounds i8, ptr %431, i64 12
  %440 = load float, ptr %439, align 4, !tbaa !39
  %441 = fadd float %438, %440
  %442 = fcmp oeq float %441, 0.000000e+00
  %443 = fdiv float 1.000000e+00, %441
  %444 = select i1 %442, float 0.000000e+00, float %443
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #9
  %445 = fmul float %432, %444
  %446 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %445, i32 noundef 8)
  %447 = trunc i32 %446 to i8
  store i8 %447, ptr %17, align 1, !tbaa !46
  %448 = load float, ptr %433, align 4, !tbaa !39
  %449 = fmul float %444, %448
  %450 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %449, i32 noundef 8)
  %451 = trunc i32 %450 to i8
  store i8 %451, ptr %28, align 1, !tbaa !46
  %452 = load float, ptr %436, align 4, !tbaa !39
  %453 = fmul float %444, %452
  %454 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %453, i32 noundef 8)
  %455 = trunc i32 %454 to i8
  store i8 %455, ptr %29, align 1, !tbaa !46
  %456 = load float, ptr %439, align 4, !tbaa !39
  %457 = fmul float %444, %456
  %458 = call noundef i32 @_Z21meshopt_quantizeUnormfi(float noundef %457, i32 noundef 8)
  %459 = trunc i32 %458 to i8
  store i8 %459, ptr %30, align 1, !tbaa !46
  %460 = fcmp une float %444, 0.000000e+00
  br i1 %460, label %461, label %462

461:                                              ; preds = %430
  call void @_ZL18renormalizeWeightsRA4_h(ptr noundef nonnull align 1 dereferenceable(4) %17)
  br label %462

462:                                              ; preds = %461, %430
  %463 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %17, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #9
  %464 = add nuw i64 %.0287317, 1
  %465 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #9
  %466 = icmp ult i64 %464, %465
  br i1 %466, label %430, label %._crit_edge319, !llvm.loop !58

467:                                              ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #9
  store i32 0, ptr %18, align 4, !tbaa !44
  %468 = getelementptr inbounds i8, ptr %2, i64 24
  %469 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %468) #9
  %.not346 = icmp eq i64 %469, 0
  br i1 %.not346, label %.preheader297, label %.lr.ph308

._crit_edge309:                                   ; preds = %.lr.ph308
  %.pre356 = load i32, ptr %18, align 4, !tbaa !44
  %470 = icmp ult i32 %.pre356, 65536
  br i1 %470, label %480, label %479

.lr.ph308:                                        ; preds = %467, %.lr.ph308
  %.0283306 = phi i64 [ %476, %.lr.ph308 ], [ 0, %467 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #9
  %471 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %468, i64 noundef %.0283306) #9
  %472 = load float, ptr %471, align 4, !tbaa !39
  %473 = fptoui float %472 to i32
  store i32 %473, ptr %19, align 4, !tbaa !44
  %474 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %475 = load i32, ptr %474, align 4, !tbaa !44
  store i32 %475, ptr %18, align 4, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  %476 = add nuw i64 %.0283306, 1
  %477 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %468) #9
  %478 = icmp ult i64 %476, %477
  br i1 %478, label %.lr.ph308, label %._crit_edge309, !llvm.loop !59

479:                                              ; preds = %._crit_edge309
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.2, i32 noundef 602, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings) #10
  unreachable

480:                                              ; preds = %._crit_edge309
  %481 = icmp ult i32 %.pre356, 256
  br i1 %481, label %.preheader297, label %.preheader298

.preheader298:                                    ; preds = %480
  %482 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %468) #9
  %.not347 = icmp eq i64 %482, 0
  br i1 %.not347, label %._crit_edge313, label %.lr.ph312

.preheader297:                                    ; preds = %467, %480
  %483 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %468) #9
  %.not348 = icmp eq i64 %483, 0
  br i1 %.not348, label %._crit_edge316, label %.lr.ph315

._crit_edge316:                                   ; preds = %.lr.ph315, %.preheader297
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.8, i64 32, i1 false)
  br label %498

.lr.ph315:                                        ; preds = %.preheader297, %.lr.ph315
  %.0282314 = phi i64 [ %488, %.lr.ph315 ], [ 0, %.preheader297 ]
  %484 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %468, i64 noundef %.0282314) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #9
  %485 = load <4 x float>, ptr %484, align 4, !tbaa !39
  %486 = fptoui <4 x float> %485 to <4 x i8>
  store <4 x i8> %486, ptr %20, align 4, !tbaa !46
  %487 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %20, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #9
  %488 = add nuw i64 %.0282314, 1
  %489 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %468) #9
  %490 = icmp ult i64 %488, %489
  br i1 %490, label %.lr.ph315, label %._crit_edge316, !llvm.loop !60

._crit_edge313:                                   ; preds = %.lr.ph312, %.preheader298
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.9, i64 32, i1 false)
  br label %498

.lr.ph312:                                        ; preds = %.preheader298, %.lr.ph312
  %.0281311 = phi i64 [ %495, %.lr.ph312 ], [ 0, %.preheader298 ]
  %491 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %468, i64 noundef %.0281311) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #9
  %492 = load <4 x float>, ptr %491, align 4, !tbaa !39
  %493 = fptoui <4 x float> %492 to <4 x i16>
  store <4 x i16> %493, ptr %21, align 8, !tbaa !40
  %494 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %21, i64 noundef 8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #9
  %495 = add nuw i64 %.0281311, 1
  %496 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %468) #9
  %497 = icmp ult i64 %495, %496
  br i1 %497, label %.lr.ph312, label %._crit_edge313, !llvm.loop !61

498:                                              ; preds = %._crit_edge313, %._crit_edge316
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #9
  br label %527

499:                                              ; preds = %6
  %500 = getelementptr inbounds i8, ptr %5, i64 142
  %501 = load i8, ptr %500, align 2, !tbaa !25, !range !20, !noundef !21
  %502 = trunc nuw i8 %501 to i1
  br i1 %502, label %504, label %503

503:                                              ; preds = %499
  tail call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 1, i64 noundef 1)
  br label %527

504:                                              ; preds = %499
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #9
  store i32 0, ptr %22, align 4, !tbaa !44
  %505 = getelementptr inbounds i8, ptr %2, i64 24
  %506 = tail call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %505) #9
  %.not344 = icmp eq i64 %506, 0
  br i1 %.not344, label %.preheader299, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %.pre = load i32, ptr %22, align 4, !tbaa !44
  %507 = icmp ugt i32 %.pre, 8388607
  br i1 %507, label %517, label %.preheader299

.preheader299:                                    ; preds = %504, %._crit_edge
  %508 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %505) #9
  %.not345 = icmp eq i64 %508, 0
  br i1 %.not345, label %._crit_edge305, label %.lr.ph304

.lr.ph:                                           ; preds = %504, %.lr.ph
  %.0279302 = phi i64 [ %514, %.lr.ph ], [ 0, %504 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #9
  %509 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %505, i64 noundef %.0279302) #9
  %510 = load float, ptr %509, align 4, !tbaa !39
  %511 = fptoui float %510 to i32
  store i32 %511, ptr %23, align 4, !tbaa !44
  %512 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %513 = load i32, ptr %512, align 4, !tbaa !44
  store i32 %513, ptr %22, align 4, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #9
  %514 = add nuw i64 %.0279302, 1
  %515 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %505) #9
  %516 = icmp ult i64 %514, %515
  br i1 %516, label %.lr.ph, label %._crit_edge, !llvm.loop !62

517:                                              ; preds = %._crit_edge
  call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 1, i64 noundef 1)
  br label %525

._crit_edge305:                                   ; preds = %.lr.ph304, %.preheader299
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) @__const._Z17writeVertexStreamRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6StreamRK20QuantizationPositionRK19QuantizationTextureRK8Settings.format.10, i64 32, i1 false)
  br label %525

.lr.ph304:                                        ; preds = %.preheader299, %.lr.ph304
  %.0278303 = phi i64 [ %522, %.lr.ph304 ], [ 0, %.preheader299 ]
  %518 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNKSt6vectorI4AttrSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %505, i64 noundef %.0278303) #9
  %519 = load float, ptr %518, align 4, !tbaa !39
  %520 = fptoui float %519 to i32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #9
  store i32 %520, ptr %24, align 4, !tbaa !44
  %521 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull %24, i64 noundef 4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #9
  %522 = add nuw i64 %.0278303, 1
  %523 = call noundef i64 @_ZNKSt6vectorI4AttrSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %505) #9
  %524 = icmp ult i64 %522, %523
  br i1 %524, label %.lr.ph304, label %._crit_edge305, !llvm.loop !63

525:                                              ; preds = %._crit_edge305, %517
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #9
  br label %527

526:                                              ; preds = %6
  tail call void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind writable sret(%struct.StreamFormat) align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, i32 noundef 4, i64 noundef 4)
  br label %527

527:                                              ; preds = %428, %429, %526, %525, %503, %498, %._crit_edge319, %370, %346, %336, %301, %296, %._crit_edge327, %242, %237, %232, %._crit_edge343, %40, %35
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL20writeVertexStreamRawRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typem(ptr dead_on_unwind noalias writable sret(%struct.StreamFormat) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL22writeVertexStreamFloatRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6Stream10cgltf_typeiRK8Settingsi21meshopt_EncodeExpMode(ptr dead_on_unwind noalias writable sret(%struct.StreamFormat) align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(148), i32 noundef, i32 noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #6 align 2

declare void @meshopt_encodeFilterOct(ptr noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11encodeSnormPvmmiPKf(ptr noundef, i64 noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL13quantizeColorfii(float noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL18renormalizeWeightsRA4_h(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { "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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { 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, !7, i64 0}
!6 = !{!"_ZTS6Stream", !7, i64 0, !10, i64 4, !10, i64 8, !11, i64 16, !12, i64 24}
!7 = !{!"_ZTS20cgltf_attribute_type", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSSt6vectorI4AttrSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseI4AttrSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI4AttrSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!16 = !{!17, !18, i64 140}
!17 = !{!"_ZTS8Settings", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !18, i64 16, !18, i64 17, !18, i64 18, !18, i64 19, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !18, i64 36, !18, i64 37, !18, i64 38, !18, i64 39, !18, i64 40, !18, i64 41, !18, i64 42, !18, i64 43, !19, i64 44, !19, i64 48, !18, i64 52, !18, i64 53, !18, i64 54, !19, i64 56, !10, i64 60, !18, i64 64, !18, i64 65, !18, i64 66, !18, i64 67, !18, i64 68, !8, i64 72, !8, i64 88, !8, i64 104, !8, i64 120, !10, i64 136, !18, i64 140, !18, i64 141, !18, i64 142, !18, i64 143, !10, i64 144}
!18 = !{!"bool", !8, i64 0}
!19 = !{!"float", !8, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!17, !18, i64 17}
!23 = !{!24, !10, i64 16}
!24 = !{!"_ZTS20QuantizationPosition", !8, i64 0, !19, i64 12, !10, i64 16, !18, i64 20, !19, i64 24}
!25 = !{!17, !18, i64 142}
!26 = !{!6, !10, i64 8}
!27 = !{!24, !19, i64 12}
!28 = !{!29, !30, i64 0}
!29 = !{!"_ZTS12StreamFormat", !30, i64 0, !31, i64 4, !18, i64 8, !32, i64 16, !33, i64 24}
!30 = !{!"_ZTS10cgltf_type", !8, i64 0}
!31 = !{!"_ZTS20cgltf_component_type", !8, i64 0}
!32 = !{!"long", !8, i64 0}
!33 = !{!"_ZTSN12StreamFormat6FilterE", !8, i64 0}
!34 = !{!29, !31, i64 4}
!35 = !{!24, !18, i64 20}
!36 = !{!29, !18, i64 8}
!37 = !{!29, !32, i64 16}
!38 = !{!29, !33, i64 24}
!39 = !{!19, !19, i64 0}
!40 = !{!41, !41, i64 0}
!41 = !{!"short", !8, i64 0}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{!10, !10, i64 0}
!45 = distinct !{!45, !43}
!46 = !{!8, !8, i64 0}
!47 = distinct !{!47, !43}
!48 = distinct !{!48, !43}
!49 = !{!17, !18, i64 18}
!50 = !{!51, !10, i64 16}
!51 = !{!"_ZTS19QuantizationTexture", !8, i64 0, !8, i64 8, !10, i64 16, !18, i64 20}
!52 = !{!51, !18, i64 20}
!53 = distinct !{!53, !43}
!54 = !{!17, !18, i64 19}
!55 = !{!17, !10, i64 8}
!56 = !{!17, !10, i64 12}
!57 = distinct !{!57, !43}
!58 = distinct !{!58, !43}
!59 = distinct !{!59, !43}
!60 = distinct !{!60, !43}
!61 = distinct !{!61, !43}
!62 = distinct !{!62, !43}
!63 = distinct !{!63, !43}


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