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

; 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"

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

; Function Attrs: nounwind uwtable
define dso_local i32 @dggqrf_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) #0 {
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i32, align 4
  store ptr %0, ptr %14, align 8, !tbaa !5
  store ptr %1, ptr %15, align 8, !tbaa !5
  store ptr %2, ptr %16, align 8, !tbaa !5
  store ptr %3, ptr %17, align 8, !tbaa !5
  store ptr %4, ptr %18, align 8, !tbaa !5
  store ptr %5, ptr %19, align 8, !tbaa !5
  store ptr %6, ptr %20, align 8, !tbaa !5
  store ptr %7, ptr %21, align 8, !tbaa !5
  store ptr %8, ptr %22, align 8, !tbaa !5
  store ptr %9, ptr %23, align 8, !tbaa !5
  store ptr %10, ptr %24, align 8, !tbaa !5
  store ptr %11, ptr %25, align 8, !tbaa !5
  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 8, 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 8, 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 %18, align 8, !tbaa !5
  %41 = load i64, ptr %40, align 8, !tbaa !9
  store i64 %41, ptr %26, align 8, !tbaa !9
  %42 = load i64, ptr %26, align 8, !tbaa !9
  %43 = add nsw i64 1, %42
  store i64 %43, ptr %27, align 8, !tbaa !9
  %44 = load i64, ptr %27, align 8, !tbaa !9
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  %46 = sub i64 0, %44
  %47 = getelementptr inbounds double, ptr %45, i64 %46
  store ptr %47, ptr %17, 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 %21, align 8, !tbaa !5
  %51 = load i64, ptr %50, align 8, !tbaa !9
  store i64 %51, ptr %28, align 8, !tbaa !9
  %52 = load i64, ptr %28, align 8, !tbaa !9
  %53 = add nsw i64 1, %52
  store i64 %53, ptr %29, align 8, !tbaa !9
  %54 = load i64, ptr %29, align 8, !tbaa !9
  %55 = load ptr, ptr %20, align 8, !tbaa !5
  %56 = sub i64 0, %54
  %57 = getelementptr inbounds double, ptr %55, i64 %56
  store ptr %57, ptr %20, align 8, !tbaa !5
  %58 = load ptr, ptr %22, align 8, !tbaa !5
  %59 = getelementptr inbounds double, ptr %58, i32 -1
  store ptr %59, ptr %22, align 8, !tbaa !5
  %60 = load ptr, ptr %23, align 8, !tbaa !5
  %61 = getelementptr inbounds double, ptr %60, i32 -1
  store ptr %61, ptr %23, align 8, !tbaa !5
  %62 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 0, ptr %62, align 8, !tbaa !9
  %63 = load ptr, ptr %14, align 8, !tbaa !5
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = call i64 @ilaenv_(ptr noundef @c__1, ptr noundef @.str, ptr noundef @.str.1, ptr noundef %63, ptr noundef %64, ptr noundef @c_n1, ptr noundef @c_n1)
  store i64 %65, ptr %33, align 8, !tbaa !9
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = call i64 @ilaenv_(ptr noundef @c__1, ptr noundef @.str.2, ptr noundef @.str.1, ptr noundef %66, ptr noundef %67, ptr noundef @c_n1, ptr noundef @c_n1)
  store i64 %68, ptr %34, align 8, !tbaa !9
  %69 = load ptr, ptr %14, align 8, !tbaa !5
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = call i64 @ilaenv_(ptr noundef @c__1, ptr noundef @.str.3, ptr noundef @.str.1, ptr noundef %69, ptr noundef %70, ptr noundef %71, ptr noundef @c_n1)
  store i64 %72, ptr %35, align 8, !tbaa !9
  %73 = load i64, ptr %33, align 8, !tbaa !9
  %74 = load i64, ptr %34, align 8, !tbaa !9
  %75 = icmp sge i64 %73, %74
  br i1 %75, label %76, label %78

76:                                               ; preds = %12
  %77 = load i64, ptr %33, align 8, !tbaa !9
  br label %80

78:                                               ; preds = %12
  %79 = load i64, ptr %34, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %78, %76
  %81 = phi i64 [ %77, %76 ], [ %79, %78 ]
  store i64 %81, ptr %30, align 8, !tbaa !9
  %82 = load i64, ptr %30, align 8, !tbaa !9
  %83 = load i64, ptr %35, align 8, !tbaa !9
  %84 = icmp sge i64 %82, %83
  br i1 %84, label %85, label %87

85:                                               ; preds = %80
  %86 = load i64, ptr %30, align 8, !tbaa !9
  br label %89

87:                                               ; preds = %80
  %88 = load i64, ptr %35, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %87, %85
  %90 = phi i64 [ %86, %85 ], [ %88, %87 ]
  store i64 %90, ptr %32, align 8, !tbaa !9
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = load i64, ptr %91, align 8, !tbaa !9
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = load i64, ptr %93, align 8, !tbaa !9
  %95 = icmp sge i64 %92, %94
  br i1 %95, label %96, label %99

96:                                               ; preds = %89
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = load i64, ptr %97, align 8, !tbaa !9
  br label %102

99:                                               ; preds = %89
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = load i64, ptr %100, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %99, %96
  %103 = phi i64 [ %98, %96 ], [ %101, %99 ]
  store i64 %103, ptr %30, align 8, !tbaa !9
  %104 = load i64, ptr %30, align 8, !tbaa !9
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = icmp sge i64 %104, %106
  br i1 %107, label %108, label %110

108:                                              ; preds = %102
  %109 = load i64, ptr %30, align 8, !tbaa !9
  br label %113

110:                                              ; preds = %102
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  %112 = load i64, ptr %111, align 8, !tbaa !9
  br label %113

113:                                              ; preds = %110, %108
  %114 = phi i64 [ %109, %108 ], [ %112, %110 ]
  %115 = load i64, ptr %32, align 8, !tbaa !9
  %116 = mul nsw i64 %114, %115
  store i64 %116, ptr %37, align 8, !tbaa !9
  %117 = load i64, ptr %37, align 8, !tbaa !9
  %118 = sitofp i64 %117 to double
  %119 = load ptr, ptr %23, align 8, !tbaa !5
  %120 = getelementptr inbounds double, ptr %119, i64 1
  store double %118, ptr %120, align 8, !tbaa !11
  %121 = load ptr, ptr %24, align 8, !tbaa !5
  %122 = load i64, ptr %121, align 8, !tbaa !9
  %123 = icmp eq i64 %122, -1
  %124 = zext i1 %123 to i32
  %125 = sext i32 %124 to i64
  store i64 %125, ptr %38, align 8, !tbaa !9
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  %127 = load i64, ptr %126, align 8, !tbaa !9
  %128 = icmp slt i64 %127, 0
  br i1 %128, label %129, label %131

129:                                              ; preds = %113
  %130 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -1, ptr %130, align 8, !tbaa !9
  br label %218

131:                                              ; preds = %113
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  %133 = load i64, ptr %132, align 8, !tbaa !9
  %134 = icmp slt i64 %133, 0
  br i1 %134, label %135, label %137

135:                                              ; preds = %131
  %136 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -2, ptr %136, align 8, !tbaa !9
  br label %217

137:                                              ; preds = %131
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = icmp slt i64 %139, 0
  br i1 %140, label %141, label %143

141:                                              ; preds = %137
  %142 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -3, ptr %142, align 8, !tbaa !9
  br label %216

143:                                              ; preds = %137
  %144 = load ptr, ptr %18, align 8, !tbaa !5
  %145 = load i64, ptr %144, align 8, !tbaa !9
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = load i64, ptr %146, align 8, !tbaa !9
  %148 = icmp sge i64 1, %147
  br i1 %148, label %149, label %150

149:                                              ; preds = %143
  br label %153

150:                                              ; preds = %143
  %151 = load ptr, ptr %14, align 8, !tbaa !5
  %152 = load i64, ptr %151, align 8, !tbaa !9
  br label %153

153:                                              ; preds = %150, %149
  %154 = phi i64 [ 1, %149 ], [ %152, %150 ]
  %155 = icmp slt i64 %145, %154
  br i1 %155, label %156, label %158

156:                                              ; preds = %153
  %157 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -5, ptr %157, align 8, !tbaa !9
  br label %215

158:                                              ; preds = %153
  %159 = load ptr, ptr %21, align 8, !tbaa !5
  %160 = load i64, ptr %159, align 8, !tbaa !9
  %161 = load ptr, ptr %14, align 8, !tbaa !5
  %162 = load i64, ptr %161, align 8, !tbaa !9
  %163 = icmp sge i64 1, %162
  br i1 %163, label %164, label %165

164:                                              ; preds = %158
  br label %168

165:                                              ; preds = %158
  %166 = load ptr, ptr %14, align 8, !tbaa !5
  %167 = load i64, ptr %166, align 8, !tbaa !9
  br label %168

168:                                              ; preds = %165, %164
  %169 = phi i64 [ 1, %164 ], [ %167, %165 ]
  %170 = icmp slt i64 %160, %169
  br i1 %170, label %171, label %173

171:                                              ; preds = %168
  %172 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -8, ptr %172, align 8, !tbaa !9
  br label %214

173:                                              ; preds = %168
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = icmp sge i64 1, %175
  br i1 %176, label %177, label %178

177:                                              ; preds = %173
  br label %181

178:                                              ; preds = %173
  %179 = load ptr, ptr %14, align 8, !tbaa !5
  %180 = load i64, ptr %179, align 8, !tbaa !9
  br label %181

181:                                              ; preds = %178, %177
  %182 = phi i64 [ 1, %177 ], [ %180, %178 ]
  store i64 %182, ptr %30, align 8, !tbaa !9
  %183 = load i64, ptr %30, align 8, !tbaa !9
  %184 = load ptr, ptr %15, align 8, !tbaa !5
  %185 = load i64, ptr %184, align 8, !tbaa !9
  %186 = icmp sge i64 %183, %185
  br i1 %186, label %187, label %189

187:                                              ; preds = %181
  %188 = load i64, ptr %30, align 8, !tbaa !9
  br label %192

189:                                              ; preds = %181
  %190 = load ptr, ptr %15, align 8, !tbaa !5
  %191 = load i64, ptr %190, align 8, !tbaa !9
  br label %192

192:                                              ; preds = %189, %187
  %193 = phi i64 [ %188, %187 ], [ %191, %189 ]
  store i64 %193, ptr %30, align 8, !tbaa !9
  %194 = load ptr, ptr %24, align 8, !tbaa !5
  %195 = load i64, ptr %194, align 8, !tbaa !9
  %196 = load i64, ptr %30, align 8, !tbaa !9
  %197 = load ptr, ptr %16, align 8, !tbaa !5
  %198 = load i64, ptr %197, align 8, !tbaa !9
  %199 = icmp sge i64 %196, %198
  br i1 %199, label %200, label %202

200:                                              ; preds = %192
  %201 = load i64, ptr %30, align 8, !tbaa !9
  br label %205

202:                                              ; preds = %192
  %203 = load ptr, ptr %16, align 8, !tbaa !5
  %204 = load i64, ptr %203, align 8, !tbaa !9
  br label %205

205:                                              ; preds = %202, %200
  %206 = phi i64 [ %201, %200 ], [ %204, %202 ]
  %207 = icmp slt i64 %195, %206
  br i1 %207, label %208, label %213

208:                                              ; preds = %205
  %209 = load i64, ptr %38, align 8, !tbaa !9
  %210 = icmp ne i64 %209, 0
  br i1 %210, label %213, label %211

211:                                              ; preds = %208
  %212 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -11, ptr %212, align 8, !tbaa !9
  br label %213

213:                                              ; preds = %211, %208, %205
  br label %214

214:                                              ; preds = %213, %171
  br label %215

215:                                              ; preds = %214, %156
  br label %216

216:                                              ; preds = %215, %141
  br label %217

217:                                              ; preds = %216, %135
  br label %218

218:                                              ; preds = %217, %129
  %219 = load ptr, ptr %25, align 8, !tbaa !5
  %220 = load i64, ptr %219, align 8, !tbaa !9
  %221 = icmp ne i64 %220, 0
  br i1 %221, label %222, label %227

222:                                              ; preds = %218
  %223 = load ptr, ptr %25, align 8, !tbaa !5
  %224 = load i64, ptr %223, align 8, !tbaa !9
  %225 = sub nsw i64 0, %224
  store i64 %225, ptr %30, align 8, !tbaa !9
  %226 = call i32 @xerbla_(ptr noundef @.str.4, ptr noundef %30)
  store i32 0, ptr %13, align 4
  store i32 1, ptr %39, align 4
  br label %324

227:                                              ; preds = %218
  %228 = load i64, ptr %38, align 8, !tbaa !9
  %229 = icmp ne i64 %228, 0
  br i1 %229, label %230, label %231

230:                                              ; preds = %227
  store i32 0, ptr %13, align 4
  store i32 1, ptr %39, align 4
  br label %324

231:                                              ; preds = %227
  br label %232

232:                                              ; preds = %231
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = load ptr, ptr %15, align 8, !tbaa !5
  %235 = load ptr, ptr %17, align 8, !tbaa !5
  %236 = load i64, ptr %27, align 8, !tbaa !9
  %237 = getelementptr inbounds double, ptr %235, i64 %236
  %238 = load ptr, ptr %18, align 8, !tbaa !5
  %239 = load ptr, ptr %19, align 8, !tbaa !5
  %240 = getelementptr inbounds double, ptr %239, i64 1
  %241 = load ptr, ptr %23, align 8, !tbaa !5
  %242 = getelementptr inbounds double, ptr %241, i64 1
  %243 = load ptr, ptr %24, align 8, !tbaa !5
  %244 = load ptr, ptr %25, align 8, !tbaa !5
  %245 = call i32 @dgeqrf_(ptr noundef %233, ptr noundef %234, ptr noundef %237, ptr noundef %238, ptr noundef %240, ptr noundef %242, ptr noundef %243, ptr noundef %244)
  %246 = load ptr, ptr %23, align 8, !tbaa !5
  %247 = getelementptr inbounds double, ptr %246, i64 1
  %248 = load double, ptr %247, align 8, !tbaa !11
  %249 = fptosi double %248 to i64
  store i64 %249, ptr %36, align 8, !tbaa !9
  %250 = load ptr, ptr %14, align 8, !tbaa !5
  %251 = load i64, ptr %250, align 8, !tbaa !9
  %252 = load ptr, ptr %15, align 8, !tbaa !5
  %253 = load i64, ptr %252, align 8, !tbaa !9
  %254 = icmp sle i64 %251, %253
  br i1 %254, label %255, label %258

255:                                              ; preds = %232
  %256 = load ptr, ptr %14, align 8, !tbaa !5
  %257 = load i64, ptr %256, align 8, !tbaa !9
  br label %261

258:                                              ; preds = %232
  %259 = load ptr, ptr %15, align 8, !tbaa !5
  %260 = load i64, ptr %259, align 8, !tbaa !9
  br label %261

261:                                              ; preds = %258, %255
  %262 = phi i64 [ %257, %255 ], [ %260, %258 ]
  store i64 %262, ptr %30, align 8, !tbaa !9
  %263 = load ptr, ptr %14, align 8, !tbaa !5
  %264 = load ptr, ptr %16, align 8, !tbaa !5
  %265 = load ptr, ptr %17, align 8, !tbaa !5
  %266 = load i64, ptr %27, align 8, !tbaa !9
  %267 = getelementptr inbounds double, ptr %265, i64 %266
  %268 = load ptr, ptr %18, align 8, !tbaa !5
  %269 = load ptr, ptr %19, align 8, !tbaa !5
  %270 = getelementptr inbounds double, ptr %269, i64 1
  %271 = load ptr, ptr %20, align 8, !tbaa !5
  %272 = load i64, ptr %29, align 8, !tbaa !9
  %273 = getelementptr inbounds double, ptr %271, i64 %272
  %274 = load ptr, ptr %21, align 8, !tbaa !5
  %275 = load ptr, ptr %23, align 8, !tbaa !5
  %276 = getelementptr inbounds double, ptr %275, i64 1
  %277 = load ptr, ptr %24, align 8, !tbaa !5
  %278 = load ptr, ptr %25, align 8, !tbaa !5
  %279 = call i32 @dormqr_(ptr noundef @.str.5, ptr noundef @.str.6, ptr noundef %263, ptr noundef %264, ptr noundef %30, ptr noundef %267, ptr noundef %268, ptr noundef %270, ptr noundef %273, ptr noundef %274, ptr noundef %276, ptr noundef %277, ptr noundef %278)
  %280 = load i64, ptr %36, align 8, !tbaa !9
  store i64 %280, ptr %30, align 8, !tbaa !9
  %281 = load ptr, ptr %23, align 8, !tbaa !5
  %282 = getelementptr inbounds double, ptr %281, i64 1
  %283 = load double, ptr %282, align 8, !tbaa !11
  %284 = fptosi double %283 to i64
  store i64 %284, ptr %31, align 8, !tbaa !9
  %285 = load i64, ptr %30, align 8, !tbaa !9
  %286 = load i64, ptr %31, align 8, !tbaa !9
  %287 = icmp sge i64 %285, %286
  br i1 %287, label %288, label %290

288:                                              ; preds = %261
  %289 = load i64, ptr %30, align 8, !tbaa !9
  br label %292

290:                                              ; preds = %261
  %291 = load i64, ptr %31, align 8, !tbaa !9
  br label %292

292:                                              ; preds = %290, %288
  %293 = phi i64 [ %289, %288 ], [ %291, %290 ]
  store i64 %293, ptr %36, align 8, !tbaa !9
  %294 = load ptr, ptr %14, align 8, !tbaa !5
  %295 = load ptr, ptr %16, align 8, !tbaa !5
  %296 = load ptr, ptr %20, align 8, !tbaa !5
  %297 = load i64, ptr %29, align 8, !tbaa !9
  %298 = getelementptr inbounds double, ptr %296, i64 %297
  %299 = load ptr, ptr %21, align 8, !tbaa !5
  %300 = load ptr, ptr %22, align 8, !tbaa !5
  %301 = getelementptr inbounds double, ptr %300, i64 1
  %302 = load ptr, ptr %23, align 8, !tbaa !5
  %303 = getelementptr inbounds double, ptr %302, i64 1
  %304 = load ptr, ptr %24, align 8, !tbaa !5
  %305 = load ptr, ptr %25, align 8, !tbaa !5
  %306 = call i32 @dgerqf_(ptr noundef %294, ptr noundef %295, ptr noundef %298, ptr noundef %299, ptr noundef %301, ptr noundef %303, ptr noundef %304, ptr noundef %305)
  %307 = load i64, ptr %36, align 8, !tbaa !9
  store i64 %307, ptr %30, align 8, !tbaa !9
  %308 = load ptr, ptr %23, align 8, !tbaa !5
  %309 = getelementptr inbounds double, ptr %308, i64 1
  %310 = load double, ptr %309, align 8, !tbaa !11
  %311 = fptosi double %310 to i64
  store i64 %311, ptr %31, align 8, !tbaa !9
  %312 = load i64, ptr %30, align 8, !tbaa !9
  %313 = load i64, ptr %31, align 8, !tbaa !9
  %314 = icmp sge i64 %312, %313
  br i1 %314, label %315, label %317

315:                                              ; preds = %292
  %316 = load i64, ptr %30, align 8, !tbaa !9
  br label %319

317:                                              ; preds = %292
  %318 = load i64, ptr %31, align 8, !tbaa !9
  br label %319

319:                                              ; preds = %317, %315
  %320 = phi i64 [ %316, %315 ], [ %318, %317 ]
  %321 = sitofp i64 %320 to double
  %322 = load ptr, ptr %23, align 8, !tbaa !5
  %323 = getelementptr inbounds double, ptr %322, i64 1
  store double %321, ptr %323, align 8, !tbaa !11
  store i32 0, ptr %13, align 4
  store i32 1, ptr %39, align 4
  br label %324

324:                                              ; preds = %319, %230, %222
  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 8, 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 8, 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
  %325 = load i32, ptr %13, align 4
  ret i32 %325
}

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

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

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

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

declare i32 @dormqr_(ptr noundef, ptr noundef, 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 @dgerqf_(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}


; 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"

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @dggqrf_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) local_unnamed_addr #0 {
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store i64 0, ptr %11, align 8, !tbaa !5
  %14 = tail call i64 @ilaenv_(ptr noundef nonnull @c__1, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %0, ptr noundef %1, ptr noundef nonnull @c_n1, ptr noundef nonnull @c_n1) #4
  %15 = tail call i64 @ilaenv_(ptr noundef nonnull @c__1, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, ptr noundef %0, ptr noundef %2, ptr noundef nonnull @c_n1, ptr noundef nonnull @c_n1) #4
  %16 = tail call i64 @ilaenv_(ptr noundef nonnull @c__1, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull @c_n1) #4
  %17 = tail call i64 @llvm.smax.i64(i64 %14, i64 %15)
  %18 = tail call i64 @llvm.smax.i64(i64 %17, i64 %16)
  %19 = load i64, ptr %0, align 8, !tbaa !5
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %. = tail call i64 @llvm.smax.i64(i64 %19, i64 %20)
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = tail call i64 @llvm.smax.i64(i64 %., i64 %21)
  %23 = mul nsw i64 %22, %18
  %24 = sitofp i64 %23 to double
  store double %24, ptr %9, align 8, !tbaa !9
  %25 = load i64, ptr %10, align 8, !tbaa !5
  %26 = icmp eq i64 %25, -1
  %27 = icmp slt i64 %19, 0
  br i1 %27, label %.thread.sink.split, label %28

28:                                               ; preds = %12
  %29 = icmp slt i64 %20, 0
  br i1 %29, label %.thread.sink.split, label %30

30:                                               ; preds = %28
  %31 = icmp slt i64 %21, 0
  br i1 %31, label %.thread.sink.split, label %32

32:                                               ; preds = %30
  %33 = load i64, ptr %4, align 8, !tbaa !5
  %spec.select = tail call i64 @llvm.umax.i64(i64 %19, i64 1)
  %34 = icmp slt i64 %33, %spec.select
  br i1 %34, label %.thread.sink.split, label %35

35:                                               ; preds = %32
  %36 = load i64, ptr %7, align 8, !tbaa !5
  %37 = icmp slt i64 %36, %spec.select
  br i1 %37, label %.thread.sink.split, label %38

38:                                               ; preds = %35
  %39 = tail call i64 @llvm.umax.i64(i64 %spec.select, i64 %20)
  %40 = tail call i64 @llvm.umax.i64(i64 %39, i64 %21)
  %41 = icmp sge i64 %25, %40
  %or.cond = or i1 %41, %26
  br i1 %or.cond, label %42, label %.thread.sink.split

42:                                               ; preds = %38
  %.pr = load i64, ptr %11, align 8, !tbaa !5
  %.not122 = icmp eq i64 %.pr, 0
  br i1 %.not122, label %46, label %.thread

.thread.sink.split:                               ; preds = %38, %35, %32, %30, %28, %12
  %.sink = phi i64 [ -1, %12 ], [ -2, %28 ], [ -3, %30 ], [ -5, %32 ], [ -8, %35 ], [ -11, %38 ]
  store i64 %.sink, ptr %11, align 8, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %42
  %43 = phi i64 [ %.pr, %42 ], [ %.sink, %.thread.sink.split ]
  %44 = sub nsw i64 0, %43
  store i64 %44, ptr %13, align 8, !tbaa !5
  %45 = call i32 @xerbla_(ptr noundef nonnull @.str.4, ptr noundef nonnull %13) #4
  br label %62

46:                                               ; preds = %42
  br i1 %26, label %62, label %47

47:                                               ; preds = %46
  %48 = tail call i32 @dgeqrf_(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef %3, ptr noundef nonnull %4, ptr noundef %5, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  %49 = load double, ptr %9, align 8, !tbaa !9
  %50 = fptosi double %49 to i64
  %51 = load i64, ptr %0, align 8, !tbaa !5
  %52 = load i64, ptr %1, align 8, !tbaa !5
  %.128 = tail call i64 @llvm.smin.i64(i64 %51, i64 %52)
  store i64 %.128, ptr %13, align 8, !tbaa !5
  %53 = call i32 @dormqr_(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef nonnull %13, ptr noundef %3, ptr noundef nonnull %4, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  store i64 %50, ptr %13, align 8, !tbaa !5
  %54 = load double, ptr %9, align 8, !tbaa !9
  %55 = fptosi double %54 to i64
  %56 = call i64 @llvm.smax.i64(i64 %50, i64 %55)
  %57 = call i32 @dgerqf_(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef %6, ptr noundef nonnull %7, ptr noundef %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11) #4
  %58 = load double, ptr %9, align 8, !tbaa !9
  %59 = fptosi double %58 to i64
  %60 = call i64 @llvm.smax.i64(i64 %56, i64 %59)
  %61 = sitofp i64 %60 to double
  store double %61, ptr %9, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %46, %47, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #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 @ilaenv_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

declare i32 @dormqr_(ptr noundef, ptr noundef, 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 @dgerqf_(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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smin.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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass