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

; 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
@c__1 = external hidden global i64, align 8
@c_b8 = external hidden global double, align 8
@c_b14 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @dsptrd_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %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 i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = getelementptr inbounds double, ptr %26, i32 -1
  store ptr %27, ptr %14, align 8, !tbaa !5
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = getelementptr inbounds double, ptr %28, i32 -1
  store ptr %29, ptr %13, align 8, !tbaa !5
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  %31 = getelementptr inbounds double, ptr %30, i32 -1
  store ptr %31, ptr %12, align 8, !tbaa !5
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = getelementptr inbounds double, ptr %32, i32 -1
  store ptr %33, ptr %11, align 8, !tbaa !5
  %34 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %34, align 8, !tbaa !9
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = call i64 @lsame_(ptr noundef %35, ptr noundef @.str)
  store i64 %36, ptr %24, align 8, !tbaa !9
  %37 = load i64, ptr %24, align 8, !tbaa !9
  %38 = icmp ne i64 %37, 0
  br i1 %38, label %45, label %39

39:                                               ; preds = %7
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = call i64 @lsame_(ptr noundef %40, ptr noundef @.str.1)
  %42 = icmp ne i64 %41, 0
  br i1 %42, label %45, label %43

43:                                               ; preds = %39
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 -1, ptr %44, align 8, !tbaa !9
  br label %52

45:                                               ; preds = %39, %7
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load i64, ptr %46, align 8, !tbaa !9
  %48 = icmp slt i64 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %45
  %50 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 -2, ptr %50, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %49, %45
  br label %52

52:                                               ; preds = %51, %43
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = icmp ne i64 %54, 0
  br i1 %55, label %56, label %61

56:                                               ; preds = %52
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = sub nsw i64 0, %58
  store i64 %59, ptr %16, align 8, !tbaa !9
  %60 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %16)
  store i32 0, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %321

61:                                               ; preds = %52
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = icmp sle i64 %63, 0
  br i1 %64, label %65, label %66

65:                                               ; preds = %61
  store i32 0, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %321

66:                                               ; preds = %61
  %67 = load i64, ptr %24, align 8, !tbaa !9
  %68 = icmp ne i64 %67, 0
  br i1 %68, label %69, label %184

69:                                               ; preds = %66
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load i64, ptr %70, align 8, !tbaa !9
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = sub nsw i64 %73, 1
  %75 = mul nsw i64 %71, %74
  %76 = sdiv i64 %75, 2
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %19, align 8, !tbaa !9
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = sub nsw i64 %79, 1
  store i64 %80, ptr %18, align 8, !tbaa !9
  br label %81

81:                                               ; preds = %175, %69
  %82 = load i64, ptr %18, align 8, !tbaa !9
  %83 = icmp sge i64 %82, 1
  br i1 %83, label %84, label %178

84:                                               ; preds = %81
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = load i64, ptr %19, align 8, !tbaa !9
  %87 = load i64, ptr %18, align 8, !tbaa !9
  %88 = add nsw i64 %86, %87
  %89 = sub nsw i64 %88, 1
  %90 = getelementptr inbounds double, ptr %85, i64 %89
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = load i64, ptr %19, align 8, !tbaa !9
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  %94 = call i32 @dlarfg_(ptr noundef %18, ptr noundef %90, ptr noundef %93, ptr noundef @c__1, ptr noundef %22)
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = load i64, ptr %19, align 8, !tbaa !9
  %97 = load i64, ptr %18, align 8, !tbaa !9
  %98 = add nsw i64 %96, %97
  %99 = sub nsw i64 %98, 1
  %100 = getelementptr inbounds double, ptr %95, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !11
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = load i64, ptr %18, align 8, !tbaa !9
  %104 = getelementptr inbounds double, ptr %102, i64 %103
  store double %101, ptr %104, align 8, !tbaa !11
  %105 = load double, ptr %22, align 8, !tbaa !11
  %106 = fcmp une double %105, 0.000000e+00
  br i1 %106, label %107, label %157

107:                                              ; preds = %84
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = load i64, ptr %19, align 8, !tbaa !9
  %110 = load i64, ptr %18, align 8, !tbaa !9
  %111 = add nsw i64 %109, %110
  %112 = sub nsw i64 %111, 1
  %113 = getelementptr inbounds double, ptr %108, i64 %112
  store double 1.000000e+00, ptr %113, align 8, !tbaa !11
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = getelementptr inbounds double, ptr %115, i64 1
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = load i64, ptr %19, align 8, !tbaa !9
  %119 = getelementptr inbounds double, ptr %117, i64 %118
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = getelementptr inbounds double, ptr %120, i64 1
  %122 = call i32 @f2c_dspmv(ptr noundef %114, ptr noundef %18, ptr noundef %22, ptr noundef %116, ptr noundef %119, ptr noundef @c__1, ptr noundef @c_b8, ptr noundef %121, ptr noundef @c__1)
  %123 = load double, ptr %22, align 8, !tbaa !11
  %124 = fmul double %123, -5.000000e-01
  %125 = load ptr, ptr %14, align 8, !tbaa !5
  %126 = getelementptr inbounds double, ptr %125, i64 1
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = load i64, ptr %19, align 8, !tbaa !9
  %129 = getelementptr inbounds double, ptr %127, i64 %128
  %130 = call double @f2c_ddot(ptr noundef %18, ptr noundef %126, ptr noundef @c__1, ptr noundef %129, ptr noundef @c__1)
  %131 = fmul double %124, %130
  store double %131, ptr %23, align 8, !tbaa !11
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = load i64, ptr %19, align 8, !tbaa !9
  %134 = getelementptr inbounds double, ptr %132, i64 %133
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  %136 = getelementptr inbounds double, ptr %135, i64 1
  %137 = call i32 @f2c_daxpy(ptr noundef %18, ptr noundef %23, ptr noundef %134, ptr noundef @c__1, ptr noundef %136, ptr noundef @c__1)
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = load i64, ptr %19, align 8, !tbaa !9
  %141 = getelementptr inbounds double, ptr %139, i64 %140
  %142 = load ptr, ptr %14, align 8, !tbaa !5
  %143 = getelementptr inbounds double, ptr %142, i64 1
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %144, i64 1
  %146 = call i32 @f2c_dspr2(ptr noundef %138, ptr noundef %18, ptr noundef @c_b14, ptr noundef %141, ptr noundef @c__1, ptr noundef %143, ptr noundef @c__1, ptr noundef %145)
  %147 = load ptr, ptr %13, align 8, !tbaa !5
  %148 = load i64, ptr %18, align 8, !tbaa !9
  %149 = getelementptr inbounds double, ptr %147, i64 %148
  %150 = load double, ptr %149, align 8, !tbaa !11
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = load i64, ptr %19, align 8, !tbaa !9
  %153 = load i64, ptr %18, align 8, !tbaa !9
  %154 = add nsw i64 %152, %153
  %155 = sub nsw i64 %154, 1
  %156 = getelementptr inbounds double, ptr %151, i64 %155
  store double %150, ptr %156, align 8, !tbaa !11
  br label %157

157:                                              ; preds = %107, %84
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = load i64, ptr %19, align 8, !tbaa !9
  %160 = load i64, ptr %18, align 8, !tbaa !9
  %161 = add nsw i64 %159, %160
  %162 = getelementptr inbounds double, ptr %158, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !11
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  %165 = load i64, ptr %18, align 8, !tbaa !9
  %166 = add nsw i64 %165, 1
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  store double %163, ptr %167, align 8, !tbaa !11
  %168 = load double, ptr %22, align 8, !tbaa !11
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  %170 = load i64, ptr %18, align 8, !tbaa !9
  %171 = getelementptr inbounds double, ptr %169, i64 %170
  store double %168, ptr %171, align 8, !tbaa !11
  %172 = load i64, ptr %18, align 8, !tbaa !9
  %173 = load i64, ptr %19, align 8, !tbaa !9
  %174 = sub nsw i64 %173, %172
  store i64 %174, ptr %19, align 8, !tbaa !9
  br label %175

175:                                              ; preds = %157
  %176 = load i64, ptr %18, align 8, !tbaa !9
  %177 = add nsw i64 %176, -1
  store i64 %177, ptr %18, align 8, !tbaa !9
  br label %81, !llvm.loop !13

178:                                              ; preds = %81
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = getelementptr inbounds double, ptr %179, i64 1
  %181 = load double, ptr %180, align 8, !tbaa !11
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = getelementptr inbounds double, ptr %182, i64 1
  store double %181, ptr %183, align 8, !tbaa !11
  br label %320

184:                                              ; preds = %66
  store i64 1, ptr %20, align 8, !tbaa !9
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = load i64, ptr %185, align 8, !tbaa !9
  %187 = sub nsw i64 %186, 1
  store i64 %187, ptr %16, align 8, !tbaa !9
  store i64 1, ptr %18, align 8, !tbaa !9
  br label %188

188:                                              ; preds = %308, %184
  %189 = load i64, ptr %18, align 8, !tbaa !9
  %190 = load i64, ptr %16, align 8, !tbaa !9
  %191 = icmp sle i64 %189, %190
  br i1 %191, label %192, label %311

192:                                              ; preds = %188
  %193 = load i64, ptr %20, align 8, !tbaa !9
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = load i64, ptr %194, align 8, !tbaa !9
  %196 = add nsw i64 %193, %195
  %197 = load i64, ptr %18, align 8, !tbaa !9
  %198 = sub nsw i64 %196, %197
  %199 = add nsw i64 %198, 1
  store i64 %199, ptr %21, align 8, !tbaa !9
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = load i64, ptr %200, align 8, !tbaa !9
  %202 = load i64, ptr %18, align 8, !tbaa !9
  %203 = sub nsw i64 %201, %202
  store i64 %203, ptr %17, align 8, !tbaa !9
  %204 = load ptr, ptr %11, align 8, !tbaa !5
  %205 = load i64, ptr %20, align 8, !tbaa !9
  %206 = add nsw i64 %205, 1
  %207 = getelementptr inbounds double, ptr %204, i64 %206
  %208 = load ptr, ptr %11, align 8, !tbaa !5
  %209 = load i64, ptr %20, align 8, !tbaa !9
  %210 = add nsw i64 %209, 2
  %211 = getelementptr inbounds double, ptr %208, i64 %210
  %212 = call i32 @dlarfg_(ptr noundef %17, ptr noundef %207, ptr noundef %211, ptr noundef @c__1, ptr noundef %22)
  %213 = load ptr, ptr %11, align 8, !tbaa !5
  %214 = load i64, ptr %20, align 8, !tbaa !9
  %215 = add nsw i64 %214, 1
  %216 = getelementptr inbounds double, ptr %213, i64 %215
  %217 = load double, ptr %216, align 8, !tbaa !11
  %218 = load ptr, ptr %13, align 8, !tbaa !5
  %219 = load i64, ptr %18, align 8, !tbaa !9
  %220 = getelementptr inbounds double, ptr %218, i64 %219
  store double %217, ptr %220, align 8, !tbaa !11
  %221 = load double, ptr %22, align 8, !tbaa !11
  %222 = fcmp une double %221, 0.000000e+00
  br i1 %222, label %223, label %295

223:                                              ; preds = %192
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = load i64, ptr %20, align 8, !tbaa !9
  %226 = add nsw i64 %225, 1
  %227 = getelementptr inbounds double, ptr %224, i64 %226
  store double 1.000000e+00, ptr %227, align 8, !tbaa !11
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  %229 = load i64, ptr %228, align 8, !tbaa !9
  %230 = load i64, ptr %18, align 8, !tbaa !9
  %231 = sub nsw i64 %229, %230
  store i64 %231, ptr %17, align 8, !tbaa !9
  %232 = load ptr, ptr %9, align 8, !tbaa !5
  %233 = load ptr, ptr %11, align 8, !tbaa !5
  %234 = load i64, ptr %21, align 8, !tbaa !9
  %235 = getelementptr inbounds double, ptr %233, i64 %234
  %236 = load ptr, ptr %11, align 8, !tbaa !5
  %237 = load i64, ptr %20, align 8, !tbaa !9
  %238 = add nsw i64 %237, 1
  %239 = getelementptr inbounds double, ptr %236, i64 %238
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = load i64, ptr %18, align 8, !tbaa !9
  %242 = getelementptr inbounds double, ptr %240, i64 %241
  %243 = call i32 @f2c_dspmv(ptr noundef %232, ptr noundef %17, ptr noundef %22, ptr noundef %235, ptr noundef %239, ptr noundef @c__1, ptr noundef @c_b8, ptr noundef %242, ptr noundef @c__1)
  %244 = load ptr, ptr %10, align 8, !tbaa !5
  %245 = load i64, ptr %244, align 8, !tbaa !9
  %246 = load i64, ptr %18, align 8, !tbaa !9
  %247 = sub nsw i64 %245, %246
  store i64 %247, ptr %17, align 8, !tbaa !9
  %248 = load double, ptr %22, align 8, !tbaa !11
  %249 = fmul double %248, -5.000000e-01
  %250 = load ptr, ptr %14, align 8, !tbaa !5
  %251 = load i64, ptr %18, align 8, !tbaa !9
  %252 = getelementptr inbounds double, ptr %250, i64 %251
  %253 = load ptr, ptr %11, align 8, !tbaa !5
  %254 = load i64, ptr %20, align 8, !tbaa !9
  %255 = add nsw i64 %254, 1
  %256 = getelementptr inbounds double, ptr %253, i64 %255
  %257 = call double @f2c_ddot(ptr noundef %17, ptr noundef %252, ptr noundef @c__1, ptr noundef %256, ptr noundef @c__1)
  %258 = fmul double %249, %257
  store double %258, ptr %23, align 8, !tbaa !11
  %259 = load ptr, ptr %10, align 8, !tbaa !5
  %260 = load i64, ptr %259, align 8, !tbaa !9
  %261 = load i64, ptr %18, align 8, !tbaa !9
  %262 = sub nsw i64 %260, %261
  store i64 %262, ptr %17, align 8, !tbaa !9
  %263 = load ptr, ptr %11, align 8, !tbaa !5
  %264 = load i64, ptr %20, align 8, !tbaa !9
  %265 = add nsw i64 %264, 1
  %266 = getelementptr inbounds double, ptr %263, i64 %265
  %267 = load ptr, ptr %14, align 8, !tbaa !5
  %268 = load i64, ptr %18, align 8, !tbaa !9
  %269 = getelementptr inbounds double, ptr %267, i64 %268
  %270 = call i32 @f2c_daxpy(ptr noundef %17, ptr noundef %23, ptr noundef %266, ptr noundef @c__1, ptr noundef %269, ptr noundef @c__1)
  %271 = load ptr, ptr %10, align 8, !tbaa !5
  %272 = load i64, ptr %271, align 8, !tbaa !9
  %273 = load i64, ptr %18, align 8, !tbaa !9
  %274 = sub nsw i64 %272, %273
  store i64 %274, ptr %17, align 8, !tbaa !9
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  %276 = load ptr, ptr %11, align 8, !tbaa !5
  %277 = load i64, ptr %20, align 8, !tbaa !9
  %278 = add nsw i64 %277, 1
  %279 = getelementptr inbounds double, ptr %276, i64 %278
  %280 = load ptr, ptr %14, align 8, !tbaa !5
  %281 = load i64, ptr %18, align 8, !tbaa !9
  %282 = getelementptr inbounds double, ptr %280, i64 %281
  %283 = load ptr, ptr %11, align 8, !tbaa !5
  %284 = load i64, ptr %21, align 8, !tbaa !9
  %285 = getelementptr inbounds double, ptr %283, i64 %284
  %286 = call i32 @f2c_dspr2(ptr noundef %275, ptr noundef %17, ptr noundef @c_b14, ptr noundef %279, ptr noundef @c__1, ptr noundef %282, ptr noundef @c__1, ptr noundef %285)
  %287 = load ptr, ptr %13, align 8, !tbaa !5
  %288 = load i64, ptr %18, align 8, !tbaa !9
  %289 = getelementptr inbounds double, ptr %287, i64 %288
  %290 = load double, ptr %289, align 8, !tbaa !11
  %291 = load ptr, ptr %11, align 8, !tbaa !5
  %292 = load i64, ptr %20, align 8, !tbaa !9
  %293 = add nsw i64 %292, 1
  %294 = getelementptr inbounds double, ptr %291, i64 %293
  store double %290, ptr %294, align 8, !tbaa !11
  br label %295

295:                                              ; preds = %223, %192
  %296 = load ptr, ptr %11, align 8, !tbaa !5
  %297 = load i64, ptr %20, align 8, !tbaa !9
  %298 = getelementptr inbounds double, ptr %296, i64 %297
  %299 = load double, ptr %298, align 8, !tbaa !11
  %300 = load ptr, ptr %12, align 8, !tbaa !5
  %301 = load i64, ptr %18, align 8, !tbaa !9
  %302 = getelementptr inbounds double, ptr %300, i64 %301
  store double %299, ptr %302, align 8, !tbaa !11
  %303 = load double, ptr %22, align 8, !tbaa !11
  %304 = load ptr, ptr %14, align 8, !tbaa !5
  %305 = load i64, ptr %18, align 8, !tbaa !9
  %306 = getelementptr inbounds double, ptr %304, i64 %305
  store double %303, ptr %306, align 8, !tbaa !11
  %307 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %307, ptr %20, align 8, !tbaa !9
  br label %308

308:                                              ; preds = %295
  %309 = load i64, ptr %18, align 8, !tbaa !9
  %310 = add nsw i64 %309, 1
  store i64 %310, ptr %18, align 8, !tbaa !9
  br label %188, !llvm.loop !15

311:                                              ; preds = %188
  %312 = load ptr, ptr %11, align 8, !tbaa !5
  %313 = load i64, ptr %20, align 8, !tbaa !9
  %314 = getelementptr inbounds double, ptr %312, i64 %313
  %315 = load double, ptr %314, align 8, !tbaa !11
  %316 = load ptr, ptr %12, align 8, !tbaa !5
  %317 = load ptr, ptr %10, align 8, !tbaa !5
  %318 = load i64, ptr %317, align 8, !tbaa !9
  %319 = getelementptr inbounds double, ptr %316, i64 %318
  store double %315, ptr %319, align 8, !tbaa !11
  br label %320

320:                                              ; preds = %311, %178
  store i32 0, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %321

321:                                              ; preds = %320, %65, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %322 = load i32, ptr %8, align 4
  ret i32 %322
}

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

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

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

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

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

!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}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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
@c__1 = external hidden global i64, align 8
@c_b8 = external hidden global double, align 8
@c_b14 = external hidden global double, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @dsptrd_(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef %4, ptr noundef %5, ptr nocapture noundef %6) local_unnamed_addr #0 {
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  %13 = getelementptr inbounds i8, ptr %5, i64 -8
  %14 = getelementptr inbounds i8, ptr %4, i64 -8
  %15 = getelementptr inbounds i8, ptr %3, i64 -8
  %16 = getelementptr inbounds i8, ptr %2, i64 -8
  store i64 0, ptr %6, align 8, !tbaa !5
  %17 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #3
  %.not = icmp eq i64 %17, 0
  br i1 %.not, label %18, label %20

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

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

23:                                               ; preds = %20
  %.pr = load i64, ptr %6, align 8, !tbaa !5
  %.not106 = icmp eq i64 %.pr, 0
  br i1 %.not106, label %27, label %.thread

.thread.sink.split:                               ; preds = %20, %18
  %.sink = phi i64 [ -1, %18 ], [ -2, %20 ]
  store i64 %.sink, ptr %6, align 8, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %23
  %24 = phi i64 [ %.pr, %23 ], [ %.sink, %.thread.sink.split ]
  %25 = sub nsw i64 0, %24
  store i64 %25, ptr %8, align 8, !tbaa !5
  %26 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #3
  br label %114

27:                                               ; preds = %23
  %28 = icmp eq i64 %21, 0
  br i1 %28, label %114, label %29

29:                                               ; preds = %27
  %30 = add nsw i64 %21, -1
  br i1 %.not, label %70, label %31

31:                                               ; preds = %29
  store i64 %30, ptr %10, align 8, !tbaa !5
  %.not118 = icmp eq i64 %21, 1
  br i1 %.not118, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %31
  %32 = mul nsw i64 %30, %21
  %33 = lshr i64 %32, 1
  %34 = add nuw nsw i64 %33, 1
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %59
  %.0101111 = phi i64 [ %66, %59 ], [ %34, %.lr.ph.preheader ]
  %storemerge108110 = phi i64 [ %67, %59 ], [ %30, %.lr.ph.preheader ]
  %35 = getelementptr double, ptr %16, i64 %.0101111
  %36 = getelementptr double, ptr %35, i64 %storemerge108110
  %37 = getelementptr i8, ptr %36, i64 -8
  %38 = call i32 @dlarfg_(ptr noundef nonnull %10, ptr noundef %37, ptr noundef nonnull %35, ptr noundef nonnull @c__1, ptr noundef nonnull %11) #3
  %39 = load i64, ptr %10, align 8, !tbaa !5
  %40 = getelementptr double, ptr %35, i64 %39
  %41 = getelementptr i8, ptr %40, i64 -8
  %42 = load double, ptr %41, align 8, !tbaa !9
  %43 = getelementptr inbounds double, ptr %14, i64 %39
  store double %42, ptr %43, align 8, !tbaa !9
  %44 = load double, ptr %11, align 8, !tbaa !9
  %45 = fcmp une double %44, 0.000000e+00
  br i1 %45, label %46, label %59

46:                                               ; preds = %.lr.ph
  store double 1.000000e+00, ptr %41, align 8, !tbaa !9
  %47 = call i32 @f2c_dspmv(ptr noundef %0, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %2, ptr noundef nonnull %35, ptr noundef nonnull @c__1, ptr noundef nonnull @c_b8, ptr noundef %5, ptr noundef nonnull @c__1) #3
  %48 = load double, ptr %11, align 8, !tbaa !9
  %49 = fmul double %48, -5.000000e-01
  %50 = call double @f2c_ddot(ptr noundef nonnull %10, ptr noundef %5, ptr noundef nonnull @c__1, ptr noundef nonnull %35, ptr noundef nonnull @c__1) #3
  %51 = fmul double %49, %50
  store double %51, ptr %12, align 8, !tbaa !9
  %52 = call i32 @f2c_daxpy(ptr noundef nonnull %10, ptr noundef nonnull %12, ptr noundef nonnull %35, ptr noundef nonnull @c__1, ptr noundef %5, ptr noundef nonnull @c__1) #3
  %53 = call i32 @f2c_dspr2(ptr noundef %0, ptr noundef nonnull %10, ptr noundef nonnull @c_b14, ptr noundef nonnull %35, ptr noundef nonnull @c__1, ptr noundef %5, ptr noundef nonnull @c__1, ptr noundef nonnull %2) #3
  %54 = load i64, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds double, ptr %14, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = getelementptr double, ptr %35, i64 %54
  %58 = getelementptr i8, ptr %57, i64 -8
  store double %56, ptr %58, align 8, !tbaa !9
  %.pre = load double, ptr %11, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %46, %.lr.ph
  %60 = phi double [ %.pre, %46 ], [ %44, %.lr.ph ]
  %61 = phi i64 [ %54, %46 ], [ %39, %.lr.ph ]
  %62 = getelementptr double, ptr %35, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !9
  %64 = getelementptr double, ptr %3, i64 %61
  store double %63, ptr %64, align 8, !tbaa !9
  %65 = getelementptr inbounds double, ptr %13, i64 %61
  store double %60, ptr %65, align 8, !tbaa !9
  %66 = sub nsw i64 %.0101111, %61
  %67 = add nsw i64 %61, -1
  store i64 %67, ptr %10, align 8, !tbaa !5
  %68 = icmp sgt i64 %61, 1
  br i1 %68, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %59, %31
  %69 = load double, ptr %2, align 8, !tbaa !9
  store double %69, ptr %3, align 8, !tbaa !9
  br label %114

70:                                               ; preds = %29
  %.not107112 = icmp eq i64 %21, 1
  br i1 %.not107112, label %._crit_edge117, label %.lr.ph116

.lr.ph116:                                        ; preds = %70, %104
  %.0100114 = phi i64 [ %75, %104 ], [ 1, %70 ]
  %71 = phi i64 [ %109, %104 ], [ 1, %70 ]
  %72 = load i64, ptr %1, align 8, !tbaa !5
  %73 = sub i64 %.0100114, %71
  %74 = add i64 %73, %72
  %75 = add nsw i64 %74, 1
  %76 = sub nsw i64 %72, %71
  store i64 %76, ptr %9, align 8, !tbaa !5
  %77 = getelementptr double, ptr %2, i64 %.0100114
  %78 = getelementptr double, ptr %16, i64 %.0100114
  %79 = getelementptr i8, ptr %78, i64 16
  %80 = call i32 @dlarfg_(ptr noundef nonnull %9, ptr noundef %77, ptr noundef %79, ptr noundef nonnull @c__1, ptr noundef nonnull %11) #3
  %81 = load double, ptr %77, align 8, !tbaa !9
  %82 = getelementptr inbounds double, ptr %14, i64 %71
  store double %81, ptr %82, align 8, !tbaa !9
  %83 = load double, ptr %11, align 8, !tbaa !9
  %84 = fcmp une double %83, 0.000000e+00
  br i1 %84, label %85, label %104

85:                                               ; preds = %.lr.ph116
  store double 1.000000e+00, ptr %77, align 8, !tbaa !9
  %86 = load i64, ptr %1, align 8, !tbaa !5
  %87 = sub nsw i64 %86, %71
  store i64 %87, ptr %9, align 8, !tbaa !5
  %88 = getelementptr double, ptr %2, i64 %74
  %89 = getelementptr inbounds double, ptr %13, i64 %71
  %90 = call i32 @f2c_dspmv(ptr noundef %0, ptr noundef nonnull %9, ptr noundef nonnull %11, ptr noundef %88, ptr noundef nonnull %77, ptr noundef nonnull @c__1, ptr noundef nonnull @c_b8, ptr noundef nonnull %89, ptr noundef nonnull @c__1) #3
  %91 = load i64, ptr %1, align 8, !tbaa !5
  %92 = sub nsw i64 %91, %71
  store i64 %92, ptr %9, align 8, !tbaa !5
  %93 = load double, ptr %11, align 8, !tbaa !9
  %94 = fmul double %93, -5.000000e-01
  %95 = call double @f2c_ddot(ptr noundef nonnull %9, ptr noundef nonnull %89, ptr noundef nonnull @c__1, ptr noundef nonnull %77, ptr noundef nonnull @c__1) #3
  %96 = fmul double %94, %95
  store double %96, ptr %12, align 8, !tbaa !9
  %97 = load i64, ptr %1, align 8, !tbaa !5
  %98 = sub nsw i64 %97, %71
  store i64 %98, ptr %9, align 8, !tbaa !5
  %99 = call i32 @f2c_daxpy(ptr noundef nonnull %9, ptr noundef nonnull %12, ptr noundef nonnull %77, ptr noundef nonnull @c__1, ptr noundef nonnull %89, ptr noundef nonnull @c__1) #3
  %100 = load i64, ptr %1, align 8, !tbaa !5
  %101 = sub nsw i64 %100, %71
  store i64 %101, ptr %9, align 8, !tbaa !5
  %102 = call i32 @f2c_dspr2(ptr noundef %0, ptr noundef nonnull %9, ptr noundef nonnull @c_b14, ptr noundef nonnull %77, ptr noundef nonnull @c__1, ptr noundef nonnull %89, ptr noundef nonnull @c__1, ptr noundef %88) #3
  %103 = load double, ptr %82, align 8, !tbaa !9
  store double %103, ptr %77, align 8, !tbaa !9
  %.pre119 = load double, ptr %11, align 8, !tbaa !9
  br label %104

104:                                              ; preds = %85, %.lr.ph116
  %105 = phi double [ %.pre119, %85 ], [ %83, %.lr.ph116 ]
  %106 = load double, ptr %78, align 8, !tbaa !9
  %107 = getelementptr inbounds double, ptr %15, i64 %71
  store double %106, ptr %107, align 8, !tbaa !9
  %108 = getelementptr inbounds double, ptr %13, i64 %71
  store double %105, ptr %108, align 8, !tbaa !9
  %109 = add nuw nsw i64 %71, 1
  %.not107.not = icmp slt i64 %71, %30
  br i1 %.not107.not, label %.lr.ph116, label %._crit_edge117.loopexit, !llvm.loop !13

._crit_edge117.loopexit:                          ; preds = %104
  %.pre120 = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge117

._crit_edge117:                                   ; preds = %._crit_edge117.loopexit, %70
  %110 = phi i64 [ 1, %70 ], [ %.pre120, %._crit_edge117.loopexit ]
  %.0100.lcssa = phi i64 [ 1, %70 ], [ %75, %._crit_edge117.loopexit ]
  %111 = getelementptr inbounds double, ptr %16, i64 %.0100.lcssa
  %112 = load double, ptr %111, align 8, !tbaa !9
  %113 = getelementptr inbounds double, ptr %15, i64 %110
  store double %112, ptr %113, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %._crit_edge, %._crit_edge117, %27, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  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 i32 @dlarfg_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

declare i32 @f2c_dspr2(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 = { 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}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass