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

; 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.TensorRegister = type { [32 x i8], ptr, ptr, ptr }
%struct.MLayer = type { [32 x i8], i32, ptr, ptr, ptr, i32 }
%struct.TensorConnectPara = type { ptr, i32, i32, i32, i32, float, float, float }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.MTensor = type { i32, i32, i32, i32, ptr, i32 }
%struct.HandleTensorConnect = type { ptr, ptr }
%struct.MMemoryBlock = type { i32, i32, ptr, ptr, ptr, i32 }

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@morn_network_parafile = external global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mTensorConnectBackward = external hidden unnamed_addr constant [23 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@morn_network_time = external global i32, align 4
@morn_network_save = external global i32, align 4
@morn_network_error = external global float, align 4
@morn_network_error_thresh = external global float, align 4
@morn_network_time_max = external global i32, align 4
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr 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 willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @endTensorConnect(ptr noundef) #3

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #4

declare i32 @m_Hash(ptr noundef, i32 noundef) #1

declare void @mSgemm(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, float noundef, ptr noundef, i32 noundef) #1

declare ptr @mTensorMemory(ptr noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @mTensorConnectBackward(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %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 [64 x i8], align 16
  %15 = alloca ptr, align 8
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %26, label %22

22:                                               ; preds = %19
  %23 = load ptr, ptr %2, align 8, !tbaa !5
  %24 = ptrtoint ptr %23 to i64
  %25 = icmp eq i64 %24, -1
  br label %26

26:                                               ; preds = %22, %19
  %27 = phi i1 [ true, %19 ], [ %25, %22 ]
  %28 = zext i1 %27 to i32
  store i32 %28, ptr %3, align 4, !tbaa !9
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %33

31:                                               ; preds = %26
  %32 = load i32, ptr %3, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %32, i32 noundef -1, ptr noundef @.str.1, i32 noundef 125, ptr noundef @__FUNCTION__.mTensorConnectBackward, ptr noundef @.str.17)
  br label %33

33:                                               ; preds = %31, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.MLayer, ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %39
  %41 = getelementptr inbounds %struct.TensorRegister, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds [32 x i8], ptr %41, i64 0, i64 0
  %43 = call i32 @strcmp(ptr noundef @.str.18, ptr noundef %42) #7
  store i32 %43, ptr %4, align 4, !tbaa !9
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %35
  %47 = load i32, ptr %4, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %47, i32 noundef -1, ptr noundef @.str.1, i32 noundef 126, ptr noundef @__FUNCTION__.mTensorConnectBackward, ptr noundef @.str.19)
  br label %48

48:                                               ; preds = %46, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %49

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.MLayer, ptr %50, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !13
  store ptr %52, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.TensorConnectPara, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = getelementptr inbounds %struct.MLayer, ptr %55, i32 0, i32 2
  %57 = load ptr, ptr %56, align 8, !tbaa !17
  store ptr %57, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.TensorConnectPara, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !14
  %61 = getelementptr inbounds %struct.MLayer, ptr %60, i32 0, i32 3
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  store ptr %62, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.MLayer, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !18
  store ptr %65, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.MLayer, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  %69 = call ptr @GetHandle(ptr noundef %68, i32 noundef 16, i32 noundef -1197970358, ptr noundef @endTensorConnect)
  store ptr %69, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.MHandle, ptr %70, i32 0, i32 3
  %72 = load ptr, ptr %71, align 8, !tbaa !19
  store ptr %72, ptr %10, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.MHandle, ptr %74, i32 0, i32 1
  %76 = load volatile i32, ptr %75, align 4, !tbaa !21
  %77 = icmp eq i32 %76, 0
  %78 = zext i1 %77 to i32
  store i32 %78, ptr %11, align 4, !tbaa !9
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %83

81:                                               ; preds = %73
  %82 = load i32, ptr %11, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %82, i32 noundef -1, ptr noundef @.str.1, i32 noundef 135, ptr noundef @__FUNCTION__.mTensorConnectBackward, ptr noundef @.str.21)
  br label %83

83:                                               ; preds = %81, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.MTensor, ptr %86, i32 0, i32 2
  %88 = load i32, ptr %87, align 8, !tbaa !22
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.MTensor, ptr %89, i32 0, i32 3
  %91 = load i32, ptr %90, align 4, !tbaa !24
  %92 = mul nsw i32 %88, %91
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.MTensor, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !25
  %96 = mul nsw i32 %92, %95
  store i32 %96, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.MTensor, ptr %97, i32 0, i32 2
  %99 = load i32, ptr %98, align 8, !tbaa !22
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.MTensor, ptr %100, i32 0, i32 3
  %102 = load i32, ptr %101, align 4, !tbaa !24
  %103 = mul nsw i32 %99, %102
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.MTensor, ptr %104, i32 0, i32 1
  %106 = load i32, ptr %105, align 4, !tbaa !25
  %107 = mul nsw i32 %103, %106
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %13, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %85
  %110 = load i32, ptr @morn_network_time, align 4, !tbaa !9
  %111 = load i32, ptr @morn_network_save, align 4, !tbaa !9
  %112 = srem i32 %110, %111
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %117

114:                                              ; preds = %109
  %115 = load i32, ptr @morn_network_time, align 4, !tbaa !9
  %116 = icmp sgt i32 %115, 0
  br i1 %116, label %126, label %117

117:                                              ; preds = %114, %109
  %118 = load float, ptr @morn_network_error, align 4, !tbaa !26
  %119 = load float, ptr @morn_network_error_thresh, align 4, !tbaa !26
  %120 = fcmp ole float %118, %119
  br i1 %120, label %126, label %121

121:                                              ; preds = %117
  %122 = load float, ptr @morn_network_error, align 4, !tbaa !26
  %123 = load i32, ptr @morn_network_time_max, align 4, !tbaa !9
  %124 = sitofp i32 %123 to float
  %125 = fcmp oeq float %122, %124
  br i1 %125, label %126, label %148

126:                                              ; preds = %121, %117, %114
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #6
  %127 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.MLayer, ptr %128, i32 0, i32 0
  %130 = getelementptr inbounds [32 x i8], ptr %129, i64 0, i64 0
  %131 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %127, ptr noundef @.str.15, ptr noundef %130, ptr noundef @.str.16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.HandleTensorConnect, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !27
  %135 = getelementptr inbounds %struct.MMemoryBlock, ptr %134, i32 0, i32 2
  %136 = load ptr, ptr %135, align 8, !tbaa !29
  store ptr %136, ptr %15, align 8, !tbaa !5
  %137 = load ptr, ptr @morn_network_parafile, align 8, !tbaa !5
  %138 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  %139 = getelementptr inbounds i8, ptr %138, i64 0
  %140 = call i32 @m_Hash(ptr noundef %139, i32 noundef -1)
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = mul nsw i32 %141, %142
  %144 = sext i32 %143 to i64
  %145 = mul i64 %144, 4
  %146 = trunc i64 %145 to i32
  %147 = call i32 @mMORNWrite(ptr noundef %137, i32 noundef %140, ptr noundef %15, i32 noundef 1, i32 noundef %146)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #6
  br label %148

148:                                              ; preds = %126, %121
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.TensorConnectPara, ptr %151, i32 0, i32 7
  %153 = load float, ptr %152, align 8, !tbaa !31
  store float %153, ptr %16, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %154

154:                                              ; preds = %184, %150
  %155 = load i32, ptr %17, align 4, !tbaa !9
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.MTensor, ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !32
  %159 = icmp slt i32 %155, %158
  br i1 %159, label %161, label %160

160:                                              ; preds = %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %187

161:                                              ; preds = %154
  %162 = load i32, ptr %12, align 4, !tbaa !9
  %163 = load i32, ptr %13, align 4, !tbaa !9
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = load i32, ptr %17, align 4, !tbaa !9
  %166 = call ptr @mTensorMemory(ptr noundef %164, i32 noundef %165)
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = load i32, ptr %17, align 4, !tbaa !9
  %169 = call ptr @mTensorMemory(ptr noundef %167, i32 noundef %168)
  %170 = load float, ptr %16, align 4, !tbaa !26
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.HandleTensorConnect, ptr %171, i32 0, i32 1
  %173 = load ptr, ptr %172, align 8, !tbaa !33
  %174 = load i32, ptr %13, align 4, !tbaa !9
  call void @mSgemm(i32 noundef 0, i32 noundef 1, i32 noundef %162, i32 noundef %163, i32 noundef 1, float noundef 1.000000e+00, ptr noundef %166, i32 noundef 1, ptr noundef %169, i32 noundef 1, float noundef %170, ptr noundef %173, i32 noundef %174)
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.HandleTensorConnect, ptr %175, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !33
  %178 = getelementptr inbounds %struct.MMemoryBlock, ptr %177, i32 0, i32 2
  %179 = load ptr, ptr %178, align 8, !tbaa !29
  %180 = getelementptr inbounds float, ptr %179, i64 8
  %181 = load float, ptr %180, align 4, !tbaa !26
  %182 = fpext float %181 to double
  %183 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, double noundef %182)
  store float 1.000000e+00, ptr %16, align 4, !tbaa !26
  br label %184

184:                                              ; preds = %161
  %185 = load i32, ptr %17, align 4, !tbaa !9
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %17, align 4, !tbaa !9
  br label %154, !llvm.loop !34

187:                                              ; preds = %160
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.TensorConnectPara, ptr %188, i32 0, i32 4
  %190 = load i32, ptr %189, align 4, !tbaa !36
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %236

192:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %232, %192
  %194 = load i32, ptr %18, align 4, !tbaa !9
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.MTensor, ptr %195, i32 0, i32 0
  %197 = load i32, ptr %196, align 8, !tbaa !32
  %198 = icmp slt i32 %194, %197
  br i1 %198, label %200, label %199

199:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %235

200:                                              ; preds = %193
  %201 = load i32, ptr %13, align 4, !tbaa !9
  %202 = load i32, ptr %12, align 4, !tbaa !9
  %203 = load ptr, ptr %10, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.HandleTensorConnect, ptr %203, i32 0, i32 0
  %205 = load ptr, ptr %204, align 8, !tbaa !27
  %206 = load i32, ptr %13, align 4, !tbaa !9
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = load i32, ptr %18, align 4, !tbaa !9
  %209 = call ptr @mTensorMemory(ptr noundef %207, i32 noundef %208)
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.TensorConnectPara, ptr %210, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8, !tbaa !14
  %213 = getelementptr inbounds %struct.MLayer, ptr %212, i32 0, i32 5
  %214 = load i32, ptr %213, align 8, !tbaa !37
  %215 = icmp eq i32 %214, 0
  %216 = zext i1 %215 to i64
  %217 = select i1 %215, float 0.000000e+00, float 1.000000e+00
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = load i32, ptr %18, align 4, !tbaa !9
  %220 = call ptr @mTensorMemory(ptr noundef %218, i32 noundef %219)
  call void @mSgemm(i32 noundef 1, i32 noundef 0, i32 noundef %201, i32 noundef 1, i32 noundef %202, float noundef 1.000000e+00, ptr noundef %205, i32 noundef %206, ptr noundef %209, i32 noundef 1, float noundef %217, ptr noundef %220, i32 noundef 1)
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.MTensor, ptr %221, i32 0, i32 4
  %223 = load ptr, ptr %222, align 8, !tbaa !38
  %224 = load i32, ptr %18, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds ptr, ptr %223, i64 %225
  %227 = load ptr, ptr %226, align 8, !tbaa !5
  %228 = getelementptr inbounds float, ptr %227, i64 8
  %229 = load float, ptr %228, align 4, !tbaa !26
  %230 = fpext float %229 to double
  %231 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, double noundef %230)
  br label %232

232:                                              ; preds = %200
  %233 = load i32, ptr %18, align 4, !tbaa !9
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %18, align 4, !tbaa !9
  br label %193, !llvm.loop !39

235:                                              ; preds = %199
  br label %236

236:                                              ; preds = %235, %187
  %237 = load i32, ptr %12, align 4, !tbaa !9
  %238 = load i32, ptr %13, align 4, !tbaa !9
  %239 = mul nsw i32 %237, %238
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.TensorConnectPara, ptr %240, i32 0, i32 5
  %242 = load float, ptr %241, align 8, !tbaa !40
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.MTensor, ptr %243, i32 0, i32 0
  %245 = load i32, ptr %244, align 8, !tbaa !32
  %246 = sitofp i32 %245 to float
  %247 = fdiv float %242, %246
  %248 = fsub float 0.000000e+00, %247
  %249 = load ptr, ptr %10, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.HandleTensorConnect, ptr %249, i32 0, i32 1
  %251 = load ptr, ptr %250, align 8, !tbaa !33
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.TensorConnectPara, ptr %252, i32 0, i32 6
  %254 = load float, ptr %253, align 4, !tbaa !41
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.TensorConnectPara, ptr %255, i32 0, i32 5
  %257 = load float, ptr %256, align 8, !tbaa !40
  %258 = fneg float %254
  %259 = call float @llvm.fmuladd.f32(float %258, float %257, float 1.000000e+00)
  %260 = load ptr, ptr %10, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.HandleTensorConnect, ptr %260, i32 0, i32 0
  %262 = load ptr, ptr %261, align 8, !tbaa !27
  call void @mSaxpby(i32 noundef %239, float noundef %248, ptr noundef %251, float noundef %259, ptr noundef %262)
  %263 = load ptr, ptr %5, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.TensorConnectPara, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !14
  %266 = getelementptr inbounds %struct.MLayer, ptr %265, i32 0, i32 5
  store i32 1, ptr %266, align 8, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  ret void
}

declare i32 @mMORNWrite(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #1

declare void @mSaxpby(i32 noundef, float noundef, ptr noundef, float noundef, ptr noundef) #1

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

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

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"MLayer", !7, i64 0, !10, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !10, i64 64}
!13 = !{!12, !6, i64 56}
!14 = !{!15, !6, i64 0}
!15 = !{!"TensorConnectPara", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !16, i64 24, !16, i64 28, !16, i64 32}
!16 = !{!"float", !7, i64 0}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !6, i64 48}
!19 = !{!20, !6, i64 16}
!20 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!21 = !{!20, !10, i64 4}
!22 = !{!23, !10, i64 8}
!23 = !{!"MTensor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!24 = !{!23, !10, i64 12}
!25 = !{!23, !10, i64 4}
!26 = !{!16, !16, i64 0}
!27 = !{!28, !6, i64 0}
!28 = !{!"HandleTensorConnect", !6, i64 0, !6, i64 8}
!29 = !{!30, !6, i64 8}
!30 = !{!"MMemoryBlock", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32}
!31 = !{!15, !16, i64 32}
!32 = !{!23, !10, i64 0}
!33 = !{!28, !6, i64 8}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!15, !10, i64 20}
!37 = !{!12, !10, i64 64}
!38 = !{!23, !6, i64 16}
!39 = distinct !{!39, !35}
!40 = !{!15, !16, i64 24}
!41 = !{!15, !16, i64 28}


; 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.TensorRegister = type { [32 x i8], ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1
@morn_tensor_register = external global [256 x %struct.TensorRegister], align 16
@morn_network_parafile = external local_unnamed_addr global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mTensorConnectBackward = external hidden unnamed_addr constant [23 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [19 x i8], align 1
@morn_network_time = external local_unnamed_addr global i32, align 4
@morn_network_save = external local_unnamed_addr global i32, align 4
@morn_network_error = external local_unnamed_addr global float, align 4
@morn_network_error_thresh = external local_unnamed_addr global float, align 4
@morn_network_time_max = external local_unnamed_addr global i32, align 4
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [16 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

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr 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: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @endTensorConnect(ptr noundef) #3

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @m_Hash(ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare ptr @mTensorMemory(ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @mTensorConnectBackward(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca [64 x i8], align 16
  %3 = alloca ptr, align 8
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %9 [
    i64 -1, label %4
    i64 0, label %4
  ]

4:                                                ; preds = %1, %1
  %5 = icmp eq ptr %0, null
  %6 = icmp eq ptr %0, inttoptr (i64 -1 to ptr)
  %7 = or i1 %5, %6
  %8 = zext i1 %7 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %8, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 125, ptr noundef nonnull @__FUNCTION__.mTensorConnectBackward, ptr noundef nonnull @.str.17) #6
  br label %9

9:                                                ; preds = %1, %4
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = getelementptr inbounds [256 x %struct.TensorRegister], ptr @morn_tensor_register, i64 0, i64 %12
  %14 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @.str.18, ptr noundef nonnull dereferenceable(1) %13) #7
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %16, label %15

15:                                               ; preds = %9
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %14, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 126, ptr noundef nonnull @__FUNCTION__.mTensorConnectBackward, ptr noundef nonnull @.str.19) #6
  br label %16

16:                                               ; preds = %15, %9
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %19, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %19, i64 48
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %24 = getelementptr inbounds i8, ptr %0, i64 48
  %25 = load ptr, ptr %24, align 8, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %0, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = tail call ptr @GetHandle(ptr noundef %27, i32 noundef 16, i32 noundef -1197970358, ptr noundef nonnull @endTensorConnect) #6
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %28, i64 4
  %32 = load volatile i32, ptr %31, align 4, !tbaa !19
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %16
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.1, i32 noundef 135, ptr noundef nonnull @__FUNCTION__.mTensorConnectBackward, ptr noundef nonnull @.str.21) #6
  br label %35

35:                                               ; preds = %34, %16
  %36 = getelementptr inbounds i8, ptr %25, i64 8
  %37 = load i32, ptr %36, align 8, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %25, i64 12
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = mul nsw i32 %39, %37
  %41 = getelementptr inbounds i8, ptr %25, i64 4
  %42 = load i32, ptr %41, align 4, !tbaa !23
  %43 = mul nsw i32 %40, %42
  %44 = getelementptr inbounds i8, ptr %21, i64 8
  %45 = load i32, ptr %44, align 8, !tbaa !20
  %46 = getelementptr inbounds i8, ptr %21, i64 12
  %47 = load i32, ptr %46, align 4, !tbaa !22
  %48 = mul nsw i32 %47, %45
  %49 = getelementptr inbounds i8, ptr %21, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !23
  %51 = mul nsw i32 %48, %50
  %52 = add nsw i32 %51, 1
  %53 = load i32, ptr @morn_network_time, align 4
  %54 = load i32, ptr @morn_network_save, align 4, !tbaa !24
  %55 = srem i32 %53, %54
  %56 = icmp eq i32 %55, 0
  %57 = icmp sgt i32 %53, 0
  %or.cond = and i1 %57, %56
  br i1 %or.cond, label %66, label %58

58:                                               ; preds = %35
  %59 = load float, ptr @morn_network_error, align 4, !tbaa !25
  %60 = load float, ptr @morn_network_error_thresh, align 4, !tbaa !25
  %61 = fcmp ugt float %59, %60
  br i1 %61, label %62, label %66

62:                                               ; preds = %58
  %63 = load i32, ptr @morn_network_time_max, align 4, !tbaa !24
  %64 = sitofp i32 %63 to float
  %65 = fcmp oeq float %59, %64
  br i1 %65, label %66, label %76

66:                                               ; preds = %35, %62, %58
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #6
  %67 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.15, ptr noundef nonnull %0, ptr noundef nonnull @.str.16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %68 = load ptr, ptr %30, align 8, !tbaa !26
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  %70 = load ptr, ptr %69, align 8, !tbaa !28
  store ptr %70, ptr %3, align 8, !tbaa !30
  %71 = load ptr, ptr @morn_network_parafile, align 8, !tbaa !30
  %72 = call i32 @m_Hash(ptr noundef nonnull %2, i32 noundef -1) #6
  %73 = mul nsw i32 %52, %43
  %74 = shl i32 %73, 2
  %75 = call i32 @mMORNWrite(ptr noundef %71, i32 noundef %72, ptr noundef nonnull %3, i32 noundef 1, i32 noundef %74) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #6
  br label %76

76:                                               ; preds = %66, %62
  %77 = load i32, ptr %21, align 8, !tbaa !31
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %76
  %79 = getelementptr inbounds i8, ptr %18, i64 32
  %80 = load float, ptr %79, align 8, !tbaa !32
  %81 = getelementptr inbounds i8, ptr %30, i64 8
  %82 = call ptr @mTensorMemory(ptr noundef nonnull %25, i32 noundef 0) #6
  %83 = call ptr @mTensorMemory(ptr noundef nonnull %21, i32 noundef 0) #6
  %84 = load ptr, ptr %81, align 8, !tbaa !33
  call void @mSgemm(i32 noundef 0, i32 noundef 1, i32 noundef %43, i32 noundef %52, i32 noundef 1, float noundef 1.000000e+00, ptr noundef %82, i32 noundef 1, ptr noundef %83, i32 noundef 1, float noundef %80, ptr noundef %84, i32 noundef %52) #6
  %85 = load ptr, ptr %81, align 8, !tbaa !33
  %86 = getelementptr inbounds i8, ptr %85, i64 8
  %87 = load ptr, ptr %86, align 8, !tbaa !28
  %88 = getelementptr inbounds i8, ptr %87, i64 32
  %89 = load float, ptr %88, align 4, !tbaa !25
  %90 = fpext float %89 to double
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, double noundef %90)
  %92 = load i32, ptr %21, align 8, !tbaa !31
  %93 = icmp sgt i32 %92, 1
  br i1 %93, label %.peel.next, label %._crit_edge

._crit_edge:                                      ; preds = %.peel.next, %.lr.ph, %76
  %94 = phi i32 [ %77, %76 ], [ %92, %.lr.ph ], [ %110, %.peel.next ]
  %95 = getelementptr inbounds i8, ptr %18, i64 20
  %96 = load i32, ptr %95, align 4, !tbaa !34
  %.not68 = icmp ne i32 %96, 0
  %97 = icmp sgt i32 %94, 0
  %or.cond76 = and i1 %.not68, %97
  br i1 %or.cond76, label %.lr.ph72, label %.loopexit

.lr.ph72:                                         ; preds = %._crit_edge
  %98 = getelementptr inbounds i8, ptr %23, i64 16
  br label %112

.peel.next:                                       ; preds = %.lr.ph, %.peel.next
  %.06470 = phi i32 [ %109, %.peel.next ], [ 1, %.lr.ph ]
  %99 = call ptr @mTensorMemory(ptr noundef %25, i32 noundef %.06470) #6
  %100 = call ptr @mTensorMemory(ptr noundef nonnull %21, i32 noundef %.06470) #6
  %101 = load ptr, ptr %81, align 8, !tbaa !33
  call void @mSgemm(i32 noundef 0, i32 noundef 1, i32 noundef %43, i32 noundef %52, i32 noundef 1, float noundef 1.000000e+00, ptr noundef %99, i32 noundef 1, ptr noundef %100, i32 noundef 1, float noundef 1.000000e+00, ptr noundef %101, i32 noundef %52) #6
  %102 = load ptr, ptr %81, align 8, !tbaa !33
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  %104 = load ptr, ptr %103, align 8, !tbaa !28
  %105 = getelementptr inbounds i8, ptr %104, i64 32
  %106 = load float, ptr %105, align 4, !tbaa !25
  %107 = fpext float %106 to double
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, double noundef %107)
  %109 = add nuw nsw i32 %.06470, 1
  %110 = load i32, ptr %21, align 8, !tbaa !31
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %.peel.next, label %._crit_edge, !llvm.loop !35

112:                                              ; preds = %.lr.ph72, %112
  %indvars.iv = phi i64 [ 0, %.lr.ph72 ], [ %indvars.iv.next, %112 ]
  %113 = load ptr, ptr %30, align 8, !tbaa !26
  %114 = trunc nuw nsw i64 %indvars.iv to i32
  %115 = call ptr @mTensorMemory(ptr noundef %25, i32 noundef %114) #6
  %116 = load ptr, ptr %18, align 8, !tbaa !12
  %117 = getelementptr inbounds i8, ptr %116, i64 64
  %118 = load i32, ptr %117, align 8, !tbaa !38
  %119 = icmp eq i32 %118, 0
  %120 = select i1 %119, float 0.000000e+00, float 1.000000e+00
  %121 = call ptr @mTensorMemory(ptr noundef %23, i32 noundef %114) #6
  call void @mSgemm(i32 noundef 1, i32 noundef 0, i32 noundef %52, i32 noundef 1, i32 noundef %43, float noundef 1.000000e+00, ptr noundef %113, i32 noundef %52, ptr noundef %115, i32 noundef 1, float noundef %120, ptr noundef %121, i32 noundef 1) #6
  %122 = load ptr, ptr %98, align 8, !tbaa !39
  %123 = getelementptr inbounds ptr, ptr %122, i64 %indvars.iv
  %124 = load ptr, ptr %123, align 8, !tbaa !30
  %125 = getelementptr inbounds i8, ptr %124, i64 32
  %126 = load float, ptr %125, align 4, !tbaa !25
  %127 = fpext float %126 to double
  %128 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, double noundef %127)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %129 = load i32, ptr %21, align 8, !tbaa !31
  %130 = sext i32 %129 to i64
  %131 = icmp slt i64 %indvars.iv.next, %130
  br i1 %131, label %112, label %.loopexit, !llvm.loop !40

.loopexit:                                        ; preds = %112, %._crit_edge
  %132 = phi i32 [ %94, %._crit_edge ], [ %129, %112 ]
  %133 = mul nsw i32 %52, %43
  %134 = getelementptr inbounds i8, ptr %18, i64 24
  %135 = load float, ptr %134, align 8, !tbaa !41
  %136 = sitofp i32 %132 to float
  %137 = fdiv float %135, %136
  %138 = fsub float 0.000000e+00, %137
  %139 = getelementptr inbounds i8, ptr %30, i64 8
  %140 = load ptr, ptr %139, align 8, !tbaa !33
  %141 = getelementptr inbounds i8, ptr %18, i64 28
  %142 = load float, ptr %141, align 4, !tbaa !42
  %143 = fneg float %142
  %144 = call float @llvm.fmuladd.f32(float %143, float %135, float 1.000000e+00)
  %145 = load ptr, ptr %30, align 8, !tbaa !26
  call void @mSaxpby(i32 noundef %133, float noundef %138, ptr noundef %140, float noundef %144, ptr noundef %145) #6
  %146 = load ptr, ptr %18, align 8, !tbaa !12
  %147 = getelementptr inbounds i8, ptr %146, i64 64
  store i32 1, ptr %147, align 8, !tbaa !38
  ret void
}

declare i32 @mMORNWrite(ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

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

!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 32}
!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 = !{!"TensorConnectPara", !10, i64 0, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !14, i64 24, !14, i64 28, !14, i64 32}
!14 = !{!"float", !7, i64 0}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !10, i64 48}
!17 = !{!18, !10, i64 16}
!18 = !{!"MHandle", !9, i64 0, !9, i64 4, !10, i64 8, !10, i64 16}
!19 = !{!18, !9, i64 4}
!20 = !{!21, !9, i64 8}
!21 = !{!"MTensor", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !10, i64 16, !9, i64 24}
!22 = !{!21, !9, i64 12}
!23 = !{!21, !9, i64 4}
!24 = !{!9, !9, i64 0}
!25 = !{!14, !14, i64 0}
!26 = !{!27, !10, i64 0}
!27 = !{!"HandleTensorConnect", !10, i64 0, !10, i64 8}
!28 = !{!29, !10, i64 8}
!29 = !{!"MMemoryBlock", !9, i64 0, !9, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !9, i64 32}
!30 = !{!10, !10, i64 0}
!31 = !{!21, !9, i64 0}
!32 = !{!13, !14, i64 32}
!33 = !{!27, !10, i64 8}
!34 = !{!13, !9, i64 20}
!35 = distinct !{!35, !36, !37}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!"llvm.loop.peeled.count", i32 1}
!38 = !{!6, !9, i64 64}
!39 = !{!21, !10, i64 16}
!40 = distinct !{!40, !36}
!41 = !{!13, !14, i64 24}
!42 = !{!13, !14, i64 28}


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