; LLVM IR from jingweizhanghuai/Morn :: src/deep_learning (morn_tensor_in_out)

; 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.MLayer = type { [32 x i8], i32, ptr, ptr, ptr, i32 }
%struct.TensorOutputPara = type { ptr, i32, i32, i32, ptr, ptr, [4 x [128 x i8]], float, float, float }
%struct.MTensor = type { i32, i32, i32, i32, ptr, i32 }

@.str.3 = external hidden unnamed_addr constant [94 x i8], align 1
@morn_network_flag = external global i32, align 4
@__FUNCTION__.TensorOutputSet = external hidden unnamed_addr constant [16 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [19 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local void @TensorOutputSet(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.MLayer, ptr %11, i32 0, i32 5
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = icmp ne i32 %13, -1
  br i1 %14, label %15, label %16

15:                                               ; preds = %1
  br label %239

16:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.MLayer, ptr %17, i32 0, i32 4
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  store ptr %19, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.TensorOutputPara, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = getelementptr inbounds %struct.MLayer, ptr %22, i32 0, i32 2
  %24 = load ptr, ptr %23, align 8, !tbaa !16
  store ptr %24, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.TensorOutputPara, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = getelementptr inbounds %struct.MLayer, ptr %27, i32 0, i32 3
  %29 = load ptr, ptr %28, align 8, !tbaa !17
  store ptr %29, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.MLayer, ptr %30, i32 0, i32 2
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  store ptr %32, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.TensorOutputPara, ptr %33, i32 0, i32 3
  %35 = load i32, ptr %34, align 8, !tbaa !18
  %36 = icmp eq i32 %35, -1
  br i1 %36, label %37, label %43

37:                                               ; preds = %16
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MTensor, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !19
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.TensorOutputPara, ptr %41, i32 0, i32 3
  store i32 %40, ptr %42, align 8, !tbaa !18
  br label %43

43:                                               ; preds = %37, %16
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.TensorOutputPara, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 8, !tbaa !21
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %54

48:                                               ; preds = %43
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.MTensor, ptr %49, i32 0, i32 2
  %51 = load i32, ptr %50, align 8, !tbaa !22
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.TensorOutputPara, ptr %52, i32 0, i32 1
  store i32 %51, ptr %53, align 8, !tbaa !21
  br label %54

54:                                               ; preds = %48, %43
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.TensorOutputPara, ptr %55, i32 0, i32 2
  %57 = load i32, ptr %56, align 4, !tbaa !23
  %58 = icmp eq i32 %57, -1
  br i1 %58, label %59, label %65

59:                                               ; preds = %54
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.MTensor, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %61, align 4, !tbaa !24
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.TensorOutputPara, ptr %63, i32 0, i32 2
  store i32 %62, ptr %64, align 4, !tbaa !23
  br label %65

65:                                               ; preds = %59, %54
  %66 = load i32, ptr @morn_network_flag, align 4, !tbaa !25
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %157

68:                                               ; preds = %65
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  call void @mTensorCopy(ptr noundef %69, ptr noundef %70, i32 noundef -1)
  br label %71

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 5, ptr %7, align 4, !tbaa !25
  %72 = load i32, ptr %7, align 4, !tbaa !25
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %79

74:                                               ; preds = %71
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.MTensor, ptr %76, i32 0, i32 4
  %78 = load ptr, ptr %77, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %75, i32 noundef -1, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %78, i32 noundef -1)
  br label %154

79:                                               ; preds = %71
  %80 = load i32, ptr %7, align 4, !tbaa !25
  %81 = icmp eq i32 %80, 4
  br i1 %81, label %82, label %100

82:                                               ; preds = %79
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.MTensor, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !27
  %87 = add nsw i32 %86, 0
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.MTensor, ptr %88, i32 0, i32 1
  %90 = load i32, ptr %89, align 4, !tbaa !19
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.MTensor, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 8, !tbaa !22
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.MTensor, ptr %94, i32 0, i32 3
  %96 = load i32, ptr %95, align 4, !tbaa !24
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.MTensor, ptr %97, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %83, i32 noundef %87, i32 noundef %90, i32 noundef %93, i32 noundef %96, ptr noundef %99, i32 noundef -1)
  br label %153

100:                                              ; preds = %79
  %101 = load i32, ptr %7, align 4, !tbaa !25
  %102 = icmp eq i32 %101, 5
  br i1 %102, label %103, label %121

103:                                              ; preds = %100
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.MTensor, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 8, !tbaa !27
  %108 = add nsw i32 %107, 0
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.MTensor, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !19
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.MTensor, ptr %112, i32 0, i32 2
  %114 = load i32, ptr %113, align 8, !tbaa !22
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.MTensor, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 4, !tbaa !24
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.MTensor, ptr %118, i32 0, i32 4
  %120 = load ptr, ptr %119, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %104, i32 noundef %108, i32 noundef %111, i32 noundef %114, i32 noundef %117, ptr noundef %120, i32 noundef -1)
  br label %152

121:                                              ; preds = %100
  %122 = load i32, ptr %7, align 4, !tbaa !25
  %123 = icmp eq i32 %122, 6
  br i1 %123, label %124, label %142

124:                                              ; preds = %121
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.MTensor, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !27
  %129 = add nsw i32 %128, 0
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.MTensor, ptr %130, i32 0, i32 1
  %132 = load i32, ptr %131, align 4, !tbaa !19
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.MTensor, ptr %133, i32 0, i32 2
  %135 = load i32, ptr %134, align 8, !tbaa !22
  %136 = load ptr, ptr %4, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.MTensor, ptr %136, i32 0, i32 3
  %138 = load i32, ptr %137, align 4, !tbaa !24
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.MTensor, ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %125, i32 noundef %129, i32 noundef %132, i32 noundef %135, i32 noundef %138, ptr noundef %141, i32 noundef -1)
  br label %151

142:                                              ; preds = %121
  br label %143

143:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 1, ptr %8, align 4, !tbaa !25
  %144 = load i32, ptr %8, align 4, !tbaa !25
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %148

146:                                              ; preds = %143
  %147 = load i32, ptr %8, align 4, !tbaa !25
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %147, i32 noundef -1, ptr noundef @.str.3, i32 noundef 118, ptr noundef @__FUNCTION__.TensorOutputSet, ptr noundef @.str.27)
  br label %148

148:                                              ; preds = %146, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150, %124
  br label %152

152:                                              ; preds = %151, %103
  br label %153

153:                                              ; preds = %152, %82
  br label %154

154:                                              ; preds = %153, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  br label %238

157:                                              ; preds = %65
  br label %158

158:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 5, ptr %9, align 4, !tbaa !25
  %159 = load i32, ptr %9, align 4, !tbaa !25
  %160 = icmp eq i32 %159, 0
  br i1 %160, label %161, label %166

161:                                              ; preds = %158
  %162 = load ptr, ptr %5, align 8, !tbaa !5
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.MTensor, ptr %163, i32 0, i32 4
  %165 = load ptr, ptr %164, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %162, i32 noundef -1, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %165, i32 noundef -1)
  br label %235

166:                                              ; preds = %158
  %167 = load i32, ptr %9, align 4, !tbaa !25
  %168 = icmp eq i32 %167, 4
  br i1 %168, label %169, label %187

169:                                              ; preds = %166
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.MTensor, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 8, !tbaa !27
  %174 = add nsw i32 %173, 0
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.MTensor, ptr %175, i32 0, i32 1
  %177 = load i32, ptr %176, align 4, !tbaa !19
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.MTensor, ptr %178, i32 0, i32 2
  %180 = load i32, ptr %179, align 8, !tbaa !22
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.MTensor, ptr %181, i32 0, i32 3
  %183 = load i32, ptr %182, align 4, !tbaa !24
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.MTensor, ptr %184, i32 0, i32 4
  %186 = load ptr, ptr %185, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %170, i32 noundef %174, i32 noundef %177, i32 noundef %180, i32 noundef %183, ptr noundef %186, i32 noundef -1)
  br label %234

187:                                              ; preds = %166
  %188 = load i32, ptr %9, align 4, !tbaa !25
  %189 = icmp eq i32 %188, 5
  br i1 %189, label %190, label %205

190:                                              ; preds = %187
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.MTensor, ptr %192, i32 0, i32 0
  %194 = load i32, ptr %193, align 8, !tbaa !27
  %195 = add nsw i32 %194, 0
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.MTensor, ptr %196, i32 0, i32 1
  %198 = load i32, ptr %197, align 4, !tbaa !19
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.MTensor, ptr %199, i32 0, i32 2
  %201 = load i32, ptr %200, align 8, !tbaa !22
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.MTensor, ptr %202, i32 0, i32 3
  %204 = load i32, ptr %203, align 4, !tbaa !24
  call void @TensorRedefine(ptr noundef %191, i32 noundef %195, i32 noundef %198, i32 noundef %201, i32 noundef %204, ptr noundef null, i32 noundef -1)
  br label %233

205:                                              ; preds = %187
  %206 = load i32, ptr %9, align 4, !tbaa !25
  %207 = icmp eq i32 %206, 6
  br i1 %207, label %208, label %223

208:                                              ; preds = %205
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.MTensor, ptr %210, i32 0, i32 0
  %212 = load i32, ptr %211, align 8, !tbaa !27
  %213 = add nsw i32 %212, 0
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.MTensor, ptr %214, i32 0, i32 1
  %216 = load i32, ptr %215, align 4, !tbaa !19
  %217 = load ptr, ptr %4, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.MTensor, ptr %217, i32 0, i32 2
  %219 = load i32, ptr %218, align 8, !tbaa !22
  %220 = load ptr, ptr %4, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.MTensor, ptr %220, i32 0, i32 3
  %222 = load i32, ptr %221, align 4, !tbaa !24
  call void @TensorRedefine(ptr noundef %209, i32 noundef %213, i32 noundef %216, i32 noundef %219, i32 noundef %222, ptr noundef null, i32 noundef -1)
  br label %232

223:                                              ; preds = %205
  br label %224

224:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !25
  %225 = load i32, ptr %10, align 4, !tbaa !25
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %227, label %229

227:                                              ; preds = %224
  %228 = load i32, ptr %10, align 4, !tbaa !25
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %228, i32 noundef -1, ptr noundef @.str.3, i32 noundef 120, ptr noundef @__FUNCTION__.TensorOutputSet, ptr noundef @.str.27)
  br label %229

229:                                              ; preds = %227, %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %230

230:                                              ; preds = %229
  br label %231

231:                                              ; preds = %230
  br label %232

232:                                              ; preds = %231, %208
  br label %233

233:                                              ; preds = %232, %190
  br label %234

234:                                              ; preds = %233, %169
  br label %235

235:                                              ; preds = %234, %161
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236
  br label %238

238:                                              ; preds = %237, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  br label %239

239:                                              ; preds = %238, %15
  ret void
}

declare void @mTensorCopy(ptr noundef, ptr noundef, i32 noundef) #1

declare void @TensorRedefine(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 }

!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/C++ TBAA"}
!9 = !{!10, !11, i64 64}
!10 = !{!"MLayer", !7, i64 0, !11, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 56}
!13 = !{!14, !6, i64 0}
!14 = !{!"TensorOutputPara", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !15, i64 552, !15, i64 556, !15, i64 560}
!15 = !{!"float", !7, i64 0}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 48}
!18 = !{!14, !11, i64 16}
!19 = !{!20, !11, i64 4}
!20 = !{!"MTensor", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !11, i64 24}
!21 = !{!14, !11, i64 8}
!22 = !{!20, !11, i64 8}
!23 = !{!14, !11, i64 12}
!24 = !{!20, !11, i64 12}
!25 = !{!11, !11, i64 0}
!26 = !{!20, !6, i64 16}
!27 = !{!20, !11, i64 0}


; 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"

@morn_network_flag = external local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @TensorOutputSet(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 64
  %3 = load i32, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i32 %3, -1
  br i1 %.not, label %4, label %55

4:                                                ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 56
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %7, i64 40
  %9 = load ptr, ptr %8, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %7, i64 48
  %11 = load ptr, ptr %10, align 8, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %6, i64 16
  %15 = load i32, ptr %14, align 8, !tbaa !17
  %16 = icmp eq i32 %15, -1
  br i1 %16, label %17, label %20

17:                                               ; preds = %4
  %18 = getelementptr inbounds i8, ptr %9, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !18
  store i32 %19, ptr %14, align 8, !tbaa !17
  br label %20

20:                                               ; preds = %17, %4
  %21 = getelementptr inbounds i8, ptr %6, i64 8
  %22 = load i32, ptr %21, align 8, !tbaa !20
  %23 = icmp eq i32 %22, -1
  br i1 %23, label %24, label %27

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %9, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !21
  store i32 %26, ptr %21, align 8, !tbaa !20
  br label %27

27:                                               ; preds = %24, %20
  %28 = getelementptr inbounds i8, ptr %6, i64 12
  %29 = load i32, ptr %28, align 4, !tbaa !22
  %30 = icmp eq i32 %29, -1
  br i1 %30, label %31, label %34

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %9, i64 12
  %33 = load i32, ptr %32, align 4, !tbaa !23
  store i32 %33, ptr %28, align 4, !tbaa !22
  br label %34

34:                                               ; preds = %31, %27
  %35 = load i32, ptr @morn_network_flag, align 4, !tbaa !24
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %47

37:                                               ; preds = %34
  tail call void @mTensorCopy(ptr noundef %9, ptr noundef %13, i32 noundef -1) #2
  %38 = load i32, ptr %9, align 8, !tbaa !25
  %39 = getelementptr inbounds i8, ptr %9, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !18
  %41 = getelementptr inbounds i8, ptr %9, i64 8
  %42 = load i32, ptr %41, align 8, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %9, i64 12
  %44 = load i32, ptr %43, align 4, !tbaa !23
  %45 = getelementptr inbounds i8, ptr %13, i64 16
  %46 = load ptr, ptr %45, align 8, !tbaa !26
  tail call void @TensorRedefine(ptr noundef nonnull %9, i32 noundef %38, i32 noundef %40, i32 noundef %42, i32 noundef %44, ptr noundef %46, i32 noundef -1) #2
  br label %55

47:                                               ; preds = %34
  %48 = load i32, ptr %9, align 8, !tbaa !25
  %49 = getelementptr inbounds i8, ptr %9, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !18
  %51 = getelementptr inbounds i8, ptr %9, i64 8
  %52 = load i32, ptr %51, align 8, !tbaa !21
  %53 = getelementptr inbounds i8, ptr %9, i64 12
  %54 = load i32, ptr %53, align 4, !tbaa !23
  tail call void @TensorRedefine(ptr noundef %11, i32 noundef %48, i32 noundef %50, i32 noundef %52, i32 noundef %54, ptr noundef null, i32 noundef -1) #2
  br label %55

55:                                               ; preds = %37, %47, %1
  ret void
}

declare void @mTensorCopy(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @TensorRedefine(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { "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 }

!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, !9, i64 64}
!6 = !{!"MLayer", !7, i64 0, !9, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !9, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!6, !10, i64 56}
!12 = !{!13, !10, i64 0}
!13 = !{!"TensorOutputPara", !10, i64 0, !9, i64 8, !9, i64 12, !9, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !14, i64 552, !14, i64 556, !14, i64 560}
!14 = !{!"float", !7, i64 0}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !10, i64 48}
!17 = !{!13, !9, i64 16}
!18 = !{!19, !9, i64 4}
!19 = !{!"MTensor", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !10, i64 16, !9, i64 24}
!20 = !{!13, !9, i64 8}
!21 = !{!19, !9, i64 8}
!22 = !{!13, !9, i64 12}
!23 = !{!19, !9, i64 12}
!24 = !{!9, !9, i64 0}
!25 = !{!19, !9, i64 0}
!26 = !{!19, !10, i64 16}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass