; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (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 i32, align 4
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

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

64:                                               ; preds = %11
  %65 = load ptr, ptr %21, align 8, !tbaa !5
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = icmp eq i32 %66, -1
  br label %68

68:                                               ; preds = %64, %11
  %69 = phi i1 [ true, %11 ], [ %67, %64 ]
  %70 = zext i1 %69 to i32
  store i32 %70, ptr %38, align 4, !tbaa !9
  %71 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 0, ptr %71, align 4, !tbaa !9
  store i32 1, ptr %36, align 4, !tbaa !9
  store i32 1, ptr %31, align 4, !tbaa !9
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = icmp sgt i32 %73, 1
  br i1 %74, label %75, label %93

75:                                               ; preds = %68
  %76 = load i32, ptr %32, align 4, !tbaa !9
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %93

78:                                               ; preds = %75
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = load i32, ptr %79, align 4, !tbaa !9
  store i32 %80, ptr %25, align 4, !tbaa !9
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = load i32, ptr %81, align 4, !tbaa !9
  %83 = shl i32 %82, 2
  %84 = add nsw i32 %83, 1
  %85 = load i32, ptr %25, align 4, !tbaa !9
  %86 = load i32, ptr %25, align 4, !tbaa !9
  %87 = mul nsw i32 %85, %86
  %88 = add nsw i32 %84, %87
  store i32 %88, ptr %31, align 4, !tbaa !9
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = mul nsw i32 %90, 5
  %92 = add nsw i32 %91, 3
  store i32 %92, ptr %36, align 4, !tbaa !9
  br label %93

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

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

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

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

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

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

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

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

121:                                              ; preds = %115, %108
  %122 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 -6, ptr %122, align 4, !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 %22, align 8, !tbaa !5
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %158

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

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

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

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

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

154:                                              ; preds = %151
  %155 = load ptr, ptr %22, align 8, !tbaa !5
  store i32 -10, ptr %155, align 4, !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 %22, align 8, !tbaa !5
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %167

162:                                              ; preds = %158
  %163 = load ptr, ptr %22, align 8, !tbaa !5
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = sub nsw i32 0, %164
  store i32 %165, ptr %25, align 4, !tbaa !9
  %166 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %25, i32 noundef 6)
  store i32 1, ptr %40, align 4
  br label %285

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

170:                                              ; preds = %167
  store i32 1, ptr %40, align 4
  br label %285

171:                                              ; preds = %167
  br label %172

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

176:                                              ; preds = %172
  store i32 1, ptr %40, align 4
  br label %285

177:                                              ; preds = %172
  %178 = load ptr, ptr %13, align 8, !tbaa !5
  %179 = load i32, ptr %178, align 4, !tbaa !9
  %180 = icmp eq i32 %179, 1
  br i1 %180, label %181, label %191

181:                                              ; preds = %177
  %182 = load i32, ptr %32, align 4, !tbaa !9
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %190

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

190:                                              ; preds = %184, %181
  store i32 1, ptr %40, align 4
  br label %285

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

211:                                              ; preds = %191
  %212 = load double, ptr %29, align 8, !tbaa !11
  %213 = load double, ptr %27, align 8, !tbaa !11
  %214 = fcmp olt double %212, %213
  br i1 %214, label %215, label %219

215:                                              ; preds = %211
  store i32 1, ptr %33, align 4, !tbaa !9
  %216 = load double, ptr %27, align 8, !tbaa !11
  %217 = load double, ptr %29, align 8, !tbaa !11
  %218 = fdiv double %216, %217
  store double %218, ptr %30, align 8, !tbaa !11
  br label %228

219:                                              ; preds = %211, %191
  %220 = load double, ptr %29, align 8, !tbaa !11
  %221 = load double, ptr %28, align 8, !tbaa !11
  %222 = fcmp ogt double %220, %221
  br i1 %222, label %223, label %227

223:                                              ; preds = %219
  store i32 1, ptr %33, align 4, !tbaa !9
  %224 = load double, ptr %28, align 8, !tbaa !11
  %225 = load double, ptr %29, align 8, !tbaa !11
  %226 = fdiv double %224, %225
  store double %226, ptr %30, align 8, !tbaa !11
  br label %227

227:                                              ; preds = %223, %219
  br label %228

228:                                              ; preds = %227, %215
  %229 = load i32, ptr %33, align 4, !tbaa !9
  %230 = icmp eq i32 %229, 1
  br i1 %230, label %231, label %240

231:                                              ; preds = %228
  %232 = load ptr, ptr %13, align 8, !tbaa !5
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = getelementptr inbounds double, ptr %233, i64 1
  call void @dscal_(ptr noundef %232, ptr noundef %30, ptr noundef %234, ptr noundef @c__1)
  %235 = load ptr, ptr %13, align 8, !tbaa !5
  %236 = load i32, ptr %235, align 4, !tbaa !9
  %237 = sub nsw i32 %236, 1
  store i32 %237, ptr %25, align 4, !tbaa !9
  %238 = load ptr, ptr %15, align 8, !tbaa !5
  %239 = getelementptr inbounds double, ptr %238, i64 1
  call void @dscal_(ptr noundef %25, ptr noundef %30, ptr noundef %239, ptr noundef @c__1)
  br label %240

240:                                              ; preds = %231, %228
  %241 = load i32, ptr %32, align 4, !tbaa !9
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %250, label %243

243:                                              ; preds = %240
  %244 = load ptr, ptr %13, align 8, !tbaa !5
  %245 = load ptr, ptr %14, align 8, !tbaa !5
  %246 = getelementptr inbounds double, ptr %245, i64 1
  %247 = load ptr, ptr %15, align 8, !tbaa !5
  %248 = getelementptr inbounds double, ptr %247, i64 1
  %249 = load ptr, ptr %22, align 8, !tbaa !5
  call void @dsterf_(ptr noundef %244, ptr noundef %246, ptr noundef %248, ptr noundef %249)
  br label %268

250:                                              ; preds = %240
  %251 = load ptr, ptr %13, align 8, !tbaa !5
  %252 = load ptr, ptr %14, align 8, !tbaa !5
  %253 = getelementptr inbounds double, ptr %252, i64 1
  %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 = load i32, ptr %24, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds double, ptr %256, i64 %258
  %260 = load ptr, ptr %17, align 8, !tbaa !5
  %261 = load ptr, ptr %18, align 8, !tbaa !5
  %262 = getelementptr inbounds double, ptr %261, i64 1
  %263 = load ptr, ptr %19, align 8, !tbaa !5
  %264 = load ptr, ptr %20, align 8, !tbaa !5
  %265 = getelementptr inbounds i32, ptr %264, i64 1
  %266 = load ptr, ptr %21, align 8, !tbaa !5
  %267 = load ptr, ptr %22, align 8, !tbaa !5
  call void @dstedc_(ptr noundef @.str.6, ptr noundef %251, ptr noundef %253, ptr noundef %255, ptr noundef %259, ptr noundef %260, ptr noundef %262, ptr noundef %263, ptr noundef %265, ptr noundef %266, ptr noundef %267)
  br label %268

268:                                              ; preds = %250, %243
  %269 = load i32, ptr %33, align 4, !tbaa !9
  %270 = icmp eq i32 %269, 1
  br i1 %270, label %271, label %277

271:                                              ; preds = %268
  %272 = load double, ptr %30, align 8, !tbaa !11
  %273 = fdiv double 1.000000e+00, %272
  store double %273, ptr %26, align 8, !tbaa !11
  %274 = load ptr, ptr %13, align 8, !tbaa !5
  %275 = load ptr, ptr %14, align 8, !tbaa !5
  %276 = getelementptr inbounds double, ptr %275, i64 1
  call void @dscal_(ptr noundef %274, ptr noundef %26, ptr noundef %276, ptr noundef @c__1)
  br label %277

277:                                              ; preds = %271, %268
  %278 = load i32, ptr %31, align 4, !tbaa !9
  %279 = sitofp i32 %278 to double
  %280 = load ptr, ptr %18, align 8, !tbaa !5
  %281 = getelementptr inbounds double, ptr %280, i64 1
  store double %279, ptr %281, align 8, !tbaa !11
  %282 = load i32, ptr %36, align 4, !tbaa !9
  %283 = load ptr, ptr %20, align 8, !tbaa !5
  %284 = getelementptr inbounds i32, ptr %283, i64 1
  store i32 %282, ptr %284, align 4, !tbaa !9
  store i32 1, ptr %40, align 4
  br label %285

285:                                              ; preds = %277, %190, %176, %170, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 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 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #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 @dlanst_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare void @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 = !{!"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 [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 i32, align 4
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @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 i32, align 4
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  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 8, ptr nonnull %14) #4
  %15 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  %16 = load i32, ptr %7, align 4, !tbaa !5
  %17 = icmp eq i32 %16, -1
  br i1 %17, label %21, label %18

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

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

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

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

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

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

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

38:                                               ; preds = %.thread135, %35
  %.098114139 = phi i32 [ %29, %.thread135 ], [ 1, %35 ]
  %.0116138 = phi i32 [ %31, %.thread135 ], [ 1, %35 ]
  %39 = phi i32 [ %23, %.thread135 ], [ %36, %35 ]
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = icmp slt i32 %40, 1
  %42 = icmp slt i32 %40, %39
  %or.cond108 = and i1 %25, %42
  %or.cond110 = select i1 %41, i1 true, i1 %or.cond108
  br i1 %or.cond110, label %.thread125.sink.split, label %43

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

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

49:                                               ; preds = %45
  %50 = load i32, ptr %9, align 4, !tbaa !5
  %51 = icmp sge i32 %50, %.0116138
  %or.cond5 = select i1 %51, i1 true, i1 %22
  br i1 %or.cond5, label %.thread117, label %.thread125.sink.split

.thread117:                                       ; preds = %49
  %.pr123.pr = load i32, ptr %10, align 4, !tbaa !5
  %.not107 = icmp eq i32 %.pr123.pr, 0
  br i1 %.not107, label %55, label %.thread125

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

.thread125:                                       ; preds = %.thread125.sink.split, %43, %.thread117
  %52 = phi i32 [ %.pr123.pr, %.thread117 ], [ %.pr, %43 ], [ %.sink, %.thread125.sink.split ]
  %53 = sub nsw i32 0, %52
  store i32 %53, ptr %12, align 4, !tbaa !5
  %54 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %12, i32 noundef 6) #4
  br label %84

55:                                               ; preds = %.thread117
  br i1 %22, label %84, label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %1, align 4, !tbaa !5
  switch i32 %57, label %60 [
    i32 0, label %84
    i32 1, label %58
  ]

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

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

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.cond109 = select i1 %68, i1 %69, i1 false
  br i1 %or.cond109, label %72, label %70

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

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
  call void @dscal_(ptr noundef nonnull %1, ptr noundef nonnull %14, ptr noundef %2, ptr noundef nonnull @c__1) #4
  %73 = load i32, ptr %1, align 4, !tbaa !5
  %74 = add nsw i32 %73, -1
  store i32 %74, ptr %12, align 4, !tbaa !5
  call void @dscal_(ptr noundef nonnull %12, ptr noundef nonnull %14, ptr noundef %3, ptr noundef nonnull @c__1) #4
  br label %75

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

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

78:                                               ; preds = %75
  call void @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 %79

79:                                               ; preds = %78, %77
  br i1 %76, label %80, label %83

80:                                               ; preds = %79
  %81 = load double, ptr %14, align 8, !tbaa !9
  %82 = fdiv double 1.000000e+00, %81
  store double %82, ptr %13, align 8, !tbaa !9
  call void @dscal_(ptr noundef nonnull %1, ptr noundef nonnull %13, ptr noundef %2, ptr noundef nonnull @c__1) #4
  br label %83

83:                                               ; preds = %80, %79
  store double %46, ptr %6, align 8, !tbaa !9
  store i32 %.0116138, ptr %8, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %58, %59, %56, %55, %83, %.thread125
  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 4, ptr nonnull %12) #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 @dlanst_(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 @dsterf_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @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 = !{!"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