; LLVM IR from FOSS-UCSC/FOSSALGO :: algorithms/ar-lreg/cpp (linear_regression)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.DataPoint = type { i32, i32 }
%class.LinearRegression = type { %"class.std::vector", double, double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %class.DataPoint, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %class.DataPoint, align 4
  %7 = alloca %class.DataPoint, align 4
  %8 = alloca %class.DataPoint, align 4
  %9 = alloca %class.DataPoint, align 4
  %10 = alloca %class.DataPoint, align 4
  %11 = alloca %class.LinearRegression, align 8
  %12 = alloca %class.DataPoint, align 4
  %13 = alloca %class.DataPoint, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #7
  call void @_ZNSt6vectorI9DataPointIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  invoke void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef 95, i32 noundef 85)
          to label %14 unwind label %34

14:                                               ; preds = %0
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %15 unwind label %38

15:                                               ; preds = %14
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  invoke void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef 85, i32 noundef 95)
          to label %16 unwind label %43

16:                                               ; preds = %15
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %17 unwind label %47

17:                                               ; preds = %16
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  invoke void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef 80, i32 noundef 70)
          to label %18 unwind label %52

18:                                               ; preds = %17
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %19 unwind label %56

19:                                               ; preds = %18
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  invoke void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %8, i32 noundef 70, i32 noundef 65)
          to label %20 unwind label %61

20:                                               ; preds = %19
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %8)
          to label %21 unwind label %65

21:                                               ; preds = %20
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  invoke void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %9, i32 noundef 60, i32 noundef 70)
          to label %22 unwind label %70

22:                                               ; preds = %21
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(8) %9)
          to label %23 unwind label %74

23:                                               ; preds = %22
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  invoke void @_ZN9DataPointIiiEC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %10, i32 noundef 80)
          to label %24 unwind label %79

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #7
  invoke void @_ZN16LinearRegressionIiiEC2ERKSt6vectorI9DataPointIiiESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %25 unwind label %83

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %10, i64 8, i1 false), !tbaa.struct !5
  invoke void @_ZN16LinearRegressionIiiE3fitE9DataPointIiiE(ptr dead_on_unwind writable sret(%class.DataPoint) align 4 %12, ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef %13)
          to label %26 unwind label %87

26:                                               ; preds = %25
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %12, i64 8, i1 false), !tbaa.struct !5
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %12) #7
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %27 = invoke noundef i32 @_ZNK9DataPointIiiE9getTargetEv(ptr noundef nonnull align 4 dereferenceable(8) %10)
          to label %28 unwind label %91

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %27)
          to label %30 unwind label %91

30:                                               ; preds = %28
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %32 unwind label %91

32:                                               ; preds = %30
  store i32 0, ptr %1, align 4
  call void @_ZN16LinearRegressionIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #7
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @_ZNSt6vectorI9DataPointIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #7
  %33 = load i32, ptr %1, align 4
  ret i32 %33

34:                                               ; preds = %0
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %4, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %5, align 4
  br label %42

38:                                               ; preds = %14
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %4, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %5, align 4
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #7
  br label %42

42:                                               ; preds = %38, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %98

43:                                               ; preds = %15
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %4, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %5, align 4
  br label %51

47:                                               ; preds = %16
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %4, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %5, align 4
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6) #7
  br label %51

51:                                               ; preds = %47, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %98

52:                                               ; preds = %17
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %4, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %5, align 4
  br label %60

56:                                               ; preds = %18
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %4, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %5, align 4
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %7) #7
  br label %60

60:                                               ; preds = %56, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %98

61:                                               ; preds = %19
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %4, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %5, align 4
  br label %69

65:                                               ; preds = %20
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %4, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %5, align 4
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %8) #7
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %98

70:                                               ; preds = %21
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %4, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %5, align 4
  br label %78

74:                                               ; preds = %22
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %4, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %5, align 4
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %9) #7
  br label %78

78:                                               ; preds = %74, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %98

79:                                               ; preds = %23
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %4, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %5, align 4
  br label %97

83:                                               ; preds = %24
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %4, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %5, align 4
  br label %96

87:                                               ; preds = %25
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %4, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %5, align 4
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %95

91:                                               ; preds = %30, %28, %26
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %4, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %5, align 4
  br label %95

95:                                               ; preds = %91, %87
  call void @_ZN16LinearRegressionIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #7
  br label %96

96:                                               ; preds = %95, %83
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #7
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %10) #7
  br label %97

97:                                               ; preds = %96, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %98

98:                                               ; preds = %97, %78, %69, %60, %51, %42
  call void @_ZNSt6vectorI9DataPointIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #7
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %4, align 8
  %101 = load i32, ptr %5, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #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 void @_ZN9DataPointIiiEC2Ei(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16LinearRegressionIiiE3fitE9DataPointIiiE(ptr dead_on_unwind noalias writable sret(%class.DataPoint) align 4, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #3 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) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 = { 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 #7 = { 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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DataPoint<int, int>, std::allocator<DataPoint<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.DataPoint = type { i32, i32 }
%class.LinearRegression = type { %"class.std::vector", double, double }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca %class.DataPoint, align 4
  %3 = alloca %class.DataPoint, align 4
  %4 = alloca %class.DataPoint, align 4
  %5 = alloca %class.DataPoint, align 4
  %6 = alloca %class.DataPoint, align 4
  %7 = alloca %class.DataPoint, align 8
  %8 = alloca %class.LinearRegression, align 8
  %9 = alloca %class.DataPoint, align 8
  %10 = alloca %class.DataPoint, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  call void @_ZNSt6vectorI9DataPointIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %2, i32 noundef 95, i32 noundef 85)
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(8) %2)
          to label %11 unwind label %25

11:                                               ; preds = %0
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef 85, i32 noundef 95)
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(8) %3)
          to label %12 unwind label %27

12:                                               ; preds = %11
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %4, i32 noundef 80, i32 noundef 70)
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %13 unwind label %29

13:                                               ; preds = %12
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %5, i32 noundef 70, i32 noundef 65)
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(8) %5)
          to label %14 unwind label %31

14:                                               ; preds = %13
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN9DataPointIiiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %6, i32 noundef 60, i32 noundef 70)
  invoke void @_ZNSt6vectorI9DataPointIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(8) %6)
          to label %15 unwind label %33

15:                                               ; preds = %14
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN9DataPointIiiEC2Ei(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef 80)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #6
  invoke void @_ZN16LinearRegressionIiiEC2ERKSt6vectorI9DataPointIiiESaIS3_EE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %16 unwind label %35

16:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %17 = load i64, ptr %7, align 8
  store i64 %17, ptr %10, align 8
  invoke void @_ZN16LinearRegressionIiiE3fitE9DataPointIiiE(ptr dead_on_unwind nonnull writable sret(%class.DataPoint) align 4 %9, ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull %10)
          to label %18 unwind label %37

18:                                               ; preds = %16
  %19 = load i64, ptr %9, align 8
  store i64 %19, ptr %7, align 8
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %9) #6
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %20 = call noundef i32 @_ZNK9DataPointIiiE9getTargetEv(ptr noundef nonnull align 4 dereferenceable(8) %7)
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %20)
          to label %22 unwind label %39

22:                                               ; preds = %18
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %24 unwind label %39

24:                                               ; preds = %22
  call void @_ZN16LinearRegressionIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #6
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZNSt6vectorI9DataPointIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  ret i32 0

25:                                               ; preds = %0
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br label %43

27:                                               ; preds = %11
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %43

29:                                               ; preds = %12
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br label %43

31:                                               ; preds = %13
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %43

33:                                               ; preds = %14
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %43

35:                                               ; preds = %15
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %42

37:                                               ; preds = %16
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %41

39:                                               ; preds = %22, %18
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %41

41:                                               ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZN16LinearRegressionIiiED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #6
  br label %42

42:                                               ; preds = %41, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #6
  call void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %43

43:                                               ; preds = %42, %33, %31, %29, %27, %25
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %42 ], [ %34, %33 ], [ %32, %31 ], [ %30, %29 ], [ %28, %27 ], [ %26, %25 ]
  call void @_ZNSt6vectorI9DataPointIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn.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 nounwind uwtable
declare dso_local void @_ZNSt6vectorI9DataPointIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9DataPointIiiED2Ev(ptr noundef nonnull align 4 dereferenceable(8)) 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 void @_ZN9DataPointIiiEC2Ei(ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16LinearRegressionIiiE3fitE9DataPointIiiE(ptr dead_on_unwind noalias writable sret(%class.DataPoint) align 4, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) local_unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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)"}


; Effective O3 passes: GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass