; LLVM IR from jingweizhanghuai/Morn :: test (test_tensor)

; 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.MTensor = type { i32, i32, i32, i32, ptr, i32 }

@cl_source = external dso_local global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@morn_cl_function_para_num = external thread_local global i32, align 4
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@morn_cl_function_para = external thread_local global [16 x ptr], align 16
@morn_cl_function_para_size = external thread_local global [16 x i32], align 16
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %20 = call ptr @TensorCreate(i32 noundef 1, i32 noundef 10, i32 noundef 100, i32 noundef 100, ptr noundef null, i32 noundef 64)
  store ptr %20, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %21 = call ptr @TensorCreate(i32 noundef 1, i32 noundef 10, i32 noundef 100, i32 noundef 100, ptr noundef null, i32 noundef 64)
  store ptr %21, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %22 = call ptr @TensorCreate(i32 noundef 1, i32 noundef 10, i32 noundef 100, i32 noundef 100, ptr noundef null, i32 noundef 64)
  store ptr %22, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %50, %0
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = icmp slt i32 %24, 100000
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %23
  %28 = call i32 @m_Rand(i32 noundef 0, i32 noundef 1000)
  %29 = sitofp i32 %28 to float
  %30 = fdiv float %29, 1.000000e+02
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.MTensor, ptr %31, i32 0, i32 4
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds ptr, ptr %33, i64 0
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds float, ptr %35, i64 %37
  store float %30, ptr %38, align 4, !tbaa !13
  %39 = call i32 @m_Rand(i32 noundef 0, i32 noundef 1000)
  %40 = sitofp i32 %39 to float
  %41 = fdiv float %40, 1.000000e+02
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.MTensor, ptr %42, i32 0, i32 4
  %44 = load ptr, ptr %43, align 8, !tbaa !11
  %45 = getelementptr inbounds ptr, ptr %44, i64 0
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds float, ptr %46, i64 %48
  store float %41, ptr %49, align 4, !tbaa !13
  br label %50

50:                                               ; preds = %27
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %5, align 4, !tbaa !9
  br label %23, !llvm.loop !15

53:                                               ; preds = %26
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %71, %53
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = icmp slt i32 %56, 50
  br i1 %57, label %59, label %58

58:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %74

59:                                               ; preds = %55
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.MTensor, ptr %60, i32 0, i32 4
  %62 = load ptr, ptr %61, align 8, !tbaa !11
  %63 = getelementptr inbounds ptr, ptr %62, i64 0
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds float, ptr %64, i64 %66
  %68 = load float, ptr %67, align 4, !tbaa !13
  %69 = fpext float %68 to double
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %69)
  br label %71

71:                                               ; preds = %59
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %6, align 4, !tbaa !9
  br label %55, !llvm.loop !17

74:                                               ; preds = %58
  %75 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %92, %74
  %77 = load i32, ptr %7, align 4, !tbaa !9
  %78 = icmp slt i32 %77, 50
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %95

80:                                               ; preds = %76
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MTensor, ptr %81, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !11
  %84 = getelementptr inbounds ptr, ptr %83, i64 0
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds float, ptr %85, i64 %87
  %89 = load float, ptr %88, align 4, !tbaa !13
  %90 = fpext float %89 to double
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %90)
  br label %92

92:                                               ; preds = %80
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %7, align 4, !tbaa !9
  br label %76, !llvm.loop !18

95:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.MTensor, ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = getelementptr inbounds ptr, ptr %98, i64 0
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = call ptr @mMemoryBlock(ptr noundef %100)
  store ptr %101, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.MTensor, ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = getelementptr inbounds ptr, ptr %104, i64 0
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = call ptr @mMemoryBlock(ptr noundef %106)
  store ptr %107, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.MTensor, ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !11
  %111 = getelementptr inbounds ptr, ptr %110, i64 0
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = call ptr @mMemoryBlock(ptr noundef %112)
  store ptr %113, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store float 1.000000e+00, ptr %11, align 4, !tbaa !13
  br label %114

114:                                              ; preds = %95
  %115 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  store i32 0, ptr %115, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 3, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  %116 = load i32, ptr %12, align 4, !tbaa !9
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %118, label %123

118:                                              ; preds = %114
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = call i32 @CLIN(ptr noundef %119)
  %121 = load i32, ptr %13, align 4, !tbaa !9
  %122 = add nsw i32 %121, %120
  store i32 %122, ptr %13, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %118, %114
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = icmp sgt i32 %124, 1
  br i1 %125, label %126, label %130

126:                                              ; preds = %123
  %127 = call i32 @CLPARA(ptr noundef %11, i32 noundef 4)
  %128 = load i32, ptr %13, align 4, !tbaa !9
  %129 = add nsw i32 %128, %127
  store i32 %129, ptr %13, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %126, %123
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = icmp sgt i32 %131, 2
  br i1 %132, label %133, label %138

133:                                              ; preds = %130
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = call i32 @CLOUT(ptr noundef %134)
  %136 = load i32, ptr %13, align 4, !tbaa !9
  %137 = add nsw i32 %136, %135
  store i32 %137, ptr %13, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %133, %130
  %139 = load i32, ptr %12, align 4, !tbaa !9
  %140 = icmp sgt i32 %139, 3
  br i1 %140, label %141, label %144

141:                                              ; preds = %138
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = add nsw i32 %142, -1
  store i32 %143, ptr %13, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %141, %138
  %145 = load i32, ptr %12, align 4, !tbaa !9
  %146 = icmp sgt i32 %145, 4
  br i1 %146, label %147, label %150

147:                                              ; preds = %144
  %148 = load i32, ptr %13, align 4, !tbaa !9
  %149 = add nsw i32 %148, -1
  store i32 %149, ptr %13, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %147, %144
  %151 = load i32, ptr %12, align 4, !tbaa !9
  %152 = icmp sgt i32 %151, 5
  br i1 %152, label %153, label %156

153:                                              ; preds = %150
  %154 = load i32, ptr %13, align 4, !tbaa !9
  %155 = add nsw i32 %154, -1
  store i32 %155, ptr %13, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %153, %150
  %157 = load i32, ptr %12, align 4, !tbaa !9
  %158 = icmp sgt i32 %157, 6
  br i1 %158, label %159, label %162

159:                                              ; preds = %156
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = add nsw i32 %160, -1
  store i32 %161, ptr %13, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %159, %156
  %163 = load i32, ptr %12, align 4, !tbaa !9
  %164 = icmp sgt i32 %163, 7
  br i1 %164, label %165, label %168

165:                                              ; preds = %162
  %166 = load i32, ptr %13, align 4, !tbaa !9
  %167 = add nsw i32 %166, -1
  store i32 %167, ptr %13, align 4, !tbaa !9
  br label %168

168:                                              ; preds = %165, %162
  %169 = load i32, ptr %12, align 4, !tbaa !9
  %170 = icmp sgt i32 %169, 8
  br i1 %170, label %171, label %174

171:                                              ; preds = %168
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = add nsw i32 %172, -1
  store i32 %173, ptr %13, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %171, %168
  %175 = load i32, ptr %12, align 4, !tbaa !9
  %176 = icmp sgt i32 %175, 9
  br i1 %176, label %177, label %180

177:                                              ; preds = %174
  %178 = load i32, ptr %13, align 4, !tbaa !9
  %179 = add nsw i32 %178, -1
  store i32 %179, ptr %13, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %177, %174
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = icmp sgt i32 %181, 10
  br i1 %182, label %183, label %186

183:                                              ; preds = %180
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = add nsw i32 %184, -1
  store i32 %185, ptr %13, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %183, %180
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = icmp sgt i32 %187, 11
  br i1 %188, label %189, label %192

189:                                              ; preds = %186
  %190 = load i32, ptr %13, align 4, !tbaa !9
  %191 = add nsw i32 %190, -1
  store i32 %191, ptr %13, align 4, !tbaa !9
  br label %192

192:                                              ; preds = %189, %186
  %193 = load i32, ptr %12, align 4, !tbaa !9
  %194 = icmp sgt i32 %193, 12
  br i1 %194, label %195, label %198

195:                                              ; preds = %192
  %196 = load i32, ptr %13, align 4, !tbaa !9
  %197 = add nsw i32 %196, -1
  store i32 %197, ptr %13, align 4, !tbaa !9
  br label %198

198:                                              ; preds = %195, %192
  %199 = load i32, ptr %12, align 4, !tbaa !9
  %200 = icmp sgt i32 %199, 13
  br i1 %200, label %201, label %204

201:                                              ; preds = %198
  %202 = load i32, ptr %13, align 4, !tbaa !9
  %203 = add nsw i32 %202, -1
  store i32 %203, ptr %13, align 4, !tbaa !9
  br label %204

204:                                              ; preds = %201, %198
  %205 = load i32, ptr %12, align 4, !tbaa !9
  %206 = icmp sgt i32 %205, 14
  br i1 %206, label %207, label %210

207:                                              ; preds = %204
  %208 = load i32, ptr %13, align 4, !tbaa !9
  %209 = add nsw i32 %208, -1
  store i32 %209, ptr %13, align 4, !tbaa !9
  br label %210

210:                                              ; preds = %207, %204
  %211 = load i32, ptr %12, align 4, !tbaa !9
  %212 = icmp sgt i32 %211, 15
  br i1 %212, label %213, label %216

213:                                              ; preds = %210
  %214 = load i32, ptr %13, align 4, !tbaa !9
  %215 = add nsw i32 %214, -1
  store i32 %215, ptr %13, align 4, !tbaa !9
  br label %216

216:                                              ; preds = %213, %210
  br label %217

217:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %218 = load i32, ptr %13, align 4, !tbaa !9
  %219 = load i32, ptr %12, align 4, !tbaa !9
  %220 = sub nsw i32 -1, %219
  %221 = icmp ne i32 %218, %220
  br i1 %221, label %228, label %222

222:                                              ; preds = %217
  %223 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  %224 = load i32, ptr %223, align 4, !tbaa !9
  %225 = load i32, ptr %12, align 4, !tbaa !9
  %226 = add nsw i32 -1, %225
  %227 = icmp ne i32 %224, %226
  br label %228

228:                                              ; preds = %222, %217
  %229 = phi i1 [ true, %217 ], [ %227, %222 ]
  %230 = zext i1 %229 to i32
  store i32 %230, ptr %14, align 4, !tbaa !9
  %231 = load i32, ptr %14, align 4, !tbaa !9
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %235

233:                                              ; preds = %228
  %234 = load i32, ptr %14, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %234, i32 noundef -1, ptr noundef @.str.4, i32 noundef 34, ptr noundef @__FUNCTION__.main, ptr noundef @.str.5)
  br label %235

235:                                              ; preds = %233, %228
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr @cl_source, align 8, !tbaa !5
  %239 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  %240 = load i32, ptr %239, align 4, !tbaa !9
  %241 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_cl_function_para)
  %242 = getelementptr inbounds [16 x ptr], ptr %241, i64 0, i64 0
  %243 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_cl_function_para_size)
  %244 = getelementptr inbounds [16 x i32], ptr %243, i64 0, i64 0
  call void @CLFunction(ptr noundef %238, ptr noundef @.str.6, i32 noundef %240, ptr noundef %242, ptr noundef %244)
  %245 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  store i32 0, ptr %245, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %246

246:                                              ; preds = %237
  br label %247

247:                                              ; preds = %246
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mMemoryBlockRead(ptr noundef %248)
  %249 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %250

250:                                              ; preds = %266, %247
  %251 = load i32, ptr %15, align 4, !tbaa !9
  %252 = icmp slt i32 %251, 50
  br i1 %252, label %254, label %253

253:                                              ; preds = %250
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %269

254:                                              ; preds = %250
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.MTensor, ptr %255, i32 0, i32 4
  %257 = load ptr, ptr %256, align 8, !tbaa !11
  %258 = getelementptr inbounds ptr, ptr %257, i64 0
  %259 = load ptr, ptr %258, align 8, !tbaa !5
  %260 = load i32, ptr %15, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds float, ptr %259, i64 %261
  %263 = load float, ptr %262, align 4, !tbaa !13
  %264 = fpext float %263 to double
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %264)
  br label %266

266:                                              ; preds = %254
  %267 = load i32, ptr %15, align 4, !tbaa !9
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %15, align 4, !tbaa !9
  br label %250, !llvm.loop !19

269:                                              ; preds = %253
  br label %270

270:                                              ; preds = %269
  %271 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  store i32 0, ptr %271, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 3, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  %272 = load i32, ptr %16, align 4, !tbaa !9
  %273 = icmp sgt i32 %272, 0
  br i1 %273, label %274, label %279

274:                                              ; preds = %270
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  %276 = call i32 @CLIN(ptr noundef %275)
  %277 = load i32, ptr %17, align 4, !tbaa !9
  %278 = add nsw i32 %277, %276
  store i32 %278, ptr %17, align 4, !tbaa !9
  br label %279

279:                                              ; preds = %274, %270
  %280 = load i32, ptr %16, align 4, !tbaa !9
  %281 = icmp sgt i32 %280, 1
  br i1 %281, label %282, label %286

282:                                              ; preds = %279
  %283 = call i32 @CLPARA(ptr noundef %11, i32 noundef 4)
  %284 = load i32, ptr %17, align 4, !tbaa !9
  %285 = add nsw i32 %284, %283
  store i32 %285, ptr %17, align 4, !tbaa !9
  br label %286

286:                                              ; preds = %282, %279
  %287 = load i32, ptr %16, align 4, !tbaa !9
  %288 = icmp sgt i32 %287, 2
  br i1 %288, label %289, label %294

289:                                              ; preds = %286
  %290 = load ptr, ptr %10, align 8, !tbaa !5
  %291 = call i32 @CLOUT(ptr noundef %290)
  %292 = load i32, ptr %17, align 4, !tbaa !9
  %293 = add nsw i32 %292, %291
  store i32 %293, ptr %17, align 4, !tbaa !9
  br label %294

294:                                              ; preds = %289, %286
  %295 = load i32, ptr %16, align 4, !tbaa !9
  %296 = icmp sgt i32 %295, 3
  br i1 %296, label %297, label %300

297:                                              ; preds = %294
  %298 = load i32, ptr %17, align 4, !tbaa !9
  %299 = add nsw i32 %298, -1
  store i32 %299, ptr %17, align 4, !tbaa !9
  br label %300

300:                                              ; preds = %297, %294
  %301 = load i32, ptr %16, align 4, !tbaa !9
  %302 = icmp sgt i32 %301, 4
  br i1 %302, label %303, label %306

303:                                              ; preds = %300
  %304 = load i32, ptr %17, align 4, !tbaa !9
  %305 = add nsw i32 %304, -1
  store i32 %305, ptr %17, align 4, !tbaa !9
  br label %306

306:                                              ; preds = %303, %300
  %307 = load i32, ptr %16, align 4, !tbaa !9
  %308 = icmp sgt i32 %307, 5
  br i1 %308, label %309, label %312

309:                                              ; preds = %306
  %310 = load i32, ptr %17, align 4, !tbaa !9
  %311 = add nsw i32 %310, -1
  store i32 %311, ptr %17, align 4, !tbaa !9
  br label %312

312:                                              ; preds = %309, %306
  %313 = load i32, ptr %16, align 4, !tbaa !9
  %314 = icmp sgt i32 %313, 6
  br i1 %314, label %315, label %318

315:                                              ; preds = %312
  %316 = load i32, ptr %17, align 4, !tbaa !9
  %317 = add nsw i32 %316, -1
  store i32 %317, ptr %17, align 4, !tbaa !9
  br label %318

318:                                              ; preds = %315, %312
  %319 = load i32, ptr %16, align 4, !tbaa !9
  %320 = icmp sgt i32 %319, 7
  br i1 %320, label %321, label %324

321:                                              ; preds = %318
  %322 = load i32, ptr %17, align 4, !tbaa !9
  %323 = add nsw i32 %322, -1
  store i32 %323, ptr %17, align 4, !tbaa !9
  br label %324

324:                                              ; preds = %321, %318
  %325 = load i32, ptr %16, align 4, !tbaa !9
  %326 = icmp sgt i32 %325, 8
  br i1 %326, label %327, label %330

327:                                              ; preds = %324
  %328 = load i32, ptr %17, align 4, !tbaa !9
  %329 = add nsw i32 %328, -1
  store i32 %329, ptr %17, align 4, !tbaa !9
  br label %330

330:                                              ; preds = %327, %324
  %331 = load i32, ptr %16, align 4, !tbaa !9
  %332 = icmp sgt i32 %331, 9
  br i1 %332, label %333, label %336

333:                                              ; preds = %330
  %334 = load i32, ptr %17, align 4, !tbaa !9
  %335 = add nsw i32 %334, -1
  store i32 %335, ptr %17, align 4, !tbaa !9
  br label %336

336:                                              ; preds = %333, %330
  %337 = load i32, ptr %16, align 4, !tbaa !9
  %338 = icmp sgt i32 %337, 10
  br i1 %338, label %339, label %342

339:                                              ; preds = %336
  %340 = load i32, ptr %17, align 4, !tbaa !9
  %341 = add nsw i32 %340, -1
  store i32 %341, ptr %17, align 4, !tbaa !9
  br label %342

342:                                              ; preds = %339, %336
  %343 = load i32, ptr %16, align 4, !tbaa !9
  %344 = icmp sgt i32 %343, 11
  br i1 %344, label %345, label %348

345:                                              ; preds = %342
  %346 = load i32, ptr %17, align 4, !tbaa !9
  %347 = add nsw i32 %346, -1
  store i32 %347, ptr %17, align 4, !tbaa !9
  br label %348

348:                                              ; preds = %345, %342
  %349 = load i32, ptr %16, align 4, !tbaa !9
  %350 = icmp sgt i32 %349, 12
  br i1 %350, label %351, label %354

351:                                              ; preds = %348
  %352 = load i32, ptr %17, align 4, !tbaa !9
  %353 = add nsw i32 %352, -1
  store i32 %353, ptr %17, align 4, !tbaa !9
  br label %354

354:                                              ; preds = %351, %348
  %355 = load i32, ptr %16, align 4, !tbaa !9
  %356 = icmp sgt i32 %355, 13
  br i1 %356, label %357, label %360

357:                                              ; preds = %354
  %358 = load i32, ptr %17, align 4, !tbaa !9
  %359 = add nsw i32 %358, -1
  store i32 %359, ptr %17, align 4, !tbaa !9
  br label %360

360:                                              ; preds = %357, %354
  %361 = load i32, ptr %16, align 4, !tbaa !9
  %362 = icmp sgt i32 %361, 14
  br i1 %362, label %363, label %366

363:                                              ; preds = %360
  %364 = load i32, ptr %17, align 4, !tbaa !9
  %365 = add nsw i32 %364, -1
  store i32 %365, ptr %17, align 4, !tbaa !9
  br label %366

366:                                              ; preds = %363, %360
  %367 = load i32, ptr %16, align 4, !tbaa !9
  %368 = icmp sgt i32 %367, 15
  br i1 %368, label %369, label %372

369:                                              ; preds = %366
  %370 = load i32, ptr %17, align 4, !tbaa !9
  %371 = add nsw i32 %370, -1
  store i32 %371, ptr %17, align 4, !tbaa !9
  br label %372

372:                                              ; preds = %369, %366
  br label %373

373:                                              ; preds = %372
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %374 = load i32, ptr %17, align 4, !tbaa !9
  %375 = load i32, ptr %16, align 4, !tbaa !9
  %376 = sub nsw i32 -1, %375
  %377 = icmp ne i32 %374, %376
  br i1 %377, label %384, label %378

378:                                              ; preds = %373
  %379 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  %380 = load i32, ptr %379, align 4, !tbaa !9
  %381 = load i32, ptr %16, align 4, !tbaa !9
  %382 = add nsw i32 -1, %381
  %383 = icmp ne i32 %380, %382
  br label %384

384:                                              ; preds = %378, %373
  %385 = phi i1 [ true, %373 ], [ %383, %378 ]
  %386 = zext i1 %385 to i32
  store i32 %386, ptr %18, align 4, !tbaa !9
  %387 = load i32, ptr %18, align 4, !tbaa !9
  %388 = icmp ne i32 %387, 0
  br i1 %388, label %389, label %391

389:                                              ; preds = %384
  %390 = load i32, ptr %18, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %390, i32 noundef -1, ptr noundef @.str.4, i32 noundef 39, ptr noundef @__FUNCTION__.main, ptr noundef @.str.5)
  br label %391

391:                                              ; preds = %389, %384
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %392

392:                                              ; preds = %391
  br label %393

393:                                              ; preds = %392
  %394 = load ptr, ptr @cl_source, align 8, !tbaa !5
  %395 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  %396 = load i32, ptr %395, align 4, !tbaa !9
  %397 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_cl_function_para)
  %398 = getelementptr inbounds [16 x ptr], ptr %397, i64 0, i64 0
  %399 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_cl_function_para_size)
  %400 = getelementptr inbounds [16 x i32], ptr %399, i64 0, i64 0
  call void @CLFunction(ptr noundef %394, ptr noundef @.str.6, i32 noundef %396, ptr noundef %398, ptr noundef %400)
  %401 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  store i32 0, ptr %401, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %402

402:                                              ; preds = %393
  br label %403

403:                                              ; preds = %402
  %404 = load ptr, ptr %10, align 8, !tbaa !5
  call void @mMemoryBlockRead(ptr noundef %404)
  %405 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %406

406:                                              ; preds = %422, %403
  %407 = load i32, ptr %19, align 4, !tbaa !9
  %408 = icmp slt i32 %407, 50
  br i1 %408, label %410, label %409

409:                                              ; preds = %406
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %425

410:                                              ; preds = %406
  %411 = load ptr, ptr %4, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.MTensor, ptr %411, i32 0, i32 4
  %413 = load ptr, ptr %412, align 8, !tbaa !11
  %414 = getelementptr inbounds ptr, ptr %413, i64 0
  %415 = load ptr, ptr %414, align 8, !tbaa !5
  %416 = load i32, ptr %19, align 4, !tbaa !9
  %417 = sext i32 %416 to i64
  %418 = getelementptr inbounds float, ptr %415, i64 %417
  %419 = load float, ptr %418, align 4, !tbaa !13
  %420 = fpext float %419 to double
  %421 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, double noundef %420)
  br label %422

422:                                              ; preds = %410
  %423 = load i32, ptr %19, align 4, !tbaa !9
  %424 = add nsw i32 %423, 1
  store i32 %424, ptr %19, align 4, !tbaa !9
  br label %406, !llvm.loop !20

425:                                              ; preds = %409
  %426 = load ptr, ptr %2, align 8, !tbaa !5
  call void @mTensorRelease(ptr noundef %426)
  %427 = load ptr, ptr %3, align 8, !tbaa !5
  call void @mTensorRelease(ptr noundef %427)
  %428 = load ptr, ptr %4, align 8, !tbaa !5
  call void @mTensorRelease(ptr noundef %428)
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  %429 = load i32, ptr %1, align 4
  ret i32 %429
}

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

declare ptr @TensorCreate(i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare i32 @m_Rand(i32 noundef, i32 noundef) #2

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

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

declare ptr @mMemoryBlock(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

declare i32 @CLIN(ptr noundef) #2

declare i32 @CLPARA(ptr noundef, i32 noundef) #2

declare i32 @CLOUT(ptr noundef) #2

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

declare void @CLFunction(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare void @mMemoryBlockRead(ptr noundef) #2

declare void @mTensorRelease(ptr noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 16}
!12 = !{!"MTensor", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


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

@cl_source = external dso_local local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@morn_cl_function_para_num = external thread_local local_unnamed_addr global i32, align 4
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@morn_cl_function_para = external thread_local global [16 x ptr], align 16
@morn_cl_function_para_size = external thread_local global [16 x i32], align 16
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca float, align 4
  %2 = tail call ptr @TensorCreate(i32 noundef 1, i32 noundef 10, i32 noundef 100, i32 noundef 100, ptr noundef null, i32 noundef 64) #5
  %3 = tail call ptr @TensorCreate(i32 noundef 1, i32 noundef 10, i32 noundef 100, i32 noundef 100, ptr noundef null, i32 noundef 64) #5
  %4 = tail call ptr @TensorCreate(i32 noundef 1, i32 noundef 10, i32 noundef 100, i32 noundef 100, ptr noundef null, i32 noundef 64) #5
  %5 = getelementptr inbounds i8, ptr %2, i64 16
  %6 = getelementptr inbounds i8, ptr %3, i64 16
  br label %9

7:                                                ; preds = %9
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %24

9:                                                ; preds = %0, %9
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %9 ]
  %10 = tail call i32 @m_Rand(i32 noundef 0, i32 noundef 1000) #5
  %11 = sitofp i32 %10 to float
  %12 = fdiv float %11, 1.000000e+02
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds float, ptr %14, i64 %indvars.iv
  store float %12, ptr %15, align 4, !tbaa !12
  %16 = tail call i32 @m_Rand(i32 noundef 0, i32 noundef 1000) #5
  %17 = sitofp i32 %16 to float
  %18 = fdiv float %17, 1.000000e+02
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = getelementptr inbounds float, ptr %20, i64 %indvars.iv
  store float %18, ptr %21, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100000
  br i1 %exitcond.not, label %7, label %9, !llvm.loop !14

22:                                               ; preds = %24
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %52

24:                                               ; preds = %7, %24
  %indvars.iv135 = phi i64 [ 0, %7 ], [ %indvars.iv.next136, %24 ]
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = getelementptr inbounds float, ptr %26, i64 %indvars.iv135
  %28 = load float, ptr %27, align 4, !tbaa !12
  %29 = fpext float %28 to double
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %29)
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond138.not = icmp eq i64 %indvars.iv.next136, 50
  br i1 %exitcond138.not, label %22, label %24, !llvm.loop !16

31:                                               ; preds = %52
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = tail call ptr @mMemoryBlock(ptr noundef %33) #5
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = tail call ptr @mMemoryBlock(ptr noundef %36) #5
  %38 = getelementptr inbounds i8, ptr %4, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = tail call ptr @mMemoryBlock(ptr noundef %40) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store float 1.000000e+00, ptr %1, align 4, !tbaa !12
  %42 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @morn_cl_function_para_num)
  store i32 0, ptr %42, align 4, !tbaa !17
  %43 = tail call i32 @CLIN(ptr noundef %34) #5
  %44 = call i32 @CLPARA(ptr noundef nonnull %1, i32 noundef 4) #5
  %45 = add nsw i32 %44, %43
  %46 = call i32 @CLOUT(ptr noundef %41) #5
  %47 = add nsw i32 %45, %46
  %48 = icmp ne i32 %47, -4
  %49 = load i32, ptr %42, align 4
  %50 = icmp ne i32 %49, 2
  %51 = select i1 %48, i1 true, i1 %50
  br i1 %51, label %59, label %60

52:                                               ; preds = %22, %52
  %indvars.iv139 = phi i64 [ 0, %22 ], [ %indvars.iv.next140, %52 ]
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds float, ptr %54, i64 %indvars.iv139
  %56 = load float, ptr %55, align 4, !tbaa !12
  %57 = fpext float %56 to double
  %58 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %57)
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %exitcond142.not = icmp eq i64 %indvars.iv.next140, 50
  br i1 %exitcond142.not, label %31, label %52, !llvm.loop !18

59:                                               ; preds = %31
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.4, i32 noundef 34, ptr noundef nonnull @__FUNCTION__.main, ptr noundef nonnull @.str.5) #5
  %.pre = load i32, ptr %42, align 4, !tbaa !17
  br label %60

60:                                               ; preds = %59, %31
  %61 = phi i32 [ %.pre, %59 ], [ 2, %31 ]
  %62 = load ptr, ptr @cl_source, align 8, !tbaa !11
  %63 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_cl_function_para)
  %64 = call align 16 ptr @llvm.threadlocal.address.p0(ptr align 16 @morn_cl_function_para_size)
  call void @CLFunction(ptr noundef %62, ptr noundef nonnull @.str.6, i32 noundef %61, ptr noundef nonnull %63, ptr noundef nonnull %64) #5
  store i32 0, ptr %42, align 4, !tbaa !17
  call void @mMemoryBlockRead(ptr noundef %41) #5
  %65 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %76

66:                                               ; preds = %76
  store i32 0, ptr %42, align 4, !tbaa !17
  %67 = call i32 @CLIN(ptr noundef %37) #5
  %68 = call i32 @CLPARA(ptr noundef nonnull %1, i32 noundef 4) #5
  %69 = add nsw i32 %68, %67
  %70 = call i32 @CLOUT(ptr noundef %41) #5
  %71 = add nsw i32 %69, %70
  %72 = icmp ne i32 %71, -4
  %73 = load i32, ptr %42, align 4
  %74 = icmp ne i32 %73, 2
  %75 = select i1 %72, i1 true, i1 %74
  br i1 %75, label %83, label %84

76:                                               ; preds = %60, %76
  %indvars.iv143 = phi i64 [ 0, %60 ], [ %indvars.iv.next144, %76 ]
  %77 = load ptr, ptr %38, align 8, !tbaa !5
  %78 = load ptr, ptr %77, align 8, !tbaa !11
  %79 = getelementptr inbounds float, ptr %78, i64 %indvars.iv143
  %80 = load float, ptr %79, align 4, !tbaa !12
  %81 = fpext float %80 to double
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %81)
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %exitcond146.not = icmp eq i64 %indvars.iv.next144, 50
  br i1 %exitcond146.not, label %66, label %76, !llvm.loop !19

83:                                               ; preds = %66
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.4, i32 noundef 39, ptr noundef nonnull @__FUNCTION__.main, ptr noundef nonnull @.str.5) #5
  %.pre151 = load i32, ptr %42, align 4, !tbaa !17
  br label %84

84:                                               ; preds = %83, %66
  %85 = phi i32 [ %.pre151, %83 ], [ 2, %66 ]
  %86 = load ptr, ptr @cl_source, align 8, !tbaa !11
  call void @CLFunction(ptr noundef %86, ptr noundef nonnull @.str.6, i32 noundef %85, ptr noundef nonnull %63, ptr noundef nonnull %64) #5
  store i32 0, ptr %42, align 4, !tbaa !17
  call void @mMemoryBlockRead(ptr noundef %41) #5
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %89

88:                                               ; preds = %89
  call void @mTensorRelease(ptr noundef %2) #5
  call void @mTensorRelease(ptr noundef %3) #5
  call void @mTensorRelease(ptr noundef nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

89:                                               ; preds = %84, %89
  %indvars.iv147 = phi i64 [ 0, %84 ], [ %indvars.iv.next148, %89 ]
  %90 = load ptr, ptr %38, align 8, !tbaa !5
  %91 = load ptr, ptr %90, align 8, !tbaa !11
  %92 = getelementptr inbounds float, ptr %91, i64 %indvars.iv147
  %93 = load float, ptr %92, align 4, !tbaa !12
  %94 = fpext float %93 to double
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %94)
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next148, 50
  br i1 %exitcond150.not, label %88, label %89, !llvm.loop !20
}

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

declare ptr @TensorCreate(i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

declare ptr @mMemoryBlock(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #4

declare i32 @CLIN(ptr noundef) local_unnamed_addr #2

declare i32 @CLPARA(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @CLOUT(ptr noundef) local_unnamed_addr #2

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

declare void @CLFunction(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @mMemoryBlockRead(ptr noundef) local_unnamed_addr #2

declare void @mTensorRelease(ptr noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 16}
!6 = !{!"MTensor", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !7, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass