; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src (Surrogate_PRS_CAT)

; 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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.SGTELIB::Surrogate" = type <{ ptr, ptr, %"class.SGTELIB::Surrogate_Parameters", i32, i32, i32, i32, i32, i32, i8, [7 x i8], ptr, ptr, ptr, ptr, %"class.std::__cxx11::list", %"class.std::map", double, %"class.std::basic_ofstream", i8, [7 x i8] }>
%"class.SGTELIB::Surrogate_Parameters" = type { ptr, i32, i32, i32, i32, i32, double, i32, double, i32, i32, i32, %"class.SGTELIB::Matrix", i32, i32, i32, double, double, double, double, %"class.SGTELIB::Matrix", i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32 }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" }
%"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<SGTELIB::metric_t, std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>, std::_Select1st<std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>>, std::less<SGTELIB::metric_t>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<SGTELIB::metric_t, std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>, std::_Select1st<std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>>, std::less<SGTELIB::metric_t>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.6 }
%union.anon.6 = type { i32 }
%"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.SGTELIB::Surrogate_PRS_CAT" = type <{ %"class.SGTELIB::Surrogate_PRS", %"class.std::set", i32, [4 x i8] }>
%"class.SGTELIB::Surrogate_PRS" = type { %"class.SGTELIB::Surrogate.base", i32, %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix" }
%"class.SGTELIB::Surrogate.base" = type <{ ptr, ptr, %"class.SGTELIB::Surrogate_Parameters", i32, i32, i32, i32, i32, i32, i8, [7 x i8], ptr, ptr, ptr, ptr, %"class.std::__cxx11::list", %"class.std::map", double, %"class.std::basic_ofstream", i8 }>
%"class.std::set" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<double, double, std::_Identity<double>, std::less<double>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<double, double, std::_Identity<double>, std::less<double>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB17Surrogate_PRS_CAT13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1268) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.SGTELIB::Matrix", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.SGTELIB::Matrix", align 8
  %14 = alloca %"class.SGTELIB::Matrix", align 8
  %15 = alloca %"class.SGTELIB::Matrix", align 8
  %16 = alloca i8, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %18 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %17, i32 0, i32 1
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_pvarEv(ptr noundef nonnull align 8 dereferenceable(504) %19)
  store i32 %20, ptr %4, align 4, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %21 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %17, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %22)
  store i32 %23, ptr %5, align 4, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %24 = load i32, ptr %5, align 4, !tbaa !47
  %25 = sub nsw i32 %24, 1
  %26 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %17, i32 0, i32 2
  %27 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters10get_degreeEv(ptr noundef nonnull align 8 dereferenceable(312) %26)
  %28 = call noundef i32 @_ZN7SGTELIB13Surrogate_PRS18get_nb_PRS_monomesEii(i32 noundef %25, i32 noundef %27)
  store i32 %28, ptr %6, align 4, !tbaa !47
  %29 = load i32, ptr %6, align 4, !tbaa !47
  %30 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS_CAT", ptr %17, i32 0, i32 2
  %31 = load i32, ptr %30, align 8, !tbaa !48
  %32 = mul nsw i32 %29, %31
  %33 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS", ptr %17, i32 0, i32 1
  store i32 %32, ptr %33, align 4, !tbaa !56
  %34 = load i32, ptr %6, align 4, !tbaa !47
  %35 = icmp sgt i32 %34, 100
  br i1 %35, label %36, label %37

36:                                               ; preds = %1
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %101

37:                                               ; preds = %1
  %38 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS", ptr %17, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !56
  %40 = load i32, ptr %4, align 4, !tbaa !47
  %41 = sub nsw i32 %40, 1
  %42 = icmp sgt i32 %39, %41
  br i1 %42, label %43, label %48

43:                                               ; preds = %37
  %44 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %17, i32 0, i32 2
  %45 = call noundef double @_ZNK7SGTELIB20Surrogate_Parameters9get_ridgeEv(ptr noundef nonnull align 8 dereferenceable(312) %44)
  %46 = fcmp oeq double %45, 0.000000e+00
  br i1 %46, label %47, label %48

47:                                               ; preds = %43
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %101

48:                                               ; preds = %43, %37
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %49 unwind label %74

49:                                               ; preds = %48
  %50 = load i32, ptr %6, align 4, !tbaa !47
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef %50, i32 noundef 1)
          to label %51 unwind label %78

51:                                               ; preds = %49
  %52 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS", ptr %17, i32 0, i32 2
  %53 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %52, ptr noundef nonnull align 8 dereferenceable(56) %8)
          to label %54 unwind label %82

54:                                               ; preds = %51
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #5
  %55 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS", ptr %17, i32 0, i32 2
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %55, double noundef 0.000000e+00)
  %56 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS", ptr %17, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #5
  %57 = load i32, ptr %5, align 4, !tbaa !47
  %58 = sub nsw i32 %57, 1
  %59 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %17, i32 0, i32 2
  %60 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters10get_degreeEv(ptr noundef nonnull align 8 dereferenceable(312) %59)
  call void @_ZN7SGTELIB13Surrogate_PRS15get_PRS_monomesEii(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %13, i32 noundef %58, i32 noundef %60)
  invoke void @_ZN7SGTELIB6Matrix8add_colsERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %61 unwind label %88

61:                                               ; preds = %54
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #5
  %62 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS", ptr %17, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #5
  call void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(985) %17)
  %63 = load ptr, ptr %17, align 8, !tbaa !57
  %64 = getelementptr inbounds ptr, ptr %63, i64 13
  %65 = load ptr, ptr %64, align 8
  invoke void %65(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(1268) %17, ptr noundef nonnull align 8 dereferenceable(56) %62, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %66 unwind label %92

66:                                               ; preds = %61
  %67 = getelementptr inbounds %"class.SGTELIB::Surrogate_PRS", ptr %17, i32 0, i32 3
  %68 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %67, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %69 unwind label %96

69:                                               ; preds = %66
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  %70 = call noundef zeroext i1 @_ZN7SGTELIB13Surrogate_PRS13compute_alphaEv(ptr noundef nonnull align 8 dereferenceable(1216) %17)
  %71 = zext i1 %70 to i8
  store i8 %71, ptr %16, align 1, !tbaa !59
  %72 = load i8, ptr %16, align 1, !tbaa !59, !range !60, !noundef !61
  %73 = trunc i8 %72 to i1
  store i1 %73, ptr %2, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %101

74:                                               ; preds = %48
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %11, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %12, align 4
  br label %87

78:                                               ; preds = %49
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %11, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %12, align 4
  br label %86

82:                                               ; preds = %51
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #5
  br label %86

86:                                               ; preds = %82, %78
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %87

87:                                               ; preds = %86, %74
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #5
  br label %103

88:                                               ; preds = %54
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %11, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #5
  br label %103

92:                                               ; preds = %61
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %11, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %12, align 4
  br label %100

96:                                               ; preds = %66
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %11, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  br label %100

100:                                              ; preds = %96, %92
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #5
  br label %103

101:                                              ; preds = %69, %47, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %102 = load i1, ptr %2, align 1
  ret i1 %102

103:                                              ; preds = %100, %88, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %104

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB11TrainingSet8get_pvarEv(ptr noundef nonnull align 8 dereferenceable(504)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504)) #1 align 2

declare noundef i32 @_ZN7SGTELIB13Surrogate_PRS18get_nb_PRS_monomesEii(i32 noundef, i32 noundef) #2

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

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

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

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

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #2

; Function Attrs: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4

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

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

declare void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56), double noundef) #2

declare void @_ZN7SGTELIB6Matrix8add_colsERKS0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #2

declare void @_ZN7SGTELIB13Surrogate_PRS15get_PRS_monomesEii(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, i32 noundef, i32 noundef) #2

declare void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985)) #2

declare noundef zeroext i1 @_ZN7SGTELIB13Surrogate_PRS13compute_alphaEv(ptr noundef nonnull align 8 dereferenceable(1216)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSN7SGTELIB9SurrogateE", !6, i64 8, !11, i64 16, !13, i64 328, !13, i64 332, !13, i64 336, !13, i64 340, !13, i64 344, !13, i64 348, !25, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !26, i64 392, !31, i64 416, !16, i64 464, !39, i64 472, !25, i64 984}
!11 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !12, i64 8, !13, i64 12, !14, i64 16, !15, i64 20, !14, i64 24, !16, i64 32, !14, i64 40, !16, i64 48, !14, i64 56, !17, i64 60, !14, i64 64, !18, i64 72, !22, i64 128, !14, i64 132, !23, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !18, i64 176, !14, i64 232, !24, i64 236, !19, i64 240, !19, i64 272, !13, i64 304, !13, i64 308}
!12 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!15 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!18 = !{!"_ZTSN7SGTELIB6MatrixE", !19, i64 8, !13, i64 40, !13, i64 44, !6, i64 48}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!23 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!24 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !29, i64 0}
!29 = !{!"_ZTSNSt8__detail17_List_node_headerE", !30, i64 0, !21, i64 16}
!30 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!31 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !32, i64 0}
!32 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !33, i64 0}
!33 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !34, i64 0, !36, i64 8}
!34 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !35, i64 0}
!35 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!36 = !{!"_ZTSSt15_Rb_tree_header", !37, i64 0, !21, i64 32}
!37 = !{!"_ZTSSt18_Rb_tree_node_base", !38, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!38 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!39 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !40, i64 0, !41, i64 8}
!40 = !{!"_ZTSSo"}
!41 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !42, i64 0, !7, i64 64, !44, i64 104, !45, i64 120, !46, i64 124, !46, i64 132, !46, i64 140, !6, i64 152, !21, i64 160, !25, i64 168, !25, i64 169, !25, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !25, i64 192, !6, i64 200, !6, i64 208, !21, i64 216, !6, i64 224, !6, i64 232}
!42 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !43, i64 56}
!43 = !{!"_ZTSSt6locale", !6, i64 0}
!44 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !25, i64 8}
!45 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!46 = !{!"_ZTS11__mbstate_t", !13, i64 0, !7, i64 4}
!47 = !{!13, !13, i64 0}
!48 = !{!49, !13, i64 1264}
!49 = !{!"_ZTSN7SGTELIB17Surrogate_PRS_CATE", !50, i64 0, !51, i64 1216, !13, i64 1264}
!50 = !{!"_ZTSN7SGTELIB13Surrogate_PRSE", !10, i64 0, !13, i64 988, !18, i64 992, !18, i64 1048, !18, i64 1104, !18, i64 1160}
!51 = !{!"_ZTSSt3setIdSt4lessIdESaIdEE", !52, i64 0}
!52 = !{!"_ZTSSt8_Rb_treeIddSt9_IdentityIdESt4lessIdESaIdEE", !53, i64 0}
!53 = !{!"_ZTSNSt8_Rb_treeIddSt9_IdentityIdESt4lessIdESaIdEE13_Rb_tree_implIS3_Lb1EEE", !54, i64 0, !36, i64 8}
!54 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIdEE", !55, i64 0}
!55 = !{!"_ZTSSt4lessIdE"}
!56 = !{!50, !13, i64 988}
!57 = !{!58, !58, i64 0}
!58 = !{!"vtable pointer", !8, i64 0}
!59 = !{!25, !25, i64 0}
!60 = !{i8 0, i8 2}
!61 = !{}


; 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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB17Surrogate_PRS_CAT13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1268) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.SGTELIB::Matrix", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.SGTELIB::Matrix", align 8
  %6 = alloca %"class.SGTELIB::Matrix", align 8
  %7 = alloca %"class.SGTELIB::Matrix", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = tail call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_pvarEv(ptr noundef nonnull align 8 dereferenceable(504) %9)
  %11 = load ptr, ptr %8, align 8, !tbaa !5
  %12 = tail call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %11)
  %13 = add nsw i32 %12, -1
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = tail call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters10get_degreeEv(ptr noundef nonnull align 8 dereferenceable(312) %14)
  %16 = tail call noundef i32 @_ZN7SGTELIB13Surrogate_PRS18get_nb_PRS_monomesEii(i32 noundef %13, i32 noundef %15)
  %17 = getelementptr inbounds i8, ptr %0, i64 1264
  %18 = load i32, ptr %17, align 8, !tbaa !46
  %19 = mul nsw i32 %18, %16
  %20 = getelementptr inbounds i8, ptr %0, i64 988
  store i32 %19, ptr %20, align 4, !tbaa !54
  %21 = icmp sgt i32 %16, 100
  br i1 %21, label %57, label %22

22:                                               ; preds = %1
  %.not = icmp slt i32 %19, %10
  br i1 %.not, label %26, label %23

23:                                               ; preds = %22
  %24 = tail call noundef double @_ZNK7SGTELIB20Surrogate_Parameters9get_ridgeEv(ptr noundef nonnull align 8 dereferenceable(312) %14)
  %25 = fcmp oeq double %24, 0.000000e+00
  br i1 %25, label %57, label %26

26:                                               ; preds = %23, %22
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %27 unwind label %42

27:                                               ; preds = %26
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %16, i32 noundef 1)
          to label %28 unwind label %44

28:                                               ; preds = %27
  %29 = getelementptr inbounds i8, ptr %0, i64 992
  %30 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(56) %2)
          to label %31 unwind label %46

31:                                               ; preds = %28
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %29, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #5
  %32 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters10get_degreeEv(ptr noundef nonnull align 8 dereferenceable(312) %14)
  call void @_ZN7SGTELIB13Surrogate_PRS15get_PRS_monomesEii(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %5, i32 noundef %13, i32 noundef %32)
  invoke void @_ZN7SGTELIB6Matrix8add_colsERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(56) %5)
          to label %33 unwind label %50

33:                                               ; preds = %31
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #5
  call void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(985) %0)
  %34 = load ptr, ptr %0, align 8, !tbaa !55
  %35 = getelementptr inbounds i8, ptr %34, i64 104
  %36 = load ptr, ptr %35, align 8
  invoke void %36(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %6, ptr noundef nonnull align 8 dereferenceable(1268) %0, ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %37 unwind label %52

37:                                               ; preds = %33
  %38 = getelementptr inbounds i8, ptr %0, i64 1048
  %39 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %38, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %40 unwind label %54

40:                                               ; preds = %37
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #5
  %41 = call noundef zeroext i1 @_ZN7SGTELIB13Surrogate_PRS13compute_alphaEv(ptr noundef nonnull align 8 dereferenceable(1216) %0)
  br label %57

42:                                               ; preds = %26
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %49

44:                                               ; preds = %27
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %28
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  br label %48

48:                                               ; preds = %46, %44
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %49

49:                                               ; preds = %48, %42
  %.pn.pn = phi { ptr, i32 } [ %.pn, %48 ], [ %43, %42 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  br label %58

50:                                               ; preds = %31
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #5
  br label %58

52:                                               ; preds = %33
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %37
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #5
  br label %56

56:                                               ; preds = %54, %52
  %.pn18 = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #5
  br label %58

57:                                               ; preds = %23, %1, %40
  %.0 = phi i1 [ %41, %40 ], [ false, %1 ], [ false, %23 ]
  ret i1 %.0

58:                                               ; preds = %56, %50, %49
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %56 ], [ %51, %50 ], [ %.pn.pn, %49 ]
  resume { ptr, i32 } %.pn18.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB11TrainingSet8get_pvarEv(ptr noundef nonnull align 8 dereferenceable(504)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504)) local_unnamed_addr #1 align 2

declare noundef i32 @_ZN7SGTELIB13Surrogate_PRS18get_nb_PRS_monomesEii(i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

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

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

declare void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4

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

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

declare void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56), double noundef) local_unnamed_addr #2

declare void @_ZN7SGTELIB6Matrix8add_colsERKS0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2

declare void @_ZN7SGTELIB13Surrogate_PRS15get_PRS_monomesEii(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN7SGTELIB13Surrogate_PRS13compute_alphaEv(ptr noundef nonnull align 8 dereferenceable(1216)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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, !7, i64 8}
!6 = !{!"_ZTSN7SGTELIB9SurrogateE", !7, i64 8, !10, i64 16, !12, i64 328, !12, i64 332, !12, i64 336, !12, i64 340, !12, i64 344, !12, i64 348, !24, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !25, i64 392, !30, i64 416, !15, i64 464, !38, i64 472, !24, i64 984}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !11, i64 8, !12, i64 12, !13, i64 16, !14, i64 20, !13, i64 24, !15, i64 32, !13, i64 40, !15, i64 48, !13, i64 56, !16, i64 60, !13, i64 64, !17, i64 72, !21, i64 128, !13, i64 132, !22, i64 136, !15, i64 144, !15, i64 152, !15, i64 160, !15, i64 168, !17, i64 176, !13, i64 232, !23, i64 236, !18, i64 240, !18, i64 272, !12, i64 304, !12, i64 308}
!11 = !{!"_ZTSN7SGTELIB7model_tE", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTSN7SGTELIB14param_status_tE", !8, i64 0}
!14 = !{!"_ZTSN7SGTELIB8kernel_tE", !8, i64 0}
!15 = !{!"double", !8, i64 0}
!16 = !{!"_ZTSN7SGTELIB10distance_tE", !8, i64 0}
!17 = !{!"_ZTSN7SGTELIB6MatrixE", !18, i64 8, !12, i64 40, !12, i64 44, !7, i64 48}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !8, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!20 = !{!"long", !8, i64 0}
!21 = !{!"_ZTSN7SGTELIB8weight_tE", !8, i64 0}
!22 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !8, i64 0}
!23 = !{!"_ZTSN7SGTELIB8metric_tE", !8, i64 0}
!24 = !{!"bool", !8, i64 0}
!25 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !26, i64 0}
!26 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !28, i64 0}
!28 = !{!"_ZTSNSt8__detail17_List_node_headerE", !29, i64 0, !20, i64 16}
!29 = !{!"_ZTSNSt8__detail15_List_node_baseE", !7, i64 0, !7, i64 8}
!30 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !31, i64 0}
!31 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !32, i64 0}
!32 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !33, i64 0, !35, i64 8}
!33 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !34, i64 0}
!34 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!35 = !{!"_ZTSSt15_Rb_tree_header", !36, i64 0, !20, i64 32}
!36 = !{!"_ZTSSt18_Rb_tree_node_base", !37, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!37 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!38 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !39, i64 0, !40, i64 8}
!39 = !{!"_ZTSSo"}
!40 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !41, i64 0, !8, i64 64, !43, i64 104, !44, i64 120, !45, i64 124, !45, i64 132, !45, i64 140, !7, i64 152, !20, i64 160, !24, i64 168, !24, i64 169, !24, i64 170, !8, i64 171, !7, i64 176, !7, i64 184, !24, i64 192, !7, i64 200, !7, i64 208, !20, i64 216, !7, i64 224, !7, i64 232}
!41 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !42, i64 56}
!42 = !{!"_ZTSSt6locale", !7, i64 0}
!43 = !{!"_ZTSSt12__basic_fileIcE", !7, i64 0, !24, i64 8}
!44 = !{!"_ZTSSt13_Ios_Openmode", !8, i64 0}
!45 = !{!"_ZTS11__mbstate_t", !12, i64 0, !8, i64 4}
!46 = !{!47, !12, i64 1264}
!47 = !{!"_ZTSN7SGTELIB17Surrogate_PRS_CATE", !48, i64 0, !49, i64 1216, !12, i64 1264}
!48 = !{!"_ZTSN7SGTELIB13Surrogate_PRSE", !6, i64 0, !12, i64 988, !17, i64 992, !17, i64 1048, !17, i64 1104, !17, i64 1160}
!49 = !{!"_ZTSSt3setIdSt4lessIdESaIdEE", !50, i64 0}
!50 = !{!"_ZTSSt8_Rb_treeIddSt9_IdentityIdESt4lessIdESaIdEE", !51, i64 0}
!51 = !{!"_ZTSNSt8_Rb_treeIddSt9_IdentityIdESt4lessIdESaIdEE13_Rb_tree_implIS3_Lb1EEE", !52, i64 0, !35, i64 8}
!52 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIdEE", !53, i64 0}
!53 = !{!"_ZTSSt4lessIdE"}
!54 = !{!48, !12, i64 988}
!55 = !{!56, !56, i64 0}
!56 = !{!"vtable pointer", !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass