; LLVM IR from huawei-noah/bolt :: common/model_spec/src (model_serialize)

; 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.ModelSpec = type { i32, i32, [128 x i8], i32, i32, ptr, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr }
%struct.WeightSpec = type { [128 x i8], i32, i32, ptr, i32, ptr, i32, ptr }
%struct.QuantSpec = type { i32, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z9mt_mallocj(i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldI8DataTypeEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #2

declare i32 @printf(ptr noundef, ...) #3

declare i32 @fflush(ptr noundef) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z7mt_freeIhEvRPT_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIfEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIhEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17serialize_weightsPK9ModelSpecPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0, ptr noundef %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 4, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.ModelSpec, ptr %22, i32 0, i32 12
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  store ptr %24, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %25

25:                                               ; preds = %96, %2
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ModelSpec, ptr %27, i32 0, i32 11
  %29 = load i32, ptr %28, align 8, !tbaa !14
  %30 = icmp slt i32 %26, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %25
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %99

32:                                               ; preds = %25
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = call noundef zeroext i1 @_Z20isDeprecatedOpWeightPK9ModelSpeci(ptr noundef %33, i32 noundef %34)
  br i1 %35, label %36, label %39

36:                                               ; preds = %32
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %5, align 4, !tbaa !9
  br label %96

39:                                               ; preds = %32
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.WeightSpec, ptr %40, i64 %42
  %44 = getelementptr inbounds %struct.WeightSpec, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !15
  %46 = zext i32 %45 to i64
  %47 = add i64 148, %46
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds %struct.WeightSpec, ptr %48, i64 %50
  %52 = getelementptr inbounds %struct.WeightSpec, ptr %51, i32 0, i32 4
  %53 = load i32, ptr %52, align 8, !tbaa !17
  %54 = zext i32 %53 to i64
  %55 = add i64 %47, %54
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = add i64 %57, %55
  %59 = trunc i64 %58 to i32
  store i32 %59, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %92, %39
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds %struct.WeightSpec, ptr %62, i64 %64
  %66 = getelementptr inbounds %struct.WeightSpec, ptr %65, i32 0, i32 6
  %67 = load i32, ptr %66, align 8, !tbaa !18
  %68 = icmp ult i32 %61, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %60
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %95

70:                                               ; preds = %60
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = add i64 %72, 4
  %74 = trunc i64 %73 to i32
  store i32 %74, ptr %6, align 4, !tbaa !9
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds %struct.WeightSpec, ptr %75, i64 %77
  %79 = getelementptr inbounds %struct.WeightSpec, ptr %78, i32 0, i32 7
  %80 = load ptr, ptr %79, align 8, !tbaa !19
  %81 = load i32, ptr %10, align 4, !tbaa !9
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds %struct.QuantSpec, ptr %80, i64 %82
  %84 = getelementptr inbounds %struct.QuantSpec, ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 8, !tbaa !20
  %86 = sext i32 %85 to i64
  %87 = mul i64 %86, 4
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = add i64 %89, %87
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr %6, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %70
  %93 = load i32, ptr %10, align 4, !tbaa !9
  %94 = add i32 %93, 1
  store i32 %94, ptr %10, align 4, !tbaa !9
  br label %60, !llvm.loop !22

95:                                               ; preds = %69
  br label %96

96:                                               ; preds = %95, %36
  %97 = load i32, ptr %8, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %8, align 4, !tbaa !9
  br label %25, !llvm.loop !24

99:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %100 = load i32, ptr %6, align 4, !tbaa !9
  %101 = call noundef ptr @_Z9mt_mallocj(i32 noundef %100)
  store ptr %101, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %102, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr %12, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store ptr %13, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ModelSpec, ptr %103, i32 0, i32 11
  %105 = load i32, ptr %104, align 8, !tbaa !14
  %106 = load i32, ptr %5, align 4, !tbaa !9
  %107 = sub nsw i32 %105, %106
  store i32 %107, ptr %16, align 4, !tbaa !9
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef %108, ptr noundef %109, ptr noundef %16, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %253, %99
  %111 = load i32, ptr %17, align 4, !tbaa !9
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.ModelSpec, ptr %112, i32 0, i32 11
  %114 = load i32, ptr %113, align 8, !tbaa !14
  %115 = icmp slt i32 %111, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %110
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %256

117:                                              ; preds = %110
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = load i32, ptr %17, align 4, !tbaa !9
  %120 = call noundef zeroext i1 @_Z20isDeprecatedOpWeightPK9ModelSpeci(ptr noundef %118, i32 noundef %119)
  br i1 %120, label %121, label %122

121:                                              ; preds = %117
  br label %253

122:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = load i32, ptr %17, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.WeightSpec, ptr %123, i64 %125
  %127 = getelementptr inbounds %struct.WeightSpec, ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 4, !tbaa !15
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = load i32, ptr %17, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds %struct.WeightSpec, ptr %129, i64 %131
  %133 = getelementptr inbounds %struct.WeightSpec, ptr %132, i32 0, i32 4
  %134 = load i32, ptr %133, align 8, !tbaa !17
  %135 = add i32 %128, %134
  store i32 %135, ptr %18, align 4, !tbaa !9
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef %136, ptr noundef %137, ptr noundef %18, i32 noundef 1)
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  %139 = load ptr, ptr %15, align 8, !tbaa !5
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = load i32, ptr %17, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds %struct.WeightSpec, ptr %140, i64 %142
  %144 = getelementptr inbounds %struct.WeightSpec, ptr %143, i32 0, i32 0
  %145 = getelementptr inbounds [128 x i8], ptr %144, i64 0, i64 0
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef %138, ptr noundef %139, ptr noundef %145, i32 noundef 128)
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = load ptr, ptr %15, align 8, !tbaa !5
  %148 = load ptr, ptr %7, align 8, !tbaa !5
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds %struct.WeightSpec, ptr %148, i64 %150
  %152 = getelementptr inbounds %struct.WeightSpec, ptr %151, i32 0, i32 1
  call void @_Z15serialize_fieldI8DataTypeEvPPhPjPKT_i(ptr noundef %146, ptr noundef %147, ptr noundef %152, i32 noundef 1)
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = load i32, ptr %17, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds %struct.WeightSpec, ptr %155, i64 %157
  %159 = getelementptr inbounds %struct.WeightSpec, ptr %158, i32 0, i32 2
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef %153, ptr noundef %154, ptr noundef %159, i32 noundef 1)
  %160 = load ptr, ptr %14, align 8, !tbaa !5
  %161 = load ptr, ptr %15, align 8, !tbaa !5
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = load i32, ptr %17, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds %struct.WeightSpec, ptr %162, i64 %164
  %166 = getelementptr inbounds %struct.WeightSpec, ptr %165, i32 0, i32 3
  %167 = load ptr, ptr %166, align 8, !tbaa !25
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = load i32, ptr %17, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %struct.WeightSpec, ptr %168, i64 %170
  %172 = getelementptr inbounds %struct.WeightSpec, ptr %171, i32 0, i32 2
  %173 = load i32, ptr %172, align 4, !tbaa !15
  call void @_Z15serialize_fieldIhEvPPhPjPKT_i(ptr noundef %160, ptr noundef %161, ptr noundef %167, i32 noundef %173)
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = load ptr, ptr %15, align 8, !tbaa !5
  %176 = load ptr, ptr %7, align 8, !tbaa !5
  %177 = load i32, ptr %17, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds %struct.WeightSpec, ptr %176, i64 %178
  %180 = getelementptr inbounds %struct.WeightSpec, ptr %179, i32 0, i32 4
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef %174, ptr noundef %175, ptr noundef %180, i32 noundef 1)
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  %184 = load i32, ptr %17, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds %struct.WeightSpec, ptr %183, i64 %185
  %187 = getelementptr inbounds %struct.WeightSpec, ptr %186, i32 0, i32 5
  %188 = load ptr, ptr %187, align 8, !tbaa !26
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = load i32, ptr %17, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds %struct.WeightSpec, ptr %189, i64 %191
  %193 = getelementptr inbounds %struct.WeightSpec, ptr %192, i32 0, i32 4
  %194 = load i32, ptr %193, align 8, !tbaa !17
  call void @_Z15serialize_fieldIhEvPPhPjPKT_i(ptr noundef %181, ptr noundef %182, ptr noundef %188, i32 noundef %194)
  %195 = load ptr, ptr %14, align 8, !tbaa !5
  %196 = load ptr, ptr %15, align 8, !tbaa !5
  %197 = load ptr, ptr %7, align 8, !tbaa !5
  %198 = load i32, ptr %17, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds %struct.WeightSpec, ptr %197, i64 %199
  %201 = getelementptr inbounds %struct.WeightSpec, ptr %200, i32 0, i32 6
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef %195, ptr noundef %196, ptr noundef %201, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %202

202:                                              ; preds = %249, %122
  %203 = load i32, ptr %19, align 4, !tbaa !9
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = load i32, ptr %17, align 4, !tbaa !9
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds %struct.WeightSpec, ptr %204, i64 %206
  %208 = getelementptr inbounds %struct.WeightSpec, ptr %207, i32 0, i32 6
  %209 = load i32, ptr %208, align 8, !tbaa !18
  %210 = icmp ult i32 %203, %209
  br i1 %210, label %212, label %211

211:                                              ; preds = %202
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %252

212:                                              ; preds = %202
  %213 = load ptr, ptr %14, align 8, !tbaa !5
  %214 = load ptr, ptr %15, align 8, !tbaa !5
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = load i32, ptr %17, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds %struct.WeightSpec, ptr %215, i64 %217
  %219 = getelementptr inbounds %struct.WeightSpec, ptr %218, i32 0, i32 7
  %220 = load ptr, ptr %219, align 8, !tbaa !19
  %221 = load i32, ptr %19, align 4, !tbaa !9
  %222 = zext i32 %221 to i64
  %223 = getelementptr inbounds %struct.QuantSpec, ptr %220, i64 %222
  %224 = getelementptr inbounds %struct.QuantSpec, ptr %223, i32 0, i32 0
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef %213, ptr noundef %214, ptr noundef %224, i32 noundef 1)
  %225 = load ptr, ptr %14, align 8, !tbaa !5
  %226 = load ptr, ptr %15, align 8, !tbaa !5
  %227 = load ptr, ptr %7, align 8, !tbaa !5
  %228 = load i32, ptr %17, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds %struct.WeightSpec, ptr %227, i64 %229
  %231 = getelementptr inbounds %struct.WeightSpec, ptr %230, i32 0, i32 7
  %232 = load ptr, ptr %231, align 8, !tbaa !19
  %233 = load i32, ptr %19, align 4, !tbaa !9
  %234 = zext i32 %233 to i64
  %235 = getelementptr inbounds %struct.QuantSpec, ptr %232, i64 %234
  %236 = getelementptr inbounds %struct.QuantSpec, ptr %235, i32 0, i32 1
  %237 = load ptr, ptr %236, align 8, !tbaa !27
  %238 = load ptr, ptr %7, align 8, !tbaa !5
  %239 = load i32, ptr %17, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds %struct.WeightSpec, ptr %238, i64 %240
  %242 = getelementptr inbounds %struct.WeightSpec, ptr %241, i32 0, i32 7
  %243 = load ptr, ptr %242, align 8, !tbaa !19
  %244 = load i32, ptr %19, align 4, !tbaa !9
  %245 = zext i32 %244 to i64
  %246 = getelementptr inbounds %struct.QuantSpec, ptr %243, i64 %245
  %247 = getelementptr inbounds %struct.QuantSpec, ptr %246, i32 0, i32 0
  %248 = load i32, ptr %247, align 8, !tbaa !20
  call void @_Z15serialize_fieldIfEvPPhPjPKT_i(ptr noundef %225, ptr noundef %226, ptr noundef %237, i32 noundef %248)
  br label %249

249:                                              ; preds = %212
  %250 = load i32, ptr %19, align 4, !tbaa !9
  %251 = add i32 %250, 1
  store i32 %251, ptr %19, align 4, !tbaa !9
  br label %202, !llvm.loop !28

252:                                              ; preds = %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %253

253:                                              ; preds = %252, %121
  %254 = load i32, ptr %17, align 4, !tbaa !9
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %17, align 4, !tbaa !9
  br label %110, !llvm.loop !29

256:                                              ; preds = %116
  %257 = load ptr, ptr %15, align 8, !tbaa !5
  %258 = load i32, ptr %257, align 4, !tbaa !9
  %259 = load i32, ptr %6, align 4, !tbaa !9
  %260 = icmp eq i32 %258, %259
  br i1 %260, label %271, label %261

261:                                              ; preds = %256
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %262 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %263 = trunc i64 %262 to i32
  store i32 %263, ptr %20, align 4, !tbaa !9
  %264 = load i32, ptr %20, align 4, !tbaa !9
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %264)
  %266 = load ptr, ptr @stdout, align 8, !tbaa !5
  %267 = call i32 @fflush(ptr noundef %266)
  %268 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %269 = load ptr, ptr @stdout, align 8, !tbaa !5
  %270 = call i32 @fflush(ptr noundef %269)
  call void @exit(i32 noundef 1) #8
  unreachable

271:                                              ; preds = %256
  %272 = load ptr, ptr %14, align 8, !tbaa !5
  %273 = load ptr, ptr %272, align 8, !tbaa !5
  %274 = load ptr, ptr %11, align 8, !tbaa !5
  %275 = ptrtoint ptr %273 to i64
  %276 = ptrtoint ptr %274 to i64
  %277 = sub i64 %275, %276
  %278 = trunc i64 %277 to i32
  %279 = load i32, ptr %6, align 4, !tbaa !9
  %280 = icmp eq i32 %278, %279
  br i1 %280, label %291, label %281

281:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %282 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %283 = trunc i64 %282 to i32
  store i32 %283, ptr %21, align 4, !tbaa !9
  %284 = load i32, ptr %21, align 4, !tbaa !9
  %285 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %284)
  %286 = load ptr, ptr @stdout, align 8, !tbaa !5
  %287 = call i32 @fflush(ptr noundef %286)
  %288 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %289 = load ptr, ptr @stdout, align 8, !tbaa !5
  %290 = call i32 @fflush(ptr noundef %289)
  call void @exit(i32 noundef 1) #8
  unreachable

291:                                              ; preds = %271
  %292 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %292) #7
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = load ptr, ptr %11, align 8, !tbaa !5
  %295 = load ptr, ptr %11, align 8, !tbaa !5
  %296 = load i32, ptr %6, align 4, !tbaa !9
  %297 = zext i32 %296 to i64
  %298 = getelementptr inbounds i8, ptr %295, i64 %297
  %299 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignIPhvEERS4_T_S8_(ptr noundef nonnull align 8 dereferenceable(32) %293, ptr noundef %294, ptr noundef %298)
  call void @_Z7mt_freeIhEvRPT_(ptr noundef nonnull align 8 dereferenceable(8) %11)
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret i32 0
}

declare noundef zeroext i1 @_Z20isDeprecatedOpWeightPK9ModelSpeci(ptr noundef, i32 noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 200}
!12 = !{!"_ZTS9ModelSpec", !10, i64 0, !10, i64 4, !7, i64 8, !13, i64 136, !10, i64 140, !6, i64 144, !6, i64 152, !10, i64 160, !6, i64 168, !10, i64 176, !6, i64 184, !10, i64 192, !6, i64 200, !10, i64 208, !6, i64 216, !6, i64 224}
!13 = !{!"_ZTS8DataType", !7, i64 0}
!14 = !{!12, !10, i64 192}
!15 = !{!16, !10, i64 132}
!16 = !{!"_ZTS10WeightSpec", !7, i64 0, !13, i64 128, !10, i64 132, !6, i64 136, !10, i64 144, !6, i64 152, !10, i64 160, !6, i64 168}
!17 = !{!16, !10, i64 144}
!18 = !{!16, !10, i64 160}
!19 = !{!16, !6, i64 168}
!20 = !{!21, !10, i64 0}
!21 = !{!"_ZTS9QuantSpec", !10, i64 0, !6, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!16, !6, i64 136}
!26 = !{!16, !6, i64 152}
!27 = !{!21, !6, i64 8}
!28 = distinct !{!28, !23}
!29 = distinct !{!29, !23}


; 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.WeightSpec = type { [128 x i8], i32, i32, ptr, i32, ptr, i32, ptr }
%struct.QuantSpec = type { i32, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z9mt_mallocj(i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldI8DataTypeEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z7mt_freeIhEvRPT_(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIfEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z15serialize_fieldIhEvPPhPjPKT_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z17serialize_weightsPK9ModelSpecPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0, ptr noundef %1) local_unnamed_addr #6 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = getelementptr inbounds i8, ptr %0, i64 200
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 192
  %11 = load i32, ptr %10, align 8, !tbaa !12
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph105, label %._crit_edge

._crit_edge:                                      ; preds = %.loopexit, %2
  %.094.lcssa = phi i32 [ 4, %2 ], [ %.2, %.loopexit ]
  %.0.lcssa = phi i32 [ 0, %2 ], [ %.1, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %13 = tail call noundef ptr @_Z9mt_mallocj(i32 noundef %.094.lcssa)
  store ptr %13, ptr %3, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  store ptr %13, ptr %4, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store i32 0, ptr %5, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  %14 = load i32, ptr %10, align 8, !tbaa !12
  %15 = sub nsw i32 %14, %.0.lcssa
  store i32 %15, ptr %6, align 4, !tbaa !14
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, i32 noundef 1)
  %16 = load i32, ptr %10, align 8, !tbaa !12
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph114, label %._crit_edge115

.lr.ph105:                                        ; preds = %2, %.loopexit
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %.loopexit ], [ 0, %2 ]
  %.0104 = phi i32 [ %.1, %.loopexit ], [ 0, %2 ]
  %.094103 = phi i32 [ %.2, %.loopexit ], [ 4, %2 ]
  %18 = trunc nuw nsw i64 %indvars.iv118 to i32
  %19 = tail call noundef zeroext i1 @_Z20isDeprecatedOpWeightPK9ModelSpeci(ptr noundef nonnull %0, i32 noundef %18)
  br i1 %19, label %20, label %22

20:                                               ; preds = %.lr.ph105
  %21 = add nsw i32 %.0104, 1
  br label %.loopexit

22:                                               ; preds = %.lr.ph105
  %23 = getelementptr inbounds %struct.WeightSpec, ptr %9, i64 %indvars.iv118
  %24 = getelementptr inbounds i8, ptr %23, i64 132
  %25 = load i32, ptr %24, align 4, !tbaa !15
  %26 = getelementptr inbounds i8, ptr %23, i64 144
  %27 = load i32, ptr %26, align 8, !tbaa !17
  %28 = add i32 %.094103, 148
  %29 = add i32 %28, %25
  %30 = add i32 %29, %27
  %31 = getelementptr inbounds i8, ptr %23, i64 160
  %32 = load i32, ptr %31, align 8, !tbaa !18
  %.not = icmp eq i32 %32, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %33 = getelementptr inbounds i8, ptr %23, i64 168
  %34 = load ptr, ptr %33, align 8, !tbaa !19
  %wide.trip.count = zext i32 %32 to i64
  %min.iters.check = icmp ult i32 %32, 9
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.mod.vf = and i64 %wide.trip.count, 7
  %35 = icmp eq i64 %n.mod.vf, 0
  %36 = select i1 %35, i64 8, i64 %n.mod.vf
  %n.vec = sub nsw i64 %wide.trip.count, %36
  %37 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %30, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %37, %vector.ph ], [ %73, %vector.body ]
  %vec.phi127 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %74, %vector.body ]
  %38 = or disjoint i64 %index, 1
  %39 = or disjoint i64 %index, 2
  %40 = or disjoint i64 %index, 3
  %41 = or disjoint i64 %index, 4
  %42 = or disjoint i64 %index, 5
  %43 = or disjoint i64 %index, 6
  %44 = or disjoint i64 %index, 7
  %45 = add <4 x i32> %vec.phi, <i32 4, i32 4, i32 4, i32 4>
  %46 = add <4 x i32> %vec.phi127, <i32 4, i32 4, i32 4, i32 4>
  %47 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %index
  %48 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %38
  %49 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %39
  %50 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %40
  %51 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %41
  %52 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %42
  %53 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %43
  %54 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %44
  %55 = load i32, ptr %47, align 8, !tbaa !20
  %56 = load i32, ptr %48, align 8, !tbaa !20
  %57 = load i32, ptr %49, align 8, !tbaa !20
  %58 = load i32, ptr %50, align 8, !tbaa !20
  %59 = insertelement <4 x i32> poison, i32 %55, i64 0
  %60 = insertelement <4 x i32> %59, i32 %56, i64 1
  %61 = insertelement <4 x i32> %60, i32 %57, i64 2
  %62 = insertelement <4 x i32> %61, i32 %58, i64 3
  %63 = load i32, ptr %51, align 8, !tbaa !20
  %64 = load i32, ptr %52, align 8, !tbaa !20
  %65 = load i32, ptr %53, align 8, !tbaa !20
  %66 = load i32, ptr %54, align 8, !tbaa !20
  %67 = insertelement <4 x i32> poison, i32 %63, i64 0
  %68 = insertelement <4 x i32> %67, i32 %64, i64 1
  %69 = insertelement <4 x i32> %68, i32 %65, i64 2
  %70 = insertelement <4 x i32> %69, i32 %66, i64 3
  %71 = shl <4 x i32> %62, <i32 2, i32 2, i32 2, i32 2>
  %72 = shl <4 x i32> %70, <i32 2, i32 2, i32 2, i32 2>
  %73 = add <4 x i32> %45, %71
  %74 = add <4 x i32> %46, %72
  %index.next = add nuw i64 %index, 8
  %75 = icmp eq i64 %index.next, %n.vec
  br i1 %75, label %middle.block, label %vector.body, !llvm.loop !22

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %74, %73
  %76 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.195101.ph = phi i32 [ %30, %.lr.ph ], [ %76, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.195101 = phi i32 [ %81, %scalar.ph ], [ %.195101.ph, %scalar.ph.preheader ]
  %77 = add i32 %.195101, 4
  %78 = getelementptr inbounds %struct.QuantSpec, ptr %34, i64 %indvars.iv
  %79 = load i32, ptr %78, align 8, !tbaa !20
  %80 = shl i32 %79, 2
  %81 = add i32 %77, %80
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %scalar.ph, !llvm.loop !26

.loopexit:                                        ; preds = %scalar.ph, %22, %20
  %.2 = phi i32 [ %.094103, %20 ], [ %30, %22 ], [ %81, %scalar.ph ]
  %.1 = phi i32 [ %21, %20 ], [ %.0104, %22 ], [ %.0104, %scalar.ph ]
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %82 = load i32, ptr %10, align 8, !tbaa !12
  %83 = sext i32 %82 to i64
  %84 = icmp slt i64 %indvars.iv.next119, %83
  br i1 %84, label %.lr.ph105, label %._crit_edge, !llvm.loop !27

._crit_edge115:                                   ; preds = %117, %._crit_edge
  %85 = load i32, ptr %5, align 4, !tbaa !14
  %86 = icmp eq i32 %85, %.094.lcssa
  br i1 %86, label %130, label %121

.lr.ph114:                                        ; preds = %._crit_edge, %117
  %indvars.iv124 = phi i64 [ %indvars.iv.next125, %117 ], [ 0, %._crit_edge ]
  %87 = trunc nuw nsw i64 %indvars.iv124 to i32
  %88 = call noundef zeroext i1 @_Z20isDeprecatedOpWeightPK9ModelSpeci(ptr noundef nonnull %0, i32 noundef %87)
  br i1 %88, label %117, label %89

89:                                               ; preds = %.lr.ph114
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  %90 = getelementptr inbounds %struct.WeightSpec, ptr %9, i64 %indvars.iv124
  %91 = getelementptr inbounds i8, ptr %90, i64 132
  %92 = load i32, ptr %91, align 4, !tbaa !15
  %93 = getelementptr inbounds i8, ptr %90, i64 144
  %94 = load i32, ptr %93, align 8, !tbaa !17
  %95 = add i32 %94, %92
  store i32 %95, ptr %7, align 4, !tbaa !14
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %7, i32 noundef 1)
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %90, i32 noundef 128)
  %96 = getelementptr inbounds i8, ptr %90, i64 128
  call void @_Z15serialize_fieldI8DataTypeEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %96, i32 noundef 1)
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %91, i32 noundef 1)
  %97 = getelementptr inbounds i8, ptr %90, i64 136
  %98 = load ptr, ptr %97, align 8, !tbaa !28
  %99 = load i32, ptr %91, align 4, !tbaa !15
  call void @_Z15serialize_fieldIhEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %98, i32 noundef %99)
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %93, i32 noundef 1)
  %100 = getelementptr inbounds i8, ptr %90, i64 152
  %101 = load ptr, ptr %100, align 8, !tbaa !29
  %102 = load i32, ptr %93, align 8, !tbaa !17
  call void @_Z15serialize_fieldIhEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %101, i32 noundef %102)
  %103 = getelementptr inbounds i8, ptr %90, i64 160
  call void @_Z15serialize_fieldIjEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %103, i32 noundef 1)
  %104 = load i32, ptr %103, align 8, !tbaa !18
  %.not116 = icmp eq i32 %104, 0
  br i1 %.not116, label %._crit_edge111, label %.lr.ph110

.lr.ph110:                                        ; preds = %89
  %105 = getelementptr inbounds i8, ptr %90, i64 168
  br label %106

._crit_edge111:                                   ; preds = %106, %89
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  br label %117

106:                                              ; preds = %.lr.ph110, %106
  %indvars.iv121 = phi i64 [ 0, %.lr.ph110 ], [ %indvars.iv.next122, %106 ]
  %107 = load ptr, ptr %105, align 8, !tbaa !19
  %108 = getelementptr inbounds %struct.QuantSpec, ptr %107, i64 %indvars.iv121
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %108, i32 noundef 1)
  %109 = load ptr, ptr %105, align 8, !tbaa !19
  %110 = getelementptr inbounds %struct.QuantSpec, ptr %109, i64 %indvars.iv121
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  %112 = load ptr, ptr %111, align 8, !tbaa !30
  %113 = load i32, ptr %110, align 8, !tbaa !20
  call void @_Z15serialize_fieldIfEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %112, i32 noundef %113)
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %114 = load i32, ptr %103, align 8, !tbaa !18
  %115 = zext i32 %114 to i64
  %116 = icmp ult i64 %indvars.iv.next122, %115
  br i1 %116, label %106, label %._crit_edge111, !llvm.loop !31

117:                                              ; preds = %.lr.ph114, %._crit_edge111
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %118 = load i32, ptr %10, align 8, !tbaa !12
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next125, %119
  br i1 %120, label %.lr.ph114, label %._crit_edge115, !llvm.loop !32

121:                                              ; preds = %._crit_edge115
  %122 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %123 = trunc i64 %122 to i32
  %124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %123)
  %125 = load ptr, ptr @stdout, align 8, !tbaa !13
  %126 = call i32 @fflush(ptr noundef %125)
  %127 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %128 = load ptr, ptr @stdout, align 8, !tbaa !13
  %129 = call i32 @fflush(ptr noundef %128)
  call void @exit(i32 noundef 1) #10
  unreachable

130:                                              ; preds = %._crit_edge115
  %131 = load ptr, ptr %4, align 8, !tbaa !13
  %132 = ptrtoint ptr %131 to i64
  %133 = ptrtoint ptr %13 to i64
  %134 = sub i64 %132, %133
  %135 = trunc i64 %134 to i32
  %136 = icmp eq i32 %.094.lcssa, %135
  br i1 %136, label %146, label %137

137:                                              ; preds = %130
  %138 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %139 = trunc i64 %138 to i32
  %140 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %139)
  %141 = load ptr, ptr @stdout, align 8, !tbaa !13
  %142 = call i32 @fflush(ptr noundef %141)
  %143 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %144 = load ptr, ptr @stdout, align 8, !tbaa !13
  %145 = call i32 @fflush(ptr noundef %144)
  call void @exit(i32 noundef 1) #10
  unreachable

146:                                              ; preds = %130
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #9
  %147 = zext i32 %.094.lcssa to i64
  %148 = getelementptr inbounds i8, ptr %13, i64 %147
  %149 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignIPhvEERS4_T_S8_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %13, ptr noundef %148)
  call void @_Z7mt_freeIhEvRPT_(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  ret i32 0
}

declare noundef zeroext i1 @_Z20isDeprecatedOpWeightPK9ModelSpeci(ptr noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { nofree 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 #4 = { 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 #5 = { 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 #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, !11, i64 200}
!6 = !{!"_ZTS9ModelSpec", !7, i64 0, !7, i64 4, !8, i64 8, !10, i64 136, !7, i64 140, !11, i64 144, !11, i64 152, !7, i64 160, !11, i64 168, !7, i64 176, !11, i64 184, !7, i64 192, !11, i64 200, !7, i64 208, !11, i64 216, !11, i64 224}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS8DataType", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 192}
!13 = !{!11, !11, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !7, i64 132}
!16 = !{!"_ZTS10WeightSpec", !8, i64 0, !10, i64 128, !7, i64 132, !11, i64 136, !7, i64 144, !11, i64 152, !7, i64 160, !11, i64 168}
!17 = !{!16, !7, i64 144}
!18 = !{!16, !7, i64 160}
!19 = !{!16, !11, i64 168}
!20 = !{!21, !7, i64 0}
!21 = !{!"_ZTS9QuantSpec", !7, i64 0, !11, i64 8}
!22 = distinct !{!22, !23, !24, !25}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.isvectorized", i32 1}
!25 = !{!"llvm.loop.unroll.runtime.disable"}
!26 = distinct !{!26, !23, !25, !24}
!27 = distinct !{!27, !23}
!28 = !{!16, !11, i64 136}
!29 = !{!16, !11, i64 152}
!30 = !{!21, !11, i64 8}
!31 = distinct !{!31, !23}
!32 = distinct !{!32, !23}


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