; LLVM IR from huawei-noah/bolt :: compute/tensor/src (reduction)

; 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] }
%struct.ReductionParamSpec = type { [8 x i32], i32, i32, float, i8 }
%struct.ArchInfo = type { i32, ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z27reduction_infer_output_sizeP6TensorS_18ReductionParamSpecS0_P8ArchInfo(ptr noundef %0, ptr noundef %1, ptr noundef byval(%struct.ReductionParamSpec) align 8 %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.TensorDesc, align 4
  %13 = alloca %struct.TensorDesc, align 4
  %14 = alloca %struct.TensorDesc, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.TensorDesc, 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 = alloca %struct.TensorDesc, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.TensorDesc, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store ptr %4, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %38, label %35

35:                                               ; preds = %5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %54

38:                                               ; preds = %35, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %53

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %42 = call i64 (i64, ...) @syscall(i64 noundef 186) #7
  %43 = trunc i64 %42 to i32
  store i32 %43, ptr %11, align 4, !tbaa !11
  %44 = load i32, ptr %11, align 4, !tbaa !11
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %44)
  %46 = load ptr, ptr @stdout, align 8, !tbaa !5
  %47 = call i32 @fflush(ptr noundef %46)
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = call ptr @ee2str(i32 noundef %48)
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %49)
  %51 = load ptr, ptr @stdout, align 8, !tbaa !5
  %52 = call i32 @fflush(ptr noundef %51)
  call void @exit(i32 noundef 1) #8
  unreachable

53:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %54

54:                                               ; preds = %53, %35
  call void @llvm.lifetime.start.p0(i64 92, ptr %12) #7
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %12, ptr noundef nonnull align 8 dereferenceable(32) %55)
  call void @llvm.lifetime.start.p0(i64 92, ptr %13) #7
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %13, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 92, ptr %14) #7
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %14, ptr noundef nonnull align 8 dereferenceable(32) %56)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ArchInfo, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 8, !tbaa !13
  store i32 %59, ptr %15, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 51, ptr %16, align 4, !tbaa !9
  %60 = load i32, ptr %15, align 4, !tbaa !16
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %65, label %62

62:                                               ; preds = %54
  %63 = load i32, ptr %15, align 4, !tbaa !16
  %64 = icmp eq i32 %63, 7
  br i1 %64, label %65, label %66

65:                                               ; preds = %62, %54
  br label %375

66:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 92, ptr %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %12, i64 92, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %67 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !23
  %69 = icmp eq i32 %68, 2
  %70 = zext i1 %69 to i64
  %71 = select i1 %69, i32 8, i32 16
  store i32 %71, ptr %19, align 4, !tbaa !11
  %72 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !23
  %74 = icmp eq i32 %73, 2
  br i1 %74, label %79, label %75

75:                                               ; preds = %66
  %76 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 1
  %77 = load i32, ptr %76, align 4, !tbaa !23
  %78 = icmp eq i32 %77, 41
  br i1 %78, label %79, label %144

79:                                               ; preds = %75, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %102, %79
  %81 = load i32, ptr %20, align 4, !tbaa !11
  %82 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !25
  %84 = icmp slt i32 %81, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %80
  store i32 2, ptr %21, align 4
  br label %105

86:                                               ; preds = %80
  %87 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 0
  %88 = load i32, ptr %20, align 4, !tbaa !11
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [8 x i32], ptr %87, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !11
  %92 = icmp eq i32 %91, 1
  br i1 %92, label %100, label %93

93:                                               ; preds = %86
  %94 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 0
  %95 = load i32, ptr %20, align 4, !tbaa !11
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [8 x i32], ptr %94, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !11
  %99 = icmp eq i32 %98, -3
  br i1 %99, label %100, label %101

100:                                              ; preds = %93, %86
  store i32 -1, ptr %17, align 4, !tbaa !11
  store i32 2, ptr %21, align 4
  br label %105

101:                                              ; preds = %93
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %20, align 4, !tbaa !11
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %20, align 4, !tbaa !11
  br label %80, !llvm.loop !30

105:                                              ; preds = %100, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %106

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %107 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %108 = load i32, ptr %107, align 4, !tbaa !32
  %109 = sub nsw i32 %108, 1
  store i32 %109, ptr %22, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %125, %106
  %111 = load i32, ptr %22, align 4, !tbaa !11
  %112 = icmp sge i32 %111, 0
  br i1 %112, label %114, label %113

113:                                              ; preds = %110
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %128

114:                                              ; preds = %110
  %115 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 3
  %116 = load i32, ptr %22, align 4, !tbaa !11
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [20 x i32], ptr %115, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !11
  %120 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 3
  %121 = load i32, ptr %22, align 4, !tbaa !11
  %122 = add nsw i32 %121, 1
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [20 x i32], ptr %120, i64 0, i64 %123
  store i32 %119, ptr %124, align 4, !tbaa !11
  br label %125

125:                                              ; preds = %114
  %126 = load i32, ptr %22, align 4, !tbaa !11
  %127 = add nsw i32 %126, -1
  store i32 %127, ptr %22, align 4, !tbaa !11
  br label %110, !llvm.loop !33

128:                                              ; preds = %113
  %129 = load i32, ptr %19, align 4, !tbaa !11
  %130 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 3
  %131 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %132 = load i32, ptr %131, align 4, !tbaa !32
  %133 = sub i32 %132, 1
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds [20 x i32], ptr %130, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !11
  %137 = udiv i32 %136, %129
  store i32 %137, ptr %135, align 4, !tbaa !11
  %138 = load i32, ptr %19, align 4, !tbaa !11
  %139 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 3
  %140 = getelementptr inbounds [20 x i32], ptr %139, i64 0, i64 0
  store i32 %138, ptr %140, align 4, !tbaa !11
  %141 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %142 = load i32, ptr %141, align 4, !tbaa !32
  %143 = add i32 %142, 1
  store i32 %143, ptr %141, align 4, !tbaa !32
  br label %144

144:                                              ; preds = %128, %75
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %18, i64 92, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %145 = load i32, ptr %17, align 4, !tbaa !11
  store i32 %145, ptr %23, align 4, !tbaa !11
  br label %146

146:                                              ; preds = %203, %144
  %147 = load i32, ptr %23, align 4, !tbaa !11
  %148 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 1
  %149 = load i32, ptr %148, align 8, !tbaa !25
  %150 = icmp slt i32 %147, %149
  br i1 %150, label %152, label %151

151:                                              ; preds = %146
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %206

152:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %153 = load i32, ptr %23, align 4, !tbaa !11
  %154 = icmp eq i32 %153, -1
  br i1 %154, label %155, label %158

155:                                              ; preds = %152
  %156 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 2
  %157 = load i32, ptr %156, align 4, !tbaa !32
  store i32 %157, ptr %24, align 4, !tbaa !11
  br label %164

158:                                              ; preds = %152
  %159 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 0
  %160 = load i32, ptr %23, align 4, !tbaa !11
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [8 x i32], ptr %159, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !11
  store i32 %163, ptr %24, align 4, !tbaa !11
  br label %164

164:                                              ; preds = %158, %155
  %165 = load i32, ptr %24, align 4, !tbaa !11
  %166 = icmp slt i32 %165, 0
  br i1 %166, label %167, label %172

167:                                              ; preds = %164
  %168 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %169 = load i32, ptr %168, align 4, !tbaa !32
  %170 = load i32, ptr %24, align 4, !tbaa !11
  %171 = add i32 %169, %170
  store i32 %171, ptr %24, align 4, !tbaa !11
  br label %172

172:                                              ; preds = %167, %164
  %173 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %174 = load i32, ptr %173, align 4, !tbaa !32
  %175 = sub i32 %174, 1
  %176 = load i32, ptr %24, align 4, !tbaa !11
  %177 = sub i32 %175, %176
  store i32 %177, ptr %24, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %13, i64 92, i1 false), !tbaa.struct !17
  %178 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %25)
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %180, label %185

180:                                              ; preds = %172
  %181 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %182 = load i32, ptr %24, align 4, !tbaa !11
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [20 x i32], ptr %181, i64 0, i64 %183
  store i32 0, ptr %184, align 4, !tbaa !11
  br label %202

185:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %186 = getelementptr inbounds %struct.TensorDesc, ptr %13, i32 0, i32 3
  %187 = getelementptr inbounds [20 x i32], ptr %186, i64 0, i64 1
  %188 = load i32, ptr %187, align 4, !tbaa !11
  %189 = icmp ugt i32 %188, 1
  br i1 %189, label %190, label %194

190:                                              ; preds = %185
  %191 = getelementptr inbounds %struct.TensorDesc, ptr %13, i32 0, i32 3
  %192 = getelementptr inbounds [20 x i32], ptr %191, i64 0, i64 1
  %193 = load i32, ptr %192, align 4, !tbaa !11
  br label %195

194:                                              ; preds = %185
  br label %195

195:                                              ; preds = %194, %190
  %196 = phi i32 [ %193, %190 ], [ 0, %194 ]
  store i32 %196, ptr %26, align 4, !tbaa !11
  %197 = load i32, ptr %26, align 4, !tbaa !11
  %198 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %199 = load i32, ptr %24, align 4, !tbaa !11
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds [20 x i32], ptr %198, i64 0, i64 %200
  store i32 %197, ptr %201, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  br label %202

202:                                              ; preds = %195, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %23, align 4, !tbaa !11
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %23, align 4, !tbaa !11
  br label %146, !llvm.loop !34

206:                                              ; preds = %151
  %207 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 4
  %208 = load i8, ptr %207, align 4, !tbaa !35, !range !36, !noundef !37
  %209 = trunc i8 %208 to i1
  br i1 %209, label %210, label %237

210:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !11
  br label %211

211:                                              ; preds = %230, %210
  %212 = load i32, ptr %27, align 4, !tbaa !11
  %213 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %214 = load i32, ptr %213, align 4, !tbaa !32
  %215 = icmp ult i32 %212, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %211
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %233

217:                                              ; preds = %211
  %218 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %219 = load i32, ptr %27, align 4, !tbaa !11
  %220 = zext i32 %219 to i64
  %221 = getelementptr inbounds [20 x i32], ptr %218, i64 0, i64 %220
  %222 = load i32, ptr %221, align 4, !tbaa !11
  %223 = icmp eq i32 %222, 0
  br i1 %223, label %224, label %229

224:                                              ; preds = %217
  %225 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %226 = load i32, ptr %27, align 4, !tbaa !11
  %227 = zext i32 %226 to i64
  %228 = getelementptr inbounds [20 x i32], ptr %225, i64 0, i64 %227
  store i32 1, ptr %228, align 4, !tbaa !11
  br label %229

229:                                              ; preds = %224, %217
  br label %230

230:                                              ; preds = %229
  %231 = load i32, ptr %27, align 4, !tbaa !11
  %232 = add i32 %231, 1
  store i32 %232, ptr %27, align 4, !tbaa !11
  br label %211, !llvm.loop !38

233:                                              ; preds = %216
  %234 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %235 = load i32, ptr %234, align 4, !tbaa !32
  %236 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  store i32 %235, ptr %236, align 4, !tbaa !32
  br label %276

237:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 0, ptr %28, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !11
  br label %238

238:                                              ; preds = %263, %237
  %239 = load i32, ptr %29, align 4, !tbaa !11
  %240 = getelementptr inbounds %struct.TensorDesc, ptr %18, i32 0, i32 2
  %241 = load i32, ptr %240, align 4, !tbaa !32
  %242 = icmp ult i32 %239, %241
  br i1 %242, label %244, label %243

243:                                              ; preds = %238
  store i32 14, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  br label %266

244:                                              ; preds = %238
  %245 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %246 = load i32, ptr %29, align 4, !tbaa !11
  %247 = zext i32 %246 to i64
  %248 = getelementptr inbounds [20 x i32], ptr %245, i64 0, i64 %247
  %249 = load i32, ptr %248, align 4, !tbaa !11
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %262

251:                                              ; preds = %244
  %252 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %253 = load i32, ptr %29, align 4, !tbaa !11
  %254 = zext i32 %253 to i64
  %255 = getelementptr inbounds [20 x i32], ptr %252, i64 0, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !11
  %257 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %258 = load i32, ptr %28, align 4, !tbaa !11
  %259 = add nsw i32 %258, 1
  store i32 %259, ptr %28, align 4, !tbaa !11
  %260 = sext i32 %258 to i64
  %261 = getelementptr inbounds [20 x i32], ptr %257, i64 0, i64 %260
  store i32 %256, ptr %261, align 4, !tbaa !11
  br label %262

262:                                              ; preds = %251, %244
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %29, align 4, !tbaa !11
  %265 = add i32 %264, 1
  store i32 %265, ptr %29, align 4, !tbaa !11
  br label %238, !llvm.loop !39

266:                                              ; preds = %243
  %267 = load i32, ptr %28, align 4, !tbaa !11
  %268 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  store i32 %267, ptr %268, align 4, !tbaa !32
  %269 = load i32, ptr %28, align 4, !tbaa !11
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %275

271:                                              ; preds = %266
  %272 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  store i32 1, ptr %272, align 4, !tbaa !32
  %273 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %274 = getelementptr inbounds [20 x i32], ptr %273, i64 0, i64 0
  store i32 1, ptr %274, align 4, !tbaa !11
  br label %275

275:                                              ; preds = %271, %266
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %276

276:                                              ; preds = %275, %233
  %277 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 2
  %278 = load i32, ptr %277, align 4, !tbaa !32
  %279 = icmp eq i32 %278, 1
  br i1 %279, label %280, label %286

280:                                              ; preds = %276
  %281 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 4
  %282 = load i8, ptr %281, align 4, !tbaa !35, !range !36, !noundef !37
  %283 = trunc i8 %282 to i1
  br i1 %283, label %286, label %284

284:                                              ; preds = %280
  %285 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 1
  store i32 43, ptr %285, align 4, !tbaa !23
  br label %291

286:                                              ; preds = %280, %276
  %287 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  %288 = load i32, ptr %287, align 4, !tbaa !32
  %289 = call noundef i32 @_Z26getTensorDefaultDataFormati(i32 noundef %288)
  %290 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 1
  store i32 %289, ptr %290, align 4, !tbaa !23
  br label %291

291:                                              ; preds = %286, %284
  %292 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 1
  %293 = load i32, ptr %292, align 4, !tbaa !23
  %294 = icmp eq i32 %293, 2
  br i1 %294, label %299, label %295

295:                                              ; preds = %291
  %296 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 1
  %297 = load i32, ptr %296, align 4, !tbaa !23
  %298 = icmp eq i32 %297, 41
  br i1 %298, label %299, label %374

299:                                              ; preds = %295, %291
  %300 = load i32, ptr %17, align 4, !tbaa !11
  %301 = icmp eq i32 %300, 0
  br i1 %301, label %302, label %340

302:                                              ; preds = %299
  %303 = getelementptr inbounds %struct.TensorDesc, ptr %12, i32 0, i32 1
  %304 = load i32, ptr %303, align 4, !tbaa !23
  %305 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 1
  store i32 %304, ptr %305, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  store i32 0, ptr %30, align 4, !tbaa !11
  br label %306

306:                                              ; preds = %324, %302
  %307 = load i32, ptr %30, align 4, !tbaa !11
  %308 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  %309 = load i32, ptr %308, align 4, !tbaa !32
  %310 = sub nsw i32 %309, 1
  %311 = icmp slt i32 %307, %310
  br i1 %311, label %313, label %312

312:                                              ; preds = %306
  store i32 17, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  br label %327

313:                                              ; preds = %306
  %314 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %315 = load i32, ptr %30, align 4, !tbaa !11
  %316 = add nsw i32 %315, 1
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [20 x i32], ptr %314, i64 0, i64 %317
  %319 = load i32, ptr %318, align 4, !tbaa !11
  %320 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %321 = load i32, ptr %30, align 4, !tbaa !11
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [20 x i32], ptr %320, i64 0, i64 %322
  store i32 %319, ptr %323, align 4, !tbaa !11
  br label %324

324:                                              ; preds = %313
  %325 = load i32, ptr %30, align 4, !tbaa !11
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %30, align 4, !tbaa !11
  br label %306, !llvm.loop !40

327:                                              ; preds = %312
  %328 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  %329 = load i32, ptr %328, align 4, !tbaa !32
  %330 = sub i32 %329, 1
  store i32 %330, ptr %328, align 4, !tbaa !32
  %331 = load i32, ptr %19, align 4, !tbaa !11
  %332 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %333 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  %334 = load i32, ptr %333, align 4, !tbaa !32
  %335 = sub i32 %334, 2
  %336 = zext i32 %335 to i64
  %337 = getelementptr inbounds [20 x i32], ptr %332, i64 0, i64 %336
  %338 = load i32, ptr %337, align 4, !tbaa !11
  %339 = mul i32 %338, %331
  store i32 %339, ptr %337, align 4, !tbaa !11
  br label %340

340:                                              ; preds = %327, %299
  %341 = load i32, ptr %17, align 4, !tbaa !11
  %342 = icmp eq i32 %341, -1
  br i1 %342, label %343, label %373

343:                                              ; preds = %340
  %344 = getelementptr inbounds %struct.ReductionParamSpec, ptr %2, i32 0, i32 4
  %345 = load i8, ptr %344, align 4, !tbaa !35, !range !36, !noundef !37
  %346 = trunc i8 %345 to i1
  br i1 %346, label %347, label %373

347:                                              ; preds = %343
  %348 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  %349 = load i32, ptr %348, align 4, !tbaa !32
  %350 = sub i32 %349, 1
  store i32 %350, ptr %348, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 0, ptr %31, align 4, !tbaa !11
  br label %351

351:                                              ; preds = %369, %347
  %352 = load i32, ptr %31, align 4, !tbaa !11
  %353 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 2
  %354 = load i32, ptr %353, align 4, !tbaa !32
  %355 = sub i32 %354, 1
  %356 = icmp ult i32 %352, %355
  br i1 %356, label %358, label %357

357:                                              ; preds = %351
  store i32 20, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %372

358:                                              ; preds = %351
  %359 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %360 = load i32, ptr %31, align 4, !tbaa !11
  %361 = add i32 %360, 1
  %362 = zext i32 %361 to i64
  %363 = getelementptr inbounds [20 x i32], ptr %359, i64 0, i64 %362
  %364 = load i32, ptr %363, align 4, !tbaa !11
  %365 = getelementptr inbounds %struct.TensorDesc, ptr %14, i32 0, i32 3
  %366 = load i32, ptr %31, align 4, !tbaa !11
  %367 = zext i32 %366 to i64
  %368 = getelementptr inbounds [20 x i32], ptr %365, i64 0, i64 %367
  store i32 %364, ptr %368, align 4, !tbaa !11
  br label %369

369:                                              ; preds = %358
  %370 = load i32, ptr %31, align 4, !tbaa !11
  %371 = add i32 %370, 1
  store i32 %371, ptr %31, align 4, !tbaa !11
  br label %351, !llvm.loop !41

372:                                              ; preds = %357
  br label %373

373:                                              ; preds = %372, %343, %340
  br label %374

374:                                              ; preds = %373, %295
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %375

375:                                              ; preds = %374, %65
  %376 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %14, i64 92, i1 false), !tbaa.struct !17
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %376, ptr noundef byval(%struct.TensorDesc) align 8 %32)
  %377 = load i32, ptr %16, align 4, !tbaa !9
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 92, ptr %12) #7
  ret i32 %377
}

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

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

declare i32 @fflush(ptr noundef) #3

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

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

; 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) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z26getTensorDefaultDataFormati(i32 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS2EE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS8ArchInfo", !15, i64 0, !6, i64 8}
!15 = !{!"_ZTS4Arch", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !20, i64 8, i64 4, !11, i64 12, i64 80, !22}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS8DataType", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS10DataFormat", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !21, i64 4}
!24 = !{!"_ZTS10TensorDesc", !19, i64 0, !21, i64 4, !12, i64 8, !7, i64 12}
!25 = !{!26, !12, i64 32}
!26 = !{!"_ZTS18ReductionParamSpec", !7, i64 0, !12, i64 32, !27, i64 36, !28, i64 40, !29, i64 44}
!27 = !{!"_ZTS13ReductionMode", !7, i64 0}
!28 = !{!"float", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!24, !12, i64 8}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}
!35 = !{!26, !29, i64 44}
!36 = !{i8 0, i8 2}
!37 = !{}
!38 = distinct !{!38, !31}
!39 = distinct !{!39, !31}
!40 = distinct !{!40, !31}
!41 = distinct !{!41, !31}


; 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] }
%struct.ReductionParamSpec = type { [8 x i32], i32, i32, float, i8 }

@.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 [18 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 52) i32 @_Z27reduction_infer_output_sizeP6TensorS_18ReductionParamSpecS0_P8ArchInfo(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly byval(%struct.ReductionParamSpec) align 8 %2, ptr noundef %3, ptr nocapture noundef readonly %4) local_unnamed_addr #1 {
  %6 = alloca %struct.TensorDesc, align 4
  %7 = alloca %struct.TensorDesc, align 8
  %8 = alloca %struct.TensorDesc, align 8
  %9 = alloca %struct.TensorDesc, align 4
  %10 = icmp eq ptr %0, null
  %11 = icmp eq ptr %3, null
  %or.cond = or i1 %10, %11
  %.sink158.sroa.gep = getelementptr inbounds i8, ptr %8, i64 12
  %.sink158.sroa.gep191 = getelementptr inbounds i8, ptr %8, i64 8
  %.sink158.sroa.gep192 = getelementptr inbounds i8, ptr %8, i64 8
  %.sink158.sroa.gep193 = getelementptr inbounds i8, ptr %8, i64 8
  br i1 %or.cond, label %12, label %22

12:                                               ; preds = %5
  %13 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %14 = trunc i64 %13 to i32
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %14)
  %16 = load ptr, ptr @stdout, align 8, !tbaa !5
  %17 = tail call i32 @fflush(ptr noundef %16)
  %18 = tail call ptr @ee2str(i32 noundef 1)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %18)
  %20 = load ptr, ptr @stdout, align 8, !tbaa !5
  %21 = tail call i32 @fflush(ptr noundef %20)
  tail call void @exit(i32 noundef 1) #9
  unreachable

22:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %6) #8
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %6, ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %7) #8
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %7, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %8) #8
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %8, ptr noundef nonnull align 8 dereferenceable(32) %3)
  %23 = load i32, ptr %4, align 8, !tbaa !9
  switch i32 %23, label %24 [
    i32 7, label %185
    i32 2, label %185
  ]

24:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %9) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(92) %9, ptr noundef nonnull align 4 dereferenceable(92) %6, i64 92, i1 false), !tbaa.struct !12
  %25 = getelementptr inbounds i8, ptr %6, i64 4
  %26 = load i32, ptr %25, align 4
  %27 = icmp eq i32 %26, 2
  %28 = select i1 %27, i32 8, i32 16
  switch i32 %26, label %._crit_edge147 [
    i32 41, label %29
    i32 2, label %29
  ]

._crit_edge147:                                   ; preds = %24
  %.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 32
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !20
  br label %61

29:                                               ; preds = %24, %24
  %30 = getelementptr inbounds i8, ptr %2, i64 32
  %31 = load i32, ptr %30, align 8, !tbaa !20
  %32 = icmp sgt i32 %31, 0
  br i1 %32, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %29
  %wide.trip.count = zext nneg i32 %31 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %35
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %35 ]
  %33 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %indvars.iv
  %34 = load i32, ptr %33, align 4, !tbaa !17
  switch i32 %34, label %35 [
    i32 1, label %._crit_edge
    i32 -3, label %._crit_edge
  ]

35:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !25

._crit_edge:                                      ; preds = %35, %.lr.ph, %.lr.ph, %29
  %.073 = phi i32 [ 0, %29 ], [ -1, %.lr.ph ], [ -1, %.lr.ph ], [ 0, %35 ]
  %36 = getelementptr inbounds i8, ptr %9, i64 8
  %37 = load i32, ptr %36, align 4, !tbaa !27
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph95, label %._crit_edge96

.lr.ph95:                                         ; preds = %._crit_edge
  %39 = getelementptr inbounds i8, ptr %9, i64 12
  %40 = zext nneg i32 %37 to i64
  %min.iters.check = icmp ult i32 %37, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph95
  %indvars.iv123.ph = phi i64 [ %40, %.lr.ph95 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph95
  %n.vec = and i64 %40, 2147483640
  %ind.end = and i64 %40, 7
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = sub i64 %40, %index
  %41 = add nsw i64 %offset.idx, -1
  %42 = getelementptr inbounds [20 x i32], ptr %39, i64 0, i64 %41
  %43 = getelementptr inbounds i8, ptr %42, i64 -12
  %44 = getelementptr inbounds i8, ptr %42, i64 -28
  %wide.load = load <4 x i32>, ptr %43, align 4, !tbaa !17
  %wide.load159 = load <4 x i32>, ptr %44, align 4, !tbaa !17
  %45 = getelementptr inbounds [20 x i32], ptr %39, i64 0, i64 %offset.idx
  %46 = getelementptr inbounds i8, ptr %45, i64 -12
  %47 = getelementptr inbounds i8, ptr %45, i64 -28
  store <4 x i32> %wide.load, ptr %46, align 4, !tbaa !17
  store <4 x i32> %wide.load159, ptr %47, align 4, !tbaa !17
  %index.next = add nuw i64 %index, 8
  %48 = icmp eq i64 %index.next, %n.vec
  br i1 %48, label %middle.block, label %vector.body, !llvm.loop !29

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %40
  br i1 %cmp.n, label %._crit_edge96, label %scalar.ph.preheader

._crit_edge96:                                    ; preds = %scalar.ph, %middle.block, %._crit_edge
  %49 = getelementptr inbounds i8, ptr %9, i64 12
  %50 = add i32 %37, -1
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds [20 x i32], ptr %49, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = select i1 %27, i32 3, i32 4
  %55 = lshr i32 %53, %54
  store i32 %55, ptr %52, align 4, !tbaa !17
  store i32 %28, ptr %49, align 4, !tbaa !17
  %56 = add i32 %37, 1
  store i32 %56, ptr %36, align 4, !tbaa !27
  br label %61

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv123 = phi i64 [ %indvars.iv.next124, %scalar.ph ], [ %indvars.iv123.ph, %scalar.ph.preheader ]
  %indvars.iv.next124 = add nsw i64 %indvars.iv123, -1
  %57 = getelementptr inbounds [20 x i32], ptr %39, i64 0, i64 %indvars.iv.next124
  %58 = load i32, ptr %57, align 4, !tbaa !17
  %59 = getelementptr inbounds [20 x i32], ptr %39, i64 0, i64 %indvars.iv123
  store i32 %58, ptr %59, align 4, !tbaa !17
  %60 = icmp ugt i64 %indvars.iv123, 1
  br i1 %60, label %scalar.ph, label %._crit_edge96, !llvm.loop !32

61:                                               ; preds = %._crit_edge147, %._crit_edge96
  %62 = phi i32 [ %31, %._crit_edge96 ], [ %.pre, %._crit_edge147 ]
  %.174 = phi i32 [ %.073, %._crit_edge96 ], [ 0, %._crit_edge147 ]
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %8, ptr noundef nonnull align 4 dereferenceable(92) %9, i64 92, i1 false), !tbaa.struct !12
  %63 = icmp slt i32 %.174, %62
  br i1 %63, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %61
  %64 = getelementptr inbounds i8, ptr %6, i64 8
  %65 = getelementptr inbounds i8, ptr %9, i64 8
  %66 = load i32, ptr %65, align 4
  %67 = getelementptr inbounds i8, ptr %7, i64 16
  %68 = getelementptr inbounds i8, ptr %8, i64 12
  %69 = sext i32 %.174 to i64
  br label %107

._crit_edge100:                                   ; preds = %107, %61
  %70 = getelementptr inbounds i8, ptr %2, i64 44
  %71 = load i8, ptr %70, align 4, !tbaa !33, !range !34, !noundef !35
  %72 = trunc nuw i8 %71 to i1
  %73 = getelementptr inbounds i8, ptr %9, i64 8
  %74 = load i32, ptr %73, align 4, !tbaa !27
  %.not120 = icmp eq i32 %74, 0
  br i1 %72, label %.preheader, label %.preheader84

.preheader84:                                     ; preds = %._crit_edge100
  br i1 %.not120, label %._crit_edge104.thread, label %.lr.ph103

._crit_edge104.thread:                            ; preds = %.preheader84
  %75 = getelementptr inbounds i8, ptr %8, i64 8
  br label %150

.lr.ph103:                                        ; preds = %.preheader84
  %76 = getelementptr inbounds i8, ptr %8, i64 12
  %wide.trip.count133 = zext i32 %74 to i64
  %xtraiter = and i64 %wide.trip.count133, 1
  %77 = icmp eq i32 %74, 1
  br i1 %77, label %._crit_edge104.unr-lcssa, label %.lr.ph103.new

.lr.ph103.new:                                    ; preds = %.lr.ph103
  %unroll_iter = and i64 %wide.trip.count133, 4294967294
  br label %135

.preheader:                                       ; preds = %._crit_edge100
  br i1 %.not120, label %.sink.split, label %.lr.ph107

.lr.ph107:                                        ; preds = %.preheader
  %78 = getelementptr inbounds i8, ptr %8, i64 12
  %wide.trip.count138 = zext i32 %74 to i64
  %min.iters.check165 = icmp ult i32 %74, 8
  br i1 %min.iters.check165, label %scalar.ph164.preheader, label %vector.ph166

scalar.ph164.preheader:                           ; preds = %middle.block163, %.lr.ph107
  %indvars.iv135.ph = phi i64 [ 0, %.lr.ph107 ], [ %n.vec168, %middle.block163 ]
  br label %scalar.ph164

vector.ph166:                                     ; preds = %.lr.ph107
  %n.vec168 = and i64 %wide.trip.count138, 4294967288
  br label %vector.body170

vector.body170:                                   ; preds = %pred.store.continue187, %vector.ph166
  %index171 = phi i64 [ 0, %vector.ph166 ], [ %index.next188, %pred.store.continue187 ]
  %79 = or disjoint i64 %index171, 4
  %80 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %index171
  %81 = getelementptr inbounds i8, ptr %80, i64 16
  %wide.load172 = load <4 x i32>, ptr %80, align 4, !tbaa !17
  %wide.load173 = load <4 x i32>, ptr %81, align 4, !tbaa !17
  %82 = icmp eq <4 x i32> %wide.load172, zeroinitializer
  %83 = icmp eq <4 x i32> %wide.load173, zeroinitializer
  %84 = extractelement <4 x i1> %82, i64 0
  br i1 %84, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body170
  %85 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %index171
  store i32 1, ptr %85, align 4, !tbaa !17
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body170
  %86 = extractelement <4 x i1> %82, i64 1
  br i1 %86, label %pred.store.if174, label %pred.store.continue175

pred.store.if174:                                 ; preds = %pred.store.continue
  %87 = or disjoint i64 %index171, 1
  %88 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %87
  store i32 1, ptr %88, align 8, !tbaa !17
  br label %pred.store.continue175

pred.store.continue175:                           ; preds = %pred.store.if174, %pred.store.continue
  %89 = extractelement <4 x i1> %82, i64 2
  br i1 %89, label %pred.store.if176, label %pred.store.continue177

pred.store.if176:                                 ; preds = %pred.store.continue175
  %90 = or disjoint i64 %index171, 2
  %91 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %90
  store i32 1, ptr %91, align 4, !tbaa !17
  br label %pred.store.continue177

pred.store.continue177:                           ; preds = %pred.store.if176, %pred.store.continue175
  %92 = extractelement <4 x i1> %82, i64 3
  br i1 %92, label %pred.store.if178, label %pred.store.continue179

pred.store.if178:                                 ; preds = %pred.store.continue177
  %93 = or disjoint i64 %index171, 3
  %94 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %93
  store i32 1, ptr %94, align 8, !tbaa !17
  br label %pred.store.continue179

pred.store.continue179:                           ; preds = %pred.store.if178, %pred.store.continue177
  %95 = extractelement <4 x i1> %83, i64 0
  br i1 %95, label %pred.store.if180, label %pred.store.continue181

pred.store.if180:                                 ; preds = %pred.store.continue179
  %96 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %79
  store i32 1, ptr %96, align 4, !tbaa !17
  br label %pred.store.continue181

pred.store.continue181:                           ; preds = %pred.store.if180, %pred.store.continue179
  %97 = extractelement <4 x i1> %83, i64 1
  br i1 %97, label %pred.store.if182, label %pred.store.continue183

pred.store.if182:                                 ; preds = %pred.store.continue181
  %98 = or disjoint i64 %index171, 5
  %99 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %98
  store i32 1, ptr %99, align 8, !tbaa !17
  br label %pred.store.continue183

pred.store.continue183:                           ; preds = %pred.store.if182, %pred.store.continue181
  %100 = extractelement <4 x i1> %83, i64 2
  br i1 %100, label %pred.store.if184, label %pred.store.continue185

pred.store.if184:                                 ; preds = %pred.store.continue183
  %101 = or disjoint i64 %index171, 6
  %102 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %101
  store i32 1, ptr %102, align 4, !tbaa !17
  br label %pred.store.continue185

pred.store.continue185:                           ; preds = %pred.store.if184, %pred.store.continue183
  %103 = extractelement <4 x i1> %83, i64 3
  br i1 %103, label %pred.store.if186, label %pred.store.continue187

pred.store.if186:                                 ; preds = %pred.store.continue185
  %104 = or disjoint i64 %index171, 7
  %105 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %104
  store i32 1, ptr %105, align 8, !tbaa !17
  br label %pred.store.continue187

pred.store.continue187:                           ; preds = %pred.store.if186, %pred.store.continue185
  %index.next188 = add nuw i64 %index171, 8
  %106 = icmp eq i64 %index.next188, %n.vec168
  br i1 %106, label %middle.block163, label %vector.body170, !llvm.loop !36

middle.block163:                                  ; preds = %pred.store.continue187
  %cmp.n189 = icmp eq i64 %n.vec168, %wide.trip.count138
  br i1 %cmp.n189, label %.sink.split, label %scalar.ph164.preheader

107:                                              ; preds = %.lr.ph99, %107
  %indvars.iv126 = phi i64 [ %69, %.lr.ph99 ], [ %indvars.iv.next127, %107 ]
  %108 = icmp eq i64 %indvars.iv126, -1
  %109 = getelementptr inbounds [8 x i32], ptr %2, i64 0, i64 %indvars.iv126
  %.sink152 = select i1 %108, ptr %64, ptr %109
  %110 = load i32, ptr %.sink152, align 4, !tbaa !17
  %111 = icmp slt i32 %110, 0
  %112 = select i1 %111, i32 %66, i32 0
  %.169 = add i32 %112, %110
  %113 = xor i32 %.169, -1
  %114 = add i32 %66, %113
  %115 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %7)
  %116 = icmp eq i32 %115, 0
  %117 = load i32, ptr %67, align 8
  %118 = icmp ugt i32 %117, 1
  %119 = select i1 %118, i32 %117, i32 0
  %.sink153 = select i1 %116, i32 0, i32 %119
  %120 = sext i32 %114 to i64
  %121 = getelementptr inbounds [20 x i32], ptr %68, i64 0, i64 %120
  store i32 %.sink153, ptr %121, align 4, !tbaa !17
  %indvars.iv.next127 = add nsw i64 %indvars.iv126, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next127 to i32
  %exitcond129.not = icmp eq i32 %62, %lftr.wideiv
  br i1 %exitcond129.not, label %._crit_edge100, label %107, !llvm.loop !37

scalar.ph164:                                     ; preds = %scalar.ph164.preheader, %126
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %126 ], [ %indvars.iv135.ph, %scalar.ph164.preheader ]
  %122 = getelementptr inbounds [20 x i32], ptr %78, i64 0, i64 %indvars.iv135
  %123 = load i32, ptr %122, align 4, !tbaa !17
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %125, label %126

125:                                              ; preds = %scalar.ph164
  store i32 1, ptr %122, align 4, !tbaa !17
  br label %126

126:                                              ; preds = %scalar.ph164, %125
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count138
  br i1 %exitcond139.not, label %.sink.split, label %scalar.ph164, !llvm.loop !38

._crit_edge104.unr-lcssa:                         ; preds = %149, %.lr.ph103
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph103 ], [ %.1.1, %149 ]
  %indvars.iv130.unr = phi i64 [ 0, %.lr.ph103 ], [ %indvars.iv.next131.1, %149 ]
  %.065101.unr = phi i32 [ 0, %.lr.ph103 ], [ %.1.1, %149 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge104, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge104.unr-lcssa
  %127 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %indvars.iv130.unr
  %128 = load i32, ptr %127, align 4, !tbaa !17
  %.not.epil = icmp eq i32 %128, 0
  br i1 %.not.epil, label %._crit_edge104, label %129

129:                                              ; preds = %.epil.preheader
  %130 = add nsw i32 %.065101.unr, 1
  %131 = sext i32 %.065101.unr to i64
  %132 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %131
  store i32 %128, ptr %132, align 4, !tbaa !17
  br label %._crit_edge104

._crit_edge104:                                   ; preds = %.epil.preheader, %129, %._crit_edge104.unr-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge104.unr-lcssa ], [ %130, %129 ], [ %.065101.unr, %.epil.preheader ]
  %133 = getelementptr inbounds i8, ptr %8, i64 8
  store i32 %.1.lcssa, ptr %133, align 8, !tbaa !27
  %134 = icmp eq i32 %.1.lcssa, 0
  br i1 %134, label %150, label %152

135:                                              ; preds = %149, %.lr.ph103.new
  %indvars.iv130 = phi i64 [ 0, %.lr.ph103.new ], [ %indvars.iv.next131.1, %149 ]
  %.065101 = phi i32 [ 0, %.lr.ph103.new ], [ %.1.1, %149 ]
  %niter = phi i64 [ 0, %.lr.ph103.new ], [ %niter.next.1, %149 ]
  %136 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %indvars.iv130
  %137 = load i32, ptr %136, align 4, !tbaa !17
  %.not = icmp eq i32 %137, 0
  br i1 %.not, label %142, label %138

138:                                              ; preds = %135
  %139 = add nsw i32 %.065101, 1
  %140 = sext i32 %.065101 to i64
  %141 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %140
  store i32 %137, ptr %141, align 4, !tbaa !17
  br label %142

142:                                              ; preds = %135, %138
  %.1 = phi i32 [ %139, %138 ], [ %.065101, %135 ]
  %indvars.iv.next131 = or disjoint i64 %indvars.iv130, 1
  %143 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %indvars.iv.next131
  %144 = load i32, ptr %143, align 8, !tbaa !17
  %.not.1 = icmp eq i32 %144, 0
  br i1 %.not.1, label %149, label %145

145:                                              ; preds = %142
  %146 = add nsw i32 %.1, 1
  %147 = sext i32 %.1 to i64
  %148 = getelementptr inbounds [20 x i32], ptr %76, i64 0, i64 %147
  store i32 %144, ptr %148, align 4, !tbaa !17
  br label %149

149:                                              ; preds = %145, %142
  %.1.1 = phi i32 [ %146, %145 ], [ %.1, %142 ]
  %indvars.iv.next131.1 = add nuw nsw i64 %indvars.iv130, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge104.unr-lcssa, label %135, !llvm.loop !39

150:                                              ; preds = %._crit_edge104.thread, %._crit_edge104
  %151 = phi ptr [ %75, %._crit_edge104.thread ], [ %133, %._crit_edge104 ]
  store i32 1, ptr %151, align 4, !tbaa !27
  br label %.sink.split

.sink.split:                                      ; preds = %126, %middle.block163, %.preheader, %150
  %.sink158.sroa.phi = phi ptr [ %.sink158.sroa.gep, %150 ], [ %.sink158.sroa.gep191, %.preheader ], [ %.sink158.sroa.gep192, %middle.block163 ], [ %.sink158.sroa.gep193, %126 ]
  %.sink156 = phi i32 [ 1, %150 ], [ %74, %.preheader ], [ %74, %middle.block163 ], [ %74, %126 ]
  store i32 %.sink156, ptr %.sink158.sroa.phi, align 4, !tbaa !17
  br label %152

152:                                              ; preds = %.sink.split, %._crit_edge104
  %153 = phi i32 [ %.1.lcssa, %._crit_edge104 ], [ %.sink156, %.sink.split ]
  %154 = getelementptr inbounds i8, ptr %6, i64 8
  %155 = load i32, ptr %154, align 4, !tbaa !27
  %156 = icmp ne i32 %155, 1
  %brmerge = or i1 %156, %72
  br i1 %brmerge, label %157, label %159

157:                                              ; preds = %152
  %158 = call noundef i32 @_Z26getTensorDefaultDataFormati(i32 noundef %153)
  br label %159

159:                                              ; preds = %152, %157
  %.sink = phi i32 [ %158, %157 ], [ 43, %152 ]
  %160 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %.sink, ptr %160, align 4
  %161 = load i32, ptr %25, align 4
  switch i32 %161, label %.loopexit [
    i32 41, label %162
    i32 2, label %162
  ]

162:                                              ; preds = %159, %159
  %switch = icmp eq i32 %.174, 0
  br i1 %switch, label %163, label %178

163:                                              ; preds = %162
  store i32 %161, ptr %160, align 4, !tbaa !40
  %164 = getelementptr inbounds i8, ptr %8, i64 8
  %165 = load i32, ptr %164, align 8, !tbaa !27
  %166 = add i32 %165, -1
  %167 = icmp sgt i32 %165, 1
  br i1 %167, label %.lr.ph112, label %._crit_edge113

.lr.ph112:                                        ; preds = %163
  %168 = getelementptr inbounds i8, ptr %8, i64 12
  %scevgep = getelementptr inbounds i8, ptr %8, i64 16
  %169 = zext nneg i32 %166 to i64
  %170 = shl nuw nsw i64 %169, 2
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 4 %168, ptr nonnull align 8 %scevgep, i64 %170, i1 false), !tbaa !17
  br label %._crit_edge113

._crit_edge113:                                   ; preds = %.lr.ph112, %163
  store i32 %166, ptr %164, align 8, !tbaa !27
  %171 = getelementptr inbounds i8, ptr %8, i64 12
  %172 = add i32 %165, -3
  %173 = zext i32 %172 to i64
  %174 = getelementptr inbounds [20 x i32], ptr %171, i64 0, i64 %173
  %175 = load i32, ptr %174, align 4, !tbaa !17
  %176 = select i1 %27, i32 3, i32 4
  %177 = shl i32 %175, %176
  store i32 %177, ptr %174, align 4, !tbaa !17
  br label %.loopexit

178:                                              ; preds = %162
  br i1 %72, label %._crit_edge148, label %.loopexit

._crit_edge148:                                   ; preds = %178
  %.phi.trans.insert149 = getelementptr inbounds i8, ptr %8, i64 8
  %.pre150 = load i32, ptr %.phi.trans.insert149, align 8, !tbaa !27
  %179 = getelementptr inbounds i8, ptr %8, i64 8
  %180 = add i32 %.pre150, -1
  store i32 %180, ptr %179, align 8, !tbaa !27
  %181 = add i32 %.pre150, -2
  %.not121 = icmp eq i32 %181, 0
  br i1 %.not121, label %.loopexit, label %.lr.ph118

.lr.ph118:                                        ; preds = %._crit_edge148
  %182 = getelementptr inbounds i8, ptr %8, i64 12
  %scevgep143 = getelementptr inbounds i8, ptr %8, i64 16
  %183 = zext i32 %181 to i64
  %184 = shl nuw nsw i64 %183, 2
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 4 %182, ptr nonnull align 8 %scevgep143, i64 %184, i1 false), !tbaa !17
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge113, %.lr.ph118, %._crit_edge148, %159, %178
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %9) #8
  br label %185

185:                                              ; preds = %22, %22, %.loopexit
  %.067 = phi i32 [ 51, %22 ], [ 0, %.loopexit ], [ 51, %22 ]
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %8)
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %6) #8
  ret i32 %.067
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #4

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

; 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) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z26getTensorDefaultDataFormati(i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS8ArchInfo", !11, i64 0, !6, i64 8}
!11 = !{!"_ZTS4Arch", !7, i64 0}
!12 = !{i64 0, i64 4, !13, i64 4, i64 4, !15, i64 8, i64 4, !17, i64 12, i64 80, !19}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS8DataType", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTS10DataFormat", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !18, i64 32}
!21 = !{!"_ZTS18ReductionParamSpec", !7, i64 0, !18, i64 32, !22, i64 36, !23, i64 40, !24, i64 44}
!22 = !{!"_ZTS13ReductionMode", !7, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!28, !18, i64 8}
!28 = !{!"_ZTS10TensorDesc", !14, i64 0, !16, i64 4, !18, i64 8, !7, i64 12}
!29 = distinct !{!29, !26, !30, !31}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = distinct !{!32, !26, !31, !30}
!33 = !{!21, !24, i64 44}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !26, !30, !31}
!37 = distinct !{!37, !26}
!38 = distinct !{!38, !26, !31, !30}
!39 = distinct !{!39, !26}
!40 = !{!28, !16, i64 4}


; Effective O3 passes: BDCEPass,ConstraintEliminationPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass