; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (zlaunhr_col_getrfnp2)

; 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.doublecomplex = type { double, double }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@c_b4 = external hidden global double, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@c_b1 = external hidden global %struct.doublecomplex, align 8
@c__1 = external hidden global i32, align 4
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

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

42:                                               ; preds = %6
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 -1, ptr %43, align 4, !tbaa !9
  br label %67

44:                                               ; preds = %6
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = icmp slt i32 %46, 0
  br i1 %47, label %48, label %50

48:                                               ; preds = %44
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 -2, ptr %49, align 4, !tbaa !9
  br label %66

50:                                               ; preds = %44
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = icmp sge i32 1, %54
  br i1 %55, label %56, label %57

56:                                               ; preds = %50
  br label %60

57:                                               ; preds = %50
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load i32, ptr %58, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %57, %56
  %61 = phi i32 [ 1, %56 ], [ %59, %57 ]
  %62 = icmp slt i32 %52, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %60
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 -4, ptr %64, align 4, !tbaa !9
  br label %65

65:                                               ; preds = %63, %60
  br label %66

66:                                               ; preds = %65, %48
  br label %67

67:                                               ; preds = %66, %42
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %76

71:                                               ; preds = %67
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = sub nsw i32 0, %73
  store i32 %74, ptr %15, align 4, !tbaa !9
  %75 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %15, i32 noundef 20)
  store i32 1, ptr %25, align 4
  br label %510

76:                                               ; preds = %67
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i32, ptr %79, align 4, !tbaa !9
  %81 = icmp sle i32 %78, %80
  br i1 %81, label %82, label %85

82:                                               ; preds = %76
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load i32, ptr %83, align 4, !tbaa !9
  br label %88

85:                                               ; preds = %76
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load i32, ptr %86, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %85, %82
  %89 = phi i32 [ %84, %82 ], [ %87, %85 ]
  %90 = icmp eq i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %88
  store i32 1, ptr %25, align 4
  br label %510

92:                                               ; preds = %88
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = icmp eq i32 %94, 1
  br i1 %95, label %96, label %186

96:                                               ; preds = %92
  %97 = load i32, ptr %13, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %15, align 4, !tbaa !9
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.doublecomplex, ptr %99, i64 %101
  %103 = getelementptr inbounds %struct.doublecomplex, ptr %102, i32 0, i32 0
  %104 = load double, ptr %103, align 8, !tbaa !11
  store double %104, ptr %18, align 8, !tbaa !14
  %105 = load double, ptr %18, align 8, !tbaa !14
  %106 = fcmp oge double %105, 0.000000e+00
  br i1 %106, label %107, label %117

107:                                              ; preds = %96
  %108 = load double, ptr @c_b4, align 8, !tbaa !14
  %109 = fcmp oge double %108, 0.000000e+00
  br i1 %109, label %110, label %112

110:                                              ; preds = %107
  %111 = load double, ptr @c_b4, align 8, !tbaa !14
  br label %115

112:                                              ; preds = %107
  %113 = load double, ptr @c_b4, align 8, !tbaa !14
  %114 = fneg double %113
  br label %115

115:                                              ; preds = %112, %110
  %116 = phi double [ %111, %110 ], [ %114, %112 ]
  br label %128

117:                                              ; preds = %96
  %118 = load double, ptr @c_b4, align 8, !tbaa !14
  %119 = fcmp oge double %118, 0.000000e+00
  br i1 %119, label %120, label %122

120:                                              ; preds = %117
  %121 = load double, ptr @c_b4, align 8, !tbaa !14
  br label %125

122:                                              ; preds = %117
  %123 = load double, ptr @c_b4, align 8, !tbaa !14
  %124 = fneg double %123
  br label %125

125:                                              ; preds = %122, %120
  %126 = phi double [ %121, %120 ], [ %124, %122 ]
  %127 = fneg double %126
  br label %128

128:                                              ; preds = %125, %115
  %129 = phi double [ %116, %115 ], [ %127, %125 ]
  %130 = fneg double %129
  store double %130, ptr %17, align 8, !tbaa !14
  %131 = load double, ptr %17, align 8, !tbaa !14
  %132 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %131, ptr %132, align 8, !tbaa !11
  %133 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double 0.000000e+00, ptr %133, align 8, !tbaa !15
  %134 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %135 = load double, ptr %134, align 8, !tbaa !11
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.doublecomplex, ptr %136, i64 1
  %138 = getelementptr inbounds %struct.doublecomplex, ptr %137, i32 0, i32 0
  store double %135, ptr %138, align 8, !tbaa !11
  %139 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %140 = load double, ptr %139, align 8, !tbaa !15
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.doublecomplex, ptr %141, i64 1
  %143 = getelementptr inbounds %struct.doublecomplex, ptr %142, i32 0, i32 1
  store double %140, ptr %143, align 8, !tbaa !15
  %144 = load i32, ptr %13, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %15, align 4, !tbaa !9
  %146 = load i32, ptr %13, align 4, !tbaa !9
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %16, align 4, !tbaa !9
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = load i32, ptr %16, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds %struct.doublecomplex, ptr %148, i64 %150
  %152 = getelementptr inbounds %struct.doublecomplex, ptr %151, i32 0, i32 0
  %153 = load double, ptr %152, align 8, !tbaa !11
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.doublecomplex, ptr %154, i64 1
  %156 = getelementptr inbounds %struct.doublecomplex, ptr %155, i32 0, i32 0
  %157 = load double, ptr %156, align 8, !tbaa !11
  %158 = fsub double %153, %157
  %159 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %158, ptr %159, align 8, !tbaa !11
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = load i32, ptr %16, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds %struct.doublecomplex, ptr %160, i64 %162
  %164 = getelementptr inbounds %struct.doublecomplex, ptr %163, i32 0, i32 1
  %165 = load double, ptr %164, align 8, !tbaa !15
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.doublecomplex, ptr %166, i64 1
  %168 = getelementptr inbounds %struct.doublecomplex, ptr %167, i32 0, i32 1
  %169 = load double, ptr %168, align 8, !tbaa !15
  %170 = fsub double %165, %169
  %171 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double %170, ptr %171, align 8, !tbaa !15
  %172 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %173 = load double, ptr %172, align 8, !tbaa !11
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = load i32, ptr %15, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %struct.doublecomplex, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.doublecomplex, ptr %177, i32 0, i32 0
  store double %173, ptr %178, align 8, !tbaa !11
  %179 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %180 = load double, ptr %179, align 8, !tbaa !15
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = load i32, ptr %15, align 4, !tbaa !9
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds %struct.doublecomplex, ptr %181, i64 %183
  %185 = getelementptr inbounds %struct.doublecomplex, ptr %184, i32 0, i32 1
  store double %180, ptr %185, align 8, !tbaa !15
  br label %509

186:                                              ; preds = %92
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = load i32, ptr %187, align 4, !tbaa !9
  %189 = icmp eq i32 %188, 1
  br i1 %189, label %190, label %397

190:                                              ; preds = %186
  %191 = load i32, ptr %13, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %15, align 4, !tbaa !9
  %193 = load ptr, ptr %9, align 8, !tbaa !5
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds %struct.doublecomplex, ptr %193, i64 %195
  %197 = getelementptr inbounds %struct.doublecomplex, ptr %196, i32 0, i32 0
  %198 = load double, ptr %197, align 8, !tbaa !11
  store double %198, ptr %18, align 8, !tbaa !14
  %199 = load double, ptr %18, align 8, !tbaa !14
  %200 = fcmp oge double %199, 0.000000e+00
  br i1 %200, label %201, label %211

201:                                              ; preds = %190
  %202 = load double, ptr @c_b4, align 8, !tbaa !14
  %203 = fcmp oge double %202, 0.000000e+00
  br i1 %203, label %204, label %206

204:                                              ; preds = %201
  %205 = load double, ptr @c_b4, align 8, !tbaa !14
  br label %209

206:                                              ; preds = %201
  %207 = load double, ptr @c_b4, align 8, !tbaa !14
  %208 = fneg double %207
  br label %209

209:                                              ; preds = %206, %204
  %210 = phi double [ %205, %204 ], [ %208, %206 ]
  br label %222

211:                                              ; preds = %190
  %212 = load double, ptr @c_b4, align 8, !tbaa !14
  %213 = fcmp oge double %212, 0.000000e+00
  br i1 %213, label %214, label %216

214:                                              ; preds = %211
  %215 = load double, ptr @c_b4, align 8, !tbaa !14
  br label %219

216:                                              ; preds = %211
  %217 = load double, ptr @c_b4, align 8, !tbaa !14
  %218 = fneg double %217
  br label %219

219:                                              ; preds = %216, %214
  %220 = phi double [ %215, %214 ], [ %218, %216 ]
  %221 = fneg double %220
  br label %222

222:                                              ; preds = %219, %209
  %223 = phi double [ %210, %209 ], [ %221, %219 ]
  %224 = fneg double %223
  store double %224, ptr %17, align 8, !tbaa !14
  %225 = load double, ptr %17, align 8, !tbaa !14
  %226 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %225, ptr %226, align 8, !tbaa !11
  %227 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double 0.000000e+00, ptr %227, align 8, !tbaa !15
  %228 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %229 = load double, ptr %228, align 8, !tbaa !11
  %230 = load ptr, ptr %11, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.doublecomplex, ptr %230, i64 1
  %232 = getelementptr inbounds %struct.doublecomplex, ptr %231, i32 0, i32 0
  store double %229, ptr %232, align 8, !tbaa !11
  %233 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %234 = load double, ptr %233, align 8, !tbaa !15
  %235 = load ptr, ptr %11, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.doublecomplex, ptr %235, i64 1
  %237 = getelementptr inbounds %struct.doublecomplex, ptr %236, i32 0, i32 1
  store double %234, ptr %237, align 8, !tbaa !15
  %238 = load i32, ptr %13, align 4, !tbaa !9
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %15, align 4, !tbaa !9
  %240 = load i32, ptr %13, align 4, !tbaa !9
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %16, align 4, !tbaa !9
  %242 = load ptr, ptr %9, align 8, !tbaa !5
  %243 = load i32, ptr %16, align 4, !tbaa !9
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds %struct.doublecomplex, ptr %242, i64 %244
  %246 = getelementptr inbounds %struct.doublecomplex, ptr %245, i32 0, i32 0
  %247 = load double, ptr %246, align 8, !tbaa !11
  %248 = load ptr, ptr %11, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.doublecomplex, ptr %248, i64 1
  %250 = getelementptr inbounds %struct.doublecomplex, ptr %249, i32 0, i32 0
  %251 = load double, ptr %250, align 8, !tbaa !11
  %252 = fsub double %247, %251
  %253 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %252, ptr %253, align 8, !tbaa !11
  %254 = load ptr, ptr %9, align 8, !tbaa !5
  %255 = load i32, ptr %16, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds %struct.doublecomplex, ptr %254, i64 %256
  %258 = getelementptr inbounds %struct.doublecomplex, ptr %257, i32 0, i32 1
  %259 = load double, ptr %258, align 8, !tbaa !15
  %260 = load ptr, ptr %11, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.doublecomplex, ptr %260, i64 1
  %262 = getelementptr inbounds %struct.doublecomplex, ptr %261, i32 0, i32 1
  %263 = load double, ptr %262, align 8, !tbaa !15
  %264 = fsub double %259, %263
  %265 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double %264, ptr %265, align 8, !tbaa !15
  %266 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %267 = load double, ptr %266, align 8, !tbaa !11
  %268 = load ptr, ptr %9, align 8, !tbaa !5
  %269 = load i32, ptr %15, align 4, !tbaa !9
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds %struct.doublecomplex, ptr %268, i64 %270
  %272 = getelementptr inbounds %struct.doublecomplex, ptr %271, i32 0, i32 0
  store double %267, ptr %272, align 8, !tbaa !11
  %273 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %274 = load double, ptr %273, align 8, !tbaa !15
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  %276 = load i32, ptr %15, align 4, !tbaa !9
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds %struct.doublecomplex, ptr %275, i64 %277
  %279 = getelementptr inbounds %struct.doublecomplex, ptr %278, i32 0, i32 1
  store double %274, ptr %279, align 8, !tbaa !15
  %280 = call double @dlamch_(ptr noundef @.str.1)
  store double %280, ptr %22, align 8, !tbaa !14
  %281 = load i32, ptr %13, align 4, !tbaa !9
  %282 = add nsw i32 %281, 1
  store i32 %282, ptr %15, align 4, !tbaa !9
  %283 = load ptr, ptr %9, align 8, !tbaa !5
  %284 = load i32, ptr %15, align 4, !tbaa !9
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds %struct.doublecomplex, ptr %283, i64 %285
  %287 = getelementptr inbounds %struct.doublecomplex, ptr %286, i32 0, i32 0
  %288 = load double, ptr %287, align 8, !tbaa !11
  store double %288, ptr %17, align 8, !tbaa !14
  %289 = load double, ptr %17, align 8, !tbaa !14
  %290 = fcmp oge double %289, 0.000000e+00
  br i1 %290, label %291, label %293

291:                                              ; preds = %222
  %292 = load double, ptr %17, align 8, !tbaa !14
  br label %296

293:                                              ; preds = %222
  %294 = load double, ptr %17, align 8, !tbaa !14
  %295 = fneg double %294
  br label %296

296:                                              ; preds = %293, %291
  %297 = phi double [ %292, %291 ], [ %295, %293 ]
  %298 = load ptr, ptr %9, align 8, !tbaa !5
  %299 = load i32, ptr %13, align 4, !tbaa !9
  %300 = add nsw i32 %299, 1
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds %struct.doublecomplex, ptr %298, i64 %301
  %303 = call { double, double } @Cd(ptr noundef %302)
  %304 = extractvalue { double, double } %303, 0
  %305 = extractvalue { double, double } %303, 1
  store double %305, ptr %18, align 8, !tbaa !14
  %306 = load double, ptr %18, align 8, !tbaa !14
  %307 = fcmp oge double %306, 0.000000e+00
  br i1 %307, label %308, label %310

308:                                              ; preds = %296
  %309 = load double, ptr %18, align 8, !tbaa !14
  br label %313

310:                                              ; preds = %296
  %311 = load double, ptr %18, align 8, !tbaa !14
  %312 = fneg double %311
  br label %313

313:                                              ; preds = %310, %308
  %314 = phi double [ %309, %308 ], [ %312, %310 ]
  %315 = fadd double %297, %314
  %316 = load double, ptr %22, align 8, !tbaa !14
  %317 = fcmp oge double %315, %316
  br i1 %317, label %318, label %344

318:                                              ; preds = %313
  %319 = load ptr, ptr %7, align 8, !tbaa !5
  %320 = load i32, ptr %319, align 4, !tbaa !9
  %321 = sub nsw i32 %320, 1
  store i32 %321, ptr %15, align 4, !tbaa !9
  %322 = call { double, double } @Cd(ptr noundef @c_b1)
  %323 = extractvalue { double, double } %322, 0
  %324 = extractvalue { double, double } %322, 1
  %325 = load ptr, ptr %9, align 8, !tbaa !5
  %326 = load i32, ptr %13, align 4, !tbaa !9
  %327 = add nsw i32 %326, 1
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds %struct.doublecomplex, ptr %325, i64 %328
  %330 = call { double, double } @Cd(ptr noundef %329)
  %331 = extractvalue { double, double } %330, 0
  %332 = extractvalue { double, double } %330, 1
  %333 = call { double, double } @__divdc3(double noundef %323, double noundef %324, double noundef %331, double noundef %332) #4
  %334 = extractvalue { double, double } %333, 0
  %335 = extractvalue { double, double } %333, 1
  %336 = call ptr @_pCd(ptr noundef %19)
  %337 = getelementptr inbounds { double, double }, ptr %336, i32 0, i32 0
  %338 = getelementptr inbounds { double, double }, ptr %336, i32 0, i32 1
  store double %334, ptr %337, align 8
  store double %335, ptr %338, align 8
  %339 = load ptr, ptr %9, align 8, !tbaa !5
  %340 = load i32, ptr %13, align 4, !tbaa !9
  %341 = add nsw i32 %340, 2
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds %struct.doublecomplex, ptr %339, i64 %342
  call void @zscal_(ptr noundef %15, ptr noundef %19, ptr noundef %343, ptr noundef @c__1)
  br label %396

344:                                              ; preds = %313
  %345 = load ptr, ptr %7, align 8, !tbaa !5
  %346 = load i32, ptr %345, align 4, !tbaa !9
  store i32 %346, ptr %15, align 4, !tbaa !9
  store i32 2, ptr %20, align 4, !tbaa !9
  br label %347

347:                                              ; preds = %392, %344
  %348 = load i32, ptr %20, align 4, !tbaa !9
  %349 = load i32, ptr %15, align 4, !tbaa !9
  %350 = icmp sle i32 %348, %349
  br i1 %350, label %351, label %395

351:                                              ; preds = %347
  %352 = load i32, ptr %20, align 4, !tbaa !9
  %353 = load i32, ptr %13, align 4, !tbaa !9
  %354 = add nsw i32 %352, %353
  store i32 %354, ptr %16, align 4, !tbaa !9
  %355 = load ptr, ptr %9, align 8, !tbaa !5
  %356 = load i32, ptr %20, align 4, !tbaa !9
  %357 = load i32, ptr %13, align 4, !tbaa !9
  %358 = add nsw i32 %356, %357
  %359 = sext i32 %358 to i64
  %360 = getelementptr inbounds %struct.doublecomplex, ptr %355, i64 %359
  %361 = call { double, double } @Cd(ptr noundef %360)
  %362 = extractvalue { double, double } %361, 0
  %363 = extractvalue { double, double } %361, 1
  %364 = load ptr, ptr %9, align 8, !tbaa !5
  %365 = load i32, ptr %13, align 4, !tbaa !9
  %366 = add nsw i32 %365, 1
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds %struct.doublecomplex, ptr %364, i64 %367
  %369 = call { double, double } @Cd(ptr noundef %368)
  %370 = extractvalue { double, double } %369, 0
  %371 = extractvalue { double, double } %369, 1
  %372 = call { double, double } @__divdc3(double noundef %362, double noundef %363, double noundef %370, double noundef %371) #4
  %373 = extractvalue { double, double } %372, 0
  %374 = extractvalue { double, double } %372, 1
  %375 = call ptr @_pCd(ptr noundef %19)
  %376 = getelementptr inbounds { double, double }, ptr %375, i32 0, i32 0
  %377 = getelementptr inbounds { double, double }, ptr %375, i32 0, i32 1
  store double %373, ptr %376, align 8
  store double %374, ptr %377, align 8
  %378 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %379 = load double, ptr %378, align 8, !tbaa !11
  %380 = load ptr, ptr %9, align 8, !tbaa !5
  %381 = load i32, ptr %16, align 4, !tbaa !9
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds %struct.doublecomplex, ptr %380, i64 %382
  %384 = getelementptr inbounds %struct.doublecomplex, ptr %383, i32 0, i32 0
  store double %379, ptr %384, align 8, !tbaa !11
  %385 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %386 = load double, ptr %385, align 8, !tbaa !15
  %387 = load ptr, ptr %9, align 8, !tbaa !5
  %388 = load i32, ptr %16, align 4, !tbaa !9
  %389 = sext i32 %388 to i64
  %390 = getelementptr inbounds %struct.doublecomplex, ptr %387, i64 %389
  %391 = getelementptr inbounds %struct.doublecomplex, ptr %390, i32 0, i32 1
  store double %386, ptr %391, align 8, !tbaa !15
  br label %392

392:                                              ; preds = %351
  %393 = load i32, ptr %20, align 4, !tbaa !9
  %394 = add nsw i32 %393, 1
  store i32 %394, ptr %20, align 4, !tbaa !9
  br label %347, !llvm.loop !16

395:                                              ; preds = %347
  br label %396

396:                                              ; preds = %395, %318
  br label %508

397:                                              ; preds = %186
  %398 = load ptr, ptr %7, align 8, !tbaa !5
  %399 = load i32, ptr %398, align 4, !tbaa !9
  %400 = load ptr, ptr %8, align 8, !tbaa !5
  %401 = load i32, ptr %400, align 4, !tbaa !9
  %402 = icmp sle i32 %399, %401
  br i1 %402, label %403, label %406

403:                                              ; preds = %397
  %404 = load ptr, ptr %7, align 8, !tbaa !5
  %405 = load i32, ptr %404, align 4, !tbaa !9
  br label %409

406:                                              ; preds = %397
  %407 = load ptr, ptr %8, align 8, !tbaa !5
  %408 = load i32, ptr %407, align 4, !tbaa !9
  br label %409

409:                                              ; preds = %406, %403
  %410 = phi i32 [ %405, %403 ], [ %408, %406 ]
  %411 = sdiv i32 %410, 2
  store i32 %411, ptr %23, align 4, !tbaa !9
  %412 = load ptr, ptr %8, align 8, !tbaa !5
  %413 = load i32, ptr %412, align 4, !tbaa !9
  %414 = load i32, ptr %23, align 4, !tbaa !9
  %415 = sub nsw i32 %413, %414
  store i32 %415, ptr %24, align 4, !tbaa !9
  %416 = load ptr, ptr %9, align 8, !tbaa !5
  %417 = load i32, ptr %14, align 4, !tbaa !9
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds %struct.doublecomplex, ptr %416, i64 %418
  %420 = load ptr, ptr %10, align 8, !tbaa !5
  %421 = load ptr, ptr %11, align 8, !tbaa !5
  %422 = getelementptr inbounds %struct.doublecomplex, ptr %421, i64 1
  call void @zlaunhr_col_getrfnp2_(ptr noundef %23, ptr noundef %23, ptr noundef %419, ptr noundef %420, ptr noundef %422, ptr noundef %21)
  %423 = load ptr, ptr %7, align 8, !tbaa !5
  %424 = load i32, ptr %423, align 4, !tbaa !9
  %425 = load i32, ptr %23, align 4, !tbaa !9
  %426 = sub nsw i32 %424, %425
  store i32 %426, ptr %15, align 4, !tbaa !9
  %427 = load ptr, ptr %9, align 8, !tbaa !5
  %428 = load i32, ptr %14, align 4, !tbaa !9
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds %struct.doublecomplex, ptr %427, i64 %429
  %431 = load ptr, ptr %10, align 8, !tbaa !5
  %432 = load ptr, ptr %9, align 8, !tbaa !5
  %433 = load i32, ptr %23, align 4, !tbaa !9
  %434 = add nsw i32 %433, 1
  %435 = load i32, ptr %13, align 4, !tbaa !9
  %436 = add nsw i32 %434, %435
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds %struct.doublecomplex, ptr %432, i64 %437
  %439 = load ptr, ptr %10, align 8, !tbaa !5
  call void @ztrsm_(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.4, ptr noundef %15, ptr noundef %23, ptr noundef @c_b1, ptr noundef %430, ptr noundef %431, ptr noundef %438, ptr noundef %439)
  %440 = load ptr, ptr %9, align 8, !tbaa !5
  %441 = load i32, ptr %14, align 4, !tbaa !9
  %442 = sext i32 %441 to i64
  %443 = getelementptr inbounds %struct.doublecomplex, ptr %440, i64 %442
  %444 = load ptr, ptr %10, align 8, !tbaa !5
  %445 = load ptr, ptr %9, align 8, !tbaa !5
  %446 = load i32, ptr %23, align 4, !tbaa !9
  %447 = add nsw i32 %446, 1
  %448 = load i32, ptr %13, align 4, !tbaa !9
  %449 = mul nsw i32 %447, %448
  %450 = add nsw i32 %449, 1
  %451 = sext i32 %450 to i64
  %452 = getelementptr inbounds %struct.doublecomplex, ptr %445, i64 %451
  %453 = load ptr, ptr %10, align 8, !tbaa !5
  call void @ztrsm_(ptr noundef @.str.5, ptr noundef @.str.5, ptr noundef @.str.4, ptr noundef @.str.3, ptr noundef %23, ptr noundef %24, ptr noundef @c_b1, ptr noundef %443, ptr noundef %444, ptr noundef %452, ptr noundef %453)
  %454 = load ptr, ptr %7, align 8, !tbaa !5
  %455 = load i32, ptr %454, align 4, !tbaa !9
  %456 = load i32, ptr %23, align 4, !tbaa !9
  %457 = sub nsw i32 %455, %456
  store i32 %457, ptr %15, align 4, !tbaa !9
  %458 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double -1.000000e+00, ptr %458, align 8, !tbaa !11
  %459 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double 0.000000e+00, ptr %459, align 8, !tbaa !15
  %460 = load ptr, ptr %9, align 8, !tbaa !5
  %461 = load i32, ptr %23, align 4, !tbaa !9
  %462 = add nsw i32 %461, 1
  %463 = load i32, ptr %13, align 4, !tbaa !9
  %464 = add nsw i32 %462, %463
  %465 = sext i32 %464 to i64
  %466 = getelementptr inbounds %struct.doublecomplex, ptr %460, i64 %465
  %467 = load ptr, ptr %10, align 8, !tbaa !5
  %468 = load ptr, ptr %9, align 8, !tbaa !5
  %469 = load i32, ptr %23, align 4, !tbaa !9
  %470 = add nsw i32 %469, 1
  %471 = load i32, ptr %13, align 4, !tbaa !9
  %472 = mul nsw i32 %470, %471
  %473 = add nsw i32 %472, 1
  %474 = sext i32 %473 to i64
  %475 = getelementptr inbounds %struct.doublecomplex, ptr %468, i64 %474
  %476 = load ptr, ptr %10, align 8, !tbaa !5
  %477 = load ptr, ptr %9, align 8, !tbaa !5
  %478 = load i32, ptr %23, align 4, !tbaa !9
  %479 = add nsw i32 %478, 1
  %480 = load i32, ptr %23, align 4, !tbaa !9
  %481 = add nsw i32 %480, 1
  %482 = load i32, ptr %13, align 4, !tbaa !9
  %483 = mul nsw i32 %481, %482
  %484 = add nsw i32 %479, %483
  %485 = sext i32 %484 to i64
  %486 = getelementptr inbounds %struct.doublecomplex, ptr %477, i64 %485
  %487 = load ptr, ptr %10, align 8, !tbaa !5
  call void @zgemm_(ptr noundef @.str.4, ptr noundef @.str.4, ptr noundef %15, ptr noundef %24, ptr noundef %23, ptr noundef %19, ptr noundef %466, ptr noundef %467, ptr noundef %475, ptr noundef %476, ptr noundef @c_b1, ptr noundef %486, ptr noundef %487)
  %488 = load ptr, ptr %7, align 8, !tbaa !5
  %489 = load i32, ptr %488, align 4, !tbaa !9
  %490 = load i32, ptr %23, align 4, !tbaa !9
  %491 = sub nsw i32 %489, %490
  store i32 %491, ptr %15, align 4, !tbaa !9
  %492 = load ptr, ptr %9, align 8, !tbaa !5
  %493 = load i32, ptr %23, align 4, !tbaa !9
  %494 = add nsw i32 %493, 1
  %495 = load i32, ptr %23, align 4, !tbaa !9
  %496 = add nsw i32 %495, 1
  %497 = load i32, ptr %13, align 4, !tbaa !9
  %498 = mul nsw i32 %496, %497
  %499 = add nsw i32 %494, %498
  %500 = sext i32 %499 to i64
  %501 = getelementptr inbounds %struct.doublecomplex, ptr %492, i64 %500
  %502 = load ptr, ptr %10, align 8, !tbaa !5
  %503 = load ptr, ptr %11, align 8, !tbaa !5
  %504 = load i32, ptr %23, align 4, !tbaa !9
  %505 = add nsw i32 %504, 1
  %506 = sext i32 %505 to i64
  %507 = getelementptr inbounds %struct.doublecomplex, ptr %503, i64 %506
  call void @zlaunhr_col_getrfnp2_(ptr noundef %15, ptr noundef %24, ptr noundef %501, ptr noundef %502, ptr noundef %507, ptr noundef %21)
  br label %508

508:                                              ; preds = %409, %396
  br label %509

509:                                              ; preds = %508, %128
  store i32 1, ptr %25, align 4
  br label %510

510:                                              ; preds = %509, %91, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 16, 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 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  ret void
}

; 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, i32 noundef) #2

declare double @dlamch_(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @Cd(ptr noundef) #3

declare { double, double } @__divdc3(double, double, double, double)

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCd(ptr noundef) #3

declare void @zscal_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @ztrsm_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @zgemm_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, 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 = { inlinehint 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 8}
!13 = !{!"double", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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

%struct.doublecomplex = type { double, double }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@c_b4 = external hidden local_unnamed_addr global double, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@c_b1 = external hidden global %struct.doublecomplex, align 8
@c__1 = external hidden global i32, align 4
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @zlaunhr_col_getrfnp2_(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #0 {
  %7 = alloca i32, align 4
  %8 = alloca %struct.doublecomplex, align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = add i32 %12, 1
  %narrow = xor i32 %12, -1
  %14 = sext i32 %narrow to i64
  %15 = getelementptr inbounds %struct.doublecomplex, ptr %2, i64 %14
  %16 = getelementptr inbounds i8, ptr %4, i64 -16
  store i32 0, ptr %5, align 4, !tbaa !5
  %17 = load i32, ptr %0, align 4, !tbaa !5
  %18 = icmp slt i32 %17, 0
  br i1 %18, label %.thread, label %19

19:                                               ; preds = %6
  %20 = load i32, ptr %1, align 4, !tbaa !5
  %21 = icmp slt i32 %20, 0
  br i1 %21, label %.thread, label %22

22:                                               ; preds = %19
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.umax.i32(i32 %17, i32 1)
  %24 = icmp slt i32 %23, %spec.select
  br i1 %24, label %.thread, label %26

.thread:                                          ; preds = %22, %19, %6
  %.sink = phi i32 [ -1, %6 ], [ -2, %19 ], [ -4, %22 ]
  %.neg135 = phi i32 [ 1, %6 ], [ 2, %19 ], [ 4, %22 ]
  store i32 %.sink, ptr %5, align 4, !tbaa !5
  store i32 %.neg135, ptr %7, align 4, !tbaa !5
  %25 = call i32 @xerbla_(ptr noundef nonnull @.str, ptr noundef nonnull %7, i32 noundef 20) #5
  br label %.loopexit

26:                                               ; preds = %22
  %27 = tail call i32 @llvm.umin.i32(i32 %17, i32 %20)
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %.loopexit, label %29

29:                                               ; preds = %26
  %30 = icmp eq i32 %17, 1
  br i1 %30, label %31, label %51

31:                                               ; preds = %29
  %32 = load double, ptr %2, align 8, !tbaa !9
  %33 = fcmp ult double %32, 0.000000e+00
  %34 = load double, ptr @c_b4, align 8
  %35 = fcmp oge double %34, 0.000000e+00
  %.neg129 = fneg double %34
  br i1 %33, label %38, label %36

36:                                               ; preds = %31
  %37 = select i1 %35, double %34, double %.neg129
  br label %40

38:                                               ; preds = %31
  %39 = select i1 %35, double %.neg129, double %34
  br label %40

40:                                               ; preds = %38, %36
  %41 = phi double [ %37, %36 ], [ %39, %38 ]
  %42 = fneg double %41
  store double %42, ptr %4, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %4, i64 8
  store double 0.000000e+00, ptr %43, align 8, !tbaa !12
  %44 = load double, ptr %2, align 8, !tbaa !9
  %45 = fadd double %41, %44
  %46 = getelementptr inbounds i8, ptr %2, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !12
  %48 = sext i32 %13 to i64
  %49 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %48
  store double %45, ptr %49, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %48, i32 1
  store double %47, ptr %50, align 8, !tbaa !12
  br label %.loopexit

51:                                               ; preds = %29
  %52 = icmp eq i32 %20, 1
  br i1 %52, label %53, label %119

53:                                               ; preds = %51
  %54 = load double, ptr %2, align 8, !tbaa !9
  %55 = fcmp ult double %54, 0.000000e+00
  %56 = load double, ptr @c_b4, align 8
  %57 = fcmp oge double %56, 0.000000e+00
  %.neg = fneg double %56
  br i1 %55, label %60, label %58

58:                                               ; preds = %53
  %59 = select i1 %57, double %56, double %.neg
  br label %62

60:                                               ; preds = %53
  %61 = select i1 %57, double %.neg, double %56
  br label %62

62:                                               ; preds = %60, %58
  %63 = phi double [ %59, %58 ], [ %61, %60 ]
  %64 = fneg double %63
  %65 = getelementptr inbounds i8, ptr %8, i64 8
  store double %64, ptr %4, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %4, i64 8
  store double 0.000000e+00, ptr %66, align 8, !tbaa !12
  %67 = load double, ptr %2, align 8, !tbaa !9
  %68 = fadd double %63, %67
  store double %68, ptr %8, align 16, !tbaa !9
  %69 = getelementptr inbounds i8, ptr %2, i64 8
  %70 = load double, ptr %69, align 8, !tbaa !12
  store double %70, ptr %65, align 8, !tbaa !12
  %71 = sext i32 %13 to i64
  %72 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %71
  store double %68, ptr %72, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %71, i32 1
  store double %70, ptr %73, align 8, !tbaa !12
  %74 = tail call double @dlamch_(ptr noundef nonnull @.str.1) #5
  %75 = load double, ptr %2, align 8, !tbaa !9
  %76 = tail call { double, double } @Cd(ptr noundef nonnull %2)
  %77 = extractvalue { double, double } %76, 1
  %78 = insertelement <2 x double> poison, double %75, i64 0
  %79 = insertelement <2 x double> %78, double %77, i64 1
  %80 = fcmp oge <2 x double> %79, zeroinitializer
  %81 = fneg <2 x double> %79
  %82 = select <2 x i1> %80, <2 x double> %79, <2 x double> %81
  %shift = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %83 = fadd <2 x double> %82, %shift
  %84 = extractelement <2 x double> %83, i64 0
  %85 = fcmp ult double %84, %74
  %86 = load i32, ptr %0, align 4, !tbaa !5
  br i1 %85, label %103, label %87

87:                                               ; preds = %62
  %88 = add nsw i32 %86, -1
  store i32 %88, ptr %7, align 4, !tbaa !5
  %89 = tail call { double, double } @Cd(ptr noundef nonnull @c_b1)
  %90 = extractvalue { double, double } %89, 0
  %91 = extractvalue { double, double } %89, 1
  %92 = tail call { double, double } @Cd(ptr noundef nonnull %2)
  %93 = extractvalue { double, double } %92, 0
  %94 = extractvalue { double, double } %92, 1
  %95 = tail call { double, double } @__divdc3(double noundef %90, double noundef %91, double noundef %93, double noundef %94) #5
  %96 = extractvalue { double, double } %95, 0
  %97 = extractvalue { double, double } %95, 1
  %98 = call ptr @_pCd(ptr noundef nonnull %8)
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  store double %96, ptr %98, align 8
  store double %97, ptr %99, align 8
  %100 = sext i32 %12 to i64
  %101 = getelementptr %struct.doublecomplex, ptr %15, i64 %100
  %102 = getelementptr i8, ptr %101, i64 32
  call void @zscal_(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %102, ptr noundef nonnull @c__1) #5
  br label %.loopexit

103:                                              ; preds = %62
  store i32 %86, ptr %7, align 4, !tbaa !5
  %.not128132 = icmp slt i32 %86, 2
  br i1 %.not128132, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %103
  %104 = sext i32 %12 to i64
  %invariant.gep = getelementptr %struct.doublecomplex, ptr %15, i64 %104
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %gep = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %indvars.iv
  %105 = call { double, double } @Cd(ptr noundef nonnull %gep)
  %106 = extractvalue { double, double } %105, 0
  %107 = extractvalue { double, double } %105, 1
  %108 = call { double, double } @Cd(ptr noundef nonnull %2)
  %109 = extractvalue { double, double } %108, 0
  %110 = extractvalue { double, double } %108, 1
  %111 = call { double, double } @__divdc3(double noundef %106, double noundef %107, double noundef %109, double noundef %110) #5
  %112 = extractvalue { double, double } %111, 0
  %113 = extractvalue { double, double } %111, 1
  %114 = call ptr @_pCd(ptr noundef nonnull %8)
  %115 = getelementptr inbounds i8, ptr %114, i64 8
  store double %112, ptr %114, align 8
  store double %113, ptr %115, align 8
  %116 = load <2 x double>, ptr %8, align 16, !tbaa !13
  store <2 x double> %116, ptr %gep, align 8, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %.not128.not = icmp slt i64 %indvars.iv, %118
  br i1 %.not128.not, label %.lr.ph, label %.loopexit, !llvm.loop !14

119:                                              ; preds = %51
  %120 = lshr i32 %27, 1
  store i32 %120, ptr %10, align 4, !tbaa !5
  %121 = sub nsw i32 %20, %120
  store i32 %121, ptr %11, align 4, !tbaa !5
  call void @zlaunhr_col_getrfnp2_(ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %9)
  %122 = load i32, ptr %0, align 4, !tbaa !5
  %123 = sub nsw i32 %122, %120
  store i32 %123, ptr %7, align 4, !tbaa !5
  %124 = add i32 %13, %120
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %125
  call void @ztrsm_(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.4, ptr noundef nonnull %7, ptr noundef nonnull %10, ptr noundef nonnull @c_b1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %126, ptr noundef nonnull %3) #5
  %127 = load i32, ptr %10, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  %129 = mul nsw i32 %128, %12
  %130 = sext i32 %129 to i64
  %131 = getelementptr %struct.doublecomplex, ptr %15, i64 %130
  %132 = getelementptr i8, ptr %131, i64 16
  call void @ztrsm_(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull @c_b1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %132, ptr noundef nonnull %3) #5
  %133 = load i32, ptr %0, align 4, !tbaa !5
  %134 = load i32, ptr %10, align 4, !tbaa !5
  %135 = sub nsw i32 %133, %134
  store i32 %135, ptr %7, align 4, !tbaa !5
  store <2 x double> <double -1.000000e+00, double 0.000000e+00>, ptr %8, align 16, !tbaa !13
  %136 = add nsw i32 %134, 1
  %137 = add nsw i32 %136, %12
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %138
  %140 = mul nsw i32 %136, %12
  %141 = sext i32 %140 to i64
  %142 = getelementptr %struct.doublecomplex, ptr %15, i64 %141
  %143 = getelementptr i8, ptr %142, i64 16
  %144 = add nsw i32 %140, %136
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %145
  call void @zgemm_(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.4, ptr noundef nonnull %7, ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef nonnull %8, ptr noundef %139, ptr noundef nonnull %3, ptr noundef %143, ptr noundef nonnull %3, ptr noundef nonnull @c_b1, ptr noundef %146, ptr noundef nonnull %3) #5
  %147 = load i32, ptr %0, align 4, !tbaa !5
  %148 = load i32, ptr %10, align 4, !tbaa !5
  %149 = sub nsw i32 %147, %148
  store i32 %149, ptr %7, align 4, !tbaa !5
  %150 = add nsw i32 %148, 1
  %151 = mul i32 %150, %13
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %152
  %154 = sext i32 %150 to i64
  %155 = getelementptr inbounds %struct.doublecomplex, ptr %16, i64 %154
  call void @zlaunhr_col_getrfnp2_(ptr noundef nonnull %7, ptr noundef nonnull %11, ptr noundef %153, ptr noundef nonnull %3, ptr noundef nonnull %155, ptr noundef nonnull %9)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %103, %40, %87, %119, %26, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  ret void
}

; 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, i32 noundef) local_unnamed_addr #2

declare double @dlamch_(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @Cd(ptr noundef) local_unnamed_addr #3

declare { double, double } @__divdc3(double, double, double, double) local_unnamed_addr

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCd(ptr noundef) local_unnamed_addr #3

declare void @zscal_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @ztrsm_(ptr noundef, 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 void @zgemm_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, 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 i32 @llvm.umax.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #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 = { inlinehint 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 8}
!11 = !{!"double", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass