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

; 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 [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@c_n1 = external hidden global i32, align 4
@c__2 = external hidden global i32, align 4
@c__3 = external hidden global i32, align 4
@c__4 = external hidden global i32, align 4
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@c_b26 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @dsygv_2stage_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) #0 {
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca [1 x i8], align 1
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  store ptr %0, ptr %13, align 8, !tbaa !5
  store ptr %1, ptr %14, align 8, !tbaa !5
  store ptr %2, ptr %15, align 8, !tbaa !5
  store ptr %3, ptr %16, align 8, !tbaa !5
  store ptr %4, ptr %17, align 8, !tbaa !5
  store ptr %5, ptr %18, align 8, !tbaa !5
  store ptr %6, ptr %19, align 8, !tbaa !5
  store ptr %7, ptr %20, align 8, !tbaa !5
  store ptr %8, ptr %21, align 8, !tbaa !5
  store ptr %9, ptr %22, align 8, !tbaa !5
  store ptr %10, ptr %23, align 8, !tbaa !5
  store ptr %11, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #3
  %41 = load ptr, ptr %18, align 8, !tbaa !5
  %42 = load i32, ptr %41, align 4, !tbaa !9
  store i32 %42, ptr %25, align 4, !tbaa !9
  %43 = load i32, ptr %25, align 4, !tbaa !9
  %44 = mul nsw i32 %43, 1
  %45 = add nsw i32 1, %44
  store i32 %45, ptr %26, align 4, !tbaa !9
  %46 = load i32, ptr %26, align 4, !tbaa !9
  %47 = load ptr, ptr %17, align 8, !tbaa !5
  %48 = sext i32 %46 to i64
  %49 = sub i64 0, %48
  %50 = getelementptr inbounds double, ptr %47, i64 %49
  store ptr %50, ptr %17, align 8, !tbaa !5
  %51 = load ptr, ptr %20, align 8, !tbaa !5
  %52 = load i32, ptr %51, align 4, !tbaa !9
  store i32 %52, ptr %27, align 4, !tbaa !9
  %53 = load i32, ptr %27, align 4, !tbaa !9
  %54 = mul nsw i32 %53, 1
  %55 = add nsw i32 1, %54
  store i32 %55, ptr %28, align 4, !tbaa !9
  %56 = load i32, ptr %28, align 4, !tbaa !9
  %57 = load ptr, ptr %19, align 8, !tbaa !5
  %58 = sext i32 %56 to i64
  %59 = sub i64 0, %58
  %60 = getelementptr inbounds double, ptr %57, i64 %59
  store ptr %60, ptr %19, align 8, !tbaa !5
  %61 = load ptr, ptr %21, align 8, !tbaa !5
  %62 = getelementptr inbounds double, ptr %61, i32 -1
  store ptr %62, ptr %21, align 8, !tbaa !5
  %63 = load ptr, ptr %22, align 8, !tbaa !5
  %64 = getelementptr inbounds double, ptr %63, i32 -1
  store ptr %64, ptr %22, align 8, !tbaa !5
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  %66 = call i32 @lsame_(ptr noundef %65, ptr noundef @.str)
  store i32 %66, ptr %36, align 4, !tbaa !9
  %67 = load ptr, ptr %15, align 8, !tbaa !5
  %68 = call i32 @lsame_(ptr noundef %67, ptr noundef @.str.1)
  store i32 %68, ptr %34, align 4, !tbaa !9
  %69 = load ptr, ptr %23, align 8, !tbaa !5
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = icmp eq i32 %70, -1
  %72 = zext i1 %71 to i32
  store i32 %72, ptr %39, align 4, !tbaa !9
  %73 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 0, ptr %73, align 4, !tbaa !9
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = icmp slt i32 %75, 1
  br i1 %76, label %81, label %77

77:                                               ; preds = %12
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = icmp sgt i32 %79, 3
  br i1 %80, label %81, label %83

81:                                               ; preds = %77, %12
  %82 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 -1, ptr %82, align 4, !tbaa !9
  br label %139

83:                                               ; preds = %77
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = call i32 @lsame_(ptr noundef %84, ptr noundef @.str.2)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %89, label %87

87:                                               ; preds = %83
  %88 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 -2, ptr %88, align 4, !tbaa !9
  br label %138

89:                                               ; preds = %83
  %90 = load i32, ptr %34, align 4, !tbaa !9
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %98, label %92

92:                                               ; preds = %89
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = call i32 @lsame_(ptr noundef %93, ptr noundef @.str.3)
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %98, label %96

96:                                               ; preds = %92
  %97 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 -3, ptr %97, align 4, !tbaa !9
  br label %137

98:                                               ; preds = %92, %89
  %99 = load ptr, ptr %16, align 8, !tbaa !5
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = icmp slt i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %98
  %103 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 -4, ptr %103, align 4, !tbaa !9
  br label %136

104:                                              ; preds = %98
  %105 = load ptr, ptr %18, align 8, !tbaa !5
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = icmp sge i32 1, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %104
  br label %114

111:                                              ; preds = %104
  %112 = load ptr, ptr %16, align 8, !tbaa !5
  %113 = load i32, ptr %112, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %111, %110
  %115 = phi i32 [ 1, %110 ], [ %113, %111 ]
  %116 = icmp slt i32 %106, %115
  br i1 %116, label %117, label %119

117:                                              ; preds = %114
  %118 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 -6, ptr %118, align 4, !tbaa !9
  br label %135

119:                                              ; preds = %114
  %120 = load ptr, ptr %20, align 8, !tbaa !5
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = load ptr, ptr %16, align 8, !tbaa !5
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = icmp sge i32 1, %123
  br i1 %124, label %125, label %126

125:                                              ; preds = %119
  br label %129

126:                                              ; preds = %119
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = load i32, ptr %127, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %126, %125
  %130 = phi i32 [ 1, %125 ], [ %128, %126 ]
  %131 = icmp slt i32 %121, %130
  br i1 %131, label %132, label %134

132:                                              ; preds = %129
  %133 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 -8, ptr %133, align 4, !tbaa !9
  br label %134

134:                                              ; preds = %132, %129
  br label %135

135:                                              ; preds = %134, %117
  br label %136

136:                                              ; preds = %135, %102
  br label %137

137:                                              ; preds = %136, %96
  br label %138

138:                                              ; preds = %137, %87
  br label %139

139:                                              ; preds = %138, %81
  %140 = load ptr, ptr %24, align 8, !tbaa !5
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %143, label %177

143:                                              ; preds = %139
  %144 = load ptr, ptr %14, align 8, !tbaa !5
  %145 = load ptr, ptr %16, align 8, !tbaa !5
  %146 = call i32 @ilaenv2stage_(ptr noundef @c__1, ptr noundef @.str.4, ptr noundef %144, ptr noundef %145, ptr noundef @c_n1, ptr noundef @c_n1, ptr noundef @c_n1)
  store i32 %146, ptr %38, align 4, !tbaa !9
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = call i32 @ilaenv2stage_(ptr noundef @c__2, ptr noundef @.str.4, ptr noundef %147, ptr noundef %148, ptr noundef %38, ptr noundef @c_n1, ptr noundef @c_n1)
  store i32 %149, ptr %37, align 4, !tbaa !9
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = load ptr, ptr %16, align 8, !tbaa !5
  %152 = call i32 @ilaenv2stage_(ptr noundef @c__3, ptr noundef @.str.4, ptr noundef %150, ptr noundef %151, ptr noundef %38, ptr noundef %37, ptr noundef @c_n1)
  store i32 %152, ptr %31, align 4, !tbaa !9
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = call i32 @ilaenv2stage_(ptr noundef @c__4, ptr noundef @.str.4, ptr noundef %153, ptr noundef %154, ptr noundef %38, ptr noundef %37, ptr noundef @c_n1)
  store i32 %155, ptr %35, align 4, !tbaa !9
  %156 = load ptr, ptr %16, align 8, !tbaa !5
  %157 = load i32, ptr %156, align 4, !tbaa !9
  %158 = shl i32 %157, 1
  %159 = load i32, ptr %31, align 4, !tbaa !9
  %160 = add nsw i32 %158, %159
  %161 = load i32, ptr %35, align 4, !tbaa !9
  %162 = add nsw i32 %160, %161
  store i32 %162, ptr %32, align 4, !tbaa !9
  %163 = load i32, ptr %32, align 4, !tbaa !9
  %164 = sitofp i32 %163 to double
  %165 = load ptr, ptr %22, align 8, !tbaa !5
  %166 = getelementptr inbounds double, ptr %165, i64 1
  store double %164, ptr %166, align 8, !tbaa !11
  %167 = load ptr, ptr %23, align 8, !tbaa !5
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = load i32, ptr %32, align 4, !tbaa !9
  %170 = icmp slt i32 %168, %169
  br i1 %170, label %171, label %176

171:                                              ; preds = %143
  %172 = load i32, ptr %39, align 4, !tbaa !9
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %176, label %174

174:                                              ; preds = %171
  %175 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 -11, ptr %175, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %174, %171, %143
  br label %177

177:                                              ; preds = %176, %139
  %178 = load ptr, ptr %24, align 8, !tbaa !5
  %179 = load i32, ptr %178, align 4, !tbaa !9
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %186

181:                                              ; preds = %177
  %182 = load ptr, ptr %24, align 8, !tbaa !5
  %183 = load i32, ptr %182, align 4, !tbaa !9
  %184 = sub nsw i32 0, %183
  store i32 %184, ptr %29, align 4, !tbaa !9
  %185 = call i32 @xerbla_(ptr noundef @.str.5, ptr noundef %29, i32 noundef 13)
  store i32 1, ptr %40, align 4
  br label %318

186:                                              ; preds = %177
  %187 = load i32, ptr %39, align 4, !tbaa !9
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %190

189:                                              ; preds = %186
  store i32 1, ptr %40, align 4
  br label %318

190:                                              ; preds = %186
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %16, align 8, !tbaa !5
  %193 = load i32, ptr %192, align 4, !tbaa !9
  %194 = icmp eq i32 %193, 0
  br i1 %194, label %195, label %196

195:                                              ; preds = %191
  store i32 1, ptr %40, align 4
  br label %318

196:                                              ; preds = %191
  %197 = load ptr, ptr %15, align 8, !tbaa !5
  %198 = load ptr, ptr %16, align 8, !tbaa !5
  %199 = load ptr, ptr %19, align 8, !tbaa !5
  %200 = load i32, ptr %28, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds double, ptr %199, i64 %201
  %203 = load ptr, ptr %20, align 8, !tbaa !5
  %204 = load ptr, ptr %24, align 8, !tbaa !5
  %205 = call i32 @dpotrf_(ptr noundef %197, ptr noundef %198, ptr noundef %202, ptr noundef %203, ptr noundef %204)
  %206 = load ptr, ptr %24, align 8, !tbaa !5
  %207 = load i32, ptr %206, align 4, !tbaa !9
  %208 = icmp ne i32 %207, 0
  br i1 %208, label %209, label %216

209:                                              ; preds = %196
  %210 = load ptr, ptr %16, align 8, !tbaa !5
  %211 = load i32, ptr %210, align 4, !tbaa !9
  %212 = load ptr, ptr %24, align 8, !tbaa !5
  %213 = load i32, ptr %212, align 4, !tbaa !9
  %214 = add nsw i32 %211, %213
  %215 = load ptr, ptr %24, align 8, !tbaa !5
  store i32 %214, ptr %215, align 4, !tbaa !9
  store i32 1, ptr %40, align 4
  br label %318

216:                                              ; preds = %196
  %217 = load ptr, ptr %13, align 8, !tbaa !5
  %218 = load ptr, ptr %15, align 8, !tbaa !5
  %219 = load ptr, ptr %16, align 8, !tbaa !5
  %220 = load ptr, ptr %17, align 8, !tbaa !5
  %221 = load i32, ptr %26, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds double, ptr %220, i64 %222
  %224 = load ptr, ptr %18, align 8, !tbaa !5
  %225 = load ptr, ptr %19, align 8, !tbaa !5
  %226 = load i32, ptr %28, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds double, ptr %225, i64 %227
  %229 = load ptr, ptr %20, align 8, !tbaa !5
  %230 = load ptr, ptr %24, align 8, !tbaa !5
  call void @dsygst_(ptr noundef %217, ptr noundef %218, ptr noundef %219, ptr noundef %223, ptr noundef %224, ptr noundef %228, ptr noundef %229, ptr noundef %230)
  %231 = load ptr, ptr %14, align 8, !tbaa !5
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  %233 = load ptr, ptr %16, align 8, !tbaa !5
  %234 = load ptr, ptr %17, align 8, !tbaa !5
  %235 = load i32, ptr %26, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds double, ptr %234, i64 %236
  %238 = load ptr, ptr %18, align 8, !tbaa !5
  %239 = load ptr, ptr %21, align 8, !tbaa !5
  %240 = getelementptr inbounds double, ptr %239, i64 1
  %241 = load ptr, ptr %22, align 8, !tbaa !5
  %242 = getelementptr inbounds double, ptr %241, i64 1
  %243 = load ptr, ptr %23, align 8, !tbaa !5
  %244 = load ptr, ptr %24, align 8, !tbaa !5
  call void @dsyev_2stage_(ptr noundef %231, ptr noundef %232, ptr noundef %233, ptr noundef %237, ptr noundef %238, ptr noundef %240, ptr noundef %242, ptr noundef %243, ptr noundef %244)
  %245 = load i32, ptr %36, align 4, !tbaa !9
  %246 = icmp ne i32 %245, 0
  br i1 %246, label %247, label %313

247:                                              ; preds = %216
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  %249 = load i32, ptr %248, align 4, !tbaa !9
  store i32 %249, ptr %30, align 4, !tbaa !9
  %250 = load ptr, ptr %24, align 8, !tbaa !5
  %251 = load i32, ptr %250, align 4, !tbaa !9
  %252 = icmp sgt i32 %251, 0
  br i1 %252, label %253, label %257

253:                                              ; preds = %247
  %254 = load ptr, ptr %24, align 8, !tbaa !5
  %255 = load i32, ptr %254, align 4, !tbaa !9
  %256 = sub nsw i32 %255, 1
  store i32 %256, ptr %30, align 4, !tbaa !9
  br label %257

257:                                              ; preds = %253, %247
  %258 = load ptr, ptr %13, align 8, !tbaa !5
  %259 = load i32, ptr %258, align 4, !tbaa !9
  %260 = icmp eq i32 %259, 1
  br i1 %260, label %265, label %261

261:                                              ; preds = %257
  %262 = load ptr, ptr %13, align 8, !tbaa !5
  %263 = load i32, ptr %262, align 4, !tbaa !9
  %264 = icmp eq i32 %263, 2
  br i1 %264, label %265, label %286

265:                                              ; preds = %261, %257
  %266 = load i32, ptr %34, align 4, !tbaa !9
  %267 = icmp ne i32 %266, 0
  br i1 %267, label %268, label %270

268:                                              ; preds = %265
  %269 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  store i8 78, ptr %269, align 1, !tbaa !13
  br label %272

270:                                              ; preds = %265
  %271 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  store i8 84, ptr %271, align 1, !tbaa !13
  br label %272

272:                                              ; preds = %270, %268
  %273 = load ptr, ptr %15, align 8, !tbaa !5
  %274 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  %275 = load ptr, ptr %16, align 8, !tbaa !5
  %276 = load ptr, ptr %19, align 8, !tbaa !5
  %277 = load i32, ptr %28, align 4, !tbaa !9
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds double, ptr %276, i64 %278
  %280 = load ptr, ptr %20, align 8, !tbaa !5
  %281 = load ptr, ptr %17, align 8, !tbaa !5
  %282 = load i32, ptr %26, align 4, !tbaa !9
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds double, ptr %281, i64 %283
  %285 = load ptr, ptr %18, align 8, !tbaa !5
  call void @dtrsm_(ptr noundef @.str.6, ptr noundef %273, ptr noundef %274, ptr noundef @.str.7, ptr noundef %275, ptr noundef %30, ptr noundef @c_b26, ptr noundef %279, ptr noundef %280, ptr noundef %284, ptr noundef %285)
  br label %312

286:                                              ; preds = %261
  %287 = load ptr, ptr %13, align 8, !tbaa !5
  %288 = load i32, ptr %287, align 4, !tbaa !9
  %289 = icmp eq i32 %288, 3
  br i1 %289, label %290, label %311

290:                                              ; preds = %286
  %291 = load i32, ptr %34, align 4, !tbaa !9
  %292 = icmp ne i32 %291, 0
  br i1 %292, label %293, label %295

293:                                              ; preds = %290
  %294 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  store i8 84, ptr %294, align 1, !tbaa !13
  br label %297

295:                                              ; preds = %290
  %296 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  store i8 78, ptr %296, align 1, !tbaa !13
  br label %297

297:                                              ; preds = %295, %293
  %298 = load ptr, ptr %15, align 8, !tbaa !5
  %299 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  %300 = load ptr, ptr %16, align 8, !tbaa !5
  %301 = load ptr, ptr %19, align 8, !tbaa !5
  %302 = load i32, ptr %28, align 4, !tbaa !9
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds double, ptr %301, i64 %303
  %305 = load ptr, ptr %20, align 8, !tbaa !5
  %306 = load ptr, ptr %17, align 8, !tbaa !5
  %307 = load i32, ptr %26, align 4, !tbaa !9
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds double, ptr %306, i64 %308
  %310 = load ptr, ptr %18, align 8, !tbaa !5
  call void @dtrmm_(ptr noundef @.str.6, ptr noundef %298, ptr noundef %299, ptr noundef @.str.7, ptr noundef %300, ptr noundef %30, ptr noundef @c_b26, ptr noundef %304, ptr noundef %305, ptr noundef %309, ptr noundef %310)
  br label %311

311:                                              ; preds = %297, %286
  br label %312

312:                                              ; preds = %311, %272
  br label %313

313:                                              ; preds = %312, %216
  %314 = load i32, ptr %32, align 4, !tbaa !9
  %315 = sitofp i32 %314 to double
  %316 = load ptr, ptr %22, align 8, !tbaa !5
  %317 = getelementptr inbounds double, ptr %316, i64 1
  store double %315, ptr %317, align 8, !tbaa !11
  store i32 1, ptr %40, align 4
  br label %318

318:                                              ; preds = %313, %209, %195, %189, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  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 @lsame_(ptr noundef, ptr noundef) #2

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

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

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

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

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

declare void @dtrsm_(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 @dtrmm_(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 = { 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 = !{!7, !7, i64 0}


; 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 [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@c_n1 = external hidden global i32, align 4
@c__2 = external hidden global i32, align 4
@c__3 = external hidden global i32, align 4
@c__4 = external hidden global i32, align 4
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@c_b26 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @dsygv_2stage_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) local_unnamed_addr #0 {
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [1 x i8], align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #4
  %18 = tail call i32 @lsame_(ptr noundef %1, ptr noundef nonnull @.str) #4
  %19 = tail call i32 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.1) #4
  %20 = load i32, ptr %10, align 4, !tbaa !5
  %21 = icmp eq i32 %20, -1
  store i32 0, ptr %11, align 4, !tbaa !5
  %22 = load i32, ptr %0, align 4, !tbaa !5
  %23 = add i32 %22, -4
  %or.cond127 = icmp ult i32 %23, -3
  br i1 %or.cond127, label %.thread134.sink.split, label %24

24:                                               ; preds = %12
  %25 = tail call i32 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.2) #4
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %.thread134.sink.split, label %26

26:                                               ; preds = %24
  %.not119 = icmp eq i32 %19, 0
  br i1 %.not119, label %27, label %29

27:                                               ; preds = %26
  %28 = tail call i32 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.3) #4
  %.not120 = icmp eq i32 %28, 0
  br i1 %.not120, label %.thread134.sink.split, label %29

29:                                               ; preds = %27, %26
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %.thread134.sink.split, label %32

32:                                               ; preds = %29
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.umax.i32(i32 %30, i32 1)
  %34 = icmp slt i32 %33, %spec.select
  br i1 %34, label %.thread134.sink.split, label %35

35:                                               ; preds = %32
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = icmp slt i32 %36, %spec.select
  br i1 %37, label %.thread134.sink.split, label %38

38:                                               ; preds = %35
  %.pr = load i32, ptr %11, align 4, !tbaa !5
  %39 = icmp eq i32 %.pr, 0
  br i1 %39, label %40, label %.thread134

40:                                               ; preds = %38
  %41 = tail call i32 @ilaenv2stage_(ptr noundef nonnull @c__1, ptr noundef nonnull @.str.4, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull @c_n1, ptr noundef nonnull @c_n1, ptr noundef nonnull @c_n1) #4
  store i32 %41, ptr %17, align 4, !tbaa !5
  %42 = call i32 @ilaenv2stage_(ptr noundef nonnull @c__2, ptr noundef nonnull @.str.4, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull %17, ptr noundef nonnull @c_n1, ptr noundef nonnull @c_n1) #4
  store i32 %42, ptr %16, align 4, !tbaa !5
  %43 = call i32 @ilaenv2stage_(ptr noundef nonnull @c__3, ptr noundef nonnull @.str.4, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull %17, ptr noundef nonnull %16, ptr noundef nonnull @c_n1) #4
  %44 = call i32 @ilaenv2stage_(ptr noundef nonnull @c__4, ptr noundef nonnull @.str.4, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull %17, ptr noundef nonnull %16, ptr noundef nonnull @c_n1) #4
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = shl i32 %45, 1
  %47 = add i32 %44, %43
  %48 = add i32 %47, %46
  %49 = sitofp i32 %48 to double
  store double %49, ptr %9, align 8, !tbaa !9
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = icmp sge i32 %50, %48
  %or.cond = select i1 %51, i1 true, i1 %21
  br i1 %or.cond, label %.thread, label %.thread134.sink.split

.thread:                                          ; preds = %40
  %.pr131.pr = load i32, ptr %11, align 4, !tbaa !5
  %.not121 = icmp eq i32 %.pr131.pr, 0
  br i1 %.not121, label %55, label %.thread134

.thread134.sink.split:                            ; preds = %40, %35, %32, %29, %27, %24, %12
  %.sink = phi i32 [ -1, %12 ], [ -2, %24 ], [ -3, %27 ], [ -4, %29 ], [ -6, %32 ], [ -8, %35 ], [ -11, %40 ]
  store i32 %.sink, ptr %11, align 4, !tbaa !5
  br label %.thread134

.thread134:                                       ; preds = %.thread134.sink.split, %38, %.thread
  %52 = phi i32 [ %.pr131.pr, %.thread ], [ %.pr, %38 ], [ %.sink, %.thread134.sink.split ]
  %53 = sub nsw i32 0, %52
  store i32 %53, ptr %13, align 4, !tbaa !5
  %54 = call i32 @xerbla_(ptr noundef nonnull @.str.5, ptr noundef nonnull %13, i32 noundef 13) #4
  br label %75

55:                                               ; preds = %.thread
  %56 = icmp eq i32 %45, 0
  %or.cond140 = or i1 %21, %56
  br i1 %or.cond140, label %75, label %57

57:                                               ; preds = %55
  %58 = call i32 @dpotrf_(ptr noundef %2, ptr noundef nonnull %3, ptr noundef %6, ptr noundef nonnull %7, ptr noundef nonnull %11) #4
  %59 = load i32, ptr %11, align 4, !tbaa !5
  %.not122 = icmp eq i32 %59, 0
  br i1 %.not122, label %63, label %60

60:                                               ; preds = %57
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = add nsw i32 %61, %59
  store i32 %62, ptr %11, align 4, !tbaa !5
  br label %75

63:                                               ; preds = %57
  call void @dsygst_(ptr noundef nonnull %0, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef %6, ptr noundef nonnull %7, ptr noundef nonnull %11) #4
  call void @dsyev_2stage_(ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  %.not123 = icmp eq i32 %18, 0
  br i1 %.not123, label %74, label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %65, ptr %14, align 4, !tbaa !5
  %66 = load i32, ptr %11, align 4, !tbaa !5
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %64
  %69 = add nsw i32 %66, -1
  store i32 %69, ptr %14, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %68, %64
  %71 = load i32, ptr %0, align 4, !tbaa !5
  switch i32 %71, label %74 [
    i32 1, label %72
    i32 2, label %72
    i32 3, label %73
  ]

72:                                               ; preds = %70, %70
  %. = select i1 %.not119, i8 84, i8 78
  store i8 %., ptr %15, align 1, !tbaa !11
  call void @dtrsm_(ptr noundef nonnull @.str.6, ptr noundef %2, ptr noundef nonnull %15, ptr noundef nonnull @.str.7, ptr noundef nonnull %3, ptr noundef nonnull %14, ptr noundef nonnull @c_b26, ptr noundef %6, ptr noundef nonnull %7, ptr noundef %4, ptr noundef nonnull %5) #4
  br label %74

73:                                               ; preds = %70
  %.129 = select i1 %.not119, i8 78, i8 84
  store i8 %.129, ptr %15, align 1, !tbaa !11
  call void @dtrmm_(ptr noundef nonnull @.str.6, ptr noundef %2, ptr noundef nonnull %15, ptr noundef nonnull @.str.7, ptr noundef nonnull %3, ptr noundef nonnull %14, ptr noundef nonnull @c_b26, ptr noundef %6, ptr noundef nonnull %7, ptr noundef %4, ptr noundef nonnull %5) #4
  br label %74

74:                                               ; preds = %70, %72, %73, %63
  store double %49, ptr %9, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %55, %74, %60, %.thread134
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  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 @lsame_(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

declare void @dtrsm_(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 @dtrmm_(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) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !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 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass