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

; 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.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl" }
%"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<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.Eigen::Triplet" = type { i32, i32, double }
%"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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@__PRETTY_FUNCTION__._Z14get_vstack_matRK5LinOpi = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [54 x i8], align 1

; 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: 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 @_Z14get_vstack_matRK5LinOpi(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 %"class.std::vector.4", align 8
  %9 = alloca %"class.std::vector.33", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::vector.4", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %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 i32, align 4
  %21 = alloca %"class.std::vector", align 8
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca i1, align 1
  %24 = alloca i1, align 1
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca i1, align 1
  %27 = alloca i1, align 1
  %28 = alloca i32, align 4
  %29 = alloca %"class.std::vector", align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca %"class.std::vector.4", align 8
  %33 = alloca %"class.std::vector", align 8
  %34 = alloca %"class.std::vector", align 8
  %35 = alloca i1, align 1
  %36 = alloca i1, align 1
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca %"class.Eigen::Triplet", align 8
  %43 = alloca double, align 8
  %44 = alloca %"class.Eigen::SparseMatrix", align 8
  %45 = alloca %"class.std::vector", align 8
  %46 = alloca %"class.std::vector", align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator", 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
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193) %49)
  %51 = icmp eq i32 %50, 19
  br i1 %51, label %52, label %53

52:                                               ; preds = %3
  br label %55

53:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.5, i32 noundef 428, ptr noundef @__PRETTY_FUNCTION__._Z14get_vstack_matRK5LinOpi) #7
  unreachable

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54, %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !9
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #8
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK5LinOp8get_argsEv(ptr dead_on_unwind writable sret(%"class.std::vector.4") align 8 %8, ptr noundef nonnull align 8 dereferenceable(193) %58)
  %59 = call noundef i64 @_ZNKSt6vectorIPK5LinOpSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  %60 = icmp ule i64 %57, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %55
  br label %64

62:                                               ; preds = %55
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.5, i32 noundef 430, ptr noundef @__PRETTY_FUNCTION__._Z14get_vstack_matRK5LinOpi) #7
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %61
  call void @_ZNSt6vectorIPK5LinOpSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  call void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #8
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK5LinOp8get_argsEv(ptr dead_on_unwind writable sret(%"class.std::vector.4") align 8 %11, ptr noundef nonnull align 8 dereferenceable(193) %65)
          to label %66 unwind label %132

66:                                               ; preds = %64
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPK5LinOpSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %68) #8
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  call void @_ZNSt6vectorIPK5LinOpSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  store ptr %70, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(193) %71)
          to label %72 unwind label %136

72:                                               ; preds = %66
  %73 = invoke noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %74 unwind label %140

74:                                               ; preds = %72
  %75 = sext i32 %73 to i64
  invoke void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %75)
          to label %76 unwind label %140

76:                                               ; preds = %74
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #8
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  store i1 false, ptr %18, align 1
  store i1 false, ptr %19, align 1
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(193) %77)
          to label %78 unwind label %145

78:                                               ; preds = %76
  %79 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  %80 = icmp uge i64 %79, 2
  br i1 %80, label %81, label %86

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  store i1 true, ptr %18, align 1
  %82 = load ptr, ptr %10, 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) %82)
          to label %83 unwind label %149

83:                                               ; preds = %81
  store i1 true, ptr %19, align 1
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef 0) #8
  %85 = load i32, ptr %84, align 4, !tbaa !9
  br label %87

86:                                               ; preds = %78
  br label %87

87:                                               ; preds = %86, %83
  %88 = phi i32 [ %85, %83 ], [ 1, %86 ]
  %89 = load i1, ptr %19, align 1
  br i1 %89, label %90, label %91

90:                                               ; preds = %87
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  br label %91

91:                                               ; preds = %90, %87
  %92 = load i1, ptr %18, align 1
  br i1 %92, label %93, label %94

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

94:                                               ; preds = %93, %91
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  store i32 %88, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #8
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  store i1 false, ptr %23, align 1
  store i1 false, ptr %24, align 1
  store i1 false, ptr %26, align 1
  store i1 false, ptr %27, align 1
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %21, ptr noundef nonnull align 8 dereferenceable(193) %95)
          to label %96 unwind label %157

96:                                               ; preds = %94
  %97 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %98 = icmp uge i64 %97, 1
  br i1 %98, label %99, label %108

99:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #8
  store i1 true, ptr %23, align 1
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %22, ptr noundef nonnull align 8 dereferenceable(193) %100)
          to label %101 unwind label %161

101:                                              ; preds = %99
  store i1 true, ptr %24, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #8
  store i1 true, ptr %26, align 1
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %25, ptr noundef nonnull align 8 dereferenceable(193) %102)
          to label %103 unwind label %165

103:                                              ; preds = %101
  store i1 true, ptr %27, align 1
  %104 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  %105 = sub i64 %104, 1
  %106 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %105) #8
  %107 = load i32, ptr %106, align 4, !tbaa !9
  br label %109

108:                                              ; preds = %96
  br label %109

109:                                              ; preds = %108, %103
  %110 = phi i32 [ %107, %103 ], [ 1, %108 ]
  %111 = load i1, ptr %27, align 1
  br i1 %111, label %112, label %113

112:                                              ; preds = %109
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  br label %113

113:                                              ; preds = %112, %109
  %114 = load i1, ptr %26, align 1
  br i1 %114, label %115, label %116

115:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  br label %116

116:                                              ; preds = %115, %113
  %117 = load i1, ptr %24, align 1
  br i1 %117, label %118, label %119

118:                                              ; preds = %116
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  br label %119

119:                                              ; preds = %118, %116
  %120 = load i1, ptr %23, align 1
  br i1 %120, label %121, label %122

121:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  br label %122

122:                                              ; preds = %121, %119
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  store i32 %110, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #8
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %29, ptr noundef nonnull align 8 dereferenceable(193) %123)
          to label %124 unwind label %180

124:                                              ; preds = %122
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef 0) #8
  %126 = load i32, ptr %125, align 4, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  store i32 %126, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %211, %124
  %128 = load i32, ptr %30, align 4, !tbaa !9
  %129 = load i32, ptr %6, align 4, !tbaa !9
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %184, label %131

131:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %231

132:                                              ; preds = %64
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %12, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  br label %320

136:                                              ; preds = %66
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %12, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %13, align 4
  br label %144

140:                                              ; preds = %74, %72
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %12, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %13, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  br label %144

144:                                              ; preds = %140, %136
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  br label %320

145:                                              ; preds = %76
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %12, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %13, align 4
  br label %156

149:                                              ; preds = %81
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %12, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %13, align 4
  %153 = load i1, ptr %18, align 1
  br i1 %153, label %154, label %155

154:                                              ; preds = %149
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  br label %155

155:                                              ; preds = %154, %149
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  br label %156

156:                                              ; preds = %155, %145
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  br label %319

157:                                              ; preds = %94
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %12, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %13, align 4
  br label %179

161:                                              ; preds = %99
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %12, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %13, align 4
  br label %175

165:                                              ; preds = %101
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %12, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %13, align 4
  %169 = load i1, ptr %26, align 1
  br i1 %169, label %170, label %171

170:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  br label %171

171:                                              ; preds = %170, %165
  %172 = load i1, ptr %24, align 1
  br i1 %172, label %173, label %174

173:                                              ; preds = %171
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  br label %174

174:                                              ; preds = %173, %171
  br label %175

175:                                              ; preds = %174, %161
  %176 = load i1, ptr %23, align 1
  br i1 %176, label %177, label %178

177:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #8
  br label %178

178:                                              ; preds = %177, %175
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  br label %179

179:                                              ; preds = %178, %157
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  br label %318

180:                                              ; preds = %122
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %12, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  br label %317

184:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #8
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK5LinOp8get_argsEv(ptr dead_on_unwind writable sret(%"class.std::vector.4") align 8 %32, ptr noundef nonnull align 8 dereferenceable(193) %185)
          to label %186 unwind label %214

186:                                              ; preds = %184
  %187 = load i32, ptr %30, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPK5LinOpSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %188) #8
  %190 = load ptr, ptr %189, align 8, !tbaa !5
  call void @_ZNSt6vectorIPK5LinOpSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  store ptr %190, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #8
  %191 = load ptr, ptr %31, align 8, !tbaa !5
  store i1 false, ptr %35, align 1
  store i1 false, ptr %36, align 1
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %33, ptr noundef nonnull align 8 dereferenceable(193) %191)
          to label %192 unwind label %218

192:                                              ; preds = %186
  %193 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #8
  %194 = icmp uge i64 %193, 2
  br i1 %194, label %195, label %200

195:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 24, ptr %34) #8
  store i1 true, ptr %35, align 1
  %196 = load ptr, ptr %31, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %34, ptr noundef nonnull align 8 dereferenceable(193) %196)
          to label %197 unwind label %222

197:                                              ; preds = %195
  store i1 true, ptr %36, align 1
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %34, i64 noundef 0) #8
  %199 = load i32, ptr %198, align 4, !tbaa !9
  br label %201

200:                                              ; preds = %192
  br label %201

201:                                              ; preds = %200, %197
  %202 = phi i32 [ %199, %197 ], [ 1, %200 ]
  %203 = load i32, ptr %7, align 4, !tbaa !9
  %204 = add nsw i32 %203, %202
  store i32 %204, ptr %7, align 4, !tbaa !9
  %205 = load i1, ptr %36, align 1
  br i1 %205, label %206, label %207

206:                                              ; preds = %201
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #8
  br label %207

207:                                              ; preds = %206, %201
  %208 = load i1, ptr %35, align 1
  br i1 %208, label %209, label %210

209:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #8
  br label %210

210:                                              ; preds = %209, %207
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %30, align 4, !tbaa !9
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %30, align 4, !tbaa !9
  br label %127, !llvm.loop !11

214:                                              ; preds = %184
  %215 = landingpad { ptr, i32 }
          cleanup
  %216 = extractvalue { ptr, i32 } %215, 0
  store ptr %216, ptr %12, align 8
  %217 = extractvalue { ptr, i32 } %215, 1
  store i32 %217, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  br label %230

218:                                              ; preds = %186
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %12, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %13, align 4
  br label %229

222:                                              ; preds = %195
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %12, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %13, align 4
  %226 = load i1, ptr %35, align 1
  br i1 %226, label %227, label %228

227:                                              ; preds = %222
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #8
  br label %228

228:                                              ; preds = %227, %222
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #8
  br label %229

229:                                              ; preds = %228, %218
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #8
  br label %230

230:                                              ; preds = %229, %214
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %317

231:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  store i32 0, ptr %37, align 4, !tbaa !9
  br label %232

232:                                              ; preds = %266, %231
  %233 = load i32, ptr %37, align 4, !tbaa !9
  %234 = load i32, ptr %15, align 4, !tbaa !9
  %235 = icmp slt i32 %233, %234
  br i1 %235, label %237, label %236

236:                                              ; preds = %232
  store i32 5, ptr %38, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %269

237:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  store i32 0, ptr %39, align 4, !tbaa !9
  br label %238

238:                                              ; preds = %258, %237
  %239 = load i32, ptr %39, align 4, !tbaa !9
  %240 = load i32, ptr %20, align 4, !tbaa !9
  %241 = icmp slt i32 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %238
  store i32 8, ptr %38, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %265

243:                                              ; preds = %238
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  %244 = load i32, ptr %37, align 4, !tbaa !9
  %245 = load i32, ptr %39, align 4, !tbaa !9
  %246 = load i32, ptr %28, align 4, !tbaa !9
  %247 = mul nsw i32 %245, %246
  %248 = add nsw i32 %244, %247
  %249 = load i32, ptr %7, align 4, !tbaa !9
  %250 = add nsw i32 %248, %249
  store i32 %250, ptr %40, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %251 = load i32, ptr %37, align 4, !tbaa !9
  %252 = load i32, ptr %39, align 4, !tbaa !9
  %253 = load i32, ptr %15, align 4, !tbaa !9
  %254 = mul nsw i32 %252, %253
  %255 = add nsw i32 %251, %254
  store i32 %255, ptr %41, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  store double 1.000000e+00, ptr %43, align 8, !tbaa !13
  invoke void @_ZN5Eigen7TripletIdiEC2ERKiS3_RKd(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 4 dereferenceable(4) %40, ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %256 unwind label %261

256:                                              ; preds = %243
  invoke void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %42)
          to label %257 unwind label %261

257:                                              ; preds = %256
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %39, align 4, !tbaa !9
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %39, align 4, !tbaa !9
  br label %238, !llvm.loop !15

261:                                              ; preds = %256, %243
  %262 = landingpad { ptr, i32 }
          cleanup
  %263 = extractvalue { ptr, i32 } %262, 0
  store ptr %263, ptr %12, align 8
  %264 = extractvalue { ptr, i32 } %262, 1
  store i32 %264, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %317

265:                                              ; preds = %242
  br label %266

266:                                              ; preds = %265
  %267 = load i32, ptr %37, align 4, !tbaa !9
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %37, align 4, !tbaa !9
  br label %232, !llvm.loop !16

269:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 72, ptr %44) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %45) #8
  %270 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %45, ptr noundef nonnull align 8 dereferenceable(193) %270)
          to label %271 unwind label %288

271:                                              ; preds = %269
  %272 = invoke noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %273 unwind label %292

273:                                              ; preds = %271
  %274 = sext i32 %272 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %46) #8
  %275 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %46, ptr noundef nonnull align 8 dereferenceable(193) %275)
          to label %276 unwind label %296

276:                                              ; preds = %273
  %277 = invoke noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %46)
          to label %278 unwind label %300

278:                                              ; preds = %276
  %279 = sext i32 %277 to i64
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiEC2Ell(ptr noundef nonnull align 8 dereferenceable(72) %44, i64 noundef %274, i64 noundef %279)
          to label %280 unwind label %300

280:                                              ; preds = %278
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %46) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %281 = call ptr @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %282 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %47, i32 0, i32 0
  store ptr %281, ptr %282, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %283 = call ptr @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %284 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %48, i32 0, i32 0
  store ptr %283, ptr %284, align 8
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiE15setFromTripletsIN9__gnu_cxx17__normal_iteratorIPNS_7TripletIdiEESt6vectorIS6_SaIS6_EEEEEEvRKT_SE_(ptr noundef nonnull align 8 dereferenceable(72) %44, ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %48)
          to label %285 unwind label %307

285:                                              ; preds = %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiE14makeCompressedEv(ptr noundef nonnull align 8 dereferenceable(72) %44)
          to label %286 unwind label %311

286:                                              ; preds = %285
  invoke void @_Z12build_tensorRN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind writable sret(%"class.std::map") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %44)
          to label %287 unwind label %311

287:                                              ; preds = %286
  store i32 1, ptr %38, align 4
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %44) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  ret void

288:                                              ; preds = %269
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %12, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %13, align 4
  br label %306

292:                                              ; preds = %271
  %293 = landingpad { ptr, i32 }
          cleanup
  %294 = extractvalue { ptr, i32 } %293, 0
  store ptr %294, ptr %12, align 8
  %295 = extractvalue { ptr, i32 } %293, 1
  store i32 %295, ptr %13, align 4
  br label %305

296:                                              ; preds = %273
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %12, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %13, align 4
  br label %304

300:                                              ; preds = %278, %276
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %12, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %13, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %46) #8
  br label %304

304:                                              ; preds = %300, %296
  call void @llvm.lifetime.end.p0(i64 24, ptr %46) #8
  br label %305

305:                                              ; preds = %304, %292
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %45) #8
  br label %306

306:                                              ; preds = %305, %288
  call void @llvm.lifetime.end.p0(i64 24, ptr %45) #8
  br label %316

307:                                              ; preds = %280
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %12, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  br label %315

311:                                              ; preds = %286, %285
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %12, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %13, align 4
  br label %315

315:                                              ; preds = %311, %307
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %44) #8
  br label %316

316:                                              ; preds = %315, %306
  call void @llvm.lifetime.end.p0(i64 72, ptr %44) #8
  br label %317

317:                                              ; preds = %316, %261, %230, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %318

318:                                              ; preds = %317, %179
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %319

319:                                              ; preds = %318, %156
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %320

320:                                              ; preds = %319, %144, %132
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %321

321:                                              ; preds = %320
  %322 = load ptr, ptr %12, align 8
  %323 = load i32, ptr %13, align 4
  %324 = insertvalue { ptr, i32 } poison, ptr %322, 0
  %325 = insertvalue { ptr, i32 } %324, i32 %323, 1
  resume { ptr, i32 } %325
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12build_tensorRN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind noalias writable sret(%"class.std::map") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #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: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiEC2Ell(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, i64 noundef) unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen7TripletIdiEC2ERKiS3_RKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiE14makeCompressedEv(ptr noundef nonnull align 8 dereferenceable(72)) #2 align 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

declare noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24)) #6

; 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 = { 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 = { 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 #6 = { "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, !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 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !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.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl" }
%"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const LinOp *, std::allocator<const LinOp *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::Triplet<double>, std::allocator<Eigen::Triplet<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.Eigen::Triplet" = type { i32, i32, double }
%"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 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@__PRETTY_FUNCTION__._Z14get_vstack_matRK5LinOpi = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [54 x i8], align 1

; 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 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 @_Z14get_vstack_matRK5LinOpi(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 %"class.std::vector.4", align 8
  %5 = alloca %"class.std::vector.33", align 8
  %6 = alloca %"class.std::vector.4", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca %"class.std::vector", align 8
  %11 = alloca %"class.std::vector", align 8
  %12 = alloca %"class.std::vector", align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::vector.4", align 8
  %15 = alloca %"class.std::vector", align 8
  %16 = alloca %"class.std::vector", align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.Eigen::Triplet", align 8
  %20 = alloca double, align 8
  %21 = alloca %"class.Eigen::SparseMatrix", align 8
  %22 = alloca %"class.std::vector", align 8
  %23 = alloca %"class.std::vector", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = tail call noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193) %1)
  %27 = icmp eq i32 %26, 19
  br i1 %27, label %29, label %28

28:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.5, i32 noundef 428, ptr noundef nonnull @__PRETTY_FUNCTION__._Z14get_vstack_matRK5LinOpi) #7
  unreachable

29:                                               ; preds = %3
  %30 = sext i32 %2 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZNK5LinOp8get_argsEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.4") align 8 %4, ptr noundef nonnull align 8 dereferenceable(193) %1)
  %31 = call noundef i64 @_ZNKSt6vectorIPK5LinOpSaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  %.not = icmp ult i64 %31, %30
  br i1 %.not, label %32, label %33

32:                                               ; preds = %29
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.5, i32 noundef 430, ptr noundef nonnull @__PRETTY_FUNCTION__._Z14get_vstack_matRK5LinOpi) #7
  unreachable

33:                                               ; preds = %29
  call void @_ZNSt6vectorIPK5LinOpSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  invoke void @_ZNK5LinOp8get_argsEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.4") align 8 %6, ptr noundef nonnull align 8 dereferenceable(193) %1)
          to label %34 unwind label %75

34:                                               ; preds = %33
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPK5LinOpSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %30) #8
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  call void @_ZNSt6vectorIPK5LinOpSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(193) %36)
          to label %37 unwind label %77

37:                                               ; preds = %34
  %38 = invoke noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %39 unwind label %79

39:                                               ; preds = %37
  %40 = sext i32 %38 to i64
  invoke void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40)
          to label %41 unwind label %79

41:                                               ; preds = %39
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(193) %36)
          to label %42 unwind label %82

42:                                               ; preds = %41
  %43 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  %44 = icmp ugt i64 %43, 1
  br i1 %44, label %45, label %.critedge

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(193) %36)
          to label %46 unwind label %84

46:                                               ; preds = %45
  %47 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 0) #8
  %48 = load i32, ptr %47, align 4, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  br label %.critedge

.critedge:                                        ; preds = %42, %46
  %49 = phi i32 [ %48, %46 ], [ 1, %42 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(193) %36)
          to label %50 unwind label %87

50:                                               ; preds = %.critedge
  %51 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  %.not81.not = icmp eq i64 %51, 0
  br i1 %.not81.not, label %.critedge102, label %52

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %11, ptr noundef nonnull align 8 dereferenceable(193) %36)
          to label %53 unwind label %89

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(193) %36)
          to label %.critedge100 unwind label %91

.critedge100:                                     ; preds = %53
  %54 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %55 = add i64 %54, -1
  %56 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %55) #8
  %57 = load i32, ptr %56, align 4, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  br label %.critedge102

.critedge102:                                     ; preds = %50, %.critedge100
  %58 = phi i32 [ %57, %.critedge100 ], [ 1, %50 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(193) %1)
          to label %59 unwind label %95

59:                                               ; preds = %.critedge102
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #8
  %61 = load i32, ptr %60, align 4, !tbaa !9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  %62 = icmp sgt i32 %2, 0
  br i1 %62, label %.lr.ph.preheader, label %.preheader107

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

.preheader107:                                    ; preds = %.critedge104, %59
  %.052.lcssa = phi i32 [ 0, %59 ], [ %110, %.critedge104 ]
  %63 = icmp sgt i32 %49, 0
  %64 = icmp sgt i32 %58, 0
  %or.cond = select i1 %63, i1 %64, i1 false
  br i1 %or.cond, label %.preheader.us, label %._crit_edge116

.preheader.us:                                    ; preds = %.preheader107, %._crit_edge.us
  %.049115.us = phi i32 [ %73, %._crit_edge.us ], [ 0, %.preheader107 ]
  %65 = add i32 %.049115.us, %.052.lcssa
  br label %66

66:                                               ; preds = %.preheader.us, %71
  %.0113.us = phi i32 [ 0, %.preheader.us ], [ %72, %71 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  %67 = mul nsw i32 %.0113.us, %61
  %68 = add i32 %65, %67
  store i32 %68, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  %69 = mul nuw nsw i32 %.0113.us, %49
  %70 = add nuw nsw i32 %69, %.049115.us
  store i32 %70, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  store double 1.000000e+00, ptr %20, align 8, !tbaa !11
  call void @_ZN5Eigen7TripletIdiEC2ERKiS3_RKd(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 8 dereferenceable(8) %20)
  invoke void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %19)
          to label %71 unwind label %.split.us

71:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  %72 = add nuw nsw i32 %.0113.us, 1
  %exitcond119.not = icmp eq i32 %72, %58
  br i1 %exitcond119.not, label %._crit_edge.us, label %66, !llvm.loop !13

._crit_edge.us:                                   ; preds = %71
  %73 = add nuw nsw i32 %.049115.us, 1
  %exitcond120.not = icmp eq i32 %73, %49
  br i1 %exitcond120.not, label %._crit_edge116, label %.preheader.us, !llvm.loop !15

.split.us:                                        ; preds = %66
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  br label %149

75:                                               ; preds = %33
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %149

77:                                               ; preds = %34
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %39, %37
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  br label %81

81:                                               ; preds = %79, %77
  %.pn = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  br label %149

82:                                               ; preds = %41
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %86

84:                                               ; preds = %45
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #8
  br label %86

86:                                               ; preds = %84, %82
  %.pn79 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  br label %149

87:                                               ; preds = %.critedge
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %94

89:                                               ; preds = %52
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

91:                                               ; preds = %53
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  br label %93

93:                                               ; preds = %89, %91
  %.pn82 = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  br label %94

94:                                               ; preds = %93, %87
  %.pn82.pn = phi { ptr, i32 } [ %.pn82, %93 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  br label %149

95:                                               ; preds = %.critedge102
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #8
  br label %149

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.critedge104
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.critedge104 ]
  %.052112 = phi i32 [ 0, %.lr.ph.preheader ], [ %110, %.critedge104 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #8
  invoke void @_ZNK5LinOp8get_argsEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.4") align 8 %14, ptr noundef nonnull align 8 dereferenceable(193) %1)
          to label %97 unwind label %111

97:                                               ; preds = %.lr.ph
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIPK5LinOpSaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %indvars.iv) #8
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  call void @_ZNSt6vectorIPK5LinOpSaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(193) %99)
          to label %100 unwind label %113

100:                                              ; preds = %97
  %101 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  %102 = icmp ugt i64 %101, 1
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %16, ptr noundef nonnull align 8 dereferenceable(193) %99)
          to label %106 unwind label %115

104:                                              ; preds = %100
  %105 = add nsw i32 %.052112, 1
  br label %.critedge104

106:                                              ; preds = %103
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef 0) #8
  %108 = load i32, ptr %107, align 4, !tbaa !9
  %109 = add nsw i32 %108, %.052112
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #8
  br label %.critedge104

.critedge104:                                     ; preds = %104, %106
  %110 = phi i32 [ %105, %104 ], [ %109, %106 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  %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 %.preheader107, label %.lr.ph, !llvm.loop !16

111:                                              ; preds = %.lr.ph
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #8
  br label %149

113:                                              ; preds = %97
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %117

115:                                              ; preds = %103
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #8
  br label %117

117:                                              ; preds = %115, %113
  %.pn92 = phi { ptr, i32 } [ %116, %115 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  br label %149

._crit_edge116:                                   ; preds = %._crit_edge.us, %.preheader107
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %21) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %22, ptr noundef nonnull align 8 dereferenceable(193) %1)
          to label %118 unwind label %132

118:                                              ; preds = %._crit_edge116
  %119 = invoke noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %22)
          to label %120 unwind label %134

120:                                              ; preds = %118
  %121 = sext i32 %119 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %23) #8
  invoke void @_ZNK5LinOp9get_shapeEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %23, ptr noundef nonnull align 8 dereferenceable(193) %36)
          to label %122 unwind label %136

122:                                              ; preds = %120
  %123 = invoke noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %124 unwind label %138

124:                                              ; preds = %122
  %125 = sext i32 %123 to i64
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiEC2Ell(ptr noundef nonnull align 8 dereferenceable(72) %21, i64 noundef %121, i64 noundef %125)
          to label %126 unwind label %138

126:                                              ; preds = %124
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #8
  %127 = call ptr @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  store ptr %127, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #8
  %128 = call ptr @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  store ptr %128, ptr %25, align 8
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiE15setFromTripletsIN9__gnu_cxx17__normal_iteratorIPNS_7TripletIdiEESt6vectorIS6_SaIS6_EEEEEEvRKT_SE_(ptr noundef nonnull align 8 dereferenceable(72) %21, ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %129 unwind label %143

129:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  invoke void @_ZN5Eigen12SparseMatrixIdLi0EiE14makeCompressedEv(ptr noundef nonnull align 8 dereferenceable(72) %21)
          to label %130 unwind label %145

130:                                              ; preds = %129
  invoke void @_Z12build_tensorRN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind writable sret(%"class.std::map") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %21)
          to label %131 unwind label %145

131:                                              ; preds = %130
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %21) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %21) #8
  call void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  ret void

132:                                              ; preds = %._crit_edge116
  %133 = landingpad { ptr, i32 }
          cleanup
  br label %142

134:                                              ; preds = %118
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %141

136:                                              ; preds = %120
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %140

138:                                              ; preds = %124, %122
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  br label %140

140:                                              ; preds = %138, %136
  %.pn85 = phi { ptr, i32 } [ %139, %138 ], [ %137, %136 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %23) #8
  br label %141

141:                                              ; preds = %140, %134
  %.pn85.pn = phi { ptr, i32 } [ %.pn85, %140 ], [ %135, %134 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #8
  br label %142

142:                                              ; preds = %141, %132
  %.pn85.pn.pn = phi { ptr, i32 } [ %.pn85.pn, %141 ], [ %133, %132 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #8
  br label %148

143:                                              ; preds = %126
  %144 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #8
  br label %147

145:                                              ; preds = %130, %129
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %147

147:                                              ; preds = %145, %143
  %.pn89 = phi { ptr, i32 } [ %146, %145 ], [ %144, %143 ]
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %21) #8
  br label %148

148:                                              ; preds = %147, %142
  %.pn89.pn = phi { ptr, i32 } [ %.pn89, %147 ], [ %.pn85.pn.pn, %142 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %21) #8
  br label %149

149:                                              ; preds = %86, %95, %.split.us, %148, %117, %111, %94, %81, %75
  %.pn92.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn, %81 ], [ %76, %75 ], [ %.pn79, %86 ], [ %.pn82.pn, %94 ], [ %74, %.split.us ], [ %.pn89.pn, %148 ], [ %96, %95 ], [ %.pn92, %117 ], [ %112, %111 ]
  call void @_ZNSt6vectorIN5Eigen7TripletIdiEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  resume { ptr, i32 } %.pn92.pn.pn.pn.pn.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12build_tensorRN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind noalias writable sret(%"class.std::map") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #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: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiEC2Ell(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, i64 noundef) unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen7TripletIdiEC2ERKiS3_RKd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiE14makeCompressedEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2 align 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

declare noundef i32 @_Z7vecprodRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #6

; 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 = { 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 = { 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 #6 = { "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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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