; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (chegv_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"

%struct.complex = type { float, float }

@.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_b1 = external hidden global %struct.complex, align 4

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

81:                                               ; preds = %13
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = icmp sgt i32 %83, 3
  br i1 %84, label %85, label %87

85:                                               ; preds = %81, %13
  %86 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 -1, ptr %86, align 4, !tbaa !9
  br label %143

87:                                               ; preds = %81
  %88 = load ptr, ptr %15, align 8, !tbaa !5
  %89 = call i32 @lsame_(ptr noundef %88, ptr noundef @.str.2)
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %93, label %91

91:                                               ; preds = %87
  %92 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 -2, ptr %92, align 4, !tbaa !9
  br label %142

93:                                               ; preds = %87
  %94 = load i32, ptr %36, align 4, !tbaa !9
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %102, label %96

96:                                               ; preds = %93
  %97 = load ptr, ptr %16, align 8, !tbaa !5
  %98 = call i32 @lsame_(ptr noundef %97, ptr noundef @.str.3)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %102, label %100

100:                                              ; preds = %96
  %101 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 -3, ptr %101, align 4, !tbaa !9
  br label %141

102:                                              ; preds = %96, %93
  %103 = load ptr, ptr %17, align 8, !tbaa !5
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = icmp slt i32 %104, 0
  br i1 %105, label %106, label %108

106:                                              ; preds = %102
  %107 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 -4, ptr %107, align 4, !tbaa !9
  br label %140

108:                                              ; preds = %102
  %109 = load ptr, ptr %19, align 8, !tbaa !5
  %110 = load i32, ptr %109, align 4, !tbaa !9
  %111 = load ptr, ptr %17, align 8, !tbaa !5
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = icmp sge i32 1, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %108
  br label %118

115:                                              ; preds = %108
  %116 = load ptr, ptr %17, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %115, %114
  %119 = phi i32 [ 1, %114 ], [ %117, %115 ]
  %120 = icmp slt i32 %110, %119
  br i1 %120, label %121, label %123

121:                                              ; preds = %118
  %122 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 -6, ptr %122, align 4, !tbaa !9
  br label %139

123:                                              ; preds = %118
  %124 = load ptr, ptr %21, align 8, !tbaa !5
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp sge i32 1, %127
  br i1 %128, label %129, label %130

129:                                              ; preds = %123
  br label %133

130:                                              ; preds = %123
  %131 = load ptr, ptr %17, align 8, !tbaa !5
  %132 = load i32, ptr %131, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %130, %129
  %134 = phi i32 [ 1, %129 ], [ %132, %130 ]
  %135 = icmp slt i32 %125, %134
  br i1 %135, label %136, label %138

136:                                              ; preds = %133
  %137 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 -8, ptr %137, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %136, %133
  br label %139

139:                                              ; preds = %138, %121
  br label %140

140:                                              ; preds = %139, %106
  br label %141

141:                                              ; preds = %140, %100
  br label %142

142:                                              ; preds = %141, %91
  br label %143

143:                                              ; preds = %142, %85
  %144 = load ptr, ptr %26, align 8, !tbaa !5
  %145 = load i32, ptr %144, align 4, !tbaa !9
  %146 = icmp eq i32 %145, 0
  br i1 %146, label %147, label %184

147:                                              ; preds = %143
  %148 = load ptr, ptr %15, align 8, !tbaa !5
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  %150 = call i32 @ilaenv2stage_(ptr noundef @c__1, ptr noundef @.str.4, ptr noundef %148, ptr noundef %149, ptr noundef @c_n1, ptr noundef @c_n1, ptr noundef @c_n1)
  store i32 %150, ptr %40, align 4, !tbaa !9
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = load ptr, ptr %17, align 8, !tbaa !5
  %153 = call i32 @ilaenv2stage_(ptr noundef @c__2, ptr noundef @.str.4, ptr noundef %151, ptr noundef %152, ptr noundef %40, ptr noundef @c_n1, ptr noundef @c_n1)
  store i32 %153, ptr %39, align 4, !tbaa !9
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  %156 = call i32 @ilaenv2stage_(ptr noundef @c__3, ptr noundef @.str.4, ptr noundef %154, ptr noundef %155, ptr noundef %40, ptr noundef %39, ptr noundef @c_n1)
  store i32 %156, ptr %33, align 4, !tbaa !9
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = call i32 @ilaenv2stage_(ptr noundef @c__4, ptr noundef @.str.4, ptr noundef %157, ptr noundef %158, ptr noundef %40, ptr noundef %39, ptr noundef @c_n1)
  store i32 %159, ptr %37, align 4, !tbaa !9
  %160 = load ptr, ptr %17, align 8, !tbaa !5
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = load i32, ptr %33, align 4, !tbaa !9
  %163 = add nsw i32 %161, %162
  %164 = load i32, ptr %37, align 4, !tbaa !9
  %165 = add nsw i32 %163, %164
  store i32 %165, ptr %34, align 4, !tbaa !9
  %166 = load i32, ptr %34, align 4, !tbaa !9
  %167 = sitofp i32 %166 to float
  %168 = load ptr, ptr %23, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.complex, ptr %168, i64 1
  %170 = getelementptr inbounds %struct.complex, ptr %169, i32 0, i32 0
  store float %167, ptr %170, align 4, !tbaa !11
  %171 = load ptr, ptr %23, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.complex, ptr %171, i64 1
  %173 = getelementptr inbounds %struct.complex, ptr %172, i32 0, i32 1
  store float 0.000000e+00, ptr %173, align 4, !tbaa !14
  %174 = load ptr, ptr %24, align 8, !tbaa !5
  %175 = load i32, ptr %174, align 4, !tbaa !9
  %176 = load i32, ptr %34, align 4, !tbaa !9
  %177 = icmp slt i32 %175, %176
  br i1 %177, label %178, label %183

178:                                              ; preds = %147
  %179 = load i32, ptr %41, align 4, !tbaa !9
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %183, label %181

181:                                              ; preds = %178
  %182 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 -11, ptr %182, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %181, %178, %147
  br label %184

184:                                              ; preds = %183, %143
  %185 = load ptr, ptr %26, align 8, !tbaa !5
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = icmp ne i32 %186, 0
  br i1 %187, label %188, label %193

188:                                              ; preds = %184
  %189 = load ptr, ptr %26, align 8, !tbaa !5
  %190 = load i32, ptr %189, align 4, !tbaa !9
  %191 = sub nsw i32 0, %190
  store i32 %191, ptr %31, align 4, !tbaa !9
  %192 = call i32 @xerbla_(ptr noundef @.str.5, ptr noundef %31, i32 noundef 13)
  store i32 1, ptr %42, align 4
  br label %331

193:                                              ; preds = %184
  %194 = load i32, ptr %41, align 4, !tbaa !9
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %197

196:                                              ; preds = %193
  store i32 1, ptr %42, align 4
  br label %331

197:                                              ; preds = %193
  br label %198

198:                                              ; preds = %197
  %199 = load ptr, ptr %17, align 8, !tbaa !5
  %200 = load i32, ptr %199, align 4, !tbaa !9
  %201 = icmp eq i32 %200, 0
  br i1 %201, label %202, label %203

202:                                              ; preds = %198
  store i32 1, ptr %42, align 4
  br label %331

203:                                              ; preds = %198
  %204 = load ptr, ptr %16, align 8, !tbaa !5
  %205 = load ptr, ptr %17, align 8, !tbaa !5
  %206 = load ptr, ptr %20, align 8, !tbaa !5
  %207 = load i32, ptr %30, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds %struct.complex, ptr %206, i64 %208
  %210 = load ptr, ptr %21, align 8, !tbaa !5
  %211 = load ptr, ptr %26, align 8, !tbaa !5
  %212 = call i32 @cpotrf_(ptr noundef %204, ptr noundef %205, ptr noundef %209, ptr noundef %210, ptr noundef %211)
  %213 = load ptr, ptr %26, align 8, !tbaa !5
  %214 = load i32, ptr %213, align 4, !tbaa !9
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %216, label %223

216:                                              ; preds = %203
  %217 = load ptr, ptr %17, align 8, !tbaa !5
  %218 = load i32, ptr %217, align 4, !tbaa !9
  %219 = load ptr, ptr %26, align 8, !tbaa !5
  %220 = load i32, ptr %219, align 4, !tbaa !9
  %221 = add nsw i32 %218, %220
  %222 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 %221, ptr %222, align 4, !tbaa !9
  store i32 1, ptr %42, align 4
  br label %331

223:                                              ; preds = %203
  %224 = load ptr, ptr %14, align 8, !tbaa !5
  %225 = load ptr, ptr %16, align 8, !tbaa !5
  %226 = load ptr, ptr %17, align 8, !tbaa !5
  %227 = load ptr, ptr %18, align 8, !tbaa !5
  %228 = load i32, ptr %28, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds %struct.complex, ptr %227, i64 %229
  %231 = load ptr, ptr %19, align 8, !tbaa !5
  %232 = load ptr, ptr %20, align 8, !tbaa !5
  %233 = load i32, ptr %30, align 4, !tbaa !9
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds %struct.complex, ptr %232, i64 %234
  %236 = load ptr, ptr %21, align 8, !tbaa !5
  %237 = load ptr, ptr %26, align 8, !tbaa !5
  call void @chegst_(ptr noundef %224, ptr noundef %225, ptr noundef %226, ptr noundef %230, ptr noundef %231, ptr noundef %235, ptr noundef %236, ptr noundef %237)
  %238 = load ptr, ptr %15, align 8, !tbaa !5
  %239 = load ptr, ptr %16, align 8, !tbaa !5
  %240 = load ptr, ptr %17, align 8, !tbaa !5
  %241 = load ptr, ptr %18, align 8, !tbaa !5
  %242 = load i32, ptr %28, align 4, !tbaa !9
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds %struct.complex, ptr %241, i64 %243
  %245 = load ptr, ptr %19, align 8, !tbaa !5
  %246 = load ptr, ptr %22, align 8, !tbaa !5
  %247 = getelementptr inbounds float, ptr %246, i64 1
  %248 = load ptr, ptr %23, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.complex, ptr %248, i64 1
  %250 = load ptr, ptr %24, align 8, !tbaa !5
  %251 = load ptr, ptr %25, align 8, !tbaa !5
  %252 = getelementptr inbounds float, ptr %251, i64 1
  %253 = load ptr, ptr %26, align 8, !tbaa !5
  call void @cheev_2stage_(ptr noundef %238, ptr noundef %239, ptr noundef %240, ptr noundef %244, ptr noundef %245, ptr noundef %247, ptr noundef %249, ptr noundef %250, ptr noundef %252, ptr noundef %253)
  %254 = load i32, ptr %38, align 4, !tbaa !9
  %255 = icmp ne i32 %254, 0
  br i1 %255, label %256, label %322

256:                                              ; preds = %223
  %257 = load ptr, ptr %17, align 8, !tbaa !5
  %258 = load i32, ptr %257, align 4, !tbaa !9
  store i32 %258, ptr %32, align 4, !tbaa !9
  %259 = load ptr, ptr %26, align 8, !tbaa !5
  %260 = load i32, ptr %259, align 4, !tbaa !9
  %261 = icmp sgt i32 %260, 0
  br i1 %261, label %262, label %266

262:                                              ; preds = %256
  %263 = load ptr, ptr %26, align 8, !tbaa !5
  %264 = load i32, ptr %263, align 4, !tbaa !9
  %265 = sub nsw i32 %264, 1
  store i32 %265, ptr %32, align 4, !tbaa !9
  br label %266

266:                                              ; preds = %262, %256
  %267 = load ptr, ptr %14, align 8, !tbaa !5
  %268 = load i32, ptr %267, align 4, !tbaa !9
  %269 = icmp eq i32 %268, 1
  br i1 %269, label %274, label %270

270:                                              ; preds = %266
  %271 = load ptr, ptr %14, align 8, !tbaa !5
  %272 = load i32, ptr %271, align 4, !tbaa !9
  %273 = icmp eq i32 %272, 2
  br i1 %273, label %274, label %295

274:                                              ; preds = %270, %266
  %275 = load i32, ptr %36, align 4, !tbaa !9
  %276 = icmp ne i32 %275, 0
  br i1 %276, label %277, label %279

277:                                              ; preds = %274
  %278 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 78, ptr %278, align 1, !tbaa !15
  br label %281

279:                                              ; preds = %274
  %280 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 67, ptr %280, align 1, !tbaa !15
  br label %281

281:                                              ; preds = %279, %277
  %282 = load ptr, ptr %16, align 8, !tbaa !5
  %283 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %284 = load ptr, ptr %17, align 8, !tbaa !5
  %285 = load ptr, ptr %20, align 8, !tbaa !5
  %286 = load i32, ptr %30, align 4, !tbaa !9
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds %struct.complex, ptr %285, i64 %287
  %289 = load ptr, ptr %21, align 8, !tbaa !5
  %290 = load ptr, ptr %18, align 8, !tbaa !5
  %291 = load i32, ptr %28, align 4, !tbaa !9
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds %struct.complex, ptr %290, i64 %292
  %294 = load ptr, ptr %19, align 8, !tbaa !5
  call void @ctrsm_(ptr noundef @.str.6, ptr noundef %282, ptr noundef %283, ptr noundef @.str.7, ptr noundef %284, ptr noundef %32, ptr noundef @c_b1, ptr noundef %288, ptr noundef %289, ptr noundef %293, ptr noundef %294)
  br label %321

295:                                              ; preds = %270
  %296 = load ptr, ptr %14, align 8, !tbaa !5
  %297 = load i32, ptr %296, align 4, !tbaa !9
  %298 = icmp eq i32 %297, 3
  br i1 %298, label %299, label %320

299:                                              ; preds = %295
  %300 = load i32, ptr %36, align 4, !tbaa !9
  %301 = icmp ne i32 %300, 0
  br i1 %301, label %302, label %304

302:                                              ; preds = %299
  %303 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 67, ptr %303, align 1, !tbaa !15
  br label %306

304:                                              ; preds = %299
  %305 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 78, ptr %305, align 1, !tbaa !15
  br label %306

306:                                              ; preds = %304, %302
  %307 = load ptr, ptr %16, align 8, !tbaa !5
  %308 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %309 = load ptr, ptr %17, align 8, !tbaa !5
  %310 = load ptr, ptr %20, align 8, !tbaa !5
  %311 = load i32, ptr %30, align 4, !tbaa !9
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds %struct.complex, ptr %310, i64 %312
  %314 = load ptr, ptr %21, align 8, !tbaa !5
  %315 = load ptr, ptr %18, align 8, !tbaa !5
  %316 = load i32, ptr %28, align 4, !tbaa !9
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds %struct.complex, ptr %315, i64 %317
  %319 = load ptr, ptr %19, align 8, !tbaa !5
  call void @ctrmm_(ptr noundef @.str.6, ptr noundef %307, ptr noundef %308, ptr noundef @.str.7, ptr noundef %309, ptr noundef %32, ptr noundef @c_b1, ptr noundef %313, ptr noundef %314, ptr noundef %318, ptr noundef %319)
  br label %320

320:                                              ; preds = %306, %295
  br label %321

321:                                              ; preds = %320, %281
  br label %322

322:                                              ; preds = %321, %223
  %323 = load i32, ptr %34, align 4, !tbaa !9
  %324 = sitofp i32 %323 to float
  %325 = load ptr, ptr %23, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.complex, ptr %325, i64 1
  %327 = getelementptr inbounds %struct.complex, ptr %326, i32 0, i32 0
  store float %324, ptr %327, align 4, !tbaa !11
  %328 = load ptr, ptr %23, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.complex, ptr %328, i64 1
  %330 = getelementptr inbounds %struct.complex, ptr %329, i32 0, i32 1
  store float 0.000000e+00, ptr %330, align 4, !tbaa !14
  store i32 1, ptr %42, align 4
  br label %331

331:                                              ; preds = %322, %216, %202, %196, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #3
  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 1, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  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 @cpotrf_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare void @ctrsm_(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 @ctrmm_(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, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!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"

%struct.complex = type { float, float }

@.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_b1 = external hidden global %struct.complex, align 4

; Function Attrs: nounwind uwtable
define dso_local void @chegv_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, ptr noundef %12) local_unnamed_addr #0 {
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca [1 x i8], align 1
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #4
  %19 = tail call i32 @lsame_(ptr noundef %1, ptr noundef nonnull @.str) #4
  %20 = tail call i32 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.1) #4
  %21 = load i32, ptr %10, align 4, !tbaa !5
  %22 = icmp eq i32 %21, -1
  store i32 0, ptr %12, align 4, !tbaa !5
  %23 = load i32, ptr %0, align 4, !tbaa !5
  %24 = add i32 %23, -4
  %or.cond131 = icmp ult i32 %24, -3
  br i1 %or.cond131, label %.thread138.sink.split, label %25

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

27:                                               ; preds = %25
  %.not123 = icmp eq i32 %20, 0
  br i1 %.not123, label %28, label %30

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

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

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

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

39:                                               ; preds = %36
  %.pr = load i32, ptr %12, align 4, !tbaa !5
  %40 = icmp eq i32 %.pr, 0
  br i1 %40, label %41, label %.thread138

41:                                               ; preds = %39
  %42 = 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 %42, ptr %18, align 4, !tbaa !5
  %43 = call i32 @ilaenv2stage_(ptr noundef nonnull @c__2, ptr noundef nonnull @.str.4, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull %18, ptr noundef nonnull @c_n1, ptr noundef nonnull @c_n1) #4
  store i32 %43, ptr %17, align 4, !tbaa !5
  %44 = call i32 @ilaenv2stage_(ptr noundef nonnull @c__3, ptr noundef nonnull @.str.4, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull %18, ptr noundef nonnull %17, ptr noundef nonnull @c_n1) #4
  %45 = call i32 @ilaenv2stage_(ptr noundef nonnull @c__4, ptr noundef nonnull @.str.4, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull %18, ptr noundef nonnull %17, ptr noundef nonnull @c_n1) #4
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = add i32 %45, %44
  %48 = add i32 %47, %46
  %49 = sitofp i32 %48 to float
  store float %49, ptr %9, align 4, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %9, i64 4
  store float 0.000000e+00, ptr %50, align 4, !tbaa !12
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = icmp sge i32 %51, %48
  %or.cond = select i1 %52, i1 true, i1 %22
  br i1 %or.cond, label %.thread, label %.thread138.sink.split

.thread:                                          ; preds = %41
  %.pr135.pr = load i32, ptr %12, align 4, !tbaa !5
  %.not125 = icmp eq i32 %.pr135.pr, 0
  br i1 %.not125, label %56, label %.thread138

.thread138.sink.split:                            ; preds = %41, %36, %33, %30, %28, %25, %13
  %.sink = phi i32 [ -1, %13 ], [ -2, %25 ], [ -3, %28 ], [ -4, %30 ], [ -6, %33 ], [ -8, %36 ], [ -11, %41 ]
  store i32 %.sink, ptr %12, align 4, !tbaa !5
  br label %.thread138

.thread138:                                       ; preds = %.thread138.sink.split, %39, %.thread
  %53 = phi i32 [ %.pr135.pr, %.thread ], [ %.pr, %39 ], [ %.sink, %.thread138.sink.split ]
  %54 = sub nsw i32 0, %53
  store i32 %54, ptr %14, align 4, !tbaa !5
  %55 = call i32 @xerbla_(ptr noundef nonnull @.str.5, ptr noundef nonnull %14, i32 noundef 13) #4
  br label %76

56:                                               ; preds = %.thread
  %57 = icmp eq i32 %46, 0
  %or.cond144 = or i1 %22, %57
  br i1 %or.cond144, label %76, label %58

58:                                               ; preds = %56
  %59 = call i32 @cpotrf_(ptr noundef %2, ptr noundef nonnull %3, ptr noundef %6, ptr noundef nonnull %7, ptr noundef nonnull %12) #4
  %60 = load i32, ptr %12, align 4, !tbaa !5
  %.not126 = icmp eq i32 %60, 0
  br i1 %.not126, label %64, label %61

61:                                               ; preds = %58
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = add nsw i32 %62, %60
  store i32 %63, ptr %12, align 4, !tbaa !5
  br label %76

64:                                               ; preds = %58
  call void @chegst_(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 %12) #4
  call void @cheev_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 %11, ptr noundef nonnull %12) #4
  %.not127 = icmp eq i32 %19, 0
  br i1 %.not127, label %75, label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %66, ptr %15, align 4, !tbaa !5
  %67 = load i32, ptr %12, align 4, !tbaa !5
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %69, label %71

69:                                               ; preds = %65
  %70 = add nsw i32 %67, -1
  store i32 %70, ptr %15, align 4, !tbaa !5
  br label %71

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

73:                                               ; preds = %71, %71
  %. = select i1 %.not123, i8 67, i8 78
  store i8 %., ptr %16, align 1, !tbaa !13
  call void @ctrsm_(ptr noundef nonnull @.str.6, ptr noundef %2, ptr noundef nonnull %16, ptr noundef nonnull @.str.7, ptr noundef nonnull %3, ptr noundef nonnull %15, ptr noundef nonnull @c_b1, ptr noundef %6, ptr noundef nonnull %7, ptr noundef %4, ptr noundef nonnull %5) #4
  br label %75

74:                                               ; preds = %71
  %.133 = select i1 %.not123, i8 78, i8 67
  store i8 %.133, ptr %16, align 1, !tbaa !13
  call void @ctrmm_(ptr noundef nonnull @.str.6, ptr noundef %2, ptr noundef nonnull %16, ptr noundef nonnull @.str.7, ptr noundef nonnull %3, ptr noundef nonnull %15, ptr noundef nonnull @c_b1, ptr noundef %6, ptr noundef nonnull %7, ptr noundef %4, ptr noundef nonnull %5) #4
  br label %75

75:                                               ; preds = %71, %73, %74, %64
  store float %49, ptr %9, align 4, !tbaa !9
  store float 0.000000e+00, ptr %50, align 4, !tbaa !12
  br label %76

76:                                               ; preds = %56, %75, %61, %.thread138
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #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 @cpotrf_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @cheev_2stage_(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 @ctrsm_(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 @ctrmm_(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, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4}
!11 = !{!"float", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!7, !7, i64 0}


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