; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (cpptrf)

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

%struct.complex = type { float, float }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@c_b16 = external hidden global float, align 4

; Function Attrs: nounwind uwtable
define dso_local void @cpptrf_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca %struct.complex, align 4
  %14 = alloca %struct.complex, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.complex, ptr %21, i32 -1
  store ptr %22, ptr %7, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %23, align 4, !tbaa !9
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = call i32 @lsame_(ptr noundef %24, ptr noundef @.str)
  store i32 %25, ptr %16, align 4, !tbaa !9
  %26 = load i32, ptr %16, align 4, !tbaa !9
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %34, label %28

28:                                               ; preds = %4
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call i32 @lsame_(ptr noundef %29, ptr noundef @.str.1)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %34, label %32

32:                                               ; preds = %28
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 -1, ptr %33, align 4, !tbaa !9
  br label %41

34:                                               ; preds = %28, %4
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = icmp slt i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %34
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 -2, ptr %39, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %38, %34
  br label %41

41:                                               ; preds = %40, %32
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %50

45:                                               ; preds = %41
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = sub nsw i32 0, %47
  store i32 %48, ptr %9, align 4, !tbaa !9
  %49 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %9, i32 noundef 6)
  store i32 1, ptr %20, align 4
  br label %246

50:                                               ; preds = %41
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  store i32 1, ptr %20, align 4
  br label %246

55:                                               ; preds = %50
  %56 = load i32, ptr %16, align 4, !tbaa !9
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %147

58:                                               ; preds = %55
  store i32 0, ptr %18, align 4, !tbaa !9
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = load i32, ptr %59, align 4, !tbaa !9
  store i32 %60, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %143, %58
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = load i32, ptr %9, align 4, !tbaa !9
  %64 = icmp sle i32 %62, %63
  br i1 %64, label %65, label %146

65:                                               ; preds = %61
  %66 = load i32, ptr %18, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %17, align 4, !tbaa !9
  %68 = load i32, ptr %15, align 4, !tbaa !9
  %69 = load i32, ptr %18, align 4, !tbaa !9
  %70 = add nsw i32 %69, %68
  store i32 %70, ptr %18, align 4, !tbaa !9
  %71 = load i32, ptr %15, align 4, !tbaa !9
  %72 = icmp sgt i32 %71, 1
  br i1 %72, label %73, label %82

73:                                               ; preds = %65
  %74 = load i32, ptr %15, align 4, !tbaa !9
  %75 = sub nsw i32 %74, 1
  store i32 %75, ptr %10, align 4, !tbaa !9
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.complex, ptr %76, i64 1
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i32, ptr %17, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %struct.complex, ptr %78, i64 %80
  call void @ctpsv_(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef %10, ptr noundef %77, ptr noundef %81, ptr noundef @c__1)
  br label %82

82:                                               ; preds = %73, %65
  %83 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %83, ptr %10, align 4, !tbaa !9
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds %struct.complex, ptr %84, i64 %86
  %88 = getelementptr inbounds %struct.complex, ptr %87, i32 0, i32 0
  %89 = load float, ptr %88, align 4, !tbaa !11
  store float %89, ptr %12, align 4, !tbaa !14
  %90 = load i32, ptr %15, align 4, !tbaa !9
  %91 = sub nsw i32 %90, 1
  store i32 %91, ptr %11, align 4, !tbaa !9
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %struct.complex, ptr %92, i64 %94
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load i32, ptr %17, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds %struct.complex, ptr %96, i64 %98
  call void @cdotc_(ptr noundef %14, ptr noundef %11, ptr noundef %95, ptr noundef @c__1, ptr noundef %99, ptr noundef @c__1)
  %100 = load float, ptr %12, align 4, !tbaa !14
  %101 = getelementptr inbounds %struct.complex, ptr %14, i32 0, i32 0
  %102 = load float, ptr %101, align 4, !tbaa !11
  %103 = fsub float %100, %102
  %104 = getelementptr inbounds %struct.complex, ptr %13, i32 0, i32 0
  store float %103, ptr %104, align 4, !tbaa !11
  %105 = getelementptr inbounds %struct.complex, ptr %14, i32 0, i32 1
  %106 = load float, ptr %105, align 4, !tbaa !15
  %107 = fneg float %106
  %108 = getelementptr inbounds %struct.complex, ptr %13, i32 0, i32 1
  store float %107, ptr %108, align 4, !tbaa !15
  %109 = getelementptr inbounds %struct.complex, ptr %13, i32 0, i32 0
  %110 = load float, ptr %109, align 4, !tbaa !11
  store float %110, ptr %19, align 4, !tbaa !14
  %111 = load float, ptr %19, align 4, !tbaa !14
  %112 = fcmp ole float %111, 0.000000e+00
  br i1 %112, label %113, label %126

113:                                              ; preds = %82
  %114 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %114, ptr %10, align 4, !tbaa !9
  %115 = load float, ptr %19, align 4, !tbaa !14
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load i32, ptr %10, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds %struct.complex, ptr %116, i64 %118
  %120 = getelementptr inbounds %struct.complex, ptr %119, i32 0, i32 0
  store float %115, ptr %120, align 4, !tbaa !11
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds %struct.complex, ptr %121, i64 %123
  %125 = getelementptr inbounds %struct.complex, ptr %124, i32 0, i32 1
  store float 0.000000e+00, ptr %125, align 4, !tbaa !15
  br label %242

126:                                              ; preds = %82
  %127 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %127, ptr %10, align 4, !tbaa !9
  %128 = load float, ptr %19, align 4, !tbaa !14
  %129 = fpext float %128 to double
  %130 = call double @sqrt(double noundef %129) #5
  %131 = fptrunc double %130 to float
  store float %131, ptr %12, align 4, !tbaa !14
  %132 = load float, ptr %12, align 4, !tbaa !14
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = load i32, ptr %10, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds %struct.complex, ptr %133, i64 %135
  %137 = getelementptr inbounds %struct.complex, ptr %136, i32 0, i32 0
  store float %132, ptr %137, align 4, !tbaa !11
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds %struct.complex, ptr %138, i64 %140
  %142 = getelementptr inbounds %struct.complex, ptr %141, i32 0, i32 1
  store float 0.000000e+00, ptr %142, align 4, !tbaa !15
  br label %143

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

146:                                              ; preds = %61
  br label %241

147:                                              ; preds = %55
  store i32 1, ptr %18, align 4, !tbaa !9
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = load i32, ptr %148, align 4, !tbaa !9
  store i32 %149, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %150

150:                                              ; preds = %237, %147
  %151 = load i32, ptr %15, align 4, !tbaa !9
  %152 = load i32, ptr %9, align 4, !tbaa !9
  %153 = icmp sle i32 %151, %152
  br i1 %153, label %154, label %240

154:                                              ; preds = %150
  %155 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %155, ptr %10, align 4, !tbaa !9
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = load i32, ptr %10, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds %struct.complex, ptr %156, i64 %158
  %160 = getelementptr inbounds %struct.complex, ptr %159, i32 0, i32 0
  %161 = load float, ptr %160, align 4, !tbaa !11
  store float %161, ptr %19, align 4, !tbaa !14
  %162 = load float, ptr %19, align 4, !tbaa !14
  %163 = fcmp ole float %162, 0.000000e+00
  br i1 %163, label %164, label %177

164:                                              ; preds = %154
  %165 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %165, ptr %10, align 4, !tbaa !9
  %166 = load float, ptr %19, align 4, !tbaa !14
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = load i32, ptr %10, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.complex, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.complex, ptr %170, i32 0, i32 0
  store float %166, ptr %171, align 4, !tbaa !11
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = load i32, ptr %10, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds %struct.complex, ptr %172, i64 %174
  %176 = getelementptr inbounds %struct.complex, ptr %175, i32 0, i32 1
  store float 0.000000e+00, ptr %176, align 4, !tbaa !15
  br label %242

177:                                              ; preds = %154
  %178 = load float, ptr %19, align 4, !tbaa !14
  %179 = fpext float %178 to double
  %180 = call double @sqrt(double noundef %179) #5
  %181 = fptrunc double %180 to float
  store float %181, ptr %19, align 4, !tbaa !14
  %182 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %182, ptr %10, align 4, !tbaa !9
  %183 = load float, ptr %19, align 4, !tbaa !14
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = load i32, ptr %10, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds %struct.complex, ptr %184, i64 %186
  %188 = getelementptr inbounds %struct.complex, ptr %187, i32 0, i32 0
  store float %183, ptr %188, align 4, !tbaa !11
  %189 = load ptr, ptr %7, align 8, !tbaa !5
  %190 = load i32, ptr %10, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds %struct.complex, ptr %189, i64 %191
  %193 = getelementptr inbounds %struct.complex, ptr %192, i32 0, i32 1
  store float 0.000000e+00, ptr %193, align 4, !tbaa !15
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = load i32, ptr %195, align 4, !tbaa !9
  %197 = icmp slt i32 %194, %196
  br i1 %197, label %198, label %236

198:                                              ; preds = %177
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = load i32, ptr %199, align 4, !tbaa !9
  %201 = load i32, ptr %15, align 4, !tbaa !9
  %202 = sub nsw i32 %200, %201
  store i32 %202, ptr %10, align 4, !tbaa !9
  %203 = load float, ptr %19, align 4, !tbaa !14
  %204 = fdiv float 1.000000e+00, %203
  store float %204, ptr %12, align 4, !tbaa !14
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = load i32, ptr %18, align 4, !tbaa !9
  %207 = add nsw i32 %206, 1
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds %struct.complex, ptr %205, i64 %208
  call void @csscal_(ptr noundef %10, ptr noundef %12, ptr noundef %209, ptr noundef @c__1)
  %210 = load ptr, ptr %6, align 8, !tbaa !5
  %211 = load i32, ptr %210, align 4, !tbaa !9
  %212 = load i32, ptr %15, align 4, !tbaa !9
  %213 = sub nsw i32 %211, %212
  store i32 %213, ptr %10, align 4, !tbaa !9
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = load i32, ptr %18, align 4, !tbaa !9
  %216 = add nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds %struct.complex, ptr %214, i64 %217
  %219 = load ptr, ptr %7, align 8, !tbaa !5
  %220 = load i32, ptr %18, align 4, !tbaa !9
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = load i32, ptr %221, align 4, !tbaa !9
  %223 = add nsw i32 %220, %222
  %224 = load i32, ptr %15, align 4, !tbaa !9
  %225 = sub nsw i32 %223, %224
  %226 = add nsw i32 %225, 1
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds %struct.complex, ptr %219, i64 %227
  call void @chpr_(ptr noundef @.str.6, ptr noundef %10, ptr noundef @c_b16, ptr noundef %218, ptr noundef @c__1, ptr noundef %228)
  %229 = load i32, ptr %18, align 4, !tbaa !9
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = load i32, ptr %230, align 4, !tbaa !9
  %232 = add nsw i32 %229, %231
  %233 = load i32, ptr %15, align 4, !tbaa !9
  %234 = sub nsw i32 %232, %233
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %18, align 4, !tbaa !9
  br label %236

236:                                              ; preds = %198, %177
  br label %237

237:                                              ; preds = %236
  %238 = load i32, ptr %15, align 4, !tbaa !9
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %15, align 4, !tbaa !9
  br label %150, !llvm.loop !18

240:                                              ; preds = %150
  br label %241

241:                                              ; preds = %240, %146
  br label %245

242:                                              ; preds = %164, %113
  %243 = load i32, ptr %15, align 4, !tbaa !9
  %244 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %243, ptr %244, align 4, !tbaa !9
  br label %245

245:                                              ; preds = %242, %241
  store i32 1, ptr %20, align 4
  br label %246

246:                                              ; preds = %245, %54, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cdotc_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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

declare void @chpr_(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 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 #4 = { 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 #5 = { nounwind }

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

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


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

%struct.complex = type { float, float }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@c_b16 = external hidden global float, align 4

; Function Attrs: nounwind uwtable
define dso_local void @cpptrf_(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca float, align 4
  %9 = alloca %struct.complex, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %10 = getelementptr inbounds i8, ptr %2, i64 -8
  store i32 0, ptr %3, align 4, !tbaa !5
  %11 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %12, label %14

12:                                               ; preds = %4
  %13 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not83 = icmp eq i32 %13, 0
  br i1 %.not83, label %.thread.sink.split, label %14

14:                                               ; preds = %12, %4
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = icmp slt i32 %15, 0
  br i1 %16, label %.thread.sink.split, label %17

17:                                               ; preds = %14
  %.pr = load i32, ptr %3, align 4, !tbaa !5
  %.not84 = icmp eq i32 %.pr, 0
  br i1 %.not84, label %21, label %.thread

.thread.sink.split:                               ; preds = %14, %12
  %.sink = phi i32 [ -1, %12 ], [ -2, %14 ]
  store i32 %.sink, ptr %3, align 4, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %17
  %18 = phi i32 [ %.pr, %17 ], [ %.sink, %.thread.sink.split ]
  %19 = sub nsw i32 0, %18
  store i32 %19, ptr %5, align 4, !tbaa !5
  %20 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %5, i32 noundef 6) #4
  br label %.loopexit

21:                                               ; preds = %17
  %22 = icmp eq i32 %15, 0
  br i1 %22, label %.loopexit, label %23

23:                                               ; preds = %21
  br i1 %.not, label %.lr.ph105, label %24

24:                                               ; preds = %23
  %.pre = load float, ptr %2, align 4, !tbaa !9
  store i32 1, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @cdotc_(ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef nonnull %2, ptr noundef nonnull @c__1, ptr noundef nonnull %2, ptr noundef nonnull @c__1)
  %25 = load float, ptr %9, align 4, !tbaa !9
  %26 = fsub float %.pre, %25
  %27 = fcmp ugt float %26, 0.000000e+00
  br i1 %27, label %28, label %._crit_edge

28:                                               ; preds = %24
  store i32 1, ptr %6, align 4, !tbaa !5
  %sqrtf87.peel = call float @sqrtf(float noundef %26) #5
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds %struct.complex, ptr %10, i64 %30
  store float %sqrtf87.peel, ptr %31, align 4, !tbaa !9
  %32 = getelementptr inbounds %struct.complex, ptr %10, i64 %30, i32 1
  store float 0.000000e+00, ptr %32, align 4, !tbaa !12
  %33 = zext nneg i32 %15 to i64
  %.not86.not.peel.not = icmp eq i32 %15, 1
  br i1 %.not86.not.peel.not, label %.loopexit, label %.lr.ph.peel.next

.lr.ph.peel.next:                                 ; preds = %28, %50
  %indvars.iv = phi i64 [ %indvars.iv.next, %50 ], [ 2, %28 ]
  %.0100 = phi i32 [ %35, %50 ], [ 1, %28 ]
  %34 = trunc nuw nsw i64 %indvars.iv to i32
  %35 = add nuw nsw i32 %.0100, %34
  %36 = add nuw nsw i32 %.0100, 1
  %37 = trunc i64 %indvars.iv to i32
  %38 = add i32 %37, -1
  store i32 %38, ptr %6, align 4, !tbaa !5
  %39 = zext nneg i32 %36 to i64
  %40 = getelementptr inbounds %struct.complex, ptr %10, i64 %39
  call void @ctpsv_(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, ptr noundef nonnull %6, ptr noundef nonnull %2, ptr noundef nonnull %40, ptr noundef nonnull @c__1) #4
  store i32 %35, ptr %6, align 4, !tbaa !5
  %41 = zext nneg i32 %35 to i64
  %42 = getelementptr inbounds %struct.complex, ptr %10, i64 %41
  %43 = load float, ptr %42, align 4, !tbaa !9
  store i32 %38, ptr %7, align 4, !tbaa !5
  %44 = getelementptr inbounds %struct.complex, ptr %10, i64 %39
  call void @cdotc_(ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef nonnull %44, ptr noundef nonnull @c__1, ptr noundef nonnull %44, ptr noundef nonnull @c__1)
  %45 = load float, ptr %9, align 4, !tbaa !9
  %46 = fsub float %43, %45
  %47 = fcmp ugt float %46, 0.000000e+00
  br i1 %47, label %50, label %.loopexit119

.loopexit119:                                     ; preds = %.lr.ph.peel.next
  %48 = trunc nuw nsw i64 %indvars.iv to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %24, %.loopexit119
  %.lcssa115 = phi i64 [ %41, %.loopexit119 ], [ 1, %24 ]
  %.lcssa113 = phi float [ %46, %.loopexit119 ], [ %26, %24 ]
  %.07399.lcssa.wide = phi i32 [ %48, %.loopexit119 ], [ 1, %24 ]
  %49 = getelementptr inbounds %struct.complex, ptr %10, i64 %.lcssa115
  store float %.lcssa113, ptr %49, align 4, !tbaa !9
  br label %.loopexit134

50:                                               ; preds = %.lr.ph.peel.next
  store i32 %35, ptr %6, align 4, !tbaa !5
  %sqrtf87 = call float @sqrtf(float noundef %46) #5
  %51 = load i32, ptr %6, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds %struct.complex, ptr %10, i64 %52
  store float %sqrtf87, ptr %53, align 4, !tbaa !9
  %54 = getelementptr inbounds %struct.complex, ptr %10, i64 %52, i32 1
  store float 0.000000e+00, ptr %54, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not86.not = icmp ult i64 %indvars.iv, %33
  br i1 %.not86.not, label %.lr.ph.peel.next, label %.loopexit, !llvm.loop !13

.lr.ph105:                                        ; preds = %23, %76
  %.174.neg104 = phi i32 [ %.174.neg, %76 ], [ -1, %23 ]
  %.1103 = phi i32 [ %.2, %76 ], [ 1, %23 ]
  %.174102 = phi i32 [ %77, %76 ], [ 1, %23 ]
  %55 = sext i32 %.1103 to i64
  %56 = getelementptr inbounds %struct.complex, ptr %10, i64 %55
  %57 = load float, ptr %56, align 4, !tbaa !9
  %58 = fcmp ugt float %57, 0.000000e+00
  br i1 %58, label %59, label %.loopexit134

59:                                               ; preds = %.lr.ph105
  %sqrtf = call float @sqrtf(float noundef %57) #5
  store i32 %.1103, ptr %6, align 4, !tbaa !5
  store float %sqrtf, ptr %56, align 4, !tbaa !9
  %60 = getelementptr inbounds %struct.complex, ptr %10, i64 %55, i32 1
  store float 0.000000e+00, ptr %60, align 4, !tbaa !12
  %61 = load i32, ptr %1, align 4, !tbaa !5
  %62 = icmp slt i32 %.174102, %61
  br i1 %62, label %63, label %76

63:                                               ; preds = %59
  %64 = sub nsw i32 %61, %.174102
  store i32 %64, ptr %6, align 4, !tbaa !5
  %65 = fdiv float 1.000000e+00, %sqrtf
  store float %65, ptr %8, align 4, !tbaa !16
  %66 = getelementptr i8, ptr %56, i64 8
  call void @csscal_(ptr noundef nonnull %6, ptr noundef nonnull %8, ptr noundef %66, ptr noundef nonnull @c__1) #4
  %67 = load i32, ptr %1, align 4, !tbaa !5
  %68 = sub nsw i32 %67, %.174102
  store i32 %68, ptr %6, align 4, !tbaa !5
  %69 = add i32 %.1103, %.174.neg104
  %70 = add i32 %69, %67
  %71 = sext i32 %70 to i64
  %gep = getelementptr %struct.complex, ptr %2, i64 %71
  call void @chpr_(ptr noundef nonnull @.str.6, ptr noundef nonnull %6, ptr noundef nonnull @c_b16, ptr noundef %66, ptr noundef nonnull @c__1, ptr noundef %gep) #4
  %72 = load i32, ptr %1, align 4, !tbaa !5
  %73 = add nsw i32 %.174.neg104, 1
  %74 = add i32 %73, %.1103
  %75 = add i32 %74, %72
  br label %76

76:                                               ; preds = %59, %63
  %.2 = phi i32 [ %75, %63 ], [ %.1103, %59 ]
  %77 = add nuw nsw i32 %.174102, 1
  %.174.neg = xor i32 %.174102, -1
  %.not85.not = icmp slt i32 %.174102, %15
  br i1 %.not85.not, label %.lr.ph105, label %.loopexit, !llvm.loop !17

.loopexit134:                                     ; preds = %.lr.ph105, %._crit_edge
  %.lcssa.sink = phi i64 [ %.lcssa115, %._crit_edge ], [ %55, %.lr.ph105 ]
  %.275 = phi i32 [ %.07399.lcssa.wide, %._crit_edge ], [ %.174102, %.lr.ph105 ]
  %78 = getelementptr inbounds %struct.complex, ptr %10, i64 %.lcssa.sink, i32 1
  store float 0.000000e+00, ptr %78, align 4, !tbaa !12
  store i32 %.275, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %50, %76, %28, %.loopexit134, %21, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret void
}

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cdotc_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

declare void @chpr_(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

declare float @sqrtf(float) local_unnamed_addr

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 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 #4 = { nounwind }
attributes #5 = { mustprogress nofree nounwind willreturn memory(write) "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" }

!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, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4}
!11 = !{!"float", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = distinct !{!13, !14, !15}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.peeled.count", i32 1}
!16 = !{!11, !11, i64 0}
!17 = distinct !{!17, !14}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass