; LLVM IR from jingweizhanghuai/Morn :: src/wave (morn_wave)

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

@.str = external hidden unnamed_addr constant [76 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@__FUNCTION__.mWaveWeightedAverage = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mWaveRedefine(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mWaveAverage(ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

26:                                               ; preds = %22, %19
  br i1 true, label %83, label %48

27:                                               ; preds = %22
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.MWave, ptr %28, i32 0, i32 2
  %30 = getelementptr inbounds [32 x ptr], ptr %29, i64 0, i64 0
  %31 = icmp eq ptr %30, null
  br i1 %31, label %83, label %32

32:                                               ; preds = %27
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.MWave, ptr %33, i32 0, i32 2
  %35 = getelementptr inbounds [32 x ptr], ptr %34, i64 0, i64 0
  %36 = ptrtoint ptr %35 to i64
  %37 = icmp eq i64 %36, -1
  br i1 %37, label %83, label %38

38:                                               ; preds = %32
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.MWave, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = icmp sle i32 %41, 0
  br i1 %42, label %83, label %43

43:                                               ; preds = %38
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.MWave, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !14
  %47 = icmp sle i32 %46, 0
  br i1 %47, label %83, label %48

48:                                               ; preds = %43, %26
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = icmp eq ptr %49, null
  br i1 %50, label %55, label %51

51:                                               ; preds = %48
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = ptrtoint ptr %52 to i64
  %54 = icmp eq i64 %53, -1
  br i1 %54, label %55, label %56

55:                                               ; preds = %51, %48
  br label %80

56:                                               ; preds = %51
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.MWave, ptr %57, i32 0, i32 2
  %59 = getelementptr inbounds [32 x ptr], ptr %58, i64 0, i64 0
  %60 = icmp eq ptr %59, null
  br i1 %60, label %77, label %61

61:                                               ; preds = %56
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.MWave, ptr %62, i32 0, i32 2
  %64 = getelementptr inbounds [32 x ptr], ptr %63, i64 0, i64 0
  %65 = ptrtoint ptr %64 to i64
  %66 = icmp eq i64 %65, -1
  br i1 %66, label %77, label %67

67:                                               ; preds = %61
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.MWave, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !11
  %71 = icmp sle i32 %70, 0
  br i1 %71, label %77, label %72

72:                                               ; preds = %67
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.MWave, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !14
  %76 = icmp sle i32 %75, 0
  br label %77

77:                                               ; preds = %72, %67, %61, %56
  %78 = phi i1 [ true, %67 ], [ true, %61 ], [ true, %56 ], [ %76, %72 ]
  %79 = zext i1 %78 to i32
  br label %80

80:                                               ; preds = %77, %55
  %81 = phi i32 [ 1, %55 ], [ %79, %77 ]
  %82 = icmp ne i32 %81, 0
  br label %83

83:                                               ; preds = %80, %43, %38, %32, %27, %26
  %84 = phi i1 [ true, %43 ], [ true, %38 ], [ true, %32 ], [ true, %27 ], [ true, %26 ], [ %82, %80 ]
  %85 = zext i1 %84 to i32
  store i32 %85, ptr %14, align 4, !tbaa !15
  %86 = load i32, ptr %14, align 4, !tbaa !15
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %83
  %89 = load i32, ptr %14, align 4, !tbaa !15
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %89, i32 noundef -1, ptr noundef @.str, i32 noundef 302, ptr noundef @__FUNCTION__.mWaveWeightedAverage, ptr noundef @.str.2)
  br label %90

90:                                               ; preds = %88, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.MWave, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 4, !tbaa !14
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.MWave, ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !14
  %99 = icmp slt i32 %95, %98
  br i1 %99, label %100, label %104

100:                                              ; preds = %92
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.MWave, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 4, !tbaa !14
  br label %108

104:                                              ; preds = %92
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.MWave, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !14
  br label %108

108:                                              ; preds = %104, %100
  %109 = phi i32 [ %103, %100 ], [ %107, %104 ]
  store i32 %109, ptr %11, align 4, !tbaa !15
  br label %110

110:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.MWave, ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 8, !tbaa !11
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.MWave, ptr %114, i32 0, i32 0
  %116 = load i32, ptr %115, align 8, !tbaa !11
  %117 = icmp ne i32 %113, %116
  br i1 %117, label %118, label %123

118:                                              ; preds = %110
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.MWave, ptr %119, i32 0, i32 0
  %121 = load i32, ptr %120, align 8, !tbaa !11
  %122 = icmp ne i32 %121, 1
  br label %123

123:                                              ; preds = %118, %110
  %124 = phi i1 [ false, %110 ], [ %122, %118 ]
  %125 = zext i1 %124 to i32
  store i32 %125, ptr %15, align 4, !tbaa !15
  %126 = load i32, ptr %15, align 4, !tbaa !15
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %130

128:                                              ; preds = %123
  %129 = load i32, ptr %15, align 4, !tbaa !15
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %129, i32 noundef -1, ptr noundef @.str, i32 noundef 304, ptr noundef @__FUNCTION__.mWaveWeightedAverage, ptr noundef @.str.2)
  br label %130

130:                                              ; preds = %128, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  %133 = load float, ptr %9, align 4, !tbaa !9
  %134 = fcmp oeq float %133, -1.000000e+00
  br i1 %134, label %135, label %142

135:                                              ; preds = %132
  %136 = load float, ptr %10, align 4, !tbaa !9
  %137 = fcmp oeq float %136, -1.000000e+00
  br i1 %137, label %138, label %142

138:                                              ; preds = %135
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mWaveAverage(ptr noundef %139, ptr noundef %140, ptr noundef %141)
  store i32 1, ptr %16, align 4
  br label %323

142:                                              ; preds = %135, %132
  %143 = load float, ptr %9, align 4, !tbaa !9
  %144 = fcmp oeq float %143, -1.000000e+00
  br i1 %144, label %145, label %154

145:                                              ; preds = %142
  %146 = load float, ptr %10, align 4, !tbaa !9
  %147 = fcmp olt float %146, 1.000000e+00
  br i1 %147, label %148, label %154

148:                                              ; preds = %145
  %149 = load float, ptr %10, align 4, !tbaa !9
  %150 = fcmp ogt float %149, 0.000000e+00
  br i1 %150, label %151, label %154

151:                                              ; preds = %148
  %152 = load float, ptr %10, align 4, !tbaa !9
  %153 = fsub float 1.000000e+00, %152
  store float %153, ptr %9, align 4, !tbaa !9
  br label %183

154:                                              ; preds = %148, %145, %142
  %155 = load float, ptr %10, align 4, !tbaa !9
  %156 = fcmp oeq float %155, -1.000000e+00
  br i1 %156, label %157, label %166

157:                                              ; preds = %154
  %158 = load float, ptr %9, align 4, !tbaa !9
  %159 = fcmp olt float %158, 1.000000e+00
  br i1 %159, label %160, label %166

160:                                              ; preds = %157
  %161 = load float, ptr %9, align 4, !tbaa !9
  %162 = fcmp ogt float %161, 0.000000e+00
  br i1 %162, label %163, label %166

163:                                              ; preds = %160
  %164 = load float, ptr %9, align 4, !tbaa !9
  %165 = fsub float 1.000000e+00, %164
  store float %165, ptr %10, align 4, !tbaa !9
  br label %182

166:                                              ; preds = %160, %157, %154
  %167 = load float, ptr %9, align 4, !tbaa !9
  %168 = fcmp oeq float %167, -1.000000e+00
  br i1 %168, label %172, label %169

169:                                              ; preds = %166
  %170 = load float, ptr %10, align 4, !tbaa !9
  %171 = fcmp oeq float %170, -1.000000e+00
  br i1 %171, label %172, label %181

172:                                              ; preds = %169, %166
  br label %173

173:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 1, ptr %17, align 4, !tbaa !15
  %174 = load i32, ptr %17, align 4, !tbaa !15
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %178

176:                                              ; preds = %173
  %177 = load i32, ptr %17, align 4, !tbaa !15
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %177, i32 noundef -1, ptr noundef @.str, i32 noundef 316, ptr noundef @__FUNCTION__.mWaveWeightedAverage, ptr noundef @.str.2)
  br label %178

178:                                              ; preds = %176, %173
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180, %169
  br label %182

182:                                              ; preds = %181, %163
  br label %183

183:                                              ; preds = %182, %151
  br label %184

184:                                              ; preds = %183
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = icmp eq ptr %185, null
  br i1 %186, label %191, label %187

187:                                              ; preds = %184
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = ptrtoint ptr %188 to i64
  %190 = icmp eq i64 %189, -1
  br i1 %190, label %191, label %193

191:                                              ; preds = %187, %184
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %192, ptr %8, align 8, !tbaa !5
  br label %193

193:                                              ; preds = %191, %187
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = call ptr @m_PropertyWrite(ptr noundef %194, ptr noundef @.str.4, ptr noundef %18, i32 noundef 4)
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.MWave, ptr %197, i32 0, i32 0
  %199 = load i32, ptr %198, align 8, !tbaa !11
  %200 = load i32, ptr %11, align 4, !tbaa !15
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.MWave, ptr %201, i32 0, i32 2
  %203 = getelementptr inbounds [32 x ptr], ptr %202, i64 0, i64 0
  call void @mWaveRedefine(ptr noundef %196, i32 noundef %199, i32 noundef %200, ptr noundef %203)
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.MWave, ptr %204, i32 0, i32 0
  %206 = load i32, ptr %205, align 8, !tbaa !11
  %207 = icmp eq i32 %206, 1
  br i1 %207, label %208, label %264

208:                                              ; preds = %193
  store i32 0, ptr %12, align 4, !tbaa !15
  br label %209

209:                                              ; preds = %260, %208
  %210 = load i32, ptr %12, align 4, !tbaa !15
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.MWave, ptr %211, i32 0, i32 0
  %213 = load i32, ptr %212, align 8, !tbaa !11
  %214 = icmp slt i32 %210, %213
  br i1 %214, label %215, label %263

215:                                              ; preds = %209
  store i32 0, ptr %13, align 4, !tbaa !15
  br label %216

216:                                              ; preds = %256, %215
  %217 = load i32, ptr %13, align 4, !tbaa !15
  %218 = load i32, ptr %11, align 4, !tbaa !15
  %219 = icmp slt i32 %217, %218
  br i1 %219, label %220, label %259

220:                                              ; preds = %216
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.MWave, ptr %221, i32 0, i32 2
  %223 = load i32, ptr %12, align 4, !tbaa !15
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [32 x ptr], ptr %222, i64 0, i64 %224
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  %227 = load i32, ptr %13, align 4, !tbaa !15
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds float, ptr %226, i64 %228
  %230 = load float, ptr %229, align 4, !tbaa !9
  %231 = load float, ptr %9, align 4, !tbaa !9
  %232 = load ptr, ptr %7, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.MWave, ptr %232, i32 0, i32 2
  %234 = load i32, ptr %12, align 4, !tbaa !15
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [32 x ptr], ptr %233, i64 0, i64 %235
  %237 = load ptr, ptr %236, align 8, !tbaa !5
  %238 = getelementptr inbounds float, ptr %237, i64 0
  %239 = load float, ptr %238, align 4, !tbaa !9
  %240 = load float, ptr %10, align 4, !tbaa !9
  %241 = fmul float %239, %240
  %242 = call float @llvm.fmuladd.f32(float %230, float %231, float %241)
  %243 = load float, ptr %9, align 4, !tbaa !9
  %244 = load float, ptr %10, align 4, !tbaa !9
  %245 = fadd float %243, %244
  %246 = fdiv float %242, %245
  %247 = load ptr, ptr %8, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.MWave, ptr %247, i32 0, i32 2
  %249 = load i32, ptr %12, align 4, !tbaa !15
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [32 x ptr], ptr %248, i64 0, i64 %250
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  %253 = load i32, ptr %13, align 4, !tbaa !15
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds float, ptr %252, i64 %254
  store float %246, ptr %255, align 4, !tbaa !9
  br label %256

256:                                              ; preds = %220
  %257 = load i32, ptr %13, align 4, !tbaa !15
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %13, align 4, !tbaa !15
  br label %216, !llvm.loop !16

259:                                              ; preds = %216
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %12, align 4, !tbaa !15
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %12, align 4, !tbaa !15
  br label %209, !llvm.loop !18

263:                                              ; preds = %209
  br label %322

264:                                              ; preds = %193
  store i32 0, ptr %12, align 4, !tbaa !15
  br label %265

265:                                              ; preds = %318, %264
  %266 = load i32, ptr %12, align 4, !tbaa !15
  %267 = load ptr, ptr %6, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.MWave, ptr %267, i32 0, i32 0
  %269 = load i32, ptr %268, align 8, !tbaa !11
  %270 = icmp slt i32 %266, %269
  br i1 %270, label %271, label %321

271:                                              ; preds = %265
  store i32 0, ptr %13, align 4, !tbaa !15
  br label %272

272:                                              ; preds = %314, %271
  %273 = load i32, ptr %13, align 4, !tbaa !15
  %274 = load i32, ptr %11, align 4, !tbaa !15
  %275 = icmp slt i32 %273, %274
  br i1 %275, label %276, label %317

276:                                              ; preds = %272
  %277 = load ptr, ptr %6, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.MWave, ptr %277, i32 0, i32 2
  %279 = load i32, ptr %12, align 4, !tbaa !15
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [32 x ptr], ptr %278, i64 0, i64 %280
  %282 = load ptr, ptr %281, align 8, !tbaa !5
  %283 = load i32, ptr %13, align 4, !tbaa !15
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds float, ptr %282, i64 %284
  %286 = load float, ptr %285, align 4, !tbaa !9
  %287 = load float, ptr %9, align 4, !tbaa !9
  %288 = load ptr, ptr %7, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.MWave, ptr %288, i32 0, i32 2
  %290 = load i32, ptr %12, align 4, !tbaa !15
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [32 x ptr], ptr %289, i64 0, i64 %291
  %293 = load ptr, ptr %292, align 8, !tbaa !5
  %294 = load i32, ptr %13, align 4, !tbaa !15
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds float, ptr %293, i64 %295
  %297 = load float, ptr %296, align 4, !tbaa !9
  %298 = load float, ptr %10, align 4, !tbaa !9
  %299 = fmul float %297, %298
  %300 = call float @llvm.fmuladd.f32(float %286, float %287, float %299)
  %301 = load float, ptr %9, align 4, !tbaa !9
  %302 = load float, ptr %10, align 4, !tbaa !9
  %303 = fadd float %301, %302
  %304 = fdiv float %300, %303
  %305 = load ptr, ptr %8, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.MWave, ptr %305, i32 0, i32 2
  %307 = load i32, ptr %12, align 4, !tbaa !15
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [32 x ptr], ptr %306, i64 0, i64 %308
  %310 = load ptr, ptr %309, align 8, !tbaa !5
  %311 = load i32, ptr %13, align 4, !tbaa !15
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds float, ptr %310, i64 %312
  store float %304, ptr %313, align 4, !tbaa !9
  br label %314

314:                                              ; preds = %276
  %315 = load i32, ptr %13, align 4, !tbaa !15
  %316 = add nsw i32 %315, 1
  store i32 %316, ptr %13, align 4, !tbaa !15
  br label %272, !llvm.loop !19

317:                                              ; preds = %272
  br label %318

318:                                              ; preds = %317
  %319 = load i32, ptr %12, align 4, !tbaa !15
  %320 = add nsw i32 %319, 1
  store i32 %320, ptr %12, align 4, !tbaa !15
  br label %265, !llvm.loop !20

321:                                              ; preds = %265
  br label %322

322:                                              ; preds = %321, %263
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  store i32 0, ptr %16, align 4
  br label %323

323:                                              ; preds = %322, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %324 = load i32, ptr %16, align 4
  switch i32 %324, label %326 [
    i32 0, label %325
    i32 1, label %325
  ]

325:                                              ; preds = %323, %323
  ret void

326:                                              ; preds = %323
  unreachable
}

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

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

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


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

@.str = external hidden unnamed_addr constant [76 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@__FUNCTION__.mWaveWeightedAverage = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mWaveRedefine(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mWaveAverage(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @mWaveWeightedAverage(ptr noundef %0, ptr noundef %1, ptr noundef %2, float noundef %3, float noundef %4) local_unnamed_addr #2 {
  %6 = alloca float, align 4
  %7 = getelementptr i8, ptr %0, i64 8
  %8 = icmp eq ptr %7, inttoptr (i64 -1 to ptr)
  br i1 %8, label %.thread, label %switch.early.test

switch.early.test:                                ; preds = %5
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %9 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

9:                                                ; preds = %switch.early.test
  %10 = load i32, ptr %0, align 8, !tbaa !5
  %11 = icmp slt i32 %10, 1
  br i1 %11, label %.thread, label %12

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !10
  %15 = icmp slt i32 %14, 1
  br i1 %15, label %.thread, label %16

16:                                               ; preds = %12
  %magicptr133 = ptrtoint ptr %1 to i64
  switch i64 %magicptr133, label %17 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

17:                                               ; preds = %16
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = icmp eq ptr %18, inttoptr (i64 -1 to ptr)
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %17
  %21 = load i32, ptr %1, align 8, !tbaa !5
  %22 = icmp slt i32 %21, 1
  br i1 %22, label %.thread, label %23

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %1, i64 4
  %25 = load i32, ptr %24, align 4, !tbaa !10
  %26 = icmp slt i32 %25, 1
  br i1 %26, label %.thread, label %27

.thread:                                          ; preds = %17, %20, %16, %16, %5, %switch.early.test, %switch.early.test, %9, %12, %23
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 302, ptr noundef nonnull @__FUNCTION__.mWaveWeightedAverage, ptr noundef nonnull @.str.2) #5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 4
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !10
  %.phi.trans.insert163 = getelementptr inbounds i8, ptr %1, i64 4
  %.pre164 = load i32, ptr %.phi.trans.insert163, align 4, !tbaa !10
  %.pre165 = load i32, ptr %1, align 8, !tbaa !5
  %.pre166 = load i32, ptr %0, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %.thread, %23
  %28 = phi i32 [ %.pre166, %.thread ], [ %10, %23 ]
  %29 = phi i32 [ %.pre165, %.thread ], [ %21, %23 ]
  %30 = phi i32 [ %.pre164, %.thread ], [ %25, %23 ]
  %31 = phi i32 [ %.pre, %.thread ], [ %14, %23 ]
  %. = tail call i32 @llvm.smin.i32(i32 %31, i32 %30)
  %.not = icmp ne i32 %29, %28
  %32 = icmp ne i32 %29, 1
  %33 = and i1 %32, %.not
  br i1 %33, label %34, label %35

34:                                               ; preds = %27
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 304, ptr noundef nonnull @__FUNCTION__.mWaveWeightedAverage, ptr noundef nonnull @.str.2) #5
  br label %35

35:                                               ; preds = %34, %27
  %36 = fcmp oeq float %3, -1.000000e+00
  %37 = fcmp oeq float %4, -1.000000e+00
  %or.cond21 = and i1 %36, %37
  br i1 %or.cond21, label %38, label %39

38:                                               ; preds = %35
  tail call void @mWaveAverage(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef %2)
  br label %151

39:                                               ; preds = %35
  %40 = fcmp olt float %4, 1.000000e+00
  %41 = fcmp ogt float %4, 0.000000e+00
  %42 = and i1 %40, %41
  %or.cond25 = and i1 %36, %42
  br i1 %or.cond25, label %43, label %45

43:                                               ; preds = %39
  %44 = fsub float 1.000000e+00, %4
  br label %53

45:                                               ; preds = %39
  %46 = fcmp olt float %3, 1.000000e+00
  %47 = fcmp ogt float %3, 0.000000e+00
  %48 = and i1 %46, %47
  %or.cond29 = and i1 %48, %37
  br i1 %or.cond29, label %49, label %51

49:                                               ; preds = %45
  %50 = fsub float 1.000000e+00, %3
  br label %53

51:                                               ; preds = %45
  %or.cond31 = or i1 %36, %37
  br i1 %or.cond31, label %52, label %53

52:                                               ; preds = %51
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 316, ptr noundef nonnull @__FUNCTION__.mWaveWeightedAverage, ptr noundef nonnull @.str.2) #5
  br label %53

53:                                               ; preds = %43, %52, %51, %49
  %.0120 = phi float [ %4, %43 ], [ %50, %49 ], [ %4, %52 ], [ %4, %51 ]
  %.0119 = phi float [ %44, %43 ], [ %3, %49 ], [ %3, %52 ], [ %3, %51 ]
  %magicptr134 = ptrtoint ptr %2 to i64
  switch i64 %magicptr134, label %55 [
    i64 -1, label %54
    i64 0, label %54
  ]

54:                                               ; preds = %53, %53
  br label %55

55:                                               ; preds = %53, %54
  %.0 = phi ptr [ %0, %54 ], [ %2, %53 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store float 0.000000e+00, ptr %6, align 4, !tbaa !11
  %56 = call ptr @m_PropertyWrite(ptr noundef %.0, ptr noundef nonnull @.str.4, ptr noundef nonnull %6, i32 noundef 4) #5
  %57 = load i32, ptr %0, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %.0, i64 8
  call void @mWaveRedefine(ptr noundef %.0, i32 noundef %57, i32 noundef %., ptr noundef nonnull %58)
  %59 = load i32, ptr %1, align 8, !tbaa !5
  %60 = icmp eq i32 %59, 1
  %61 = load i32, ptr %0, align 8, !tbaa !5
  %62 = icmp sgt i32 %61, 0
  br i1 %60, label %.preheader135, label %.preheader137

.preheader137:                                    ; preds = %55
  br i1 %62, label %.preheader136.lr.ph, label %.loopexit

.preheader136.lr.ph:                              ; preds = %.preheader137
  %63 = icmp sgt i32 %., 0
  %64 = getelementptr inbounds i8, ptr %1, i64 8
  %65 = fadd float %.0120, %.0119
  br i1 %63, label %.preheader136.us.preheader, label %.loopexit

.preheader136.us.preheader:                       ; preds = %.preheader136.lr.ph
  %wide.trip.count151 = zext nneg i32 %61 to i64
  %wide.trip.count = zext nneg i32 %. to i64
  %min.iters.check = icmp ult i32 %., 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %broadcast.splatinsert = insertelement <4 x float> poison, float %.0120, i64 0
  %broadcast.splat = shufflevector <4 x float> %broadcast.splatinsert, <4 x float> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert171 = insertelement <4 x float> poison, float %.0119, i64 0
  %broadcast.splat172 = shufflevector <4 x float> %broadcast.splatinsert171, <4 x float> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert173 = insertelement <4 x float> poison, float %65, i64 0
  %broadcast.splat174 = shufflevector <4 x float> %broadcast.splatinsert173, <4 x float> poison, <4 x i32> zeroinitializer
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  %xtraiter = and i64 %wide.trip.count, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %66 = add nsw i64 %wide.trip.count, -1
  br label %.preheader136.us

.preheader136.us:                                 ; preds = %.preheader136.us.preheader, %._crit_edge.us
  %indvars.iv148 = phi i64 [ 0, %.preheader136.us.preheader ], [ %indvars.iv.next149, %._crit_edge.us ]
  %67 = getelementptr inbounds [32 x ptr], ptr %7, i64 0, i64 %indvars.iv148
  %68 = load ptr, ptr %67, align 8, !tbaa !13
  %69 = getelementptr inbounds [32 x ptr], ptr %64, i64 0, i64 %indvars.iv148
  %70 = load ptr, ptr %69, align 8, !tbaa !13
  %71 = getelementptr inbounds [32 x ptr], ptr %58, i64 0, i64 %indvars.iv148
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.preheader136.us
  %73 = ptrtoint ptr %72 to i64
  %74 = ptrtoint ptr %70 to i64
  %75 = ptrtoint ptr %68 to i64
  %76 = sub i64 %73, %75
  %diff.check = icmp ult i64 %76, 16
  %77 = sub i64 %73, %74
  %diff.check169 = icmp ult i64 %77, 16
  %conflict.rdx = or i1 %diff.check, %diff.check169
  br i1 %conflict.rdx, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.memcheck ]
  %78 = getelementptr inbounds float, ptr %68, i64 %index
  %wide.load = load <4 x float>, ptr %78, align 4, !tbaa !11
  %79 = getelementptr inbounds float, ptr %70, i64 %index
  %wide.load170 = load <4 x float>, ptr %79, align 4, !tbaa !11
  %80 = fmul <4 x float> %broadcast.splat, %wide.load170
  %81 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load, <4 x float> %broadcast.splat172, <4 x float> %80)
  %82 = fdiv <4 x float> %81, %broadcast.splat174
  %83 = getelementptr inbounds float, ptr %72, i64 %index
  store <4 x float> %82, ptr %83, align 4, !tbaa !11
  %index.next = add nuw i64 %index, 4
  %84 = icmp eq i64 %index.next, %n.vec
  br i1 %84, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.preheader136.us
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.preheader136.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %85 = getelementptr inbounds float, ptr %68, i64 %indvars.iv.ph
  %86 = load float, ptr %85, align 4, !tbaa !11
  %87 = getelementptr inbounds float, ptr %70, i64 %indvars.iv.ph
  %88 = load float, ptr %87, align 4, !tbaa !11
  %89 = fmul float %.0120, %88
  %90 = call float @llvm.fmuladd.f32(float %86, float %.0119, float %89)
  %91 = fdiv float %90, %65
  %92 = getelementptr inbounds float, ptr %72, i64 %indvars.iv.ph
  store float %91, ptr %92, align 4, !tbaa !11
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %93 = icmp eq i64 %indvars.iv.ph, %66
  br i1 %93, label %._crit_edge.us, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %94 = getelementptr inbounds float, ptr %68, i64 %indvars.iv
  %95 = load float, ptr %94, align 4, !tbaa !11
  %96 = getelementptr inbounds float, ptr %70, i64 %indvars.iv
  %97 = load float, ptr %96, align 4, !tbaa !11
  %98 = fmul float %.0120, %97
  %99 = call float @llvm.fmuladd.f32(float %95, float %.0119, float %98)
  %100 = fdiv float %99, %65
  %101 = getelementptr inbounds float, ptr %72, i64 %indvars.iv
  store float %100, ptr %101, align 4, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %102 = getelementptr inbounds float, ptr %68, i64 %indvars.iv.next
  %103 = load float, ptr %102, align 4, !tbaa !11
  %104 = getelementptr inbounds float, ptr %70, i64 %indvars.iv.next
  %105 = load float, ptr %104, align 4, !tbaa !11
  %106 = fmul float %.0120, %105
  %107 = call float @llvm.fmuladd.f32(float %103, float %.0119, float %106)
  %108 = fdiv float %107, %65
  %109 = getelementptr inbounds float, ptr %72, i64 %indvars.iv.next
  store float %108, ptr %109, align 4, !tbaa !11
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count
  br i1 %exitcond.not.1, label %._crit_edge.us, label %scalar.ph, !llvm.loop !19

._crit_edge.us:                                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151
  br i1 %exitcond152.not, label %.loopexit, label %.preheader136.us, !llvm.loop !20

.preheader135:                                    ; preds = %55
  br i1 %62, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %.preheader135
  %110 = icmp sgt i32 %., 0
  %111 = getelementptr inbounds i8, ptr %1, i64 8
  %112 = fadd float %.0120, %.0119
  br i1 %110, label %.preheader.us.preheader, label %.loopexit

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count161 = zext nneg i32 %61 to i64
  %wide.trip.count156 = zext nneg i32 %. to i64
  %113 = shl nuw nsw i64 %wide.trip.count156, 2
  %min.iters.check184 = icmp ult i32 %., 4
  %n.vec187 = and i64 %wide.trip.count156, 2147483644
  %broadcast.splatinsert196 = insertelement <4 x float> poison, float %.0119, i64 0
  %broadcast.splat197 = shufflevector <4 x float> %broadcast.splatinsert196, <4 x float> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert198 = insertelement <4 x float> poison, float %112, i64 0
  %broadcast.splat199 = shufflevector <4 x float> %broadcast.splatinsert198, <4 x float> poison, <4 x i32> zeroinitializer
  %cmp.n201 = icmp eq i64 %n.vec187, %wide.trip.count156
  %xtraiter203 = and i64 %wide.trip.count156, 1
  %lcmp.mod204.not = icmp eq i64 %xtraiter203, 0
  %114 = add nsw i64 %wide.trip.count156, -1
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us143
  %indvars.iv158 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next159, %._crit_edge.us143 ]
  %115 = getelementptr inbounds [32 x ptr], ptr %7, i64 0, i64 %indvars.iv158
  %116 = load ptr, ptr %115, align 8, !tbaa !13
  %117 = getelementptr inbounds [32 x ptr], ptr %111, i64 0, i64 %indvars.iv158
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = getelementptr inbounds [32 x ptr], ptr %58, i64 0, i64 %indvars.iv158
  %120 = load ptr, ptr %119, align 8, !tbaa !13
  br i1 %min.iters.check184, label %scalar.ph183.preheader, label %vector.memcheck175

vector.memcheck175:                               ; preds = %.preheader.us
  %scevgep = getelementptr i8, ptr %120, i64 %113
  %scevgep176 = getelementptr i8, ptr %116, i64 %113
  %scevgep177 = getelementptr i8, ptr %118, i64 4
  %bound0 = icmp ult ptr %120, %scevgep176
  %bound1 = icmp ult ptr %116, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound0178 = icmp ult ptr %120, %scevgep177
  %bound1179 = icmp ult ptr %118, %scevgep
  %found.conflict180 = and i1 %bound0178, %bound1179
  %conflict.rdx181 = or i1 %found.conflict, %found.conflict180
  br i1 %conflict.rdx181, label %scalar.ph183.preheader, label %vector.ph185

vector.ph185:                                     ; preds = %vector.memcheck175
  %121 = load float, ptr %118, align 4, !tbaa !11, !alias.scope !21
  %.scalar = fmul float %.0120, %121
  %122 = insertelement <4 x float> poison, float %.scalar, i64 0
  %123 = shufflevector <4 x float> %122, <4 x float> poison, <4 x i32> zeroinitializer
  br label %vector.body189

vector.body189:                                   ; preds = %vector.body189, %vector.ph185
  %index190 = phi i64 [ 0, %vector.ph185 ], [ %index.next200, %vector.body189 ]
  %124 = getelementptr inbounds float, ptr %116, i64 %index190
  %wide.load191 = load <4 x float>, ptr %124, align 4, !tbaa !11, !alias.scope !24
  %125 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load191, <4 x float> %broadcast.splat197, <4 x float> %123)
  %126 = fdiv <4 x float> %125, %broadcast.splat199
  %127 = getelementptr inbounds float, ptr %120, i64 %index190
  store <4 x float> %126, ptr %127, align 4, !tbaa !11, !alias.scope !26, !noalias !28
  %index.next200 = add nuw i64 %index190, 4
  %128 = icmp eq i64 %index.next200, %n.vec187
  br i1 %128, label %middle.block182, label %vector.body189, !llvm.loop !29

middle.block182:                                  ; preds = %vector.body189
  br i1 %cmp.n201, label %._crit_edge.us143, label %scalar.ph183.preheader

scalar.ph183.preheader:                           ; preds = %middle.block182, %vector.memcheck175, %.preheader.us
  %indvars.iv153.ph = phi i64 [ 0, %vector.memcheck175 ], [ 0, %.preheader.us ], [ %n.vec187, %middle.block182 ]
  br i1 %lcmp.mod204.not, label %scalar.ph183.prol.loopexit, label %scalar.ph183.prol

scalar.ph183.prol:                                ; preds = %scalar.ph183.preheader
  %129 = getelementptr inbounds float, ptr %116, i64 %indvars.iv153.ph
  %130 = load float, ptr %129, align 4, !tbaa !11
  %131 = load float, ptr %118, align 4, !tbaa !11
  %132 = fmul float %.0120, %131
  %133 = call float @llvm.fmuladd.f32(float %130, float %.0119, float %132)
  %134 = fdiv float %133, %112
  %135 = getelementptr inbounds float, ptr %120, i64 %indvars.iv153.ph
  store float %134, ptr %135, align 4, !tbaa !11
  %indvars.iv.next154.prol = or disjoint i64 %indvars.iv153.ph, 1
  br label %scalar.ph183.prol.loopexit

scalar.ph183.prol.loopexit:                       ; preds = %scalar.ph183.prol, %scalar.ph183.preheader
  %indvars.iv153.unr = phi i64 [ %indvars.iv153.ph, %scalar.ph183.preheader ], [ %indvars.iv.next154.prol, %scalar.ph183.prol ]
  %136 = icmp eq i64 %indvars.iv153.ph, %114
  br i1 %136, label %._crit_edge.us143, label %scalar.ph183

scalar.ph183:                                     ; preds = %scalar.ph183.prol.loopexit, %scalar.ph183
  %indvars.iv153 = phi i64 [ %indvars.iv.next154.1, %scalar.ph183 ], [ %indvars.iv153.unr, %scalar.ph183.prol.loopexit ]
  %137 = getelementptr inbounds float, ptr %116, i64 %indvars.iv153
  %138 = load float, ptr %137, align 4, !tbaa !11
  %139 = load float, ptr %118, align 4, !tbaa !11
  %140 = fmul float %.0120, %139
  %141 = call float @llvm.fmuladd.f32(float %138, float %.0119, float %140)
  %142 = fdiv float %141, %112
  %143 = getelementptr inbounds float, ptr %120, i64 %indvars.iv153
  store float %142, ptr %143, align 4, !tbaa !11
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %144 = getelementptr inbounds float, ptr %116, i64 %indvars.iv.next154
  %145 = load float, ptr %144, align 4, !tbaa !11
  %146 = load float, ptr %118, align 4, !tbaa !11
  %147 = fmul float %.0120, %146
  %148 = call float @llvm.fmuladd.f32(float %145, float %.0119, float %147)
  %149 = fdiv float %148, %112
  %150 = getelementptr inbounds float, ptr %120, i64 %indvars.iv.next154
  store float %149, ptr %150, align 4, !tbaa !11
  %indvars.iv.next154.1 = add nuw nsw i64 %indvars.iv153, 2
  %exitcond157.not.1 = icmp eq i64 %indvars.iv.next154.1, %wide.trip.count156
  br i1 %exitcond157.not.1, label %._crit_edge.us143, label %scalar.ph183, !llvm.loop !30

._crit_edge.us143:                                ; preds = %scalar.ph183.prol.loopexit, %scalar.ph183, %middle.block182
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next159, %wide.trip.count161
  br i1 %exitcond162.not, label %.loopexit, label %.preheader.us, !llvm.loop !31

.loopexit:                                        ; preds = %._crit_edge.us, %._crit_edge.us143, %.preheader.lr.ph, %.preheader136.lr.ph, %.preheader137, %.preheader135
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %151

151:                                              ; preds = %.loopexit, %38
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #4

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

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

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass