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

; 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.doublecomplex = type { double, double }

@.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 double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @zpptrf_(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 double, align 8
  %13 = alloca %struct.doublecomplex, align 8
  %14 = alloca %struct.doublecomplex, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %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 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 16, 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 8, ptr %19) #5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.doublecomplex, 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 %242

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

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

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 = %141, %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 %144

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.doublecomplex, 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.doublecomplex, ptr %78, i64 %80
  call void @ztpsv_(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.doublecomplex, ptr %84, i64 %86
  %88 = getelementptr inbounds %struct.doublecomplex, ptr %87, i32 0, i32 0
  %89 = load double, ptr %88, align 8, !tbaa !11
  store double %89, ptr %12, align 8, !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.doublecomplex, 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.doublecomplex, ptr %96, i64 %98
  call void @zdotc_(ptr noundef %14, ptr noundef %11, ptr noundef %95, ptr noundef @c__1, ptr noundef %99, ptr noundef @c__1)
  %100 = load double, ptr %12, align 8, !tbaa !14
  %101 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 0
  %102 = load double, ptr %101, align 8, !tbaa !11
  %103 = fsub double %100, %102
  %104 = getelementptr inbounds %struct.doublecomplex, ptr %13, i32 0, i32 0
  store double %103, ptr %104, align 8, !tbaa !11
  %105 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 1
  %106 = load double, ptr %105, align 8, !tbaa !15
  %107 = fneg double %106
  %108 = getelementptr inbounds %struct.doublecomplex, ptr %13, i32 0, i32 1
  store double %107, ptr %108, align 8, !tbaa !15
  %109 = getelementptr inbounds %struct.doublecomplex, ptr %13, i32 0, i32 0
  %110 = load double, ptr %109, align 8, !tbaa !11
  store double %110, ptr %19, align 8, !tbaa !14
  %111 = load double, ptr %19, align 8, !tbaa !14
  %112 = fcmp ole double %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 double, ptr %19, align 8, !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.doublecomplex, ptr %116, i64 %118
  %120 = getelementptr inbounds %struct.doublecomplex, ptr %119, i32 0, i32 0
  store double %115, ptr %120, align 8, !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.doublecomplex, ptr %121, i64 %123
  %125 = getelementptr inbounds %struct.doublecomplex, ptr %124, i32 0, i32 1
  store double 0.000000e+00, ptr %125, align 8, !tbaa !15
  br label %238

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

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

144:                                              ; preds = %61
  br label %237

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

148:                                              ; preds = %233, %145
  %149 = load i32, ptr %15, align 4, !tbaa !9
  %150 = load i32, ptr %9, align 4, !tbaa !9
  %151 = icmp sle i32 %149, %150
  br i1 %151, label %152, label %236

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

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

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

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

232:                                              ; preds = %194, %175
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %15, align 4, !tbaa !9
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %15, align 4, !tbaa !9
  br label %148, !llvm.loop !18

236:                                              ; preds = %148
  br label %237

237:                                              ; preds = %236, %144
  br label %241

238:                                              ; preds = %162, %113
  %239 = load i32, ptr %15, align 4, !tbaa !9
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %239, ptr %240, align 4, !tbaa !9
  br label %241

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

242:                                              ; preds = %241, %54, %45
  call void @llvm.lifetime.end.p0(i64 8, 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 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 @ztpsv_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

declare void @zhpr_(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"="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 #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 8}
!13 = !{!"double", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 8}
!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.doublecomplex = type { double, double }

@.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 double, align 8

; Function Attrs: nounwind uwtable
define dso_local void @zpptrf_(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 double, align 8
  %9 = alloca %struct.doublecomplex, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %10 = getelementptr inbounds i8, ptr %2, i64 -16
  store i32 0, ptr %3, align 4, !tbaa !5
  %11 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #5
  %.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) #5
  %.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) #5
  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.ph103, label %24

24:                                               ; preds = %23
  %.pre = load double, ptr %2, align 8, !tbaa !9
  store i32 1, ptr %6, align 4, !tbaa !5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @zdotc_(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 double, ptr %9, align 8, !tbaa !9
  %26 = fsub double %.pre, %25
  %27 = fcmp ugt double %26, 0.000000e+00
  br i1 %27, label %28, label %._crit_edge

28:                                               ; preds = %24
  store i32 1, ptr %6, align 4, !tbaa !5
  %29 = call double @sqrt(double noundef %26) #5
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %31
  store double %29, ptr %32, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %31, i32 1
  store double 0.000000e+00, ptr %33, align 8, !tbaa !12
  %34 = 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 ]
  %.098 = phi i32 [ %36, %50 ], [ 1, %28 ]
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  %36 = add nuw nsw i32 %.098, %35
  %37 = add nuw nsw i32 %.098, 1
  %38 = trunc i64 %indvars.iv to i32
  %39 = add i32 %38, -1
  store i32 %39, ptr %6, align 4, !tbaa !5
  %40 = zext nneg i32 %37 to i64
  %41 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %40
  call void @ztpsv_(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 %41, ptr noundef nonnull @c__1) #5
  store i32 %36, ptr %6, align 4, !tbaa !5
  %42 = zext nneg i32 %36 to i64
  %43 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %42
  %44 = load double, ptr %43, align 8, !tbaa !9
  store i32 %39, ptr %7, align 4, !tbaa !5
  %45 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %40
  call void @zdotc_(ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef nonnull %45, ptr noundef nonnull @c__1, ptr noundef nonnull %45, ptr noundef nonnull @c__1)
  %46 = load double, ptr %9, align 8, !tbaa !9
  %47 = fsub double %44, %46
  %48 = fcmp ugt double %47, 0.000000e+00
  br i1 %48, label %50, label %.loopexit119

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

._crit_edge:                                      ; preds = %24, %.loopexit119
  %.lcssa115 = phi i64 [ %42, %.loopexit119 ], [ 1, %24 ]
  %.lcssa113 = phi ptr [ %43, %.loopexit119 ], [ %2, %24 ]
  %.lcssa111 = phi double [ %47, %.loopexit119 ], [ %26, %24 ]
  %.07397.lcssa.wide = phi i32 [ %49, %.loopexit119 ], [ 1, %24 ]
  store double %.lcssa111, ptr %.lcssa113, align 8, !tbaa !9
  br label %.loopexit136

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

.lr.ph103:                                        ; preds = %23, %78
  %.174.neg102 = phi i32 [ %.174.neg, %78 ], [ -1, %23 ]
  %.1101 = phi i32 [ %.2, %78 ], [ 1, %23 ]
  %.174100 = phi i32 [ %79, %78 ], [ 1, %23 ]
  %56 = sext i32 %.1101 to i64
  %57 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !9
  %59 = fcmp ugt double %58, 0.000000e+00
  br i1 %59, label %60, label %.loopexit136

60:                                               ; preds = %.lr.ph103
  %61 = call double @sqrt(double noundef %58) #5
  store i32 %.1101, ptr %6, align 4, !tbaa !5
  store double %61, ptr %57, align 8, !tbaa !9
  %62 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %56, i32 1
  store double 0.000000e+00, ptr %62, align 8, !tbaa !12
  %63 = load i32, ptr %1, align 4, !tbaa !5
  %64 = icmp slt i32 %.174100, %63
  br i1 %64, label %65, label %78

65:                                               ; preds = %60
  %66 = sub nsw i32 %63, %.174100
  store i32 %66, ptr %6, align 4, !tbaa !5
  %67 = fdiv double 1.000000e+00, %61
  store double %67, ptr %8, align 8, !tbaa !16
  %68 = getelementptr i8, ptr %57, i64 16
  call void @zdscal_(ptr noundef nonnull %6, ptr noundef nonnull %8, ptr noundef %68, ptr noundef nonnull @c__1) #5
  %69 = load i32, ptr %1, align 4, !tbaa !5
  %70 = sub nsw i32 %69, %.174100
  store i32 %70, ptr %6, align 4, !tbaa !5
  %71 = add i32 %.1101, %.174.neg102
  %72 = add i32 %71, %69
  %73 = sext i32 %72 to i64
  %gep = getelementptr %struct.doublecomplex, ptr %2, i64 %73
  call void @zhpr_(ptr noundef nonnull @.str.6, ptr noundef nonnull %6, ptr noundef nonnull @c_b16, ptr noundef %68, ptr noundef nonnull @c__1, ptr noundef %gep) #5
  %74 = load i32, ptr %1, align 4, !tbaa !5
  %75 = add nsw i32 %.174.neg102, 1
  %76 = add i32 %75, %.1101
  %77 = add i32 %76, %74
  br label %78

78:                                               ; preds = %60, %65
  %.2 = phi i32 [ %77, %65 ], [ %.1101, %60 ]
  %79 = add nuw nsw i32 %.174100, 1
  %.174.neg = xor i32 %.174100, -1
  %.not85.not = icmp slt i32 %.174100, %15
  br i1 %.not85.not, label %.lr.ph103, label %.loopexit, !llvm.loop !17

.loopexit136:                                     ; preds = %.lr.ph103, %._crit_edge
  %.lcssa.sink = phi i64 [ %.lcssa115, %._crit_edge ], [ %56, %.lr.ph103 ]
  %.275 = phi i32 [ %.07397.lcssa.wide, %._crit_edge ], [ %.174100, %.lr.ph103 ]
  %80 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %.lcssa.sink, i32 1
  store double 0.000000e+00, ptr %80, align 8, !tbaa !12
  store i32 %.275, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %50, %78, %28, %.loopexit136, %21, %.thread
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  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 @ztpsv_(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 @zdotc_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #4

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

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

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"="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 #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" }
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 = !{!"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 8}
!11 = !{!"double", !7, i64 0}
!12 = !{!10, !11, i64 8}
!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