; LLVM IR from niuyishuai/PDCABB :: LAPACK_BLAS/LAPACK (dlasq1)

; 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 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@c__1 = external hidden global i64, align 8
@c__2 = external hidden global i64, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@c__0 = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @dlasq1_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i64, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca i64, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = getelementptr inbounds double, ptr %25, i32 -1
  store ptr %26, ptr %10, align 8, !tbaa !5
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i32 -1
  store ptr %28, ptr %9, align 8, !tbaa !5
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds double, ptr %29, i32 -1
  store ptr %30, ptr %8, align 8, !tbaa !5
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 0, ptr %31, align 8, !tbaa !9
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load i64, ptr %32, align 8, !tbaa !9
  %34 = icmp slt i64 %33, 0
  br i1 %34, label %35, label %41

35:                                               ; preds = %5
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  store i64 -2, ptr %36, align 8, !tbaa !9
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = sub nsw i64 0, %38
  store i64 %39, ptr %12, align 8, !tbaa !9
  %40 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %12)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %285

41:                                               ; preds = %5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = icmp eq i64 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %285

46:                                               ; preds = %41
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load i64, ptr %47, align 8, !tbaa !9
  %49 = icmp eq i64 %48, 1
  br i1 %49, label %50, label %68

50:                                               ; preds = %46
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i64 1
  %53 = load double, ptr %52, align 8, !tbaa !11
  %54 = fcmp oge double %53, 0.000000e+00
  br i1 %54, label %55, label %59

55:                                               ; preds = %50
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %56, i64 1
  %58 = load double, ptr %57, align 8, !tbaa !11
  br label %64

59:                                               ; preds = %50
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds double, ptr %60, i64 1
  %62 = load double, ptr %61, align 8, !tbaa !11
  %63 = fneg double %62
  br label %64

64:                                               ; preds = %59, %55
  %65 = phi double [ %58, %55 ], [ %63, %59 ]
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %66, i64 1
  store double %65, ptr %67, align 8, !tbaa !11
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %285

68:                                               ; preds = %46
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = load i64, ptr %69, align 8, !tbaa !9
  %71 = icmp eq i64 %70, 2
  br i1 %71, label %72, label %86

72:                                               ; preds = %68
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds double, ptr %73, i64 1
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds double, ptr %75, i64 1
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds double, ptr %77, i64 2
  %79 = call i32 @dlas2_(ptr noundef %74, ptr noundef %76, ptr noundef %78, ptr noundef %21, ptr noundef %22)
  %80 = load double, ptr %22, align 8, !tbaa !11
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds double, ptr %81, i64 1
  store double %80, ptr %82, align 8, !tbaa !11
  %83 = load double, ptr %21, align 8, !tbaa !11
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %84, i64 2
  store double %83, ptr %85, align 8, !tbaa !11
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %285

86:                                               ; preds = %68
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  store double 0.000000e+00, ptr %22, align 8, !tbaa !11
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = sub nsw i64 %91, 1
  store i64 %92, ptr %12, align 8, !tbaa !9
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %137, %89
  %94 = load i64, ptr %17, align 8, !tbaa !9
  %95 = load i64, ptr %12, align 8, !tbaa !9
  %96 = icmp sle i64 %94, %95
  br i1 %96, label %97, label %140

97:                                               ; preds = %93
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = load i64, ptr %17, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !11
  store double %101, ptr %14, align 8, !tbaa !11
  %102 = load double, ptr %14, align 8, !tbaa !11
  %103 = fcmp oge double %102, 0.000000e+00
  br i1 %103, label %104, label %106

104:                                              ; preds = %97
  %105 = load double, ptr %14, align 8, !tbaa !11
  br label %109

106:                                              ; preds = %97
  %107 = load double, ptr %14, align 8, !tbaa !11
  %108 = fneg double %107
  br label %109

109:                                              ; preds = %106, %104
  %110 = phi double [ %105, %104 ], [ %108, %106 ]
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = load i64, ptr %17, align 8, !tbaa !9
  %113 = getelementptr inbounds double, ptr %111, i64 %112
  store double %110, ptr %113, align 8, !tbaa !11
  %114 = load double, ptr %22, align 8, !tbaa !11
  store double %114, ptr %15, align 8, !tbaa !11
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = load i64, ptr %17, align 8, !tbaa !9
  %117 = getelementptr inbounds double, ptr %115, i64 %116
  %118 = load double, ptr %117, align 8, !tbaa !11
  store double %118, ptr %14, align 8, !tbaa !11
  %119 = load double, ptr %14, align 8, !tbaa !11
  %120 = fcmp oge double %119, 0.000000e+00
  br i1 %120, label %121, label %123

121:                                              ; preds = %109
  %122 = load double, ptr %14, align 8, !tbaa !11
  br label %126

123:                                              ; preds = %109
  %124 = load double, ptr %14, align 8, !tbaa !11
  %125 = fneg double %124
  br label %126

126:                                              ; preds = %123, %121
  %127 = phi double [ %122, %121 ], [ %125, %123 ]
  store double %127, ptr %16, align 8, !tbaa !11
  %128 = load double, ptr %15, align 8, !tbaa !11
  %129 = load double, ptr %16, align 8, !tbaa !11
  %130 = fcmp oge double %128, %129
  br i1 %130, label %131, label %133

131:                                              ; preds = %126
  %132 = load double, ptr %15, align 8, !tbaa !11
  br label %135

133:                                              ; preds = %126
  %134 = load double, ptr %16, align 8, !tbaa !11
  br label %135

135:                                              ; preds = %133, %131
  %136 = phi double [ %132, %131 ], [ %134, %133 ]
  store double %136, ptr %22, align 8, !tbaa !11
  br label %137

137:                                              ; preds = %135
  %138 = load i64, ptr %17, align 8, !tbaa !9
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %17, align 8, !tbaa !9
  br label %93, !llvm.loop !13

140:                                              ; preds = %93
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = load i64, ptr %142, align 8, !tbaa !9
  %144 = getelementptr inbounds double, ptr %141, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !11
  store double %145, ptr %14, align 8, !tbaa !11
  %146 = load double, ptr %14, align 8, !tbaa !11
  %147 = fcmp oge double %146, 0.000000e+00
  br i1 %147, label %148, label %150

148:                                              ; preds = %140
  %149 = load double, ptr %14, align 8, !tbaa !11
  br label %153

150:                                              ; preds = %140
  %151 = load double, ptr %14, align 8, !tbaa !11
  %152 = fneg double %151
  br label %153

153:                                              ; preds = %150, %148
  %154 = phi double [ %149, %148 ], [ %152, %150 ]
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = load i64, ptr %156, align 8, !tbaa !9
  %158 = getelementptr inbounds double, ptr %155, i64 %157
  store double %154, ptr %158, align 8, !tbaa !11
  %159 = load double, ptr %22, align 8, !tbaa !11
  %160 = fcmp oeq double %159, 0.000000e+00
  br i1 %160, label %161, label %166

161:                                              ; preds = %153
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds double, ptr %163, i64 1
  %165 = call i32 @dlasrt_(ptr noundef @.str.1, ptr noundef %162, ptr noundef %164, ptr noundef %20)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %285

166:                                              ; preds = %153
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = load i64, ptr %167, align 8, !tbaa !9
  store i64 %168, ptr %12, align 8, !tbaa !9
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %169

169:                                              ; preds = %188, %166
  %170 = load i64, ptr %17, align 8, !tbaa !9
  %171 = load i64, ptr %12, align 8, !tbaa !9
  %172 = icmp sle i64 %170, %171
  br i1 %172, label %173, label %191

173:                                              ; preds = %169
  %174 = load double, ptr %22, align 8, !tbaa !11
  store double %174, ptr %14, align 8, !tbaa !11
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = load i64, ptr %17, align 8, !tbaa !9
  %177 = getelementptr inbounds double, ptr %175, i64 %176
  %178 = load double, ptr %177, align 8, !tbaa !11
  store double %178, ptr %15, align 8, !tbaa !11
  %179 = load double, ptr %14, align 8, !tbaa !11
  %180 = load double, ptr %15, align 8, !tbaa !11
  %181 = fcmp oge double %179, %180
  br i1 %181, label %182, label %184

182:                                              ; preds = %173
  %183 = load double, ptr %14, align 8, !tbaa !11
  br label %186

184:                                              ; preds = %173
  %185 = load double, ptr %15, align 8, !tbaa !11
  br label %186

186:                                              ; preds = %184, %182
  %187 = phi double [ %183, %182 ], [ %185, %184 ]
  store double %187, ptr %22, align 8, !tbaa !11
  br label %188

188:                                              ; preds = %186
  %189 = load i64, ptr %17, align 8, !tbaa !9
  %190 = add nsw i64 %189, 1
  store i64 %190, ptr %17, align 8, !tbaa !9
  br label %169, !llvm.loop !15

191:                                              ; preds = %169
  %192 = call double @dlamch_(ptr noundef @.str.2)
  store double %192, ptr %18, align 8, !tbaa !11
  %193 = call double @dlamch_(ptr noundef @.str.3)
  store double %193, ptr %23, align 8, !tbaa !11
  %194 = load double, ptr %18, align 8, !tbaa !11
  %195 = load double, ptr %23, align 8, !tbaa !11
  %196 = fdiv double %194, %195
  %197 = call double @sqrt(double noundef %196) #4
  store double %197, ptr %19, align 8, !tbaa !11
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = getelementptr inbounds double, ptr %199, i64 1
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = getelementptr inbounds double, ptr %201, i64 1
  %203 = call i32 @f2c_dcopy(ptr noundef %198, ptr noundef %200, ptr noundef @c__1, ptr noundef %202, ptr noundef @c__2)
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = load i64, ptr %204, align 8, !tbaa !9
  %206 = sub nsw i64 %205, 1
  store i64 %206, ptr %12, align 8, !tbaa !9
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = getelementptr inbounds double, ptr %207, i64 1
  %209 = load ptr, ptr %10, align 8, !tbaa !5
  %210 = getelementptr inbounds double, ptr %209, i64 2
  %211 = call i32 @f2c_dcopy(ptr noundef %12, ptr noundef %208, ptr noundef @c__1, ptr noundef %210, ptr noundef @c__2)
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = load i64, ptr %212, align 8, !tbaa !9
  %214 = shl i64 %213, 1
  %215 = sub nsw i64 %214, 1
  store i64 %215, ptr %12, align 8, !tbaa !9
  %216 = load ptr, ptr %7, align 8, !tbaa !5
  %217 = load i64, ptr %216, align 8, !tbaa !9
  %218 = shl i64 %217, 1
  %219 = sub nsw i64 %218, 1
  store i64 %219, ptr %13, align 8, !tbaa !9
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = getelementptr inbounds double, ptr %220, i64 1
  %222 = call i32 @dlascl_(ptr noundef @.str.4, ptr noundef @c__0, ptr noundef @c__0, ptr noundef %22, ptr noundef %19, ptr noundef %12, ptr noundef @c__1, ptr noundef %221, ptr noundef %13, ptr noundef %20)
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = load i64, ptr %223, align 8, !tbaa !9
  %225 = shl i64 %224, 1
  %226 = sub nsw i64 %225, 1
  store i64 %226, ptr %12, align 8, !tbaa !9
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %227

227:                                              ; preds = %242, %191
  %228 = load i64, ptr %17, align 8, !tbaa !9
  %229 = load i64, ptr %12, align 8, !tbaa !9
  %230 = icmp sle i64 %228, %229
  br i1 %230, label %231, label %245

231:                                              ; preds = %227
  %232 = load ptr, ptr %10, align 8, !tbaa !5
  %233 = load i64, ptr %17, align 8, !tbaa !9
  %234 = getelementptr inbounds double, ptr %232, i64 %233
  %235 = load double, ptr %234, align 8, !tbaa !11
  store double %235, ptr %14, align 8, !tbaa !11
  %236 = load double, ptr %14, align 8, !tbaa !11
  %237 = load double, ptr %14, align 8, !tbaa !11
  %238 = fmul double %236, %237
  %239 = load ptr, ptr %10, align 8, !tbaa !5
  %240 = load i64, ptr %17, align 8, !tbaa !9
  %241 = getelementptr inbounds double, ptr %239, i64 %240
  store double %238, ptr %241, align 8, !tbaa !11
  br label %242

242:                                              ; preds = %231
  %243 = load i64, ptr %17, align 8, !tbaa !9
  %244 = add nsw i64 %243, 1
  store i64 %244, ptr %17, align 8, !tbaa !9
  br label %227, !llvm.loop !16

245:                                              ; preds = %227
  %246 = load ptr, ptr %10, align 8, !tbaa !5
  %247 = load ptr, ptr %7, align 8, !tbaa !5
  %248 = load i64, ptr %247, align 8, !tbaa !9
  %249 = mul nsw i64 %248, 2
  %250 = getelementptr inbounds double, ptr %246, i64 %249
  store double 0.000000e+00, ptr %250, align 8, !tbaa !11
  %251 = load ptr, ptr %7, align 8, !tbaa !5
  %252 = load ptr, ptr %10, align 8, !tbaa !5
  %253 = getelementptr inbounds double, ptr %252, i64 1
  %254 = load ptr, ptr %11, align 8, !tbaa !5
  %255 = call i32 @dlasq2_(ptr noundef %251, ptr noundef %253, ptr noundef %254)
  %256 = load ptr, ptr %11, align 8, !tbaa !5
  %257 = load i64, ptr %256, align 8, !tbaa !9
  %258 = icmp eq i64 %257, 0
  br i1 %258, label %259, label %284

259:                                              ; preds = %245
  %260 = load ptr, ptr %7, align 8, !tbaa !5
  %261 = load i64, ptr %260, align 8, !tbaa !9
  store i64 %261, ptr %12, align 8, !tbaa !9
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %262

262:                                              ; preds = %275, %259
  %263 = load i64, ptr %17, align 8, !tbaa !9
  %264 = load i64, ptr %12, align 8, !tbaa !9
  %265 = icmp sle i64 %263, %264
  br i1 %265, label %266, label %278

266:                                              ; preds = %262
  %267 = load ptr, ptr %10, align 8, !tbaa !5
  %268 = load i64, ptr %17, align 8, !tbaa !9
  %269 = getelementptr inbounds double, ptr %267, i64 %268
  %270 = load double, ptr %269, align 8, !tbaa !11
  %271 = call double @sqrt(double noundef %270) #4
  %272 = load ptr, ptr %8, align 8, !tbaa !5
  %273 = load i64, ptr %17, align 8, !tbaa !9
  %274 = getelementptr inbounds double, ptr %272, i64 %273
  store double %271, ptr %274, align 8, !tbaa !11
  br label %275

275:                                              ; preds = %266
  %276 = load i64, ptr %17, align 8, !tbaa !9
  %277 = add nsw i64 %276, 1
  store i64 %277, ptr %17, align 8, !tbaa !9
  br label %262, !llvm.loop !17

278:                                              ; preds = %262
  %279 = load ptr, ptr %7, align 8, !tbaa !5
  %280 = load ptr, ptr %8, align 8, !tbaa !5
  %281 = getelementptr inbounds double, ptr %280, i64 1
  %282 = load ptr, ptr %7, align 8, !tbaa !5
  %283 = call i32 @dlascl_(ptr noundef @.str.4, ptr noundef @c__0, ptr noundef @c__0, ptr noundef %19, ptr noundef %22, ptr noundef %279, ptr noundef @c__1, ptr noundef %281, ptr noundef %282, ptr noundef %20)
  br label %284

284:                                              ; preds = %278, %245
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %285

285:                                              ; preds = %284, %161, %72, %64, %45, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %286 = load i32, ptr %6, align 4
  ret i32 %286
}

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

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

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

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

declare double @dlamch_(ptr noundef) #2

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

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

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

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

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

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


; 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@c__1 = external hidden global i64, align 8
@c__2 = external hidden global i64, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@c__0 = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @dlasq1_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca double, align 8
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %12 = getelementptr inbounds i8, ptr %3, i64 -8
  %13 = getelementptr inbounds i8, ptr %2, i64 -8
  %14 = getelementptr inbounds i8, ptr %1, i64 -8
  store i64 0, ptr %4, align 8, !tbaa !5
  %15 = load i64, ptr %0, align 8, !tbaa !5
  %16 = icmp slt i64 %15, 0
  br i1 %16, label %17, label %19

17:                                               ; preds = %5
  store i64 -2, ptr %4, align 8, !tbaa !5
  store i64 2, ptr %6, align 8, !tbaa !5
  %18 = call i32 @xerbla_(ptr noundef nonnull @.str, ptr noundef nonnull %6) #5
  br label %115

19:                                               ; preds = %5
  switch i64 %15, label %.lr.ph.preheader [
    i64 0, label %115
    i64 1, label %20
    i64 2, label %25
  ]

20:                                               ; preds = %19
  %21 = load double, ptr %1, align 8, !tbaa !9
  %22 = fcmp ult double %21, 0.000000e+00
  %23 = fneg double %21
  %24 = select i1 %22, double %23, double %21
  store double %24, ptr %1, align 8, !tbaa !9
  br label %115

25:                                               ; preds = %19
  %26 = getelementptr inbounds i8, ptr %1, i64 8
  %27 = call i32 @dlas2_(ptr noundef %1, ptr noundef %2, ptr noundef nonnull %26, ptr noundef nonnull %10, ptr noundef nonnull %11) #5
  %28 = load double, ptr %11, align 8, !tbaa !9
  store double %28, ptr %1, align 8, !tbaa !9
  %29 = load double, ptr %10, align 8, !tbaa !9
  store double %29, ptr %26, align 8, !tbaa !9
  br label %115

.lr.ph.preheader:                                 ; preds = %19
  %30 = add nsw i64 %15, -1
  store i64 %30, ptr %6, align 8, !tbaa !5
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.09299 = phi i64 [ %44, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %31 = phi double [ %43, %.lr.ph ], [ 0.000000e+00, %.lr.ph.preheader ]
  %32 = getelementptr inbounds double, ptr %14, i64 %.09299
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = fcmp oge double %33, 0.000000e+00
  %35 = fneg double %33
  %36 = select i1 %34, double %33, double %35
  store double %36, ptr %32, align 8, !tbaa !9
  %37 = getelementptr inbounds double, ptr %13, i64 %.09299
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = fcmp oge double %38, 0.000000e+00
  %40 = fneg double %38
  %41 = select i1 %39, double %38, double %40
  %42 = fcmp oge double %31, %41
  %43 = select i1 %42, double %31, double %41
  %44 = add nuw nsw i64 %.09299, 1
  %exitcond.not = icmp eq i64 %44, %15
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph
  store double %43, ptr %11, align 8, !tbaa !9
  %45 = getelementptr inbounds double, ptr %14, i64 %15
  %46 = load double, ptr %45, align 8, !tbaa !9
  %47 = fcmp oge double %46, 0.000000e+00
  %48 = fneg double %46
  %49 = select i1 %47, double %46, double %48
  store double %49, ptr %45, align 8, !tbaa !9
  %50 = fcmp oeq double %43, 0.000000e+00
  br i1 %50, label %51, label %.lr.ph105.preheader

51:                                               ; preds = %._crit_edge
  %52 = call i32 @dlasrt_(ptr noundef nonnull @.str.1, ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %9) #5
  br label %115

.lr.ph105.preheader:                              ; preds = %._crit_edge
  %smax = tail call i64 @llvm.smax.i64(i64 %15, i64 1)
  %xtraiter = and i64 %smax, 3
  %53 = icmp slt i64 %15, 4
  br i1 %53, label %._crit_edge106.unr-lcssa, label %.lr.ph105.preheader.new

.lr.ph105.preheader.new:                          ; preds = %.lr.ph105.preheader
  %unroll_iter = and i64 %smax, 9223372036854775804
  %invariant.gep = getelementptr i8, ptr %14, i64 16
  %invariant.gep132 = getelementptr i8, ptr %14, i64 24
  br label %.lr.ph105

.lr.ph105:                                        ; preds = %.lr.ph105, %.lr.ph105.preheader.new
  %.1103 = phi i64 [ 1, %.lr.ph105.preheader.new ], [ %69, %.lr.ph105 ]
  %54 = phi double [ %43, %.lr.ph105.preheader.new ], [ %68, %.lr.ph105 ]
  %niter = phi i64 [ 0, %.lr.ph105.preheader.new ], [ %niter.next.3, %.lr.ph105 ]
  %55 = getelementptr inbounds double, ptr %14, i64 %.1103
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = fcmp oge double %54, %56
  %58 = select i1 %57, double %54, double %56
  %59 = getelementptr double, ptr %1, i64 %.1103
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = fcmp oge double %58, %60
  %62 = select i1 %61, double %58, double %60
  %gep = getelementptr double, ptr %invariant.gep, i64 %.1103
  %63 = load double, ptr %gep, align 8, !tbaa !9
  %64 = fcmp oge double %62, %63
  %65 = select i1 %64, double %62, double %63
  %gep133 = getelementptr double, ptr %invariant.gep132, i64 %.1103
  %66 = load double, ptr %gep133, align 8, !tbaa !9
  %67 = fcmp oge double %65, %66
  %68 = select i1 %67, double %65, double %66
  %69 = add nuw i64 %.1103, 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 %._crit_edge106.unr-lcssa, label %.lr.ph105, !llvm.loop !13

._crit_edge106.unr-lcssa:                         ; preds = %.lr.ph105, %.lr.ph105.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph105.preheader ], [ %68, %.lr.ph105 ]
  %.1103.unr = phi i64 [ 1, %.lr.ph105.preheader ], [ %69, %.lr.ph105 ]
  %.unr = phi double [ %43, %.lr.ph105.preheader ], [ %68, %.lr.ph105 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge106, label %.lr.ph105.epil

.lr.ph105.epil:                                   ; preds = %._crit_edge106.unr-lcssa, %.lr.ph105.epil
  %.1103.epil = phi i64 [ %75, %.lr.ph105.epil ], [ %.1103.unr, %._crit_edge106.unr-lcssa ]
  %70 = phi double [ %74, %.lr.ph105.epil ], [ %.unr, %._crit_edge106.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph105.epil ], [ 0, %._crit_edge106.unr-lcssa ]
  %71 = getelementptr inbounds double, ptr %14, i64 %.1103.epil
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fcmp oge double %70, %72
  %74 = select i1 %73, double %70, double %72
  %75 = add nuw i64 %.1103.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 %._crit_edge106, label %.lr.ph105.epil, !llvm.loop !14

._crit_edge106:                                   ; preds = %.lr.ph105.epil, %._crit_edge106.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge106.unr-lcssa ], [ %74, %.lr.ph105.epil ]
  store double %.lcssa, ptr %11, align 8, !tbaa !9
  %76 = tail call double @dlamch_(ptr noundef nonnull @.str.2) #5
  %77 = tail call double @dlamch_(ptr noundef nonnull @.str.3) #5
  %78 = fdiv double %76, %77
  %79 = tail call double @sqrt(double noundef %78) #5
  store double %79, ptr %8, align 8, !tbaa !9
  %80 = tail call i32 @f2c_dcopy(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull @c__1, ptr noundef %3, ptr noundef nonnull @c__2) #5
  %81 = load i64, ptr %0, align 8, !tbaa !5
  %82 = add nsw i64 %81, -1
  store i64 %82, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %3, i64 8
  %84 = call i32 @f2c_dcopy(ptr noundef nonnull %6, ptr noundef %2, ptr noundef nonnull @c__1, ptr noundef nonnull %83, ptr noundef nonnull @c__2) #5
  %85 = load i64, ptr %0, align 8, !tbaa !5
  %86 = shl i64 %85, 1
  %87 = add nsw i64 %86, -1
  store i64 %87, ptr %6, align 8, !tbaa !5
  store i64 %87, ptr %7, align 8, !tbaa !5
  %88 = call i32 @dlascl_(ptr noundef nonnull @.str.4, ptr noundef nonnull @c__0, ptr noundef nonnull @c__0, ptr noundef nonnull %11, ptr noundef nonnull %8, ptr noundef nonnull %6, ptr noundef nonnull @c__1, ptr noundef %3, ptr noundef nonnull %7, ptr noundef nonnull %9) #5
  %89 = load i64, ptr %0, align 8, !tbaa !5
  %90 = shl i64 %89, 1
  %91 = add nsw i64 %90, -1
  store i64 %91, ptr %6, align 8, !tbaa !5
  %.not96.not108 = icmp sgt i64 %90, 1
  br i1 %.not96.not108, label %.lr.ph111.preheader, label %._crit_edge112

.lr.ph111.preheader:                              ; preds = %._crit_edge106
  %min.iters.check = icmp ult i64 %90, 5
  br i1 %min.iters.check, label %.lr.ph111.preheader125, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph111.preheader
  %92 = add nsw i64 %90, -1
  %n.vec = and i64 %92, -4
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %93 = getelementptr double, ptr %3, i64 %index
  %94 = getelementptr inbounds i8, ptr %93, i64 16
  %wide.load = load <2 x double>, ptr %93, align 8, !tbaa !9
  %wide.load124 = load <2 x double>, ptr %94, align 8, !tbaa !9
  %95 = fmul <2 x double> %wide.load, %wide.load
  %96 = fmul <2 x double> %wide.load124, %wide.load124
  store <2 x double> %95, ptr %93, align 8, !tbaa !9
  store <2 x double> %96, ptr %94, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %97 = icmp eq i64 %index.next, %n.vec
  br i1 %97, label %.lr.ph111.preheader125, label %vector.body, !llvm.loop !16

.lr.ph111.preheader125:                           ; preds = %vector.body, %.lr.ph111.preheader
  %.2109.ph = phi i64 [ 1, %.lr.ph111.preheader ], [ %ind.end, %vector.body ]
  br label %.lr.ph111

.lr.ph111:                                        ; preds = %.lr.ph111.preheader125, %.lr.ph111
  %.2109 = phi i64 [ %101, %.lr.ph111 ], [ %.2109.ph, %.lr.ph111.preheader125 ]
  %98 = getelementptr inbounds double, ptr %12, i64 %.2109
  %99 = load double, ptr %98, align 8, !tbaa !9
  %100 = fmul double %99, %99
  store double %100, ptr %98, align 8, !tbaa !9
  %101 = add nuw nsw i64 %.2109, 1
  %exitcond121.not = icmp eq i64 %101, %90
  br i1 %exitcond121.not, label %._crit_edge112, label %.lr.ph111, !llvm.loop !19

._crit_edge112:                                   ; preds = %.lr.ph111, %._crit_edge106
  %.idx = shl nsw i64 %89, 4
  %102 = getelementptr inbounds i8, ptr %12, i64 %.idx
  store double 0.000000e+00, ptr %102, align 8, !tbaa !9
  %103 = call i32 @dlasq2_(ptr noundef nonnull %0, ptr noundef %3, ptr noundef nonnull %4) #5
  %104 = load i64, ptr %4, align 8, !tbaa !5
  %105 = icmp eq i64 %104, 0
  br i1 %105, label %106, label %115

106:                                              ; preds = %._crit_edge112
  %107 = load i64, ptr %0, align 8, !tbaa !5
  store i64 %107, ptr %6, align 8, !tbaa !5
  %.not97113 = icmp slt i64 %107, 1
  br i1 %.not97113, label %._crit_edge117, label %.lr.ph116

.lr.ph116:                                        ; preds = %106, %.lr.ph116
  %.3114 = phi i64 [ %112, %.lr.ph116 ], [ 1, %106 ]
  %108 = getelementptr inbounds double, ptr %12, i64 %.3114
  %109 = load double, ptr %108, align 8, !tbaa !9
  %110 = call double @sqrt(double noundef %109) #5
  %111 = getelementptr inbounds double, ptr %14, i64 %.3114
  store double %110, ptr %111, align 8, !tbaa !9
  %112 = add nuw nsw i64 %.3114, 1
  %113 = load i64, ptr %6, align 8, !tbaa !5
  %.not97.not = icmp slt i64 %.3114, %113
  br i1 %.not97.not, label %.lr.ph116, label %._crit_edge117, !llvm.loop !20

._crit_edge117:                                   ; preds = %.lr.ph116, %106
  %114 = call i32 @dlascl_(ptr noundef nonnull @.str.4, ptr noundef nonnull @c__0, ptr noundef nonnull @c__0, ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef nonnull %0, ptr noundef nonnull @c__1, ptr noundef %1, ptr noundef nonnull %0, ptr noundef nonnull %9) #5
  br label %115

115:                                              ; preds = %._crit_edge112, %._crit_edge117, %19, %51, %25, %20, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  ret i32 0
}

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

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

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

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

declare double @dlamch_(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

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

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

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

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

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

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


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