; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.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: mustprogress uwtable
define dso_local noundef i32 @_Z16serialize_headerPK9ModelSpecPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = 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
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.ModelSpec, ptr %16, i32 0, i32 4
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = mul i64 128, %19
  %21 = add i64 144, %20
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.ModelSpec, ptr %22, i32 0, i32 4
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = mul i64 92, %25
  %27 = add i64 %21, %26
  %28 = add i64 %27, 4
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ModelSpec, ptr %29, i32 0, i32 7
  %31 = load i32, ptr %30, align 8, !tbaa !13
  %32 = sext i32 %31 to i64
  %33 = mul i64 128, %32
  %34 = add i64 %28, %33
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %5, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %36 = load i32, ptr %5, align 4, !tbaa !14
  %37 = call noundef ptr @_Z9mt_mallocj(i32 noundef %36)
  store ptr %37, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %38, 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 !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr %7, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr %8, ptr %10, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ModelSpec, ptr %41, i32 0, i32 0
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef %39, ptr noundef %40, ptr noundef %42, i32 noundef 1)
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ModelSpec, ptr %45, i32 0, i32 1
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef %43, ptr noundef %44, ptr noundef %46, i32 noundef 1)
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ModelSpec, ptr %49, i32 0, i32 2
  %51 = getelementptr inbounds [128 x i8], ptr %50, i64 0, i64 0
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef %47, ptr noundef %48, ptr noundef %51, i32 noundef 128)
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.ModelSpec, ptr %54, i32 0, i32 3
  call void @_Z15serialize_fieldI8DataTypeEvPPhPjPKT_i(ptr noundef %52, ptr noundef %53, ptr noundef %55, i32 noundef 1)
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ModelSpec, ptr %58, i32 0, i32 4
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef %56, ptr noundef %57, ptr noundef %59, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !14
  br label %60

60:                                               ; preds = %77, %2
  %61 = load i32, ptr %11, align 4, !tbaa !14
  %62 = load ptr, ptr %3, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ModelSpec, ptr %62, i32 0, i32 4
  %64 = load i32, ptr %63, align 4, !tbaa !9
  %65 = icmp slt i32 %61, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %80

67:                                               ; preds = %60
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ModelSpec, ptr %70, i32 0, i32 5
  %72 = load ptr, ptr %71, align 8, !tbaa !15
  %73 = load i32, ptr %11, align 4, !tbaa !14
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds ptr, ptr %72, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef %68, ptr noundef %69, ptr noundef %76, i32 noundef 128)
  br label %77

77:                                               ; preds = %67
  %78 = load i32, ptr %11, align 4, !tbaa !14
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %11, align 4, !tbaa !14
  br label %60, !llvm.loop !16

80:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !14
  br label %81

81:                                               ; preds = %97, %80
  %82 = load i32, ptr %12, align 4, !tbaa !14
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.ModelSpec, ptr %83, i32 0, i32 4
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = icmp slt i32 %82, %85
  br i1 %86, label %88, label %87

87:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %100

88:                                               ; preds = %81
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ModelSpec, ptr %91, i32 0, i32 6
  %93 = load ptr, ptr %92, align 8, !tbaa !18
  %94 = load i32, ptr %12, align 4, !tbaa !14
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds %struct.TensorDesc, ptr %93, i64 %95
  call void @_Z15serialize_fieldI10TensorDescEvPPhPjPKT_i(ptr noundef %89, ptr noundef %90, ptr noundef %96, i32 noundef 1)
  br label %97

97:                                               ; preds = %88
  %98 = load i32, ptr %12, align 4, !tbaa !14
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %12, align 4, !tbaa !14
  br label %81, !llvm.loop !19

100:                                              ; preds = %87
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ModelSpec, ptr %103, i32 0, i32 7
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef %101, ptr noundef %102, ptr noundef %104, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !14
  br label %105

105:                                              ; preds = %122, %100
  %106 = load i32, ptr %13, align 4, !tbaa !14
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ModelSpec, ptr %107, i32 0, i32 7
  %109 = load i32, ptr %108, align 8, !tbaa !13
  %110 = icmp slt i32 %106, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %125

112:                                              ; preds = %105
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ModelSpec, ptr %115, i32 0, i32 8
  %117 = load ptr, ptr %116, align 8, !tbaa !20
  %118 = load i32, ptr %13, align 4, !tbaa !14
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  %121 = load ptr, ptr %120, align 8, !tbaa !5
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef %113, ptr noundef %114, ptr noundef %121, i32 noundef 128)
  br label %122

122:                                              ; preds = %112
  %123 = load i32, ptr %13, align 4, !tbaa !14
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %13, align 4, !tbaa !14
  br label %105, !llvm.loop !21

125:                                              ; preds = %111
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = load i32, ptr %126, align 4, !tbaa !14
  %128 = load i32, ptr %5, align 4, !tbaa !14
  %129 = icmp eq i32 %127, %128
  br i1 %129, label %140, label %130

130:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %131 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %132 = trunc i64 %131 to i32
  store i32 %132, ptr %14, align 4, !tbaa !14
  %133 = load i32, ptr %14, align 4, !tbaa !14
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %133)
  %135 = load ptr, ptr @stdout, align 8, !tbaa !5
  %136 = call i32 @fflush(ptr noundef %135)
  %137 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %138 = load ptr, ptr @stdout, align 8, !tbaa !5
  %139 = call i32 @fflush(ptr noundef %138)
  call void @exit(i32 noundef 1) #8
  unreachable

140:                                              ; preds = %125
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = ptrtoint ptr %142 to i64
  %145 = ptrtoint ptr %143 to i64
  %146 = sub i64 %144, %145
  %147 = trunc i64 %146 to i32
  %148 = load i32, ptr %5, align 4, !tbaa !14
  %149 = icmp eq i32 %147, %148
  br i1 %149, label %160, label %150

150:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %151 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %152 = trunc i64 %151 to i32
  store i32 %152, ptr %15, align 4, !tbaa !14
  %153 = load i32, ptr %15, align 4, !tbaa !14
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %153)
  %155 = load ptr, ptr @stdout, align 8, !tbaa !5
  %156 = call i32 @fflush(ptr noundef %155)
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %158 = load ptr, ptr @stdout, align 8, !tbaa !5
  %159 = call i32 @fflush(ptr noundef %158)
  call void @exit(i32 noundef 1) #8
  unreachable

160:                                              ; preds = %140
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %161) #7
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = load i32, ptr %5, align 4, !tbaa !14
  %166 = zext i32 %165 to i64
  %167 = getelementptr inbounds i8, ptr %164, i64 %166
  %168 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignIPhvEERS4_T_S8_(ptr noundef nonnull align 8 dereferenceable(32) %162, ptr noundef %163, ptr noundef %167)
  call void @_Z7mt_freeIhEvRPT_(ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret i32 0
}

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

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

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

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

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

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

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

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

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

declare i32 @fflush(ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32)) #6 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) #0 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = { "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 = { 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 #6 = { 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 #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, !11, i64 140}
!10 = !{!"_ZTS9ModelSpec", !11, i64 0, !11, i64 4, !7, i64 8, !12, i64 136, !11, i64 140, !6, i64 144, !6, i64 152, !11, i64 160, !6, i64 168, !11, i64 176, !6, i64 184, !11, i64 192, !6, i64 200, !11, i64 208, !6, i64 216, !6, i64 224}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS8DataType", !7, i64 0}
!13 = !{!10, !11, i64 160}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !6, i64 144}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !6, i64 152}
!19 = distinct !{!19, !17}
!20 = !{!10, !6, i64 168}
!21 = distinct !{!21, !17}


; 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.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.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 uwtable
define dso_local noundef i32 @_Z16serialize_headerPK9ModelSpecPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = getelementptr inbounds i8, ptr %0, i64 140
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 160
  %9 = load i32, ptr %8, align 8, !tbaa !12
  %10 = shl i32 %9, 7
  %reass.mul = mul i32 %7, 220
  %11 = add i32 %reass.mul, 148
  %12 = add i32 %11, %10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %13 = tail call noundef ptr @_Z9mt_mallocj(i32 noundef %12)
  store ptr %13, ptr %3, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store ptr %13, ptr %4, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !14
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %0, i32 noundef 1)
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %14, i32 noundef 1)
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %15, i32 noundef 128)
  %16 = getelementptr inbounds i8, ptr %0, i64 136
  call void @_Z15serialize_fieldI8DataTypeEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %16, i32 noundef 1)
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, i32 noundef 1)
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2
  %19 = getelementptr inbounds i8, ptr %0, i64 144
  br label %22

.preheader:                                       ; preds = %22
  %20 = icmp sgt i32 %26, 0
  br i1 %20, label %.lr.ph56, label %._crit_edge

.lr.ph56:                                         ; preds = %.preheader
  %21 = getelementptr inbounds i8, ptr %0, i64 152
  br label %32

22:                                               ; preds = %.lr.ph, %22
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %22 ]
  %23 = load ptr, ptr %19, align 8, !tbaa !15
  %24 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %25, i32 noundef 128)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = load i32, ptr %6, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = icmp slt i64 %indvars.iv.next, %27
  br i1 %28, label %22, label %.preheader, !llvm.loop !16

._crit_edge:                                      ; preds = %32, %2, %.preheader
  call void @_Z15serialize_fieldIiEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %8, i32 noundef 1)
  %29 = load i32, ptr %8, align 8, !tbaa !12
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph59, label %._crit_edge60

.lr.ph59:                                         ; preds = %._crit_edge
  %31 = getelementptr inbounds i8, ptr %0, i64 168
  br label %40

32:                                               ; preds = %.lr.ph56, %32
  %indvars.iv62 = phi i64 [ 0, %.lr.ph56 ], [ %indvars.iv.next63, %32 ]
  %33 = load ptr, ptr %21, align 8, !tbaa !18
  %34 = getelementptr inbounds %struct.TensorDesc, ptr %33, i64 %indvars.iv62
  call void @_Z15serialize_fieldI10TensorDescEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %34, i32 noundef 1)
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %35 = load i32, ptr %6, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = icmp slt i64 %indvars.iv.next63, %36
  br i1 %37, label %32, label %._crit_edge, !llvm.loop !19

._crit_edge60:                                    ; preds = %40, %._crit_edge
  %38 = load i32, ptr %5, align 4, !tbaa !14
  %39 = icmp eq i32 %38, %12
  br i1 %39, label %56, label %47

40:                                               ; preds = %.lr.ph59, %40
  %indvars.iv65 = phi i64 [ 0, %.lr.ph59 ], [ %indvars.iv.next66, %40 ]
  %41 = load ptr, ptr %31, align 8, !tbaa !20
  %42 = getelementptr inbounds ptr, ptr %41, i64 %indvars.iv65
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  call void @_Z15serialize_fieldIcEvPPhPjPKT_i(ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef %43, i32 noundef 128)
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %44 = load i32, ptr %8, align 8, !tbaa !12
  %45 = sext i32 %44 to i64
  %46 = icmp slt i64 %indvars.iv.next66, %45
  br i1 %46, label %40, label %._crit_edge60, !llvm.loop !21

47:                                               ; preds = %._crit_edge60
  %48 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %49 = trunc i64 %48 to i32
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %49)
  %51 = load ptr, ptr @stdout, align 8, !tbaa !13
  %52 = call i32 @fflush(ptr noundef %51)
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %54 = load ptr, ptr @stdout, align 8, !tbaa !13
  %55 = call i32 @fflush(ptr noundef %54)
  call void @exit(i32 noundef 1) #8
  unreachable

56:                                               ; preds = %._crit_edge60
  %57 = load ptr, ptr %4, align 8, !tbaa !13
  %58 = ptrtoint ptr %57 to i64
  %59 = ptrtoint ptr %13 to i64
  %60 = sub i64 %58, %59
  %61 = trunc i64 %60 to i32
  %62 = icmp eq i32 %12, %61
  br i1 %62, label %72, label %63

63:                                               ; preds = %56
  %64 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %65 = trunc i64 %64 to i32
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %65)
  %67 = load ptr, ptr @stdout, align 8, !tbaa !13
  %68 = call i32 @fflush(ptr noundef %67)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %70 = load ptr, ptr @stdout, align 8, !tbaa !13
  %71 = call i32 @fflush(ptr noundef %70)
  call void @exit(i32 noundef 1) #8
  unreachable

72:                                               ; preds = %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %73 = zext i32 %12 to i64
  %74 = getelementptr inbounds i8, ptr %13, i64 %73
  %75 = 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 %74)
  call void @_Z7mt_freeIhEvRPT_(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i32 0
}

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5clearEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6 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 #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = { 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 #5 = { 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 #6 = { 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 #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, !7, i64 140}
!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 160}
!13 = !{!11, !11, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !11, i64 144}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!6, !11, i64 152}
!19 = distinct !{!19, !17}
!20 = !{!6, !11, i64 168}
!21 = distinct !{!21, !17}


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