; LLVM IR from ERGO-Code/HiGHS :: src/ipm/ipx (forrest_tomlin)

; 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::ForrestTomlin" = type { %"class.ipx::LuUpdate.base", ptr, i32, %"class.std::unique_ptr", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::vector", i32, i8, i8, double, double, %"class.std::valarray" }
%"class.ipx::LuUpdate.base" = type <{ ptr, i32 }>
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.5", %"class.std::vector", %"class.std::vector.5" }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::valarray" = type { i64, ptr }

@.str.11 = external hidden unnamed_addr constant [6 x i8], align 1

; 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

declare noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 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 nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ipx13IndexedVector17InvalidatePatternEv(ptr noundef nonnull align 8 dereferenceable(44)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ipx13ForrestTomlin10ComputeEtaEi(ptr noundef nonnull align 8 dereferenceable(608), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx13ForrestTomlin15_BtranForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(608) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(44) %2) unnamed_addr #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8
  %11 = load i32, ptr %5, align 4, !tbaa !9
  call void @_ZN3ipx13ForrestTomlin10ComputeEtaEi(ptr noundef nonnull align 8 dereferenceable(608) %10, i32 noundef %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %12 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 12
  %13 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %14 = trunc i64 %13 to i32
  store i32 %14, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %15 = load i32, ptr %7, align 4, !tbaa !9
  %16 = sub nsw i32 %15, 1
  store i32 %16, ptr %8, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %57, %3
  %18 = load i32, ptr %8, align 4, !tbaa !9
  %19 = icmp sge i32 %18, 0
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %60

21:                                               ; preds = %17
  %22 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 11
  %23 = load i32, ptr %8, align 4, !tbaa !9
  %24 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 18
  %25 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 2
  %26 = load i32, ptr %25, align 8, !tbaa !11
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = add nsw i32 %26, %27
  %29 = sext i32 %28 to i64
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %24, i64 noundef %29) #6
  %31 = load double, ptr %30, align 8, !tbaa !33
  %32 = fneg double %31
  %33 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 18
  call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %22, i32 noundef %23, double noundef %32, ptr noundef nonnull align 8 dereferenceable(16) %33)
  %34 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 18
  %35 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !11
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = add nsw i32 %36, %37
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %34, i64 noundef %39) #6
  %41 = load double, ptr %40, align 8, !tbaa !33
  %42 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 18
  %43 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 12
  %44 = load i32, ptr %8, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45) #6
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %42, i64 noundef %48) #6
  store double %41, ptr %49, align 8, !tbaa !33
  %50 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 18
  %51 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 2
  %52 = load i32, ptr %51, align 8, !tbaa !11
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = add nsw i32 %52, %53
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %50, i64 noundef %55) #6
  store double 0.000000e+00, ptr %56, align 8, !tbaa !33
  br label %57

57:                                               ; preds = %21
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %8, align 4, !tbaa !9
  br label %17, !llvm.loop !34

60:                                               ; preds = %20
  %61 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 9
  %62 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 18
  %63 = call noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128) %61, ptr noundef nonnull align 8 dereferenceable(16) %62, i8 noundef signext 116, ptr noundef @.str.11, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %83, %60
  %65 = load i32, ptr %9, align 4, !tbaa !9
  %66 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !11
  %68 = icmp slt i32 %65, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %86

70:                                               ; preds = %64
  %71 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 18
  %72 = load i32, ptr %9, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %71, i64 noundef %73) #6
  %75 = load double, ptr %74, align 8, !tbaa !33
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.ipx::ForrestTomlin", ptr %10, i32 0, i32 4
  %78 = load i32, ptr %9, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %79) #6
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ipx13IndexedVectorixEi(ptr noundef nonnull align 8 dereferenceable(44) %76, i32 noundef %81)
  store double %75, ptr %82, align 8, !tbaa !33
  br label %83

83:                                               ; preds = %70
  %84 = load i32, ptr %9, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %9, align 4, !tbaa !9
  br label %64, !llvm.loop !36

86:                                               ; preds = %69
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3ipx13IndexedVector17InvalidatePatternEv(ptr noundef nonnull align 8 dereferenceable(44) %87)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 #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 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"_ZTSN3ipx13ForrestTomlinE", !13, i64 0, !6, i64 16, !10, i64 24, !14, i64 32, !20, i64 40, !20, i64 64, !20, i64 88, !20, i64 112, !20, i64 136, !24, i64 160, !24, i64 288, !24, i64 416, !20, i64 544, !10, i64 568, !29, i64 572, !29, i64 573, !30, i64 576, !30, i64 584, !31, i64 592}
!13 = !{!"_ZTSN3ipx8LuUpdateE", !10, i64 8}
!14 = !{!"_ZTSSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx15LuFactorizationESt14default_deleteIS1_ELb1ELb1EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt5tupleIJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx15LuFactorizationELb0EE", !6, i64 0}
!20 = !{!"_ZTSSt6vectorIiSaIiEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3ipx12SparseMatrixE", !10, i64 0, !20, i64 8, !20, i64 32, !25, i64 56, !20, i64 80, !25, i64 104}
!25 = !{!"_ZTSSt6vectorIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"double", !7, i64 0}
!31 = !{!"_ZTSSt8valarrayIdE", !32, i64 0, !6, i64 8}
!32 = !{!"long", !7, i64 0}
!33 = !{!30, !30, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}


; 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.11 = external hidden unnamed_addr constant [6 x i8], align 1

declare noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) 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 #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3ipx13IndexedVector17InvalidatePatternEv(ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ipx13ForrestTomlin10ComputeEtaEi(ptr noundef nonnull align 8 dereferenceable(608), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx13ForrestTomlin15_BtranForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(608) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(44) %2) unnamed_addr #3 align 2 {
  tail call void @_ZN3ipx13ForrestTomlin10ComputeEtaEi(ptr noundef nonnull align 8 dereferenceable(608) %0, i32 noundef %1)
  %4 = getelementptr inbounds i8, ptr %0, i64 544
  %5 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %6 = trunc i64 %5 to i32
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 416
  %9 = getelementptr inbounds i8, ptr %0, i64 592
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = and i64 %5, 2147483647
  br label %19

._crit_edge:                                      ; preds = %19, %3
  %12 = getelementptr inbounds i8, ptr %0, i64 160
  %13 = getelementptr inbounds i8, ptr %0, i64 592
  %14 = tail call noundef i32 @_ZN3ipx15TriangularSolveERKNS_12SparseMatrixERSt8valarrayIdEcPKci(ptr noundef nonnull align 8 dereferenceable(128) %12, ptr noundef nonnull align 8 dereferenceable(16) %13, i8 noundef signext 116, ptr noundef nonnull @.str.11, i32 noundef 1)
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph19, label %._crit_edge20

.lr.ph19:                                         ; preds = %._crit_edge
  %18 = getelementptr inbounds i8, ptr %0, i64 40
  br label %41

19:                                               ; preds = %.lr.ph, %19
  %indvars.iv = phi i64 [ %11, %.lr.ph ], [ %indvars.iv.next, %19 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %20 = load i32, ptr %10, align 8, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = add nsw i64 %indvars.iv.next, %21
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %22) #5
  %24 = load double, ptr %23, align 8, !tbaa !31
  %25 = fneg double %24
  %26 = trunc nuw nsw i64 %indvars.iv.next to i32
  tail call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %8, i32 noundef %26, double noundef %25, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %27 = load i32, ptr %10, align 8, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = add nsw i64 %indvars.iv.next, %28
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %29) #5
  %31 = load double, ptr %30, align 8, !tbaa !31
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv.next) #5
  %33 = load i32, ptr %32, align 4, !tbaa !32
  %34 = sext i32 %33 to i64
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %34) #5
  store double %31, ptr %35, align 8, !tbaa !31
  %36 = load i32, ptr %10, align 8, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = add nsw i64 %indvars.iv.next, %37
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %38) #5
  store double 0.000000e+00, ptr %39, align 8, !tbaa !31
  %40 = icmp ugt i64 %indvars.iv, 1
  br i1 %40, label %19, label %._crit_edge, !llvm.loop !33

._crit_edge20:                                    ; preds = %41, %._crit_edge
  tail call void @_ZN3ipx13IndexedVector17InvalidatePatternEv(ptr noundef nonnull align 8 dereferenceable(44) %2)
  ret void

41:                                               ; preds = %.lr.ph19, %41
  %indvars.iv22 = phi i64 [ 0, %.lr.ph19 ], [ %indvars.iv.next23, %41 ]
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %indvars.iv22) #5
  %43 = load double, ptr %42, align 8, !tbaa !31
  %44 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %indvars.iv22) #5
  %45 = load i32, ptr %44, align 4, !tbaa !32
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3ipx13IndexedVectorixEi(ptr noundef nonnull align 8 dereferenceable(44) %2, i32 noundef %45)
  store double %43, ptr %46, align 8, !tbaa !31
  %indvars.iv.next23 = add nuw nsw i64 %indvars.iv22, 1
  %47 = load i32, ptr %15, align 8, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next23, %48
  br i1 %49, label %41, label %._crit_edge20, !llvm.loop !35
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

attributes #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 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 = { 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 #3 = { 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 #4 = { 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 #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, !8, i64 24}
!6 = !{!"_ZTSN3ipx13ForrestTomlinE", !7, i64 0, !11, i64 16, !8, i64 24, !12, i64 32, !18, i64 40, !18, i64 64, !18, i64 88, !18, i64 112, !18, i64 136, !22, i64 160, !22, i64 288, !22, i64 416, !18, i64 544, !8, i64 568, !27, i64 572, !27, i64 573, !28, i64 576, !28, i64 584, !29, i64 592}
!7 = !{!"_ZTSN3ipx8LuUpdateE", !8, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSSt10unique_ptrIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx15LuFactorizationESt14default_deleteIS1_ELb1ELb1EE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx15LuFactorizationESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt5tupleIJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx15LuFactorizationESt14default_deleteIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx15LuFactorizationELb0EE", !11, i64 0}
!18 = !{!"_ZTSSt6vectorIiSaIiEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!22 = !{!"_ZTSN3ipx12SparseMatrixE", !8, i64 0, !18, i64 8, !18, i64 32, !23, i64 56, !18, i64 80, !23, i64 104}
!23 = !{!"_ZTSSt6vectorIdSaIdEE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!27 = !{!"bool", !9, i64 0}
!28 = !{!"double", !9, i64 0}
!29 = !{!"_ZTSSt8valarrayIdE", !30, i64 0, !11, i64 8}
!30 = !{!"long", !9, i64 0}
!31 = !{!28, !28, i64 0}
!32 = !{!8, !8, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass