; LLVM IR from niuyishuai/PDCABB :: LAPACK_BLAS/LAPACK (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 i64, align 8
@.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 i32 @cpptrf_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca float, align 4
  %14 = alloca %struct.complex, align 4
  %15 = alloca %struct.complex, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca float, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.complex, ptr %22, i32 -1
  store ptr %23, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %24, align 8, !tbaa !9
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call i64 @lsame_(ptr noundef %25, ptr noundef @.str)
  store i64 %26, ptr %20, align 8, !tbaa !9
  %27 = load i64, ptr %20, align 8, !tbaa !9
  %28 = icmp ne i64 %27, 0
  br i1 %28, label %35, label %29

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

33:                                               ; preds = %29
  %34 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 -1, ptr %34, align 8, !tbaa !9
  br label %42

35:                                               ; preds = %29, %4
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %38 = icmp slt i64 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %35
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 -2, ptr %40, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %39, %35
  br label %42

42:                                               ; preds = %41, %33
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = load i64, ptr %43, align 8, !tbaa !9
  %45 = icmp ne i64 %44, 0
  br i1 %45, label %46, label %51

46:                                               ; preds = %42
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = load i64, ptr %47, align 8, !tbaa !9
  %49 = sub nsw i64 0, %48
  store i64 %49, ptr %10, align 8, !tbaa !9
  %50 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %10)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %234

51:                                               ; preds = %42
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = load i64, ptr %52, align 8, !tbaa !9
  %54 = icmp eq i64 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %51
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %234

56:                                               ; preds = %51
  %57 = load i64, ptr %20, align 8, !tbaa !9
  %58 = icmp ne i64 %57, 0
  br i1 %58, label %59, label %141

59:                                               ; preds = %56
  store i64 0, ptr %18, align 8, !tbaa !9
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load i64, ptr %60, align 8, !tbaa !9
  store i64 %61, ptr %10, align 8, !tbaa !9
  store i64 1, ptr %16, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %137, %59
  %63 = load i64, ptr %16, align 8, !tbaa !9
  %64 = load i64, ptr %10, align 8, !tbaa !9
  %65 = icmp sle i64 %63, %64
  br i1 %65, label %66, label %140

66:                                               ; preds = %62
  %67 = load i64, ptr %18, align 8, !tbaa !9
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %17, align 8, !tbaa !9
  %69 = load i64, ptr %16, align 8, !tbaa !9
  %70 = load i64, ptr %18, align 8, !tbaa !9
  %71 = add nsw i64 %70, %69
  store i64 %71, ptr %18, align 8, !tbaa !9
  %72 = load i64, ptr %16, align 8, !tbaa !9
  %73 = icmp sgt i64 %72, 1
  br i1 %73, label %74, label %83

74:                                               ; preds = %66
  %75 = load i64, ptr %16, align 8, !tbaa !9
  %76 = sub nsw i64 %75, 1
  store i64 %76, ptr %11, align 8, !tbaa !9
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.complex, ptr %77, i64 1
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load i64, ptr %17, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.complex, ptr %79, i64 %80
  %82 = call i32 @f2c_ctpsv(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef %11, ptr noundef %78, ptr noundef %81, ptr noundef @c__1)
  br label %83

83:                                               ; preds = %74, %66
  %84 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %84, ptr %11, align 8, !tbaa !9
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load i64, ptr %11, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.complex, ptr %85, 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 %13, align 4, !tbaa !14
  %90 = load i64, ptr %16, align 8, !tbaa !9
  %91 = sub nsw i64 %90, 1
  store i64 %91, ptr %12, align 8, !tbaa !9
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i64, ptr %17, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.complex, ptr %92, i64 %93
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load i64, ptr %17, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.complex, ptr %95, i64 %96
  call void @f2c_cdotc(ptr noundef %15, ptr noundef %12, ptr noundef %94, ptr noundef @c__1, ptr noundef %97, ptr noundef @c__1)
  %98 = load float, ptr %13, align 4, !tbaa !14
  %99 = getelementptr inbounds %struct.complex, ptr %15, i32 0, i32 0
  %100 = load float, ptr %99, align 4, !tbaa !11
  %101 = fsub float %98, %100
  %102 = getelementptr inbounds %struct.complex, ptr %14, i32 0, i32 0
  store float %101, ptr %102, align 4, !tbaa !11
  %103 = getelementptr inbounds %struct.complex, ptr %15, i32 0, i32 1
  %104 = load float, ptr %103, align 4, !tbaa !15
  %105 = fneg float %104
  %106 = getelementptr inbounds %struct.complex, ptr %14, i32 0, i32 1
  store float %105, ptr %106, align 4, !tbaa !15
  %107 = getelementptr inbounds %struct.complex, ptr %14, i32 0, i32 0
  %108 = load float, ptr %107, align 4, !tbaa !11
  store float %108, ptr %19, align 4, !tbaa !14
  %109 = load float, ptr %19, align 4, !tbaa !14
  %110 = fcmp ole float %109, 0.000000e+00
  br i1 %110, label %111, label %122

111:                                              ; preds = %83
  %112 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %112, ptr %11, align 8, !tbaa !9
  %113 = load float, ptr %19, align 4, !tbaa !14
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = load i64, ptr %11, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.complex, ptr %114, i64 %115
  %117 = getelementptr inbounds %struct.complex, ptr %116, i32 0, i32 0
  store float %113, ptr %117, align 4, !tbaa !11
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = load i64, ptr %11, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct.complex, ptr %118, i64 %119
  %121 = getelementptr inbounds %struct.complex, ptr %120, i32 0, i32 1
  store float 0.000000e+00, ptr %121, align 4, !tbaa !15
  br label %230

122:                                              ; preds = %83
  %123 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %123, ptr %11, align 8, !tbaa !9
  %124 = load float, ptr %19, align 4, !tbaa !14
  %125 = fpext float %124 to double
  %126 = call double @sqrt(double noundef %125) #4
  %127 = fptrunc double %126 to float
  store float %127, ptr %13, align 4, !tbaa !14
  %128 = load float, ptr %13, align 4, !tbaa !14
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load i64, ptr %11, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.complex, ptr %129, i64 %130
  %132 = getelementptr inbounds %struct.complex, ptr %131, i32 0, i32 0
  store float %128, ptr %132, align 4, !tbaa !11
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load i64, ptr %11, align 8, !tbaa !9
  %135 = getelementptr inbounds %struct.complex, ptr %133, i64 %134
  %136 = getelementptr inbounds %struct.complex, ptr %135, i32 0, i32 1
  store float 0.000000e+00, ptr %136, align 4, !tbaa !15
  br label %137

137:                                              ; preds = %122
  %138 = load i64, ptr %16, align 8, !tbaa !9
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %16, align 8, !tbaa !9
  br label %62, !llvm.loop !16

140:                                              ; preds = %62
  br label %229

141:                                              ; preds = %56
  store i64 1, ptr %18, align 8, !tbaa !9
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = load i64, ptr %142, align 8, !tbaa !9
  store i64 %143, ptr %10, align 8, !tbaa !9
  store i64 1, ptr %16, align 8, !tbaa !9
  br label %144

144:                                              ; preds = %225, %141
  %145 = load i64, ptr %16, align 8, !tbaa !9
  %146 = load i64, ptr %10, align 8, !tbaa !9
  %147 = icmp sle i64 %145, %146
  br i1 %147, label %148, label %228

148:                                              ; preds = %144
  %149 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %149, ptr %11, align 8, !tbaa !9
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = load i64, ptr %11, align 8, !tbaa !9
  %152 = getelementptr inbounds %struct.complex, ptr %150, i64 %151
  %153 = getelementptr inbounds %struct.complex, ptr %152, i32 0, i32 0
  %154 = load float, ptr %153, align 4, !tbaa !11
  store float %154, ptr %19, align 4, !tbaa !14
  %155 = load float, ptr %19, align 4, !tbaa !14
  %156 = fcmp ole float %155, 0.000000e+00
  br i1 %156, label %157, label %168

157:                                              ; preds = %148
  %158 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %158, ptr %11, align 8, !tbaa !9
  %159 = load float, ptr %19, align 4, !tbaa !14
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load i64, ptr %11, align 8, !tbaa !9
  %162 = getelementptr inbounds %struct.complex, ptr %160, i64 %161
  %163 = getelementptr inbounds %struct.complex, ptr %162, i32 0, i32 0
  store float %159, ptr %163, align 4, !tbaa !11
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  %165 = load i64, ptr %11, align 8, !tbaa !9
  %166 = getelementptr inbounds %struct.complex, ptr %164, i64 %165
  %167 = getelementptr inbounds %struct.complex, ptr %166, i32 0, i32 1
  store float 0.000000e+00, ptr %167, align 4, !tbaa !15
  br label %230

168:                                              ; preds = %148
  %169 = load float, ptr %19, align 4, !tbaa !14
  %170 = fpext float %169 to double
  %171 = call double @sqrt(double noundef %170) #4
  %172 = fptrunc double %171 to float
  store float %172, ptr %19, align 4, !tbaa !14
  %173 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %173, ptr %11, align 8, !tbaa !9
  %174 = load float, ptr %19, align 4, !tbaa !14
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = load i64, ptr %11, align 8, !tbaa !9
  %177 = getelementptr inbounds %struct.complex, ptr %175, i64 %176
  %178 = getelementptr inbounds %struct.complex, ptr %177, i32 0, i32 0
  store float %174, ptr %178, align 4, !tbaa !11
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = load i64, ptr %11, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.complex, ptr %179, i64 %180
  %182 = getelementptr inbounds %struct.complex, ptr %181, i32 0, i32 1
  store float 0.000000e+00, ptr %182, align 4, !tbaa !15
  %183 = load i64, ptr %16, align 8, !tbaa !9
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = load i64, ptr %184, align 8, !tbaa !9
  %186 = icmp slt i64 %183, %185
  br i1 %186, label %187, label %224

187:                                              ; preds = %168
  %188 = load ptr, ptr %7, align 8, !tbaa !5
  %189 = load i64, ptr %188, align 8, !tbaa !9
  %190 = load i64, ptr %16, align 8, !tbaa !9
  %191 = sub nsw i64 %189, %190
  store i64 %191, ptr %11, align 8, !tbaa !9
  %192 = load float, ptr %19, align 4, !tbaa !14
  %193 = fdiv float 1.000000e+00, %192
  store float %193, ptr %13, align 4, !tbaa !14
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  %195 = load i64, ptr %18, align 8, !tbaa !9
  %196 = add nsw i64 %195, 1
  %197 = getelementptr inbounds %struct.complex, ptr %194, i64 %196
  %198 = call i32 @f2c_csscal(ptr noundef %11, ptr noundef %13, ptr noundef %197, ptr noundef @c__1)
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = load i64, ptr %199, align 8, !tbaa !9
  %201 = load i64, ptr %16, align 8, !tbaa !9
  %202 = sub nsw i64 %200, %201
  store i64 %202, ptr %11, align 8, !tbaa !9
  %203 = load ptr, ptr %8, align 8, !tbaa !5
  %204 = load i64, ptr %18, align 8, !tbaa !9
  %205 = add nsw i64 %204, 1
  %206 = getelementptr inbounds %struct.complex, ptr %203, i64 %205
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = load i64, ptr %18, align 8, !tbaa !9
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = load i64, ptr %209, align 8, !tbaa !9
  %211 = add nsw i64 %208, %210
  %212 = load i64, ptr %16, align 8, !tbaa !9
  %213 = sub nsw i64 %211, %212
  %214 = add nsw i64 %213, 1
  %215 = getelementptr inbounds %struct.complex, ptr %207, i64 %214
  %216 = call i32 @f2c_chpr(ptr noundef @.str.6, ptr noundef %11, ptr noundef @c_b16, ptr noundef %206, ptr noundef @c__1, ptr noundef %215)
  %217 = load i64, ptr %18, align 8, !tbaa !9
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = load i64, ptr %218, align 8, !tbaa !9
  %220 = add nsw i64 %217, %219
  %221 = load i64, ptr %16, align 8, !tbaa !9
  %222 = sub nsw i64 %220, %221
  %223 = add nsw i64 %222, 1
  store i64 %223, ptr %18, align 8, !tbaa !9
  br label %224

224:                                              ; preds = %187, %168
  br label %225

225:                                              ; preds = %224
  %226 = load i64, ptr %16, align 8, !tbaa !9
  %227 = add nsw i64 %226, 1
  store i64 %227, ptr %16, align 8, !tbaa !9
  br label %144, !llvm.loop !18

228:                                              ; preds = %144
  br label %229

229:                                              ; preds = %228, %140
  br label %233

230:                                              ; preds = %157, %111
  %231 = load i64, ptr %16, align 8, !tbaa !9
  %232 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %231, ptr %232, align 8, !tbaa !9
  br label %233

233:                                              ; preds = %230, %229
  store i32 0, ptr %5, align 4
  store i32 1, ptr %21, align 4
  br label %234

234:                                              ; preds = %233, %55, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %235 = load i32, ptr %5, align 4
  ret i32 %235
}

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

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

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

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

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

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

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

declare i32 @f2c_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 = { 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 #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !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 i64, align 8
@.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 noundef i32 @cpptrf_(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca float, align 4
  %9 = alloca %struct.complex, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %10 = getelementptr inbounds i8, ptr %2, i64 -8
  store i64 0, ptr %3, align 8, !tbaa !5
  %11 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #3
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %12, label %14

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

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

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

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

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

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

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

24:                                               ; preds = %23
  %.pre = load float, ptr %2, align 4, !tbaa !9
  store i64 1, ptr %6, align 8, !tbaa !5
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @f2c_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) #3
  %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 %.loopexit113

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

.lr.ph.peel.next:                                 ; preds = %28, %43
  %.07499 = phi i64 [ %32, %43 ], [ 1, %28 ]
  %.07598 = phi i64 [ %47, %43 ], [ 2, %28 ]
  %32 = add nuw nsw i64 %.07499, %.07598
  %33 = add nsw i64 %.07598, -1
  store i64 %33, ptr %6, align 8, !tbaa !5
  %34 = getelementptr %struct.complex, ptr %2, i64 %.07499
  %35 = call i32 @f2c_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 %34, ptr noundef nonnull @c__1) #3
  store i64 %32, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.complex, ptr %10, i64 %32
  %37 = load float, ptr %36, align 4, !tbaa !9
  store i64 %33, ptr %7, align 8, !tbaa !5
  %38 = getelementptr %struct.complex, ptr %2, i64 %.07499
  call void @f2c_cdotc(ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef %38, ptr noundef nonnull @c__1, ptr noundef %38, ptr noundef nonnull @c__1) #3
  %39 = load float, ptr %9, align 4, !tbaa !9
  %40 = fsub float %37, %39
  %41 = fcmp ugt float %40, 0.000000e+00
  br i1 %41, label %43, label %.loopexit113

.loopexit113:                                     ; preds = %.lr.ph.peel.next, %24
  %.lcssa110 = phi float [ %26, %24 ], [ %40, %.lr.ph.peel.next ]
  %.07598.lcssa = phi i64 [ 1, %24 ], [ %.07598, %.lr.ph.peel.next ]
  %.lcssa = phi i64 [ 1, %24 ], [ %32, %.lr.ph.peel.next ]
  %42 = getelementptr inbounds %struct.complex, ptr %10, i64 %.lcssa
  store float %.lcssa110, ptr %42, align 4, !tbaa !9
  br label %.loopexit125

43:                                               ; preds = %.lr.ph.peel.next
  store i64 %32, ptr %6, align 8, !tbaa !5
  %sqrtf88 = call float @sqrtf(float noundef %40) #4
  %44 = load i64, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.complex, ptr %10, i64 %44
  store float %sqrtf88, ptr %45, align 4, !tbaa !9
  %46 = getelementptr inbounds %struct.complex, ptr %10, i64 %44, i32 1
  store float 0.000000e+00, ptr %46, align 4, !tbaa !12
  %47 = add nuw nsw i64 %.07598, 1
  %.not87.not = icmp slt i64 %.07598, %15
  br i1 %.not87.not, label %.lr.ph.peel.next, label %.loopexit, !llvm.loop !13

.lr.ph104:                                        ; preds = %23, %69
  %.176.neg103 = phi i64 [ %.176.neg, %69 ], [ -1, %23 ]
  %.1102 = phi i64 [ %.2, %69 ], [ 1, %23 ]
  %.176101 = phi i64 [ %70, %69 ], [ 1, %23 ]
  %48 = getelementptr inbounds %struct.complex, ptr %10, i64 %.1102
  %49 = load float, ptr %48, align 4, !tbaa !9
  %50 = fcmp ugt float %49, 0.000000e+00
  br i1 %50, label %51, label %.loopexit125

51:                                               ; preds = %.lr.ph104
  %sqrtf = call float @sqrtf(float noundef %49) #4
  store i64 %.1102, ptr %6, align 8, !tbaa !5
  store float %sqrtf, ptr %48, align 4, !tbaa !9
  %52 = getelementptr inbounds %struct.complex, ptr %10, i64 %.1102, i32 1
  store float 0.000000e+00, ptr %52, align 4, !tbaa !12
  %53 = load i64, ptr %1, align 8, !tbaa !5
  %54 = icmp slt i64 %.176101, %53
  br i1 %54, label %55, label %69

55:                                               ; preds = %51
  %56 = sub nsw i64 %53, %.176101
  store i64 %56, ptr %6, align 8, !tbaa !5
  %57 = fdiv float 1.000000e+00, %sqrtf
  store float %57, ptr %8, align 4, !tbaa !16
  %58 = getelementptr %struct.complex, ptr %2, i64 %.1102
  %59 = call i32 @f2c_csscal(ptr noundef nonnull %6, ptr noundef nonnull %8, ptr noundef %58, ptr noundef nonnull @c__1) #3
  %60 = load i64, ptr %1, align 8, !tbaa !5
  %61 = sub nsw i64 %60, %.176101
  store i64 %61, ptr %6, align 8, !tbaa !5
  %62 = getelementptr %struct.complex, ptr %58, i64 %.176.neg103
  %63 = getelementptr %struct.complex, ptr %62, i64 %60
  %64 = call i32 @f2c_chpr(ptr noundef nonnull @.str.6, ptr noundef nonnull %6, ptr noundef nonnull @c_b16, ptr noundef %58, ptr noundef nonnull @c__1, ptr noundef %63) #3
  %65 = load i64, ptr %1, align 8, !tbaa !5
  %66 = add nsw i64 %.176.neg103, 1
  %67 = add i64 %66, %.1102
  %68 = add i64 %67, %65
  br label %69

69:                                               ; preds = %51, %55
  %.2 = phi i64 [ %68, %55 ], [ %.1102, %51 ]
  %70 = add nuw nsw i64 %.176101, 1
  %.176.neg = xor i64 %.176101, -1
  %.not86.not = icmp slt i64 %.176101, %15
  br i1 %.not86.not, label %.lr.ph104, label %.loopexit, !llvm.loop !17

.loopexit125:                                     ; preds = %.lr.ph104, %.loopexit113
  %.1102.lcssa.sink = phi i64 [ %.lcssa, %.loopexit113 ], [ %.1102, %.lr.ph104 ]
  %.277 = phi i64 [ %.07598.lcssa, %.loopexit113 ], [ %.176101, %.lr.ph104 ]
  %71 = getelementptr inbounds %struct.complex, ptr %10, i64 %.1102.lcssa.sink, i32 1
  store float 0.000000e+00, ptr %71, align 4, !tbaa !12
  store i64 %.277, ptr %3, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %43, %69, %28, %.loopexit125, %21, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i32 0
}

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

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

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

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

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

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

declare i32 @f2c_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 = { nounwind }
attributes #4 = { 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 = !{!"long", !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: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass