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

; 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.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleNetworkTensor = type { ptr, i32, ptr, i32 }
%struct.MTensor = type { i32, i32, i32, i32, ptr, i32 }
%struct.MList = type { i32, ptr }
%struct.MLayer = type { [32 x i8], i32, ptr, ptr, ptr, i32 }

@.str = external hidden unnamed_addr constant [92 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [19 x i8], align 1
@morn_network_flag = external global i32, align 4
@.str.19 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mNetworkTensor = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #2

declare ptr @mNetworkGenerate(ptr noundef) #1

declare ptr @m_INIRead(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) #1

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #3

declare i32 @mTensorRegisterIndex(ptr noundef) #1

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

declare ptr @m_Malloc(i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @endNetworkTensor(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @mNetworkTensor(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %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 i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call ptr @GetHandle(ptr noundef %30, i32 noundef 32, i32 noundef -312961482, ptr noundef @endNetworkTensor)
  store ptr %31, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.MHandle, ptr %32, i32 0, i32 3
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  store ptr %34, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.MHandle, ptr %35, i32 0, i32 1
  %37 = load volatile i32, ptr %36, align 4, !tbaa !12
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %261

39:                                               ; preds = %3
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call ptr @mNetworkGenerate(ptr noundef %40)
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %42, i32 0, i32 0
  store ptr %41, ptr %43, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds ptr, ptr %44, i64 0
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.MTensor, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !15
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %49, i32 0, i32 3
  store i32 %48, ptr %50, align 8, !tbaa !17
  %51 = load i32, ptr @morn_network_flag, align 4, !tbaa !18
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %39
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %54, i64 noundef ptrtoint (ptr @.str.4 to i64), i64 noundef ptrtoint (ptr @.str.19 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %55, ptr %9, align 8, !tbaa !5
  br label %59

56:                                               ; preds = %39
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %57, i64 noundef ptrtoint (ptr @.str.4 to i64), i64 noundef ptrtoint (ptr @.str.5 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %58, ptr %9, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %56, %53
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %67

62:                                               ; preds = %59
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = call i32 @atoi(ptr noundef %63) #6
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %65, i32 0, i32 3
  store i32 %64, ptr %66, align 8, !tbaa !17
  br label %67

67:                                               ; preds = %62, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %68 = call i32 @mTensorRegisterIndex(ptr noundef @.str.8)
  store i32 %68, ptr %10, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %69 = call i32 @mTensorRegisterIndex(ptr noundef @.str.9)
  store i32 %69, ptr %11, align 4, !tbaa !18
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = getelementptr inbounds %struct.MList, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !19
  %75 = sext i32 %74 to i64
  %76 = mul i64 %75, 4
  %77 = trunc i64 %76 to i32
  %78 = call ptr @m_Malloc(i32 noundef %77)
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %79, i32 0, i32 2
  store ptr %78, ptr %80, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !18
  br label %81

81:                                               ; preds = %255, %67
  %82 = load i32, ptr %12, align 4, !tbaa !18
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !13
  %86 = getelementptr inbounds %struct.MList, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !19
  %88 = icmp slt i32 %82, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %81
  store i32 2, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %258

90:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !13
  %94 = getelementptr inbounds %struct.MList, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !22
  %96 = load i32, ptr %12, align 4, !tbaa !18
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  store ptr %99, ptr %14, align 8, !tbaa !5
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.MLayer, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 8, !tbaa !23
  %103 = load i32, ptr %10, align 4, !tbaa !18
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %105, label %112

105:                                              ; preds = %90
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.MLayer, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 8, !tbaa !23
  %109 = load i32, ptr %11, align 4, !tbaa !18
  %110 = icmp ne i32 %108, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %105
  store i32 4, ptr %13, align 4
  br label %252

112:                                              ; preds = %105, %90
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.MLayer, ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds [32 x i8], ptr %115, i64 0, i64 0
  %117 = ptrtoint ptr %116 to i64
  %118 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %113, i64 noundef %117, i64 noundef ptrtoint (ptr @.str.10 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %118, ptr %9, align 8, !tbaa !5
  br label %119

119:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = icmp eq ptr %120, null
  %122 = zext i1 %121 to i32
  store i32 %122, ptr %15, align 4, !tbaa !18
  %123 = load i32, ptr %15, align 4, !tbaa !18
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %127

125:                                              ; preds = %119
  %126 = load i32, ptr %15, align 4, !tbaa !18
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %126, i32 noundef -1, ptr noundef @.str, i32 noundef 374, ptr noundef @__FUNCTION__.mNetworkTensor, ptr noundef @.str.11)
  br label %127

127:                                              ; preds = %125, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = call i32 @atoi(ptr noundef %130) #6
  store i32 %131, ptr %16, align 4, !tbaa !18
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.MLayer, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds [32 x i8], ptr %134, i64 0, i64 0
  %136 = ptrtoint ptr %135 to i64
  %137 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %132, i64 noundef %136, i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %137, ptr %9, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = icmp eq ptr %139, null
  %141 = zext i1 %140 to i32
  store i32 %141, ptr %17, align 4, !tbaa !18
  %142 = load i32, ptr %17, align 4, !tbaa !18
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %144, label %146

144:                                              ; preds = %138
  %145 = load i32, ptr %17, align 4, !tbaa !18
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %145, i32 noundef -1, ptr noundef @.str, i32 noundef 375, ptr noundef @__FUNCTION__.mNetworkTensor, ptr noundef @.str.13)
  br label %146

146:                                              ; preds = %144, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = call i32 @atoi(ptr noundef %149) #6
  store i32 %150, ptr %18, align 4, !tbaa !18
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.MLayer, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds [32 x i8], ptr %153, i64 0, i64 0
  %155 = ptrtoint ptr %154 to i64
  %156 = call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %151, i64 noundef %155, i64 noundef ptrtoint (ptr @.str.14 to i64), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  store ptr %156, ptr %9, align 8, !tbaa !5
  br label %157

157:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = icmp eq ptr %158, null
  %160 = zext i1 %159 to i32
  store i32 %160, ptr %19, align 4, !tbaa !18
  %161 = load i32, ptr %19, align 4, !tbaa !18
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %165

163:                                              ; preds = %157
  %164 = load i32, ptr %19, align 4, !tbaa !18
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %164, i32 noundef -1, ptr noundef @.str, i32 noundef 376, ptr noundef @__FUNCTION__.mNetworkTensor, ptr noundef @.str.15)
  br label %165

165:                                              ; preds = %163, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = call i32 @atoi(ptr noundef %168) #6
  store i32 %169, ptr %20, align 4, !tbaa !18
  br label %170

170:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 5, ptr %21, align 4, !tbaa !18
  %171 = load i32, ptr %21, align 4, !tbaa !18
  %172 = icmp eq i32 %171, 0
  br i1 %172, label %173, label %182

173:                                              ; preds = %170
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.MLayer, ptr %174, i32 0, i32 2
  %176 = load ptr, ptr %175, align 8, !tbaa !25
  %177 = load ptr, ptr %14, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.MLayer, ptr %177, i32 0, i32 2
  %179 = load ptr, ptr %178, align 8, !tbaa !25
  %180 = getelementptr inbounds %struct.MTensor, ptr %179, i32 0, i32 4
  %181 = load ptr, ptr %180, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %176, i32 noundef -1, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %181, i32 noundef -1)
  br label %229

182:                                              ; preds = %170
  %183 = load i32, ptr %21, align 4, !tbaa !18
  %184 = icmp eq i32 %183, 4
  br i1 %184, label %185, label %197

185:                                              ; preds = %182
  %186 = load ptr, ptr %14, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.MLayer, ptr %186, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !25
  %189 = load i32, ptr %16, align 4, !tbaa !18
  %190 = load i32, ptr %18, align 4, !tbaa !18
  %191 = load i32, ptr %20, align 4, !tbaa !18
  %192 = load ptr, ptr %14, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.MLayer, ptr %192, i32 0, i32 2
  %194 = load ptr, ptr %193, align 8, !tbaa !25
  %195 = getelementptr inbounds %struct.MTensor, ptr %194, i32 0, i32 4
  %196 = load ptr, ptr %195, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %188, i32 noundef 0, i32 noundef %189, i32 noundef %190, i32 noundef %191, ptr noundef %196, i32 noundef -1)
  br label %228

197:                                              ; preds = %182
  %198 = load i32, ptr %21, align 4, !tbaa !18
  %199 = icmp eq i32 %198, 5
  br i1 %199, label %200, label %207

200:                                              ; preds = %197
  %201 = load ptr, ptr %14, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.MLayer, ptr %201, i32 0, i32 2
  %203 = load ptr, ptr %202, align 8, !tbaa !25
  %204 = load i32, ptr %16, align 4, !tbaa !18
  %205 = load i32, ptr %18, align 4, !tbaa !18
  %206 = load i32, ptr %20, align 4, !tbaa !18
  call void @TensorRedefine(ptr noundef %203, i32 noundef 0, i32 noundef %204, i32 noundef %205, i32 noundef %206, ptr noundef null, i32 noundef -1)
  br label %227

207:                                              ; preds = %197
  %208 = load i32, ptr %21, align 4, !tbaa !18
  %209 = icmp eq i32 %208, 6
  br i1 %209, label %210, label %217

210:                                              ; preds = %207
  %211 = load ptr, ptr %14, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.MLayer, ptr %211, i32 0, i32 2
  %213 = load ptr, ptr %212, align 8, !tbaa !25
  %214 = load i32, ptr %16, align 4, !tbaa !18
  %215 = load i32, ptr %18, align 4, !tbaa !18
  %216 = load i32, ptr %20, align 4, !tbaa !18
  call void @TensorRedefine(ptr noundef %213, i32 noundef 0, i32 noundef %214, i32 noundef %215, i32 noundef %216, ptr noundef null, i32 noundef -1)
  br label %226

217:                                              ; preds = %207
  br label %218

218:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 1, ptr %22, align 4, !tbaa !18
  %219 = load i32, ptr %22, align 4, !tbaa !18
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %223

221:                                              ; preds = %218
  %222 = load i32, ptr %22, align 4, !tbaa !18
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %222, i32 noundef -1, ptr noundef @.str, i32 noundef 378, ptr noundef @__FUNCTION__.mNetworkTensor, ptr noundef @.str.16)
  br label %223

223:                                              ; preds = %221, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225, %210
  br label %227

227:                                              ; preds = %226, %200
  br label %228

228:                                              ; preds = %227, %185
  br label %229

229:                                              ; preds = %228, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %230

230:                                              ; preds = %229
  br label %231

231:                                              ; preds = %230
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %232, i32 0, i32 3
  %234 = load i32, ptr %233, align 8, !tbaa !17
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.MLayer, ptr %235, i32 0, i32 2
  %237 = load ptr, ptr %236, align 8, !tbaa !25
  %238 = getelementptr inbounds %struct.MTensor, ptr %237, i32 0, i32 0
  store i32 %234, ptr %238, align 8, !tbaa !15
  %239 = load i32, ptr %12, align 4, !tbaa !18
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %240, i32 0, i32 2
  %242 = load ptr, ptr %241, align 8, !tbaa !21
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %243, i32 0, i32 1
  %245 = load i32, ptr %244, align 8, !tbaa !27
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds i32, ptr %242, i64 %246
  store i32 %239, ptr %247, align 4, !tbaa !18
  %248 = load ptr, ptr %8, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %248, i32 0, i32 1
  %250 = load i32, ptr %249, align 8, !tbaa !27
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %249, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  store i32 0, ptr %13, align 4
  br label %252

252:                                              ; preds = %231, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %253 = load i32, ptr %13, align 4
  switch i32 %253, label %472 [
    i32 0, label %254
    i32 4, label %255
  ]

254:                                              ; preds = %252
  br label %255

255:                                              ; preds = %254, %252
  %256 = load i32, ptr %12, align 4, !tbaa !18
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %12, align 4, !tbaa !18
  br label %81, !llvm.loop !28

258:                                              ; preds = %89
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.MHandle, ptr %259, i32 0, i32 1
  store volatile i32 1, ptr %260, align 4, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %261

261:                                              ; preds = %258, %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !18
  br label %262

262:                                              ; preds = %468, %261
  %263 = load i32, ptr %23, align 4, !tbaa !18
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %264, i32 0, i32 1
  %266 = load i32, ptr %265, align 8, !tbaa !27
  %267 = icmp slt i32 %263, %266
  br i1 %267, label %269, label %268

268:                                              ; preds = %262
  store i32 15, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %471

269:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %270 = load ptr, ptr %8, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !13
  %273 = getelementptr inbounds %struct.MList, ptr %272, i32 0, i32 1
  %274 = load ptr, ptr %273, align 8, !tbaa !22
  %275 = load ptr, ptr %8, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %275, i32 0, i32 2
  %277 = load ptr, ptr %276, align 8, !tbaa !21
  %278 = load i32, ptr %23, align 4, !tbaa !18
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds i32, ptr %277, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !18
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds ptr, ptr %274, i64 %282
  %284 = load ptr, ptr %283, align 8, !tbaa !5
  store ptr %284, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !18
  br label %285

285:                                              ; preds = %447, %269
  %286 = load i32, ptr %25, align 4, !tbaa !18
  %287 = load ptr, ptr %8, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %287, i32 0, i32 1
  %289 = load i32, ptr %288, align 8, !tbaa !27
  %290 = icmp slt i32 %286, %289
  br i1 %290, label %291, label %450

291:                                              ; preds = %285
  %292 = load ptr, ptr %24, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.MLayer, ptr %292, i32 0, i32 0
  %294 = getelementptr inbounds [32 x i8], ptr %293, i64 0, i64 0
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = load i32, ptr %25, align 4, !tbaa !18
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds ptr, ptr %295, i64 %297
  %299 = load ptr, ptr %298, align 8, !tbaa !5
  %300 = call i32 @strcmp(ptr noundef %294, ptr noundef %299) #6
  %301 = icmp eq i32 %300, 0
  br i1 %301, label %302, label %446

302:                                              ; preds = %291
  br label %303

303:                                              ; preds = %302
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %304 = load ptr, ptr %8, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %304, i32 0, i32 3
  %306 = load i32, ptr %305, align 8, !tbaa !17
  %307 = load ptr, ptr %6, align 8, !tbaa !5
  %308 = load i32, ptr %25, align 4, !tbaa !18
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds ptr, ptr %307, i64 %309
  %311 = load ptr, ptr %310, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.MTensor, ptr %311, i32 0, i32 0
  %313 = load i32, ptr %312, align 8, !tbaa !15
  %314 = icmp ne i32 %306, %313
  br i1 %314, label %357, label %315

315:                                              ; preds = %303
  %316 = load ptr, ptr %24, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.MLayer, ptr %316, i32 0, i32 2
  %318 = load ptr, ptr %317, align 8, !tbaa !25
  %319 = getelementptr inbounds %struct.MTensor, ptr %318, i32 0, i32 1
  %320 = load i32, ptr %319, align 4, !tbaa !30
  %321 = load ptr, ptr %6, align 8, !tbaa !5
  %322 = load i32, ptr %25, align 4, !tbaa !18
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds ptr, ptr %321, i64 %323
  %325 = load ptr, ptr %324, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.MTensor, ptr %325, i32 0, i32 1
  %327 = load i32, ptr %326, align 4, !tbaa !30
  %328 = icmp ne i32 %320, %327
  br i1 %328, label %357, label %329

329:                                              ; preds = %315
  %330 = load ptr, ptr %24, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.MLayer, ptr %330, i32 0, i32 2
  %332 = load ptr, ptr %331, align 8, !tbaa !25
  %333 = getelementptr inbounds %struct.MTensor, ptr %332, i32 0, i32 3
  %334 = load i32, ptr %333, align 4, !tbaa !31
  %335 = load ptr, ptr %6, align 8, !tbaa !5
  %336 = load i32, ptr %25, align 4, !tbaa !18
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds ptr, ptr %335, i64 %337
  %339 = load ptr, ptr %338, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.MTensor, ptr %339, i32 0, i32 3
  %341 = load i32, ptr %340, align 4, !tbaa !31
  %342 = icmp ne i32 %334, %341
  br i1 %342, label %357, label %343

343:                                              ; preds = %329
  %344 = load ptr, ptr %24, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.MLayer, ptr %344, i32 0, i32 2
  %346 = load ptr, ptr %345, align 8, !tbaa !25
  %347 = getelementptr inbounds %struct.MTensor, ptr %346, i32 0, i32 2
  %348 = load i32, ptr %347, align 8, !tbaa !32
  %349 = load ptr, ptr %6, align 8, !tbaa !5
  %350 = load i32, ptr %25, align 4, !tbaa !18
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds ptr, ptr %349, i64 %351
  %353 = load ptr, ptr %352, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.MTensor, ptr %353, i32 0, i32 2
  %355 = load i32, ptr %354, align 8, !tbaa !32
  %356 = icmp ne i32 %348, %355
  br label %357

357:                                              ; preds = %343, %329, %315, %303
  %358 = phi i1 [ true, %329 ], [ true, %315 ], [ true, %303 ], [ %356, %343 ]
  %359 = zext i1 %358 to i32
  store i32 %359, ptr %26, align 4, !tbaa !18
  %360 = load i32, ptr %26, align 4, !tbaa !18
  %361 = icmp ne i32 %360, 0
  br i1 %361, label %362, label %364

362:                                              ; preds = %357
  %363 = load i32, ptr %26, align 4, !tbaa !18
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %363, i32 noundef -1, ptr noundef @.str, i32 noundef 396, ptr noundef @__FUNCTION__.mNetworkTensor, ptr noundef @.str.1)
  br label %364

364:                                              ; preds = %362, %357
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %365

365:                                              ; preds = %364
  br label %366

366:                                              ; preds = %365
  br label %367

367:                                              ; preds = %366
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  store i32 5, ptr %27, align 4, !tbaa !18
  %368 = load i32, ptr %27, align 4, !tbaa !18
  %369 = icmp eq i32 %368, 0
  br i1 %369, label %370, label %379

370:                                              ; preds = %367
  %371 = load ptr, ptr %24, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.MLayer, ptr %371, i32 0, i32 2
  %373 = load ptr, ptr %372, align 8, !tbaa !25
  %374 = load ptr, ptr %24, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.MLayer, ptr %374, i32 0, i32 2
  %376 = load ptr, ptr %375, align 8, !tbaa !25
  %377 = getelementptr inbounds %struct.MTensor, ptr %376, i32 0, i32 4
  %378 = load ptr, ptr %377, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %373, i32 noundef -1, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %378, i32 noundef -1)
  br label %443

379:                                              ; preds = %367
  %380 = load i32, ptr %27, align 4, !tbaa !18
  %381 = icmp eq i32 %380, 4
  br i1 %381, label %382, label %395

382:                                              ; preds = %379
  %383 = load ptr, ptr %24, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct.MLayer, ptr %383, i32 0, i32 2
  %385 = load ptr, ptr %384, align 8, !tbaa !25
  %386 = load ptr, ptr %8, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %386, i32 0, i32 3
  %388 = load i32, ptr %387, align 8, !tbaa !17
  %389 = add nsw i32 %388, 0
  %390 = load ptr, ptr %24, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.MLayer, ptr %390, i32 0, i32 2
  %392 = load ptr, ptr %391, align 8, !tbaa !25
  %393 = getelementptr inbounds %struct.MTensor, ptr %392, i32 0, i32 4
  %394 = load ptr, ptr %393, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %385, i32 noundef %389, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %394, i32 noundef -1)
  br label %442

395:                                              ; preds = %379
  %396 = load i32, ptr %27, align 4, !tbaa !18
  %397 = icmp eq i32 %396, 5
  br i1 %397, label %398, label %413

398:                                              ; preds = %395
  %399 = load ptr, ptr %24, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.MLayer, ptr %399, i32 0, i32 2
  %401 = load ptr, ptr %400, align 8, !tbaa !25
  %402 = load ptr, ptr %8, align 8, !tbaa !5
  %403 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %402, i32 0, i32 3
  %404 = load i32, ptr %403, align 8, !tbaa !17
  %405 = add nsw i32 %404, 0
  %406 = load ptr, ptr %6, align 8, !tbaa !5
  %407 = load i32, ptr %25, align 4, !tbaa !18
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds ptr, ptr %406, i64 %408
  %410 = load ptr, ptr %409, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.MTensor, ptr %410, i32 0, i32 4
  %412 = load ptr, ptr %411, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %401, i32 noundef %405, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %412, i32 noundef -1)
  br label %441

413:                                              ; preds = %395
  %414 = load i32, ptr %27, align 4, !tbaa !18
  %415 = icmp eq i32 %414, 6
  br i1 %415, label %416, label %431

416:                                              ; preds = %413
  %417 = load ptr, ptr %24, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.MLayer, ptr %417, i32 0, i32 2
  %419 = load ptr, ptr %418, align 8, !tbaa !25
  %420 = load ptr, ptr %8, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %420, i32 0, i32 3
  %422 = load i32, ptr %421, align 8, !tbaa !17
  %423 = add nsw i32 %422, 0
  %424 = load ptr, ptr %6, align 8, !tbaa !5
  %425 = load i32, ptr %25, align 4, !tbaa !18
  %426 = sext i32 %425 to i64
  %427 = getelementptr inbounds ptr, ptr %424, i64 %426
  %428 = load ptr, ptr %427, align 8, !tbaa !5
  %429 = getelementptr inbounds %struct.MTensor, ptr %428, i32 0, i32 4
  %430 = load ptr, ptr %429, align 8, !tbaa !26
  call void @TensorRedefine(ptr noundef %419, i32 noundef %423, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %430, i32 noundef -1)
  br label %440

431:                                              ; preds = %413
  br label %432

432:                                              ; preds = %431
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  store i32 1, ptr %28, align 4, !tbaa !18
  %433 = load i32, ptr %28, align 4, !tbaa !18
  %434 = icmp ne i32 %433, 0
  br i1 %434, label %435, label %437

435:                                              ; preds = %432
  %436 = load i32, ptr %28, align 4, !tbaa !18
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %436, i32 noundef -1, ptr noundef @.str, i32 noundef 397, ptr noundef @__FUNCTION__.mNetworkTensor, ptr noundef @.str.16)
  br label %437

437:                                              ; preds = %435, %432
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %438

438:                                              ; preds = %437
  br label %439

439:                                              ; preds = %438
  br label %440

440:                                              ; preds = %439, %416
  br label %441

441:                                              ; preds = %440, %398
  br label %442

442:                                              ; preds = %441, %382
  br label %443

443:                                              ; preds = %442, %370
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %444

444:                                              ; preds = %443
  br label %445

445:                                              ; preds = %444
  br label %450

446:                                              ; preds = %291
  br label %447

447:                                              ; preds = %446
  %448 = load i32, ptr %25, align 4, !tbaa !18
  %449 = add nsw i32 %448, 1
  store i32 %449, ptr %25, align 4, !tbaa !18
  br label %285, !llvm.loop !33

450:                                              ; preds = %445, %285
  br label %451

451:                                              ; preds = %450
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %452 = load i32, ptr %25, align 4, !tbaa !18
  %453 = load ptr, ptr %8, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct.HandleNetworkTensor, ptr %453, i32 0, i32 1
  %455 = load i32, ptr %454, align 8, !tbaa !27
  %456 = icmp eq i32 %452, %455
  %457 = zext i1 %456 to i32
  store i32 %457, ptr %29, align 4, !tbaa !18
  %458 = load i32, ptr %29, align 4, !tbaa !18
  %459 = icmp ne i32 %458, 0
  br i1 %459, label %460, label %465

460:                                              ; preds = %451
  %461 = load i32, ptr %29, align 4, !tbaa !18
  %462 = load ptr, ptr %24, align 8, !tbaa !5
  %463 = getelementptr inbounds %struct.MLayer, ptr %462, i32 0, i32 0
  %464 = getelementptr inbounds [32 x i8], ptr %463, i64 0, i64 0
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %461, i32 noundef -1, ptr noundef @.str, i32 noundef 401, ptr noundef @__FUNCTION__.mNetworkTensor, ptr noundef @.str.20, ptr noundef %464)
  br label %465

465:                                              ; preds = %460, %451
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  br label %466

466:                                              ; preds = %465
  br label %467

467:                                              ; preds = %466
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %468

468:                                              ; preds = %467
  %469 = load i32, ptr %23, align 4, !tbaa !18
  %470 = add nsw i32 %469, 1
  store i32 %470, ptr %23, align 4, !tbaa !18
  br label %262, !llvm.loop !34

471:                                              ; preds = %268
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

472:                                              ; preds = %252
  unreachable
}

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 = { inlinehint nounwind willreturn memory(read) 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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { 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, !6, i64 16}
!10 = !{!"MHandle", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!14, !6, i64 0}
!14 = !{!"HandleNetworkTensor", !6, i64 0, !11, i64 8, !6, i64 16, !11, i64 24}
!15 = !{!16, !11, i64 0}
!16 = !{!"MTensor", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !11, i64 24}
!17 = !{!14, !11, i64 24}
!18 = !{!11, !11, i64 0}
!19 = !{!20, !11, i64 0}
!20 = !{!"MList", !11, i64 0, !6, i64 8}
!21 = !{!14, !6, i64 16}
!22 = !{!20, !6, i64 8}
!23 = !{!24, !11, i64 32}
!24 = !{!"MLayer", !7, i64 0, !11, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64}
!25 = !{!24, !6, i64 40}
!26 = !{!16, !6, i64 16}
!27 = !{!14, !11, i64 8}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!16, !11, i64 4}
!31 = !{!16, !11, i64 12}
!32 = !{!16, !11, i64 8}
!33 = distinct !{!33, !29}
!34 = distinct !{!34, !29}


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

@.str = external hidden unnamed_addr constant [92 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@morn_network_flag = external local_unnamed_addr global i32, align 4
@.str.19 = external hidden unnamed_addr constant [14 x i8], align 1
@__FUNCTION__.mNetworkTensor = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1

declare ptr @mNetworkGenerate(ptr noundef) local_unnamed_addr #0

declare ptr @m_INIRead(ptr noundef, i64 noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

declare i32 @mTensorRegisterIndex(ptr noundef) local_unnamed_addr #0

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

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @mNetworkTensor(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #3 {
  %4 = tail call ptr @GetHandle(ptr noundef %0, i32 noundef 32, i32 noundef -312961482, ptr noundef nonnull @endNetworkTensor) #4
  %5 = getelementptr inbounds i8, ptr %4, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %4, i64 4
  %8 = load volatile i32, ptr %7, align 4, !tbaa !11
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %74

10:                                               ; preds = %3
  %11 = tail call ptr @mNetworkGenerate(ptr noundef %0) #4
  store ptr %11, ptr %6, align 8, !tbaa !12
  %12 = load ptr, ptr %2, align 8, !tbaa !14
  %13 = load i32, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %6, i64 24
  store i32 %13, ptr %14, align 8, !tbaa !17
  %15 = load i32, ptr @morn_network_flag, align 4, !tbaa !18
  %16 = icmp eq i32 %15, 0
  %. = select i1 %16, i64 ptrtoint (ptr @.str.19 to i64), i64 ptrtoint (ptr @.str.5 to i64)
  %17 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef ptrtoint (ptr @.str.4 to i64), i64 noundef %., ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %20, label %18

18:                                               ; preds = %10
  %19 = tail call i32 @atoi(ptr nocapture noundef %17) #5
  store i32 %19, ptr %14, align 8, !tbaa !17
  br label %20

20:                                               ; preds = %18, %10
  %21 = tail call i32 @mTensorRegisterIndex(ptr noundef nonnull @.str.8) #4
  %22 = tail call i32 @mTensorRegisterIndex(ptr noundef nonnull @.str.9) #4
  %23 = load ptr, ptr %6, align 8, !tbaa !12
  %24 = load i32, ptr %23, align 8, !tbaa !19
  %25 = shl i32 %24, 2
  %26 = tail call ptr @m_Malloc(i32 noundef %25) #4
  %27 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %26, ptr %27, align 8, !tbaa !21
  %28 = load ptr, ptr %6, align 8, !tbaa !12
  %29 = load i32, ptr %28, align 8, !tbaa !19
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %20
  %31 = getelementptr inbounds i8, ptr %6, i64 8
  br label %32

._crit_edge:                                      ; preds = %69, %20
  store volatile i32 1, ptr %7, align 4, !tbaa !11
  br label %74

32:                                               ; preds = %.lr.ph, %69
  %33 = phi i32 [ %29, %.lr.ph ], [ %70, %69 ]
  %34 = phi ptr [ %28, %.lr.ph ], [ %71, %69 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %69 ]
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load ptr, ptr %35, align 8, !tbaa !22
  %37 = getelementptr inbounds ptr, ptr %36, i64 %indvars.iv
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  %39 = getelementptr inbounds i8, ptr %38, i64 32
  %40 = load i32, ptr %39, align 8, !tbaa !23
  %.not125 = icmp eq i32 %40, %21
  %.not126 = icmp eq i32 %40, %22
  %or.cond = select i1 %.not125, i1 true, i1 %.not126
  br i1 %or.cond, label %41, label %69

41:                                               ; preds = %32
  %42 = ptrtoint ptr %38 to i64
  %43 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %42, i64 noundef ptrtoint (ptr @.str.10 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 374, ptr noundef nonnull @__FUNCTION__.mNetworkTensor, ptr noundef nonnull @.str.11) #4
  br label %46

46:                                               ; preds = %45, %41
  %47 = tail call i32 @atoi(ptr nocapture noundef %43) #5
  %48 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %42, i64 noundef ptrtoint (ptr @.str.12 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 375, ptr noundef nonnull @__FUNCTION__.mNetworkTensor, ptr noundef nonnull @.str.13) #4
  br label %51

51:                                               ; preds = %50, %46
  %52 = tail call i32 @atoi(ptr nocapture noundef %48) #5
  %53 = tail call ptr (ptr, i64, i64, ptr, ...) @m_INIRead(ptr noundef %0, i64 noundef %42, i64 noundef ptrtoint (ptr @.str.14 to i64), ptr noundef nonnull inttoptr (i64 -1 to ptr), i32 noundef -1) #4
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %56

55:                                               ; preds = %51
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 376, ptr noundef nonnull @__FUNCTION__.mNetworkTensor, ptr noundef nonnull @.str.15) #4
  br label %56

56:                                               ; preds = %55, %51
  %57 = tail call i32 @atoi(ptr nocapture noundef %53) #5
  %58 = getelementptr inbounds i8, ptr %38, i64 40
  %59 = load ptr, ptr %58, align 8, !tbaa !25
  tail call void @TensorRedefine(ptr noundef %59, i32 noundef 0, i32 noundef %47, i32 noundef %52, i32 noundef %57, ptr noundef null, i32 noundef -1) #4
  %60 = load i32, ptr %14, align 8, !tbaa !17
  %61 = load ptr, ptr %58, align 8, !tbaa !25
  store i32 %60, ptr %61, align 8, !tbaa !15
  %62 = load ptr, ptr %27, align 8, !tbaa !21
  %63 = load i32, ptr %31, align 8, !tbaa !26
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i32, ptr %62, i64 %64
  %66 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %66, ptr %65, align 4, !tbaa !18
  %67 = load i32, ptr %31, align 8, !tbaa !26
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %31, align 8, !tbaa !26
  %.pre = load ptr, ptr %6, align 8, !tbaa !12
  %.pre148 = load i32, ptr %.pre, align 8, !tbaa !19
  br label %69

69:                                               ; preds = %32, %56
  %70 = phi i32 [ %33, %32 ], [ %.pre148, %56 ]
  %71 = phi ptr [ %34, %32 ], [ %.pre, %56 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %72 = sext i32 %70 to i64
  %73 = icmp slt i64 %indvars.iv.next, %72
  br i1 %73, label %32, label %._crit_edge, !llvm.loop !27

74:                                               ; preds = %._crit_edge, %3
  %75 = getelementptr inbounds i8, ptr %6, i64 8
  %76 = load i32, ptr %75, align 8, !tbaa !26
  %77 = icmp sgt i32 %76, 0
  br i1 %77, label %.lr.ph136, label %._crit_edge137

.lr.ph136:                                        ; preds = %74
  %78 = getelementptr inbounds i8, ptr %6, i64 16
  %79 = getelementptr inbounds i8, ptr %6, i64 24
  br label %80

._crit_edge137:                                   ; preds = %128, %74
  ret void

80:                                               ; preds = %.lr.ph136, %128
  %81 = phi i32 [ %76, %.lr.ph136 ], [ %129, %128 ]
  %indvars.iv145 = phi i64 [ 0, %.lr.ph136 ], [ %indvars.iv.next146, %128 ]
  %82 = load ptr, ptr %6, align 8, !tbaa !12
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !22
  %85 = load ptr, ptr %78, align 8, !tbaa !21
  %86 = getelementptr inbounds i32, ptr %85, i64 %indvars.iv145
  %87 = load i32, ptr %86, align 4, !tbaa !18
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds ptr, ptr %84, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !14
  %91 = icmp sgt i32 %81, 0
  br i1 %91, label %.lr.ph133.preheader, label %.loopexit

.lr.ph133.preheader:                              ; preds = %80
  %wide.trip.count = zext nneg i32 %81 to i64
  br label %.lr.ph133

.lr.ph133:                                        ; preds = %.lr.ph133.preheader, %125
  %indvars.iv142 = phi i64 [ 0, %.lr.ph133.preheader ], [ %indvars.iv.next143, %125 ]
  %92 = getelementptr inbounds ptr, ptr %1, i64 %indvars.iv142
  %93 = load ptr, ptr %92, align 8, !tbaa !14
  %94 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %90, ptr noundef nonnull dereferenceable(1) %93) #5
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %125

96:                                               ; preds = %.lr.ph133
  %97 = trunc nuw nsw i64 %indvars.iv142 to i32
  %98 = load i32, ptr %79, align 8, !tbaa !17
  %99 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv142
  %100 = load ptr, ptr %99, align 8, !tbaa !14
  %101 = load i32, ptr %100, align 8, !tbaa !15
  %.not122 = icmp eq i32 %98, %101
  br i1 %.not122, label %102, label %.thread

102:                                              ; preds = %96
  %103 = getelementptr inbounds i8, ptr %90, i64 40
  %104 = load ptr, ptr %103, align 8, !tbaa !25
  %105 = getelementptr inbounds i8, ptr %104, i64 4
  %106 = load i32, ptr %105, align 4, !tbaa !29
  %107 = getelementptr inbounds i8, ptr %100, i64 4
  %108 = load i32, ptr %107, align 4, !tbaa !29
  %.not123 = icmp eq i32 %106, %108
  br i1 %.not123, label %109, label %.thread

109:                                              ; preds = %102
  %110 = getelementptr inbounds i8, ptr %104, i64 12
  %111 = load i32, ptr %110, align 4, !tbaa !30
  %112 = getelementptr inbounds i8, ptr %100, i64 12
  %113 = load i32, ptr %112, align 4, !tbaa !30
  %.not124 = icmp eq i32 %111, %113
  br i1 %.not124, label %114, label %.thread

114:                                              ; preds = %109
  %115 = getelementptr inbounds i8, ptr %104, i64 8
  %116 = load i32, ptr %115, align 8, !tbaa !31
  %117 = getelementptr inbounds i8, ptr %100, i64 8
  %118 = load i32, ptr %117, align 8, !tbaa !31
  %.not127 = icmp eq i32 %116, %118
  br i1 %.not127, label %119, label %.thread

.thread:                                          ; preds = %96, %102, %109, %114
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 396, ptr noundef nonnull @__FUNCTION__.mNetworkTensor, ptr noundef nonnull @.str.1) #4
  %.phi.trans.insert = getelementptr inbounds i8, ptr %90, i64 40
  %.pre149 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !25
  %.pre150 = load i32, ptr %79, align 8, !tbaa !17
  %.pre151 = load ptr, ptr %99, align 8, !tbaa !14
  br label %119

119:                                              ; preds = %114, %.thread
  %120 = phi ptr [ %100, %114 ], [ %.pre151, %.thread ]
  %121 = phi i32 [ %98, %114 ], [ %.pre150, %.thread ]
  %122 = phi ptr [ %104, %114 ], [ %.pre149, %.thread ]
  %123 = getelementptr inbounds i8, ptr %120, i64 16
  %124 = load ptr, ptr %123, align 8, !tbaa !32
  tail call void @TensorRedefine(ptr noundef %122, i32 noundef %121, i32 noundef -1, i32 noundef -1, i32 noundef -1, ptr noundef %124, i32 noundef -1) #4
  %.pre152 = load i32, ptr %75, align 8, !tbaa !26
  br label %.loopexit

125:                                              ; preds = %.lr.ph133
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next143, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit.thread, label %.lr.ph133, !llvm.loop !33

.loopexit:                                        ; preds = %80, %119
  %126 = phi i32 [ %.pre152, %119 ], [ %81, %80 ]
  %.0120129 = phi i32 [ %97, %119 ], [ 0, %80 ]
  %127 = icmp eq i32 %.0120129, %126
  br i1 %127, label %.loopexit.thread, label %128

.loopexit.thread:                                 ; preds = %125, %.loopexit
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 401, ptr noundef nonnull @__FUNCTION__.mNetworkTensor, ptr noundef nonnull @.str.20, ptr noundef %90) #4
  %.pre153 = load i32, ptr %75, align 8, !tbaa !26
  br label %128

128:                                              ; preds = %.loopexit.thread, %.loopexit
  %129 = phi i32 [ %.pre153, %.loopexit.thread ], [ %126, %.loopexit ]
  %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1
  %130 = sext i32 %129 to i64
  %131 = icmp slt i64 %indvars.iv.next146, %130
  br i1 %131, label %80, label %._crit_edge137, !llvm.loop !34
}

attributes #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 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 #2 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 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 }
attributes #5 = { 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, !10, i64 16}
!6 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!13, !10, i64 0}
!13 = !{!"HandleNetworkTensor", !10, i64 0, !7, i64 8, !10, i64 16, !7, i64 24}
!14 = !{!10, !10, i64 0}
!15 = !{!16, !7, i64 0}
!16 = !{!"MTensor", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !7, i64 24}
!17 = !{!13, !7, i64 24}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !7, i64 0}
!20 = !{!"MList", !7, i64 0, !10, i64 8}
!21 = !{!13, !10, i64 16}
!22 = !{!20, !10, i64 8}
!23 = !{!24, !7, i64 32}
!24 = !{!"MLayer", !8, i64 0, !7, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64}
!25 = !{!24, !10, i64 40}
!26 = !{!13, !7, i64 8}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!16, !7, i64 4}
!30 = !{!16, !7, i64 12}
!31 = !{!16, !7, i64 8}
!32 = !{!16, !10, i64 16}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}


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