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

; 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::Model" = type { i8, i32, i32, i32, i32, %"class.ipx::SparseMatrix", %"class.ipx::SparseMatrix", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", double, double, i32, i32, i32, i32, i32, %"class.std::vector", %"class.std::vector.8", double, double, double, %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.std::valarray", %"class.ipx::SparseMatrix", %"class.std::vector", %"class.std::valarray", %"class.std::valarray" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ipx::SparseMatrix" = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.3", %"class.std::vector", %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [35 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx5Model10LoadPrimalEv = external hidden unnamed_addr constant [30 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx5Model10LoadPrimalEv(ptr noundef nonnull align 8 dereferenceable(704) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load ptr, ptr %2, align 8
  %7 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 13
  %8 = load i32, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 1
  store i32 %8, ptr %9, align 4, !tbaa !29
  %10 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %11 = load i32, ptr %10, align 8, !tbaa !30
  %12 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 2
  store i32 %11, ptr %12, align 8, !tbaa !31
  %13 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 0
  store i8 0, ptr %13, align 8, !tbaa !32
  %14 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 27
  %15 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 5
  %16 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3ipx12SparseMatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef nonnull align 8 dereferenceable(128) %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !33
  br label %17

17:                                               ; preds = %27, %1
  %18 = load i32, ptr %3, align 4, !tbaa !33
  %19 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 13
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = icmp slt i32 %18, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %30

23:                                               ; preds = %17
  %24 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 5
  %25 = load i32, ptr %3, align 4, !tbaa !33
  call void @_ZN3ipx12SparseMatrix9push_backEid(ptr noundef nonnull align 8 dereferenceable(128) %24, i32 noundef %25, double noundef 1.000000e+00)
  %26 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 5
  call void @_ZN3ipx12SparseMatrix10add_columnEv(ptr noundef nonnull align 8 dereferenceable(128) %26)
  br label %27

27:                                               ; preds = %23
  %28 = load i32, ptr %3, align 4, !tbaa !33
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %3, align 4, !tbaa !33
  br label %17, !llvm.loop !34

30:                                               ; preds = %22
  %31 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 5
  %32 = call noundef i32 @_ZNK3ipx12SparseMatrix4colsEv(ptr noundef nonnull align 8 dereferenceable(128) %31)
  %33 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %34 = load i32, ptr %33, align 8, !tbaa !30
  %35 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 13
  %36 = load i32, ptr %35, align 8, !tbaa !9
  %37 = add nsw i32 %34, %36
  %38 = icmp eq i32 %32, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %30
  br label %42

40:                                               ; preds = %30
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.18, i32 noundef 631, ptr noundef @__PRETTY_FUNCTION__._ZN3ipx5Model10LoadPrimalEv) #8
  unreachable

41:                                               ; No predecessors!
  br label %42

42:                                               ; preds = %41, %39
  %43 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 24
  %44 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 7
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(16) %43)
  %46 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 8
  %47 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %48 = load i32, ptr %47, align 8, !tbaa !30
  %49 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 13
  %50 = load i32, ptr %49, align 8, !tbaa !9
  %51 = add nsw i32 %48, %50
  %52 = sext i32 %51 to i64
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %46, i64 noundef %52, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store double 0.000000e+00, ptr %4, align 8, !tbaa !36
  %53 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 8
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %55 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 23
  %56 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %55) #7
  %57 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %58 = load i32, ptr %57, align 8, !tbaa !30
  %59 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 8
  %60 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %59) #7
  %61 = call noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef %56, i32 noundef %58, ptr noundef %60)
  %62 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 9
  %63 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !29
  %65 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !31
  %67 = add nsw i32 %64, %66
  %68 = sext i32 %67 to i64
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %62, i64 noundef %68, double noundef 0.000000e+00)
  %69 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 25
  %70 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %69) #7
  %71 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %72 = load i32, ptr %71, align 8, !tbaa !30
  %73 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 9
  %74 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %73) #7
  %75 = call noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef %70, i32 noundef %72, ptr noundef %74)
  %76 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 10
  %77 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 1
  %78 = load i32, ptr %77, align 4, !tbaa !29
  %79 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 2
  %80 = load i32, ptr %79, align 8, !tbaa !31
  %81 = add nsw i32 %78, %80
  %82 = sext i32 %81 to i64
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %76, i64 noundef %82, double noundef 0.000000e+00)
  %83 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 26
  %84 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %83) #7
  %85 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %86 = load i32, ptr %85, align 8, !tbaa !30
  %87 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 10
  %88 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %87) #7
  %89 = call noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef %84, i32 noundef %86, ptr noundef %88)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !33
  br label %90

90:                                               ; preds = %149, %42
  %91 = load i32, ptr %5, align 4, !tbaa !33
  %92 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 13
  %93 = load i32, ptr %92, align 8, !tbaa !9
  %94 = icmp slt i32 %91, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %152

96:                                               ; preds = %90
  %97 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 19
  %98 = load i32, ptr %5, align 4, !tbaa !33
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %99) #7
  %101 = load i8, ptr %100, align 1, !tbaa !37
  %102 = sext i8 %101 to i32
  switch i32 %102, label %148 [
    i32 61, label %103
    i32 60, label %118
    i32 62, label %133
  ]

103:                                              ; preds = %96
  %104 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 9
  %105 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %106 = load i32, ptr %105, align 8, !tbaa !30
  %107 = load i32, ptr %5, align 4, !tbaa !33
  %108 = add nsw i32 %106, %107
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %104, i64 noundef %109) #7
  store double 0.000000e+00, ptr %110, align 8, !tbaa !36
  %111 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 10
  %112 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %113 = load i32, ptr %112, align 8, !tbaa !30
  %114 = load i32, ptr %5, align 4, !tbaa !33
  %115 = add nsw i32 %113, %114
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %111, i64 noundef %116) #7
  store double 0.000000e+00, ptr %117, align 8, !tbaa !36
  br label %148

118:                                              ; preds = %96
  %119 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 9
  %120 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %121 = load i32, ptr %120, align 8, !tbaa !30
  %122 = load i32, ptr %5, align 4, !tbaa !33
  %123 = add nsw i32 %121, %122
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %119, i64 noundef %124) #7
  store double 0.000000e+00, ptr %125, align 8, !tbaa !36
  %126 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 10
  %127 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %128 = load i32, ptr %127, align 8, !tbaa !30
  %129 = load i32, ptr %5, align 4, !tbaa !33
  %130 = add nsw i32 %128, %129
  %131 = sext i32 %130 to i64
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %126, i64 noundef %131) #7
  store double 0x7FF0000000000000, ptr %132, align 8, !tbaa !36
  br label %148

133:                                              ; preds = %96
  %134 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 9
  %135 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %136 = load i32, ptr %135, align 8, !tbaa !30
  %137 = load i32, ptr %5, align 4, !tbaa !33
  %138 = add nsw i32 %136, %137
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %134, i64 noundef %139) #7
  store double 0xFFF0000000000000, ptr %140, align 8, !tbaa !36
  %141 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 10
  %142 = getelementptr inbounds %"class.ipx::Model", ptr %6, i32 0, i32 15
  %143 = load i32, ptr %142, align 8, !tbaa !30
  %144 = load i32, ptr %5, align 4, !tbaa !33
  %145 = add nsw i32 %143, %144
  %146 = sext i32 %145 to i64
  %147 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %141, i64 noundef %146) #7
  store double 0.000000e+00, ptr %147, align 8, !tbaa !36
  br label %148

148:                                              ; preds = %133, %118, %103, %96
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %5, align 4, !tbaa !33
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %5, align 4, !tbaa !33
  br label %90, !llvm.loop !38

152:                                              ; preds = %95
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, double noundef) #4 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: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZN3ipx12SparseMatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) #4 align 2

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

declare void @_ZN3ipx12SparseMatrix10add_columnEv(ptr noundef nonnull align 8 dereferenceable(128)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3ipx12SparseMatrix4colsEv(ptr noundef nonnull align 8 dereferenceable(128)) #6 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 noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef, i32 noundef, ptr noundef) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { 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, !12, i64 360}
!10 = !{!"_ZTSN3ipx5ModelE", !11, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !13, i64 24, !13, i64 152, !22, i64 280, !22, i64 296, !22, i64 312, !22, i64 328, !24, i64 344, !24, i64 352, !12, i64 360, !12, i64 364, !12, i64 368, !12, i64 372, !12, i64 376, !14, i64 384, !25, i64 408, !24, i64 432, !24, i64 440, !24, i64 448, !22, i64 456, !22, i64 472, !22, i64 488, !22, i64 504, !13, i64 520, !14, i64 648, !22, i64 672, !22, i64 688}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN3ipx12SparseMatrixE", !12, i64 0, !14, i64 8, !14, i64 32, !18, i64 56, !14, i64 80, !18, i64 104}
!14 = !{!"_ZTSSt6vectorIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSSt8valarrayIdE", !23, i64 0, !6, i64 8}
!23 = !{!"long", !7, i64 0}
!24 = !{!"double", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIcSaIcEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!10, !12, i64 4}
!30 = !{!10, !12, i64 368}
!31 = !{!10, !12, i64 8}
!32 = !{!10, !11, i64 0}
!33 = !{!12, !12, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!24, !24, i64 0}
!37 = !{!7, !7, i64 0}
!38 = distinct !{!38, !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.18 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [35 x i8], align 1
@__PRETTY_FUNCTION__._ZN3ipx5Model10LoadPrimalEv = external hidden unnamed_addr constant [30 x i8], align 1
@switch.table._ZN3ipx5Model10LoadPrimalEv = private unnamed_addr constant [3 x double] [double 0.000000e+00, double 0.000000e+00, double 0xFFF0000000000000], align 8
@switch.table._ZN3ipx5Model10LoadPrimalEv.1 = private unnamed_addr constant [3 x double] [double 0x7FF0000000000000, double 0.000000e+00, double 0.000000e+00], align 8

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3ipx5Model10LoadPrimalEv(ptr noundef nonnull align 8 dereferenceable(704) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca double, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 360
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %4, ptr %5, align 4, !tbaa !28
  %6 = getelementptr inbounds i8, ptr %0, i64 368
  %7 = load i32, ptr %6, align 8, !tbaa !29
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %7, ptr %8, align 8, !tbaa !30
  store i8 0, ptr %0, align 8, !tbaa !31
  %9 = getelementptr inbounds i8, ptr %0, i64 520
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = tail call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3ipx12SparseMatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(128) %10, ptr noundef nonnull align 8 dereferenceable(128) %9)
  %12 = load i32, ptr %3, align 8, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %1
  %14 = tail call noundef i32 @_ZNK3ipx12SparseMatrix4colsEv(ptr noundef nonnull align 8 dereferenceable(128) %10)
  %15 = load i32, ptr %6, align 8, !tbaa !29
  %16 = load i32, ptr %3, align 8, !tbaa !5
  %17 = add nsw i32 %16, %15
  %18 = icmp eq i32 %14, %17
  br i1 %18, label %23, label %22

.lr.ph:                                           ; preds = %1, %.lr.ph
  %.01213 = phi i32 [ %19, %.lr.ph ], [ 0, %1 ]
  tail call void @_ZN3ipx12SparseMatrix9push_backEid(ptr noundef nonnull align 8 dereferenceable(128) %10, i32 noundef %.01213, double noundef 1.000000e+00)
  tail call void @_ZN3ipx12SparseMatrix10add_columnEv(ptr noundef nonnull align 8 dereferenceable(128) %10)
  %19 = add nuw nsw i32 %.01213, 1
  %20 = load i32, ptr %3, align 8, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %.lr.ph, label %._crit_edge, !llvm.loop !32

22:                                               ; preds = %._crit_edge
  tail call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.18, i32 noundef 631, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3ipx5Model10LoadPrimalEv) #7
  unreachable

23:                                               ; preds = %._crit_edge
  %24 = getelementptr inbounds i8, ptr %0, i64 472
  %25 = getelementptr inbounds i8, ptr %0, i64 280
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %24)
  %27 = getelementptr inbounds i8, ptr %0, i64 296
  %28 = load i32, ptr %6, align 8, !tbaa !29
  %29 = load i32, ptr %3, align 8, !tbaa !5
  %30 = add nsw i32 %29, %28
  %31 = sext i32 %30 to i64
  tail call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %27, i64 noundef %31, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  store double 0.000000e+00, ptr %2, align 8, !tbaa !34
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEaSERKd(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  %33 = getelementptr inbounds i8, ptr %0, i64 456
  %34 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %33) #8
  %35 = load i32, ptr %6, align 8, !tbaa !29
  %36 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %27) #8
  %37 = call noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef %34, i32 noundef %35, ptr noundef %36)
  %38 = getelementptr inbounds i8, ptr %0, i64 312
  %39 = load i32, ptr %5, align 4, !tbaa !28
  %40 = load i32, ptr %8, align 8, !tbaa !30
  %41 = add nsw i32 %40, %39
  %42 = sext i32 %41 to i64
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %38, i64 noundef %42, double noundef 0.000000e+00)
  %43 = getelementptr inbounds i8, ptr %0, i64 488
  %44 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %43) #8
  %45 = load i32, ptr %6, align 8, !tbaa !29
  %46 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  %47 = call noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef %44, i32 noundef %45, ptr noundef %46)
  %48 = getelementptr inbounds i8, ptr %0, i64 328
  %49 = load i32, ptr %5, align 4, !tbaa !28
  %50 = load i32, ptr %8, align 8, !tbaa !30
  %51 = add nsw i32 %50, %49
  %52 = sext i32 %51 to i64
  call void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16) %48, i64 noundef %52, double noundef 0.000000e+00)
  %53 = getelementptr inbounds i8, ptr %0, i64 504
  %54 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %53) #8
  %55 = load i32, ptr %6, align 8, !tbaa !29
  %56 = call noundef ptr @_ZSt5beginIdEPT_RSt8valarrayIS0_E(ptr noundef nonnull align 8 dereferenceable(16) %48) #8
  %57 = call noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef %54, i32 noundef %55, ptr noundef %56)
  %58 = load i32, ptr %3, align 8, !tbaa !5
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %.lr.ph16, label %._crit_edge17

.lr.ph16:                                         ; preds = %23
  %60 = getelementptr inbounds i8, ptr %0, i64 408
  br label %61

._crit_edge17:                                    ; preds = %76, %23
  ret void

61:                                               ; preds = %.lr.ph16, %76
  %indvars.iv = phi i64 [ 0, %.lr.ph16 ], [ %indvars.iv.next, %76 ]
  %62 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %indvars.iv) #8
  %63 = load i8, ptr %62, align 1, !tbaa !35
  %switch.tableidx = add i8 %63, -60
  %64 = icmp ult i8 %switch.tableidx, 3
  br i1 %64, label %switch.lookup, label %76

switch.lookup:                                    ; preds = %61
  %65 = zext nneg i8 %switch.tableidx to i64
  %switch.gep = getelementptr inbounds [3 x double], ptr @switch.table._ZN3ipx5Model10LoadPrimalEv, i64 0, i64 %65
  %switch.load = load double, ptr %switch.gep, align 8
  %66 = zext nneg i8 %switch.tableidx to i64
  %switch.gep30 = getelementptr inbounds [3 x double], ptr @switch.table._ZN3ipx5Model10LoadPrimalEv.1, i64 0, i64 %66
  %switch.load31 = load double, ptr %switch.gep30, align 8
  %67 = load i32, ptr %6, align 8, !tbaa !29
  %68 = trunc nuw nsw i64 %indvars.iv to i32
  %69 = add nsw i32 %67, %68
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %38, i64 noundef %70) #8
  store double %switch.load, ptr %71, align 8, !tbaa !34
  %72 = load i32, ptr %6, align 8, !tbaa !29
  %73 = add nsw i32 %72, %68
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %48, i64 noundef %74) #8
  store double %switch.load31, ptr %75, align 8, !tbaa !34
  br label %76

76:                                               ; preds = %61, %switch.lookup
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %77 = load i32, ptr %3, align 8, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = icmp slt i64 %indvars.iv.next, %78
  br i1 %79, label %61, label %._crit_edge17, !llvm.loop !36
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNSt8valarrayIdE6resizeEmd(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, double noundef) local_unnamed_addr #4 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: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZN3ipx12SparseMatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #4 align 2

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

declare void @_ZN3ipx12SparseMatrix10add_columnEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #5

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

; 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 #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6copy_nIPdiS0_ET1_T_T0_S1_(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = { 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 #7 = { noreturn nounwind }
attributes #8 = { 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, !10, i64 360}
!6 = !{!"_ZTSN3ipx5ModelE", !7, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !11, i64 24, !11, i64 152, !21, i64 280, !21, i64 296, !21, i64 312, !21, i64 328, !23, i64 344, !23, i64 352, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !12, i64 384, !24, i64 408, !23, i64 432, !23, i64 440, !23, i64 448, !21, i64 456, !21, i64 472, !21, i64 488, !21, i64 504, !11, i64 520, !12, i64 648, !21, i64 672, !21, i64 688}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN3ipx12SparseMatrixE", !10, i64 0, !12, i64 8, !12, i64 32, !17, i64 56, !12, i64 80, !17, i64 104}
!12 = !{!"_ZTSSt6vectorIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!21 = !{!"_ZTSSt8valarrayIdE", !22, i64 0, !16, i64 8}
!22 = !{!"long", !8, i64 0}
!23 = !{!"double", !8, i64 0}
!24 = !{!"_ZTSSt6vectorIcSaIcEE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!28 = !{!6, !10, i64 4}
!29 = !{!6, !10, i64 368}
!30 = !{!6, !10, i64 8}
!31 = !{!6, !7, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!23, !23, i64 0}
!35 = !{!8, !8, i64 0}
!36 = distinct !{!36, !33}


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