; LLVM IR from facebookresearch/baspacho :: baspacho/testing (TestingMatGen)

; 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"

%"struct.BaSpaCho::testing_utils::SparseMatGenerator" = type { %"class.std::mersenne_twister_engine", %"class.std::vector" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<>::param_type" }
%"struct.std::uniform_real_distribution<>::param_type" = type { double, double }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNSt25uniform_real_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(5000)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8BaSpaCho13testing_utils18SparseMatGenerator7genGridElldll(ptr dead_on_unwind noalias writable sret(%"struct.BaSpaCho::testing_utils::SparseMatGenerator") align 8 %0, i64 noundef %1, i64 noundef %2, double noundef %3, i64 noundef %4, i64 noundef %5) #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca double, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i1, align 1
  %15 = alloca %"class.std::uniform_real_distribution", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i64, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca i64, align 8
  %37 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %7, align 8
  store i64 %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !5
  store double %3, ptr %10, align 8, !tbaa !9
  store i64 %4, ptr %11, align 8, !tbaa !5
  store i64 %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %38 = load i64, ptr %8, align 8, !tbaa !5
  %39 = load i64, ptr %9, align 8, !tbaa !5
  %40 = mul nsw i64 %38, %39
  store i64 %40, ptr %13, align 8, !tbaa !5
  store i1 false, ptr %14, align 1
  %41 = load i64, ptr %13, align 8, !tbaa !5
  %42 = load i64, ptr %12, align 8, !tbaa !5
  call void @_ZN8BaSpaCho13testing_utils18SparseMatGeneratorC1Ell(ptr noundef nonnull align 8 dereferenceable(5024) %0, i64 noundef %41, i64 noundef %42)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  invoke void @_ZNSt25uniform_real_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %15, double noundef 0.000000e+00, double noundef 1.000000e+00)
          to label %43 unwind label %49

43:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 0, ptr %18, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %196, %43
  %45 = load i64, ptr %18, align 8, !tbaa !5
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %53, label %48

48:                                               ; preds = %44
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %201

49:                                               ; preds = %6
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %16, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %17, align 4
  br label %203

53:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %54 = load i64, ptr %18, align 8, !tbaa !5
  %55 = load i64, ptr %11, align 8, !tbaa !5
  %56 = sub nsw i64 %54, %55
  store i64 %56, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  store i64 0, ptr %22, align 8, !tbaa !5
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %58 unwind label %72

58:                                               ; preds = %53
  %59 = load i64, ptr %57, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  store i64 %59, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %60 = load i64, ptr %18, align 8, !tbaa !5
  %61 = load i64, ptr %11, align 8, !tbaa !5
  %62 = add nsw i64 %60, %61
  %63 = add nsw i64 %62, 1
  store i64 %63, ptr %24, align 8, !tbaa !5
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %65 unwind label %76

65:                                               ; preds = %58
  %66 = load i64, ptr %64, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  store i64 %66, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  store i64 0, ptr %25, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %190, %65
  %68 = load i64, ptr %25, align 8, !tbaa !5
  %69 = load i64, ptr %9, align 8, !tbaa !5
  %70 = icmp slt i64 %68, %69
  br i1 %70, label %80, label %71

71:                                               ; preds = %67
  store i32 5, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %195

72:                                               ; preds = %53
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %16, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %200

76:                                               ; preds = %58
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %16, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %199

80:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %81 = load i64, ptr %25, align 8, !tbaa !5
  %82 = load i64, ptr %11, align 8, !tbaa !5
  %83 = sub nsw i64 %81, %82
  store i64 %83, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  store i64 0, ptr %28, align 8, !tbaa !5
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %85 unwind label %107

85:                                               ; preds = %80
  %86 = load i64, ptr %84, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  store i64 %86, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %87 = load i64, ptr %25, align 8, !tbaa !5
  %88 = load i64, ptr %11, align 8, !tbaa !5
  %89 = add nsw i64 %87, %88
  %90 = add nsw i64 %89, 1
  store i64 %90, ptr %30, align 8, !tbaa !5
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %92 unwind label %111

92:                                               ; preds = %85
  %93 = load i64, ptr %91, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  store i64 %93, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  %94 = load i64, ptr %18, align 8, !tbaa !5
  %95 = load i64, ptr %9, align 8, !tbaa !5
  %96 = mul nsw i64 %94, %95
  %97 = load i64, ptr %25, align 8, !tbaa !5
  %98 = add nsw i64 %96, %97
  store i64 %98, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #4
  %99 = load i64, ptr %20, align 8, !tbaa !5
  %100 = trunc i64 %99 to i32
  store i32 %100, ptr %32, align 4, !tbaa !11
  br label %101

101:                                              ; preds = %186, %92
  %102 = load i32, ptr %32, align 4, !tbaa !11
  %103 = sext i32 %102 to i64
  %104 = load i64, ptr %23, align 8, !tbaa !5
  %105 = icmp slt i64 %103, %104
  br i1 %105, label %115, label %106

106:                                              ; preds = %101
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  br label %189

107:                                              ; preds = %80
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %16, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %194

111:                                              ; preds = %85
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %16, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  br label %193

115:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #4
  %116 = load i64, ptr %26, align 8, !tbaa !5
  %117 = trunc i64 %116 to i32
  store i32 %117, ptr %33, align 4, !tbaa !11
  br label %118

118:                                              ; preds = %181, %115
  %119 = load i32, ptr %33, align 4, !tbaa !11
  %120 = sext i32 %119 to i64
  %121 = load i64, ptr %29, align 8, !tbaa !5
  %122 = icmp slt i64 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %118
  store i32 11, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  br label %185

124:                                              ; preds = %118
  %125 = load i32, ptr %32, align 4, !tbaa !11
  %126 = sext i32 %125 to i64
  %127 = load i64, ptr %18, align 8, !tbaa !5
  %128 = icmp eq i64 %126, %127
  br i1 %128, label %129, label %135

129:                                              ; preds = %124
  %130 = load i32, ptr %33, align 4, !tbaa !11
  %131 = sext i32 %130 to i64
  %132 = load i64, ptr %25, align 8, !tbaa !5
  %133 = icmp eq i64 %131, %132
  br i1 %133, label %134, label %135

134:                                              ; preds = %129
  br label %181

135:                                              ; preds = %129, %124
  %136 = load double, ptr %10, align 8, !tbaa !9
  %137 = fcmp oge double %136, 1.000000e+00
  br i1 %137, label %144, label %138

138:                                              ; preds = %135
  %139 = load double, ptr %10, align 8, !tbaa !9
  %140 = getelementptr inbounds %"struct.BaSpaCho::testing_utils::SparseMatGenerator", ptr %0, i32 0, i32 0
  %141 = invoke noundef double @_ZNSt25uniform_real_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(5000) %140)
          to label %142 unwind label %167

142:                                              ; preds = %138
  %143 = fcmp ogt double %139, %141
  br i1 %143, label %144, label %180

144:                                              ; preds = %142, %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %145 = load i32, ptr %32, align 4, !tbaa !11
  %146 = sext i32 %145 to i64
  %147 = load i64, ptr %9, align 8, !tbaa !5
  %148 = mul nsw i64 %146, %147
  %149 = load i32, ptr %33, align 4, !tbaa !11
  %150 = sext i32 %149 to i64
  %151 = add nsw i64 %148, %150
  store i64 %151, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %153 unwind label %171

153:                                              ; preds = %144
  %154 = load i64, ptr %152, align 8, !tbaa !5
  store i64 %154, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %156 unwind label %175

156:                                              ; preds = %153
  %157 = load i64, ptr %155, align 8, !tbaa !5
  store i64 %157, ptr %36, align 8, !tbaa !5
  %158 = getelementptr inbounds %"struct.BaSpaCho::testing_utils::SparseMatGenerator", ptr %0, i32 0, i32 1
  %159 = load i64, ptr %35, align 8, !tbaa !5
  %160 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %159) #4
  %161 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %160, ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %162 unwind label %175

162:                                              ; preds = %156
  %163 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 0
  %164 = extractvalue { ptr, i8 } %161, 0
  store ptr %164, ptr %163, align 8
  %165 = getelementptr inbounds { ptr, i8 }, ptr %37, i32 0, i32 1
  %166 = extractvalue { ptr, i8 } %161, 1
  store i8 %166, ptr %165, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  br label %180

167:                                              ; preds = %138
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %16, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %17, align 4
  br label %184

171:                                              ; preds = %144
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %16, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %17, align 4
  br label %179

175:                                              ; preds = %156, %153
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %16, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  br label %179

179:                                              ; preds = %175, %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  br label %184

180:                                              ; preds = %162, %142
  br label %181

181:                                              ; preds = %180, %134
  %182 = load i32, ptr %33, align 4, !tbaa !11
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %33, align 4, !tbaa !11
  br label %118, !llvm.loop !13

184:                                              ; preds = %179, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  br label %193

185:                                              ; preds = %123
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %32, align 4, !tbaa !11
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %32, align 4, !tbaa !11
  br label %101, !llvm.loop !15

189:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br label %190

190:                                              ; preds = %189
  %191 = load i64, ptr %25, align 8, !tbaa !5
  %192 = add nsw i64 %191, 1
  store i64 %192, ptr %25, align 8, !tbaa !5
  br label %67, !llvm.loop !16

193:                                              ; preds = %184, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #4
  br label %194

194:                                              ; preds = %193, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %199

195:                                              ; preds = %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  br label %196

196:                                              ; preds = %195
  %197 = load i64, ptr %18, align 8, !tbaa !5
  %198 = add nsw i64 %197, 1
  store i64 %198, ptr %18, align 8, !tbaa !5
  br label %44, !llvm.loop !17

199:                                              ; preds = %194, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %200

200:                                              ; preds = %199, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %203

201:                                              ; preds = %48
  store i1 true, ptr %14, align 1
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  %202 = load i1, ptr %14, align 1
  br i1 %202, label %205, label %204

203:                                              ; preds = %200, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @_ZN8BaSpaCho13testing_utils18SparseMatGeneratorD2Ev(ptr noundef nonnull align 8 dereferenceable(5024) %0) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %206

204:                                              ; preds = %201
  call void @_ZN8BaSpaCho13testing_utils18SparseMatGeneratorD2Ev(ptr noundef nonnull align 8 dereferenceable(5024) %0) #4
  br label %205

205:                                              ; preds = %204, %201
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  ret void

206:                                              ; preds = %203
  %207 = load ptr, ptr %16, align 8
  %208 = load i32, ptr %17, align 4
  %209 = insertvalue { ptr, i32 } poison, ptr %207, 0
  %210 = insertvalue { ptr, i32 } %209, i32 %208, 1
  resume { ptr, i32 } %210
}

declare void @_ZN8BaSpaCho13testing_utils18SparseMatGeneratorC1Ell(ptr, i64, i64)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; 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"

%"struct.BaSpaCho::testing_utils::SparseMatGenerator" = type { %"class.std::mersenne_twister_engine", %"class.std::vector" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::set<long>, std::allocator<std::set<long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::uniform_real_distribution" = type { %"struct.std::uniform_real_distribution<>::param_type" }
%"struct.std::uniform_real_distribution<>::param_type" = type { double, double }

; 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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNSt25uniform_real_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8BaSpaCho13testing_utils18SparseMatGenerator7genGridElldll(ptr dead_on_unwind noalias writable sret(%"struct.BaSpaCho::testing_utils::SparseMatGenerator") align 8 %0, i64 noundef %1, i64 noundef %2, double noundef %3, i64 noundef %4, i64 noundef %5) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::uniform_real_distribution", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  store i64 %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !5
  %19 = mul nsw i64 %2, %1
  tail call void @_ZN8BaSpaCho13testing_utils18SparseMatGeneratorC1Ell(ptr noundef nonnull align 8 dereferenceable(5024) %0, i64 noundef %19, i64 noundef %5)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  invoke void @_ZNSt25uniform_real_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %9, double noundef 0.000000e+00, double noundef 1.000000e+00)
          to label %.preheader unwind label %24

.preheader:                                       ; preds = %6
  %20 = icmp sgt i64 %1, 0
  br i1 %20, label %.lr.ph84, label %._crit_edge85

.lr.ph84:                                         ; preds = %.preheader
  %21 = add i64 %4, 1
  %22 = fcmp ult double %3, 1.000000e+00
  %23 = getelementptr inbounds i8, ptr %0, i64 5000
  br label %26

._crit_edge85:                                    ; preds = %._crit_edge, %.preheader
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  ret void

24:                                               ; preds = %6
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %130

26:                                               ; preds = %.lr.ph84, %._crit_edge
  %.03982 = phi i64 [ 0, %.lr.ph84 ], [ %120, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %27 = sub nsw i64 %.03982, %4
  store i64 %27, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  store i64 0, ptr %11, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %29 = load i64, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %30 = add i64 %21, %.03982
  store i64 %30, ptr %12, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %32 = load i64, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %33 = load i64, ptr %8, align 8, !tbaa !5
  %34 = icmp sgt i64 %33, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %26
  %sext = shl i64 %29, 32
  %35 = ashr exact i64 %sext, 32
  %36 = icmp sgt i64 %32, %35
  %.fr80 = freeze i1 %36
  br i1 %.fr80, label %.lr.ph52.us, label %.lr.ph.split

.lr.ph52.us:                                      ; preds = %.lr.ph, %._crit_edge53.us
  %.04062.us = phi i64 [ %48, %._crit_edge53.us ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %37 = sub nsw i64 %.04062.us, %4
  store i64 %37, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  store i64 0, ptr %14, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %39 = load i64, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %40 = add i64 %21, %.04062.us
  store i64 %40, ptr %15, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %42 = load i64, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  %43 = load i64, ptr %8, align 8, !tbaa !5
  %44 = mul nsw i64 %43, %.03982
  %45 = add nsw i64 %44, %.04062.us
  store i64 %45, ptr %16, align 8, !tbaa !5
  %sext86 = shl i64 %39, 32
  %46 = ashr exact i64 %sext86, 32
  %47 = icmp sgt i64 %42, %46
  br i1 %47, label %.lr.ph52.split.us.us, label %._crit_edge53.us

._crit_edge53.us:                                 ; preds = %._crit_edge.split.us56.us, %._crit_edge.split.us.us.us.us, %.lr.ph52.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  %48 = add nuw nsw i64 %.04062.us, 1
  %49 = load i64, ptr %8, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %.lr.ph52.us, label %._crit_edge, !llvm.loop !9

.lr.ph52.split.us.us:                             ; preds = %.lr.ph52.us
  br i1 %22, label %.lr.ph.us.us.us, label %.lr.ph.us.us68

.lr.ph.us.us68:                                   ; preds = %.lr.ph52.split.us.us, %._crit_edge.split.us56.us
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %._crit_edge.split.us56.us ], [ %35, %.lr.ph52.split.us.us ]
  %51 = icmp eq i64 %.03982, %indvars.iv97
  %.fr = freeze i1 %51
  br i1 %.fr, label %.lr.ph.us.us68.split, label %.lr.ph.us.us68.split.us

.lr.ph.us.us68.split.us:                          ; preds = %.lr.ph.us.us68, %61
  %indvars.iv = phi i64 [ %indvars.iv.next, %61 ], [ %46, %.lr.ph.us.us68 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  %52 = load i64, ptr %8, align 8, !tbaa !5
  %53 = mul nsw i64 %52, %indvars.iv97
  %54 = add nsw i64 %53, %indvars.iv
  store i64 %54, ptr %17, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %56 = load i64, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %58 = load i64, ptr %57, align 8, !tbaa !5
  store i64 %58, ptr %18, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %56) #4
  %60 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %59, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %61 unwind label %.split48.split.us.split.us.split.us

61:                                               ; preds = %.lr.ph.us.us68.split.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %62 = icmp sgt i64 %42, %indvars.iv.next
  br i1 %62, label %.lr.ph.us.us68.split.us, label %._crit_edge.split.us56.us, !llvm.loop !11

.split48.split.us.split.us.split.us:              ; preds = %.lr.ph.us.us68.split.us
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %.split48.us

.lr.ph.us.us68.split:                             ; preds = %.lr.ph.us.us68, %76
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %76 ], [ %46, %.lr.ph.us.us68 ]
  %64 = icmp eq i64 %.04062.us, %indvars.iv94
  br i1 %64, label %76, label %65

65:                                               ; preds = %.lr.ph.us.us68.split
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  %66 = load i64, ptr %8, align 8, !tbaa !5
  %67 = mul nsw i64 %66, %indvars.iv97
  %68 = add nsw i64 %67, %indvars.iv94
  store i64 %68, ptr %17, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %70 = load i64, ptr %69, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %72 = load i64, ptr %71, align 8, !tbaa !5
  store i64 %72, ptr %18, align 8, !tbaa !5
  %73 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %70) #4
  %74 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %73, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %75 unwind label %.split48.split.us.split.us.split

75:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  br label %76

76:                                               ; preds = %75, %.lr.ph.us.us68.split
  %indvars.iv.next95 = add nsw i64 %indvars.iv94, 1
  %77 = icmp sgt i64 %42, %indvars.iv.next95
  br i1 %77, label %.lr.ph.us.us68.split, label %._crit_edge.split.us56.us, !llvm.loop !11

._crit_edge.split.us56.us:                        ; preds = %61, %76
  %indvars.iv.next98 = add nsw i64 %indvars.iv97, 1
  %78 = icmp sgt i64 %32, %indvars.iv.next98
  br i1 %78, label %.lr.ph.us.us68, label %._crit_edge53.us, !llvm.loop !12

.lr.ph.us.us.us:                                  ; preds = %.lr.ph52.split.us.us, %._crit_edge.split.us.us.us.us
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %._crit_edge.split.us.us.us.us ], [ %35, %.lr.ph52.split.us.us ]
  %79 = icmp eq i64 %.03982, %indvars.iv106
  %.fr.us = freeze i1 %79
  br i1 %.fr.us, label %.lr.ph.split.us.us.us.split.us74, label %.lr.ph.split.us.us.us.split.us.us

.lr.ph.split.us.us.us.split.us74:                 ; preds = %.lr.ph.us.us.us, %96
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %96 ], [ %46, %.lr.ph.us.us.us ]
  %80 = icmp eq i64 %.04062.us, %indvars.iv103
  br i1 %80, label %96, label %81

81:                                               ; preds = %.lr.ph.split.us.us.us.split.us74
  %82 = invoke noundef double @_ZNSt25uniform_real_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(5000) %0)
          to label %83 unwind label %.split.us.split.us.split.us.split.split.us

83:                                               ; preds = %81
  %84 = fcmp olt double %82, %3
  br i1 %84, label %85, label %96

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  %86 = load i64, ptr %8, align 8, !tbaa !5
  %87 = mul nsw i64 %86, %indvars.iv106
  %88 = add nsw i64 %87, %indvars.iv103
  store i64 %88, ptr %17, align 8, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %90 = load i64, ptr %89, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %92 = load i64, ptr %91, align 8, !tbaa !5
  store i64 %92, ptr %18, align 8, !tbaa !5
  %93 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %90) #4
  %94 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %93, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %95 unwind label %.split48.us.split.us.split.us.split.split.us

95:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  br label %96

96:                                               ; preds = %95, %83, %.lr.ph.split.us.us.us.split.us74
  %indvars.iv.next104 = add nsw i64 %indvars.iv103, 1
  %97 = icmp sgt i64 %42, %indvars.iv.next104
  br i1 %97, label %.lr.ph.split.us.us.us.split.us74, label %._crit_edge.split.us.us.us.us, !llvm.loop !11

._crit_edge.split.us.us.us.us:                    ; preds = %113, %96
  %indvars.iv.next107 = add nsw i64 %indvars.iv106, 1
  %98 = icmp sgt i64 %32, %indvars.iv.next107
  br i1 %98, label %.lr.ph.us.us.us, label %._crit_edge53.us, !llvm.loop !12

.lr.ph.split.us.us.us.split.us.us:                ; preds = %.lr.ph.us.us.us, %113
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %113 ], [ %46, %.lr.ph.us.us.us ]
  %99 = invoke noundef double @_ZNSt25uniform_real_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(5000) %0)
          to label %100 unwind label %.split.us.split.us.split.us.split.us.split.us

100:                                              ; preds = %.lr.ph.split.us.us.us.split.us.us
  %101 = fcmp olt double %99, %3
  br i1 %101, label %102, label %113

102:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  %103 = load i64, ptr %8, align 8, !tbaa !5
  %104 = mul nsw i64 %103, %indvars.iv106
  %105 = add nsw i64 %104, %indvars.iv100
  store i64 %105, ptr %17, align 8, !tbaa !5
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %107 = load i64, ptr %106, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %109 = load i64, ptr %108, align 8, !tbaa !5
  store i64 %109, ptr %18, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt3setIlSt4lessIlESaIlEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %107) #4
  %111 = invoke { ptr, i8 } @_ZNSt3setIlSt4lessIlESaIlEE6insertERKl(ptr noundef nonnull align 8 dereferenceable(48) %110, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %112 unwind label %.split48.us.split.us.split.us.split.us.split.us

112:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  br label %113

113:                                              ; preds = %112, %100
  %indvars.iv.next101 = add nsw i64 %indvars.iv100, 1
  %114 = icmp sgt i64 %42, %indvars.iv.next101
  br i1 %114, label %.lr.ph.split.us.us.us.split.us.us, label %._crit_edge.split.us.us.us.us, !llvm.loop !11

.split48.split.us.split.us.split:                 ; preds = %65
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %.split48.us

.split.us.split.us.split.us.split.split.us:       ; preds = %81
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.split48.us.split.us.split.us.split.split.us:     ; preds = %85
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %.split48.us

.split.us.split.us.split.us.split.us.split.us:    ; preds = %.lr.ph.split.us.us.us.split.us.us
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %.split.us

.split48.us.split.us.split.us.split.us.split.us:  ; preds = %102
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %.split48.us

._crit_edge:                                      ; preds = %.lr.ph.split, %._crit_edge53.us, %26
  %120 = add nuw nsw i64 %.03982, 1
  %121 = load i64, ptr %7, align 8, !tbaa !5
  %122 = icmp slt i64 %120, %121
  br i1 %122, label %26, label %._crit_edge85, !llvm.loop !13

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.04062 = phi i64 [ %128, %.lr.ph.split ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %123 = sub nsw i64 %.04062, %4
  store i64 %123, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  store i64 0, ptr %14, align 8, !tbaa !5
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %125 = add i64 %21, %.04062
  store i64 %125, ptr %15, align 8, !tbaa !5
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  %127 = load i64, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  %128 = add nuw nsw i64 %.04062, 1
  %129 = icmp slt i64 %128, %127
  br i1 %129, label %.lr.ph.split, label %._crit_edge, !llvm.loop !9

.split48.us:                                      ; preds = %.split48.split.us.split.us.split, %.split48.split.us.split.us.split.us, %.split48.us.split.us.split.us.split.split.us, %.split48.us.split.us.split.us.split.us.split.us
  %.us-phi49 = phi { ptr, i32 } [ %117, %.split48.us.split.us.split.us.split.split.us ], [ %119, %.split48.us.split.us.split.us.split.us.split.us ], [ %115, %.split48.split.us.split.us.split ], [ %63, %.split48.split.us.split.us.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  br label %.split.us

.split.us:                                        ; preds = %.split.us.split.us.split.us.split.us.split.us, %.split.us.split.us.split.us.split.split.us, %.split48.us
  %.pn = phi { ptr, i32 } [ %.us-phi49, %.split48.us ], [ %116, %.split.us.split.us.split.us.split.split.us ], [ %118, %.split.us.split.us.split.us.split.us.split.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  br label %130

130:                                              ; preds = %.split.us, %24
  %.pn.pn = phi { ptr, i32 } [ %.pn, %.split.us ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @_ZN8BaSpaCho13testing_utils18SparseMatGeneratorD2Ev(ptr noundef nonnull align 8 dereferenceable(5024) %0) #4
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN8BaSpaCho13testing_utils18SparseMatGeneratorC1Ell(ptr, i64, i64) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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