; LLVM IR from Tinker-Twins/3D-LIDAR-Localization :: fast_gicp/thirdparty/nvbio/contrib/moderngpu/src (sparsematrix)

; 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::auto_ptr" = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, double>, std::_Select1st<std::pair<const int, double>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, double>, std::_Select1st<std::pair<const int, 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_const_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.mgpu::SparseMatrix" = type { i32, i32, i32, %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.8" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, double }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

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

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

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN4mgpu17MulSparseMatricesERKNS_12SparseMatrixES2_PSt8auto_ptrIS0_E(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef %2) #5 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::auto_ptr", align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::map", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %24 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %26 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 88) #7
  call void @_ZN4mgpu12SparseMatrixC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %26) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef %26) #6
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !9
  %30 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %31 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %30, i32 0, i32 0
  store i32 %29, ptr %31, align 8, !tbaa !9
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !20
  %35 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %36 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %35, i32 0, i32 1
  store i32 %34, ptr %36, align 4, !tbaa !20
  %37 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %38 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %37, i32 0, i32 2
  store i32 0, ptr %38, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !24
  br label %39

39:                                               ; preds = %193, %3
  %40 = load i32, ptr %9, align 4, !tbaa !24
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !9
  %44 = icmp slt i32 %40, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %39
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %197

46:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #6
  call void @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %47, i32 0, i32 3
  %49 = load i32, ptr %9, align 4, !tbaa !24
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %48, i64 noundef %50) #6
  %52 = load i32, ptr %51, align 4, !tbaa !24
  store i32 %52, ptr %12, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %53 = load i32, ptr %9, align 4, !tbaa !24
  %54 = add nsw i32 %53, 1
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %55, i32 0, i32 0
  %57 = load i32, ptr %56, align 8, !tbaa !9
  %58 = icmp slt i32 %54, %57
  br i1 %58, label %59, label %67

59:                                               ; preds = %46
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %60, i32 0, i32 3
  %62 = load i32, ptr %9, align 4, !tbaa !24
  %63 = add nsw i32 %62, 1
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %64) #6
  %66 = load i32, ptr %65, align 4, !tbaa !24
  br label %71

67:                                               ; preds = %46
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %68, i32 0, i32 2
  %70 = load i32, ptr %69, align 8, !tbaa !21
  br label %71

71:                                               ; preds = %67, %59
  %72 = phi i32 [ %66, %59 ], [ %70, %67 ]
  store i32 %72, ptr %13, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %73 = load i32, ptr %12, align 4, !tbaa !24
  store i32 %73, ptr %14, align 4, !tbaa !24
  br label %74

74:                                               ; preds = %155, %71
  %75 = load i32, ptr %14, align 4, !tbaa !24
  %76 = load i32, ptr %13, align 4, !tbaa !24
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %158

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %80, i32 0, i32 4
  %82 = load i32, ptr %14, align 4, !tbaa !24
  %83 = sext i32 %82 to i64
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #6
  %85 = load i32, ptr %84, align 4, !tbaa !24
  store i32 %85, ptr %15, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %86, i32 0, i32 5
  %88 = load i32, ptr %14, align 4, !tbaa !24
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %89) #6
  %91 = load double, ptr %90, align 8, !tbaa !25
  store double %91, ptr %16, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %92, i32 0, i32 3
  %94 = load i32, ptr %15, align 4, !tbaa !24
  %95 = sext i32 %94 to i64
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %95) #6
  %97 = load i32, ptr %96, align 4, !tbaa !24
  store i32 %97, ptr %17, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %98 = load i32, ptr %15, align 4, !tbaa !24
  %99 = add nsw i32 %98, 1
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !9
  %103 = icmp slt i32 %99, %102
  br i1 %103, label %104, label %112

104:                                              ; preds = %79
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %105, i32 0, i32 3
  %107 = load i32, ptr %15, align 4, !tbaa !24
  %108 = add nsw i32 %107, 1
  %109 = sext i32 %108 to i64
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %109) #6
  %111 = load i32, ptr %110, align 4, !tbaa !24
  br label %116

112:                                              ; preds = %79
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %113, i32 0, i32 2
  %115 = load i32, ptr %114, align 8, !tbaa !21
  br label %116

116:                                              ; preds = %112, %104
  %117 = phi i32 [ %111, %104 ], [ %115, %112 ]
  store i32 %117, ptr %18, align 4, !tbaa !24
  %118 = load i32, ptr %18, align 4, !tbaa !24
  %119 = load i32, ptr %17, align 4, !tbaa !24
  %120 = sub nsw i32 %118, %119
  %121 = sext i32 %120 to i64
  %122 = load i64, ptr %8, align 8, !tbaa !22
  %123 = add nsw i64 %122, %121
  store i64 %123, ptr %8, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %124 = load i32, ptr %17, align 4, !tbaa !24
  store i32 %124, ptr %19, align 4, !tbaa !24
  br label %125

125:                                              ; preds = %147, %116
  %126 = load i32, ptr %19, align 4, !tbaa !24
  %127 = load i32, ptr %18, align 4, !tbaa !24
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %154

130:                                              ; preds = %125
  %131 = load double, ptr %16, align 8, !tbaa !25
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %132, i32 0, i32 5
  %134 = load i32, ptr %19, align 4, !tbaa !24
  %135 = sext i32 %134 to i64
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %133, i64 noundef %135) #6
  %137 = load double, ptr %136, align 8, !tbaa !25
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %138, i32 0, i32 4
  %140 = load i32, ptr %19, align 4, !tbaa !24
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %141) #6
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %142)
          to label %144 unwind label %150

144:                                              ; preds = %130
  %145 = load double, ptr %143, align 8, !tbaa !25
  %146 = call double @llvm.fmuladd.f64(double %131, double %137, double %145)
  store double %146, ptr %143, align 8, !tbaa !25
  br label %147

147:                                              ; preds = %144
  %148 = load i32, ptr %19, align 4, !tbaa !24
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %19, align 4, !tbaa !24
  br label %125, !llvm.loop !27

150:                                              ; preds = %130
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %20, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %196

154:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %14, align 4, !tbaa !24
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %14, align 4, !tbaa !24
  br label %74, !llvm.loop !29

158:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %159 = call ptr @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  %160 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %23, i32 0, i32 0
  store ptr %159, ptr %160, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKidEEC2ERKSt17_Rb_tree_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  %161 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %162 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %161, i32 0, i32 3
  %163 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %164 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %163, i32 0, i32 2
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %162, ptr noundef nonnull align 4 dereferenceable(4) %164)
          to label %165 unwind label %182

165:                                              ; preds = %158
  br label %166

166:                                              ; preds = %180, %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %167 = call ptr @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  %168 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %25, i32 0, i32 0
  store ptr %167, ptr %168, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKidEEC2ERKSt17_Rb_tree_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #6
  %169 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKidEES5_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br i1 %169, label %170, label %186

170:                                              ; preds = %166
  %171 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %172 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %171, i32 0, i32 4
  %173 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKidEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %174 = getelementptr inbounds %"struct.std::pair", ptr %173, i32 0, i32 0
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %172, ptr noundef nonnull align 4 dereferenceable(4) %174)
          to label %175 unwind label %182

175:                                              ; preds = %170
  %176 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %177 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %176, i32 0, i32 5
  %178 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKidEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  %179 = getelementptr inbounds %"struct.std::pair", ptr %178, i32 0, i32 1
  invoke void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %177, ptr noundef nonnull align 8 dereferenceable(8) %179)
          to label %180 unwind label %182

180:                                              ; preds = %175
  %181 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIKidEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #6
  br label %166, !llvm.loop !30

182:                                              ; preds = %175, %170, %158
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %20, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %196

186:                                              ; preds = %166
  %187 = call noundef i64 @_ZNKSt3mapIidSt4lessIiESaISt4pairIKidEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  %188 = trunc i64 %187 to i32
  %189 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %190 = getelementptr inbounds %"struct.mgpu::SparseMatrix", ptr %189, i32 0, i32 2
  %191 = load i32, ptr %190, align 8, !tbaa !21
  %192 = add nsw i32 %191, %188
  store i32 %192, ptr %190, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #6
  br label %193

193:                                              ; preds = %186
  %194 = load i32, ptr %9, align 4, !tbaa !24
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %9, align 4, !tbaa !24
  br label %39, !llvm.loop !31

196:                                              ; preds = %182, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %201

197:                                              ; preds = %45
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEaSERS2_(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %200 = load i64, ptr %8, align 8, !tbaa !22
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret i64 %200

201:                                              ; preds = %196
  %202 = load ptr, ptr %20, align 8
  %203 = load i32, ptr %21, align 4
  %204 = insertvalue { ptr, i32 } poison, ptr %202, 0
  %205 = insertvalue { ptr, i32 } %204, i32 %203, 1
  resume { ptr, i32 } %205
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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, !11, i64 0}
!10 = !{!"_ZTSN4mgpu12SparseMatrixE", !11, i64 0, !11, i64 4, !11, i64 8, !12, i64 16, !12, i64 40, !16, i64 64}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIiSaIiEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!10, !11, i64 4}
!21 = !{!10, !11, i64 8}
!22 = !{!23, !23, i64 0}
!23 = !{!"long long", !7, i64 0}
!24 = !{!11, !11, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"double", !7, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}
!30 = distinct !{!30, !28}
!31 = distinct !{!31, !28}


; 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::auto_ptr" = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, double>, std::_Select1st<std::pair<const int, double>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, double>, std::_Select1st<std::pair<const int, 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_const_iterator" = type { ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN4mgpu17MulSparseMatricesERKNS_12SparseMatrixES2_PSt8auto_ptrIS0_E(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef %2) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::auto_ptr", align 8
  %5 = alloca %"class.std::map", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %10 = tail call noalias noundef nonnull dereferenceable(88) ptr @_Znwm(i64 noundef 88) #7
  tail call void @_ZN4mgpu12SparseMatrixC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %10) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %10) #6
  %11 = load i32, ptr %0, align 8, !tbaa !5
  %12 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  store i32 %11, ptr %12, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %1, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !19
  %15 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %16 = getelementptr inbounds i8, ptr %15, i64 4
  store i32 %14, ptr %16, align 4, !tbaa !19
  %17 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  store i32 0, ptr %18, align 8, !tbaa !20
  %19 = load i32, ptr %0, align 8, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph66, label %._crit_edge67

.lr.ph66:                                         ; preds = %3
  %21 = getelementptr inbounds i8, ptr %0, i64 16
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = getelementptr inbounds i8, ptr %0, i64 64
  %25 = getelementptr inbounds i8, ptr %1, i64 16
  %26 = getelementptr inbounds i8, ptr %1, i64 8
  %27 = getelementptr inbounds i8, ptr %1, i64 64
  %28 = getelementptr inbounds i8, ptr %1, i64 40
  br label %30

._crit_edge67:                                    ; preds = %._crit_edge62, %3
  %.044.lcssa = phi i64 [ 0, %3 ], [ %.1.lcssa, %._crit_edge62 ]
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEEaSERS2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  ret i64 %.044.lcssa

30:                                               ; preds = %.lr.ph66, %._crit_edge62
  %indvars.iv78 = phi i64 [ 0, %.lr.ph66 ], [ %indvars.iv.next79, %._crit_edge62 ]
  %.04464 = phi i64 [ 0, %.lr.ph66 ], [ %.1.lcssa, %._crit_edge62 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #6
  call void @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv78) #6
  %32 = load i32, ptr %31, align 4, !tbaa !21
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %33 = load i32, ptr %0, align 8, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = icmp slt i64 %indvars.iv.next79, %34
  br i1 %35, label %36, label %38

36:                                               ; preds = %30
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %indvars.iv.next79) #6
  br label %38

38:                                               ; preds = %30, %36
  %.in = phi ptr [ %37, %36 ], [ %22, %30 ]
  %39 = load i32, ptr %.in, align 4, !tbaa !21
  %40 = icmp slt i32 %32, %39
  br i1 %40, label %.lr.ph59.preheader, label %._crit_edge60

.lr.ph59.preheader:                               ; preds = %38
  %41 = sext i32 %32 to i64
  br label %.lr.ph59

._crit_edge60:                                    ; preds = %._crit_edge, %38
  %.1.lcssa = phi i64 [ %.04464, %38 ], [ %66, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %42 = call ptr @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %42, ptr %7, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKidEEC2ERKSt17_Rb_tree_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %43 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %45 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %._crit_edge60
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %47 = call ptr @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %47, ptr %9, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKidEEC2ERKSt17_Rb_tree_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %48 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKidEES5_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br i1 %48, label %.lr.ph61, label %._crit_edge62

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %._crit_edge
  %indvars.iv73 = phi i64 [ %41, %.lr.ph59.preheader ], [ %indvars.iv.next74, %._crit_edge ]
  %.157 = phi i64 [ %.04464, %.lr.ph59.preheader ], [ %66, %._crit_edge ]
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %indvars.iv73) #6
  %50 = load i32, ptr %49, align 4, !tbaa !21
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv73) #6
  %52 = load double, ptr %51, align 8, !tbaa !22
  %53 = sext i32 %50 to i64
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %53) #6
  %55 = load i32, ptr %54, align 4, !tbaa !21
  %56 = add nsw i32 %50, 1
  %57 = load i32, ptr %1, align 8, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %62

59:                                               ; preds = %.lr.ph59
  %60 = sext i32 %56 to i64
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %60) #6
  br label %62

62:                                               ; preds = %.lr.ph59, %59
  %.in49 = phi ptr [ %61, %59 ], [ %26, %.lr.ph59 ]
  %63 = load i32, ptr %.in49, align 4, !tbaa !21
  %64 = sub nsw i32 %63, %55
  %65 = sext i32 %64 to i64
  %66 = add nsw i64 %.157, %65
  %67 = icmp slt i32 %55, %63
  br i1 %67, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %62
  %68 = sext i32 %55 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %73, %62
  %indvars.iv.next74 = add nsw i64 %indvars.iv73, 1
  %lftr.wideiv76 = trunc i64 %indvars.iv.next74 to i32
  %exitcond77.not = icmp eq i32 %39, %lftr.wideiv76
  br i1 %exitcond77.not, label %._crit_edge60, label %.lr.ph59, !llvm.loop !24

.lr.ph:                                           ; preds = %.lr.ph.preheader, %73
  %indvars.iv = phi i64 [ %68, %.lr.ph.preheader ], [ %indvars.iv.next, %73 ]
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %indvars.iv) #6
  %70 = load double, ptr %69, align 8, !tbaa !22
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv) #6
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %71)
          to label %73 unwind label %76

73:                                               ; preds = %.lr.ph
  %74 = load double, ptr %72, align 8, !tbaa !22
  %75 = call double @llvm.fmuladd.f64(double %52, double %70, double %74)
  store double %75, ptr %72, align 8, !tbaa !22
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %63, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !26

76:                                               ; preds = %.lr.ph
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %100

.lr.ph61:                                         ; preds = %.preheader, %86
  %78 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %79 = getelementptr inbounds i8, ptr %78, i64 40
  %80 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKidEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %79, ptr noundef nonnull align 4 dereferenceable(4) %80)
          to label %81 unwind label %.loopexit

81:                                               ; preds = %.lr.ph61
  %82 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %83 = getelementptr inbounds i8, ptr %82, i64 64
  %84 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKidEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  %85 = getelementptr inbounds i8, ptr %84, i64 8
  invoke void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %83, ptr noundef nonnull align 8 dereferenceable(8) %85)
          to label %86 unwind label %.loopexit

86:                                               ; preds = %81
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorISt4pairIKidEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %88 = call ptr @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  store ptr %88, ptr %9, align 8
  call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKidEEC2ERKSt17_Rb_tree_iteratorIS2_E(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %89 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorISt4pairIKidEES5_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br i1 %89, label %.lr.ph61, label %._crit_edge62, !llvm.loop !27

.loopexit:                                        ; preds = %.lr.ph61, %81
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %90

.loopexit.split-lp:                               ; preds = %._crit_edge60
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %90

90:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %100

._crit_edge62:                                    ; preds = %86, %.preheader
  %91 = call noundef i64 @_ZNKSt3mapIidSt4lessIiESaISt4pairIKidEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  %92 = trunc i64 %91 to i32
  %93 = call noundef ptr @_ZNKSt8auto_ptrIN4mgpu12SparseMatrixEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %94 = getelementptr inbounds i8, ptr %93, i64 8
  %95 = load i32, ptr %94, align 8, !tbaa !20
  %96 = add nsw i32 %95, %92
  store i32 %96, ptr %94, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  %97 = load i32, ptr %0, align 8, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next79, %98
  br i1 %99, label %30, label %._crit_edge67, !llvm.loop !28

100:                                              ; preds = %90, %76
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %lpad.phi, %90 ]
  call void @_ZNSt3mapIidSt4lessIiESaISt4pairIKidEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @_ZNSt8auto_ptrIN4mgpu12SparseMatrixEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = !{!"_ZTSN4mgpu12SparseMatrixE", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !10, i64 40, !15, i64 64}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!6, !7, i64 4}
!20 = !{!6, !7, i64 8}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !8, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}


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