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

; 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_dgbtrf(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 [1 x double], align 8
  %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 %265

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 %265

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.memset.p0.i64(ptr align 8 %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 = sext i32 %101 to i64
  %103 = getelementptr inbounds double, ptr %100, i64 %102
  store ptr %103, 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 %104

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

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

121:                                              ; preds = %109
  br label %126

122:                                              ; preds = %109
  %123 = load i32, ptr %23, align 4, !tbaa !9
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = sub nsw i32 %123, %124
  br label %126

126:                                              ; preds = %122, %121
  %127 = phi i32 [ 0, %121 ], [ %125, %122 ]
  store i32 %127, ptr %22, align 4, !tbaa !9
  br label %128

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

135:                                              ; preds = %128
  %136 = load ptr, ptr %24, align 8, !tbaa !5
  %137 = load i32, ptr %22, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds double, ptr %136, i64 %138
  store double 0.000000e+00, ptr %139, align 8, !tbaa !11
  br label %140

140:                                              ; preds = %135
  %141 = load i32, ptr %22, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %22, align 4, !tbaa !9
  br label %128, !llvm.loop !13

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

144:                                              ; preds = %143
  %145 = load i32, ptr %23, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %23, align 4, !tbaa !9
  br label %104, !llvm.loop !15

147:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = load i32, ptr %148, align 4, !tbaa !9
  %150 = icmp sge i32 %149, 16
  br i1 %150, label %151, label %157

151:                                              ; preds = %147
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = load i32, ptr %152, align 4, !tbaa !9
  %154 = add nsw i32 %153, 8
  %155 = sdiv i32 %154, 16
  %156 = mul nsw i32 %155, 8
  br label %161

157:                                              ; preds = %147
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = load i32, ptr %158, align 4, !tbaa !9
  %160 = sdiv i32 %159, 2
  br label %161

161:                                              ; preds = %157, %151
  %162 = phi i32 [ %156, %151 ], [ %160, %157 ]
  store i32 %162, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %163 = load i32, ptr %19, align 4, !tbaa !9
  %164 = load i32, ptr %25, align 4, !tbaa !9
  %165 = icmp sgt i32 %163, %164
  br i1 %165, label %166, label %182

166:                                              ; preds = %161
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = sub nsw i32 %168, %170
  %172 = icmp sgt i32 1, %171
  br i1 %172, label %173, label %174

173:                                              ; preds = %166
  br label %180

174:                                              ; preds = %166
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = load i32, ptr %175, align 4, !tbaa !9
  %177 = load ptr, ptr %11, align 8, !tbaa !5
  %178 = load i32, ptr %177, align 4, !tbaa !9
  %179 = sub nsw i32 %176, %178
  br label %180

180:                                              ; preds = %174, %173
  %181 = phi i32 [ 1, %173 ], [ %179, %174 ]
  br label %184

182:                                              ; preds = %161
  %183 = load i32, ptr %19, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %182, %180
  %185 = phi i32 [ %181, %180 ], [ %183, %182 ]
  %186 = call i32 @llvm.abs.i32(i32 %185, i1 true)
  store i32 %186, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %187 = load i32, ptr %19, align 4, !tbaa !9
  %188 = load i32, ptr %25, align 4, !tbaa !9
  %189 = icmp sgt i32 %187, %188
  br i1 %189, label %190, label %192

190:                                              ; preds = %184
  %191 = load i32, ptr %25, align 4, !tbaa !9
  br label %194

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

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

201:                                              ; preds = %194
  %202 = load i32, ptr %25, align 4, !tbaa !9
  br label %206

203:                                              ; preds = %194
  %204 = load ptr, ptr %11, align 8, !tbaa !5
  %205 = load i32, ptr %204, align 4, !tbaa !9
  br label %206

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

213:                                              ; preds = %206
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = load i32, ptr %214, align 4, !tbaa !9
  %216 = load ptr, ptr %11, align 8, !tbaa !5
  %217 = load i32, ptr %216, align 4, !tbaa !9
  %218 = sub nsw i32 %215, %217
  %219 = icmp sgt i32 1, %218
  br i1 %219, label %220, label %221

220:                                              ; preds = %213
  br label %227

221:                                              ; preds = %213
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = load ptr, ptr %11, align 8, !tbaa !5
  %225 = load i32, ptr %224, align 4, !tbaa !9
  %226 = sub nsw i32 %223, %225
  br label %227

227:                                              ; preds = %221, %220
  %228 = phi i32 [ 1, %220 ], [ %226, %221 ]
  br label %232

229:                                              ; preds = %206
  %230 = load ptr, ptr %11, align 8, !tbaa !5
  %231 = load i32, ptr %230, align 4, !tbaa !9
  br label %232

232:                                              ; preds = %229, %227
  %233 = phi i32 [ %228, %227 ], [ %231, %229 ]
  %234 = call i32 @llvm.abs.i32(i32 %233, i1 true)
  store i32 %234, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %235 = load i32, ptr %26, align 4, !tbaa !9
  %236 = load i32, ptr %27, align 4, !tbaa !9
  %237 = mul nsw i32 %235, %236
  %238 = sext i32 %237 to i64
  %239 = mul i64 %238, 8
  %240 = call noalias ptr @malloc(i64 noundef %239) #8
  store ptr %240, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %241 = load i32, ptr %28, align 4, !tbaa !9
  %242 = load i32, ptr %29, align 4, !tbaa !9
  %243 = mul nsw i32 %241, %242
  %244 = sext i32 %243 to i64
  %245 = mul i64 %244, 8
  %246 = call noalias ptr @malloc(i64 noundef %245) #8
  store ptr %246, ptr %31, align 8, !tbaa !5
  %247 = getelementptr inbounds [1 x double], ptr %18, i64 0, i64 0
  %248 = getelementptr inbounds [1 x double], ptr %18, i64 0, i64 0
  %249 = load ptr, ptr %30, align 8, !tbaa !5
  call void @dlaset_(ptr noundef @.str.1, ptr noundef %26, ptr noundef %27, ptr noundef %247, ptr noundef %248, ptr noundef %249, ptr noundef %26)
  %250 = getelementptr inbounds [1 x double], ptr %18, i64 0, i64 0
  %251 = getelementptr inbounds [1 x double], ptr %18, i64 0, i64 0
  %252 = load ptr, ptr %31, align 8, !tbaa !5
  call void @dlaset_(ptr noundef @.str.2, ptr noundef %28, ptr noundef %29, ptr noundef %250, ptr noundef %251, ptr noundef %252, ptr noundef %28)
  %253 = load ptr, ptr %9, align 8, !tbaa !5
  %254 = load ptr, ptr %10, align 8, !tbaa !5
  %255 = load ptr, ptr %11, align 8, !tbaa !5
  %256 = load ptr, ptr %12, align 8, !tbaa !5
  %257 = load ptr, ptr %13, align 8, !tbaa !5
  %258 = load ptr, ptr %14, align 8, !tbaa !5
  %259 = load ptr, ptr %15, align 8, !tbaa !5
  %260 = load ptr, ptr %30, align 8, !tbaa !5
  %261 = load ptr, ptr %31, align 8, !tbaa !5
  %262 = load ptr, ptr %16, align 8, !tbaa !5
  call void @RELAPACK_dgbtrf_rec(ptr noundef %253, ptr noundef %254, ptr noundef %255, ptr noundef %256, ptr noundef %257, ptr noundef %258, ptr noundef %259, ptr noundef %260, ptr noundef %26, ptr noundef %261, ptr noundef %28, ptr noundef %262)
  %263 = load ptr, ptr %30, align 8, !tbaa !5
  call void @free(ptr noundef %263) #7
  %264 = load ptr, ptr %31, align 8, !tbaa !5
  call void @free(ptr noundef %264) #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 %265

265:                                              ; preds = %232, %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 @dlaset_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @RELAPACK_dgbtrf_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 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

@.str = external hidden unnamed_addr constant [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_dgbtrf(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 [1 x double], 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 %82

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 %82, label %.lr.ph91.preheader

.lr.ph91.preheader:                               ; 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 = add nsw i32 %27, -1
  %36 = sext i32 %34 to i64
  %37 = shl nsw i64 %36, 3
  %scevgep = getelementptr i8, ptr %4, i64 %37
  %38 = xor i32 %24, -1
  %39 = zext nneg i32 %24 to i64
  %wide.trip.count = zext nneg i32 %18 to i64
  br label %.lr.ph91

.lr.ph91:                                         ; preds = %.lr.ph91.preheader, %._crit_edge
  %indvars.iv98 = phi i64 [ 0, %.lr.ph91.preheader ], [ %indvars.iv.next99, %._crit_edge ]
  %40 = trunc i64 %indvars.iv98 to i32
  %41 = sub i32 %40, %34
  %42 = tail call i32 @llvm.smax.i32(i32 %41, i32 0)
  %43 = sub nsw i64 %indvars.iv98, %39
  %44 = zext nneg i32 %42 to i64
  %45 = icmp sgt i64 %43, %44
  br i1 %45, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.lr.ph91
  %46 = trunc nuw nsw i64 %indvars.iv98 to i32
  %47 = add i32 %38, %46
  %48 = trunc i64 %indvars.iv98 to i32
  %49 = sub i32 %48, %34
  %smax = tail call i32 @llvm.smax.i32(i32 %49, i32 0)
  %50 = sub i32 %47, %smax
  %51 = zext i32 %50 to i64
  %52 = shl nuw nsw i64 %51, 3
  %53 = add nuw nsw i64 %52, 8
  %54 = mul i32 %35, %46
  %55 = sext i32 %54 to i64
  %56 = zext nneg i32 %smax to i64
  %57 = add nsw i64 %55, %56
  %58 = shl nsw i64 %57, 3
  %scevgep93 = getelementptr i8, ptr %scevgep, i64 %58
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep93, i8 0, i64 %53, i1 false), !tbaa !9
  br label %._crit_edge

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

._crit_edge92:                                    ; preds = %._crit_edge
  %59 = icmp sgt i32 %18, 15
  %60 = add nuw nsw i32 %18, 8
  %61 = lshr i32 %60, 1
  %62 = and i32 %61, 1073741816
  %63 = lshr i32 %18, 1
  %64 = select i1 %59, i32 %62, i32 %63
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  %65 = icmp sgt i32 %34, %64
  %66 = sub nsw i32 %15, %21
  %spec.select = tail call i32 @llvm.smax.i32(i32 %66, i32 1)
  %67 = select i1 %65, i32 %spec.select, i32 %34
  %68 = tail call i32 @llvm.abs.i32(i32 %67, i1 true)
  store i32 %68, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  %69 = tail call i32 @llvm.smin.i32(i32 %34, i32 %64)
  %70 = tail call i32 @llvm.abs.i32(i32 %69, i1 true)
  store i32 %70, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  %71 = icmp sgt i32 %21, %64
  %. = tail call i32 @llvm.smin.i32(i32 %21, i32 %64)
  store i32 %., ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #8
  %72 = sub nsw i32 %18, %21
  %spec.select86 = tail call i32 @llvm.smax.i32(i32 %72, i32 1)
  %73 = select i1 %71, i32 %spec.select86, i32 %21
  store i32 %73, ptr %14, align 4, !tbaa !5
  %74 = mul nuw nsw i32 %68, %70
  %75 = zext nneg i32 %74 to i64
  %76 = shl nuw nsw i64 %75, 3
  %77 = tail call noalias ptr @malloc(i64 noundef %76) #9
  %78 = mul nuw nsw i32 %73, %.
  %79 = zext nneg i32 %78 to i64
  %80 = shl nuw nsw i64 %79, 3
  %81 = tail call noalias ptr @malloc(i64 noundef %80) #9
  call void @dlaset_(ptr noundef nonnull @.str.1, ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef %77, ptr noundef nonnull %11) #8
  call void @dlaset_(ptr noundef nonnull @.str.2, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %10, ptr noundef nonnull %10, ptr noundef %81, ptr noundef nonnull %13) #8
  call void @RELAPACK_dgbtrf_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 %77, ptr noundef nonnull %11, ptr noundef %81, ptr noundef nonnull %13, ptr noundef nonnull %7)
  call void @free(ptr noundef %77) #8
  call void @free(ptr noundef %81) #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 %82

82:                                               ; preds = %31, %._crit_edge92, %.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 @dlaset_(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_dgbtrf_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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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