; LLVM IR from Gripnook/numerical-methods :: Assignment2/report/src/finite-differences.ll (ZN7Numeric10createGridEd)

; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.Numeric::Matrix" }
%"class.Numeric::Matrix" = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::_Head_base.2" = type { %"class.Numeric::Matrix" }
%"struct.std::_Head_base.3" = type { %"class.Numeric::Matrix" }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%class.anon = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Numeric10createGridEd(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8 %0, double noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.Numeric::Matrix", align 8
  %8 = alloca %"class.std::vector.4", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.Numeric::Matrix", align 8
  %16 = alloca %"class.Numeric::Matrix", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca %class.anon, align 8
  store ptr %0, ptr %3, align 8
  store double %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %20 = load double, ptr %4, align 8, !tbaa !5
  %21 = fdiv double 1.000000e-01, %20
  %22 = fadd double %21, 1.000000e+00
  %23 = fptosi double %22 to i32
  store i32 %23, ptr %5, align 4, !tbaa !9
  %24 = load i32, ptr %5, align 4, !tbaa !9
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %26 = load double, ptr %4, align 8, !tbaa !5
  %27 = fdiv double 1.000000e-01, %26
  %28 = fadd double %27, 1.000000e+00
  %29 = fptosi double %28 to i32
  store i32 %29, ptr %6, align 4, !tbaa !9
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  %32 = load i32, ptr %6, align 4, !tbaa !9
  %33 = load i32, ptr %5, align 4, !tbaa !9
  call void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %32, i32 noundef %33)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %110, %2
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %106, %39
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = load i32, ptr %5, align 4, !tbaa !9
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %109

45:                                               ; preds = %40
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %51, label %48

48:                                               ; preds = %45
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %60

51:                                               ; preds = %48, %45
  %52 = load i32, ptr %9, align 4, !tbaa !9
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %52, i32 noundef %53)
          to label %55 unwind label %56

55:                                               ; preds = %51
  store double 0.000000e+00, ptr %54, align 8, !tbaa !5
  br label %105

56:                                               ; preds = %97, %95, %89, %84, %51
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %12, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %256

60:                                               ; preds = %48
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = sitofp i32 %61 to double
  %63 = load double, ptr %4, align 8, !tbaa !5
  %64 = fmul double %62, %63
  %65 = fcmp oge double %64, 6.000000e-02
  br i1 %65, label %66, label %95

66:                                               ; preds = %60
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = sitofp i32 %67 to double
  %69 = load double, ptr %4, align 8, !tbaa !5
  %70 = fmul double %68, %69
  %71 = fcmp oge double %70, 8.000000e-02
  br i1 %71, label %72, label %95

72:                                               ; preds = %66
  %73 = load i32, ptr %9, align 4, !tbaa !9
  %74 = sitofp i32 %73 to double
  %75 = load double, ptr %4, align 8, !tbaa !5
  %76 = fmul double %74, %75
  %77 = fcmp oeq double %76, 6.000000e-02
  br i1 %77, label %84, label %78

78:                                               ; preds = %72
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = sitofp i32 %79 to double
  %81 = load double, ptr %4, align 8, !tbaa !5
  %82 = fmul double %80, %81
  %83 = fcmp oeq double %82, 8.000000e-02
  br i1 %83, label %84, label %89

84:                                               ; preds = %78, %72
  %85 = load i32, ptr %9, align 4, !tbaa !9
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %85, i32 noundef %86)
          to label %88 unwind label %56

88:                                               ; preds = %84
  store double -1.500000e+01, ptr %87, align 8, !tbaa !5
  br label %94

89:                                               ; preds = %78
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %90, i32 noundef %91)
          to label %93 unwind label %56

93:                                               ; preds = %89
  store double 0.000000e+00, ptr %92, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %93, %88
  br label %104

95:                                               ; preds = %66, %60
  %96 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %97 unwind label %56

97:                                               ; preds = %95
  %98 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %99 = uitofp i64 %98 to double
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %100, i32 noundef %101)
          to label %103 unwind label %56

103:                                              ; preds = %97
  store double %99, ptr %102, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %103, %94
  br label %105

105:                                              ; preds = %104, %55
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %11, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %11, align 4, !tbaa !9
  br label %40, !llvm.loop !11

109:                                              ; preds = %44
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %9, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %9, align 4, !tbaa !9
  br label %34, !llvm.loop !13

113:                                              ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %114 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %115 = trunc i64 %114 to i32
  store i32 %115, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  %116 = load i32, ptr %14, align 4, !tbaa !9
  %117 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %116, i32 noundef %117)
          to label %118 unwind label %126

118:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  %119 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef %119, i32 noundef 1)
          to label %120 unwind label %130

120:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %121

121:                                              ; preds = %243, %120
  %122 = load i32, ptr %17, align 4, !tbaa !9
  %123 = load i32, ptr %14, align 4, !tbaa !9
  %124 = icmp slt i32 %122, %123
  br i1 %124, label %134, label %125

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

126:                                              ; preds = %113
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %12, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %13, align 4
  br label %255

130:                                              ; preds = %118
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %12, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %13, align 4
  br label %254

134:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %135 = load i32, ptr %17, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %136) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %137, i64 8, i1 false)
  %138 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %139 = load i32, ptr %138, align 4, !tbaa !14
  %140 = load i32, ptr %6, align 4, !tbaa !9
  %141 = sub nsw i32 %140, 1
  %142 = icmp eq i32 %139, %141
  br i1 %142, label %143, label %165

143:                                              ; preds = %134
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = load i32, ptr %17, align 4, !tbaa !9
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %144, i32 noundef %145)
          to label %147 unwind label %161

147:                                              ; preds = %143
  store double -1.000000e+00, ptr %146, align 8, !tbaa !5
  %148 = load i32, ptr %17, align 4, !tbaa !9
  %149 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %150 = load i32, ptr %149, align 4, !tbaa !14
  %151 = sub nsw i32 %150, 2
  %152 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %153 = load i32, ptr %152, align 4, !tbaa !16
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %151, i32 noundef %153)
          to label %155 unwind label %161

155:                                              ; preds = %147
  %156 = load double, ptr %154, align 8, !tbaa !5
  %157 = fsub double %156, 1.000000e+00
  %158 = fptosi double %157 to i32
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %148, i32 noundef %158)
          to label %160 unwind label %161

160:                                              ; preds = %155
  store double 1.000000e+00, ptr %159, align 8, !tbaa !5
  br label %242

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

165:                                              ; preds = %134
  %166 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %167 = load i32, ptr %166, align 4, !tbaa !16
  %168 = load i32, ptr %5, align 4, !tbaa !9
  %169 = sub nsw i32 %168, 1
  %170 = icmp eq i32 %167, %169
  br i1 %170, label %171, label %189

171:                                              ; preds = %165
  %172 = load i32, ptr %17, align 4, !tbaa !9
  %173 = load i32, ptr %17, align 4, !tbaa !9
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %172, i32 noundef %173)
          to label %175 unwind label %161

175:                                              ; preds = %171
  store double -1.000000e+00, ptr %174, align 8, !tbaa !5
  %176 = load i32, ptr %17, align 4, !tbaa !9
  %177 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %178 = load i32, ptr %177, align 4, !tbaa !14
  %179 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %180 = load i32, ptr %179, align 4, !tbaa !16
  %181 = sub nsw i32 %180, 2
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %178, i32 noundef %181)
          to label %183 unwind label %161

183:                                              ; preds = %175
  %184 = load double, ptr %182, align 8, !tbaa !5
  %185 = fsub double %184, 1.000000e+00
  %186 = fptosi double %185 to i32
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %176, i32 noundef %186)
          to label %188 unwind label %161

188:                                              ; preds = %183
  store double 1.000000e+00, ptr %187, align 8, !tbaa !5
  br label %241

189:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %190 = getelementptr inbounds %class.anon, ptr %19, i32 0, i32 0
  store ptr %15, ptr %190, align 8, !tbaa !17
  %191 = getelementptr inbounds %class.anon, ptr %19, i32 0, i32 1
  store ptr %17, ptr %191, align 8, !tbaa !17
  %192 = getelementptr inbounds %class.anon, ptr %19, i32 0, i32 2
  store ptr %16, ptr %192, align 8, !tbaa !17
  %193 = load i32, ptr %17, align 4, !tbaa !9
  %194 = load i32, ptr %17, align 4, !tbaa !9
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %193, i32 noundef %194)
          to label %196 unwind label %237

196:                                              ; preds = %189
  store double -1.000000e+00, ptr %195, align 8, !tbaa !5
  %197 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %198 = load i32, ptr %197, align 4, !tbaa !14
  %199 = sub nsw i32 %198, 1
  %200 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %201 = load i32, ptr %200, align 4, !tbaa !16
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %199, i32 noundef %201)
          to label %203 unwind label %237

203:                                              ; preds = %196
  %204 = load double, ptr %202, align 8, !tbaa !5
  %205 = fptosi double %204 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %205)
          to label %206 unwind label %237

206:                                              ; preds = %203
  %207 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %208 = load i32, ptr %207, align 4, !tbaa !14
  %209 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %210 = load i32, ptr %209, align 4, !tbaa !16
  %211 = sub nsw i32 %210, 1
  %212 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %208, i32 noundef %211)
          to label %213 unwind label %237

213:                                              ; preds = %206
  %214 = load double, ptr %212, align 8, !tbaa !5
  %215 = fptosi double %214 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %215)
          to label %216 unwind label %237

216:                                              ; preds = %213
  %217 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %218 = load i32, ptr %217, align 4, !tbaa !14
  %219 = add nsw i32 %218, 1
  %220 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %221 = load i32, ptr %220, align 4, !tbaa !16
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %219, i32 noundef %221)
          to label %223 unwind label %237

223:                                              ; preds = %216
  %224 = load double, ptr %222, align 8, !tbaa !5
  %225 = fptosi double %224 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %225)
          to label %226 unwind label %237

226:                                              ; preds = %223
  %227 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 0
  %228 = load i32, ptr %227, align 4, !tbaa !14
  %229 = getelementptr inbounds %"struct.std::pair", ptr %18, i32 0, i32 1
  %230 = load i32, ptr %229, align 4, !tbaa !16
  %231 = add nsw i32 %230, 1
  %232 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %228, i32 noundef %231)
          to label %233 unwind label %237

233:                                              ; preds = %226
  %234 = load double, ptr %232, align 8, !tbaa !5
  %235 = fptosi double %234 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %235)
          to label %236 unwind label %237

236:                                              ; preds = %233
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %241

237:                                              ; preds = %233, %226, %223, %216, %213, %206, %203, %196, %189
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %12, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %246

241:                                              ; preds = %236, %188
  br label %242

242:                                              ; preds = %241, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %243

243:                                              ; preds = %242
  %244 = load i32, ptr %17, align 4, !tbaa !9
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %17, align 4, !tbaa !9
  br label %121, !llvm.loop !19

246:                                              ; preds = %237, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %253

247:                                              ; preds = %125
  invoke void @_ZSt10make_tupleIJRN7Numeric6MatrixIdEES3_S3_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS7_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %248 unwind label %249

248:                                              ; preds = %247
  store i32 1, ptr %10, align 4
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void

249:                                              ; preds = %247
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %12, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %13, align 4
  br label %253

253:                                              ; preds = %249, %246
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %254

254:                                              ; preds = %253, %130
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %255

255:                                              ; preds = %254, %126
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %256

256:                                              ; preds = %255, %56
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %257

257:                                              ; preds = %256
  %258 = load ptr, ptr %12, align 8
  %259 = load i32, ptr %13, align 4
  %260 = insertvalue { ptr, i32 } poison, ptr %258, 0
  %261 = insertvalue { ptr, i32 } %260, i32 %259, 1
  resume { ptr, i32 } %261
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt10make_tupleIJRN7Numeric6MatrixIdEES3_S3_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS7_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #0

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

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.3" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { %"class.Numeric::Matrix" }
%"class.Numeric::Matrix" = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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::_Head_base.2" = type { %"class.Numeric::Matrix" }
%"struct.std::_Head_base.3" = type { %"class.Numeric::Matrix" }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7Numeric10createGridEd(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8 %0, double noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.Numeric::Matrix", align 8
  %4 = alloca %"class.std::vector.4", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.Numeric::Matrix", align 8
  %8 = alloca %"class.Numeric::Matrix", align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.anon, align 8
  %11 = fdiv double 1.000000e-01, %1
  %12 = fadd double %11, 1.000000e+00
  %13 = fptosi double %12 to i32
  %14 = add nsw i32 %13, 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %14, i32 noundef %14)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %.not56 = icmp slt i32 %13, 0
  br i1 %.not56, label %._crit_edge59, label %.lr.ph

._crit_edge59:                                    ; preds = %._crit_edge, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %15 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %16 = trunc i64 %15 to i32
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  invoke void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %16, i32 noundef %16)
          to label %57 unwind label %64

.lr.ph:                                           ; preds = %2, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %19

._crit_edge:                                      ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr %5, align 4, !tbaa !5
  %.not.not = icmp slt i32 %17, %13
  br i1 %.not.not, label %.lr.ph, label %._crit_edge59, !llvm.loop !9

19:                                               ; preds = %.lr.ph, %54
  %storemerge4955 = phi i32 [ 0, %.lr.ph ], [ %56, %54 ]
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 0
  %22 = icmp eq i32 %storemerge4955, 0
  %or.cond = or i1 %22, %21
  br i1 %or.cond, label %23, label %28

23:                                               ; preds = %19
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %20, i32 noundef %storemerge4955)
          to label %25 unwind label %26

25:                                               ; preds = %23
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  br label %54

26:                                               ; preds = %47, %45, %42, %39, %23
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %141

28:                                               ; preds = %19
  %29 = sitofp i32 %20 to double
  %30 = fmul double %29, %1
  %31 = fcmp ult double %30, 6.000000e-02
  br i1 %31, label %45, label %32

32:                                               ; preds = %28
  %33 = sitofp i32 %storemerge4955 to double
  %34 = fmul double %33, %1
  %35 = fcmp ult double %34, 8.000000e-02
  br i1 %35, label %45, label %36

36:                                               ; preds = %32
  %37 = fcmp oeq double %30, 6.000000e-02
  %38 = fcmp oeq double %34, 8.000000e-02
  %or.cond53 = or i1 %38, %37
  br i1 %or.cond53, label %39, label %42

39:                                               ; preds = %36
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %20, i32 noundef %storemerge4955)
          to label %41 unwind label %26

41:                                               ; preds = %39
  store double -1.500000e+01, ptr %40, align 8, !tbaa !11
  br label %54

42:                                               ; preds = %36
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %20, i32 noundef %storemerge4955)
          to label %44 unwind label %26

44:                                               ; preds = %42
  store double 0.000000e+00, ptr %43, align 8, !tbaa !11
  br label %54

45:                                               ; preds = %32, %28
  %46 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE12emplace_backIJRiS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %47 unwind label %26

47:                                               ; preds = %45
  %48 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %49, i32 noundef %50)
          to label %52 unwind label %26

52:                                               ; preds = %47
  %53 = uitofp i64 %48 to double
  store double %53, ptr %51, align 8, !tbaa !11
  br label %54

54:                                               ; preds = %25, %41, %44, %52
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %6, align 4, !tbaa !5
  %.not50.not = icmp slt i32 %55, %13
  br i1 %.not50.not, label %19, label %._crit_edge, !llvm.loop !13

57:                                               ; preds = %._crit_edge59
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  invoke void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef %16, i32 noundef 1)
          to label %58 unwind label %66

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  %59 = icmp sgt i32 %16, 0
  br i1 %59, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %58
  %60 = getelementptr inbounds i8, ptr %10, i64 8
  %61 = getelementptr inbounds i8, ptr %10, i64 16
  %62 = add nsw i32 %13, -2
  %63 = add nsw i32 %13, -2
  br label %68

._crit_edge63:                                    ; preds = %130, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  invoke void @_ZSt10make_tupleIJRN7Numeric6MatrixIdEES3_S3_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS7_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %135 unwind label %136

64:                                               ; preds = %._crit_edge59
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %140

66:                                               ; preds = %57
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %139

68:                                               ; preds = %.lr.ph62, %130
  %storemerge4460 = phi i32 [ 0, %.lr.ph62 ], [ %132, %130 ]
  %69 = sext i32 %storemerge4460 to i64
  %70 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorISt4pairIiiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %69) #5
  %.sroa.0.0.copyload = load i32, ptr %70, align 4
  %.sroa.11.0..sroa_idx = getelementptr inbounds i8, ptr %70, i64 4
  %.sroa.11.0.copyload = load i32, ptr %.sroa.11.0..sroa_idx, align 4
  %71 = icmp eq i32 %.sroa.0.0.copyload, %13
  br i1 %71, label %72, label %86

72:                                               ; preds = %68
  %73 = load i32, ptr %9, align 4, !tbaa !5
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %73, i32 noundef %73)
          to label %75 unwind label %84

75:                                               ; preds = %72
  store double -1.000000e+00, ptr %74, align 8, !tbaa !11
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %63, i32 noundef %.sroa.11.0.copyload)
          to label %78 unwind label %84

78:                                               ; preds = %75
  %79 = load double, ptr %77, align 8, !tbaa !11
  %80 = fadd double %79, -1.000000e+00
  %81 = fptosi double %80 to i32
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %76, i32 noundef %81)
          to label %83 unwind label %84

83:                                               ; preds = %78
  store double 1.000000e+00, ptr %82, align 8, !tbaa !11
  br label %130

84:                                               ; preds = %94, %91, %88, %78, %75, %72
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %134

86:                                               ; preds = %68
  %87 = icmp eq i32 %.sroa.11.0.copyload, %13
  br i1 %87, label %88, label %100

88:                                               ; preds = %86
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %89, i32 noundef %89)
          to label %91 unwind label %84

91:                                               ; preds = %88
  store double -1.000000e+00, ptr %90, align 8, !tbaa !11
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %.sroa.0.0.copyload, i32 noundef %62)
          to label %94 unwind label %84

94:                                               ; preds = %91
  %95 = load double, ptr %93, align 8, !tbaa !11
  %96 = fadd double %95, -1.000000e+00
  %97 = fptosi double %96 to i32
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %92, i32 noundef %97)
          to label %99 unwind label %84

99:                                               ; preds = %94
  store double 1.000000e+00, ptr %98, align 8, !tbaa !11
  br label %130

100:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  store ptr %7, ptr %10, align 8, !tbaa !14
  store ptr %9, ptr %60, align 8, !tbaa !14
  store ptr %8, ptr %61, align 8, !tbaa !14
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %101, i32 noundef %101)
          to label %103 unwind label %128

103:                                              ; preds = %100
  store double -1.000000e+00, ptr %102, align 8, !tbaa !11
  %104 = add nsw i32 %.sroa.0.0.copyload, -1
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %104, i32 noundef %.sroa.11.0.copyload)
          to label %106 unwind label %128

106:                                              ; preds = %103
  %107 = load double, ptr %105, align 8, !tbaa !11
  %108 = fptosi double %107 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %108)
          to label %109 unwind label %128

109:                                              ; preds = %106
  %110 = add nsw i32 %.sroa.11.0.copyload, -1
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %.sroa.0.0.copyload, i32 noundef %110)
          to label %112 unwind label %128

112:                                              ; preds = %109
  %113 = load double, ptr %111, align 8, !tbaa !11
  %114 = fptosi double %113 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %114)
          to label %115 unwind label %128

115:                                              ; preds = %112
  %116 = add nsw i32 %.sroa.0.0.copyload, 1
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %116, i32 noundef %.sroa.11.0.copyload)
          to label %118 unwind label %128

118:                                              ; preds = %115
  %119 = load double, ptr %117, align 8, !tbaa !11
  %120 = fptosi double %119 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %120)
          to label %121 unwind label %128

121:                                              ; preds = %118
  %122 = add nsw i32 %.sroa.11.0.copyload, 1
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7Numeric6MatrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %.sroa.0.0.copyload, i32 noundef %122)
          to label %124 unwind label %128

124:                                              ; preds = %121
  %125 = load double, ptr %123, align 8, !tbaa !11
  %126 = fptosi double %125 to i32
  invoke void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24) %10, i32 noundef %126)
          to label %127 unwind label %128

127:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %130

128:                                              ; preds = %124, %121, %118, %115, %112, %109, %106, %103, %100
  %129 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %134

130:                                              ; preds = %99, %127, %83
  %131 = load i32, ptr %9, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %9, align 4, !tbaa !5
  %133 = icmp slt i32 %132, %16
  br i1 %133, label %68, label %._crit_edge63, !llvm.loop !16

134:                                              ; preds = %128, %84
  %.pn = phi { ptr, i32 } [ %85, %84 ], [ %129, %128 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %138

135:                                              ; preds = %._crit_edge63
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  ret void

136:                                              ; preds = %._crit_edge63
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %138

138:                                              ; preds = %136, %134
  %.pn.pn = phi { ptr, i32 } [ %.pn, %134 ], [ %137, %136 ]
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %139

139:                                              ; preds = %138, %66
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %138 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %140

140:                                              ; preds = %139, %64
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %139 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %141

141:                                              ; preds = %140, %26
  %.pn51 = phi { ptr, i32 } [ %27, %26 ], [ %.pn.pn.pn.pn, %140 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN7Numeric6MatrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn51
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Numeric6MatrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN7Numeric10createGridEdENK3$_0clEi"(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt10make_tupleIJRN7Numeric6MatrixIdEES3_S3_EESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOS7_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

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

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

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

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

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


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