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

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

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

63:                                               ; preds = %11
  %64 = load ptr, ptr %22, align 8, !tbaa !5
  %65 = load i64, ptr %64, align 8, !tbaa !9
  %66 = icmp eq i64 %65, -1
  br label %67

67:                                               ; preds = %63, %11
  %68 = phi i1 [ true, %11 ], [ %66, %63 ]
  %69 = zext i1 %68 to i32
  %70 = sext i32 %69 to i64
  store i64 %70, ptr %40, align 8, !tbaa !9
  %71 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 0, ptr %71, align 8, !tbaa !9
  store i64 1, ptr %38, align 8, !tbaa !9
  store i64 1, ptr %33, align 8, !tbaa !9
  %72 = load ptr, ptr %14, align 8, !tbaa !5
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = icmp sgt i64 %73, 1
  br i1 %74, label %75, label %93

75:                                               ; preds = %67
  %76 = load i64, ptr %34, align 8, !tbaa !9
  %77 = icmp ne i64 %76, 0
  br i1 %77, label %78, label %93

78:                                               ; preds = %75
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = load i64, ptr %79, align 8, !tbaa !9
  store i64 %80, ptr %26, align 8, !tbaa !9
  %81 = load ptr, ptr %14, align 8, !tbaa !5
  %82 = load i64, ptr %81, align 8, !tbaa !9
  %83 = shl i64 %82, 2
  %84 = add nsw i64 %83, 1
  %85 = load i64, ptr %26, align 8, !tbaa !9
  %86 = load i64, ptr %26, align 8, !tbaa !9
  %87 = mul nsw i64 %85, %86
  %88 = add nsw i64 %84, %87
  store i64 %88, ptr %33, align 8, !tbaa !9
  %89 = load ptr, ptr %14, align 8, !tbaa !5
  %90 = load i64, ptr %89, align 8, !tbaa !9
  %91 = mul nsw i64 %90, 5
  %92 = add nsw i64 %91, 3
  store i64 %92, ptr %38, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %78, %75, %67
  %94 = load i64, ptr %34, align 8, !tbaa !9
  %95 = icmp ne i64 %94, 0
  br i1 %95, label %102, label %96

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

100:                                              ; preds = %96
  %101 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 -1, ptr %101, align 8, !tbaa !9
  br label %125

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

106:                                              ; preds = %102
  %107 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 -2, ptr %107, align 8, !tbaa !9
  br label %124

108:                                              ; preds = %102
  %109 = load ptr, ptr %18, align 8, !tbaa !5
  %110 = load i64, ptr %109, align 8, !tbaa !9
  %111 = icmp slt i64 %110, 1
  br i1 %111, label %121, label %112

112:                                              ; preds = %108
  %113 = load i64, ptr %34, align 8, !tbaa !9
  %114 = icmp ne i64 %113, 0
  br i1 %114, label %115, label %123

115:                                              ; preds = %112
  %116 = load ptr, ptr %18, align 8, !tbaa !5
  %117 = load i64, ptr %116, align 8, !tbaa !9
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load i64, ptr %118, align 8, !tbaa !9
  %120 = icmp slt i64 %117, %119
  br i1 %120, label %121, label %123

121:                                              ; preds = %115, %108
  %122 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 -6, ptr %122, align 8, !tbaa !9
  br label %123

123:                                              ; preds = %121, %115, %112
  br label %124

124:                                              ; preds = %123, %106
  br label %125

125:                                              ; preds = %124, %100
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  %127 = load i64, ptr %126, align 8, !tbaa !9
  %128 = icmp eq i64 %127, 0
  br i1 %128, label %129, label %158

129:                                              ; preds = %125
  %130 = load i64, ptr %33, align 8, !tbaa !9
  %131 = sitofp i64 %130 to double
  %132 = load ptr, ptr %19, align 8, !tbaa !5
  %133 = getelementptr inbounds double, ptr %132, i64 1
  store double %131, ptr %133, align 8, !tbaa !11
  %134 = load i64, ptr %38, align 8, !tbaa !9
  %135 = load ptr, ptr %21, align 8, !tbaa !5
  %136 = getelementptr inbounds i64, ptr %135, i64 1
  store i64 %134, ptr %136, align 8, !tbaa !9
  %137 = load ptr, ptr %20, align 8, !tbaa !5
  %138 = load i64, ptr %137, align 8, !tbaa !9
  %139 = load i64, ptr %33, align 8, !tbaa !9
  %140 = icmp slt i64 %138, %139
  br i1 %140, label %141, label %146

141:                                              ; preds = %129
  %142 = load i64, ptr %40, align 8, !tbaa !9
  %143 = icmp ne i64 %142, 0
  br i1 %143, label %146, label %144

144:                                              ; preds = %141
  %145 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 -8, ptr %145, align 8, !tbaa !9
  br label %157

146:                                              ; preds = %141, %129
  %147 = load ptr, ptr %22, align 8, !tbaa !5
  %148 = load i64, ptr %147, align 8, !tbaa !9
  %149 = load i64, ptr %38, align 8, !tbaa !9
  %150 = icmp slt i64 %148, %149
  br i1 %150, label %151, label %156

151:                                              ; preds = %146
  %152 = load i64, ptr %40, align 8, !tbaa !9
  %153 = icmp ne i64 %152, 0
  br i1 %153, label %156, label %154

154:                                              ; preds = %151
  %155 = load ptr, ptr %23, align 8, !tbaa !5
  store i64 -10, ptr %155, align 8, !tbaa !9
  br label %156

156:                                              ; preds = %154, %151, %146
  br label %157

157:                                              ; preds = %156, %144
  br label %158

158:                                              ; preds = %157, %125
  %159 = load ptr, ptr %23, align 8, !tbaa !5
  %160 = load i64, ptr %159, align 8, !tbaa !9
  %161 = icmp ne i64 %160, 0
  br i1 %161, label %162, label %167

162:                                              ; preds = %158
  %163 = load ptr, ptr %23, align 8, !tbaa !5
  %164 = load i64, ptr %163, align 8, !tbaa !9
  %165 = sub nsw i64 0, %164
  store i64 %165, ptr %26, align 8, !tbaa !9
  %166 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %26)
  store i32 0, ptr %12, align 4
  store i32 1, ptr %41, align 4
  br label %288

167:                                              ; preds = %158
  %168 = load i64, ptr %40, align 8, !tbaa !9
  %169 = icmp ne i64 %168, 0
  br i1 %169, label %170, label %171

170:                                              ; preds = %167
  store i32 0, ptr %12, align 4
  store i32 1, ptr %41, align 4
  br label %288

171:                                              ; preds = %167
  br label %172

172:                                              ; preds = %171
  %173 = load ptr, ptr %14, align 8, !tbaa !5
  %174 = load i64, ptr %173, align 8, !tbaa !9
  %175 = icmp eq i64 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %172
  store i32 0, ptr %12, align 4
  store i32 1, ptr %41, align 4
  br label %288

177:                                              ; preds = %172
  %178 = load ptr, ptr %14, align 8, !tbaa !5
  %179 = load i64, ptr %178, align 8, !tbaa !9
  %180 = icmp eq i64 %179, 1
  br i1 %180, label %181, label %190

181:                                              ; preds = %177
  %182 = load i64, ptr %34, align 8, !tbaa !9
  %183 = icmp ne i64 %182, 0
  br i1 %183, label %184, label %189

184:                                              ; preds = %181
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = load i64, ptr %24, align 8, !tbaa !9
  %187 = add nsw i64 %186, 1
  %188 = getelementptr inbounds double, ptr %185, i64 %187
  store double 1.000000e+00, ptr %188, align 8, !tbaa !11
  br label %189

189:                                              ; preds = %184, %181
  store i32 0, ptr %12, align 4
  store i32 1, ptr %41, align 4
  br label %288

190:                                              ; preds = %177
  %191 = call double @dlamch_(ptr noundef @.str.3)
  store double %191, ptr %36, align 8, !tbaa !11
  %192 = call double @dlamch_(ptr noundef @.str.4)
  store double %192, ptr %28, align 8, !tbaa !11
  %193 = load double, ptr %36, align 8, !tbaa !11
  %194 = load double, ptr %28, align 8, !tbaa !11
  %195 = fdiv double %193, %194
  store double %195, ptr %39, align 8, !tbaa !11
  %196 = load double, ptr %39, align 8, !tbaa !11
  %197 = fdiv double 1.000000e+00, %196
  store double %197, ptr %37, align 8, !tbaa !11
  %198 = load double, ptr %39, align 8, !tbaa !11
  %199 = call double @sqrt(double noundef %198) #4
  store double %199, ptr %29, align 8, !tbaa !11
  %200 = load double, ptr %37, align 8, !tbaa !11
  %201 = call double @sqrt(double noundef %200) #4
  store double %201, ptr %30, align 8, !tbaa !11
  store i64 0, ptr %35, align 8, !tbaa !9
  %202 = load ptr, ptr %14, align 8, !tbaa !5
  %203 = load ptr, ptr %15, align 8, !tbaa !5
  %204 = getelementptr inbounds double, ptr %203, i64 1
  %205 = load ptr, ptr %16, align 8, !tbaa !5
  %206 = getelementptr inbounds double, ptr %205, i64 1
  %207 = call double @dlanst_(ptr noundef @.str.5, ptr noundef %202, ptr noundef %204, ptr noundef %206)
  store double %207, ptr %31, align 8, !tbaa !11
  %208 = load double, ptr %31, align 8, !tbaa !11
  %209 = fcmp ogt double %208, 0.000000e+00
  br i1 %209, label %210, label %218

210:                                              ; preds = %190
  %211 = load double, ptr %31, align 8, !tbaa !11
  %212 = load double, ptr %29, align 8, !tbaa !11
  %213 = fcmp olt double %211, %212
  br i1 %213, label %214, label %218

214:                                              ; preds = %210
  store i64 1, ptr %35, align 8, !tbaa !9
  %215 = load double, ptr %29, align 8, !tbaa !11
  %216 = load double, ptr %31, align 8, !tbaa !11
  %217 = fdiv double %215, %216
  store double %217, ptr %32, align 8, !tbaa !11
  br label %227

218:                                              ; preds = %210, %190
  %219 = load double, ptr %31, align 8, !tbaa !11
  %220 = load double, ptr %30, align 8, !tbaa !11
  %221 = fcmp ogt double %219, %220
  br i1 %221, label %222, label %226

222:                                              ; preds = %218
  store i64 1, ptr %35, align 8, !tbaa !9
  %223 = load double, ptr %30, align 8, !tbaa !11
  %224 = load double, ptr %31, align 8, !tbaa !11
  %225 = fdiv double %223, %224
  store double %225, ptr %32, align 8, !tbaa !11
  br label %226

226:                                              ; preds = %222, %218
  br label %227

227:                                              ; preds = %226, %214
  %228 = load i64, ptr %35, align 8, !tbaa !9
  %229 = icmp eq i64 %228, 1
  br i1 %229, label %230, label %241

230:                                              ; preds = %227
  %231 = load ptr, ptr %14, align 8, !tbaa !5
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  %233 = getelementptr inbounds double, ptr %232, i64 1
  %234 = call i32 @f2c_dscal(ptr noundef %231, ptr noundef %32, ptr noundef %233, ptr noundef @c__1)
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = load i64, ptr %235, align 8, !tbaa !9
  %237 = sub nsw i64 %236, 1
  store i64 %237, ptr %26, align 8, !tbaa !9
  %238 = load ptr, ptr %16, align 8, !tbaa !5
  %239 = getelementptr inbounds double, ptr %238, i64 1
  %240 = call i32 @f2c_dscal(ptr noundef %26, ptr noundef %32, ptr noundef %239, ptr noundef @c__1)
  br label %241

241:                                              ; preds = %230, %227
  %242 = load i64, ptr %34, align 8, !tbaa !9
  %243 = icmp ne i64 %242, 0
  br i1 %243, label %252, label %244

244:                                              ; preds = %241
  %245 = load ptr, ptr %14, align 8, !tbaa !5
  %246 = load ptr, ptr %15, align 8, !tbaa !5
  %247 = getelementptr inbounds double, ptr %246, i64 1
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  %249 = getelementptr inbounds double, ptr %248, i64 1
  %250 = load ptr, ptr %23, align 8, !tbaa !5
  %251 = call i32 @dsterf_(ptr noundef %245, ptr noundef %247, ptr noundef %249, ptr noundef %250)
  br label %270

252:                                              ; preds = %241
  %253 = load ptr, ptr %14, align 8, !tbaa !5
  %254 = load ptr, ptr %15, align 8, !tbaa !5
  %255 = getelementptr inbounds double, ptr %254, i64 1
  %256 = load ptr, ptr %16, align 8, !tbaa !5
  %257 = getelementptr inbounds double, ptr %256, i64 1
  %258 = load ptr, ptr %17, align 8, !tbaa !5
  %259 = load i64, ptr %25, align 8, !tbaa !9
  %260 = getelementptr inbounds double, ptr %258, i64 %259
  %261 = load ptr, ptr %18, align 8, !tbaa !5
  %262 = load ptr, ptr %19, align 8, !tbaa !5
  %263 = getelementptr inbounds double, ptr %262, i64 1
  %264 = load ptr, ptr %20, align 8, !tbaa !5
  %265 = load ptr, ptr %21, align 8, !tbaa !5
  %266 = getelementptr inbounds i64, ptr %265, i64 1
  %267 = load ptr, ptr %22, align 8, !tbaa !5
  %268 = load ptr, ptr %23, align 8, !tbaa !5
  %269 = call i32 @dstedc_(ptr noundef @.str.6, ptr noundef %253, ptr noundef %255, ptr noundef %257, ptr noundef %260, ptr noundef %261, ptr noundef %263, ptr noundef %264, ptr noundef %266, ptr noundef %267, ptr noundef %268)
  br label %270

270:                                              ; preds = %252, %244
  %271 = load i64, ptr %35, align 8, !tbaa !9
  %272 = icmp eq i64 %271, 1
  br i1 %272, label %273, label %280

273:                                              ; preds = %270
  %274 = load double, ptr %32, align 8, !tbaa !11
  %275 = fdiv double 1.000000e+00, %274
  store double %275, ptr %27, align 8, !tbaa !11
  %276 = load ptr, ptr %14, align 8, !tbaa !5
  %277 = load ptr, ptr %15, align 8, !tbaa !5
  %278 = getelementptr inbounds double, ptr %277, i64 1
  %279 = call i32 @f2c_dscal(ptr noundef %276, ptr noundef %27, ptr noundef %278, ptr noundef @c__1)
  br label %280

280:                                              ; preds = %273, %270
  %281 = load i64, ptr %33, align 8, !tbaa !9
  %282 = sitofp i64 %281 to double
  %283 = load ptr, ptr %19, align 8, !tbaa !5
  %284 = getelementptr inbounds double, ptr %283, i64 1
  store double %282, ptr %284, align 8, !tbaa !11
  %285 = load i64, ptr %38, align 8, !tbaa !9
  %286 = load ptr, ptr %21, align 8, !tbaa !5
  %287 = getelementptr inbounds i64, ptr %286, i64 1
  store i64 %285, ptr %287, align 8, !tbaa !9
  store i32 0, ptr %12, align 4
  store i32 1, ptr %41, align 4
  br label %288

288:                                              ; preds = %280, %189, %176, %170, %162
  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 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
  %289 = load i32, ptr %12, align 4
  ret i32 %289
}

; 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 @dlanst_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@c__1 = external hidden global i64, align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @dstevd_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10) local_unnamed_addr #0 {
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  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
  %16 = load i64, ptr %7, align 8, !tbaa !5
  %17 = icmp eq i64 %16, -1
  br i1 %17, label %21, label %18

18:                                               ; preds = %11
  %19 = load i64, ptr %9, align 8, !tbaa !5
  %20 = icmp eq i64 %19, -1
  br label %21

21:                                               ; preds = %18, %11
  %22 = phi i1 [ true, %11 ], [ %20, %18 ]
  store i64 0, ptr %10, align 8, !tbaa !5
  %23 = load i64, ptr %1, align 8, !tbaa !5
  %24 = icmp sgt i64 %23, 1
  %25 = icmp ne i64 %15, 0
  %or.cond = select i1 %24, i1 %25, i1 false
  br i1 %or.cond, label %.thread136, label %32

.thread136:                                       ; preds = %21
  store i64 %23, ptr %12, align 8, !tbaa !5
  %26 = shl i64 %23, 2
  %27 = or disjoint i64 %26, 1
  %28 = mul nuw nsw i64 %23, %23
  %29 = add nsw i64 %27, %28
  %30 = mul nuw nsw i64 %23, 5
  %31 = add nuw nsw i64 %30, 3
  br label %38

32:                                               ; preds = %21
  br i1 %25, label %35, label %33

33:                                               ; preds = %32
  %34 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not = icmp eq i64 %34, 0
  br i1 %.not, label %.thread126.sink.split, label %._crit_edge

._crit_edge:                                      ; preds = %33
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %._crit_edge, %32
  %36 = phi i64 [ %.pre, %._crit_edge ], [ %23, %32 ]
  %37 = icmp slt i64 %36, 0
  br i1 %37, label %.thread126.sink.split, label %38

38:                                               ; preds = %.thread136, %35
  %.0100115140 = phi i64 [ %29, %.thread136 ], [ 1, %35 ]
  %.098117139 = phi i64 [ %31, %.thread136 ], [ 1, %35 ]
  %39 = phi i64 [ %23, %.thread136 ], [ %36, %35 ]
  %40 = load i64, ptr %5, align 8, !tbaa !5
  %41 = icmp slt i64 %40, 1
  %42 = icmp slt i64 %40, %39
  %or.cond109 = and i1 %25, %42
  %or.cond111 = select i1 %41, i1 true, i1 %or.cond109
  br i1 %or.cond111, label %.thread126.sink.split, label %43

43:                                               ; preds = %38
  %.pr = load i64, ptr %10, align 8, !tbaa !5
  %44 = icmp eq i64 %.pr, 0
  br i1 %44, label %45, label %.thread126

45:                                               ; preds = %43
  %46 = sitofp i64 %.0100115140 to double
  store double %46, ptr %6, align 8, !tbaa !9
  store i64 %.098117139, ptr %8, align 8, !tbaa !5
  %47 = load i64, ptr %7, align 8, !tbaa !5
  %48 = icmp sge i64 %47, %.0100115140
  %or.cond3 = select i1 %48, i1 true, i1 %22
  br i1 %or.cond3, label %49, label %.thread126.sink.split

49:                                               ; preds = %45
  %50 = load i64, ptr %9, align 8, !tbaa !5
  %51 = icmp sge i64 %50, %.098117139
  %or.cond5 = select i1 %51, i1 true, i1 %22
  br i1 %or.cond5, label %.thread118, label %.thread126.sink.split

.thread118:                                       ; preds = %49
  %.pr124.pr = load i64, ptr %10, align 8, !tbaa !5
  %.not108 = icmp eq i64 %.pr124.pr, 0
  br i1 %.not108, label %55, label %.thread126

.thread126.sink.split:                            ; preds = %49, %45, %38, %35, %33
  %.sink = phi i64 [ -1, %33 ], [ -2, %35 ], [ -6, %38 ], [ -8, %45 ], [ -10, %49 ]
  store i64 %.sink, ptr %10, align 8, !tbaa !5
  br label %.thread126

.thread126:                                       ; preds = %.thread126.sink.split, %43, %.thread118
  %52 = phi i64 [ %.pr124.pr, %.thread118 ], [ %.pr, %43 ], [ %.sink, %.thread126.sink.split ]
  %53 = sub nsw i64 0, %52
  store i64 %53, ptr %12, align 8, !tbaa !5
  %54 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %12) #4
  br label %89

55:                                               ; preds = %.thread118
  br i1 %22, label %89, label %56

56:                                               ; preds = %55
  %57 = load i64, ptr %1, align 8, !tbaa !5
  switch i64 %57, label %60 [
    i64 0, label %89
    i64 1, label %58
  ]

58:                                               ; preds = %56
  br i1 %25, label %59, label %89

59:                                               ; preds = %58
  store double 1.000000e+00, ptr %4, align 8, !tbaa !9
  br label %89

60:                                               ; preds = %56
  %61 = tail call double @dlamch_(ptr noundef nonnull @.str.3) #4
  %62 = tail call double @dlamch_(ptr noundef nonnull @.str.4) #4
  %63 = fdiv double %61, %62
  %64 = fdiv double 1.000000e+00, %63
  %65 = tail call double @sqrt(double noundef %63) #4
  %66 = tail call double @sqrt(double noundef %64) #4
  %67 = tail call double @dlanst_(ptr noundef nonnull @.str.5, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3) #4
  %68 = fcmp ogt double %67, 0.000000e+00
  %69 = fcmp olt double %67, %65
  %or.cond110 = select i1 %68, i1 %69, i1 false
  br i1 %or.cond110, label %72, label %70

70:                                               ; preds = %60
  %71 = fcmp ogt double %67, %66
  br i1 %71, label %72, label %77

72:                                               ; preds = %70, %60
  %.pn = phi double [ %65, %60 ], [ %66, %70 ]
  %storemerge = fdiv double %.pn, %67
  store double %storemerge, ptr %14, align 8, !tbaa !9
  %73 = call i32 @f2c_dscal(ptr noundef nonnull %1, ptr noundef nonnull %14, ptr noundef %2, ptr noundef nonnull @c__1) #4
  %74 = load i64, ptr %1, align 8, !tbaa !5
  %75 = add nsw i64 %74, -1
  store i64 %75, ptr %12, align 8, !tbaa !5
  %76 = call i32 @f2c_dscal(ptr noundef nonnull %12, ptr noundef nonnull %14, ptr noundef %3, ptr noundef nonnull @c__1) #4
  br label %77

77:                                               ; preds = %70, %72
  %78 = phi i1 [ true, %72 ], [ false, %70 ]
  br i1 %25, label %81, label %79

79:                                               ; preds = %77
  %80 = call i32 @dsterf_(ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %10) #4
  br label %83

81:                                               ; preds = %77
  %82 = call i32 @dstedc_(ptr noundef nonnull @.str.6, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10) #4
  br label %83

83:                                               ; preds = %81, %79
  br i1 %78, label %84, label %88

84:                                               ; preds = %83
  %85 = load double, ptr %14, align 8, !tbaa !9
  %86 = fdiv double 1.000000e+00, %85
  store double %86, ptr %13, align 8, !tbaa !9
  %87 = call i32 @f2c_dscal(ptr noundef nonnull %1, ptr noundef nonnull %13, ptr noundef %2, ptr noundef nonnull @c__1) #4
  br label %88

88:                                               ; preds = %84, %83
  store double %46, ptr %6, align 8, !tbaa !9
  store i64 %.098117139, ptr %8, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %58, %59, %56, %55, %88, %.thread126
  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
  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 @dlanst_(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 @dsterf_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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