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

; 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 [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
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@c__1 = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @zhpev_(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) #0 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %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 i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca i32, align 4
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca double, align 8
  %40 = alloca double, align 8
  %41 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  store ptr %9, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #4
  %42 = load ptr, ptr %14, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.doublecomplex, ptr %42, i32 -1
  store ptr %43, ptr %14, align 8, !tbaa !5
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  %45 = getelementptr inbounds double, ptr %44, i32 -1
  store ptr %45, ptr %15, align 8, !tbaa !5
  %46 = load ptr, ptr %17, align 8, !tbaa !5
  %47 = load i32, ptr %46, align 4, !tbaa !9
  store i32 %47, ptr %21, align 4, !tbaa !9
  %48 = load i32, ptr %21, align 4, !tbaa !9
  %49 = mul nsw i32 %48, 1
  %50 = add nsw i32 1, %49
  store i32 %50, ptr %22, align 4, !tbaa !9
  %51 = load i32, ptr %22, align 4, !tbaa !9
  %52 = load ptr, ptr %16, align 8, !tbaa !5
  %53 = sext i32 %51 to i64
  %54 = sub i64 0, %53
  %55 = getelementptr inbounds %struct.doublecomplex, ptr %52, i64 %54
  store ptr %55, ptr %16, align 8, !tbaa !5
  %56 = load ptr, ptr %18, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.doublecomplex, ptr %56, i32 -1
  store ptr %57, ptr %18, align 8, !tbaa !5
  %58 = load ptr, ptr %19, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i32 -1
  store ptr %59, ptr %19, align 8, !tbaa !5
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = call i32 @lsame_(ptr noundef %60, ptr noundef @.str)
  store i32 %61, ptr %32, align 4, !tbaa !9
  %62 = load ptr, ptr %20, align 8, !tbaa !5
  store i32 0, ptr %62, align 4, !tbaa !9
  %63 = load i32, ptr %32, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %71, label %65

65:                                               ; preds = %10
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = call i32 @lsame_(ptr noundef %66, ptr noundef @.str.1)
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %71, label %69

69:                                               ; preds = %65
  %70 = load ptr, ptr %20, align 8, !tbaa !5
  store i32 -1, ptr %70, align 4, !tbaa !9
  br label %105

71:                                               ; preds = %65, %10
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = call i32 @lsame_(ptr noundef %72, ptr noundef @.str.2)
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %81, label %75

75:                                               ; preds = %71
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = call i32 @lsame_(ptr noundef %76, ptr noundef @.str.3)
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %81, label %79

79:                                               ; preds = %75
  %80 = load ptr, ptr %20, align 8, !tbaa !5
  store i32 -2, ptr %80, align 4, !tbaa !9
  br label %104

81:                                               ; preds = %75, %71
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = load i32, ptr %82, align 4, !tbaa !9
  %84 = icmp slt i32 %83, 0
  br i1 %84, label %85, label %87

85:                                               ; preds = %81
  %86 = load ptr, ptr %20, align 8, !tbaa !5
  store i32 -3, ptr %86, align 4, !tbaa !9
  br label %103

87:                                               ; preds = %81
  %88 = load ptr, ptr %17, align 8, !tbaa !5
  %89 = load i32, ptr %88, align 4, !tbaa !9
  %90 = icmp slt i32 %89, 1
  br i1 %90, label %100, label %91

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

94:                                               ; preds = %91
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = icmp slt i32 %96, %98
  br i1 %99, label %100, label %102

100:                                              ; preds = %94, %87
  %101 = load ptr, ptr %20, align 8, !tbaa !5
  store i32 -7, ptr %101, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %100, %94, %91
  br label %103

103:                                              ; preds = %102, %85
  br label %104

104:                                              ; preds = %103, %79
  br label %105

105:                                              ; preds = %104, %69
  %106 = load ptr, ptr %20, align 8, !tbaa !5
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %114

109:                                              ; preds = %105
  %110 = load ptr, ptr %20, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = sub nsw i32 0, %111
  store i32 %112, ptr %23, align 4, !tbaa !9
  %113 = call i32 @xerbla_(ptr noundef @.str.4, ptr noundef %23, i32 noundef 6)
  store i32 1, ptr %41, align 4
  br label %289

114:                                              ; preds = %105
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %119

118:                                              ; preds = %114
  store i32 1, ptr %41, align 4
  br label %289

119:                                              ; preds = %114
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = icmp eq i32 %121, 1
  br i1 %122, label %123, label %148

123:                                              ; preds = %119
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.doublecomplex, ptr %124, i64 1
  %126 = getelementptr inbounds %struct.doublecomplex, ptr %125, i32 0, i32 0
  %127 = load double, ptr %126, align 8, !tbaa !11
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = getelementptr inbounds double, ptr %128, i64 1
  store double %127, ptr %129, align 8, !tbaa !14
  %130 = load ptr, ptr %19, align 8, !tbaa !5
  %131 = getelementptr inbounds double, ptr %130, i64 1
  store double 1.000000e+00, ptr %131, align 8, !tbaa !14
  %132 = load i32, ptr %32, align 4, !tbaa !9
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %147

134:                                              ; preds = %123
  %135 = load i32, ptr %21, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %23, align 4, !tbaa !9
  %137 = load ptr, ptr %16, align 8, !tbaa !5
  %138 = load i32, ptr %23, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds %struct.doublecomplex, ptr %137, i64 %139
  %141 = getelementptr inbounds %struct.doublecomplex, ptr %140, i32 0, i32 0
  store double 1.000000e+00, ptr %141, align 8, !tbaa !11
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = load i32, ptr %23, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds %struct.doublecomplex, ptr %142, i64 %144
  %146 = getelementptr inbounds %struct.doublecomplex, ptr %145, i32 0, i32 1
  store double 0.000000e+00, ptr %146, align 8, !tbaa !15
  br label %147

147:                                              ; preds = %134, %123
  store i32 1, ptr %41, align 4
  br label %289

148:                                              ; preds = %119
  %149 = call double @dlamch_(ptr noundef @.str.5)
  store double %149, ptr %34, align 8, !tbaa !14
  %150 = call double @dlamch_(ptr noundef @.str.6)
  store double %150, ptr %40, align 8, !tbaa !14
  %151 = load double, ptr %34, align 8, !tbaa !14
  %152 = load double, ptr %40, align 8, !tbaa !14
  %153 = fdiv double %151, %152
  store double %153, ptr %39, align 8, !tbaa !14
  %154 = load double, ptr %39, align 8, !tbaa !14
  %155 = fdiv double 1.000000e+00, %154
  store double %155, ptr %35, align 8, !tbaa !14
  %156 = load double, ptr %39, align 8, !tbaa !14
  %157 = call double @sqrt(double noundef %156) #4
  store double %157, ptr %28, align 8, !tbaa !14
  %158 = load double, ptr %35, align 8, !tbaa !14
  %159 = call double @sqrt(double noundef %158) #4
  store double %159, ptr %29, align 8, !tbaa !14
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.doublecomplex, ptr %162, i64 1
  %164 = load ptr, ptr %19, align 8, !tbaa !5
  %165 = getelementptr inbounds double, ptr %164, i64 1
  %166 = call double @zlanhp_(ptr noundef @.str.7, ptr noundef %160, ptr noundef %161, ptr noundef %163, ptr noundef %165)
  store double %166, ptr %26, align 8, !tbaa !14
  store i32 0, ptr %33, align 4, !tbaa !9
  %167 = load double, ptr %26, align 8, !tbaa !14
  %168 = fcmp ogt double %167, 0.000000e+00
  br i1 %168, label %169, label %177

169:                                              ; preds = %148
  %170 = load double, ptr %26, align 8, !tbaa !14
  %171 = load double, ptr %28, align 8, !tbaa !14
  %172 = fcmp olt double %170, %171
  br i1 %172, label %173, label %177

173:                                              ; preds = %169
  store i32 1, ptr %33, align 4, !tbaa !9
  %174 = load double, ptr %28, align 8, !tbaa !14
  %175 = load double, ptr %26, align 8, !tbaa !14
  %176 = fdiv double %174, %175
  store double %176, ptr %30, align 8, !tbaa !14
  br label %186

177:                                              ; preds = %169, %148
  %178 = load double, ptr %26, align 8, !tbaa !14
  %179 = load double, ptr %29, align 8, !tbaa !14
  %180 = fcmp ogt double %178, %179
  br i1 %180, label %181, label %185

181:                                              ; preds = %177
  store i32 1, ptr %33, align 4, !tbaa !9
  %182 = load double, ptr %29, align 8, !tbaa !14
  %183 = load double, ptr %26, align 8, !tbaa !14
  %184 = fdiv double %182, %183
  store double %184, ptr %30, align 8, !tbaa !14
  br label %185

185:                                              ; preds = %181, %177
  br label %186

186:                                              ; preds = %185, %173
  %187 = load i32, ptr %33, align 4, !tbaa !9
  %188 = icmp eq i32 %187, 1
  br i1 %188, label %189, label %199

189:                                              ; preds = %186
  %190 = load ptr, ptr %13, align 8, !tbaa !5
  %191 = load i32, ptr %190, align 4, !tbaa !9
  %192 = load ptr, ptr %13, align 8, !tbaa !5
  %193 = load i32, ptr %192, align 4, !tbaa !9
  %194 = add nsw i32 %193, 1
  %195 = mul nsw i32 %191, %194
  %196 = sdiv i32 %195, 2
  store i32 %196, ptr %23, align 4, !tbaa !9
  %197 = load ptr, ptr %14, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.doublecomplex, ptr %197, i64 1
  call void @zdscal_(ptr noundef %23, ptr noundef %30, ptr noundef %198, ptr noundef @c__1)
  br label %199

199:                                              ; preds = %189, %186
  store i32 1, ptr %25, align 4, !tbaa !9
  store i32 1, ptr %36, align 4, !tbaa !9
  %200 = load ptr, ptr %12, align 8, !tbaa !5
  %201 = load ptr, ptr %13, align 8, !tbaa !5
  %202 = load ptr, ptr %14, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.doublecomplex, ptr %202, i64 1
  %204 = load ptr, ptr %15, align 8, !tbaa !5
  %205 = getelementptr inbounds double, ptr %204, i64 1
  %206 = load ptr, ptr %19, align 8, !tbaa !5
  %207 = load i32, ptr %25, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds double, ptr %206, i64 %208
  %210 = load ptr, ptr %18, align 8, !tbaa !5
  %211 = load i32, ptr %36, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds %struct.doublecomplex, ptr %210, i64 %212
  call void @zhptrd_(ptr noundef %200, ptr noundef %201, ptr noundef %203, ptr noundef %205, ptr noundef %209, ptr noundef %213, ptr noundef %31)
  %214 = load i32, ptr %32, align 4, !tbaa !9
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %225, label %216

216:                                              ; preds = %199
  %217 = load ptr, ptr %13, align 8, !tbaa !5
  %218 = load ptr, ptr %15, align 8, !tbaa !5
  %219 = getelementptr inbounds double, ptr %218, i64 1
  %220 = load ptr, ptr %19, align 8, !tbaa !5
  %221 = load i32, ptr %25, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds double, ptr %220, i64 %222
  %224 = load ptr, ptr %20, align 8, !tbaa !5
  call void @dsterf_(ptr noundef %217, ptr noundef %219, ptr noundef %223, ptr noundef %224)
  br label %269

225:                                              ; preds = %199
  %226 = load i32, ptr %36, align 4, !tbaa !9
  %227 = load ptr, ptr %13, align 8, !tbaa !5
  %228 = load i32, ptr %227, align 4, !tbaa !9
  %229 = add nsw i32 %226, %228
  store i32 %229, ptr %38, align 4, !tbaa !9
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = load ptr, ptr %13, align 8, !tbaa !5
  %232 = load ptr, ptr %14, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.doublecomplex, ptr %232, i64 1
  %234 = load ptr, ptr %18, align 8, !tbaa !5
  %235 = load i32, ptr %36, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds %struct.doublecomplex, ptr %234, i64 %236
  %238 = load ptr, ptr %16, align 8, !tbaa !5
  %239 = load i32, ptr %22, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds %struct.doublecomplex, ptr %238, i64 %240
  %242 = load ptr, ptr %17, align 8, !tbaa !5
  %243 = load ptr, ptr %18, align 8, !tbaa !5
  %244 = load i32, ptr %38, align 4, !tbaa !9
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds %struct.doublecomplex, ptr %243, i64 %245
  call void @zupgtr_(ptr noundef %230, ptr noundef %231, ptr noundef %233, ptr noundef %237, ptr noundef %241, ptr noundef %242, ptr noundef %246, ptr noundef %31)
  %247 = load i32, ptr %25, align 4, !tbaa !9
  %248 = load ptr, ptr %13, align 8, !tbaa !5
  %249 = load i32, ptr %248, align 4, !tbaa !9
  %250 = add nsw i32 %247, %249
  store i32 %250, ptr %37, align 4, !tbaa !9
  %251 = load ptr, ptr %11, align 8, !tbaa !5
  %252 = load ptr, ptr %13, align 8, !tbaa !5
  %253 = load ptr, ptr %15, align 8, !tbaa !5
  %254 = getelementptr inbounds double, ptr %253, i64 1
  %255 = load ptr, ptr %19, align 8, !tbaa !5
  %256 = load i32, ptr %25, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds double, ptr %255, i64 %257
  %259 = load ptr, ptr %16, align 8, !tbaa !5
  %260 = load i32, ptr %22, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds %struct.doublecomplex, ptr %259, i64 %261
  %263 = load ptr, ptr %17, align 8, !tbaa !5
  %264 = load ptr, ptr %19, align 8, !tbaa !5
  %265 = load i32, ptr %37, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds double, ptr %264, i64 %266
  %268 = load ptr, ptr %20, align 8, !tbaa !5
  call void @zsteqr_(ptr noundef %251, ptr noundef %252, ptr noundef %254, ptr noundef %258, ptr noundef %262, ptr noundef %263, ptr noundef %267, ptr noundef %268)
  br label %269

269:                                              ; preds = %225, %216
  %270 = load i32, ptr %33, align 4, !tbaa !9
  %271 = icmp eq i32 %270, 1
  br i1 %271, label %272, label %288

272:                                              ; preds = %269
  %273 = load ptr, ptr %20, align 8, !tbaa !5
  %274 = load i32, ptr %273, align 4, !tbaa !9
  %275 = icmp eq i32 %274, 0
  br i1 %275, label %276, label %279

276:                                              ; preds = %272
  %277 = load ptr, ptr %13, align 8, !tbaa !5
  %278 = load i32, ptr %277, align 4, !tbaa !9
  store i32 %278, ptr %27, align 4, !tbaa !9
  br label %283

279:                                              ; preds = %272
  %280 = load ptr, ptr %20, align 8, !tbaa !5
  %281 = load i32, ptr %280, align 4, !tbaa !9
  %282 = sub nsw i32 %281, 1
  store i32 %282, ptr %27, align 4, !tbaa !9
  br label %283

283:                                              ; preds = %279, %276
  %284 = load double, ptr %30, align 8, !tbaa !14
  %285 = fdiv double 1.000000e+00, %284
  store double %285, ptr %24, align 8, !tbaa !14
  %286 = load ptr, ptr %15, align 8, !tbaa !5
  %287 = getelementptr inbounds double, ptr %286, i64 1
  call void @dscal_(ptr noundef %27, ptr noundef %24, ptr noundef %287, ptr noundef @c__1)
  br label %288

288:                                              ; preds = %283, %269
  store i32 1, ptr %41, align 4
  br label %289

289:                                              ; preds = %288, %147, %118, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #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 @lsame_(ptr noundef, ptr noundef) #2

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

declare double @dlamch_(ptr noundef) #2

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

declare double @zlanhp_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

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

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

declare void @dscal_(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 "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}


; 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 [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
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@c__1 = external hidden global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local void @zhpev_(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) local_unnamed_addr #0 {
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  %15 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  %narrow = xor i32 %16, -1
  %18 = sext i32 %narrow to i64
  %19 = getelementptr inbounds %struct.doublecomplex, ptr %5, i64 %18
  %20 = getelementptr inbounds i8, ptr %7, i64 -16
  %21 = getelementptr inbounds i8, ptr %8, i64 -8
  %22 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  %.not = icmp ne i32 %22, 0
  br i1 %.not, label %25, label %23

23:                                               ; preds = %10
  %24 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not107 = icmp eq i32 %24, 0
  br i1 %.not107, label %.thread.sink.split, label %25

25:                                               ; preds = %23, %10
  %26 = tail call i32 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.2) #4
  %.not108 = icmp eq i32 %26, 0
  br i1 %.not108, label %27, label %29

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

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

32:                                               ; preds = %29
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = icmp slt i32 %33, 1
  %35 = icmp ult i32 %33, %30
  %or.cond = and i1 %.not, %35
  %or.cond116 = or i1 %34, %or.cond
  br i1 %or.cond116, label %.thread.sink.split, label %36

36:                                               ; preds = %32
  %.pr = load i32, ptr %9, align 4, !tbaa !5
  %.not110 = icmp eq i32 %.pr, 0
  br i1 %.not110, label %40, label %.thread

.thread.sink.split:                               ; preds = %32, %29, %27, %23
  %.sink = phi i32 [ -1, %23 ], [ -2, %27 ], [ -3, %29 ], [ -7, %32 ]
  store i32 %.sink, ptr %9, align 4, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %36
  %37 = phi i32 [ %.pr, %36 ], [ %.sink, %.thread.sink.split ]
  %38 = sub nsw i32 0, %37
  store i32 %38, ptr %11, align 4, !tbaa !5
  %39 = call i32 @xerbla_(ptr noundef nonnull @.str.4, ptr noundef nonnull %11, i32 noundef 6) #4
  br label %86

40:                                               ; preds = %36
  switch i32 %30, label %46 [
    i32 0, label %86
    i32 1, label %41
  ]

41:                                               ; preds = %40
  %42 = load double, ptr %3, align 8, !tbaa !9
  store double %42, ptr %4, align 8, !tbaa !12
  store double 1.000000e+00, ptr %8, align 8, !tbaa !12
  br i1 %.not, label %43, label %86

43:                                               ; preds = %41
  store double 1.000000e+00, ptr %5, align 8, !tbaa !9
  %44 = sext i32 %17 to i64
  %45 = getelementptr inbounds %struct.doublecomplex, ptr %19, i64 %44, i32 1
  store double 0.000000e+00, ptr %45, align 8, !tbaa !13
  br label %86

46:                                               ; preds = %40
  %47 = tail call double @dlamch_(ptr noundef nonnull @.str.5) #4
  %48 = tail call double @dlamch_(ptr noundef nonnull @.str.6) #4
  %49 = fdiv double %47, %48
  %50 = fdiv double 1.000000e+00, %49
  %51 = tail call double @sqrt(double noundef %49) #4
  %52 = tail call double @sqrt(double noundef %50) #4
  %53 = tail call double @zlanhp_(ptr noundef nonnull @.str.7, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %8) #4
  %54 = fcmp ogt double %53, 0.000000e+00
  %55 = fcmp olt double %53, %51
  %or.cond111 = select i1 %54, i1 %55, i1 false
  br i1 %or.cond111, label %58, label %56

56:                                               ; preds = %46
  %57 = fcmp ogt double %53, %52
  br i1 %57, label %58, label %63

58:                                               ; preds = %56, %46
  %.pn = phi double [ %51, %46 ], [ %52, %56 ]
  %storemerge115 = fdiv double %.pn, %53
  store double %storemerge115, ptr %14, align 8, !tbaa !12
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  %61 = mul nsw i32 %60, %59
  %62 = sdiv i32 %61, 2
  store i32 %62, ptr %11, align 4, !tbaa !5
  call void @zdscal_(ptr noundef nonnull %11, ptr noundef nonnull %14, ptr noundef %3, ptr noundef nonnull @c__1) #4
  br label %63

63:                                               ; preds = %56, %58
  %64 = phi i1 [ true, %58 ], [ false, %56 ]
  call void @zhptrd_(ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %4, ptr noundef %8, ptr noundef %7, ptr noundef nonnull %15) #4
  br i1 %.not, label %66, label %65

65:                                               ; preds = %63
  call void @dsterf_(ptr noundef nonnull %2, ptr noundef %4, ptr noundef %8, ptr noundef nonnull %9) #4
  br label %75

66:                                               ; preds = %63
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr %struct.doublecomplex, ptr %20, i64 %68
  %70 = getelementptr i8, ptr %69, i64 16
  call void @zupgtr_(ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %7, ptr noundef %5, ptr noundef nonnull %6, ptr noundef %70, ptr noundef nonnull %15) #4
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr double, ptr %21, i64 %72
  %74 = getelementptr i8, ptr %73, i64 8
  call void @zsteqr_(ptr noundef %0, ptr noundef nonnull %2, ptr noundef %4, ptr noundef %8, ptr noundef %5, ptr noundef nonnull %6, ptr noundef %74, ptr noundef nonnull %9) #4
  br label %75

75:                                               ; preds = %66, %65
  br i1 %64, label %76, label %86

76:                                               ; preds = %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %81

79:                                               ; preds = %76
  %80 = load i32, ptr %2, align 4, !tbaa !5
  br label %83

81:                                               ; preds = %76
  %82 = add nsw i32 %77, -1
  br label %83

83:                                               ; preds = %81, %79
  %storemerge = phi i32 [ %82, %81 ], [ %80, %79 ]
  store i32 %storemerge, ptr %13, align 4, !tbaa !5
  %84 = load double, ptr %14, align 8, !tbaa !12
  %85 = fdiv double 1.000000e+00, %84
  store double %85, ptr %12, align 8, !tbaa !12
  call void @dscal_(ptr noundef nonnull %13, ptr noundef nonnull %12, ptr noundef %4, ptr noundef nonnull @c__1) #4
  br label %86

86:                                               ; preds = %75, %83, %41, %43, %40, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #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 @xerbla_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare double @dlamch_(ptr noundef) local_unnamed_addr #2

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

declare double @zlanhp_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

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

declare void @dscal_(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

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


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