; LLVM IR from cvxpy/cvxpy :: cvxpy/cvxcore/src/LinOpOperations.ll (Z20get_mul_elemwise_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 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { 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 }
%"struct.std::pair" = type { i32, %"class.std::map.17" }
%"class.std::map.17" = type { %"class.std::_Rb_tree.18" }
%"class.std::_Rb_tree.18" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::vector<Eigen::SparseMatrix<double>>>, std::_Select1st<std::pair<const int, std::vector<Eigen::SparseMatrix<double>>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::vector<Eigen::SparseMatrix<double>>>, std::_Select1st<std::pair<const int, std::vector<Eigen::SparseMatrix<double>>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::pair.51" = type { i32, %"class.std::vector.22" }
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = type { %"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Eigen::SparseMatrix<double>, std::allocator<Eigen::SparseMatrix<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._Z20get_mul_elemwise_matRK5LinOpi = external hidden unnamed_addr constant [48 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: 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 @_Z20get_mul_elemwise_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 i1, align 1
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.Eigen::SparseMatrix", align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  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
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193) %21)
  %23 = icmp eq i32 %22, 5
  br i1 %23, label %24, label %25

24:                                               ; preds = %3
  br label %27

25:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.21, ptr noundef @.str.5, i32 noundef 770, ptr noundef @__PRETTY_FUNCTION__._Z20get_mul_elemwise_matRK5LinOpi) #7
  unreachable

26:                                               ; No predecessors!
  br label %27

27:                                               ; preds = %26, %24
  store i1 false, ptr %7, align 1
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call noundef ptr @_ZNK5LinOp14get_linOp_dataEv(ptr noundef nonnull align 8 dereferenceable(193) %28)
  call void @_Z13lin_to_tensorRK5LinOp(ptr dead_on_unwind writable sret(%"class.std::map") align 8 %0, ptr noundef nonnull align 8 dereferenceable(193) %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %30 = call ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  %31 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %8, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  br label %32

32:                                               ; preds = %96, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %33 = call ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  %34 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %9, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  %35 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEESH_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %98

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %38 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %39 = getelementptr inbounds %"struct.std::pair", ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !11
  store i32 %40, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %41 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %42 = getelementptr inbounds %"struct.std::pair", ptr %41, i32 0, i32 1
  store ptr %42, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = call ptr @_ZNKSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %43) #8
  %45 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  br label %46

46:                                               ; preds = %93, %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = call ptr @_ZNKSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %47) #8
  %49 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  %50 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEESB_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br i1 %50, label %52, label %51

51:                                               ; preds = %46
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %95

52:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %53 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %54 = getelementptr inbounds %"struct.std::pair.51", ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !22
  store i32 %55, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %56 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %57 = getelementptr inbounds %"struct.std::pair.51", ptr %56, i32 0, i32 1
  store ptr %57, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %80, %52
  %59 = load i32, ptr %17, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = load ptr, ptr %16, align 8, !tbaa !5
  %62 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #8
  %63 = icmp ult i64 %60, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %58
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %92

65:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 72, ptr %18) #8
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = load i32, ptr %17, align 4, !tbaa !9
  %68 = zext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #8
  invoke void @_Z11diagonalizeRKN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind writable sret(%"class.Eigen::SparseMatrix") align 8 %18, ptr noundef nonnull align 8 dereferenceable(72) %69)
          to label %70 unwind label %83

70:                                               ; preds = %65
  %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) %11)
          to label %72 unwind label %87

72:                                               ; preds = %70
  %73 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %71, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %74 unwind label %87

74:                                               ; preds = %72
  %75 = load i32, ptr %17, align 4, !tbaa !9
  %76 = zext i32 %75 to i64
  %77 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %76) #8
  %78 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN5Eigen12SparseMatrixIdLi0EiEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(72) %77, ptr noundef nonnull align 8 dereferenceable(72) %18)
          to label %79 unwind label %87

79:                                               ; preds = %74
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %18) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #8
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %17, align 4, !tbaa !9
  %82 = add i32 %81, 1
  store i32 %82, ptr %17, align 4, !tbaa !9
  br label %58, !llvm.loop !28

83:                                               ; preds = %65
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %19, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %20, align 4
  br label %91

87:                                               ; preds = %74, %72, %70
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %19, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %20, align 4
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %18) #8
  br label %91

91:                                               ; preds = %87, %83
  call void @llvm.lifetime.end.p0(i64 72, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  br label %102

92:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %93

93:                                               ; preds = %92
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br label %46, !llvm.loop !30

95:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %96

96:                                               ; preds = %95
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br label %32, !llvm.loop !31

98:                                               ; preds = %36
  store i1 true, ptr %7, align 1
  store i32 1, ptr %10, align 4
  %99 = load i1, ptr %7, align 1
  br i1 %99, label %101, label %100

100:                                              ; preds = %98
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  br label %101

101:                                              ; preds = %100, %98
  ret void

102:                                              ; preds = %91
  %103 = load ptr, ptr %19, align 8
  %104 = load i32, ptr %20, align 4
  %105 = insertvalue { ptr, i32 } poison, ptr %103, 0
  %106 = insertvalue { ptr, i32 } %105, i32 %104, 1
  resume { ptr, i32 } %106
}

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEESH_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

declare void @_Z11diagonalizeRKN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind writable sret(%"class.Eigen::SparseMatrix") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { 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 #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, !10, i64 0}
!12 = !{!"_ZTSSt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EESt4lessIiESaIS_IS0_S7_EEEE", !10, i64 0, !13, i64 8}
!13 = !{!"_ZTSSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEE", !14, i64 0}
!14 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEESt10_Select1stIS8_ESt4lessIiESaIS8_EE", !15, i64 0}
!15 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEESt10_Select1stIS8_ESt4lessIiESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !16, i64 0, !18, i64 8}
!16 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !17, i64 0}
!17 = !{!"_ZTSSt4lessIiE"}
!18 = !{!"_ZTSSt15_Rb_tree_header", !19, i64 0, !21, i64 32}
!19 = !{!"_ZTSSt18_Rb_tree_node_base", !20, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!23, !10, i64 0}
!23 = !{!"_ZTSSt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS4_EEE", !10, i64 0, !24, i64 8}
!24 = !{!"_ZTSSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}


; 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 }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::_Rb_tree_const_iterator" = type { 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 }

@.str.5 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._Z20get_mul_elemwise_matRK5LinOpi = external hidden unnamed_addr constant [48 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 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 @_Z20get_mul_elemwise_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 %"struct.std::_Rb_tree_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.Eigen::SparseMatrix", align 8
  %11 = tail call noundef i32 @_ZNK5LinOp8get_typeEv(ptr noundef nonnull align 8 dereferenceable(193) %1)
  %12 = icmp eq i32 %11, 5
  br i1 %12, label %14, label %13

13:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.5, i32 noundef 770, ptr noundef nonnull @__PRETTY_FUNCTION__._Z20get_mul_elemwise_matRK5LinOpi) #7
  unreachable

14:                                               ; preds = %3
  %15 = tail call noundef ptr @_ZNK5LinOp14get_linOp_dataEv(ptr noundef nonnull align 8 dereferenceable(193) %1)
  tail call void @_Z13lin_to_tensorRK5LinOp(ptr dead_on_unwind writable sret(%"class.std::map") align 8 %0, ptr noundef nonnull align 8 dereferenceable(193) %15)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %16 = tail call ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  store ptr %16, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %17 = tail call ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  store ptr %17, ptr %5, align 8
  %18 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEESH_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br i1 %18, label %.lr.ph21, label %._crit_edge22

._crit_edge22:                                    ; preds = %._crit_edge19, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  ret void

.lr.ph21:                                         ; preds = %14, %._crit_edge19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %19 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %20 = load i32, ptr %19, align 8, !tbaa !5
  store i32 %20, ptr %6, align 4, !tbaa !20
  %21 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %23 = call ptr @_ZNKSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %22) #8
  store ptr %23, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %24 = call ptr @_ZNKSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %22) #8
  store ptr %24, ptr %8, align 8
  %25 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %25, label %.lr.ph18, label %._crit_edge19

._crit_edge19:                                    ; preds = %._crit_edge, %.lr.ph21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %27 = call ptr @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  store ptr %27, ptr %5, align 8
  %28 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEESH_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  br i1 %28, label %.lr.ph21, label %._crit_edge22, !llvm.loop !21

.lr.ph18:                                         ; preds = %.lr.ph21, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %29 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %30 = load i32, ptr %29, align 8, !tbaa !23
  store i32 %30, ptr %9, align 4, !tbaa !20
  %31 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  %.not = icmp eq i64 %33, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %46, %.lr.ph18
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %35 = call ptr @_ZNKSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %22) #8
  store ptr %35, ptr %8, align 8
  %36 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEESB_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %36, label %.lr.ph18, label %._crit_edge19, !llvm.loop !29

.lr.ph:                                           ; preds = %.lr.ph18, %46
  %37 = phi i64 [ %48, %46 ], [ 0, %.lr.ph18 ]
  %.01316 = phi i32 [ %47, %46 ], [ 0, %.lr.ph18 ]
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %10) #8
  %38 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %37) #8
  invoke void @_Z11diagonalizeRKN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::SparseMatrix") align 8 %10, ptr noundef nonnull align 8 dereferenceable(72) %38)
          to label %39 unwind label %51

39:                                               ; preds = %.lr.ph
  %40 = 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) %6)
          to label %41 unwind label %53

41:                                               ; preds = %39
  %42 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %40, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %43 unwind label %53

43:                                               ; preds = %41
  %44 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZNSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %37) #8
  %45 = invoke noundef nonnull align 8 dereferenceable(72) ptr @_ZN5Eigen12SparseMatrixIdLi0EiEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(72) %44, ptr noundef nonnull align 8 dereferenceable(72) %10)
          to label %46 unwind label %53

46:                                               ; preds = %43
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %10) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #8
  %47 = add i32 %.01316, 1
  %48 = zext i32 %47 to i64
  %49 = call noundef i64 @_ZNKSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #8
  %50 = icmp ugt i64 %49, %48
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !30

51:                                               ; preds = %.lr.ph
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %55

53:                                               ; preds = %43, %41, %39
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %10) #8
  br label %55

55:                                               ; preds = %53, %51
  %.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @_ZNSt3mapIiS_IiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEES7_SaIS8_IS9_SC_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #8
  resume { ptr, i32 } %.pn
}

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

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen12SparseMatrixIdLi0EiED2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEESH_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEEESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

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

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

declare void @_Z11diagonalizeRKN5Eigen12SparseMatrixIdLi0EiEE(ptr dead_on_unwind writable sret(%"class.Eigen::SparseMatrix") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS6_EESt4lessIiESaIS0_IS1_S8_EEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTSSt4pairIKiSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EESt4lessIiESaIS_IS0_S7_EEEE", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt3mapIiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS3_EESt4lessIiESaISt4pairIKiS5_EEE", !11, i64 0}
!11 = !{!"_ZTSSt8_Rb_treeIiSt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEESt10_Select1stIS8_ESt4lessIiESaIS8_EE", !12, i64 0}
!12 = !{!"_ZTSNSt8_Rb_treeIiSt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS5_EEESt10_Select1stIS8_ESt4lessIiESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !13, i64 0, !15, i64 8}
!13 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIiEE", !14, i64 0}
!14 = !{!"_ZTSSt4lessIiE"}
!15 = !{!"_ZTSSt15_Rb_tree_header", !16, i64 0, !19, i64 32}
!16 = !{!"_ZTSSt18_Rb_tree_node_base", !17, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!17 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"long", !8, i64 0}
!20 = !{!7, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !7, i64 0}
!24 = !{!"_ZTSSt4pairIKiSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS4_EEE", !7, i64 0, !25, i64 8}
!25 = !{!"_ZTSSt6vectorIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN5Eigen12SparseMatrixIdLi0EiEESaIS2_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!29 = distinct !{!29, !22}
!30 = distinct !{!30, !22}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass