; LLVM IR from huawei-noah/bolt :: compute/tensor/src/matmul.ll (Z28matmul_infer_output_size_cpu10TensorDescbS_bPS_)

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

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z28matmul_infer_output_size_cpu10TensorDescbS_bPS_(ptr noundef byval(%struct.TensorDesc) align 8 %0, i1 noundef zeroext %1, ptr noundef byval(%struct.TensorDesc) align 8 %2, i1 noundef zeroext %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %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 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
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = zext i1 %1 to i8
  store i8 %25, ptr %7, align 1, !tbaa !5
  %26 = zext i1 %3 to i8
  store i8 %26, ptr %8, align 1, !tbaa !5
  store ptr %4, ptr %9, align 8, !tbaa !9
  %27 = load i8, ptr %7, align 1, !tbaa !5, !range !11, !noundef !12
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %34

29:                                               ; preds = %5
  %30 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %31 = getelementptr inbounds [20 x i32], ptr %30, i64 0, i64 0
  %32 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %33 = getelementptr inbounds [20 x i32], ptr %32, i64 0, i64 1
  call void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %33) #8
  br label %34

34:                                               ; preds = %29, %5
  %35 = load i8, ptr %8, align 1, !tbaa !5, !range !11, !noundef !12
  %36 = trunc i8 %35 to i1
  br i1 %36, label %37, label %42

37:                                               ; preds = %34
  %38 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %39 = getelementptr inbounds [20 x i32], ptr %38, i64 0, i64 0
  %40 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %41 = getelementptr inbounds [20 x i32], ptr %40, i64 0, i64 1
  call void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %41) #8
  br label %42

42:                                               ; preds = %37, %34
  %43 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = icmp eq i32 2, %44
  br i1 %45, label %46, label %71

46:                                               ; preds = %42
  %47 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 2
  %48 = load i32, ptr %47, align 8, !tbaa !18
  %49 = icmp eq i32 4, %48
  br i1 %49, label %50, label %71

50:                                               ; preds = %46
  %51 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %52 = getelementptr inbounds [20 x i32], ptr %51, i64 0, i64 1
  %53 = load i32, ptr %52, align 4, !tbaa !19
  %54 = icmp eq i32 1, %53
  br i1 %54, label %55, label %60

55:                                               ; preds = %50
  %56 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %57 = getelementptr inbounds [20 x i32], ptr %56, i64 0, i64 0
  %58 = load i32, ptr %57, align 4, !tbaa !19
  %59 = icmp eq i32 1, %58
  br i1 %59, label %70, label %60

60:                                               ; preds = %55, %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %61 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %62 = trunc i64 %61 to i32
  store i32 %62, ptr %10, align 4, !tbaa !19
  %63 = load i32, ptr %10, align 4, !tbaa !19
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %63)
  %65 = load ptr, ptr @stdout, align 8, !tbaa !9
  %66 = call i32 @fflush(ptr noundef %65)
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %68 = load ptr, ptr @stdout, align 8, !tbaa !9
  %69 = call i32 @fflush(ptr noundef %68)
  call void @exit(i32 noundef 1) #9
  unreachable

70:                                               ; preds = %55
  br label %71

71:                                               ; preds = %70, %46, %42
  %72 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !13
  %74 = icmp eq i32 2, %73
  br i1 %74, label %75, label %100

75:                                               ; preds = %71
  %76 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 2
  %77 = load i32, ptr %76, align 8, !tbaa !18
  %78 = icmp eq i32 4, %77
  br i1 %78, label %79, label %100

79:                                               ; preds = %75
  %80 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %81 = getelementptr inbounds [20 x i32], ptr %80, i64 0, i64 1
  %82 = load i32, ptr %81, align 4, !tbaa !19
  %83 = icmp eq i32 1, %82
  br i1 %83, label %84, label %89

84:                                               ; preds = %79
  %85 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %86 = getelementptr inbounds [20 x i32], ptr %85, i64 0, i64 0
  %87 = load i32, ptr %86, align 4, !tbaa !19
  %88 = icmp eq i32 1, %87
  br i1 %88, label %99, label %89

89:                                               ; preds = %84, %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %90 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr %11, align 4, !tbaa !19
  %92 = load i32, ptr %11, align 4, !tbaa !19
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %92)
  %94 = load ptr, ptr @stdout, align 8, !tbaa !9
  %95 = call i32 @fflush(ptr noundef %94)
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %97 = load ptr, ptr @stdout, align 8, !tbaa !9
  %98 = call i32 @fflush(ptr noundef %97)
  call void @exit(i32 noundef 1) #9
  unreachable

99:                                               ; preds = %84
  br label %100

100:                                              ; preds = %99, %75, %71
  %101 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %102 = getelementptr inbounds [20 x i32], ptr %101, i64 0, i64 0
  %103 = load i32, ptr %102, align 4, !tbaa !19
  %104 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %105 = getelementptr inbounds [20 x i32], ptr %104, i64 0, i64 1
  %106 = load i32, ptr %105, align 4, !tbaa !19
  %107 = icmp ne i32 %103, %106
  br i1 %107, label %108, label %124

108:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 2, ptr %12, align 4, !tbaa !20
  %109 = load i32, ptr %12, align 4, !tbaa !20
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %123

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %112 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %113 = trunc i64 %112 to i32
  store i32 %113, ptr %13, align 4, !tbaa !19
  %114 = load i32, ptr %13, align 4, !tbaa !19
  %115 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %114)
  %116 = load ptr, ptr @stdout, align 8, !tbaa !9
  %117 = call i32 @fflush(ptr noundef %116)
  %118 = load i32, ptr %12, align 4, !tbaa !20
  %119 = call ptr @ee2str(i32 noundef %118)
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %119)
  %121 = load ptr, ptr @stdout, align 8, !tbaa !9
  %122 = call i32 @fflush(ptr noundef %121)
  call void @exit(i32 noundef 1) #9
  unreachable

123:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %124

124:                                              ; preds = %123, %100
  call void @_ZL16align_input_descP10TensorDescS0_(ptr noundef %0, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %125 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 2
  %126 = load i32, ptr %125, align 8, !tbaa !18
  store i32 %126, ptr %14, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %127 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 2
  %128 = load i32, ptr %127, align 8, !tbaa !18
  store i32 %128, ptr %15, align 4, !tbaa !19
  %129 = load ptr, ptr %9, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %129, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !22
  %130 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %131 = getelementptr inbounds [20 x i32], ptr %130, i64 0, i64 0
  %132 = load i32, ptr %131, align 4, !tbaa !19
  %133 = load ptr, ptr %9, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.TensorDesc, ptr %133, i32 0, i32 3
  %135 = getelementptr inbounds [20 x i32], ptr %134, i64 0, i64 0
  store i32 %132, ptr %135, align 4, !tbaa !19
  %136 = load i32, ptr %14, align 4, !tbaa !19
  %137 = icmp sge i32 %136, 2
  br i1 %137, label %138, label %186

138:                                              ; preds = %124
  %139 = load i32, ptr %15, align 4, !tbaa !19
  %140 = icmp sge i32 %139, 2
  br i1 %140, label %141, label %186

141:                                              ; preds = %138
  %142 = load i32, ptr %14, align 4, !tbaa !19
  %143 = load i32, ptr %15, align 4, !tbaa !19
  %144 = icmp eq i32 %142, %143
  br i1 %144, label %145, label %186

145:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 2, ptr %16, align 4, !tbaa !19
  br label %146

146:                                              ; preds = %182, %145
  %147 = load i32, ptr %16, align 4, !tbaa !19
  %148 = load i32, ptr %14, align 4, !tbaa !19
  %149 = icmp slt i32 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %185

151:                                              ; preds = %146
  %152 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %153 = load i32, ptr %16, align 4, !tbaa !19
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [20 x i32], ptr %152, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !19
  %157 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %158 = load i32, ptr %16, align 4, !tbaa !19
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [20 x i32], ptr %157, i64 0, i64 %159
  %161 = load i32, ptr %160, align 4, !tbaa !19
  %162 = icmp ugt i32 %156, %161
  br i1 %162, label %163, label %169

163:                                              ; preds = %151
  %164 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %165 = load i32, ptr %16, align 4, !tbaa !19
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [20 x i32], ptr %164, i64 0, i64 %166
  %168 = load i32, ptr %167, align 4, !tbaa !19
  br label %175

169:                                              ; preds = %151
  %170 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %171 = load i32, ptr %16, align 4, !tbaa !19
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [20 x i32], ptr %170, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !19
  br label %175

175:                                              ; preds = %169, %163
  %176 = phi i32 [ %168, %163 ], [ %174, %169 ]
  %177 = load ptr, ptr %9, align 8, !tbaa !9
  %178 = getelementptr inbounds %struct.TensorDesc, ptr %177, i32 0, i32 3
  %179 = load i32, ptr %16, align 4, !tbaa !19
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [20 x i32], ptr %178, i64 0, i64 %180
  store i32 %176, ptr %181, align 4, !tbaa !19
  br label %182

182:                                              ; preds = %175
  %183 = load i32, ptr %16, align 4, !tbaa !19
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %16, align 4, !tbaa !19
  br label %146, !llvm.loop !26

185:                                              ; preds = %150
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  br label %303

186:                                              ; preds = %141, %138, %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 0, ptr %18, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %187 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 2
  %188 = load i32, ptr %187, align 8, !tbaa !18
  %189 = icmp ult i32 %188, 2
  br i1 %189, label %190, label %193

190:                                              ; preds = %186
  %191 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 2
  %192 = load i32, ptr %191, align 8, !tbaa !18
  br label %194

193:                                              ; preds = %186
  br label %194

194:                                              ; preds = %193, %190
  %195 = phi i32 [ %192, %190 ], [ 2, %193 ]
  store i32 %195, ptr %20, align 4, !tbaa !19
  br label %196

196:                                              ; preds = %274, %250, %237, %194
  %197 = load i32, ptr %18, align 4, !tbaa !19
  %198 = load i32, ptr %14, align 4, !tbaa !19
  %199 = load i32, ptr %20, align 4, !tbaa !19
  %200 = sub nsw i32 %198, %199
  %201 = icmp slt i32 %197, %200
  br i1 %201, label %207, label %202

202:                                              ; preds = %196
  %203 = load i32, ptr %19, align 4, !tbaa !19
  %204 = load i32, ptr %15, align 4, !tbaa !19
  %205 = sub nsw i32 %204, 2
  %206 = icmp slt i32 %203, %205
  br label %207

207:                                              ; preds = %202, %196
  %208 = phi i1 [ true, %196 ], [ %206, %202 ]
  br i1 %208, label %209, label %275

209:                                              ; preds = %207
  %210 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %211 = load i32, ptr %14, align 4, !tbaa !19
  %212 = sub nsw i32 %211, 1
  %213 = load i32, ptr %18, align 4, !tbaa !19
  %214 = sub nsw i32 %212, %213
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [20 x i32], ptr %210, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !19
  %218 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %219 = load i32, ptr %15, align 4, !tbaa !19
  %220 = sub nsw i32 %219, 1
  %221 = load i32, ptr %19, align 4, !tbaa !19
  %222 = sub nsw i32 %220, %221
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [20 x i32], ptr %218, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !19
  %226 = icmp ne i32 %217, %225
  br i1 %226, label %227, label %269

227:                                              ; preds = %209
  %228 = getelementptr inbounds %struct.TensorDesc, ptr %0, i32 0, i32 3
  %229 = load i32, ptr %14, align 4, !tbaa !19
  %230 = sub nsw i32 %229, 1
  %231 = load i32, ptr %18, align 4, !tbaa !19
  %232 = sub nsw i32 %230, %231
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [20 x i32], ptr %228, i64 0, i64 %233
  %235 = load i32, ptr %234, align 4, !tbaa !19
  %236 = icmp eq i32 %235, 1
  br i1 %236, label %237, label %240

237:                                              ; preds = %227
  %238 = load i32, ptr %18, align 4, !tbaa !19
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %18, align 4, !tbaa !19
  br label %196, !llvm.loop !28

240:                                              ; preds = %227
  %241 = getelementptr inbounds %struct.TensorDesc, ptr %2, i32 0, i32 3
  %242 = load i32, ptr %15, align 4, !tbaa !19
  %243 = sub nsw i32 %242, 1
  %244 = load i32, ptr %19, align 4, !tbaa !19
  %245 = sub nsw i32 %243, %244
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [20 x i32], ptr %241, i64 0, i64 %246
  %248 = load i32, ptr %247, align 4, !tbaa !19
  %249 = icmp eq i32 %248, 1
  br i1 %249, label %250, label %253

250:                                              ; preds = %240
  %251 = load i32, ptr %19, align 4, !tbaa !19
  %252 = add nsw i32 %251, 1
  store i32 %252, ptr %19, align 4, !tbaa !19
  br label %196, !llvm.loop !28

253:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 2, ptr %21, align 4, !tbaa !20
  %254 = load i32, ptr %21, align 4, !tbaa !20
  %255 = icmp ne i32 %254, 0
  br i1 %255, label %256, label %268

256:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %257 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %258 = trunc i64 %257 to i32
  store i32 %258, ptr %22, align 4, !tbaa !19
  %259 = load i32, ptr %22, align 4, !tbaa !19
  %260 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %259)
  %261 = load ptr, ptr @stdout, align 8, !tbaa !9
  %262 = call i32 @fflush(ptr noundef %261)
  %263 = load i32, ptr %21, align 4, !tbaa !20
  %264 = call ptr @ee2str(i32 noundef %263)
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %264)
  %266 = load ptr, ptr @stdout, align 8, !tbaa !9
  %267 = call i32 @fflush(ptr noundef %266)
  call void @exit(i32 noundef 1) #9
  unreachable

268:                                              ; preds = %253
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %274

269:                                              ; preds = %209
  %270 = load i32, ptr %18, align 4, !tbaa !19
  %271 = add nsw i32 %270, 1
  store i32 %271, ptr %18, align 4, !tbaa !19
  %272 = load i32, ptr %19, align 4, !tbaa !19
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %19, align 4, !tbaa !19
  br label %274

274:                                              ; preds = %269, %268
  br label %196, !llvm.loop !28

275:                                              ; preds = %207
  %276 = load i32, ptr %18, align 4, !tbaa !19
  %277 = load i32, ptr %14, align 4, !tbaa !19
  %278 = load i32, ptr %20, align 4, !tbaa !19
  %279 = sub nsw i32 %277, %278
  %280 = icmp ne i32 %276, %279
  br i1 %280, label %286, label %281

281:                                              ; preds = %275
  %282 = load i32, ptr %19, align 4, !tbaa !19
  %283 = load i32, ptr %15, align 4, !tbaa !19
  %284 = sub nsw i32 %283, 2
  %285 = icmp ne i32 %282, %284
  br i1 %285, label %286, label %302

286:                                              ; preds = %281, %275
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 2, ptr %23, align 4, !tbaa !20
  %287 = load i32, ptr %23, align 4, !tbaa !20
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %301

289:                                              ; preds = %286
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  %290 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %291 = trunc i64 %290 to i32
  store i32 %291, ptr %24, align 4, !tbaa !19
  %292 = load i32, ptr %24, align 4, !tbaa !19
  %293 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %292)
  %294 = load ptr, ptr @stdout, align 8, !tbaa !9
  %295 = call i32 @fflush(ptr noundef %294)
  %296 = load i32, ptr %23, align 4, !tbaa !20
  %297 = call ptr @ee2str(i32 noundef %296)
  %298 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %297)
  %299 = load ptr, ptr @stdout, align 8, !tbaa !9
  %300 = call i32 @fflush(ptr noundef %299)
  call void @exit(i32 noundef 1) #9
  unreachable

301:                                              ; preds = %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %302

302:                                              ; preds = %301, %281
  store i32 0, ptr %6, align 4
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %303

303:                                              ; preds = %302, %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  %304 = load i32, ptr %6, align 4
  ret i32 %304
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

declare i32 @fflush(ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL16align_input_descP10TensorDescS0_(ptr noundef, ptr noundef) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !16, i64 4}
!14 = !{!"_ZTS10TensorDesc", !15, i64 0, !16, i64 4, !17, i64 8, !7, i64 12}
!15 = !{!"_ZTS8DataType", !7, i64 0}
!16 = !{!"_ZTS10DataFormat", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!14, !17, i64 8}
!19 = !{!17, !17, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS2EE", !7, i64 0}
!22 = !{i64 0, i64 4, !23, i64 4, i64 4, !24, i64 8, i64 4, !19, i64 12, i64 80, !25}
!23 = !{!15, !15, i64 0}
!24 = !{!16, !16, i64 0}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z28matmul_infer_output_size_cpu10TensorDescbS_bPS_(ptr noundef byval(%struct.TensorDesc) align 8 %0, i1 noundef zeroext %1, ptr noundef byval(%struct.TensorDesc) align 8 %2, i1 noundef zeroext %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #0 {
  br i1 %1, label %6, label %9

6:                                                ; preds = %5
  %7 = getelementptr inbounds i8, ptr %0, i64 12
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  call void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #7
  br label %9

9:                                                ; preds = %6, %5
  br i1 %3, label %10, label %13

10:                                               ; preds = %9
  %11 = getelementptr inbounds i8, ptr %2, i64 12
  %12 = getelementptr inbounds i8, ptr %2, i64 16
  call void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12) #7
  br label %13

13:                                               ; preds = %10, %9
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = icmp eq i32 %15, 2
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load i32, ptr %17, align 8
  %19 = icmp eq i32 %18, 4
  %or.cond = select i1 %16, i1 %19, i1 false
  br i1 %or.cond, label %20, label %36

20:                                               ; preds = %13
  %21 = getelementptr inbounds i8, ptr %0, i64 12
  %22 = getelementptr inbounds i8, ptr %0, i64 16
  %23 = load i32, ptr %22, align 8, !tbaa !12
  %24 = icmp eq i32 %23, 1
  %25 = load i32, ptr %21, align 4
  %26 = icmp eq i32 %25, 1
  %or.cond6 = select i1 %24, i1 %26, i1 false
  br i1 %or.cond6, label %36, label %27

27:                                               ; preds = %20
  %28 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %29 = trunc i64 %28 to i32
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %29)
  %31 = load ptr, ptr @stdout, align 8, !tbaa !13
  %32 = call i32 @fflush(ptr noundef %31)
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %34 = load ptr, ptr @stdout, align 8, !tbaa !13
  %35 = call i32 @fflush(ptr noundef %34)
  call void @exit(i32 noundef 1) #8
  unreachable

36:                                               ; preds = %20, %13
  %37 = getelementptr inbounds i8, ptr %2, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = icmp eq i32 %38, 2
  %40 = getelementptr inbounds i8, ptr %2, i64 8
  %41 = load i32, ptr %40, align 8
  %42 = icmp eq i32 %41, 4
  %or.cond9 = select i1 %39, i1 %42, i1 false
  br i1 %or.cond9, label %43, label %._crit_edge

._crit_edge:                                      ; preds = %36
  %.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 16
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !12
  br label %59

43:                                               ; preds = %36
  %44 = getelementptr inbounds i8, ptr %2, i64 12
  %45 = getelementptr inbounds i8, ptr %2, i64 16
  %46 = load i32, ptr %45, align 8, !tbaa !12
  %47 = icmp eq i32 %46, 1
  %48 = load i32, ptr %44, align 4
  %49 = icmp eq i32 %48, 1
  %or.cond13 = select i1 %47, i1 %49, i1 false
  br i1 %or.cond13, label %59, label %50

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

59:                                               ; preds = %._crit_edge, %43
  %60 = phi i32 [ %.pre, %._crit_edge ], [ 1, %43 ]
  %61 = getelementptr inbounds i8, ptr %0, i64 12
  %62 = load i32, ptr %61, align 4, !tbaa !12
  %63 = getelementptr inbounds i8, ptr %2, i64 12
  %.not = icmp eq i32 %62, %60
  br i1 %.not, label %74, label %64

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

74:                                               ; preds = %59
  call void @_ZL16align_input_descP10TensorDescS0_(ptr noundef nonnull %0, ptr noundef nonnull %2)
  %75 = load i32, ptr %17, align 8
  %76 = load i32, ptr %40, align 8, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(92) %4, ptr noundef nonnull align 8 dereferenceable(92) %0, i64 92, i1 false), !tbaa.struct !16
  %77 = load i32, ptr %63, align 4, !tbaa !12
  %78 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 %77, ptr %78, align 4, !tbaa !12
  %79 = icmp sgt i32 %75, 1
  %80 = icmp sgt i32 %76, 1
  %81 = icmp eq i32 %75, %76
  %82 = and i1 %80, %81
  %or.cond79 = select i1 %79, i1 %82, i1 false
  br i1 %or.cond79, label %.preheader, label %.preheader81

.preheader81:                                     ; preds = %74
  %83 = call i32 @llvm.usub.sat.i32(i32 %75, i32 2)
  %84 = add nsw i32 %76, -2
  %85 = icmp sgt i32 %76, 2
  %86 = icmp sgt i32 %83, 0
  %87 = select i1 %86, i1 true, i1 %85
  br i1 %87, label %.lr.ph.preheader, label %.outer._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader81
  %88 = sext i32 %83 to i64
  %89 = sext i32 %84 to i64
  br label %.lr.ph

.preheader:                                       ; preds = %74
  %90 = icmp ugt i32 %75, 2
  br i1 %90, label %.lr.ph116.preheader, label %.loopexit

.lr.ph116.preheader:                              ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %75 to i64
  %91 = add nsw i64 %wide.trip.count, -2
  %min.iters.check = icmp ult i64 %91, 8
  br i1 %min.iters.check, label %.lr.ph116.preheader154, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph116.preheader
  %n.vec = and i64 %91, -8
  %ind.end = or disjoint i64 %n.vec, 2
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 2
  %92 = getelementptr inbounds [20 x i32], ptr %61, i64 0, i64 %offset.idx
  %93 = getelementptr inbounds i8, ptr %92, i64 16
  %wide.load = load <4 x i32>, ptr %92, align 4, !tbaa !12
  %wide.load151 = load <4 x i32>, ptr %93, align 4, !tbaa !12
  %94 = getelementptr inbounds [20 x i32], ptr %63, i64 0, i64 %offset.idx
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  %wide.load152 = load <4 x i32>, ptr %94, align 4, !tbaa !12
  %wide.load153 = load <4 x i32>, ptr %95, align 4, !tbaa !12
  %96 = call <4 x i32> @llvm.umax.v4i32(<4 x i32> %wide.load, <4 x i32> %wide.load152)
  %97 = call <4 x i32> @llvm.umax.v4i32(<4 x i32> %wide.load151, <4 x i32> %wide.load153)
  %98 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %offset.idx
  %99 = getelementptr inbounds i8, ptr %98, i64 16
  store <4 x i32> %96, ptr %98, align 4, !tbaa !12
  store <4 x i32> %97, ptr %99, align 4, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %100 = icmp eq i64 %index.next, %n.vec
  br i1 %100, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %91, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph116.preheader154

.lr.ph116.preheader154:                           ; preds = %middle.block, %.lr.ph116.preheader
  %indvars.iv132.ph = phi i64 [ 2, %.lr.ph116.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph116

.lr.ph116:                                        ; preds = %.lr.ph116.preheader154, %.lr.ph116
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %.lr.ph116 ], [ %indvars.iv132.ph, %.lr.ph116.preheader154 ]
  %101 = getelementptr inbounds [20 x i32], ptr %61, i64 0, i64 %indvars.iv132
  %102 = load i32, ptr %101, align 4, !tbaa !12
  %103 = getelementptr inbounds [20 x i32], ptr %63, i64 0, i64 %indvars.iv132
  %104 = load i32, ptr %103, align 4, !tbaa !12
  %. = call i32 @llvm.umax.i32(i32 %102, i32 %104)
  %105 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %indvars.iv132
  store i32 %., ptr %105, align 4, !tbaa !12
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next133, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph116, !llvm.loop !24

.lr.ph.split:                                     ; preds = %.lr.ph.split.preheader, %114
  %indvars.iv = phi i64 [ %128, %.lr.ph.split.preheader ], [ %indvars.iv.next, %114 ]
  %106 = trunc nsw i64 %indvars.iv to i32
  %107 = xor i32 %106, -1
  %108 = add i32 %75, %107
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [20 x i32], ptr %61, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !12
  %.not78 = icmp eq i32 %111, %127
  br i1 %.not78, label %.split.us, label %112

112:                                              ; preds = %.lr.ph.split
  %113 = icmp eq i32 %111, 1
  br i1 %113, label %114, label %.split101

114:                                              ; preds = %112
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %115 = icmp slt i64 %indvars.iv.next, %88
  br i1 %115, label %.lr.ph.split, label %.outer._crit_edge.loopexit, !llvm.loop !25

.split101.loopexit:                               ; preds = %.lr.ph106
  %116 = trunc i64 %indvars.iv127 to i32
  br label %.split101

.split101:                                        ; preds = %112, %.split101.loopexit
  %.us-phi103 = phi i32 [ %116, %.split101.loopexit ], [ %106, %112 ]
  %117 = icmp eq i32 %127, 1
  br i1 %117, label %.outer.backedge, label %143

.outer.backedge:                                  ; preds = %.split101, %.split.us
  %.066.ph.be = phi i32 [ %154, %.split.us ], [ %.us-phi103, %.split101 ]
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %118 = icmp slt i64 %indvars.iv.next131, %89
  %119 = icmp slt i32 %.066.ph.be, %83
  %120 = select i1 %119, i1 true, i1 %118
  br i1 %120, label %.lr.ph, label %.outer._crit_edge.loopexit119, !llvm.loop !25

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.outer.backedge
  %indvars.iv130 = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next131, %.outer.backedge ]
  %121 = phi i1 [ %85, %.lr.ph.preheader ], [ %118, %.outer.backedge ]
  %.066.ph110 = phi i32 [ 0, %.lr.ph.preheader ], [ %.066.ph.be, %.outer.backedge ]
  %122 = trunc nuw nsw i64 %indvars.iv130 to i32
  %123 = xor i32 %122, -1
  %124 = add i32 %76, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [20 x i32], ptr %63, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !12
  %.fr = freeze i1 %121
  br i1 %.fr, label %.lr.ph.split.us, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %128 = sext i32 %.066.ph110 to i64
  br label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %129 = xor i32 %.066.ph110, -1
  %130 = add i32 %75, %129
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [20 x i32], ptr %61, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !12
  %.not78.us104 = icmp eq i32 %133, %127
  br i1 %.not78.us104, label %.split.us, label %.lr.ph106.preheader

.lr.ph106.preheader:                              ; preds = %.lr.ph.split.us
  %134 = zext i32 %.066.ph110 to i64
  br label %.lr.ph106

.lr.ph106:                                        ; preds = %.lr.ph106.preheader, %137
  %indvars.iv127 = phi i64 [ %134, %.lr.ph106.preheader ], [ %indvars.iv.next128, %137 ]
  %135 = phi i32 [ %133, %.lr.ph106.preheader ], [ %142, %137 ]
  %136 = icmp eq i32 %135, 1
  br i1 %136, label %137, label %.split101.loopexit

137:                                              ; preds = %.lr.ph106
  %indvars.iv.next128 = add i64 %indvars.iv127, 1
  %138 = trunc i64 %indvars.iv127 to i32
  %reass.sub = sub i32 %75, %138
  %139 = add i32 %reass.sub, -2
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [20 x i32], ptr %61, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !12
  %.not78.us = icmp eq i32 %142, %127
  br i1 %.not78.us, label %.split.us.loopexit, label %.lr.ph106

143:                                              ; preds = %.split101
  %144 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %145 = trunc i64 %144 to i32
  %146 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %145)
  %147 = load ptr, ptr @stdout, align 8, !tbaa !13
  %148 = call i32 @fflush(ptr noundef %147)
  %149 = call ptr @ee2str(i32 noundef 2)
  %150 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %149)
  %151 = load ptr, ptr @stdout, align 8, !tbaa !13
  %152 = call i32 @fflush(ptr noundef %151)
  call void @exit(i32 noundef 1) #8
  unreachable

.split.us.loopexit:                               ; preds = %137
  %153 = trunc i64 %indvars.iv.next128 to i32
  br label %.split.us

.split.us:                                        ; preds = %.lr.ph.split, %.split.us.loopexit, %.lr.ph.split.us
  %.us-phi = phi i32 [ %.066.ph110, %.lr.ph.split.us ], [ %153, %.split.us.loopexit ], [ %106, %.lr.ph.split ]
  %154 = add nsw i32 %.us-phi, 1
  br label %.outer.backedge

.outer._crit_edge.loopexit:                       ; preds = %114
  %155 = trunc nsw i64 %indvars.iv.next to i32
  br label %.outer._crit_edge

.outer._crit_edge.loopexit119:                    ; preds = %.outer.backedge
  %156 = trunc nsw i64 %indvars.iv.next131 to i32
  br label %.outer._crit_edge

.outer._crit_edge:                                ; preds = %.outer._crit_edge.loopexit119, %.outer._crit_edge.loopexit, %.preheader81
  %.067.ph.lcssa91 = phi i32 [ 0, %.preheader81 ], [ %122, %.outer._crit_edge.loopexit ], [ %156, %.outer._crit_edge.loopexit119 ]
  %.066.lcssa = phi i32 [ 0, %.preheader81 ], [ %155, %.outer._crit_edge.loopexit ], [ %.066.ph.be, %.outer._crit_edge.loopexit119 ]
  %.not76 = icmp eq i32 %.066.lcssa, %83
  %.not77 = icmp eq i32 %.067.ph.lcssa91, %84
  %or.cond80 = select i1 %.not76, i1 %.not77, i1 false
  br i1 %or.cond80, label %.loopexit, label %157

157:                                              ; preds = %.outer._crit_edge
  %158 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %159 = trunc i64 %158 to i32
  %160 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %159)
  %161 = load ptr, ptr @stdout, align 8, !tbaa !13
  %162 = call i32 @fflush(ptr noundef %161)
  %163 = call ptr @ee2str(i32 noundef 2)
  %164 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef %163)
  %165 = load ptr, ptr @stdout, align 8, !tbaa !13
  %166 = call i32 @fflush(ptr noundef %165)
  call void @exit(i32 noundef 1) #8
  unreachable

.loopexit:                                        ; preds = %.lr.ph116, %middle.block, %.preheader, %.outer._crit_edge
  ret i32 0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL16align_input_descP10TensorDescS0_(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.usub.sat.i32(i32, i32) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.umax.v4i32(<4 x i32>, <4 x i32>) #6

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

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

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


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