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

; 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.std::pair" = type { %"class.Numeric::Matrix", %"class.std::vector.0" }
%"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<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.FiniteDifferences::Node" = type { double, double, double }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17FiniteDifferences10createGridEd(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") 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.0", 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
  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) #4
  %14 = load double, ptr %4, align 8, !tbaa !5
  %15 = fdiv double 1.000000e-01, %14
  %16 = fadd double %15, 1.000000e+00
  %17 = fptosi double %16 to i32
  store i32 %17, ptr %5, align 4, !tbaa !9
  %18 = load i32, ptr %5, align 4, !tbaa !9
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %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 %6, align 4, !tbaa !9
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #4
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %26, i32 noundef %27)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %94, %2
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

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

34:                                               ; preds = %90, %33
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = icmp slt i32 %35, %36
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %34
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = sitofp i32 %40 to double
  %42 = load double, ptr %4, align 8, !tbaa !5
  %43 = fmul double %41, %42
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %44, i32 noundef %45)
          to label %47 unwind label %75

47:                                               ; preds = %39
  %48 = getelementptr inbounds %"struct.FiniteDifferences::Node", ptr %46, i32 0, i32 1
  store double %43, ptr %48, align 8, !tbaa !11
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = sitofp i32 %49 to double
  %51 = load double, ptr %4, align 8, !tbaa !5
  %52 = fmul double %50, %51
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %53, i32 noundef %54)
          to label %56 unwind label %75

56:                                               ; preds = %47
  %57 = getelementptr inbounds %"struct.FiniteDifferences::Node", ptr %55, i32 0, i32 2
  store double %52, ptr %57, align 8, !tbaa !13
  %58 = load i32, ptr %9, align 4, !tbaa !9
  %59 = sitofp i32 %58 to double
  %60 = load double, ptr %4, align 8, !tbaa !5
  %61 = fmul double %59, %60
  %62 = fcmp oge double %61, 6.000000e-02
  br i1 %62, label %63, label %79

63:                                               ; preds = %56
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = sitofp i32 %64 to double
  %66 = load double, ptr %4, align 8, !tbaa !5
  %67 = fmul double %65, %66
  %68 = fcmp oge double %67, 8.000000e-02
  br i1 %68, label %69, label %79

69:                                               ; preds = %63
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %70, i32 noundef %71)
          to label %73 unwind label %75

73:                                               ; preds = %69
  %74 = getelementptr inbounds %"struct.FiniteDifferences::Node", ptr %72, i32 0, i32 0
  store double 1.500000e+01, ptr %74, align 8, !tbaa !14
  br label %89

75:                                               ; preds = %85, %69, %47, %39
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %12, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %103

79:                                               ; preds = %63, %56
  %80 = load i32, ptr %9, align 4, !tbaa !9
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %82, label %88

82:                                               ; preds = %79
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %88

85:                                               ; preds = %82
  %86 = 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) %11, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %87 unwind label %75

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87, %82, %79
  br label %89

89:                                               ; preds = %88, %73
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %11, align 4, !tbaa !9
  br label %34, !llvm.loop !15

93:                                               ; preds = %38
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %9, align 4, !tbaa !9
  br label %28, !llvm.loop !17

97:                                               ; preds = %32
  invoke void @_ZNSt4pairIN7Numeric6MatrixIN17FiniteDifferences4NodeEEESt6vectorIS_IiiESaIS6_EEEC2IRS4_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %98 unwind label %99

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

99:                                               ; preds = %97
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %12, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %13, align 4
  br label %103

103:                                              ; preds = %99, %75
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %12, align 8
  %106 = load i32, ptr %13, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

; 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 @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEC2Eii(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(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIN7Numeric6MatrixIN17FiniteDifferences4NodeEEESt6vectorIS_IiiESaIS6_EEEC2IRS4_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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 = { 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 = !{!"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 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN17FiniteDifferences4NodeE", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!12, !6, i64 16}
!14 = !{!12, !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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.std::pair" = type { %"class.Numeric::Matrix", %"class.std::vector.0" }
%"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<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<FiniteDifferences::Node, std::allocator<FiniteDifferences::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17FiniteDifferences10createGridEd(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") 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.0", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = fdiv double 1.000000e-01, %1
  %8 = fadd double %7, 1.000000e+00
  %9 = fptosi double %8 to i32
  %10 = add nsw i32 %9, 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEC2Eii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %10, i32 noundef %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  %.not22 = icmp slt i32 %9, 0
  br i1 %.not22, label %._crit_edge25, label %.lr.ph

._crit_edge25:                                    ; preds = %._crit_edge, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  invoke void @_ZNSt4pairIN7Numeric6MatrixIN17FiniteDifferences4NodeEEESt6vectorIS_IiiESaIS6_EEEC2IRS4_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %48 unwind label %49

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

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

13:                                               ; preds = %.lr.ph, %45
  %storemerge1721 = phi i32 [ 0, %.lr.ph ], [ %47, %45 ]
  %14 = load i32, ptr %5, align 4, !tbaa !5
  %15 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %storemerge1721, i32 noundef %14)
          to label %16 unwind label %38

16:                                               ; preds = %13
  %17 = sitofp i32 %14 to double
  %18 = fmul double %17, %1
  %19 = getelementptr inbounds i8, ptr %15, i64 8
  store double %18, ptr %19, align 8, !tbaa !11
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = load i32, ptr %5, align 4, !tbaa !5
  %22 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %20, i32 noundef %21)
          to label %23 unwind label %38

23:                                               ; preds = %16
  %24 = sitofp i32 %20 to double
  %25 = fmul double %24, %1
  %26 = getelementptr inbounds i8, ptr %22, i64 16
  store double %25, ptr %26, align 8, !tbaa !14
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = sitofp i32 %27 to double
  %29 = fmul double %28, %1
  %30 = fcmp ult double %29, 6.000000e-02
  %.pre = load i32, ptr %6, align 4
  br i1 %30, label %40, label %31

31:                                               ; preds = %23
  %32 = sitofp i32 %.pre to double
  %33 = fmul double %32, %1
  %34 = fcmp ult double %33, 8.000000e-02
  br i1 %34, label %40, label %35

35:                                               ; preds = %31
  %36 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %.pre, i32 noundef %27)
          to label %37 unwind label %38

37:                                               ; preds = %35
  store double 1.500000e+01, ptr %36, align 8, !tbaa !15
  br label %45

38:                                               ; preds = %43, %35, %16, %13
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %51

40:                                               ; preds = %31, %23
  %41 = icmp ne i32 %27, 0
  %42 = icmp ne i32 %.pre, 0
  %or.cond = select i1 %41, i1 %42, i1 false
  br i1 %or.cond, label %43, label %45

43:                                               ; preds = %40
  %44 = 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) %6, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %45 unwind label %38

45:                                               ; preds = %37, %43, %40
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %6, align 4, !tbaa !5
  %.not18.not = icmp slt i32 %46, %9
  br i1 %.not18.not, label %13, label %._crit_edge, !llvm.loop !16

48:                                               ; preds = %._crit_edge25
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  ret void

49:                                               ; preds = %._crit_edge25
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %51

51:                                               ; preds = %49, %38
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %50, %49 ]
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn
}

; 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 @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEC2Eii(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(24) ptr @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEEclEii(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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIN7Numeric6MatrixIN17FiniteDifferences4NodeEEESt6vectorIS_IiiESaIS6_EEEC2IRS4_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7Numeric6MatrixIN17FiniteDifferences4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN17FiniteDifferences4NodeE", !13, i64 0, !13, i64 8, !13, i64 16}
!13 = !{!"double", !7, i64 0}
!14 = !{!12, !13, i64 16}
!15 = !{!12, !13, i64 0}
!16 = distinct !{!16, !10}


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