; LLVM IR from OpenMathLib/OpenBLAS :: relapack/src (cgbtrf)

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

; Function Attrs: nounwind uwtable
define dso_local void @RELAPACK_cgbtrf(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #0 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca [2 x float], align 4
  %19 = alloca i32, align 4
  %20 = alloca [1 x i32], align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %32, align 4, !tbaa !9
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = icmp slt i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %8
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -1, ptr %37, align 4, !tbaa !9
  br label %73

38:                                               ; preds = %8
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = icmp slt i32 %40, 0
  br i1 %41, label %42, label %44

42:                                               ; preds = %38
  %43 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -2, ptr %43, align 4, !tbaa !9
  br label %72

44:                                               ; preds = %38
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = icmp slt i32 %46, 0
  br i1 %47, label %48, label %50

48:                                               ; preds = %44
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -3, ptr %49, align 4, !tbaa !9
  br label %71

50:                                               ; preds = %44
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %50
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -4, ptr %55, align 4, !tbaa !9
  br label %70

56:                                               ; preds = %50
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load i32, ptr %59, align 4, !tbaa !9
  %61 = mul nsw i32 2, %60
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = add nsw i32 %61, %63
  %65 = add nsw i32 %64, 1
  %66 = icmp slt i32 %58, %65
  br i1 %66, label %67, label %69

67:                                               ; preds = %56
  %68 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -6, ptr %68, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %67, %56
  br label %70

70:                                               ; preds = %69, %54
  br label %71

71:                                               ; preds = %70, %48
  br label %72

72:                                               ; preds = %71, %42
  br label %73

73:                                               ; preds = %72, %36
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %82

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %78 = load ptr, ptr %16, align 8, !tbaa !5
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = sub nsw i32 0, %79
  store i32 %80, ptr %17, align 4, !tbaa !9
  %81 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %17, i32 noundef 6)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %276

82:                                               ; preds = %73
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = icmp eq i32 %84, 0
  br i1 %85, label %90, label %86

86:                                               ; preds = %82
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %91

90:                                               ; preds = %86, %82
  br label %276

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.memset.p0.i64(ptr align 4 %18, i8 0, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = add nsw i32 %93, %95
  store i32 %96, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = sub nsw i32 %98, 1
  store i32 %99, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %100 = load ptr, ptr %13, align 8, !tbaa !5
  %101 = load i32, ptr %19, align 4, !tbaa !9
  %102 = mul nsw i32 2, %101
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds float, ptr %100, i64 %103
  store ptr %104, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %105

105:                                              ; preds = %153, %91
  %106 = load i32, ptr %23, align 4, !tbaa !9
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = icmp slt i32 %106, %108
  br i1 %109, label %110, label %156

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %111 = load ptr, ptr %21, align 8, !tbaa !5
  %112 = getelementptr inbounds [1 x i32], ptr %20, i64 0, i64 0
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = mul nsw i32 2, %113
  %115 = load i32, ptr %23, align 4, !tbaa !9
  %116 = mul nsw i32 %114, %115
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds float, ptr %111, i64 %117
  store ptr %118, ptr %24, align 8, !tbaa !5
  %119 = load i32, ptr %23, align 4, !tbaa !9
  %120 = load i32, ptr %19, align 4, !tbaa !9
  %121 = sub nsw i32 %119, %120
  %122 = icmp sgt i32 0, %121
  br i1 %122, label %123, label %124

123:                                              ; preds = %110
  br label %128

124:                                              ; preds = %110
  %125 = load i32, ptr %23, align 4, !tbaa !9
  %126 = load i32, ptr %19, align 4, !tbaa !9
  %127 = sub nsw i32 %125, %126
  br label %128

128:                                              ; preds = %124, %123
  %129 = phi i32 [ 0, %123 ], [ %127, %124 ]
  store i32 %129, ptr %22, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %149, %128
  %131 = load i32, ptr %22, align 4, !tbaa !9
  %132 = load i32, ptr %23, align 4, !tbaa !9
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = load i32, ptr %133, align 4, !tbaa !9
  %135 = sub nsw i32 %132, %134
  %136 = icmp slt i32 %131, %135
  br i1 %136, label %137, label %152

137:                                              ; preds = %130
  %138 = load ptr, ptr %24, align 8, !tbaa !5
  %139 = load i32, ptr %22, align 4, !tbaa !9
  %140 = mul nsw i32 2, %139
  %141 = add nsw i32 %140, 1
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds float, ptr %138, i64 %142
  store float 0.000000e+00, ptr %143, align 4, !tbaa !11
  %144 = load ptr, ptr %24, align 8, !tbaa !5
  %145 = load i32, ptr %22, align 4, !tbaa !9
  %146 = mul nsw i32 2, %145
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds float, ptr %144, i64 %147
  store float 0.000000e+00, ptr %148, align 4, !tbaa !11
  br label %149

149:                                              ; preds = %137
  %150 = load i32, ptr %22, align 4, !tbaa !9
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %22, align 4, !tbaa !9
  br label %130, !llvm.loop !13

152:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %23, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %23, align 4, !tbaa !9
  br label %105, !llvm.loop !15

156:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = icmp sge i32 %158, 16
  br i1 %159, label %160, label %166

160:                                              ; preds = %156
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = load i32, ptr %161, align 4, !tbaa !9
  %163 = add nsw i32 %162, 8
  %164 = sdiv i32 %163, 16
  %165 = mul nsw i32 %164, 8
  br label %170

166:                                              ; preds = %156
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = sdiv i32 %168, 2
  br label %170

170:                                              ; preds = %166, %160
  %171 = phi i32 [ %165, %160 ], [ %169, %166 ]
  store i32 %171, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %172 = load i32, ptr %19, align 4, !tbaa !9
  %173 = load i32, ptr %25, align 4, !tbaa !9
  %174 = icmp sgt i32 %172, %173
  br i1 %174, label %175, label %191

175:                                              ; preds = %170
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = load i32, ptr %178, align 4, !tbaa !9
  %180 = sub nsw i32 %177, %179
  %181 = icmp sgt i32 1, %180
  br i1 %181, label %182, label %183

182:                                              ; preds = %175
  br label %189

183:                                              ; preds = %175
  %184 = load ptr, ptr %9, align 8, !tbaa !5
  %185 = load i32, ptr %184, align 4, !tbaa !9
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = load i32, ptr %186, align 4, !tbaa !9
  %188 = sub nsw i32 %185, %187
  br label %189

189:                                              ; preds = %183, %182
  %190 = phi i32 [ 1, %182 ], [ %188, %183 ]
  br label %193

191:                                              ; preds = %170
  %192 = load i32, ptr %19, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %191, %189
  %194 = phi i32 [ %190, %189 ], [ %192, %191 ]
  %195 = call i32 @llvm.abs.i32(i32 %194, i1 true)
  store i32 %195, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %196 = load i32, ptr %19, align 4, !tbaa !9
  %197 = load i32, ptr %25, align 4, !tbaa !9
  %198 = icmp sgt i32 %196, %197
  br i1 %198, label %199, label %201

199:                                              ; preds = %193
  %200 = load i32, ptr %25, align 4, !tbaa !9
  br label %203

201:                                              ; preds = %193
  %202 = load i32, ptr %19, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %201, %199
  %204 = phi i32 [ %200, %199 ], [ %202, %201 ]
  %205 = call i32 @llvm.abs.i32(i32 %204, i1 true)
  store i32 %205, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  %207 = load i32, ptr %206, align 4, !tbaa !9
  %208 = load i32, ptr %25, align 4, !tbaa !9
  %209 = icmp sgt i32 %207, %208
  br i1 %209, label %210, label %212

210:                                              ; preds = %203
  %211 = load i32, ptr %25, align 4, !tbaa !9
  br label %215

212:                                              ; preds = %203
  %213 = load ptr, ptr %11, align 8, !tbaa !5
  %214 = load i32, ptr %213, align 4, !tbaa !9
  br label %215

215:                                              ; preds = %212, %210
  %216 = phi i32 [ %211, %210 ], [ %214, %212 ]
  %217 = call i32 @llvm.abs.i32(i32 %216, i1 true)
  store i32 %217, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = load i32, ptr %25, align 4, !tbaa !9
  %221 = icmp sgt i32 %219, %220
  br i1 %221, label %222, label %238

222:                                              ; preds = %215
  %223 = load ptr, ptr %10, align 8, !tbaa !5
  %224 = load i32, ptr %223, align 4, !tbaa !9
  %225 = load ptr, ptr %11, align 8, !tbaa !5
  %226 = load i32, ptr %225, align 4, !tbaa !9
  %227 = sub nsw i32 %224, %226
  %228 = icmp sgt i32 0, %227
  br i1 %228, label %229, label %230

229:                                              ; preds = %222
  br label %236

230:                                              ; preds = %222
  %231 = load ptr, ptr %10, align 8, !tbaa !5
  %232 = load i32, ptr %231, align 4, !tbaa !9
  %233 = load ptr, ptr %11, align 8, !tbaa !5
  %234 = load i32, ptr %233, align 4, !tbaa !9
  %235 = sub nsw i32 %232, %234
  br label %236

236:                                              ; preds = %230, %229
  %237 = phi i32 [ 0, %229 ], [ %235, %230 ]
  br label %241

238:                                              ; preds = %215
  %239 = load ptr, ptr %11, align 8, !tbaa !5
  %240 = load i32, ptr %239, align 4, !tbaa !9
  br label %241

241:                                              ; preds = %238, %236
  %242 = phi i32 [ %237, %236 ], [ %240, %238 ]
  %243 = call i32 @llvm.abs.i32(i32 %242, i1 true)
  store i32 %243, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %244 = load i32, ptr %26, align 4, !tbaa !9
  %245 = load i32, ptr %27, align 4, !tbaa !9
  %246 = mul nsw i32 %244, %245
  %247 = mul nsw i32 %246, 2
  %248 = sext i32 %247 to i64
  %249 = mul i64 %248, 4
  %250 = call noalias ptr @malloc(i64 noundef %249) #8
  store ptr %250, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %251 = load i32, ptr %28, align 4, !tbaa !9
  %252 = load i32, ptr %29, align 4, !tbaa !9
  %253 = mul nsw i32 %251, %252
  %254 = mul nsw i32 %253, 2
  %255 = sext i32 %254 to i64
  %256 = mul i64 %255, 4
  %257 = call noalias ptr @malloc(i64 noundef %256) #8
  store ptr %257, ptr %31, align 8, !tbaa !5
  %258 = getelementptr inbounds [2 x float], ptr %18, i64 0, i64 0
  %259 = getelementptr inbounds [2 x float], ptr %18, i64 0, i64 0
  %260 = load ptr, ptr %30, align 8, !tbaa !5
  call void @claset_(ptr noundef @.str.1, ptr noundef %26, ptr noundef %27, ptr noundef %258, ptr noundef %259, ptr noundef %260, ptr noundef %26)
  %261 = getelementptr inbounds [2 x float], ptr %18, i64 0, i64 0
  %262 = getelementptr inbounds [2 x float], ptr %18, i64 0, i64 0
  %263 = load ptr, ptr %31, align 8, !tbaa !5
  call void @claset_(ptr noundef @.str.2, ptr noundef %28, ptr noundef %29, ptr noundef %261, ptr noundef %262, ptr noundef %263, ptr noundef %28)
  %264 = load ptr, ptr %9, align 8, !tbaa !5
  %265 = load ptr, ptr %10, align 8, !tbaa !5
  %266 = load ptr, ptr %11, align 8, !tbaa !5
  %267 = load ptr, ptr %12, align 8, !tbaa !5
  %268 = load ptr, ptr %13, align 8, !tbaa !5
  %269 = load ptr, ptr %14, align 8, !tbaa !5
  %270 = load ptr, ptr %15, align 8, !tbaa !5
  %271 = load ptr, ptr %30, align 8, !tbaa !5
  %272 = load ptr, ptr %31, align 8, !tbaa !5
  %273 = load ptr, ptr %16, align 8, !tbaa !5
  call void @RELAPACK_cgbtrf_rec(ptr noundef %264, ptr noundef %265, ptr noundef %266, ptr noundef %267, ptr noundef %268, ptr noundef %269, ptr noundef %270, ptr noundef %271, ptr noundef %26, ptr noundef %272, ptr noundef %28, ptr noundef %273)
  %274 = load ptr, ptr %30, align 8, !tbaa !5
  call void @free(ptr noundef %274) #7
  %275 = load ptr, ptr %31, align 8, !tbaa !5
  call void @free(ptr noundef %275) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %276

276:                                              ; preds = %241, %90, %77
  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 @xerbla_(ptr noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

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

; Function Attrs: nounwind uwtable
declare hidden void @RELAPACK_cgbtrf_rec(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind
declare void @free(ptr noundef) #6

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind allocsize(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 #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

@.str = external hidden unnamed_addr constant [7 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

; Function Attrs: nounwind uwtable
define dso_local void @RELAPACK_cgbtrf(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #0 {
  %9 = alloca i32, align 4
  %10 = alloca [2 x float], align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %7, align 4, !tbaa !5
  %15 = load i32, ptr %0, align 4, !tbaa !5
  %16 = icmp slt i32 %15, 0
  br i1 %16, label %.thread, label %17

17:                                               ; preds = %8
  %18 = load i32, ptr %1, align 4, !tbaa !5
  %19 = icmp slt i32 %18, 0
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %17
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 0
  br i1 %22, label %.thread, label %23

23:                                               ; preds = %20
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %.thread, label %26

26:                                               ; preds = %23
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = shl nuw nsw i32 %21, 1
  %29 = add nuw nsw i32 %24, %28
  %.not = icmp sgt i32 %27, %29
  br i1 %.not, label %31, label %.thread

.thread:                                          ; preds = %26, %23, %20, %17, %8
  %.sink = phi i32 [ -1, %8 ], [ -2, %17 ], [ -3, %20 ], [ -4, %23 ], [ -6, %26 ]
  %.neg = phi i32 [ 1, %8 ], [ 2, %17 ], [ 3, %20 ], [ 4, %23 ], [ 6, %26 ]
  store i32 %.sink, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  store i32 %.neg, ptr %9, align 4, !tbaa !5
  %30 = call i32 @xerbla_(ptr noundef nonnull @.str, ptr noundef nonnull %9, i32 noundef 6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  br label %88

31:                                               ; preds = %26
  %32 = icmp eq i32 %15, 0
  %33 = icmp eq i32 %18, 0
  %or.cond = or i1 %32, %33
  br i1 %or.cond, label %88, label %.lr.ph93

.lr.ph93:                                         ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store i64 0, ptr %10, align 8
  %34 = add nuw i32 %21, %24
  %35 = shl i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = shl i32 %27, 1
  %38 = add i32 %37, -2
  %39 = shl nsw i64 %36, 2
  %scevgep = getelementptr i8, ptr %4, i64 %39
  %40 = xor i32 %24, -1
  %41 = zext nneg i32 %24 to i64
  %wide.trip.count = zext nneg i32 %18 to i64
  br label %42

42:                                               ; preds = %.lr.ph93, %._crit_edge
  %indvars.iv100 = phi i64 [ 0, %.lr.ph93 ], [ %indvars.iv.next101, %._crit_edge ]
  %43 = trunc i64 %indvars.iv100 to i32
  %44 = sub i32 %43, %34
  %45 = tail call i32 @llvm.smax.i32(i32 %44, i32 0)
  %46 = sub nsw i64 %indvars.iv100, %41
  %47 = zext nneg i32 %45 to i64
  %48 = icmp sgt i64 %46, %47
  br i1 %48, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %42
  %49 = trunc nuw nsw i64 %indvars.iv100 to i32
  %50 = add i32 %40, %49
  %51 = trunc i64 %indvars.iv100 to i32
  %52 = sub i32 %51, %34
  %smax = tail call i32 @llvm.smax.i32(i32 %52, i32 0)
  %53 = sub i32 %50, %smax
  %54 = zext i32 %53 to i64
  %55 = shl nuw nsw i64 %54, 3
  %56 = add nuw nsw i64 %55, 8
  %57 = mul i32 %38, %49
  %58 = sext i32 %57 to i64
  %59 = shl nsw i64 %58, 2
  %60 = zext nneg i32 %smax to i64
  %61 = shl nuw nsw i64 %60, 3
  %62 = getelementptr i8, ptr %scevgep, i64 %61
  %scevgep95 = getelementptr i8, ptr %62, i64 %59
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep95, i8 0, i64 %56, i1 false), !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %42
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next101, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge94, label %42, !llvm.loop !11

._crit_edge94:                                    ; preds = %._crit_edge
  %63 = icmp sgt i32 %18, 15
  %64 = add nuw nsw i32 %18, 8
  %65 = lshr i32 %64, 1
  %66 = and i32 %65, 1073741816
  %67 = lshr i32 %18, 1
  %68 = select i1 %63, i32 %66, i32 %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %69 = icmp sgt i32 %34, %68
  %70 = sub nsw i32 %15, %21
  %spec.select = tail call i32 @llvm.smax.i32(i32 %70, i32 1)
  %71 = select i1 %69, i32 %spec.select, i32 %34
  %72 = tail call i32 @llvm.abs.i32(i32 %71, i1 true)
  store i32 %72, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %73 = tail call i32 @llvm.smin.i32(i32 %34, i32 %68)
  %74 = tail call i32 @llvm.abs.i32(i32 %73, i1 true)
  store i32 %74, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %75 = icmp sgt i32 %21, %68
  %. = tail call i32 @llvm.smin.i32(i32 %21, i32 %68)
  store i32 %., ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %76 = sub nsw i32 %18, %21
  %spec.select88 = tail call i32 @llvm.smax.i32(i32 %76, i32 0)
  %77 = select i1 %75, i32 %spec.select88, i32 %21
  store i32 %77, ptr %14, align 4, !tbaa !5
  %78 = shl nuw i32 %74, 1
  %79 = mul i32 %78, %72
  %80 = zext nneg i32 %79 to i64
  %81 = shl nuw nsw i64 %80, 2
  %82 = tail call noalias ptr @malloc(i64 noundef %81) #9
  %83 = shl nuw nsw i32 %., 1
  %84 = mul i32 %83, %77
  %85 = zext nneg i32 %84 to i64
  %86 = shl nuw nsw i64 %85, 2
  %87 = tail call noalias ptr @malloc(i64 noundef %86) #9
  call void @claset_(ptr noundef nonnull @.str.1, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef %82, ptr noundef nonnull %11) #8
  call void @claset_(ptr noundef nonnull @.str.2, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef %87, ptr noundef nonnull %13) #8
  call void @RELAPACK_cgbtrf_rec(ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef %6, ptr noundef %82, ptr noundef nonnull %11, ptr noundef %87, ptr noundef nonnull %13, ptr noundef nonnull %7)
  call void @free(ptr noundef %82) #8
  call void @free(ptr noundef %87) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %88

88:                                               ; preds = %31, %._crit_edge94, %.thread
  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 @xerbla_(ptr noundef, ptr noundef, i32 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5

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

; Function Attrs: nounwind uwtable
declare hidden void @RELAPACK_cgbtrf_rec(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 #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #7

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #6 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass