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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@c__1 = external hidden global i64, align 8

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

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

63:                                               ; preds = %59, %10
  %64 = phi i1 [ true, %10 ], [ %62, %59 ]
  %65 = zext i1 %64 to i32
  %66 = sext i32 %65 to i64
  store i64 %66, ptr %35, align 8, !tbaa !9
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = call i64 @lsame_(ptr noundef %67, ptr noundef @.str.2)
  store i64 %68, ptr %38, align 8, !tbaa !9
  %69 = load i64, ptr %35, align 8, !tbaa !9
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %77, label %71

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

75:                                               ; preds = %71
  %76 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -1, ptr %76, align 8, !tbaa !9
  br label %120

77:                                               ; preds = %71, %63
  %78 = load i64, ptr %32, align 8, !tbaa !9
  %79 = icmp ne i64 %78, 0
  br i1 %79, label %86, label %80

80:                                               ; preds = %77
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = call i64 @lsame_(ptr noundef %81, ptr noundef @.str.4)
  %83 = icmp ne i64 %82, 0
  br i1 %83, label %86, label %84

84:                                               ; preds = %80
  %85 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -2, ptr %85, align 8, !tbaa !9
  br label %119

86:                                               ; preds = %80, %77
  %87 = load i64, ptr %38, align 8, !tbaa !9
  %88 = icmp ne i64 %87, 0
  br i1 %88, label %95, label %89

89:                                               ; preds = %86
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  %91 = call i64 @lsame_(ptr noundef %90, ptr noundef @.str)
  %92 = icmp ne i64 %91, 0
  br i1 %92, label %95, label %93

93:                                               ; preds = %89
  %94 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -3, ptr %94, align 8, !tbaa !9
  br label %118

95:                                               ; preds = %89, %86
  %96 = load ptr, ptr %15, align 8, !tbaa !5
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = icmp slt i64 %97, 0
  br i1 %98, label %99, label %101

99:                                               ; preds = %95
  %100 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -4, ptr %100, align 8, !tbaa !9
  br label %117

101:                                              ; preds = %95
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = load i64, ptr %104, align 8, !tbaa !9
  %106 = icmp sge i64 1, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %101
  br label %111

108:                                              ; preds = %101
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  %110 = load i64, ptr %109, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %108, %107
  %112 = phi i64 [ 1, %107 ], [ %110, %108 ]
  %113 = icmp slt i64 %103, %112
  br i1 %113, label %114, label %116

114:                                              ; preds = %111
  %115 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -6, ptr %115, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %114, %111
  br label %117

117:                                              ; preds = %116, %99
  br label %118

118:                                              ; preds = %117, %93
  br label %119

119:                                              ; preds = %118, %84
  br label %120

120:                                              ; preds = %119, %75
  %121 = load ptr, ptr %21, align 8, !tbaa !5
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = icmp ne i64 %122, 0
  br i1 %123, label %124, label %129

124:                                              ; preds = %120
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  %126 = load i64, ptr %125, align 8, !tbaa !9
  %127 = sub nsw i64 0, %126
  store i64 %127, ptr %24, align 8, !tbaa !9
  %128 = call i32 @xerbla_(ptr noundef @.str.5, ptr noundef %24)
  store i32 0, ptr %11, align 4
  store i32 1, ptr %39, align 4
  br label %276

129:                                              ; preds = %120
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = load i64, ptr %130, align 8, !tbaa !9
  %132 = icmp eq i64 %131, 0
  br i1 %132, label %133, label %135

133:                                              ; preds = %129
  %134 = load ptr, ptr %18, align 8, !tbaa !5
  store double 1.000000e+00, ptr %134, align 8, !tbaa !12
  store i32 0, ptr %11, align 4
  store i32 1, ptr %39, align 4
  br label %276

135:                                              ; preds = %129
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  store double 0.000000e+00, ptr %136, align 8, !tbaa !12
  %137 = call double @dlamch_(ptr noundef @.str.6)
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = icmp sge i64 1, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %135
  br label %145

142:                                              ; preds = %135
  %143 = load ptr, ptr %15, align 8, !tbaa !5
  %144 = load i64, ptr %143, align 8, !tbaa !9
  br label %145

145:                                              ; preds = %142, %141
  %146 = phi i64 [ 1, %141 ], [ %144, %142 ]
  %147 = sitofp i64 %146 to double
  %148 = fmul double %137, %147
  store double %148, ptr %37, align 8, !tbaa !12
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = load ptr, ptr %14, align 8, !tbaa !5
  %152 = load ptr, ptr %15, align 8, !tbaa !5
  %153 = load ptr, ptr %15, align 8, !tbaa !5
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = load i64, ptr %23, align 8, !tbaa !9
  %156 = getelementptr inbounds double, ptr %154, i64 %155
  %157 = load ptr, ptr %17, align 8, !tbaa !5
  %158 = load ptr, ptr %19, align 8, !tbaa !5
  %159 = getelementptr inbounds double, ptr %158, i64 1
  %160 = call double @dlantr_(ptr noundef %149, ptr noundef %150, ptr noundef %151, ptr noundef %152, ptr noundef %153, ptr noundef %156, ptr noundef %157, ptr noundef %159)
  store double %160, ptr %31, align 8, !tbaa !12
  %161 = load double, ptr %31, align 8, !tbaa !12
  %162 = fcmp ogt double %161, 0.000000e+00
  br i1 %162, label %163, label %274

163:                                              ; preds = %145
  store double 0.000000e+00, ptr %34, align 8, !tbaa !12
  %164 = getelementptr inbounds [1 x i8], ptr %36, i64 0, i64 0
  store i8 78, ptr %164, align 1, !tbaa !11
  %165 = load i64, ptr %35, align 8, !tbaa !9
  %166 = icmp ne i64 %165, 0
  br i1 %166, label %167, label %168

167:                                              ; preds = %163
  store i64 1, ptr %28, align 8, !tbaa !9
  br label %169

168:                                              ; preds = %163
  store i64 2, ptr %28, align 8, !tbaa !9
  br label %169

169:                                              ; preds = %168, %167
  store i64 0, ptr %27, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %263, %169
  %171 = load ptr, ptr %15, align 8, !tbaa !5
  %172 = load ptr, ptr %19, align 8, !tbaa !5
  %173 = load ptr, ptr %15, align 8, !tbaa !5
  %174 = load i64, ptr %173, align 8, !tbaa !9
  %175 = add nsw i64 %174, 1
  %176 = getelementptr inbounds double, ptr %172, i64 %175
  %177 = load ptr, ptr %19, align 8, !tbaa !5
  %178 = getelementptr inbounds double, ptr %177, i64 1
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = getelementptr inbounds i64, ptr %179, i64 1
  %181 = getelementptr inbounds [3 x i64], ptr %30, i64 0, i64 0
  %182 = call i32 @dlacn2_(ptr noundef %171, ptr noundef %176, ptr noundef %178, ptr noundef %180, ptr noundef %34, ptr noundef %27, ptr noundef %181)
  %183 = load i64, ptr %27, align 8, !tbaa !9
  %184 = icmp ne i64 %183, 0
  br i1 %184, label %185, label %264

185:                                              ; preds = %170
  %186 = load i64, ptr %27, align 8, !tbaa !9
  %187 = load i64, ptr %28, align 8, !tbaa !9
  %188 = icmp eq i64 %186, %187
  br i1 %188, label %189, label %208

189:                                              ; preds = %185
  %190 = load ptr, ptr %13, align 8, !tbaa !5
  %191 = load ptr, ptr %14, align 8, !tbaa !5
  %192 = getelementptr inbounds [1 x i8], ptr %36, i64 0, i64 0
  %193 = load ptr, ptr %15, align 8, !tbaa !5
  %194 = load ptr, ptr %16, align 8, !tbaa !5
  %195 = load i64, ptr %23, align 8, !tbaa !9
  %196 = getelementptr inbounds double, ptr %194, i64 %195
  %197 = load ptr, ptr %17, align 8, !tbaa !5
  %198 = load ptr, ptr %19, align 8, !tbaa !5
  %199 = getelementptr inbounds double, ptr %198, i64 1
  %200 = load ptr, ptr %19, align 8, !tbaa !5
  %201 = load ptr, ptr %15, align 8, !tbaa !5
  %202 = load i64, ptr %201, align 8, !tbaa !9
  %203 = shl i64 %202, 1
  %204 = add nsw i64 %203, 1
  %205 = getelementptr inbounds double, ptr %200, i64 %204
  %206 = load ptr, ptr %21, align 8, !tbaa !5
  %207 = call i32 @dlatrs_(ptr noundef %190, ptr noundef @.str.7, ptr noundef %191, ptr noundef %192, ptr noundef %193, ptr noundef %196, ptr noundef %197, ptr noundef %199, ptr noundef %29, ptr noundef %205, ptr noundef %206)
  br label %227

208:                                              ; preds = %185
  %209 = load ptr, ptr %13, align 8, !tbaa !5
  %210 = load ptr, ptr %14, align 8, !tbaa !5
  %211 = getelementptr inbounds [1 x i8], ptr %36, i64 0, i64 0
  %212 = load ptr, ptr %15, align 8, !tbaa !5
  %213 = load ptr, ptr %16, align 8, !tbaa !5
  %214 = load i64, ptr %23, align 8, !tbaa !9
  %215 = getelementptr inbounds double, ptr %213, i64 %214
  %216 = load ptr, ptr %17, align 8, !tbaa !5
  %217 = load ptr, ptr %19, align 8, !tbaa !5
  %218 = getelementptr inbounds double, ptr %217, i64 1
  %219 = load ptr, ptr %19, align 8, !tbaa !5
  %220 = load ptr, ptr %15, align 8, !tbaa !5
  %221 = load i64, ptr %220, align 8, !tbaa !9
  %222 = shl i64 %221, 1
  %223 = add nsw i64 %222, 1
  %224 = getelementptr inbounds double, ptr %219, i64 %223
  %225 = load ptr, ptr %21, align 8, !tbaa !5
  %226 = call i32 @dlatrs_(ptr noundef %209, ptr noundef @.str.8, ptr noundef %210, ptr noundef %211, ptr noundef %212, ptr noundef %215, ptr noundef %216, ptr noundef %218, ptr noundef %29, ptr noundef %224, ptr noundef %225)
  br label %227

227:                                              ; preds = %208, %189
  %228 = getelementptr inbounds [1 x i8], ptr %36, i64 0, i64 0
  store i8 89, ptr %228, align 1, !tbaa !11
  %229 = load double, ptr %29, align 8, !tbaa !12
  %230 = fcmp une double %229, 1.000000e+00
  br i1 %230, label %231, label %263

231:                                              ; preds = %227
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  %233 = load ptr, ptr %19, align 8, !tbaa !5
  %234 = getelementptr inbounds double, ptr %233, i64 1
  %235 = call i64 @f2c_idamax(ptr noundef %232, ptr noundef %234, ptr noundef @c__1)
  store i64 %235, ptr %26, align 8, !tbaa !9
  %236 = load ptr, ptr %19, align 8, !tbaa !5
  %237 = load i64, ptr %26, align 8, !tbaa !9
  %238 = getelementptr inbounds double, ptr %236, i64 %237
  %239 = load double, ptr %238, align 8, !tbaa !12
  store double %239, ptr %25, align 8, !tbaa !12
  %240 = load double, ptr %25, align 8, !tbaa !12
  %241 = fcmp oge double %240, 0.000000e+00
  br i1 %241, label %242, label %244

242:                                              ; preds = %231
  %243 = load double, ptr %25, align 8, !tbaa !12
  br label %247

244:                                              ; preds = %231
  %245 = load double, ptr %25, align 8, !tbaa !12
  %246 = fneg double %245
  br label %247

247:                                              ; preds = %244, %242
  %248 = phi double [ %243, %242 ], [ %246, %244 ]
  store double %248, ptr %33, align 8, !tbaa !12
  %249 = load double, ptr %29, align 8, !tbaa !12
  %250 = load double, ptr %33, align 8, !tbaa !12
  %251 = load double, ptr %37, align 8, !tbaa !12
  %252 = fmul double %250, %251
  %253 = fcmp olt double %249, %252
  br i1 %253, label %257, label %254

254:                                              ; preds = %247
  %255 = load double, ptr %29, align 8, !tbaa !12
  %256 = fcmp oeq double %255, 0.000000e+00
  br i1 %256, label %257, label %258

257:                                              ; preds = %254, %247
  br label %275

258:                                              ; preds = %254
  %259 = load ptr, ptr %15, align 8, !tbaa !5
  %260 = load ptr, ptr %19, align 8, !tbaa !5
  %261 = getelementptr inbounds double, ptr %260, i64 1
  %262 = call i32 @drscl_(ptr noundef %259, ptr noundef %29, ptr noundef %261, ptr noundef @c__1)
  br label %263

263:                                              ; preds = %258, %227
  br label %170

264:                                              ; preds = %170
  %265 = load double, ptr %34, align 8, !tbaa !12
  %266 = fcmp une double %265, 0.000000e+00
  br i1 %266, label %267, label %273

267:                                              ; preds = %264
  %268 = load double, ptr %31, align 8, !tbaa !12
  %269 = fdiv double 1.000000e+00, %268
  %270 = load double, ptr %34, align 8, !tbaa !12
  %271 = fdiv double %269, %270
  %272 = load ptr, ptr %18, align 8, !tbaa !5
  store double %271, ptr %272, align 8, !tbaa !12
  br label %273

273:                                              ; preds = %267, %264
  br label %274

274:                                              ; preds = %273, %145
  br label %275

275:                                              ; preds = %274, %257
  store i32 0, ptr %11, align 4
  store i32 1, ptr %39, align 4
  br label %276

276:                                              ; preds = %275, %133, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  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
  %277 = load i32, ptr %11, align 4
  ret i32 %277
}

; 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

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

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

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

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

declare i32 @drscl_(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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 x i8], align 1
@c__1 = external hidden global i64, align 8

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

.thread:                                          ; preds = %10
  %21 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.2) #4
  br label %27

22:                                               ; preds = %10
  %23 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.1) #4
  %.not100 = icmp eq i64 %23, 0
  %24 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.2) #4
  br i1 %.not100, label %25, label %27

25:                                               ; preds = %22
  %26 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.3) #4
  %.not = icmp eq i64 %26, 0
  br i1 %.not, label %.thread98.sink.split, label %27

27:                                               ; preds = %.thread, %25, %22
  %28 = phi i64 [ %21, %.thread ], [ %24, %25 ], [ %24, %22 ]
  %. = phi i64 [ 1, %.thread ], [ 2, %25 ], [ 1, %22 ]
  %.not90 = icmp eq i64 %18, 0
  br i1 %.not90, label %29, label %31

29:                                               ; preds = %27
  %30 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.4) #4
  %.not91 = icmp eq i64 %30, 0
  br i1 %.not91, label %.thread98.sink.split, label %31

31:                                               ; preds = %29, %27
  %.not92 = icmp eq i64 %28, 0
  br i1 %.not92, label %32, label %34

32:                                               ; preds = %31
  %33 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str) #4
  %.not93 = icmp eq i64 %33, 0
  br i1 %.not93, label %.thread98.sink.split, label %34

34:                                               ; preds = %32, %31
  %35 = load i64, ptr %3, align 8, !tbaa !5
  %36 = icmp slt i64 %35, 0
  br i1 %36, label %.thread98.sink.split, label %37

37:                                               ; preds = %34
  %38 = load i64, ptr %5, align 8, !tbaa !5
  %spec.select = tail call i64 @llvm.umax.i64(i64 %35, i64 1)
  %39 = icmp slt i64 %38, %spec.select
  br i1 %39, label %.thread98.sink.split, label %40

40:                                               ; preds = %37
  %.pr = load i64, ptr %9, align 8, !tbaa !5
  %.not94 = icmp eq i64 %.pr, 0
  br i1 %.not94, label %44, label %.thread98

.thread98.sink.split:                             ; preds = %37, %34, %32, %29, %25
  %.sink = phi i64 [ -1, %25 ], [ -2, %29 ], [ -3, %32 ], [ -4, %34 ], [ -6, %37 ]
  store i64 %.sink, ptr %9, align 8, !tbaa !5
  br label %.thread98

.thread98:                                        ; preds = %.thread98.sink.split, %40
  %41 = phi i64 [ %.pr, %40 ], [ %.sink, %.thread98.sink.split ]
  %42 = sub nsw i64 0, %41
  store i64 %42, ptr %11, align 8, !tbaa !5
  %43 = call i32 @xerbla_(ptr noundef nonnull @.str.5, ptr noundef nonnull %11) #4
  br label %.loopexit

44:                                               ; preds = %40
  %45 = icmp eq i64 %35, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %44
  store double 1.000000e+00, ptr %6, align 8, !tbaa !10
  br label %.loopexit

47:                                               ; preds = %44
  store double 0.000000e+00, ptr %6, align 8, !tbaa !10
  %48 = tail call double @dlamch_(ptr noundef nonnull @.str.6) #4
  %49 = load i64, ptr %3, align 8, !tbaa !5
  %50 = icmp slt i64 %49, 2
  %51 = uitofp nneg i64 %49 to double
  %52 = select i1 %50, double 1.000000e+00, double %51
  %53 = fmul double %48, %52
  %54 = tail call double @dlantr_(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef %7) #4
  %55 = fcmp ogt double %54, 0.000000e+00
  br i1 %55, label %56, label %.loopexit

56:                                               ; preds = %47
  store double 0.000000e+00, ptr %15, align 8, !tbaa !10
  store i8 78, ptr %16, align 1, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !5
  %57 = load i64, ptr %3, align 8, !tbaa !5
  %58 = getelementptr double, ptr %7, i64 %57
  %59 = call i32 @dlacn2_(ptr noundef nonnull %3, ptr noundef %58, ptr noundef %7, ptr noundef %8, ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef nonnull %14) #4
  %60 = load i64, ptr %12, align 8, !tbaa !5
  %.not95101 = icmp eq i64 %60, 0
  br i1 %.not95101, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %56, %81
  %61 = phi i64 [ %85, %81 ], [ %60, %56 ]
  %62 = icmp eq i64 %61, %.
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %.idx96 = shl i64 %63, 4
  %64 = getelementptr i8, ptr %7, i64 %.idx96
  %.str.7..str.8 = select i1 %62, ptr @.str.7, ptr @.str.8
  %65 = call i32 @dlatrs_(ptr noundef %1, ptr noundef nonnull %.str.7..str.8, ptr noundef %2, ptr noundef nonnull %16, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef %7, ptr noundef nonnull %13, ptr noundef %64, ptr noundef nonnull %9) #4
  store i8 89, ptr %16, align 1, !tbaa !9
  %66 = load double, ptr %13, align 8, !tbaa !10
  %67 = fcmp une double %66, 1.000000e+00
  br i1 %67, label %68, label %81

68:                                               ; preds = %.lr.ph
  %69 = call i64 @f2c_idamax(ptr noundef nonnull %3, ptr noundef %7, ptr noundef nonnull @c__1) #4
  %70 = getelementptr inbounds double, ptr %17, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !10
  %72 = fcmp oge double %71, 0.000000e+00
  %73 = fneg double %71
  %74 = select i1 %72, double %71, double %73
  %75 = load double, ptr %13, align 8
  %76 = fmul double %53, %74
  %77 = fcmp olt double %75, %76
  %78 = fcmp oeq double %75, 0.000000e+00
  %or.cond = or i1 %78, %77
  br i1 %or.cond, label %.loopexit, label %79

79:                                               ; preds = %68
  %80 = call i32 @drscl_(ptr noundef nonnull %3, ptr noundef nonnull %13, ptr noundef nonnull %7, ptr noundef nonnull @c__1) #4
  br label %81

81:                                               ; preds = %79, %.lr.ph
  %82 = load i64, ptr %3, align 8, !tbaa !5
  %83 = getelementptr double, ptr %7, i64 %82
  %84 = call i32 @dlacn2_(ptr noundef nonnull %3, ptr noundef %83, ptr noundef %7, ptr noundef %8, ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef nonnull %14) #4
  %85 = load i64, ptr %12, align 8, !tbaa !5
  %.not95 = icmp eq i64 %85, 0
  br i1 %.not95, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %81, %56
  %86 = load double, ptr %15, align 8, !tbaa !10
  %87 = fcmp une double %86, 0.000000e+00
  br i1 %87, label %88, label %.loopexit

88:                                               ; preds = %._crit_edge
  %89 = fdiv double 1.000000e+00, %54
  %90 = fdiv double %89, %86
  store double %90, ptr %6, align 8, !tbaa !10
  br label %.loopexit

.loopexit:                                        ; preds = %68, %._crit_edge, %88, %47, %46, %.thread98
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}


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