; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (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 i32, align 4

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

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

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

66:                                               ; preds = %60, %9
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = call i32 @lsame_(ptr noundef %67, ptr noundef @.str.2)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %76, label %70

70:                                               ; preds = %66
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = call i32 @lsame_(ptr noundef %71, ptr noundef @.str.3)
  %73 = icmp ne i32 %72, 0
  br i1 %73, label %76, label %74

74:                                               ; preds = %70
  %75 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 -2, ptr %75, align 4, !tbaa !9
  br label %99

76:                                               ; preds = %70, %66
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load i32, ptr %77, align 4, !tbaa !9
  %79 = icmp slt i32 %78, 0
  br i1 %79, label %80, label %82

80:                                               ; preds = %76
  %81 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 -3, ptr %81, align 4, !tbaa !9
  br label %98

82:                                               ; preds = %76
  %83 = load ptr, ptr %16, align 8, !tbaa !5
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = icmp slt i32 %84, 1
  br i1 %85, label %95, label %86

86:                                               ; preds = %82
  %87 = load i32, ptr %30, align 4, !tbaa !9
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %97

89:                                               ; preds = %86
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = icmp slt i32 %91, %93
  br i1 %94, label %95, label %97

95:                                               ; preds = %89, %82
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 -7, ptr %96, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %95, %89, %86
  br label %98

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

99:                                               ; preds = %98, %74
  br label %100

100:                                              ; preds = %99, %64
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %109

104:                                              ; preds = %100
  %105 = load ptr, ptr %18, align 8, !tbaa !5
  %106 = load i32, ptr %105, align 4, !tbaa !9
  %107 = sub nsw i32 0, %106
  store i32 %107, ptr %21, align 4, !tbaa !9
  %108 = call i32 @xerbla_(ptr noundef @.str.4, ptr noundef %21, i32 noundef 6)
  store i32 1, ptr %38, align 4
  br label %274

109:                                              ; preds = %100
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = icmp eq i32 %111, 0
  br i1 %112, label %113, label %114

113:                                              ; preds = %109
  store i32 1, ptr %38, align 4
  br label %274

114:                                              ; preds = %109
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = icmp eq i32 %116, 1
  br i1 %117, label %118, label %133

118:                                              ; preds = %114
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 1
  %121 = load double, ptr %120, align 8, !tbaa !11
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = getelementptr inbounds double, ptr %122, i64 1
  store double %121, ptr %123, align 8, !tbaa !11
  %124 = load i32, ptr %30, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %132

126:                                              ; preds = %118
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  %128 = load i32, ptr %19, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds double, ptr %127, i64 %130
  store double 1.000000e+00, ptr %131, align 8, !tbaa !11
  br label %132

132:                                              ; preds = %126, %118
  store i32 1, ptr %38, align 4
  br label %274

133:                                              ; preds = %114
  %134 = call double @dlamch_(ptr noundef @.str.5)
  store double %134, ptr %32, align 8, !tbaa !11
  %135 = call double @dlamch_(ptr noundef @.str.6)
  store double %135, ptr %37, align 8, !tbaa !11
  %136 = load double, ptr %32, align 8, !tbaa !11
  %137 = load double, ptr %37, align 8, !tbaa !11
  %138 = fdiv double %136, %137
  store double %138, ptr %36, align 8, !tbaa !11
  %139 = load double, ptr %36, align 8, !tbaa !11
  %140 = fdiv double 1.000000e+00, %139
  store double %140, ptr %33, align 8, !tbaa !11
  %141 = load double, ptr %36, align 8, !tbaa !11
  %142 = call double @sqrt(double noundef %141) #4
  store double %142, ptr %26, align 8, !tbaa !11
  %143 = load double, ptr %33, align 8, !tbaa !11
  %144 = call double @sqrt(double noundef %143) #4
  store double %144, ptr %27, align 8, !tbaa !11
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = getelementptr inbounds double, ptr %147, i64 1
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  %150 = getelementptr inbounds double, ptr %149, i64 1
  %151 = call double @dlansp_(ptr noundef @.str.7, ptr noundef %145, ptr noundef %146, ptr noundef %148, ptr noundef %150)
  store double %151, ptr %24, align 8, !tbaa !11
  store i32 0, ptr %31, align 4, !tbaa !9
  %152 = load double, ptr %24, align 8, !tbaa !11
  %153 = fcmp ogt double %152, 0.000000e+00
  br i1 %153, label %154, label %162

154:                                              ; preds = %133
  %155 = load double, ptr %24, align 8, !tbaa !11
  %156 = load double, ptr %26, align 8, !tbaa !11
  %157 = fcmp olt double %155, %156
  br i1 %157, label %158, label %162

158:                                              ; preds = %154
  store i32 1, ptr %31, align 4, !tbaa !9
  %159 = load double, ptr %26, align 8, !tbaa !11
  %160 = load double, ptr %24, align 8, !tbaa !11
  %161 = fdiv double %159, %160
  store double %161, ptr %28, align 8, !tbaa !11
  br label %171

162:                                              ; preds = %154, %133
  %163 = load double, ptr %24, align 8, !tbaa !11
  %164 = load double, ptr %27, align 8, !tbaa !11
  %165 = fcmp ogt double %163, %164
  br i1 %165, label %166, label %170

166:                                              ; preds = %162
  store i32 1, ptr %31, align 4, !tbaa !9
  %167 = load double, ptr %27, align 8, !tbaa !11
  %168 = load double, ptr %24, align 8, !tbaa !11
  %169 = fdiv double %167, %168
  store double %169, ptr %28, align 8, !tbaa !11
  br label %170

170:                                              ; preds = %166, %162
  br label %171

171:                                              ; preds = %170, %158
  %172 = load i32, ptr %31, align 4, !tbaa !9
  %173 = icmp eq i32 %172, 1
  br i1 %173, label %174, label %184

174:                                              ; preds = %171
  %175 = load ptr, ptr %12, align 8, !tbaa !5
  %176 = load i32, ptr %175, align 4, !tbaa !9
  %177 = load ptr, ptr %12, align 8, !tbaa !5
  %178 = load i32, ptr %177, align 4, !tbaa !9
  %179 = add nsw i32 %178, 1
  %180 = mul nsw i32 %176, %179
  %181 = sdiv i32 %180, 2
  store i32 %181, ptr %21, align 4, !tbaa !9
  %182 = load ptr, ptr %13, align 8, !tbaa !5
  %183 = getelementptr inbounds double, ptr %182, i64 1
  call void @dscal_(ptr noundef %21, ptr noundef %28, ptr noundef %183, ptr noundef @c__1)
  br label %184

184:                                              ; preds = %174, %171
  store i32 1, ptr %23, align 4, !tbaa !9
  %185 = load i32, ptr %23, align 4, !tbaa !9
  %186 = load ptr, ptr %12, align 8, !tbaa !5
  %187 = load i32, ptr %186, align 4, !tbaa !9
  %188 = add nsw i32 %185, %187
  store i32 %188, ptr %34, align 4, !tbaa !9
  %189 = load ptr, ptr %11, align 8, !tbaa !5
  %190 = load ptr, ptr %12, align 8, !tbaa !5
  %191 = load ptr, ptr %13, align 8, !tbaa !5
  %192 = getelementptr inbounds double, ptr %191, i64 1
  %193 = load ptr, ptr %14, align 8, !tbaa !5
  %194 = getelementptr inbounds double, ptr %193, i64 1
  %195 = load ptr, ptr %17, align 8, !tbaa !5
  %196 = load i32, ptr %23, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds double, ptr %195, i64 %197
  %199 = load ptr, ptr %17, align 8, !tbaa !5
  %200 = load i32, ptr %34, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds double, ptr %199, i64 %201
  call void @dsptrd_(ptr noundef %189, ptr noundef %190, ptr noundef %192, ptr noundef %194, ptr noundef %198, ptr noundef %202, ptr noundef %29)
  %203 = load i32, ptr %30, align 4, !tbaa !9
  %204 = icmp ne i32 %203, 0
  br i1 %204, label %214, label %205

205:                                              ; preds = %184
  %206 = load ptr, ptr %12, align 8, !tbaa !5
  %207 = load ptr, ptr %14, align 8, !tbaa !5
  %208 = getelementptr inbounds double, ptr %207, i64 1
  %209 = load ptr, ptr %17, align 8, !tbaa !5
  %210 = load i32, ptr %23, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds double, ptr %209, i64 %211
  %213 = load ptr, ptr %18, align 8, !tbaa !5
  call void @dsterf_(ptr noundef %206, ptr noundef %208, ptr noundef %212, ptr noundef %213)
  br label %254

214:                                              ; preds = %184
  %215 = load i32, ptr %34, align 4, !tbaa !9
  %216 = load ptr, ptr %12, align 8, !tbaa !5
  %217 = load i32, ptr %216, align 4, !tbaa !9
  %218 = add nsw i32 %215, %217
  store i32 %218, ptr %35, align 4, !tbaa !9
  %219 = load ptr, ptr %11, align 8, !tbaa !5
  %220 = load ptr, ptr %12, align 8, !tbaa !5
  %221 = load ptr, ptr %13, align 8, !tbaa !5
  %222 = getelementptr inbounds double, ptr %221, i64 1
  %223 = load ptr, ptr %17, align 8, !tbaa !5
  %224 = load i32, ptr %34, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds double, ptr %223, i64 %225
  %227 = load ptr, ptr %15, align 8, !tbaa !5
  %228 = load i32, ptr %20, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds double, ptr %227, i64 %229
  %231 = load ptr, ptr %16, align 8, !tbaa !5
  %232 = load ptr, ptr %17, align 8, !tbaa !5
  %233 = load i32, ptr %35, align 4, !tbaa !9
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds double, ptr %232, i64 %234
  call void @dopgtr_(ptr noundef %219, ptr noundef %220, ptr noundef %222, ptr noundef %226, ptr noundef %230, ptr noundef %231, ptr noundef %235, ptr noundef %29)
  %236 = load ptr, ptr %10, align 8, !tbaa !5
  %237 = load ptr, ptr %12, align 8, !tbaa !5
  %238 = load ptr, ptr %14, align 8, !tbaa !5
  %239 = getelementptr inbounds double, ptr %238, i64 1
  %240 = load ptr, ptr %17, align 8, !tbaa !5
  %241 = load i32, ptr %23, align 4, !tbaa !9
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds double, ptr %240, i64 %242
  %244 = load ptr, ptr %15, align 8, !tbaa !5
  %245 = load i32, ptr %20, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds double, ptr %244, i64 %246
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  %249 = load ptr, ptr %17, align 8, !tbaa !5
  %250 = load i32, ptr %34, align 4, !tbaa !9
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds double, ptr %249, i64 %251
  %253 = load ptr, ptr %18, align 8, !tbaa !5
  call void @dsteqr_(ptr noundef %236, ptr noundef %237, ptr noundef %239, ptr noundef %243, ptr noundef %247, ptr noundef %248, ptr noundef %252, ptr noundef %253)
  br label %254

254:                                              ; preds = %214, %205
  %255 = load i32, ptr %31, align 4, !tbaa !9
  %256 = icmp eq i32 %255, 1
  br i1 %256, label %257, label %273

257:                                              ; preds = %254
  %258 = load ptr, ptr %18, align 8, !tbaa !5
  %259 = load i32, ptr %258, align 4, !tbaa !9
  %260 = icmp eq i32 %259, 0
  br i1 %260, label %261, label %264

261:                                              ; preds = %257
  %262 = load ptr, ptr %12, align 8, !tbaa !5
  %263 = load i32, ptr %262, align 4, !tbaa !9
  store i32 %263, ptr %25, align 4, !tbaa !9
  br label %268

264:                                              ; preds = %257
  %265 = load ptr, ptr %18, align 8, !tbaa !5
  %266 = load i32, ptr %265, align 4, !tbaa !9
  %267 = sub nsw i32 %266, 1
  store i32 %267, ptr %25, align 4, !tbaa !9
  br label %268

268:                                              ; preds = %264, %261
  %269 = load double, ptr %28, align 8, !tbaa !11
  %270 = fdiv double 1.000000e+00, %269
  store double %270, ptr %22, align 8, !tbaa !11
  %271 = load ptr, ptr %14, align 8, !tbaa !5
  %272 = getelementptr inbounds double, ptr %271, i64 1
  call void @dscal_(ptr noundef %25, ptr noundef %22, ptr noundef %272, ptr noundef @c__1)
  br label %273

273:                                              ; preds = %268, %254
  store i32 1, ptr %38, align 4
  br label %274

274:                                              ; preds = %273, %132, %113, %104
  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 4, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 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 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #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 @dlansp_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @dsptrd_(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 @dopgtr_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @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 = !{!"int", !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 i32, align 4

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

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

19:                                               ; preds = %17, %9
  %20 = tail call i32 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.2) #4
  %.not105 = icmp eq i32 %20, 0
  br i1 %.not105, label %21, label %23

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

23:                                               ; preds = %21, %19
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %.thread.sink.split, label %26

26:                                               ; preds = %23
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 1
  %29 = icmp ult i32 %27, %24
  %or.cond = and i1 %.not, %29
  %or.cond113 = or i1 %28, %or.cond
  br i1 %or.cond113, label %.thread.sink.split, label %30

30:                                               ; preds = %26
  %.pr = load i32, ptr %8, align 4, !tbaa !5
  %.not107 = icmp eq i32 %.pr, 0
  br i1 %.not107, label %34, label %.thread

.thread.sink.split:                               ; preds = %26, %23, %21, %17
  %.sink = phi i32 [ -1, %17 ], [ -2, %21 ], [ -3, %23 ], [ -7, %26 ]
  store i32 %.sink, ptr %8, align 4, !tbaa !5
  br label %.thread

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

34:                                               ; preds = %30
  switch i32 %24, label %38 [
    i32 0, label %78
    i32 1, label %35
  ]

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

37:                                               ; preds = %35
  store double 1.000000e+00, ptr %5, align 8, !tbaa !9
  br label %78

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

48:                                               ; preds = %38
  %49 = fcmp ogt double %45, %44
  br i1 %49, label %50, label %55

50:                                               ; preds = %48, %38
  %.pn = phi double [ %43, %38 ], [ %44, %48 ]
  %storemerge112 = fdiv double %.pn, %45
  store double %storemerge112, ptr %13, align 8, !tbaa !9
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  %53 = mul nsw i32 %52, %51
  %54 = sdiv i32 %53, 2
  store i32 %54, ptr %10, align 4, !tbaa !5
  call void @dscal_(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef %3, ptr noundef nonnull @c__1) #4
  br label %55

55:                                               ; preds = %48, %50
  %56 = phi i1 [ true, %50 ], [ false, %48 ]
  %57 = load i32, ptr %2, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds double, ptr %15, i64 %59
  call void @dsptrd_(ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %4, ptr noundef %7, ptr noundef nonnull %60, ptr noundef nonnull %14) #4
  br i1 %.not, label %62, label %61

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

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

67:                                               ; preds = %62, %61
  br i1 %56, label %68, label %78

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

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

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

75:                                               ; preds = %73, %71
  %storemerge = phi i32 [ %74, %73 ], [ %72, %71 ]
  store i32 %storemerge, ptr %12, align 4, !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
  call void @dscal_(ptr noundef nonnull %12, ptr noundef nonnull %11, ptr noundef %4, ptr noundef nonnull @c__1) #4
  br label %78

78:                                               ; preds = %67, %75, %35, %37, %34, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #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 @dlansp_(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

declare void @dsptrd_(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 @dopgtr_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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


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