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

; 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::Timer" = type { %"class.std::chrono::time_point" }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%"class.ipx::Basis" = type { ptr, ptr, %"class.std::vector", %"class.std::vector", %"class.std::unique_ptr", i8, i32, i32, i32, i32, i32, i32, double, double, double, double, %"class.std::vector.5", double, double }
%"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::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.4" }
%"struct.std::_Head_base.4" = type { ptr }
%"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 }

@.str.12 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx5Basis14SolveForUpdateEiRNS_13IndexedVectorE = external hidden unnamed_addr constant [54 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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #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

declare void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

; 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 ptr @_ZNK3ipx12SparseMatrix6rowidxEv(ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

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

declare noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx5Basis14SolveForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(44) %2) #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 %"class.ipx::Timer", align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  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
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = call noundef i32 @_ZNK3ipx5Basis10PositionOfEi(ptr noundef nonnull align 8 dereferenceable(176) %18, i32 noundef %19)
  store i32 %20, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %21 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %22)
  store i32 %23, ptr %9, align 4, !tbaa !9
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = icmp sgt i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %3
  br label %29

27:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.12, i32 noundef 175, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx5Basis14SolveForUpdateEiRNS_13IndexedVectorE) #7
  unreachable

28:                                               ; No predecessors!
  br label %29

29:                                               ; preds = %28, %26
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = icmp slt i32 %30, 0
  br i1 %31, label %32, label %86

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %33 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %34)
  store ptr %35, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = call noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %36, i32 noundef %37)
  store i32 %38, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %39, i32 noundef %40)
  store i32 %41, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %42 = load i32, ptr %12, align 4, !tbaa !9
  %43 = load i32, ptr %11, align 4, !tbaa !9
  %44 = sub nsw i32 %42, %43
  store i32 %44, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = call noundef ptr @_ZNK3ipx12SparseMatrix6rowidxEv(ptr noundef nonnull align 8 dereferenceable(128) %45)
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds i32, ptr %46, i64 %48
  store ptr %49, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = call noundef ptr @_ZNK3ipx12SparseMatrix6valuesEv(ptr noundef nonnull align 8 dereferenceable(128) %50)
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %51, i64 %53
  store ptr %54, ptr %15, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 4
  %56 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #6
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3ipx8LuUpdate14FtranForUpdateEiPKiPKdRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12) %56, i32 noundef %57, ptr noundef %58, ptr noundef %59, ptr noundef nonnull align 8 dereferenceable(44) %60)
  %61 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 8
  %62 = load i32, ptr %61, align 4, !tbaa !29
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = call noundef i32 @_ZNK3ipx13IndexedVector3nnzEv(ptr noundef nonnull align 8 dereferenceable(44) %64)
  %66 = sitofp i32 %65 to double
  %67 = fmul double 1.000000e+00, %66
  %68 = load i32, ptr %9, align 4, !tbaa !9
  %69 = sitofp i32 %68 to double
  %70 = fdiv double %67, %69
  store double %70, ptr %16, align 8, !tbaa !30
  %71 = load double, ptr %16, align 8, !tbaa !30
  %72 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 17
  %73 = load double, ptr %72, align 8, !tbaa !31
  %74 = fadd double %73, %71
  store double %74, ptr %72, align 8, !tbaa !31
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call noundef zeroext i1 @_ZNK3ipx13IndexedVector6sparseEv(ptr noundef nonnull align 8 dereferenceable(44) %75)
  br i1 %76, label %77, label %81

77:                                               ; preds = %32
  %78 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 10
  %79 = load i32, ptr %78, align 4, !tbaa !32
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %78, align 4, !tbaa !32
  br label %81

81:                                               ; preds = %77, %32
  %82 = call noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %83 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 12
  %84 = load double, ptr %83, align 8, !tbaa !33
  %85 = fadd double %84, %82
  store double %85, ptr %83, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %116

86:                                               ; preds = %29
  %87 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 4
  %88 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %87) #6
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3ipx8LuUpdate14BtranForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12) %88, i32 noundef %89, ptr noundef nonnull align 8 dereferenceable(44) %90)
  %91 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 9
  %92 = load i32, ptr %91, align 8, !tbaa !34
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %91, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = call noundef i32 @_ZNK3ipx13IndexedVector3nnzEv(ptr noundef nonnull align 8 dereferenceable(44) %94)
  %96 = sitofp i32 %95 to double
  %97 = fmul double 1.000000e+00, %96
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = sitofp i32 %98 to double
  %100 = fdiv double %97, %99
  store double %100, ptr %17, align 8, !tbaa !30
  %101 = load double, ptr %17, align 8, !tbaa !30
  %102 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 18
  %103 = load double, ptr %102, align 8, !tbaa !35
  %104 = fadd double %103, %101
  store double %104, ptr %102, align 8, !tbaa !35
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call noundef zeroext i1 @_ZNK3ipx13IndexedVector6sparseEv(ptr noundef nonnull align 8 dereferenceable(44) %105)
  br i1 %106, label %107, label %111

107:                                              ; preds = %86
  %108 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 11
  %109 = load i32, ptr %108, align 8, !tbaa !36
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 8, !tbaa !36
  br label %111

111:                                              ; preds = %107, %86
  %112 = call noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %113 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 13
  %114 = load double, ptr %113, align 8, !tbaa !37
  %115 = fadd double %114, %112
  store double %115, ptr %113, align 8, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %116

116:                                              ; preds = %111, %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Basis10PositionOfEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) #5 align 2

declare void @_ZN3ipx8LuUpdate14FtranForUpdateEiPKiPKdRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(44)) #3

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

declare noundef zeroext i1 @_ZNK3ipx13IndexedVector6sparseEv(ptr noundef nonnull align 8 dereferenceable(44)) #3

declare void @_ZN3ipx8LuUpdate14BtranForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef nonnull align 8 dereferenceable(44)) #3

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 = { noreturn 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 #3 = { "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 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !6, i64 8}
!12 = !{!"_ZTSN3ipx5BasisE", !6, i64 0, !6, i64 8, !13, i64 16, !13, i64 40, !17, i64 64, !23, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !24, i64 104, !24, i64 112, !24, i64 120, !24, i64 128, !25, i64 136, !24, i64 160, !24, i64 168}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx8LuUpdateESt14default_deleteIS1_ELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx8LuUpdateESt14default_deleteIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPN3ipx8LuUpdateESt14default_deleteIS1_EEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx8LuUpdateESt14default_deleteIS1_EEE", !22, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx8LuUpdateELb0EE", !6, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"double", !7, i64 0}
!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 = !{!12, !10, i64 84}
!30 = !{!24, !24, i64 0}
!31 = !{!12, !24, i64 160}
!32 = !{!12, !10, i64 92}
!33 = !{!12, !24, i64 104}
!34 = !{!12, !10, i64 88}
!35 = !{!12, !24, i64 168}
!36 = !{!12, !10, i64 96}
!37 = !{!12, !24, i64 112}


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

%"class.ipx::Timer" = type { %"class.std::chrono::time_point" }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }

@.str.12 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [6 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx5Basis14SolveForUpdateEiRNS_13IndexedVectorE = external hidden unnamed_addr constant [54 x i8], align 1

; 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 nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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

declare void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

; 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 ptr @_ZNK3ipx12SparseMatrix6rowidxEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

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

declare noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx5Basis14SolveForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %1, ptr noundef nonnull align 8 dereferenceable(44) %2) local_unnamed_addr #4 align 2 {
  %4 = alloca %"class.ipx::Timer", align 8
  %5 = tail call noundef i32 @_ZNK3ipx5Basis10PositionOfEi(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN3ipx5TimerC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = call noundef i32 @_ZNK3ipx5Model4rowsEv(ptr noundef nonnull align 8 dereferenceable(704) %7)
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %11, label %10

10:                                               ; preds = %3
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.12, i32 noundef 175, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx5Basis14SolveForUpdateEiRNS_13IndexedVectorE) #7
  unreachable

11:                                               ; preds = %3
  %12 = icmp slt i32 %5, 0
  br i1 %12, label %13, label %41

13:                                               ; preds = %11
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %14)
  %16 = call noundef i32 @_ZNK3ipx12SparseMatrix5beginEi(ptr noundef nonnull align 8 dereferenceable(128) %15, i32 noundef %1)
  %17 = call noundef i32 @_ZNK3ipx12SparseMatrix3endEi(ptr noundef nonnull align 8 dereferenceable(128) %15, i32 noundef %1)
  %18 = sub nsw i32 %17, %16
  %19 = call noundef ptr @_ZNK3ipx12SparseMatrix6rowidxEv(ptr noundef nonnull align 8 dereferenceable(128) %15)
  %20 = sext i32 %16 to i64
  %21 = getelementptr inbounds i32, ptr %19, i64 %20
  %22 = call noundef ptr @_ZNK3ipx12SparseMatrix6valuesEv(ptr noundef nonnull align 8 dereferenceable(128) %15)
  %23 = getelementptr inbounds double, ptr %22, i64 %20
  %24 = getelementptr inbounds i8, ptr %0, i64 64
  %25 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @_ZN3ipx8LuUpdate14FtranForUpdateEiPKiPKdRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12) %25, i32 noundef %18, ptr noundef %21, ptr noundef %23, ptr noundef nonnull align 8 dereferenceable(44) %2)
  %26 = getelementptr inbounds i8, ptr %0, i64 84
  %27 = load i32, ptr %26, align 4, !tbaa !27
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %26, align 4, !tbaa !27
  %29 = call noundef i32 @_ZNK3ipx13IndexedVector3nnzEv(ptr noundef nonnull align 8 dereferenceable(44) %2)
  %30 = sitofp i32 %29 to double
  %31 = uitofp nneg i32 %8 to double
  %32 = fdiv double %30, %31
  %33 = getelementptr inbounds i8, ptr %0, i64 160
  %34 = load double, ptr %33, align 8, !tbaa !28
  %35 = fadd double %34, %32
  store double %35, ptr %33, align 8, !tbaa !28
  %36 = call noundef zeroext i1 @_ZNK3ipx13IndexedVector6sparseEv(ptr noundef nonnull align 8 dereferenceable(44) %2)
  br i1 %36, label %37, label %59

37:                                               ; preds = %13
  %38 = getelementptr inbounds i8, ptr %0, i64 92
  %39 = load i32, ptr %38, align 4, !tbaa !29
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %38, align 4, !tbaa !29
  br label %59

41:                                               ; preds = %11
  %42 = getelementptr inbounds i8, ptr %0, i64 64
  %43 = call noundef ptr @_ZNKSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #6
  call void @_ZN3ipx8LuUpdate14BtranForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12) %43, i32 noundef %5, ptr noundef nonnull align 8 dereferenceable(44) %2)
  %44 = getelementptr inbounds i8, ptr %0, i64 88
  %45 = load i32, ptr %44, align 8, !tbaa !30
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %44, align 8, !tbaa !30
  %47 = call noundef i32 @_ZNK3ipx13IndexedVector3nnzEv(ptr noundef nonnull align 8 dereferenceable(44) %2)
  %48 = sitofp i32 %47 to double
  %49 = uitofp nneg i32 %8 to double
  %50 = fdiv double %48, %49
  %51 = getelementptr inbounds i8, ptr %0, i64 168
  %52 = load double, ptr %51, align 8, !tbaa !31
  %53 = fadd double %52, %50
  store double %53, ptr %51, align 8, !tbaa !31
  %54 = call noundef zeroext i1 @_ZNK3ipx13IndexedVector6sparseEv(ptr noundef nonnull align 8 dereferenceable(44) %2)
  br i1 %54, label %55, label %59

55:                                               ; preds = %41
  %56 = getelementptr inbounds i8, ptr %0, i64 96
  %57 = load i32, ptr %56, align 8, !tbaa !32
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %56, align 8, !tbaa !32
  br label %59

59:                                               ; preds = %41, %55, %13, %37
  %.sink31 = phi i64 [ 104, %37 ], [ 104, %13 ], [ 112, %55 ], [ 112, %41 ]
  %60 = call noundef double @_ZNK3ipx5Timer7ElapsedEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %61 = getelementptr inbounds i8, ptr %0, i64 %.sink31
  %62 = load double, ptr %61, align 8, !tbaa !33
  %63 = fadd double %60, %62
  store double %63, ptr %61, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Basis10PositionOfEi(ptr noundef nonnull align 8 dereferenceable(176), i32 noundef) local_unnamed_addr #5 align 2

declare void @_ZN3ipx8LuUpdate14FtranForUpdateEiPKiPKdRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #3

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

declare noundef zeroext i1 @_ZNK3ipx13IndexedVector6sparseEv(ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #3

declare void @_ZN3ipx8LuUpdate14BtranForUpdateEiRNS_13IndexedVectorE(ptr noundef nonnull align 8 dereferenceable(12), i32 noundef, ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #3

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 = { noreturn 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 #3 = { "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 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 #6 = { nounwind }
attributes #7 = { noreturn 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, !7, i64 8}
!6 = !{!"_ZTSN3ipx5BasisE", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 40, !14, i64 64, !20, i64 72, !21, i64 76, !21, i64 80, !21, i64 84, !21, i64 88, !21, i64 92, !21, i64 96, !22, i64 104, !22, i64 112, !22, i64 120, !22, i64 128, !23, i64 136, !22, i64 160, !22, i64 168}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!14 = !{!"_ZTSSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx8LuUpdateESt14default_deleteIS1_ELb1ELb1EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx8LuUpdateESt14default_deleteIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt5tupleIJPN3ipx8LuUpdateESt14default_deleteIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx8LuUpdateESt14default_deleteIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx8LuUpdateELb0EE", !7, i64 0}
!20 = !{!"bool", !8, i64 0}
!21 = !{!"int", !8, i64 0}
!22 = !{!"double", !8, i64 0}
!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", !7, i64 0, !7, i64 8, !7, i64 16}
!27 = !{!6, !21, i64 84}
!28 = !{!6, !22, i64 160}
!29 = !{!6, !21, i64 92}
!30 = !{!6, !21, i64 88}
!31 = !{!6, !22, i64 168}
!32 = !{!6, !21, i64 96}
!33 = !{!22, !22, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass