; LLVM IR from jgaeddert/liquid-dsp :: src/matrix/src (matrix)

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

@.str.3 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @matrix_cgsolve(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca i32, align 4
  %33 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %5
  %37 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.3, i32 noundef 53, ptr noundef @.str.4)
  store i32 %37, ptr %6, align 4
  br label %293

38:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = mul i32 4, %39
  store i32 %40, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store double 0x3EB0C6F7A0B5ED8D, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = call ptr @llvm.stacksave.p0()
  store ptr %43, ptr %15, align 8
  %44 = alloca double, i64 %42, align 16
  store i64 %42, ptr %16, align 8
  %45 = load i32, ptr %8, align 4, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = alloca double, i64 %46, align 16
  store i64 %46, ptr %17, align 8
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = alloca double, i64 %49, align 16
  store i64 %49, ptr %18, align 8
  %51 = load i32, ptr %8, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = alloca double, i64 %52, align 16
  store i64 %52, ptr %19, align 8
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  %56 = alloca double, i64 %55, align 16
  store i64 %55, ptr %20, align 8
  %57 = load i32, ptr %8, align 4, !tbaa !9
  %58 = zext i32 %57 to i64
  %59 = alloca double, i64 %58, align 16
  store i64 %58, ptr %21, align 8
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = alloca double, i64 %61, align 16
  store i64 %61, ptr %22, align 8
  %63 = load i32, ptr %8, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = alloca double, i64 %64, align 16
  store i64 %64, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store double 0.000000e+00, ptr %31, align 8, !tbaa !11
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %74, %38
  %67 = load i32, ptr %14, align 4, !tbaa !9
  %68 = load i32, ptr %8, align 4, !tbaa !9
  %69 = icmp ult i32 %67, %68
  br i1 %69, label %70, label %77

70:                                               ; preds = %66
  %71 = load i32, ptr %14, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds double, ptr %44, i64 %72
  store double 0.000000e+00, ptr %73, align 8, !tbaa !11
  br label %74

74:                                               ; preds = %70
  %75 = load i32, ptr %14, align 4, !tbaa !9
  %76 = add i32 %75, 1
  store i32 %76, ptr %14, align 4, !tbaa !9
  br label %66, !llvm.loop !13

77:                                               ; preds = %66
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %91, %77
  %79 = load i32, ptr %14, align 4, !tbaa !9
  %80 = load i32, ptr %8, align 4, !tbaa !9
  %81 = icmp ult i32 %79, %80
  br i1 %81, label %82, label %94

82:                                               ; preds = %78
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = load i32, ptr %14, align 4, !tbaa !9
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !11
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %50, i64 %89
  store double %87, ptr %90, align 8, !tbaa !11
  br label %91

91:                                               ; preds = %82
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = add i32 %92, 1
  store i32 %93, ptr %14, align 4, !tbaa !9
  br label %78, !llvm.loop !15

94:                                               ; preds = %78
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = mul i64 %96, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 16 %56, ptr align 16 %50, i64 %97, i1 false)
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = call i32 @matrix_transpose_mul(ptr noundef %98, i32 noundef %99, i32 noundef 1, ptr noundef %24)
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = call i32 @matrix_transpose_mul(ptr noundef %56, i32 noundef %101, i32 noundef 1, ptr noundef %25)
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = load i32, ptr %8, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = mul i64 %105, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 8 %103, ptr align 16 %44, i64 %106, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %278, %94
  %108 = load i32, ptr %32, align 4, !tbaa !9
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = icmp ult i32 %108, %109
  br i1 %110, label %111, label %119

111:                                              ; preds = %107
  %112 = load double, ptr %25, align 8, !tbaa !11
  %113 = load double, ptr %13, align 8, !tbaa !11
  %114 = load double, ptr %13, align 8, !tbaa !11
  %115 = fmul double %113, %114
  %116 = load double, ptr %24, align 8, !tbaa !11
  %117 = fmul double %115, %116
  %118 = fcmp ogt double %112, %117
  br label %119

119:                                              ; preds = %111, %107
  %120 = phi i1 [ false, %107 ], [ %118, %111 ]
  br i1 %120, label %121, label %291

121:                                              ; preds = %119
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = load i32, ptr %8, align 4, !tbaa !9
  %124 = load i32, ptr %8, align 4, !tbaa !9
  %125 = load i32, ptr %8, align 4, !tbaa !9
  %126 = load i32, ptr %8, align 4, !tbaa !9
  %127 = call i32 @matrix_mul(ptr noundef %122, i32 noundef %123, i32 noundef %124, ptr noundef %50, i32 noundef %125, i32 noundef 1, ptr noundef %62, i32 noundef %126, i32 noundef 1)
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %146, %121
  %129 = load i32, ptr %14, align 4, !tbaa !9
  %130 = load i32, ptr %8, align 4, !tbaa !9
  %131 = icmp ult i32 %129, %130
  br i1 %131, label %132, label %149

132:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %133 = load i32, ptr %14, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds double, ptr %50, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !11
  %137 = load i32, ptr %14, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %62, i64 %138
  %140 = load double, ptr %139, align 8, !tbaa !11
  %141 = fmul double %136, %140
  %142 = fmul double -0.000000e+00, %140
  store double %141, ptr %33, align 8, !tbaa !11
  %143 = load double, ptr %33, align 8, !tbaa !11
  %144 = load double, ptr %27, align 8, !tbaa !11
  %145 = fadd double %144, %143
  store double %145, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %146

146:                                              ; preds = %132
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = add i32 %147, 1
  store i32 %148, ptr %14, align 4, !tbaa !9
  br label %128, !llvm.loop !16

149:                                              ; preds = %128
  %150 = load double, ptr %25, align 8, !tbaa !11
  %151 = load double, ptr %27, align 8, !tbaa !11
  %152 = fdiv double %150, %151
  store double %152, ptr %28, align 8, !tbaa !11
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %171, %149
  %154 = load i32, ptr %14, align 4, !tbaa !9
  %155 = load i32, ptr %8, align 4, !tbaa !9
  %156 = icmp ult i32 %154, %155
  br i1 %156, label %157, label %174

157:                                              ; preds = %153
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = zext i32 %158 to i64
  %160 = getelementptr inbounds double, ptr %44, i64 %159
  %161 = load double, ptr %160, align 8, !tbaa !11
  %162 = load double, ptr %28, align 8, !tbaa !11
  %163 = load i32, ptr %14, align 4, !tbaa !9
  %164 = zext i32 %163 to i64
  %165 = getelementptr inbounds double, ptr %50, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !11
  %167 = call double @llvm.fmuladd.f64(double %162, double %166, double %161)
  %168 = load i32, ptr %14, align 4, !tbaa !9
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds double, ptr %47, i64 %169
  store double %167, ptr %170, align 8, !tbaa !11
  br label %171

171:                                              ; preds = %157
  %172 = load i32, ptr %14, align 4, !tbaa !9
  %173 = add i32 %172, 1
  store i32 %173, ptr %14, align 4, !tbaa !9
  br label %153, !llvm.loop !17

174:                                              ; preds = %153
  %175 = load i32, ptr %32, align 4, !tbaa !9
  %176 = add i32 %175, 1
  %177 = urem i32 %176, 50
  %178 = icmp eq i32 %177, 0
  br i1 %178, label %179, label %208

179:                                              ; preds = %174
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = load i32, ptr %8, align 4, !tbaa !9
  %182 = load i32, ptr %8, align 4, !tbaa !9
  %183 = load i32, ptr %8, align 4, !tbaa !9
  %184 = load i32, ptr %8, align 4, !tbaa !9
  %185 = call i32 @matrix_mul(ptr noundef %180, i32 noundef %181, i32 noundef %182, ptr noundef %47, i32 noundef %183, i32 noundef 1, ptr noundef %65, i32 noundef %184, i32 noundef 1)
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %204, %179
  %187 = load i32, ptr %14, align 4, !tbaa !9
  %188 = load i32, ptr %8, align 4, !tbaa !9
  %189 = icmp ult i32 %187, %188
  br i1 %189, label %190, label %207

190:                                              ; preds = %186
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  %192 = load i32, ptr %14, align 4, !tbaa !9
  %193 = zext i32 %192 to i64
  %194 = getelementptr inbounds double, ptr %191, i64 %193
  %195 = load double, ptr %194, align 8, !tbaa !11
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds double, ptr %65, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !11
  %200 = fsub double %195, %199
  %201 = load i32, ptr %14, align 4, !tbaa !9
  %202 = zext i32 %201 to i64
  %203 = getelementptr inbounds double, ptr %59, i64 %202
  store double %200, ptr %203, align 8, !tbaa !11
  br label %204

204:                                              ; preds = %190
  %205 = load i32, ptr %14, align 4, !tbaa !9
  %206 = add i32 %205, 1
  store i32 %206, ptr %14, align 4, !tbaa !9
  br label %186, !llvm.loop !18

207:                                              ; preds = %186
  br label %232

208:                                              ; preds = %174
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %209

209:                                              ; preds = %228, %208
  %210 = load i32, ptr %14, align 4, !tbaa !9
  %211 = load i32, ptr %8, align 4, !tbaa !9
  %212 = icmp ult i32 %210, %211
  br i1 %212, label %213, label %231

213:                                              ; preds = %209
  %214 = load i32, ptr %14, align 4, !tbaa !9
  %215 = zext i32 %214 to i64
  %216 = getelementptr inbounds double, ptr %56, i64 %215
  %217 = load double, ptr %216, align 8, !tbaa !11
  %218 = load double, ptr %28, align 8, !tbaa !11
  %219 = load i32, ptr %14, align 4, !tbaa !9
  %220 = zext i32 %219 to i64
  %221 = getelementptr inbounds double, ptr %62, i64 %220
  %222 = load double, ptr %221, align 8, !tbaa !11
  %223 = fneg double %218
  %224 = call double @llvm.fmuladd.f64(double %223, double %222, double %217)
  %225 = load i32, ptr %14, align 4, !tbaa !9
  %226 = zext i32 %225 to i64
  %227 = getelementptr inbounds double, ptr %59, i64 %226
  store double %224, ptr %227, align 8, !tbaa !11
  br label %228

228:                                              ; preds = %213
  %229 = load i32, ptr %14, align 4, !tbaa !9
  %230 = add i32 %229, 1
  store i32 %230, ptr %14, align 4, !tbaa !9
  br label %209, !llvm.loop !19

231:                                              ; preds = %209
  br label %232

232:                                              ; preds = %231, %207
  %233 = load i32, ptr %8, align 4, !tbaa !9
  %234 = call i32 @matrix_transpose_mul(ptr noundef %59, i32 noundef %233, i32 noundef 1, ptr noundef %26)
  %235 = load double, ptr %26, align 8, !tbaa !11
  %236 = load double, ptr %25, align 8, !tbaa !11
  %237 = fdiv double %235, %236
  store double %237, ptr %29, align 8, !tbaa !11
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %238

238:                                              ; preds = %256, %232
  %239 = load i32, ptr %14, align 4, !tbaa !9
  %240 = load i32, ptr %8, align 4, !tbaa !9
  %241 = icmp ult i32 %239, %240
  br i1 %241, label %242, label %259

242:                                              ; preds = %238
  %243 = load i32, ptr %14, align 4, !tbaa !9
  %244 = zext i32 %243 to i64
  %245 = getelementptr inbounds double, ptr %59, i64 %244
  %246 = load double, ptr %245, align 8, !tbaa !11
  %247 = load double, ptr %29, align 8, !tbaa !11
  %248 = load i32, ptr %14, align 4, !tbaa !9
  %249 = zext i32 %248 to i64
  %250 = getelementptr inbounds double, ptr %50, i64 %249
  %251 = load double, ptr %250, align 8, !tbaa !11
  %252 = call double @llvm.fmuladd.f64(double %247, double %251, double %246)
  %253 = load i32, ptr %14, align 4, !tbaa !9
  %254 = zext i32 %253 to i64
  %255 = getelementptr inbounds double, ptr %53, i64 %254
  store double %252, ptr %255, align 8, !tbaa !11
  br label %256

256:                                              ; preds = %242
  %257 = load i32, ptr %14, align 4, !tbaa !9
  %258 = add i32 %257, 1
  store i32 %258, ptr %14, align 4, !tbaa !9
  br label %238, !llvm.loop !20

259:                                              ; preds = %238
  %260 = load double, ptr %26, align 8, !tbaa !11
  %261 = call double @llvm.fabs.f64(double %260)
  %262 = load double, ptr %24, align 8, !tbaa !11
  %263 = call double @llvm.fabs.f64(double %262)
  %264 = fdiv double %261, %263
  %265 = call double @sqrt(double noundef %264) #7
  store double %265, ptr %30, align 8, !tbaa !11
  %266 = load i32, ptr %32, align 4, !tbaa !9
  %267 = icmp eq i32 %266, 0
  br i1 %267, label %272, label %268

268:                                              ; preds = %259
  %269 = load double, ptr %30, align 8, !tbaa !11
  %270 = load double, ptr %31, align 8, !tbaa !11
  %271 = fcmp olt double %269, %270
  br i1 %271, label %272, label %278

272:                                              ; preds = %268, %259
  %273 = load double, ptr %30, align 8, !tbaa !11
  store double %273, ptr %31, align 8, !tbaa !11
  %274 = load ptr, ptr %10, align 8, !tbaa !5
  %275 = load i32, ptr %8, align 4, !tbaa !9
  %276 = zext i32 %275 to i64
  %277 = mul i64 %276, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 8 %274, ptr align 16 %47, i64 %277, i1 false)
  br label %278

278:                                              ; preds = %272, %268
  %279 = load i32, ptr %8, align 4, !tbaa !9
  %280 = zext i32 %279 to i64
  %281 = mul i64 %280, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 16 %44, ptr align 16 %47, i64 %281, i1 false)
  %282 = load i32, ptr %8, align 4, !tbaa !9
  %283 = zext i32 %282 to i64
  %284 = mul i64 %283, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 16 %50, ptr align 16 %53, i64 %284, i1 false)
  %285 = load i32, ptr %8, align 4, !tbaa !9
  %286 = zext i32 %285 to i64
  %287 = mul i64 %286, 8
  call void @llvm.memmove.p0.p0.i64(ptr align 16 %56, ptr align 16 %59, i64 %287, i1 false)
  %288 = load double, ptr %26, align 8, !tbaa !11
  store double %288, ptr %25, align 8, !tbaa !11
  %289 = load i32, ptr %32, align 4, !tbaa !9
  %290 = add i32 %289, 1
  store i32 %290, ptr %32, align 4, !tbaa !9
  br label %107, !llvm.loop !21

291:                                              ; preds = %119
  store i32 0, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  %292 = load ptr, ptr %15, align 8
  call void @llvm.stackrestore.p0(ptr %292)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %293

293:                                              ; preds = %291, %36
  %294 = load i32, ptr %6, align 4
  ret i32 %294
}

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @matrix_transpose_mul(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @matrix_mul(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: nounwind
declare double @sqrt(double noundef) #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

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

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


; 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.3 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @matrix_cgsolve(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef readnone %4) local_unnamed_addr #1 {
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = icmp eq i32 %1, 0
  br i1 %9, label %10, label %._crit_edge

10:                                               ; preds = %5
  %11 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.3, i32 noundef 53, ptr noundef nonnull @.str.4) #8
  br label %142

._crit_edge:                                      ; preds = %5
  %12 = zext i32 %1 to i64
  %13 = tail call ptr @llvm.stacksave.p0()
  %14 = alloca double, i64 %12, align 16
  %15 = alloca double, i64 %12, align 16
  %16 = alloca double, i64 %12, align 16
  %17 = alloca double, i64 %12, align 16
  %18 = alloca double, i64 %12, align 16
  %19 = alloca double, i64 %12, align 16
  %20 = alloca double, i64 %12, align 16
  %21 = alloca double, i64 %12, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %22 = shl nuw nsw i64 %12, 3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %14, i8 0, i64 %22, i1 false), !tbaa !5
  %23 = shl i32 %1, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %16, ptr align 8 %2, i64 %22, i1 false), !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %18, ptr align 8 %2, i64 %22, i1 false)
  %24 = call i32 @matrix_transpose_mul(ptr noundef %2, i32 noundef %1, i32 noundef 1, ptr noundef nonnull %6)
  %25 = call i32 @matrix_transpose_mul(ptr noundef nonnull %18, i32 noundef %1, i32 noundef 1, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 %22, i1 false)
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %.critedge, label %.lr.ph120

.lr.ph120:                                        ; preds = %._crit_edge
  %.pre = load double, ptr %7, align 8, !tbaa !5
  %.pre151 = load double, ptr %6, align 8, !tbaa !5
  %wide.trip.count = zext i32 %1 to i64
  %wide.trip.count130 = zext i32 %1 to i64
  %wide.trip.count136 = zext i32 %1 to i64
  %wide.trip.count142 = zext i32 %1 to i64
  %wide.trip.count148 = zext i32 %1 to i64
  %26 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 3
  %27 = icmp ult i64 %26, 3
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %min.iters.check191 = icmp ult i32 %1, 4
  %n.vec194 = and i64 %wide.trip.count, 4294967292
  %cmp.n205 = icmp eq i64 %n.vec194, %wide.trip.count
  %min.iters.check159 = icmp ult i32 %1, 4
  %n.vec177 = and i64 %wide.trip.count, 4294967292
  %cmp.n188 = icmp eq i64 %n.vec177, %wide.trip.count
  %n.vec162 = and i64 %wide.trip.count, 4294967292
  %cmp.n171 = icmp eq i64 %n.vec162, %wide.trip.count
  %min.iters.check = icmp ult i32 %1, 4
  %n.vec = and i64 %wide.trip.count, 4294967292
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %28

28:                                               ; preds = %.lr.ph120, %141
  %29 = phi double [ %.pre151, %.lr.ph120 ], [ %135, %141 ]
  %30 = phi double [ %.pre, %.lr.ph120 ], [ %117, %141 ]
  %.089118 = phi i32 [ 0, %.lr.ph120 ], [ %81, %141 ]
  %.090117 = phi double [ 0.000000e+00, %.lr.ph120 ], [ %.1, %141 ]
  %31 = fmul double %29, 0x3D719799812DEA11
  %32 = fcmp ogt double %30, %31
  br i1 %32, label %.lr.ph102.preheader, label %.critedge

.lr.ph102.preheader:                              ; preds = %28
  %33 = call i32 @matrix_mul(ptr noundef %0, i32 noundef %1, i32 noundef %1, ptr noundef nonnull %16, i32 noundef %1, i32 noundef 1, ptr noundef nonnull %20, i32 noundef %1, i32 noundef 1)
  br i1 %27, label %.lr.ph106.preheader.unr-lcssa, label %.lr.ph102

.lr.ph102:                                        ; preds = %.lr.ph102.preheader, %.lr.ph102
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph102 ], [ 0, %.lr.ph102.preheader ]
  %.09399 = phi double [ %57, %.lr.ph102 ], [ 0.000000e+00, %.lr.ph102.preheader ]
  %niter = phi i64 [ %niter.next.3, %.lr.ph102 ], [ 0, %.lr.ph102.preheader ]
  %34 = getelementptr inbounds double, ptr %16, i64 %indvars.iv
  %35 = load double, ptr %34, align 16, !tbaa !5
  %36 = getelementptr inbounds double, ptr %20, i64 %indvars.iv
  %37 = load double, ptr %36, align 16, !tbaa !5
  %38 = fmul double %35, %37
  %39 = fadd double %.09399, %38
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %40 = getelementptr inbounds double, ptr %16, i64 %indvars.iv.next
  %41 = load double, ptr %40, align 8, !tbaa !5
  %42 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = fmul double %41, %43
  %45 = fadd double %39, %44
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %46 = getelementptr inbounds double, ptr %16, i64 %indvars.iv.next.1
  %47 = load double, ptr %46, align 16, !tbaa !5
  %48 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next.1
  %49 = load double, ptr %48, align 16, !tbaa !5
  %50 = fmul double %47, %49
  %51 = fadd double %45, %50
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %52 = getelementptr inbounds double, ptr %16, i64 %indvars.iv.next.2
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.next.2
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = fmul double %53, %55
  %57 = fadd double %51, %56
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.lr.ph106.preheader.unr-lcssa, label %.lr.ph102, !llvm.loop !9

.lr.ph106.preheader.unr-lcssa:                    ; preds = %.lr.ph102, %.lr.ph102.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph102.preheader ], [ %57, %.lr.ph102 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph102.preheader ], [ %indvars.iv.next.3, %.lr.ph102 ]
  %.09399.unr = phi double [ 0.000000e+00, %.lr.ph102.preheader ], [ %57, %.lr.ph102 ]
  br i1 %lcmp.mod.not, label %.lr.ph106.preheader, label %.lr.ph102.epil

.lr.ph102.epil:                                   ; preds = %.lr.ph106.preheader.unr-lcssa, %.lr.ph102.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph102.epil ], [ %indvars.iv.unr, %.lr.ph106.preheader.unr-lcssa ]
  %.09399.epil = phi double [ %63, %.lr.ph102.epil ], [ %.09399.unr, %.lr.ph106.preheader.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph102.epil ], [ 0, %.lr.ph106.preheader.unr-lcssa ]
  %58 = getelementptr inbounds double, ptr %16, i64 %indvars.iv.epil
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = getelementptr inbounds double, ptr %20, i64 %indvars.iv.epil
  %61 = load double, ptr %60, align 8, !tbaa !5
  %62 = fmul double %59, %61
  %63 = fadd double %.09399.epil, %62
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.lr.ph106.preheader, label %.lr.ph102.epil, !llvm.loop !11

.lr.ph106.preheader:                              ; preds = %.lr.ph102.epil, %.lr.ph106.preheader.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %.lr.ph106.preheader.unr-lcssa ], [ %63, %.lr.ph102.epil ]
  %64 = load double, ptr %7, align 8, !tbaa !5
  %65 = fdiv double %64, %.lcssa
  br i1 %min.iters.check191, label %.lr.ph106.preheader209, label %vector.ph192

vector.ph192:                                     ; preds = %.lr.ph106.preheader
  %broadcast.splatinsert202 = insertelement <2 x double> poison, double %65, i64 0
  %broadcast.splat203 = shufflevector <2 x double> %broadcast.splatinsert202, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body196

vector.body196:                                   ; preds = %vector.body196, %vector.ph192
  %index197 = phi i64 [ 0, %vector.ph192 ], [ %index.next204, %vector.body196 ]
  %66 = getelementptr inbounds double, ptr %14, i64 %index197
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %wide.load198 = load <2 x double>, ptr %66, align 16, !tbaa !5
  %wide.load199 = load <2 x double>, ptr %67, align 16, !tbaa !5
  %68 = getelementptr inbounds double, ptr %16, i64 %index197
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  %wide.load200 = load <2 x double>, ptr %68, align 16, !tbaa !5
  %wide.load201 = load <2 x double>, ptr %69, align 16, !tbaa !5
  %70 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat203, <2 x double> %wide.load200, <2 x double> %wide.load198)
  %71 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat203, <2 x double> %wide.load201, <2 x double> %wide.load199)
  %72 = getelementptr inbounds double, ptr %15, i64 %index197
  %73 = getelementptr inbounds i8, ptr %72, i64 16
  store <2 x double> %70, ptr %72, align 16, !tbaa !5
  store <2 x double> %71, ptr %73, align 16, !tbaa !5
  %index.next204 = add nuw i64 %index197, 4
  %74 = icmp eq i64 %index.next204, %n.vec194
  br i1 %74, label %middle.block189, label %vector.body196, !llvm.loop !13

middle.block189:                                  ; preds = %vector.body196
  br i1 %cmp.n205, label %._crit_edge107, label %.lr.ph106.preheader209

.lr.ph106.preheader209:                           ; preds = %middle.block189, %.lr.ph106.preheader
  %indvars.iv126.ph = phi i64 [ 0, %.lr.ph106.preheader ], [ %n.vec194, %middle.block189 ]
  br label %.lr.ph106

.lr.ph106:                                        ; preds = %.lr.ph106.preheader209, %.lr.ph106
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %.lr.ph106 ], [ %indvars.iv126.ph, %.lr.ph106.preheader209 ]
  %75 = getelementptr inbounds double, ptr %14, i64 %indvars.iv126
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = getelementptr inbounds double, ptr %16, i64 %indvars.iv126
  %78 = load double, ptr %77, align 8, !tbaa !5
  %79 = call double @llvm.fmuladd.f64(double %65, double %78, double %76)
  %80 = getelementptr inbounds double, ptr %15, i64 %indvars.iv126
  store double %79, ptr %80, align 8, !tbaa !5
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next127, %wide.trip.count130
  br i1 %exitcond131.not, label %._crit_edge107, label %.lr.ph106, !llvm.loop !16

._crit_edge107:                                   ; preds = %.lr.ph106, %middle.block189
  %81 = add nuw i32 %.089118, 1
  %82 = urem i32 %81, 50
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %.lr.ph112.preheader, label %.lr.ph109

.lr.ph109:                                        ; preds = %._crit_edge107
  %84 = fneg double %65
  br i1 %min.iters.check159, label %scalar.ph173.preheader, label %vector.ph175

scalar.ph173.preheader:                           ; preds = %middle.block172, %.lr.ph109
  %indvars.iv132.ph = phi i64 [ 0, %.lr.ph109 ], [ %n.vec177, %middle.block172 ]
  br label %scalar.ph173

vector.ph175:                                     ; preds = %.lr.ph109
  %broadcast.splatinsert185 = insertelement <2 x double> poison, double %84, i64 0
  %broadcast.splat186 = shufflevector <2 x double> %broadcast.splatinsert185, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body179

vector.body179:                                   ; preds = %vector.body179, %vector.ph175
  %index180 = phi i64 [ 0, %vector.ph175 ], [ %index.next187, %vector.body179 ]
  %85 = getelementptr inbounds double, ptr %18, i64 %index180
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  %wide.load181 = load <2 x double>, ptr %85, align 16, !tbaa !5
  %wide.load182 = load <2 x double>, ptr %86, align 16, !tbaa !5
  %87 = getelementptr inbounds double, ptr %20, i64 %index180
  %88 = getelementptr inbounds i8, ptr %87, i64 16
  %wide.load183 = load <2 x double>, ptr %87, align 16, !tbaa !5
  %wide.load184 = load <2 x double>, ptr %88, align 16, !tbaa !5
  %89 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat186, <2 x double> %wide.load183, <2 x double> %wide.load181)
  %90 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat186, <2 x double> %wide.load184, <2 x double> %wide.load182)
  %91 = getelementptr inbounds double, ptr %19, i64 %index180
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  store <2 x double> %89, ptr %91, align 16, !tbaa !5
  store <2 x double> %90, ptr %92, align 16, !tbaa !5
  %index.next187 = add nuw i64 %index180, 4
  %93 = icmp eq i64 %index.next187, %n.vec177
  br i1 %93, label %middle.block172, label %vector.body179, !llvm.loop !17

middle.block172:                                  ; preds = %vector.body179
  br i1 %cmp.n188, label %.lr.ph115.preheader, label %scalar.ph173.preheader

.lr.ph112.preheader:                              ; preds = %._crit_edge107
  %94 = call i32 @matrix_mul(ptr noundef %0, i32 noundef %1, i32 noundef %1, ptr noundef nonnull %15, i32 noundef %1, i32 noundef 1, ptr noundef nonnull %21, i32 noundef %1, i32 noundef 1)
  br i1 %min.iters.check159, label %.lr.ph112.preheader207, label %vector.body164

vector.body164:                                   ; preds = %.lr.ph112.preheader, %vector.body164
  %index165 = phi i64 [ %index.next170, %vector.body164 ], [ 0, %.lr.ph112.preheader ]
  %95 = getelementptr inbounds double, ptr %2, i64 %index165
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  %wide.load166 = load <2 x double>, ptr %95, align 8, !tbaa !5
  %wide.load167 = load <2 x double>, ptr %96, align 8, !tbaa !5
  %97 = getelementptr inbounds double, ptr %21, i64 %index165
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  %wide.load168 = load <2 x double>, ptr %97, align 16, !tbaa !5
  %wide.load169 = load <2 x double>, ptr %98, align 16, !tbaa !5
  %99 = fsub <2 x double> %wide.load166, %wide.load168
  %100 = fsub <2 x double> %wide.load167, %wide.load169
  %101 = getelementptr inbounds double, ptr %19, i64 %index165
  %102 = getelementptr inbounds i8, ptr %101, i64 16
  store <2 x double> %99, ptr %101, align 16, !tbaa !5
  store <2 x double> %100, ptr %102, align 16, !tbaa !5
  %index.next170 = add nuw i64 %index165, 4
  %103 = icmp eq i64 %index.next170, %n.vec162
  br i1 %103, label %middle.block157, label %vector.body164, !llvm.loop !18

middle.block157:                                  ; preds = %vector.body164
  br i1 %cmp.n171, label %.lr.ph115.preheader, label %.lr.ph112.preheader207

.lr.ph112.preheader207:                           ; preds = %middle.block157, %.lr.ph112.preheader
  %indvars.iv138.ph = phi i64 [ 0, %.lr.ph112.preheader ], [ %n.vec162, %middle.block157 ]
  br label %.lr.ph112

.lr.ph112:                                        ; preds = %.lr.ph112.preheader207, %.lr.ph112
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %.lr.ph112 ], [ %indvars.iv138.ph, %.lr.ph112.preheader207 ]
  %104 = getelementptr inbounds double, ptr %2, i64 %indvars.iv138
  %105 = load double, ptr %104, align 8, !tbaa !5
  %106 = getelementptr inbounds double, ptr %21, i64 %indvars.iv138
  %107 = load double, ptr %106, align 8, !tbaa !5
  %108 = fsub double %105, %107
  %109 = getelementptr inbounds double, ptr %19, i64 %indvars.iv138
  store double %108, ptr %109, align 8, !tbaa !5
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond143.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count142
  br i1 %exitcond143.not, label %.lr.ph115.preheader, label %.lr.ph112, !llvm.loop !19

scalar.ph173:                                     ; preds = %scalar.ph173.preheader, %scalar.ph173
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %scalar.ph173 ], [ %indvars.iv132.ph, %scalar.ph173.preheader ]
  %110 = getelementptr inbounds double, ptr %18, i64 %indvars.iv132
  %111 = load double, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds double, ptr %20, i64 %indvars.iv132
  %113 = load double, ptr %112, align 8, !tbaa !5
  %114 = call double @llvm.fmuladd.f64(double %84, double %113, double %111)
  %115 = getelementptr inbounds double, ptr %19, i64 %indvars.iv132
  store double %114, ptr %115, align 8, !tbaa !5
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %exitcond137.not = icmp eq i64 %indvars.iv.next133, %wide.trip.count136
  br i1 %exitcond137.not, label %.lr.ph115.preheader, label %scalar.ph173, !llvm.loop !20

.lr.ph115.preheader:                              ; preds = %scalar.ph173, %.lr.ph112, %middle.block172, %middle.block157
  %116 = call i32 @matrix_transpose_mul(ptr noundef nonnull %19, i32 noundef %1, i32 noundef 1, ptr noundef nonnull %8)
  %117 = load double, ptr %8, align 8, !tbaa !5
  %118 = load double, ptr %7, align 8, !tbaa !5
  %119 = fdiv double %117, %118
  br i1 %min.iters.check, label %.lr.ph115.preheader206, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph115.preheader
  %broadcast.splatinsert = insertelement <2 x double> poison, double %119, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %120 = getelementptr inbounds double, ptr %19, i64 %index
  %121 = getelementptr inbounds i8, ptr %120, i64 16
  %wide.load = load <2 x double>, ptr %120, align 16, !tbaa !5
  %wide.load154 = load <2 x double>, ptr %121, align 16, !tbaa !5
  %122 = getelementptr inbounds double, ptr %16, i64 %index
  %123 = getelementptr inbounds i8, ptr %122, i64 16
  %wide.load155 = load <2 x double>, ptr %122, align 16, !tbaa !5
  %wide.load156 = load <2 x double>, ptr %123, align 16, !tbaa !5
  %124 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load155, <2 x double> %wide.load)
  %125 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load156, <2 x double> %wide.load154)
  %126 = getelementptr inbounds double, ptr %17, i64 %index
  %127 = getelementptr inbounds i8, ptr %126, i64 16
  store <2 x double> %124, ptr %126, align 16, !tbaa !5
  store <2 x double> %125, ptr %127, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %128 = icmp eq i64 %index.next, %n.vec
  br i1 %128, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge116, label %.lr.ph115.preheader206

.lr.ph115.preheader206:                           ; preds = %middle.block, %.lr.ph115.preheader
  %indvars.iv144.ph = phi i64 [ 0, %.lr.ph115.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph115

.lr.ph115:                                        ; preds = %.lr.ph115.preheader206, %.lr.ph115
  %indvars.iv144 = phi i64 [ %indvars.iv.next145, %.lr.ph115 ], [ %indvars.iv144.ph, %.lr.ph115.preheader206 ]
  %129 = getelementptr inbounds double, ptr %19, i64 %indvars.iv144
  %130 = load double, ptr %129, align 8, !tbaa !5
  %131 = getelementptr inbounds double, ptr %16, i64 %indvars.iv144
  %132 = load double, ptr %131, align 8, !tbaa !5
  %133 = call double @llvm.fmuladd.f64(double %119, double %132, double %130)
  %134 = getelementptr inbounds double, ptr %17, i64 %indvars.iv144
  store double %133, ptr %134, align 8, !tbaa !5
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %exitcond149.not = icmp eq i64 %indvars.iv.next145, %wide.trip.count148
  br i1 %exitcond149.not, label %._crit_edge116, label %.lr.ph115, !llvm.loop !22

._crit_edge116:                                   ; preds = %.lr.ph115, %middle.block
  %135 = load double, ptr %6, align 8, !tbaa !5
  %136 = fdiv double %117, %135
  %137 = call double @llvm.fabs.f64(double %136)
  %sqrt = call double @llvm.sqrt.f64(double %137)
  %138 = icmp eq i32 %.089118, 0
  %139 = fcmp olt double %sqrt, %.090117
  %or.cond = select i1 %138, i1 true, i1 %139
  br i1 %or.cond, label %140, label %141

140:                                              ; preds = %._crit_edge116
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr nonnull align 16 %15, i64 %22, i1 false)
  br label %141

141:                                              ; preds = %._crit_edge116, %140
  %.1 = phi double [ %sqrt, %140 ], [ %.090117, %._crit_edge116 ]
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %14, ptr nonnull align 16 %15, i64 %22, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %16, ptr nonnull align 16 %17, i64 %22, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %18, ptr nonnull align 16 %19, i64 %22, i1 false)
  store double %117, ptr %7, align 8, !tbaa !5
  %exitcond150.not = icmp eq i32 %81, %23
  br i1 %exitcond150.not, label %.critedge, label %28, !llvm.loop !23

.critedge:                                        ; preds = %28, %141, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.stackrestore.p0(ptr %13)
  br label %142

142:                                              ; preds = %.critedge, %10
  %.0 = phi i32 [ %11, %10 ], [ 0, %.critedge ]
  ret i32 %.0
}

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @matrix_transpose_mul(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @matrix_mul(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sqrt.f64(double) #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 willreturn }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10, !15, !14}
!17 = distinct !{!17, !10, !14, !15}
!18 = distinct !{!18, !10, !14, !15}
!19 = distinct !{!19, !10, !15, !14}
!20 = distinct !{!20, !10, !15, !14}
!21 = distinct !{!21, !10, !14, !15}
!22 = distinct !{!22, !10, !15, !14}
!23 = distinct !{!23, !10}


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