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

; 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::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 }

; 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 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: mustprogress uwtable
declare dso_local void @_ZNK3ipx5Basis10SolveDenseERKSt8valarrayIdERS2_c(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3ipx5Basis20ComputeBasicSolutionERSt8valarrayIdES3_S3_(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) #2 align 2 {
  %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 ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, 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
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %19 = getelementptr inbounds %"class.ipx::Basis", 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 %9, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %22 = getelementptr inbounds %"class.ipx::Basis", 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 %10, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %25 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1bEv(ptr noundef nonnull align 8 dereferenceable(704) %26)
  store ptr %27, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %28 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1cEv(ptr noundef nonnull align 8 dereferenceable(704) %29)
  store ptr %30, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %31 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %32)
  store ptr %33, ptr %13, align 8, !tbaa !5
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %34)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !28
  br label %37

37:                                               ; preds = %58, %4
  %38 = load i32, ptr %14, align 4, !tbaa !28
  %39 = load i32, ptr %10, align 4, !tbaa !28
  %40 = load i32, ptr %9, align 4, !tbaa !28
  %41 = add nsw i32 %39, %40
  %42 = icmp slt i32 %38, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %61

44:                                               ; preds = %37
  %45 = load i32, ptr %14, align 4, !tbaa !28
  %46 = call noundef zeroext i1 @_ZNK3ipx5Basis10IsNonbasicEi(ptr noundef nonnull align 8 dereferenceable(176) %18, i32 noundef %45)
  br i1 %46, label %47, label %57

47:                                               ; preds = %44
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = load i32, ptr %14, align 4, !tbaa !28
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = load i32, ptr %14, align 4, !tbaa !28
  %52 = sext i32 %51 to i64
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %50, i64 noundef %52) #5
  %54 = load double, ptr %53, align 8, !tbaa !29
  %55 = fneg double %54
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %48, i32 noundef %49, double noundef %55, ptr noundef nonnull align 8 dereferenceable(16) %56)
  br label %57

57:                                               ; preds = %47, %44
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr %14, align 4, !tbaa !28
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %14, align 4, !tbaa !28
  br label %37, !llvm.loop !30

61:                                               ; preds = %43
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK3ipx5Basis10SolveDenseERKSt8valarrayIdERS2_c(ptr noundef nonnull align 8 dereferenceable(176) %18, ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(16) %63, i8 noundef signext 78)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !28
  br label %64

64:                                               ; preds = %83, %61
  %65 = load i32, ptr %15, align 4, !tbaa !28
  %66 = load i32, ptr %9, align 4, !tbaa !28
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

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

69:                                               ; preds = %64
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load i32, ptr %15, align 4, !tbaa !28
  %72 = sext i32 %71 to i64
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %70, i64 noundef %72) #5
  %74 = load double, ptr %73, align 8, !tbaa !29
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 2
  %77 = load i32, ptr %15, align 4, !tbaa !28
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #5
  %80 = load i32, ptr %79, align 4, !tbaa !28
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %75, i64 noundef %81) #5
  store double %74, ptr %82, align 8, !tbaa !29
  br label %83

83:                                               ; preds = %69
  %84 = load i32, ptr %15, align 4, !tbaa !28
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %15, align 4, !tbaa !28
  br label %64, !llvm.loop !32

86:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !28
  br label %87

87:                                               ; preds = %116, %86
  %88 = load i32, ptr %16, align 4, !tbaa !28
  %89 = load i32, ptr %9, align 4, !tbaa !28
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %119

92:                                               ; preds = %87
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 2
  %95 = load i32, ptr %16, align 4, !tbaa !28
  %96 = sext i32 %95 to i64
  %97 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96) #5
  %98 = load i32, ptr %97, align 4, !tbaa !28
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %93, i64 noundef %99) #5
  %101 = load double, ptr %100, align 8, !tbaa !29
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.ipx::Basis", ptr %18, i32 0, i32 2
  %104 = load i32, ptr %16, align 4, !tbaa !28
  %105 = sext i32 %104 to i64
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %105) #5
  %107 = load i32, ptr %106, align 4, !tbaa !28
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %102, i64 noundef %108) #5
  %110 = load double, ptr %109, align 8, !tbaa !29
  %111 = fsub double %101, %110
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = load i32, ptr %16, align 4, !tbaa !28
  %114 = sext i32 %113 to i64
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %112, i64 noundef %114) #5
  store double %111, ptr %115, align 8, !tbaa !29
  br label %116

116:                                              ; preds = %92
  %117 = load i32, ptr %16, align 4, !tbaa !28
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %16, align 4, !tbaa !28
  br label %87, !llvm.loop !33

119:                                              ; preds = %91
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNK3ipx5Basis10SolveDenseERKSt8valarrayIdERS2_c(ptr noundef nonnull align 8 dereferenceable(176) %18, ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef nonnull align 8 dereferenceable(16) %121, i8 noundef signext 84)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !28
  br label %122

122:                                              ; preds = %148, %119
  %123 = load i32, ptr %17, align 4, !tbaa !28
  %124 = load i32, ptr %10, align 4, !tbaa !28
  %125 = load i32, ptr %9, align 4, !tbaa !28
  %126 = add nsw i32 %124, %125
  %127 = icmp slt i32 %123, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %151

129:                                              ; preds = %122
  %130 = load i32, ptr %17, align 4, !tbaa !28
  %131 = call noundef zeroext i1 @_ZNK3ipx5Basis10IsNonbasicEi(ptr noundef nonnull align 8 dereferenceable(176) %18, i32 noundef %130)
  br i1 %131, label %132, label %147

132:                                              ; preds = %129
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = load i32, ptr %17, align 4, !tbaa !28
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %133, i64 noundef %135) #5
  %137 = load double, ptr %136, align 8, !tbaa !29
  %138 = load ptr, ptr %13, align 8, !tbaa !5
  %139 = load i32, ptr %17, align 4, !tbaa !28
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = call noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %138, i32 noundef %139, ptr noundef nonnull align 8 dereferenceable(16) %140)
  %142 = fsub double %137, %141
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = load i32, ptr %17, align 4, !tbaa !28
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %143, i64 noundef %145) #5
  store double %142, ptr %146, align 8, !tbaa !29
  br label %147

147:                                              ; preds = %132, %129
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %17, align 4, !tbaa !28
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %17, align 4, !tbaa !28
  br label %122, !llvm.loop !34

151:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret void
}

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

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

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

; 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)) #4

; 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 @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #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 = { 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 = { 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, !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 = !{!"_ZTSN3ipx5BasisE", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 40, !15, i64 64, !21, i64 72, !22, i64 76, !22, i64 80, !22, i64 84, !22, i64 88, !22, i64 92, !22, i64 96, !23, i64 104, !23, i64 112, !23, i64 120, !23, i64 128, !24, i64 136, !23, i64 160, !23, i64 168}
!11 = !{!"_ZTSSt6vectorIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSSt10unique_ptrIN3ipx8LuUpdateESt14default_deleteIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_dataIN3ipx8LuUpdateESt14default_deleteIS1_ELb1ELb1EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_implIN3ipx8LuUpdateESt14default_deleteIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt5tupleIJPN3ipx8LuUpdateESt14default_deleteIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSSt11_Tuple_implILm0EJPN3ipx8LuUpdateESt14default_deleteIS1_EEE", !20, i64 0}
!20 = !{!"_ZTSSt10_Head_baseILm0EPN3ipx8LuUpdateELb0EE", !6, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"int", !7, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = !{!"_ZTSSt6vectorIdSaIdEE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!22, !22, i64 0}
!29 = !{!23, !23, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}


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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx5Model4colsEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #0 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 #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3ipx5Basis10SolveDenseERKSt8valarrayIdERS2_c(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), i8 noundef signext) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3ipx5Basis20ComputeBasicSolutionERSt8valarrayIdES3_S3_(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3) local_unnamed_addr #1 align 2 {
  %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(16) ptr @_ZNK3ipx5Model1bEv(ptr noundef nonnull align 8 dereferenceable(704) %10)
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1cEv(ptr noundef nonnull align 8 dereferenceable(704) %12)
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZNK3ipx5Model2AIEv(ptr noundef nonnull align 8 dereferenceable(704) %14)
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %17 = add nsw i32 %9, %7
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %17 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %27, %4
  tail call void @_ZNK3ipx5Basis10SolveDenseERKSt8valarrayIdERS2_c(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %2, i8 noundef signext 78)
  %19 = icmp sgt i32 %7, 0
  br i1 %19, label %.lr.ph52, label %._crit_edge55

.lr.ph52:                                         ; preds = %._crit_edge
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %wide.trip.count64 = zext nneg i32 %7 to i64
  br label %29

.lr.ph:                                           ; preds = %.lr.ph.preheader, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %27 ]
  %21 = trunc nuw nsw i64 %indvars.iv to i32
  %22 = tail call noundef zeroext i1 @_ZNK3ipx5Basis10IsNonbasicEi(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %21)
  br i1 %22, label %23, label %27

23:                                               ; preds = %.lr.ph
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %indvars.iv) #4
  %25 = load double, ptr %24, align 8, !tbaa !27
  %26 = fneg double %25
  tail call void @_ZN3ipx13ScatterColumnERKNS_12SparseMatrixEidRSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %15, i32 noundef %21, double noundef %26, ptr noundef nonnull align 8 dereferenceable(16) %2)
  br label %27

27:                                               ; preds = %.lr.ph, %23
  %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 %._crit_edge, label %.lr.ph, !llvm.loop !28

.preheader:                                       ; preds = %29
  br i1 %19, label %.lr.ph54, label %._crit_edge55

.lr.ph54:                                         ; preds = %.preheader
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %wide.trip.count69 = zext nneg i32 %7 to i64
  br label %36

29:                                               ; preds = %.lr.ph52, %29
  %indvars.iv61 = phi i64 [ 0, %.lr.ph52 ], [ %indvars.iv.next62, %29 ]
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2, i64 noundef %indvars.iv61) #4
  %31 = load double, ptr %30, align 8, !tbaa !27
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %indvars.iv61) #4
  %33 = load i32, ptr %32, align 4, !tbaa !30
  %34 = sext i32 %33 to i64
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %34) #4
  store double %31, ptr %35, align 8, !tbaa !27
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %exitcond65.not = icmp eq i64 %indvars.iv.next62, %wide.trip.count64
  br i1 %exitcond65.not, label %.preheader, label %29, !llvm.loop !31

._crit_edge55:                                    ; preds = %36, %._crit_edge, %.preheader
  tail call void @_ZNK3ipx5Basis10SolveDenseERKSt8valarrayIdERS2_c(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %2, i8 noundef signext 84)
  br i1 %18, label %.lr.ph58.preheader, label %._crit_edge59

.lr.ph58.preheader:                               ; preds = %._crit_edge55
  %wide.trip.count74 = zext nneg i32 %17 to i64
  br label %.lr.ph58

36:                                               ; preds = %.lr.ph54, %36
  %indvars.iv66 = phi i64 [ 0, %.lr.ph54 ], [ %indvars.iv.next67, %36 ]
  %37 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv66) #4
  %38 = load i32, ptr %37, align 4, !tbaa !30
  %39 = sext i32 %38 to i64
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %39) #4
  %41 = load double, ptr %40, align 8, !tbaa !27
  %42 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv66) #4
  %43 = load i32, ptr %42, align 4, !tbaa !30
  %44 = sext i32 %43 to i64
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %44) #4
  %46 = load double, ptr %45, align 8, !tbaa !27
  %47 = fsub double %41, %46
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %2, i64 noundef %indvars.iv66) #4
  store double %47, ptr %48, align 8, !tbaa !27
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond70.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count69
  br i1 %exitcond70.not, label %._crit_edge55, label %36, !llvm.loop !32

._crit_edge59:                                    ; preds = %57, %._crit_edge55
  ret void

.lr.ph58:                                         ; preds = %.lr.ph58.preheader, %57
  %indvars.iv71 = phi i64 [ 0, %.lr.ph58.preheader ], [ %indvars.iv.next72, %57 ]
  %49 = trunc nuw nsw i64 %indvars.iv71 to i32
  %50 = tail call noundef zeroext i1 @_ZNK3ipx5Basis10IsNonbasicEi(ptr noundef nonnull align 8 dereferenceable(176) %0, i32 noundef %49)
  br i1 %50, label %51, label %57

51:                                               ; preds = %.lr.ph58
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %13, i64 noundef %indvars.iv71) #4
  %53 = load double, ptr %52, align 8, !tbaa !27
  %54 = tail call noundef double @_ZN3ipx9DotColumnERKNS_12SparseMatrixEiRKSt8valarrayIdE(ptr noundef nonnull align 8 dereferenceable(128) %15, i32 noundef %49, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %55 = fsub double %53, %54
  %56 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef %indvars.iv71) #4
  store double %55, ptr %56, align 8, !tbaa !27
  br label %57

57:                                               ; preds = %.lr.ph58, %51
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge59, label %.lr.ph58, !llvm.loop !33
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1bEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3ipx5Model1cEv(ptr noundef nonnull align 8 dereferenceable(704)) local_unnamed_addr #0 align 2

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

; 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 #3

; 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 @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

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

attributes #0 = { 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 #1 = { 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 #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 = { 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 #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, !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 = !{!22, !22, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!21, !21, i64 0}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}


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