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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [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 [10 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 @spptrf_(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 float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = 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) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds float, ptr %18, i32 -1
  store ptr %19, ptr %7, align 8, !tbaa !5
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %20, align 4, !tbaa !9
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call i32 @lsame_(ptr noundef %21, ptr noundef @.str)
  store i32 %22, ptr %13, align 4, !tbaa !9
  %23 = load i32, ptr %13, align 4, !tbaa !9
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %31, label %25

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

29:                                               ; preds = %25
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 -1, ptr %30, align 4, !tbaa !9
  br label %38

31:                                               ; preds = %25, %4
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i32, ptr %32, align 4, !tbaa !9
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %31
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 -2, ptr %36, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %35, %31
  br label %38

38:                                               ; preds = %37, %29
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %38
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = sub nsw i32 0, %44
  store i32 %45, ptr %9, align 4, !tbaa !9
  %46 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %9, i32 noundef 6)
  store i32 1, ptr %17, align 4
  br label %201

47:                                               ; preds = %38
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %47
  store i32 1, ptr %17, align 4
  br label %201

52:                                               ; preds = %47
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %118

55:                                               ; preds = %52
  store i32 0, ptr %15, align 4, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load i32, ptr %56, align 4, !tbaa !9
  store i32 %57, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %114, %55
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %62, label %117

62:                                               ; preds = %58
  %63 = load i32, ptr %15, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %14, align 4, !tbaa !9
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = load i32, ptr %15, align 4, !tbaa !9
  %67 = add nsw i32 %66, %65
  store i32 %67, ptr %15, align 4, !tbaa !9
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = icmp sgt i32 %68, 1
  br i1 %69, label %70, label %79

70:                                               ; preds = %62
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = sub nsw i32 %71, 1
  store i32 %72, ptr %10, align 4, !tbaa !9
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds float, ptr %73, i64 1
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load i32, ptr %14, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds float, ptr %75, i64 %77
  call void @stpsv_(ptr noundef @.str.3, ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef %10, ptr noundef %74, ptr noundef %78, ptr noundef @c__1)
  br label %79

79:                                               ; preds = %70, %62
  %80 = load i32, ptr %12, align 4, !tbaa !9
  %81 = sub nsw i32 %80, 1
  store i32 %81, ptr %10, align 4, !tbaa !9
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load i32, ptr %15, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds float, ptr %82, i64 %84
  %86 = load float, ptr %85, align 4, !tbaa !11
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %14, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds float, ptr %87, i64 %89
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds float, ptr %91, i64 %93
  %95 = call float @sdot_(ptr noundef %10, ptr noundef %90, ptr noundef @c__1, ptr noundef %94, ptr noundef @c__1)
  %96 = fsub float %86, %95
  store float %96, ptr %16, align 4, !tbaa !11
  %97 = load float, ptr %16, align 4, !tbaa !11
  %98 = fcmp ole float %97, 0.000000e+00
  br i1 %98, label %99, label %105

99:                                               ; preds = %79
  %100 = load float, ptr %16, align 4, !tbaa !11
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = load i32, ptr %15, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds float, ptr %101, i64 %103
  store float %100, ptr %104, align 4, !tbaa !11
  br label %197

105:                                              ; preds = %79
  %106 = load float, ptr %16, align 4, !tbaa !11
  %107 = fpext float %106 to double
  %108 = call double @sqrt(double noundef %107) #4
  %109 = fptrunc double %108 to float
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = load i32, ptr %15, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds float, ptr %110, i64 %112
  store float %109, ptr %113, align 4, !tbaa !11
  br label %114

114:                                              ; preds = %105
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %12, align 4, !tbaa !9
  br label %58, !llvm.loop !13

117:                                              ; preds = %58
  br label %196

118:                                              ; preds = %52
  store i32 1, ptr %15, align 4, !tbaa !9
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = load i32, ptr %119, align 4, !tbaa !9
  store i32 %120, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %192, %118
  %122 = load i32, ptr %12, align 4, !tbaa !9
  %123 = load i32, ptr %9, align 4, !tbaa !9
  %124 = icmp sle i32 %122, %123
  br i1 %124, label %125, label %195

125:                                              ; preds = %121
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds float, ptr %126, i64 %128
  %130 = load float, ptr %129, align 4, !tbaa !11
  store float %130, ptr %16, align 4, !tbaa !11
  %131 = load float, ptr %16, align 4, !tbaa !11
  %132 = fcmp ole float %131, 0.000000e+00
  br i1 %132, label %133, label %139

133:                                              ; preds = %125
  %134 = load float, ptr %16, align 4, !tbaa !11
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = load i32, ptr %15, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds float, ptr %135, i64 %137
  store float %134, ptr %138, align 4, !tbaa !11
  br label %197

139:                                              ; preds = %125
  %140 = load float, ptr %16, align 4, !tbaa !11
  %141 = fpext float %140 to double
  %142 = call double @sqrt(double noundef %141) #4
  %143 = fptrunc double %142 to float
  store float %143, ptr %16, align 4, !tbaa !11
  %144 = load float, ptr %16, align 4, !tbaa !11
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = load i32, ptr %15, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds float, ptr %145, i64 %147
  store float %144, ptr %148, align 4, !tbaa !11
  %149 = load i32, ptr %12, align 4, !tbaa !9
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = icmp slt i32 %149, %151
  br i1 %152, label %153, label %191

153:                                              ; preds = %139
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = load i32, ptr %154, align 4, !tbaa !9
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = sub nsw i32 %155, %156
  store i32 %157, ptr %10, align 4, !tbaa !9
  %158 = load float, ptr %16, align 4, !tbaa !11
  %159 = fdiv float 1.000000e+00, %158
  store float %159, ptr %11, align 4, !tbaa !11
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = load i32, ptr %15, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds float, ptr %160, i64 %163
  call void @sscal_(ptr noundef %10, ptr noundef %11, ptr noundef %164, ptr noundef @c__1)
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = load i32, ptr %165, align 4, !tbaa !9
  %167 = load i32, ptr %12, align 4, !tbaa !9
  %168 = sub nsw i32 %166, %167
  store i32 %168, ptr %10, align 4, !tbaa !9
  %169 = load ptr, ptr %7, align 8, !tbaa !5
  %170 = load i32, ptr %15, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds float, ptr %169, i64 %172
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = load i32, ptr %15, align 4, !tbaa !9
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = add nsw i32 %175, %177
  %179 = load i32, ptr %12, align 4, !tbaa !9
  %180 = sub nsw i32 %178, %179
  %181 = add nsw i32 %180, 1
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds float, ptr %174, i64 %182
  call void @sspr_(ptr noundef @.str.6, ptr noundef %10, ptr noundef @c_b16, ptr noundef %173, ptr noundef @c__1, ptr noundef %183)
  %184 = load i32, ptr %15, align 4, !tbaa !9
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = add nsw i32 %184, %186
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = sub nsw i32 %187, %188
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %15, align 4, !tbaa !9
  br label %191

191:                                              ; preds = %153, %139
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %12, align 4, !tbaa !9
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %12, align 4, !tbaa !9
  br label %121, !llvm.loop !15

195:                                              ; preds = %121
  br label %196

196:                                              ; preds = %195, %117
  br label %200

197:                                              ; preds = %133, %99
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %198, ptr %199, align 4, !tbaa !9
  br label %200

200:                                              ; preds = %197, %196
  store i32 1, ptr %17, align 4
  br label %201

201:                                              ; preds = %200, %51, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  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 @stpsv_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare float @sdot_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

declare void @sspr_(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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

@.str = external hidden unnamed_addr constant [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 [10 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 @spptrf_(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 float, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %8 = getelementptr inbounds i8, ptr %2, i64 -4
  store i32 0, ptr %3, align 4, !tbaa !5
  %9 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #3
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %10, label %12

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

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

15:                                               ; preds = %12
  %.pr = load i32, ptr %3, align 4, !tbaa !5
  %.not79 = icmp eq i32 %.pr, 0
  br i1 %.not79, label %19, label %.thread

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

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

19:                                               ; preds = %15
  %20 = icmp eq i32 %13, 0
  br i1 %20, label %.loopexit, label %21

21:                                               ; preds = %19
  br i1 %.not, label %.lr.ph96, label %22

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

26:                                               ; preds = %22
  %sqrtf82.peel = call float @sqrtf(float noundef %24) #4
  store float %sqrtf82.peel, ptr %2, align 4, !tbaa !9
  %27 = zext nneg i32 %13 to i64
  %.not81.not.peel.not = icmp eq i32 %13, 1
  br i1 %.not81.not.peel.not, label %.loopexit, label %.lr.ph.peel.next

.lr.ph.peel.next:                                 ; preds = %26, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %43 ], [ 2, %26 ]
  %.091 = phi i32 [ %29, %43 ], [ 1, %26 ]
  %28 = trunc nuw nsw i64 %indvars.iv to i32
  %29 = add nuw nsw i32 %.091, %28
  %30 = add nuw nsw i32 %.091, 1
  %31 = trunc i64 %indvars.iv to i32
  %32 = add i32 %31, -1
  store i32 %32, ptr %6, align 4, !tbaa !5
  %33 = zext nneg i32 %30 to i64
  %34 = getelementptr inbounds float, ptr %8, i64 %33
  call void @stpsv_(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 %34, ptr noundef nonnull @c__1) #3
  store i32 %32, ptr %6, align 4, !tbaa !5
  %35 = zext nneg i32 %29 to i64
  %36 = getelementptr inbounds float, ptr %8, i64 %35
  %37 = load float, ptr %36, align 4, !tbaa !9
  %38 = getelementptr inbounds float, ptr %8, i64 %33
  %39 = call float @sdot_(ptr noundef nonnull %6, ptr noundef nonnull %38, ptr noundef nonnull @c__1, ptr noundef nonnull %38, ptr noundef nonnull @c__1) #3
  %40 = fsub float %37, %39
  %41 = fcmp ugt float %40, 0.000000e+00
  br i1 %41, label %43, label %.loopexit105

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

._crit_edge:                                      ; preds = %22, %.loopexit105
  %.lcssa101 = phi ptr [ %36, %.loopexit105 ], [ %2, %22 ]
  %.lcssa = phi float [ %40, %.loopexit105 ], [ %24, %22 ]
  %.06990.lcssa.wide = phi i32 [ %42, %.loopexit105 ], [ 1, %22 ]
  store float %.lcssa, ptr %.lcssa101, align 4, !tbaa !9
  br label %.loopexit84

43:                                               ; preds = %.lr.ph.peel.next
  %sqrtf82 = call float @sqrtf(float noundef %40) #4
  store float %sqrtf82, ptr %36, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not81.not = icmp ult i64 %indvars.iv, %27
  br i1 %.not81.not, label %.lr.ph.peel.next, label %.loopexit, !llvm.loop !11

.lr.ph96:                                         ; preds = %21, %64
  %.170.neg95 = phi i32 [ %.170.neg, %64 ], [ -1, %21 ]
  %.194 = phi i32 [ %.2, %64 ], [ 1, %21 ]
  %.17093 = phi i32 [ %65, %64 ], [ 1, %21 ]
  %44 = sext i32 %.194 to i64
  %45 = getelementptr inbounds float, ptr %8, i64 %44
  %46 = load float, ptr %45, align 4, !tbaa !9
  %47 = fcmp ugt float %46, 0.000000e+00
  br i1 %47, label %48, label %.loopexit84

48:                                               ; preds = %.lr.ph96
  %sqrtf = call float @sqrtf(float noundef %46) #4
  store float %sqrtf, ptr %45, align 4, !tbaa !9
  %49 = load i32, ptr %1, align 4, !tbaa !5
  %50 = icmp slt i32 %.17093, %49
  br i1 %50, label %51, label %64

51:                                               ; preds = %48
  %52 = sub nsw i32 %49, %.17093
  store i32 %52, ptr %6, align 4, !tbaa !5
  %53 = fdiv float 1.000000e+00, %sqrtf
  store float %53, ptr %7, align 4, !tbaa !9
  %54 = getelementptr i8, ptr %45, i64 4
  call void @sscal_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef %54, ptr noundef nonnull @c__1) #3
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = sub nsw i32 %55, %.17093
  store i32 %56, ptr %6, align 4, !tbaa !5
  %57 = add i32 %.194, %.170.neg95
  %58 = add i32 %57, %55
  %59 = sext i32 %58 to i64
  %gep = getelementptr float, ptr %2, i64 %59
  call void @sspr_(ptr noundef nonnull @.str.6, ptr noundef nonnull %6, ptr noundef nonnull @c_b16, ptr noundef %54, ptr noundef nonnull @c__1, ptr noundef %gep) #3
  %60 = load i32, ptr %1, align 4, !tbaa !5
  %61 = add nsw i32 %.170.neg95, 1
  %62 = add i32 %61, %.194
  %63 = add i32 %62, %60
  br label %64

64:                                               ; preds = %48, %51
  %.2 = phi i32 [ %63, %51 ], [ %.194, %48 ]
  %65 = add nuw nsw i32 %.17093, 1
  %.170.neg = xor i32 %.17093, -1
  %.not80.not = icmp slt i32 %.17093, %13
  br i1 %.not80.not, label %.lr.ph96, label %.loopexit, !llvm.loop !14

.loopexit84:                                      ; preds = %.lr.ph96, %._crit_edge
  %.271 = phi i32 [ %.06990.lcssa.wide, %._crit_edge ], [ %.17093, %.lr.ph96 ]
  store i32 %.271, ptr %3, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %43, %64, %26, %.loopexit84, %19, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  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 @stpsv_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare float @sdot_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @sspr_(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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12, !13}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.peeled.count", i32 1}
!14 = distinct !{!14, !12}


; 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