; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx/diagonal_precond.ll (ZN3ipx15DiagonalPrecond9FactorizeEPKdPNS_4InfoE)

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

%"class.ipx::DiagonalPrecond" = type { %"class.ipx::LinearOperator", ptr, i8, %"class.std::valarray", double }
%"class.ipx::LinearOperator" = type { ptr }
%"class.std::valarray" = type { i64, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx15DiagonalPrecond9FactorizeEPKdPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef %1, ptr noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %19 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %20)
  store i32 %21, ptr %7, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %22 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 1
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %23)
  store i32 %24, ptr %8, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %25 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %26)
  store ptr %27, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 2
  store i8 0, ptr %28, align 8, !tbaa !18
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %99

31:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !16
  br label %32

32:                                               ; preds = %49, %31
  %33 = load i32, ptr %10, align 4, !tbaa !16
  %34 = load i32, ptr %7, align 4, !tbaa !16
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %52

37:                                               ; preds = %32
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i32, ptr %8, align 4, !tbaa !16
  %40 = load i32, ptr %10, align 4, !tbaa !16
  %41 = add nsw i32 %39, %40
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds double, ptr %38, i64 %42
  %44 = load double, ptr %43, align 8, !tbaa !19
  %45 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 3
  %46 = load i32, ptr %10, align 4, !tbaa !16
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %45, i64 noundef %47) #6
  store double %44, ptr %48, align 8, !tbaa !19
  br label %49

49:                                               ; preds = %37
  %50 = load i32, ptr %10, align 4, !tbaa !16
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %10, align 4, !tbaa !16
  br label %32, !llvm.loop !20

52:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !16
  br label %53

53:                                               ; preds = %95, %52
  %54 = load i32, ptr %11, align 4, !tbaa !16
  %55 = load i32, ptr %8, align 4, !tbaa !16
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %98

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load i32, ptr %11, align 4, !tbaa !16
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds double, ptr %59, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !19
  store double %63, ptr %13, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load i32, ptr %11, align 4, !tbaa !16
  %66 = call noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %64, i32 noundef %65)
  store i32 %66, ptr %14, align 4, !tbaa !16
  br label %67

67:                                               ; preds = %91, %58
  %68 = load i32, ptr %14, align 4, !tbaa !16
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = load i32, ptr %11, align 4, !tbaa !16
  %71 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %69, i32 noundef %70)
  %72 = icmp slt i32 %68, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %67
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %94

74:                                               ; preds = %67
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load i32, ptr %14, align 4, !tbaa !16
  %77 = call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %75, i32 noundef %76)
  %78 = load double, ptr %13, align 8, !tbaa !19
  %79 = fmul double %77, %78
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load i32, ptr %14, align 4, !tbaa !16
  %82 = call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %80, i32 noundef %81)
  %83 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 3
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = load i32, ptr %14, align 4, !tbaa !16
  %86 = call noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128) %84, i32 noundef %85)
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %83, i64 noundef %87) #6
  %89 = load double, ptr %88, align 8, !tbaa !19
  %90 = call double @llvm.fmuladd.f64(double %79, double %82, double %89)
  store double %90, ptr %88, align 8, !tbaa !19
  br label %91

91:                                               ; preds = %74
  %92 = load i32, ptr %14, align 4, !tbaa !16
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %14, align 4, !tbaa !16
  br label %67, !llvm.loop !22

94:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %11, align 4, !tbaa !16
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %11, align 4, !tbaa !16
  br label %53, !llvm.loop !23

98:                                               ; preds = %57
  br label %141

99:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store double 0.000000e+00, ptr %15, align 8, !tbaa !19
  %100 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 3
  %101 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef nonnull align 8 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !16
  br label %102

102:                                              ; preds = %137, %99
  %103 = load i32, ptr %16, align 4, !tbaa !16
  %104 = load i32, ptr %8, align 4, !tbaa !16
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %140

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load i32, ptr %16, align 4, !tbaa !16
  %110 = call noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %108, i32 noundef %109)
  store i32 %110, ptr %17, align 4, !tbaa !16
  br label %111

111:                                              ; preds = %133, %107
  %112 = load i32, ptr %17, align 4, !tbaa !16
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load i32, ptr %16, align 4, !tbaa !16
  %115 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %113, i32 noundef %114)
  %116 = icmp slt i32 %112, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %111
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %136

118:                                              ; preds = %111
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load i32, ptr %17, align 4, !tbaa !16
  %121 = call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %119, i32 noundef %120)
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = load i32, ptr %17, align 4, !tbaa !16
  %124 = call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %122, i32 noundef %123)
  %125 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 3
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = load i32, ptr %17, align 4, !tbaa !16
  %128 = call noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128) %126, i32 noundef %127)
  %129 = sext i32 %128 to i64
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %125, i64 noundef %129) #6
  %131 = load double, ptr %130, align 8, !tbaa !19
  %132 = call double @llvm.fmuladd.f64(double %121, double %124, double %131)
  store double %132, ptr %130, align 8, !tbaa !19
  br label %133

133:                                              ; preds = %118
  %134 = load i32, ptr %17, align 4, !tbaa !16
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %17, align 4, !tbaa !16
  br label %111, !llvm.loop !24

136:                                              ; preds = %117
  br label %137

137:                                              ; preds = %136
  %138 = load i32, ptr %16, align 4, !tbaa !16
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %16, align 4, !tbaa !16
  br label %102, !llvm.loop !25

140:                                              ; preds = %106
  br label %141

141:                                              ; preds = %140, %98
  %142 = getelementptr inbounds %"class.ipx::DiagonalPrecond", ptr %18, i32 0, i32 2
  store i8 1, ptr %142, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { mustprogress 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 #3 = { inlinehint mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSN3ipx15DiagonalPrecondE", !11, i64 0, !6, i64 8, !12, i64 16, !13, i64 24, !15, i64 40}
!11 = !{!"_ZTSN3ipx14LinearOperatorE"}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSSt8valarrayIdE", !14, i64 0, !6, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!10, !12, i64 16}
!19 = !{!15, !15, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = distinct !{!25, !21}


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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx15DiagonalPrecond9FactorizeEPKdPNS_4InfoE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef readonly %1, ptr nocapture noundef readnone %2) local_unnamed_addr #2 align 2 {
  %4 = alloca double, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %6)
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = tail call noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704) %8)
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %10)
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  store i8 0, ptr %12, align 8, !tbaa !15
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %39, label %.preheader47

.preheader47:                                     ; preds = %3
  %13 = icmp sgt i32 %7, 0
  br i1 %13, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %.preheader47
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = sext i32 %9 to i64
  %wide.trip.count = zext nneg i32 %7 to i64
  %invariant.gep = getelementptr double, ptr %1, i64 %15
  br label %18

.preheader:                                       ; preds = %18, %.preheader47
  %16 = icmp sgt i32 %9, 0
  br i1 %16, label %.lr.ph52, label %.loopexit

.lr.ph52:                                         ; preds = %.preheader
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  %wide.trip.count65 = zext nneg i32 %9 to i64
  br label %21

18:                                               ; preds = %.lr.ph, %18
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %18 ]
  %gep = getelementptr double, ptr %invariant.gep, i64 %indvars.iv
  %19 = load double, ptr %gep, align 8, !tbaa !16
  %20 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %14, i64 noundef %indvars.iv) #6
  store double %19, ptr %20, align 8, !tbaa !16
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %18, !llvm.loop !17

21:                                               ; preds = %.lr.ph52, %._crit_edge
  %indvars.iv62 = phi i64 [ 0, %.lr.ph52 ], [ %indvars.iv.next63, %._crit_edge ]
  %22 = getelementptr inbounds double, ptr %1, i64 %indvars.iv62
  %23 = load double, ptr %22, align 8, !tbaa !16
  %24 = trunc nuw nsw i64 %indvars.iv62 to i32
  %25 = tail call noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %24)
  %26 = tail call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %24)
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %.lr.ph50, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph50, %21
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %exitcond66.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count65
  br i1 %exitcond66.not, label %.loopexit, label %21, !llvm.loop !19

.lr.ph50:                                         ; preds = %21, %.lr.ph50
  %.04249 = phi i32 [ %36, %.lr.ph50 ], [ %25, %21 ]
  %28 = tail call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.04249)
  %29 = fmul double %23, %28
  %30 = tail call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.04249)
  %31 = tail call noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.04249)
  %32 = sext i32 %31 to i64
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %17, i64 noundef %32) #6
  %34 = load double, ptr %33, align 8, !tbaa !16
  %35 = tail call double @llvm.fmuladd.f64(double %29, double %30, double %34)
  store double %35, ptr %33, align 8, !tbaa !16
  %36 = add nsw i32 %.04249, 1
  %37 = tail call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %24)
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %.lr.ph50, label %._crit_edge, !llvm.loop !20

39:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store double 0.000000e+00, ptr %4, align 8, !tbaa !16
  %40 = getelementptr inbounds i8, ptr %0, i64 24
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %42 = icmp sgt i32 %9, 0
  br i1 %42, label %.lr.ph59, label %.loopexit

.lr.ph59:                                         ; preds = %39, %._crit_edge56
  %.04157 = phi i32 [ %46, %._crit_edge56 ], [ 0, %39 ]
  %43 = call noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.04157)
  %44 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.04157)
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %.lr.ph55, label %._crit_edge56

._crit_edge56:                                    ; preds = %.lr.ph55, %.lr.ph59
  %46 = add nuw nsw i32 %.04157, 1
  %exitcond67.not = icmp eq i32 %46, %9
  br i1 %exitcond67.not, label %.loopexit, label %.lr.ph59, !llvm.loop !21

.lr.ph55:                                         ; preds = %.lr.ph59, %.lr.ph55
  %.053 = phi i32 [ %54, %.lr.ph55 ], [ %43, %.lr.ph59 ]
  %47 = call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.053)
  %48 = call noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.053)
  %49 = call noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.053)
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %40, i64 noundef %50) #6
  %52 = load double, ptr %51, align 8, !tbaa !16
  %53 = call double @llvm.fmuladd.f64(double %47, double %48, double %52)
  store double %53, ptr %51, align 8, !tbaa !16
  %54 = add nsw i32 %.053, 1
  %55 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %11, i32 noundef %.04157)
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %.lr.ph55, label %._crit_edge56, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge, %._crit_edge56, %.preheader, %39
  store i8 1, ptr %12, align 8, !tbaa !15
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3ipx12SparseMatrix5valueEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix5indexEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { mustprogress 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 #3 = { inlinehint mustprogress 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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, !8, i64 8}
!6 = !{!"_ZTSN3ipx15DiagonalPrecondE", !7, i64 0, !8, i64 8, !11, i64 16, !12, i64 24, !14, i64 40}
!7 = !{!"_ZTSN3ipx14LinearOperatorE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"bool", !9, i64 0}
!12 = !{!"_ZTSSt8valarrayIdE", !13, i64 0, !8, i64 8}
!13 = !{!"long", !9, i64 0}
!14 = !{!"double", !9, i64 0}
!15 = !{!6, !11, i64 16}
!16 = !{!14, !14, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass