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

; 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
@.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 i64, align 8

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

59:                                               ; preds = %9
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = call i64 @lsame_(ptr noundef %60, ptr noundef @.str.1)
  %62 = icmp ne i64 %61, 0
  br i1 %62, label %65, label %63

63:                                               ; preds = %59
  %64 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -1, ptr %64, align 8, !tbaa !9
  br label %99

65:                                               ; preds = %59, %9
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = call i64 @lsame_(ptr noundef %66, ptr noundef @.str.2)
  %68 = icmp ne i64 %67, 0
  br i1 %68, label %75, label %69

69:                                               ; preds = %65
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = call i64 @lsame_(ptr noundef %70, ptr noundef @.str.3)
  %72 = icmp ne i64 %71, 0
  br i1 %72, label %75, label %73

73:                                               ; preds = %69
  %74 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -2, ptr %74, align 8, !tbaa !9
  br label %98

75:                                               ; preds = %69, %65
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = icmp slt i64 %77, 0
  br i1 %78, label %79, label %81

79:                                               ; preds = %75
  %80 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -3, ptr %80, align 8, !tbaa !9
  br label %97

81:                                               ; preds = %75
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  %83 = load i64, ptr %82, align 8, !tbaa !9
  %84 = icmp slt i64 %83, 1
  br i1 %84, label %94, label %85

85:                                               ; preds = %81
  %86 = load i64, ptr %32, align 8, !tbaa !9
  %87 = icmp ne i64 %86, 0
  br i1 %87, label %88, label %96

88:                                               ; preds = %85
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = load i64, ptr %89, align 8, !tbaa !9
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = load i64, ptr %91, align 8, !tbaa !9
  %93 = icmp slt i64 %90, %92
  br i1 %93, label %94, label %96

94:                                               ; preds = %88, %81
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -7, ptr %95, align 8, !tbaa !9
  br label %96

96:                                               ; preds = %94, %88, %85
  br label %97

97:                                               ; preds = %96, %79
  br label %98

98:                                               ; preds = %97, %73
  br label %99

99:                                               ; preds = %98, %63
  %100 = load ptr, ptr %19, align 8, !tbaa !5
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %103, label %108

103:                                              ; preds = %99
  %104 = load ptr, ptr %19, align 8, !tbaa !5
  %105 = load i64, ptr %104, align 8, !tbaa !9
  %106 = sub nsw i64 0, %105
  store i64 %106, ptr %22, align 8, !tbaa !9
  %107 = call i32 @xerbla_(ptr noundef @.str.4, ptr noundef %22)
  store i32 0, ptr %10, align 4
  store i32 1, ptr %39, align 4
  br label %269

108:                                              ; preds = %99
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = load i64, ptr %109, align 8, !tbaa !9
  %111 = icmp eq i64 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %108
  store i32 0, ptr %10, align 4
  store i32 1, ptr %39, align 4
  br label %269

113:                                              ; preds = %108
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = load i64, ptr %114, align 8, !tbaa !9
  %116 = icmp eq i64 %115, 1
  br i1 %116, label %117, label %131

117:                                              ; preds = %113
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = getelementptr inbounds double, ptr %118, i64 1
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = getelementptr inbounds double, ptr %121, i64 1
  store double %120, ptr %122, align 8, !tbaa !11
  %123 = load i64, ptr %32, align 8, !tbaa !9
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %130

125:                                              ; preds = %117
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = load i64, ptr %20, align 8, !tbaa !9
  %128 = add nsw i64 %127, 1
  %129 = getelementptr inbounds double, ptr %126, i64 %128
  store double 1.000000e+00, ptr %129, align 8, !tbaa !11
  br label %130

130:                                              ; preds = %125, %117
  store i32 0, ptr %10, align 4
  store i32 1, ptr %39, align 4
  br label %269

131:                                              ; preds = %113
  %132 = call double @dlamch_(ptr noundef @.str.5)
  store double %132, ptr %34, align 8, !tbaa !11
  %133 = call double @dlamch_(ptr noundef @.str.6)
  store double %133, ptr %24, align 8, !tbaa !11
  %134 = load double, ptr %34, align 8, !tbaa !11
  %135 = load double, ptr %24, align 8, !tbaa !11
  %136 = fdiv double %134, %135
  store double %136, ptr %38, align 8, !tbaa !11
  %137 = load double, ptr %38, align 8, !tbaa !11
  %138 = fdiv double 1.000000e+00, %137
  store double %138, ptr %35, align 8, !tbaa !11
  %139 = load double, ptr %38, align 8, !tbaa !11
  %140 = call double @sqrt(double noundef %139) #4
  store double %140, ptr %28, align 8, !tbaa !11
  %141 = load double, ptr %35, align 8, !tbaa !11
  %142 = call double @sqrt(double noundef %141) #4
  store double %142, ptr %29, align 8, !tbaa !11
  %143 = load ptr, ptr %12, align 8, !tbaa !5
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = getelementptr inbounds double, ptr %145, i64 1
  %147 = load ptr, ptr %18, align 8, !tbaa !5
  %148 = getelementptr inbounds double, ptr %147, i64 1
  %149 = call double @dlansp_(ptr noundef @.str.7, ptr noundef %143, ptr noundef %144, ptr noundef %146, ptr noundef %148)
  store double %149, ptr %26, align 8, !tbaa !11
  store i64 0, ptr %33, align 8, !tbaa !9
  %150 = load double, ptr %26, align 8, !tbaa !11
  %151 = fcmp ogt double %150, 0.000000e+00
  br i1 %151, label %152, label %160

152:                                              ; preds = %131
  %153 = load double, ptr %26, align 8, !tbaa !11
  %154 = load double, ptr %28, align 8, !tbaa !11
  %155 = fcmp olt double %153, %154
  br i1 %155, label %156, label %160

156:                                              ; preds = %152
  store i64 1, ptr %33, align 8, !tbaa !9
  %157 = load double, ptr %28, align 8, !tbaa !11
  %158 = load double, ptr %26, align 8, !tbaa !11
  %159 = fdiv double %157, %158
  store double %159, ptr %30, align 8, !tbaa !11
  br label %169

160:                                              ; preds = %152, %131
  %161 = load double, ptr %26, align 8, !tbaa !11
  %162 = load double, ptr %29, align 8, !tbaa !11
  %163 = fcmp ogt double %161, %162
  br i1 %163, label %164, label %168

164:                                              ; preds = %160
  store i64 1, ptr %33, align 8, !tbaa !9
  %165 = load double, ptr %29, align 8, !tbaa !11
  %166 = load double, ptr %26, align 8, !tbaa !11
  %167 = fdiv double %165, %166
  store double %167, ptr %30, align 8, !tbaa !11
  br label %168

168:                                              ; preds = %164, %160
  br label %169

169:                                              ; preds = %168, %156
  %170 = load i64, ptr %33, align 8, !tbaa !9
  %171 = icmp eq i64 %170, 1
  br i1 %171, label %172, label %183

172:                                              ; preds = %169
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = load i64, ptr %173, align 8, !tbaa !9
  %175 = load ptr, ptr %13, align 8, !tbaa !5
  %176 = load i64, ptr %175, align 8, !tbaa !9
  %177 = add nsw i64 %176, 1
  %178 = mul nsw i64 %174, %177
  %179 = sdiv i64 %178, 2
  store i64 %179, ptr %22, align 8, !tbaa !9
  %180 = load ptr, ptr %14, align 8, !tbaa !5
  %181 = getelementptr inbounds double, ptr %180, i64 1
  %182 = call i32 @f2c_dscal(ptr noundef %22, ptr noundef %30, ptr noundef %181, ptr noundef @c__1)
  br label %183

183:                                              ; preds = %172, %169
  store i64 1, ptr %25, align 8, !tbaa !9
  %184 = load i64, ptr %25, align 8, !tbaa !9
  %185 = load ptr, ptr %13, align 8, !tbaa !5
  %186 = load i64, ptr %185, align 8, !tbaa !9
  %187 = add nsw i64 %184, %186
  store i64 %187, ptr %36, align 8, !tbaa !9
  %188 = load ptr, ptr %12, align 8, !tbaa !5
  %189 = load ptr, ptr %13, align 8, !tbaa !5
  %190 = load ptr, ptr %14, align 8, !tbaa !5
  %191 = getelementptr inbounds double, ptr %190, i64 1
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = getelementptr inbounds double, ptr %192, i64 1
  %194 = load ptr, ptr %18, align 8, !tbaa !5
  %195 = load i64, ptr %25, align 8, !tbaa !9
  %196 = getelementptr inbounds double, ptr %194, i64 %195
  %197 = load ptr, ptr %18, align 8, !tbaa !5
  %198 = load i64, ptr %36, align 8, !tbaa !9
  %199 = getelementptr inbounds double, ptr %197, i64 %198
  %200 = call i32 @dsptrd_(ptr noundef %188, ptr noundef %189, ptr noundef %191, ptr noundef %193, ptr noundef %196, ptr noundef %199, ptr noundef %31)
  %201 = load i64, ptr %32, align 8, !tbaa !9
  %202 = icmp ne i64 %201, 0
  br i1 %202, label %212, label %203

203:                                              ; preds = %183
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  %206 = getelementptr inbounds double, ptr %205, i64 1
  %207 = load ptr, ptr %18, align 8, !tbaa !5
  %208 = load i64, ptr %25, align 8, !tbaa !9
  %209 = getelementptr inbounds double, ptr %207, i64 %208
  %210 = load ptr, ptr %19, align 8, !tbaa !5
  %211 = call i32 @dsterf_(ptr noundef %204, ptr noundef %206, ptr noundef %209, ptr noundef %210)
  br label %248

212:                                              ; preds = %183
  %213 = load i64, ptr %36, align 8, !tbaa !9
  %214 = load ptr, ptr %13, align 8, !tbaa !5
  %215 = load i64, ptr %214, align 8, !tbaa !9
  %216 = add nsw i64 %213, %215
  store i64 %216, ptr %37, align 8, !tbaa !9
  %217 = load ptr, ptr %12, align 8, !tbaa !5
  %218 = load ptr, ptr %13, align 8, !tbaa !5
  %219 = load ptr, ptr %14, align 8, !tbaa !5
  %220 = getelementptr inbounds double, ptr %219, i64 1
  %221 = load ptr, ptr %18, align 8, !tbaa !5
  %222 = load i64, ptr %36, align 8, !tbaa !9
  %223 = getelementptr inbounds double, ptr %221, i64 %222
  %224 = load ptr, ptr %16, align 8, !tbaa !5
  %225 = load i64, ptr %21, align 8, !tbaa !9
  %226 = getelementptr inbounds double, ptr %224, i64 %225
  %227 = load ptr, ptr %17, align 8, !tbaa !5
  %228 = load ptr, ptr %18, align 8, !tbaa !5
  %229 = load i64, ptr %37, align 8, !tbaa !9
  %230 = getelementptr inbounds double, ptr %228, i64 %229
  %231 = call i32 @dopgtr_(ptr noundef %217, ptr noundef %218, ptr noundef %220, ptr noundef %223, ptr noundef %226, ptr noundef %227, ptr noundef %230, ptr noundef %31)
  %232 = load ptr, ptr %11, align 8, !tbaa !5
  %233 = load ptr, ptr %13, align 8, !tbaa !5
  %234 = load ptr, ptr %15, align 8, !tbaa !5
  %235 = getelementptr inbounds double, ptr %234, i64 1
  %236 = load ptr, ptr %18, align 8, !tbaa !5
  %237 = load i64, ptr %25, align 8, !tbaa !9
  %238 = getelementptr inbounds double, ptr %236, i64 %237
  %239 = load ptr, ptr %16, align 8, !tbaa !5
  %240 = load i64, ptr %21, align 8, !tbaa !9
  %241 = getelementptr inbounds double, ptr %239, i64 %240
  %242 = load ptr, ptr %17, align 8, !tbaa !5
  %243 = load ptr, ptr %18, align 8, !tbaa !5
  %244 = load i64, ptr %36, align 8, !tbaa !9
  %245 = getelementptr inbounds double, ptr %243, i64 %244
  %246 = load ptr, ptr %19, align 8, !tbaa !5
  %247 = call i32 @dsteqr_(ptr noundef %232, ptr noundef %233, ptr noundef %235, ptr noundef %238, ptr noundef %241, ptr noundef %242, ptr noundef %245, ptr noundef %246)
  br label %248

248:                                              ; preds = %212, %203
  %249 = load i64, ptr %33, align 8, !tbaa !9
  %250 = icmp eq i64 %249, 1
  br i1 %250, label %251, label %268

251:                                              ; preds = %248
  %252 = load ptr, ptr %19, align 8, !tbaa !5
  %253 = load i64, ptr %252, align 8, !tbaa !9
  %254 = icmp eq i64 %253, 0
  br i1 %254, label %255, label %258

255:                                              ; preds = %251
  %256 = load ptr, ptr %13, align 8, !tbaa !5
  %257 = load i64, ptr %256, align 8, !tbaa !9
  store i64 %257, ptr %27, align 8, !tbaa !9
  br label %262

258:                                              ; preds = %251
  %259 = load ptr, ptr %19, align 8, !tbaa !5
  %260 = load i64, ptr %259, align 8, !tbaa !9
  %261 = sub nsw i64 %260, 1
  store i64 %261, ptr %27, align 8, !tbaa !9
  br label %262

262:                                              ; preds = %258, %255
  %263 = load double, ptr %30, align 8, !tbaa !11
  %264 = fdiv double 1.000000e+00, %263
  store double %264, ptr %23, align 8, !tbaa !11
  %265 = load ptr, ptr %15, align 8, !tbaa !5
  %266 = getelementptr inbounds double, ptr %265, i64 1
  %267 = call i32 @f2c_dscal(ptr noundef %27, ptr noundef %23, ptr noundef %266, ptr noundef @c__1)
  br label %268

268:                                              ; preds = %262, %248
  store i32 0, ptr %10, align 4
  store i32 1, ptr %39, align 4
  br label %269

269:                                              ; preds = %268, %130, %112, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  %270 = load i32, ptr %10, align 4
  ret i32 %270
}

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

declare i64 @lsame_(ptr noundef, ptr noundef) #2

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

declare double @dlamch_(ptr noundef) #2

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

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

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

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

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

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

declare i32 @dsteqr_(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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}


; 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
@.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 i64, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @dspev_(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) local_unnamed_addr #0 {
  %10 = alloca i64, align 8
  %11 = alloca double, align 8
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  %15 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  store i64 0, ptr %8, align 8, !tbaa !5
  %.not = icmp ne i64 %15, 0
  br i1 %.not, label %18, label %16

16:                                               ; preds = %9
  %17 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not105 = icmp eq i64 %17, 0
  br i1 %.not105, label %.thread.sink.split, label %18

18:                                               ; preds = %16, %9
  %19 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.2) #4
  %.not106 = icmp eq i64 %19, 0
  br i1 %.not106, label %20, label %22

20:                                               ; preds = %18
  %21 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.3) #4
  %.not107 = icmp eq i64 %21, 0
  br i1 %.not107, label %.thread.sink.split, label %22

22:                                               ; preds = %20, %18
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = icmp slt i64 %23, 0
  br i1 %24, label %.thread.sink.split, label %25

25:                                               ; preds = %22
  %26 = load i64, ptr %6, align 8, !tbaa !5
  %27 = icmp slt i64 %26, 1
  %28 = icmp ult i64 %26, %23
  %or.cond = and i1 %.not, %28
  %or.cond114 = or i1 %27, %or.cond
  br i1 %or.cond114, label %.thread.sink.split, label %29

29:                                               ; preds = %25
  %.pr = load i64, ptr %8, align 8, !tbaa !5
  %.not108 = icmp eq i64 %.pr, 0
  br i1 %.not108, label %33, label %.thread

.thread.sink.split:                               ; preds = %25, %22, %20, %16
  %.sink = phi i64 [ -1, %16 ], [ -2, %20 ], [ -3, %22 ], [ -7, %25 ]
  store i64 %.sink, ptr %8, align 8, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %29
  %30 = phi i64 [ %.pr, %29 ], [ %.sink, %.thread.sink.split ]
  %31 = sub nsw i64 0, %30
  store i64 %31, ptr %10, align 8, !tbaa !5
  %32 = call i32 @xerbla_(ptr noundef nonnull @.str.4, ptr noundef nonnull %10) #4
  br label %79

33:                                               ; preds = %29
  switch i64 %23, label %37 [
    i64 0, label %79
    i64 1, label %34
  ]

34:                                               ; preds = %33
  %35 = load double, ptr %3, align 8, !tbaa !9
  store double %35, ptr %4, align 8, !tbaa !9
  br i1 %.not, label %36, label %79

36:                                               ; preds = %34
  store double 1.000000e+00, ptr %5, align 8, !tbaa !9
  br label %79

37:                                               ; preds = %33
  %38 = tail call double @dlamch_(ptr noundef nonnull @.str.5) #4
  %39 = tail call double @dlamch_(ptr noundef nonnull @.str.6) #4
  %40 = fdiv double %38, %39
  %41 = fdiv double 1.000000e+00, %40
  %42 = tail call double @sqrt(double noundef %40) #4
  %43 = tail call double @sqrt(double noundef %41) #4
  %44 = tail call double @dlansp_(ptr noundef nonnull @.str.7, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %7) #4
  %45 = fcmp ogt double %44, 0.000000e+00
  %46 = fcmp olt double %44, %42
  %or.cond109 = select i1 %45, i1 %46, i1 false
  br i1 %or.cond109, label %49, label %47

47:                                               ; preds = %37
  %48 = fcmp ogt double %44, %43
  br i1 %48, label %49, label %55

49:                                               ; preds = %47, %37
  %.pn = phi double [ %42, %37 ], [ %43, %47 ]
  %storemerge113 = fdiv double %.pn, %44
  store double %storemerge113, ptr %13, align 8, !tbaa !9
  %50 = load i64, ptr %2, align 8, !tbaa !5
  %51 = add nsw i64 %50, 1
  %52 = mul nsw i64 %51, %50
  %53 = sdiv i64 %52, 2
  store i64 %53, ptr %10, align 8, !tbaa !5
  %54 = call i32 @f2c_dscal(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef %3, ptr noundef nonnull @c__1) #4
  br label %55

55:                                               ; preds = %47, %49
  %56 = phi i1 [ true, %49 ], [ false, %47 ]
  %57 = load i64, ptr %2, align 8, !tbaa !5
  %58 = getelementptr double, ptr %7, i64 %57
  %59 = call i32 @dsptrd_(ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %4, ptr noundef %7, ptr noundef %58, ptr noundef nonnull %14) #4
  br i1 %.not, label %62, label %60

60:                                               ; preds = %55
  %61 = call i32 @dsterf_(ptr noundef nonnull %2, ptr noundef %4, ptr noundef %7, ptr noundef nonnull %8) #4
  br label %67

62:                                               ; preds = %55
  %63 = load i64, ptr %2, align 8, !tbaa !5
  %64 = getelementptr double, ptr %58, i64 %63
  %65 = call i32 @dopgtr_(ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %58, ptr noundef %5, ptr noundef nonnull %6, ptr noundef %64, ptr noundef nonnull %14) #4
  %66 = call i32 @dsteqr_(ptr noundef %0, ptr noundef nonnull %2, ptr noundef %4, ptr noundef %7, ptr noundef %5, ptr noundef nonnull %6, ptr noundef %58, ptr noundef nonnull %8) #4
  br label %67

67:                                               ; preds = %62, %60
  br i1 %56, label %68, label %79

68:                                               ; preds = %67
  %69 = load i64, ptr %8, align 8, !tbaa !5
  %70 = icmp eq i64 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %68
  %72 = load i64, ptr %2, align 8, !tbaa !5
  br label %75

73:                                               ; preds = %68
  %74 = add nsw i64 %69, -1
  br label %75

75:                                               ; preds = %73, %71
  %storemerge = phi i64 [ %74, %73 ], [ %72, %71 ]
  store i64 %storemerge, ptr %12, align 8, !tbaa !5
  %76 = load double, ptr %13, align 8, !tbaa !9
  %77 = fdiv double 1.000000e+00, %76
  store double %77, ptr %11, align 8, !tbaa !9
  %78 = call i32 @f2c_dscal(ptr noundef nonnull %12, ptr noundef nonnull %11, ptr noundef %4, ptr noundef nonnull @c__1) #4
  br label %79

79:                                               ; preds = %67, %75, %34, %36, %33, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  ret i32 0
}

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

declare i64 @lsame_(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare double @dlamch_(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

declare i32 @dsteqr_(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

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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}


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