; LLVM IR from cvxpy/cvxpy :: cvxpy/cvxcore/src/LinOpOperations.ll (Z16get_param_coeffsRK5LinOpi)

; 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.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>, std::_Select1st<std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>, std::_Select1st<std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, 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.Eigen::SparseMatrix" = type { %"class.Eigen::SparseCompressedBase", i64, i64, ptr, ptr, %"class.Eigen::internal::CompressedStorage" }
%"class.Eigen::SparseCompressedBase" = type { %"class.Eigen::SparseMatrixBase" }
%"class.Eigen::SparseMatrixBase" = type { i8 }
%"class.Eigen::internal::CompressedStorage" = type { ptr, ptr, i64, i64 }

@_ZL11CONSTANT_ID = external hidden constant i32, align 4
@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._Z16get_param_coeffsRK5LinOpi = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16get_param_coeffsRK5LinOpi(ptr dead_on_unwind noalias writable sret(%"class.std::map") align 8 %0, ptr noundef nonnull align 8 dereferenceable(193) %1, i32 noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i1, align 1
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca %"class.std::vector", align 8
  %18 = alloca i1, align 1
  %19 = alloca i1, align 1
  %20 = alloca i1, align 1
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.Eigen::SparseMatrix", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193) %27)
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %30, label %31

30:                                               ; preds = %3
  br label %33

31:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.33, ptr noundef @.str.5, i32 noundef 1183, ptr noundef @__PRETTY_FUNCTION__._Z16get_param_coeffsRK5LinOpi) #5
  unreachable

32:                                               ; No predecessors!
  br label %33

33:                                               ; preds = %32, %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = call noundef i32 @_Z11get_id_dataRK5LinOpi(ptr noundef nonnull align 8 dereferenceable(193) %34, i32 noundef %35)
  store i32 %36, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(193) %37)
  %38 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %39 = icmp uge i64 %38, 1
  store i1 false, ptr %11, align 1
  store i1 false, ptr %14, align 1
  br i1 %39, label %40, label %45

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #6
  store i1 true, ptr %11, align 1
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(193) %41)
          to label %42 unwind label %81

42:                                               ; preds = %40
  store i1 true, ptr %14, align 1
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #6
  %44 = load i32, ptr %43, align 4, !tbaa !9
  br label %46

45:                                               ; preds = %33
  br label %46

46:                                               ; preds = %45, %42
  %47 = phi i32 [ %44, %42 ], [ 1, %45 ]
  %48 = load i1, ptr %14, align 1
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %50

50:                                               ; preds = %49, %46
  %51 = load i1, ptr %11, align 1
  br i1 %51, label %52, label %53

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

53:                                               ; preds = %52, %50
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  store i32 %47, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #6
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(193) %54)
  %55 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  %56 = icmp uge i64 %55, 2
  store i1 false, ptr %18, align 1
  store i1 false, ptr %19, align 1
  br i1 %56, label %57, label %62

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  store i1 true, ptr %18, align 1
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(193) %58)
          to label %59 unwind label %88

59:                                               ; preds = %57
  store i1 true, ptr %19, align 1
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 1) #6
  %61 = load i32, ptr %60, align 4, !tbaa !9
  br label %63

62:                                               ; preds = %53
  br label %63

63:                                               ; preds = %62, %59
  %64 = phi i32 [ %61, %59 ], [ 1, %62 ]
  %65 = load i1, ptr %19, align 1
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  br label %67

67:                                               ; preds = %66, %63
  %68 = load i1, ptr %18, align 1
  br i1 %68, label %69, label %70

69:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br label %70

70:                                               ; preds = %69, %67
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  store i32 %64, ptr %15, align 4, !tbaa !9
  store i1 false, ptr %20, align 1
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %71 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %72 unwind label %95

72:                                               ; preds = %70
  store ptr %71, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %73 = load ptr, ptr %21, align 8, !tbaa !5
  %74 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %73, ptr noundef nonnull align 4 dereferenceable(4) @_ZL11CONSTANT_ID)
          to label %75 unwind label %99

75:                                               ; preds = %72
  store ptr %74, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %130, %75
  %77 = load i32, ptr %23, align 4, !tbaa !9
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = icmp ult i32 %77, %78
  br i1 %79, label %103, label %80

80:                                               ; preds = %76
  store i32 2, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %133

81:                                               ; preds = %40
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %12, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %13, align 4
  %85 = load i1, ptr %11, align 1
  br i1 %85, label %86, label %87

86:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #6
  br label %87

87:                                               ; preds = %86, %81
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  br label %140

88:                                               ; preds = %57
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %12, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %13, align 4
  %92 = load i1, ptr %18, align 1
  br i1 %92, label %93, label %94

93:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br label %94

94:                                               ; preds = %93, %88
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #6
  br label %139

95:                                               ; preds = %70
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %12, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %13, align 4
  br label %136

99:                                               ; preds = %72
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %12, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %13, align 4
  br label %135

103:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %117, %103
  %105 = load i32, ptr %25, align 4, !tbaa !9
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = icmp ult i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %129

109:                                              ; preds = %104
  %110 = load ptr, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 72, ptr %26) #6
  %111 = load i32, ptr %8, align 4, !tbaa !9
  %112 = load i32, ptr %15, align 4, !tbaa !9
  %113 = load i32, ptr %25, align 4, !tbaa !9
  %114 = load i32, ptr %23, align 4, !tbaa !9
  invoke void @_Z15sparse_selectoriiii(ptr dead_on_unwind writable sret(%"class.Eigen::SparseMatrix") align 8 %26, i32 noundef %111, i32 noundef %112, i32 noundef %113, i32 noundef %114)
          to label %115 unwind label %120

115:                                              ; preds = %109
  invoke void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %110, ptr noundef nonnull align 8 dereferenceable(72) %26)
          to label %116 unwind label %124

116:                                              ; preds = %115
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %26) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %26) #6
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %25, align 4, !tbaa !9
  %119 = add i32 %118, 1
  store i32 %119, ptr %25, align 4, !tbaa !9
  br label %104, !llvm.loop !11

120:                                              ; preds = %109
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %12, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %13, align 4
  br label %128

124:                                              ; preds = %115
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %12, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %13, align 4
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %26) #6
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 72, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %135

129:                                              ; preds = %108
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %23, align 4, !tbaa !9
  %132 = add i32 %131, 1
  store i32 %132, ptr %23, align 4, !tbaa !9
  br label %76, !llvm.loop !13

133:                                              ; preds = %80
  store i1 true, ptr %20, align 1
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  %134 = load i1, ptr %20, align 1
  br i1 %134, label %138, label %137

135:                                              ; preds = %128, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %136

136:                                              ; preds = %135, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #6
  br label %139

137:                                              ; preds = %133
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #6
  br label %138

138:                                              ; preds = %137, %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

139:                                              ; preds = %136, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %140

140:                                              ; preds = %139, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %141

141:                                              ; preds = %140
  %142 = load ptr, ptr %12, align 8
  %143 = load i32, ptr %13, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15sparse_selectoriiii(ptr dead_on_unwind noalias writable sret(%"class.Eigen::SparseMatrix") align 8, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(193)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { noreturn nounwind }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>, std::_Select1st<std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>, std::_Select1st<std::pair<const int, std::map<int, std::vector<Eigen::SparseMatrix<double>>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, 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.Eigen::SparseMatrix" = type { %"class.Eigen::SparseCompressedBase", i64, i64, ptr, ptr, %"class.Eigen::internal::CompressedStorage" }
%"class.Eigen::SparseCompressedBase" = type { %"class.Eigen::SparseMatrixBase" }
%"class.Eigen::SparseMatrixBase" = type { i8 }
%"class.Eigen::internal::CompressedStorage" = type { ptr, ptr, i64, i64 }

@_ZL11CONSTANT_ID = external hidden constant i32, align 4
@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [24 x i8], align 1
@__PRETTY_FUNCTION__._Z16get_param_coeffsRK5LinOpi = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16get_param_coeffsRK5LinOpi(ptr dead_on_unwind noalias writable sret(%"class.std::map") align 8 %0, ptr noundef nonnull align 8 dereferenceable(193) %1, i32 noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.Eigen::SparseMatrix", align 8
  %10 = tail call noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193) %1)
  %11 = icmp eq i32 %10, 1
  br i1 %11, label %13, label %12

12:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.33, ptr noundef nonnull @.str.5, i32 noundef 1183, ptr noundef nonnull @__PRETTY_FUNCTION__._Z16get_param_coeffsRK5LinOpi) #5
  unreachable

13:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %14 = tail call noundef i32 @_Z11get_id_dataRK5LinOpi(ptr noundef nonnull align 8 dereferenceable(193) %1, i32 noundef %2)
  store i32 %14, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(193) %1)
  %15 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %.not.not = icmp eq i64 %15, 0
  br i1 %.not.not, label %.critedge, label %16

16:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(193) %1)
          to label %17 unwind label %38

17:                                               ; preds = %16
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  %19 = load i32, ptr %18, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %.critedge

.critedge:                                        ; preds = %13, %17
  %20 = phi i32 [ %19, %17 ], [ 1, %13 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(193) %1)
  %21 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %22 = icmp ugt i64 %21, 1
  br i1 %22, label %23, label %.critedge46

23:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(193) %1)
          to label %24 unwind label %40

24:                                               ; preds = %23
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 1) #6
  %26 = load i32, ptr %25, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %.critedge46

.critedge46:                                      ; preds = %.critedge, %24
  %27 = phi i32 [ %26, %24 ], [ 1, %.critedge ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #6
  %28 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %29 unwind label %42

29:                                               ; preds = %.critedge46
  %30 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 4 dereferenceable(4) @_ZL11CONSTANT_ID)
          to label %.preheader48 unwind label %44

.preheader48:                                     ; preds = %29
  %.not = icmp eq i32 %27, 0
  %.not55 = icmp eq i32 %20, 0
  %or.cond = select i1 %.not, i1 true, i1 %.not55
  br i1 %or.cond, label %._crit_edge51, label %.preheader.us

.preheader.us:                                    ; preds = %.preheader48, %._crit_edge.us
  %.02750.us = phi i32 [ %35, %._crit_edge.us ], [ 0, %.preheader48 ]
  br label %31

31:                                               ; preds = %.preheader.us, %33
  %.049.us = phi i32 [ 0, %.preheader.us ], [ %34, %33 ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %9) #6
  invoke void @_Z15sparse_selectoriiii(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::SparseMatrix") align 8 %9, i32 noundef %20, i32 noundef %27, i32 noundef %.049.us, i32 noundef %.02750.us)
          to label %32 unwind label %.split.us

32:                                               ; preds = %31
  invoke void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(72) %9)
          to label %33 unwind label %.split53.us

33:                                               ; preds = %32
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #6
  %34 = add nuw i32 %.049.us, 1
  %exitcond.not = icmp eq i32 %34, %20
  br i1 %exitcond.not, label %._crit_edge.us, label %31, !llvm.loop !9

._crit_edge.us:                                   ; preds = %33
  %35 = add nuw i32 %.02750.us, 1
  %exitcond57.not = icmp eq i32 %35, %27
  br i1 %exitcond57.not, label %._crit_edge51, label %.preheader.us, !llvm.loop !11

.split.us:                                        ; preds = %31
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %46

.split53.us:                                      ; preds = %32
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %9) #6
  br label %46

38:                                               ; preds = %16
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %48

40:                                               ; preds = %23
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %48

42:                                               ; preds = %.critedge46
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %47

44:                                               ; preds = %29
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %47

46:                                               ; preds = %.split53.us, %.split.us
  %.pn = phi { ptr, i32 } [ %37, %.split53.us ], [ %36, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %9) #6
  br label %47

47:                                               ; preds = %44, %46, %42
  %.pn.pn.pn = phi { ptr, i32 } [ %43, %42 ], [ %.pn, %46 ], [ %45, %44 ]
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #6
  br label %48

._crit_edge51:                                    ; preds = %._crit_edge.us, %.preheader48
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  ret void

48:                                               ; preds = %40, %47, %38
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %39, %38 ], [ %.pn.pn.pn, %47 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15sparse_selectoriiii(ptr dead_on_unwind noalias writable sret(%"class.Eigen::SparseMatrix") align 8, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z11get_id_dataRK5LinOpi(ptr noundef nonnull align 8 dereferenceable(193), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(193)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { noreturn nounwind }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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