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

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

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

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

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

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

77:                                               ; preds = %71, %64
  %78 = load i32, ptr %30, align 4, !tbaa !9
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %86, label %80

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

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

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

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

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

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

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

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

107:                                              ; preds = %101
  br label %111

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

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

114:                                              ; preds = %111
  %115 = load ptr, ptr %20, align 8, !tbaa !5
  store i32 -6, ptr %115, align 4, !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 %20, align 8, !tbaa !5
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %129

124:                                              ; preds = %120
  %125 = load ptr, ptr %20, align 8, !tbaa !5
  %126 = load i32, ptr %125, align 4, !tbaa !9
  %127 = sub nsw i32 0, %126
  store i32 %127, ptr %23, align 4, !tbaa !9
  %128 = call i32 @xerbla_(ptr noundef @.str.5, ptr noundef %23, i32 noundef 6)
  store i32 1, ptr %38, align 4
  br label %279

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

133:                                              ; preds = %129
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  store double 1.000000e+00, ptr %134, align 8, !tbaa !12
  store i32 1, ptr %38, align 4
  br label %279

135:                                              ; preds = %129
  %136 = load ptr, ptr %17, 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 %14, align 8, !tbaa !5
  %139 = load i32, ptr %138, align 4, !tbaa !9
  %140 = icmp sge i32 1, %139
  br i1 %140, label %141, label %142

141:                                              ; preds = %135
  br label %145

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

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

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

168:                                              ; preds = %164
  store i32 1, ptr %26, align 4, !tbaa !9
  br label %170

169:                                              ; preds = %164
  store i32 2, ptr %26, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %169, %168
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %266, %170
  %172 = load ptr, ptr %14, align 8, !tbaa !5
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = load i32, ptr %174, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds double, ptr %173, i64 %177
  %179 = load ptr, ptr %18, align 8, !tbaa !5
  %180 = getelementptr inbounds double, ptr %179, i64 1
  %181 = load ptr, ptr %19, align 8, !tbaa !5
  %182 = getelementptr inbounds i32, ptr %181, i64 1
  %183 = getelementptr inbounds [3 x i32], ptr %28, i64 0, i64 0
  call void @dlacn2_(ptr noundef %172, ptr noundef %178, ptr noundef %180, ptr noundef %182, ptr noundef %33, ptr noundef %25, ptr noundef %183)
  %184 = load i32, ptr %25, align 4, !tbaa !9
  %185 = icmp ne i32 %184, 0
  br i1 %185, label %186, label %267

186:                                              ; preds = %171
  %187 = load i32, ptr %25, align 4, !tbaa !9
  %188 = load i32, ptr %26, align 4, !tbaa !9
  %189 = icmp eq i32 %187, %188
  br i1 %189, label %190, label %210

190:                                              ; preds = %186
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = load ptr, ptr %13, align 8, !tbaa !5
  %193 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %194 = load ptr, ptr %14, align 8, !tbaa !5
  %195 = load ptr, ptr %15, align 8, !tbaa !5
  %196 = load i32, ptr %22, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds double, ptr %195, i64 %197
  %199 = load ptr, ptr %16, align 8, !tbaa !5
  %200 = load ptr, ptr %18, align 8, !tbaa !5
  %201 = getelementptr inbounds double, ptr %200, i64 1
  %202 = load ptr, ptr %18, align 8, !tbaa !5
  %203 = load ptr, ptr %14, align 8, !tbaa !5
  %204 = load i32, ptr %203, align 4, !tbaa !9
  %205 = shl i32 %204, 1
  %206 = add nsw i32 %205, 1
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds double, ptr %202, i64 %207
  %209 = load ptr, ptr %20, align 8, !tbaa !5
  call void @dlatrs_(ptr noundef %191, ptr noundef @.str.7, ptr noundef %192, ptr noundef %193, ptr noundef %194, ptr noundef %198, ptr noundef %199, ptr noundef %201, ptr noundef %27, ptr noundef %208, ptr noundef %209)
  br label %230

210:                                              ; preds = %186
  %211 = load ptr, ptr %12, align 8, !tbaa !5
  %212 = load ptr, ptr %13, align 8, !tbaa !5
  %213 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %214 = load ptr, ptr %14, align 8, !tbaa !5
  %215 = load ptr, ptr %15, align 8, !tbaa !5
  %216 = load i32, ptr %22, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds double, ptr %215, i64 %217
  %219 = load ptr, ptr %16, align 8, !tbaa !5
  %220 = load ptr, ptr %18, align 8, !tbaa !5
  %221 = getelementptr inbounds double, ptr %220, i64 1
  %222 = load ptr, ptr %18, align 8, !tbaa !5
  %223 = load ptr, ptr %14, align 8, !tbaa !5
  %224 = load i32, ptr %223, align 4, !tbaa !9
  %225 = shl i32 %224, 1
  %226 = add nsw i32 %225, 1
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds double, ptr %222, i64 %227
  %229 = load ptr, ptr %20, align 8, !tbaa !5
  call void @dlatrs_(ptr noundef %211, ptr noundef @.str.8, ptr noundef %212, ptr noundef %213, ptr noundef %214, ptr noundef %218, ptr noundef %219, ptr noundef %221, ptr noundef %27, ptr noundef %228, ptr noundef %229)
  br label %230

230:                                              ; preds = %210, %190
  %231 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 89, ptr %231, align 1, !tbaa !11
  %232 = load double, ptr %27, align 8, !tbaa !12
  %233 = fcmp une double %232, 1.000000e+00
  br i1 %233, label %234, label %266

234:                                              ; preds = %230
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = load ptr, ptr %18, align 8, !tbaa !5
  %237 = getelementptr inbounds double, ptr %236, i64 1
  %238 = call i32 @idamax_(ptr noundef %235, ptr noundef %237, ptr noundef @c__1)
  store i32 %238, ptr %32, align 4, !tbaa !9
  %239 = load ptr, ptr %18, align 8, !tbaa !5
  %240 = load i32, ptr %32, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds double, ptr %239, i64 %241
  %243 = load double, ptr %242, align 8, !tbaa !12
  store double %243, ptr %24, align 8, !tbaa !12
  %244 = load double, ptr %24, align 8, !tbaa !12
  %245 = fcmp oge double %244, 0.000000e+00
  br i1 %245, label %246, label %248

246:                                              ; preds = %234
  %247 = load double, ptr %24, align 8, !tbaa !12
  br label %251

248:                                              ; preds = %234
  %249 = load double, ptr %24, align 8, !tbaa !12
  %250 = fneg double %249
  br label %251

251:                                              ; preds = %248, %246
  %252 = phi double [ %247, %246 ], [ %250, %248 ]
  store double %252, ptr %31, align 8, !tbaa !12
  %253 = load double, ptr %27, align 8, !tbaa !12
  %254 = load double, ptr %31, align 8, !tbaa !12
  %255 = load double, ptr %36, align 8, !tbaa !12
  %256 = fmul double %254, %255
  %257 = fcmp olt double %253, %256
  br i1 %257, label %261, label %258

258:                                              ; preds = %251
  %259 = load double, ptr %27, align 8, !tbaa !12
  %260 = fcmp oeq double %259, 0.000000e+00
  br i1 %260, label %261, label %262

261:                                              ; preds = %258, %251
  br label %278

262:                                              ; preds = %258
  %263 = load ptr, ptr %14, align 8, !tbaa !5
  %264 = load ptr, ptr %18, align 8, !tbaa !5
  %265 = getelementptr inbounds double, ptr %264, i64 1
  call void @drscl_(ptr noundef %263, ptr noundef %27, ptr noundef %265, ptr noundef @c__1)
  br label %266

266:                                              ; preds = %262, %230
  br label %171

267:                                              ; preds = %171
  %268 = load double, ptr %33, align 8, !tbaa !12
  %269 = fcmp une double %268, 0.000000e+00
  br i1 %269, label %270, label %276

270:                                              ; preds = %267
  %271 = load double, ptr %29, align 8, !tbaa !12
  %272 = fdiv double 1.000000e+00, %271
  %273 = load double, ptr %33, align 8, !tbaa !12
  %274 = fdiv double %272, %273
  %275 = load ptr, ptr %17, align 8, !tbaa !5
  store double %274, ptr %275, align 8, !tbaa !12
  br label %276

276:                                              ; preds = %270, %267
  br label %277

277:                                              ; preds = %276, %145
  br label %278

278:                                              ; preds = %277, %261
  store i32 1, ptr %38, align 4
  br label %279

279:                                              ; preds = %278, %133, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @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 i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca [3 x i32], align 4
  %15 = alloca double, align 8
  %16 = alloca [1 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 12, 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 i32 0, ptr %9, align 4, !tbaa !5
  %18 = tail call i32 @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 i32 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.2) #4
  br label %27

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

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

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

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

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

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

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

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

40:                                               ; preds = %37
  %.pr = load i32, ptr %9, align 4, !tbaa !5
  %.not93 = icmp eq i32 %.pr, 0
  br i1 %.not93, label %44, label %.thread96

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

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

44:                                               ; preds = %40
  %45 = icmp eq i32 %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 i32, ptr %3, align 4, !tbaa !5
  %50 = icmp slt i32 %49, 2
  %51 = uitofp nneg i32 %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 i32 0, ptr %12, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %gep99 = getelementptr double, ptr %7, i64 %58
  call void @dlacn2_(ptr noundef nonnull %3, ptr noundef %gep99, ptr noundef %7, ptr noundef %8, ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef nonnull %14) #4
  %59 = load i32, ptr %12, align 4, !tbaa !5
  %.not94100 = icmp eq i32 %59, 0
  br i1 %.not94100, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %56, %82
  %60 = phi i32 [ %85, %82 ], [ %59, %56 ]
  %61 = icmp eq i32 %60, %.
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = shl i32 %62, 1
  %64 = or disjoint i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds double, ptr %17, i64 %65
  %.str.7..str.8 = select i1 %61, ptr @.str.7, ptr @.str.8
  call void @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 nonnull %66, ptr noundef nonnull %9) #4
  store i8 89, ptr %16, align 1, !tbaa !9
  %67 = load double, ptr %13, align 8, !tbaa !10
  %68 = fcmp une double %67, 1.000000e+00
  br i1 %68, label %69, label %82

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

81:                                               ; preds = %69
  call void @drscl_(ptr noundef nonnull %3, ptr noundef nonnull %13, ptr noundef nonnull %7, ptr noundef nonnull @c__1) #4
  br label %82

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

._crit_edge:                                      ; preds = %82, %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 = %69, %._crit_edge, %88, %47, %46, %.thread96
  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 12, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #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

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

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

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

declare void @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 i32 @llvm.umax.i32(i32, i32) #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 = !{!"int", !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,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass