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

; 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_Ensemble_Stat" = type { %"class.SGTELIB::Surrogate.base", i32, i32, %"class.std::vector", ptr, ptr, %"class.SGTELIB::Matrix", i32, double, double, double, double }
%"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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<SGTELIB::Surrogate *, std::allocator<SGTELIB::Surrogate *>>::_Vector_impl" }
%"struct.std::_Vector_base<SGTELIB::Surrogate *, std::allocator<SGTELIB::Surrogate *>>::_Vector_impl" = type { %"struct.std::_Vector_base<SGTELIB::Surrogate *, std::allocator<SGTELIB::Surrogate *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<SGTELIB::Surrogate *, std::allocator<SGTELIB::Surrogate *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.12 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.15 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [10 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: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB20Surrogate_Parameters10set_weightERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef nonnull align 8 dereferenceable(56)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7SGTELIB20Surrogate_Parameters10get_weightEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(312)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB23Surrogate_Ensemble_Stat13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1136) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca i1, align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca i1, align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca i1, align 1
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::allocator", align 1
  %33 = alloca %"class.std::__cxx11::basic_string", align 8
  %34 = alloca %"class.std::allocator", align 1
  %35 = alloca i1, align 1
  %36 = alloca %"class.SGTELIB::Matrix", align 8
  %37 = alloca %"class.std::__cxx11::basic_string", align 8
  %38 = alloca %"class.std::allocator", align 1
  %39 = alloca %"class.std::__cxx11::basic_string", align 8
  %40 = alloca %"class.std::allocator", align 1
  %41 = alloca i1, align 1
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %44 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %45 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  %46 = call noundef double @_ZNK7SGTELIB20Surrogate_Parameters14get_sigma_multEv(ptr noundef nonnull align 8 dereferenceable(312) %45)
  %47 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 9
  store double %46, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  %49 = call noundef double @_ZNK7SGTELIB20Surrogate_Parameters12get_lambda_pEv(ptr noundef nonnull align 8 dereferenceable(312) %48)
  %50 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 10
  store double %49, ptr %50, align 8, !tbaa !52
  %51 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  %52 = call noundef double @_ZNK7SGTELIB20Surrogate_Parameters13get_lambda_piEv(ptr noundef nonnull align 8 dereferenceable(312) %51)
  %53 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 11
  store double %52, ptr %53, align 8, !tbaa !53
  %54 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  %55 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters20get_uncertainty_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %54)
  switch i32 %55, label %197 [
    i32 0, label %56
    i32 1, label %103
  ]

56:                                               ; preds = %1
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21build_simplex_privateEv(ptr noundef nonnull align 8 dereferenceable(1136) %44)
  %57 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 7
  %58 = load i32, ptr %57, align 8, !tbaa !54
  %59 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 3
  %60 = load i32, ptr %59, align 8, !tbaa !55
  %61 = add nsw i32 %60, 1
  %62 = icmp ne i32 %58, %61
  br i1 %62, label %63, label %102

63:                                               ; preds = %56
  store i1 true, ptr %14, align 1
  %64 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %65 unwind label %75

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  %66 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 3
  %67 = load i32, ptr %66, align 8, !tbaa !55
  %68 = add nsw i32 %67, 1
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, i32 noundef %68) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef @.str.13, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %69 unwind label %79

69:                                               ; preds = %65
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.14)
          to label %70 unwind label %83

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  %71 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 7
  %72 = load i32, ptr %71, align 8, !tbaa !54
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, i32 noundef %72) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %73 unwind label %87

73:                                               ; preds = %70
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %64, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef 245, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %74 unwind label %91

74:                                               ; preds = %73
  store i1 false, ptr %14, align 1
  invoke void @__cxa_throw(ptr %64, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %313 unwind label %91

75:                                               ; preds = %63
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %7, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %8, align 4
  br label %98

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

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

87:                                               ; preds = %70
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %7, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %8, align 4
  br label %95

91:                                               ; preds = %74, %73
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %7, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %95

95:                                               ; preds = %91, %87
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %96

96:                                               ; preds = %95, %83
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %97

97:                                               ; preds = %96, %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %98

98:                                               ; preds = %97, %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  %99 = load i1, ptr %14, align 1
  br i1 %99, label %100, label %101

100:                                              ; preds = %98
  call void @__cxa_free_exception(ptr %64) #7
  br label %101

101:                                              ; preds = %100, %98
  br label %307

102:                                              ; preds = %56
  br label %197

103:                                              ; preds = %1
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17build_pss_privateEv(ptr noundef nonnull align 8 dereferenceable(1136) %44)
  %104 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 7
  %105 = load i32, ptr %104, align 8, !tbaa !54
  %106 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 3
  %107 = load i32, ptr %106, align 8, !tbaa !55
  %108 = add nsw i32 %107, 1
  %109 = icmp slt i32 %105, %108
  br i1 %109, label %110, label %149

110:                                              ; preds = %103
  store i1 true, ptr %22, align 1
  %111 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %112 unwind label %122

112:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #7
  %113 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 3
  %114 = load i32, ptr %113, align 8, !tbaa !55
  %115 = add nsw i32 %114, 1
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, i32 noundef %115) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef @.str.15, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %116 unwind label %126

116:                                              ; preds = %112
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.14)
          to label %117 unwind label %130

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  %118 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 7
  %119 = load i32, ptr %118, align 8, !tbaa !54
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, i32 noundef %119) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %120 unwind label %134

120:                                              ; preds = %117
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %111, ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 254, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %121 unwind label %138

121:                                              ; preds = %120
  store i1 false, ptr %22, align 1
  invoke void @__cxa_throw(ptr %111, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %313 unwind label %138

122:                                              ; preds = %110
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %7, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %8, align 4
  br label %145

126:                                              ; preds = %112
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %7, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %8, align 4
  br label %144

130:                                              ; preds = %116
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %7, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %8, align 4
  br label %143

134:                                              ; preds = %117
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %7, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %8, align 4
  br label %142

138:                                              ; preds = %121, %120
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %7, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %142

142:                                              ; preds = %138, %134
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %143

143:                                              ; preds = %142, %130
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %144

144:                                              ; preds = %143, %126
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %145

145:                                              ; preds = %144, %122
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  %146 = load i1, ptr %22, align 1
  br i1 %146, label %147, label %148

147:                                              ; preds = %145
  call void @__cxa_free_exception(ptr %111) #7
  br label %148

148:                                              ; preds = %147, %145
  br label %307

149:                                              ; preds = %103
  %150 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 7
  %151 = load i32, ptr %150, align 8, !tbaa !54
  %152 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 3
  %153 = load i32, ptr %152, align 8, !tbaa !55
  %154 = mul nsw i32 2, %153
  %155 = icmp sgt i32 %151, %154
  br i1 %155, label %156, label %195

156:                                              ; preds = %149
  store i1 true, ptr %30, align 1
  %157 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %158 unwind label %168

158:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #7
  %159 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 3
  %160 = load i32, ptr %159, align 8, !tbaa !55
  %161 = mul nsw i32 2, %160
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %28, i32 noundef %161) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %27, ptr noundef @.str.16, ptr noundef nonnull align 8 dereferenceable(32) %28)
          to label %162 unwind label %172

162:                                              ; preds = %158
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %26, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.14)
          to label %163 unwind label %176

163:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #7
  %164 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 7
  %165 = load i32, ptr %164, align 8, !tbaa !54
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %29, i32 noundef %165) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %25, ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %166 unwind label %180

166:                                              ; preds = %163
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %157, ptr noundef nonnull align 8 dereferenceable(32) %23, i32 noundef 259, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %167 unwind label %184

167:                                              ; preds = %166
  store i1 false, ptr %30, align 1
  invoke void @__cxa_throw(ptr %157, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %313 unwind label %184

168:                                              ; preds = %156
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %7, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %8, align 4
  br label %191

172:                                              ; preds = %158
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %7, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %8, align 4
  br label %190

176:                                              ; preds = %162
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %7, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %8, align 4
  br label %189

180:                                              ; preds = %163
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %7, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %8, align 4
  br label %188

184:                                              ; preds = %167, %166
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %7, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  br label %188

188:                                              ; preds = %184, %180
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br label %189

189:                                              ; preds = %188, %176
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #7
  br label %190

190:                                              ; preds = %189, %172
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %191

191:                                              ; preds = %190, %168
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  %192 = load i1, ptr %30, align 1
  br i1 %192, label %193, label %194

193:                                              ; preds = %191
  call void @__cxa_free_exception(ptr %157) #7
  br label %194

194:                                              ; preds = %193, %191
  br label %307

195:                                              ; preds = %149
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196, %102, %1
  %198 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  %199 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_weight_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %198)
  switch i32 %199, label %255 [
    i32 0, label %200
    i32 1, label %222
    i32 2, label %223
    i32 3, label %224
    i32 4, label %225
    i32 5, label %226
    i32 7, label %227
    i32 8, label %228
    i32 6, label %229
    i32 9, label %229
  ]

200:                                              ; preds = %197
  store i1 true, ptr %35, align 1
  %201 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %202 unwind label %205

202:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %34) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %34)
          to label %203 unwind label %209

203:                                              ; preds = %202
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %201, ptr noundef nonnull align 8 dereferenceable(32) %31, i32 noundef 270, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %204 unwind label %213

204:                                              ; preds = %203
  store i1 false, ptr %35, align 1
  invoke void @__cxa_throw(ptr %201, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %313 unwind label %213

205:                                              ; preds = %200
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %7, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %8, align 4
  br label %218

209:                                              ; preds = %202
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %7, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %8, align 4
  br label %217

213:                                              ; preds = %204, %203
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %7, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #7
  br label %217

217:                                              ; preds = %213, %209
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %34) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  br label %218

218:                                              ; preds = %217, %205
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #7
  %219 = load i1, ptr %35, align 1
  br i1 %219, label %220, label %221

220:                                              ; preds = %218
  call void @__cxa_free_exception(ptr %201) #7
  br label %221

221:                                              ; preds = %220, %218
  br label %307

222:                                              ; preds = %197
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %44, i32 noundef 2)
  br label %277

223:                                              ; preds = %197
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %44, i32 noundef 3)
  br label %277

224:                                              ; preds = %197
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %44, i32 noundef 4)
  br label %277

225:                                              ; preds = %197
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %44, i32 noundef 5)
  br label %277

226:                                              ; preds = %197
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %44, i32 noundef 6)
  br label %277

227:                                              ; preds = %197
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta1Ev(ptr noundef nonnull align 8 dereferenceable(1136) %44)
  br label %277

228:                                              ; preds = %197
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta3Ev(ptr noundef nonnull align 8 dereferenceable(1136) %44)
  br label %277

229:                                              ; preds = %197, %197
  call void @llvm.lifetime.start.p0(i64 56, ptr %36) #7
  %230 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  call void @_ZNK7SGTELIB20Surrogate_Parameters10get_weightEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %36, ptr noundef nonnull align 8 dereferenceable(312) %230)
  store i32 0, ptr %4, align 4, !tbaa !56
  br label %231

231:                                              ; preds = %248, %229
  %232 = load i32, ptr %4, align 4, !tbaa !56
  %233 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 1
  %234 = load i32, ptr %233, align 4, !tbaa !57
  %235 = icmp slt i32 %232, %234
  br i1 %235, label %236, label %251

236:                                              ; preds = %231
  %237 = load i32, ptr %4, align 4, !tbaa !56
  %238 = invoke noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat8is_readyEi(ptr noundef nonnull align 8 dereferenceable(1136) %44, i32 noundef %237)
          to label %239 unwind label %243

239:                                              ; preds = %236
  br i1 %238, label %247, label %240

240:                                              ; preds = %239
  %241 = load i32, ptr %4, align 4, !tbaa !56
  invoke void @_ZN7SGTELIB6Matrix7set_rowEdi(ptr noundef nonnull align 8 dereferenceable(56) %36, double noundef 0.000000e+00, i32 noundef %241)
          to label %242 unwind label %243

242:                                              ; preds = %240
  br label %247

243:                                              ; preds = %252, %251, %240, %236
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %7, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #7
  br label %307

247:                                              ; preds = %242, %239
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %4, align 4, !tbaa !56
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %4, align 4, !tbaa !56
  br label %231, !llvm.loop !58

251:                                              ; preds = %231
  invoke void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %36)
          to label %252 unwind label %243

252:                                              ; preds = %251
  %253 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  invoke void @_ZN7SGTELIB20Surrogate_Parameters10set_weightERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(312) %253, ptr noundef nonnull align 8 dereferenceable(56) %36)
          to label %254 unwind label %243

254:                                              ; preds = %252
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #7
  br label %277

255:                                              ; preds = %197
  store i1 true, ptr %41, align 1
  %256 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %37) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %38) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %37, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %257 unwind label %260

257:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 32, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %40) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %40)
          to label %258 unwind label %264

258:                                              ; preds = %257
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %256, ptr noundef nonnull align 8 dereferenceable(32) %37, i32 noundef 313, ptr noundef nonnull align 8 dereferenceable(32) %39)
          to label %259 unwind label %268

259:                                              ; preds = %258
  store i1 false, ptr %41, align 1
  invoke void @__cxa_throw(ptr %256, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %313 unwind label %268

260:                                              ; preds = %255
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %7, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %8, align 4
  br label %273

264:                                              ; preds = %257
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %7, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %8, align 4
  br label %272

268:                                              ; preds = %259, %258
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %7, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #7
  br label %272

272:                                              ; preds = %268, %264
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %37) #7
  br label %273

273:                                              ; preds = %272, %260
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %38) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %37) #7
  %274 = load i1, ptr %41, align 1
  br i1 %274, label %275, label %276

275:                                              ; preds = %273
  call void @__cxa_free_exception(ptr %256) #7
  br label %276

276:                                              ; preds = %275, %273
  br label %307

277:                                              ; preds = %254, %228, %227, %226, %225, %224, %223, %222
  %278 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 18
  %279 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %278, ptr noundef @.str.19)
  %280 = call noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat19check_weight_vectorEv(ptr noundef nonnull align 8 dereferenceable(1136) %44)
  br i1 %280, label %281, label %283

281:                                              ; preds = %277
  %282 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 9
  store i8 0, ptr %282, align 8, !tbaa !60
  store i1 false, ptr %2, align 1
  store i32 1, ptr %42, align 4
  br label %305

283:                                              ; preds = %277
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21compute_active_modelsEv(ptr noundef nonnull align 8 dereferenceable(1136) %44)
  %284 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 9
  store i8 1, ptr %284, align 8, !tbaa !60
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  store i32 0, ptr %43, align 4, !tbaa !56
  br label %285

285:                                              ; preds = %301, %283
  %286 = load i32, ptr %43, align 4, !tbaa !56
  %287 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 4
  %288 = load i32, ptr %287, align 4, !tbaa !61
  %289 = icmp slt i32 %286, %288
  br i1 %289, label %291, label %290

290:                                              ; preds = %285
  store i32 7, ptr %42, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  br label %304

291:                                              ; preds = %285
  %292 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %44, i32 0, i32 2
  %293 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_metric_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %292)
  %294 = load i32, ptr %43, align 4, !tbaa !56
  %295 = call noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %44, i32 noundef %293, i32 noundef %294)
  %296 = getelementptr inbounds %"class.SGTELIB::Surrogate_Ensemble_Stat", ptr %44, i32 0, i32 5
  %297 = load ptr, ptr %296, align 8, !tbaa !62
  %298 = load i32, ptr %43, align 4, !tbaa !56
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds double, ptr %297, i64 %299
  store double %295, ptr %300, align 8, !tbaa !63
  br label %301

301:                                              ; preds = %291
  %302 = load i32, ptr %43, align 4, !tbaa !56
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %43, align 4, !tbaa !56
  br label %285, !llvm.loop !64

304:                                              ; preds = %290
  store i1 true, ptr %2, align 1
  store i32 1, ptr %42, align 4
  br label %305

305:                                              ; preds = %304, %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  %306 = load i1, ptr %2, align 1
  ret i1 %306

307:                                              ; preds = %276, %243, %221, %194, %148, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %308

308:                                              ; preds = %307
  %309 = load ptr, ptr %7, align 8
  %310 = load i32, ptr %8, align 4
  %311 = insertvalue { ptr, i32 } poison, ptr %309, 0
  %312 = insertvalue { ptr, i32 } %311, i32 %310, 1
  resume { ptr, i32 } %312

313:                                              ; preds = %259, %204, %167, %121, %74
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21build_simplex_privateEv(ptr noundef nonnull align 8 dereferenceable(1136)) #2 align 2

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #5

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17build_pss_privateEv(ptr noundef nonnull align 8 dereferenceable(1136)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta1Ev(ptr noundef nonnull align 8 dereferenceable(1136)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta3Ev(ptr noundef nonnull align 8 dereferenceable(1136)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat8is_readyEi(ptr noundef nonnull align 8 dereferenceable(1136), i32 noundef) #2 align 2

declare void @_ZN7SGTELIB6Matrix7set_rowEdi(ptr noundef nonnull align 8 dereferenceable(56), double noundef, i32 noundef) #6

declare void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat19check_weight_vectorEv(ptr noundef nonnull align 8 dereferenceable(1136)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21compute_active_modelsEv(ptr noundef nonnull align 8 dereferenceable(1136)) #2 align 2

declare noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) #6

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

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

!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, !17, i64 1112}
!10 = !{!"_ZTSN7SGTELIB23Surrogate_Ensemble_StatE", !11, i64 0, !14, i64 988, !14, i64 992, !48, i64 1000, !6, i64 1024, !6, i64 1032, !19, i64 1040, !14, i64 1096, !17, i64 1104, !17, i64 1112, !17, i64 1120, !17, i64 1128}
!11 = !{!"_ZTSN7SGTELIB9SurrogateE", !6, i64 8, !12, i64 16, !14, i64 328, !14, i64 332, !14, i64 336, !14, i64 340, !14, i64 344, !14, i64 348, !26, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !27, i64 392, !32, i64 416, !17, i64 464, !40, i64 472, !26, i64 984}
!12 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !13, i64 8, !14, i64 12, !15, i64 16, !16, i64 20, !15, i64 24, !17, i64 32, !15, i64 40, !17, i64 48, !15, i64 56, !18, i64 60, !15, i64 64, !19, i64 72, !23, i64 128, !15, i64 132, !24, i64 136, !17, i64 144, !17, i64 152, !17, i64 160, !17, i64 168, !19, i64 176, !15, i64 232, !25, i64 236, !20, i64 240, !20, i64 272, !14, i64 304, !14, i64 308}
!13 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!16 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!19 = !{!"_ZTSN7SGTELIB6MatrixE", !20, i64 8, !14, i64 40, !14, i64 44, !6, i64 48}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!24 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!25 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !30, i64 0}
!30 = !{!"_ZTSNSt8__detail17_List_node_headerE", !31, i64 0, !22, i64 16}
!31 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!32 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !35, i64 0, !37, i64 8}
!35 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !36, i64 0}
!36 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!37 = !{!"_ZTSSt15_Rb_tree_header", !38, i64 0, !22, i64 32}
!38 = !{!"_ZTSSt18_Rb_tree_node_base", !39, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!39 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!40 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !41, i64 0, !42, i64 8}
!41 = !{!"_ZTSSo"}
!42 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !43, i64 0, !7, i64 64, !45, i64 104, !46, i64 120, !47, i64 124, !47, i64 132, !47, i64 140, !6, i64 152, !22, i64 160, !26, i64 168, !26, i64 169, !26, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !26, i64 192, !6, i64 200, !6, i64 208, !22, i64 216, !6, i64 224, !6, i64 232}
!43 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !44, i64 56}
!44 = !{!"_ZTSSt6locale", !6, i64 0}
!45 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !26, i64 8}
!46 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!47 = !{!"_ZTS11__mbstate_t", !14, i64 0, !7, i64 4}
!48 = !{!"_ZTSSt6vectorIPN7SGTELIB9SurrogateESaIS2_EE", !49, i64 0}
!49 = !{!"_ZTSSt12_Vector_baseIPN7SGTELIB9SurrogateESaIS2_EE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIPN7SGTELIB9SurrogateESaIS2_EE12_Vector_implE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIPN7SGTELIB9SurrogateESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!52 = !{!10, !17, i64 1120}
!53 = !{!10, !17, i64 1128}
!54 = !{!10, !14, i64 1096}
!55 = !{!11, !14, i64 328}
!56 = !{!14, !14, i64 0}
!57 = !{!10, !14, i64 988}
!58 = distinct !{!58, !59}
!59 = !{!"llvm.loop.mustprogress"}
!60 = !{!11, !26, i64 352}
!61 = !{!11, !14, i64 332}
!62 = !{!10, !6, i64 1032}
!63 = !{!17, !17, i64 0}
!64 = distinct !{!64, !59}


; 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.12 = external hidden unnamed_addr constant [102 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.15 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [10 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB20Surrogate_Parameters10set_weightERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7SGTELIB20Surrogate_Parameters10get_weightEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(312)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB23Surrogate_Ensemble_Stat13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1136) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.SGTELIB::Matrix", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  %32 = getelementptr inbounds i8, ptr %0, i64 16
  %33 = tail call noundef double @_ZNK7SGTELIB20Surrogate_Parameters14get_sigma_multEv(ptr noundef nonnull align 8 dereferenceable(312) %32)
  %34 = getelementptr inbounds i8, ptr %0, i64 1112
  store double %33, ptr %34, align 8, !tbaa !5
  %35 = tail call noundef double @_ZNK7SGTELIB20Surrogate_Parameters12get_lambda_pEv(ptr noundef nonnull align 8 dereferenceable(312) %32)
  %36 = getelementptr inbounds i8, ptr %0, i64 1120
  store double %35, ptr %36, align 8, !tbaa !51
  %37 = tail call noundef double @_ZNK7SGTELIB20Surrogate_Parameters13get_lambda_piEv(ptr noundef nonnull align 8 dereferenceable(312) %32)
  %38 = getelementptr inbounds i8, ptr %0, i64 1128
  store double %37, ptr %38, align 8, !tbaa !52
  %39 = tail call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters20get_uncertainty_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %32)
  switch i32 %39, label %123 [
    i32 0, label %40
    i32 1, label %69
  ]

40:                                               ; preds = %1
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21build_simplex_privateEv(ptr noundef nonnull align 8 dereferenceable(1136) %0)
  %41 = getelementptr inbounds i8, ptr %0, i64 1096
  %42 = load i32, ptr %41, align 8, !tbaa !53
  %43 = getelementptr inbounds i8, ptr %0, i64 328
  %44 = load i32, ptr %43, align 8, !tbaa !54
  %45 = add nsw i32 %44, 1
  %.not67 = icmp eq i32 %42, %45
  br i1 %.not67, label %123, label %46

46:                                               ; preds = %40
  %47 = tail call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %48 unwind label %.thread

48:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  %49 = load i32, ptr %43, align 8, !tbaa !54
  %50 = add nsw i32 %49, 1
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, i32 noundef %50) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull @.str.13, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %51 unwind label %57

51:                                               ; preds = %48
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.14)
          to label %52 unwind label %59

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %53 = load i32, ptr %41, align 8, !tbaa !53
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, i32 noundef %53) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %54 unwind label %61

54:                                               ; preds = %52
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %47, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 245, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %55 unwind label %63

55:                                               ; preds = %54
  invoke void @__cxa_throw(ptr nonnull %47, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %192 unwind label %63

.thread:                                          ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br label %68

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

59:                                               ; preds = %51
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %66

61:                                               ; preds = %52
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %55, %54
  %.028 = phi i1 [ false, %55 ], [ true, %54 ]
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %65

65:                                               ; preds = %63, %61
  %.pn68 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  %.129 = phi i1 [ %.028, %63 ], [ true, %61 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %66

66:                                               ; preds = %65, %59
  %.pn68.pn = phi { ptr, i32 } [ %.pn68, %65 ], [ %60, %59 ]
  %.230 = phi i1 [ %.129, %65 ], [ true, %59 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %67

67:                                               ; preds = %57, %66
  %.pn68.pn.pn = phi { ptr, i32 } [ %.pn68.pn, %66 ], [ %58, %57 ]
  %.331 = phi i1 [ %.230, %66 ], [ true, %57 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br i1 %.331, label %68, label %191

68:                                               ; preds = %.thread, %67
  %.pn68.pn.pn.pn82 = phi { ptr, i32 } [ %56, %.thread ], [ %.pn68.pn.pn, %67 ]
  call void @__cxa_free_exception(ptr %47) #7
  br label %191

69:                                               ; preds = %1
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17build_pss_privateEv(ptr noundef nonnull align 8 dereferenceable(1136) %0)
  %70 = getelementptr inbounds i8, ptr %0, i64 1096
  %71 = load i32, ptr %70, align 8, !tbaa !53
  %72 = getelementptr inbounds i8, ptr %0, i64 328
  %73 = load i32, ptr %72, align 8, !tbaa !54
  %.not = icmp sgt i32 %71, %73
  br i1 %.not, label %97, label %74

74:                                               ; preds = %69
  %75 = tail call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %76 unwind label %.thread83

76:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  %77 = load i32, ptr %72, align 8, !tbaa !54
  %78 = add nsw i32 %77, 1
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, i32 noundef %78) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull @.str.15, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %79 unwind label %85

79:                                               ; preds = %76
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.14)
          to label %80 unwind label %87

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  %81 = load i32, ptr %70, align 8, !tbaa !53
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, i32 noundef %81) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %82 unwind label %89

82:                                               ; preds = %80
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %75, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 254, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %83 unwind label %91

83:                                               ; preds = %82
  invoke void @__cxa_throw(ptr nonnull %75, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %192 unwind label %91

.thread83:                                        ; preds = %74
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %96

85:                                               ; preds = %76
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %95

87:                                               ; preds = %79
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %94

89:                                               ; preds = %80
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

91:                                               ; preds = %83, %82
  %.023 = phi i1 [ false, %83 ], [ true, %82 ]
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %93

93:                                               ; preds = %91, %89
  %.pn62 = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  %.124 = phi i1 [ %.023, %91 ], [ true, %89 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %94

94:                                               ; preds = %93, %87
  %.pn62.pn = phi { ptr, i32 } [ %.pn62, %93 ], [ %88, %87 ]
  %.225 = phi i1 [ %.124, %93 ], [ true, %87 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %95

95:                                               ; preds = %85, %94
  %.pn62.pn.pn = phi { ptr, i32 } [ %.pn62.pn, %94 ], [ %86, %85 ]
  %.326 = phi i1 [ %.225, %94 ], [ true, %85 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br i1 %.326, label %96, label %191

96:                                               ; preds = %.thread83, %95
  %.pn62.pn.pn.pn86 = phi { ptr, i32 } [ %84, %.thread83 ], [ %.pn62.pn.pn, %95 ]
  call void @__cxa_free_exception(ptr %75) #7
  br label %191

97:                                               ; preds = %69
  %98 = shl nsw i32 %73, 1
  %99 = icmp sgt i32 %71, %98
  br i1 %99, label %100, label %123

100:                                              ; preds = %97
  %101 = tail call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %102 unwind label %.thread87

102:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #7
  %103 = load i32, ptr %72, align 8, !tbaa !54
  %104 = shl nsw i32 %103, 1
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %21, i32 noundef %104) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull @.str.16, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %105 unwind label %111

105:                                              ; preds = %102
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.14)
          to label %106 unwind label %113

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #7
  %107 = load i32, ptr %70, align 8, !tbaa !53
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %22, i32 noundef %107) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %108 unwind label %115

108:                                              ; preds = %106
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %101, ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 259, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %109 unwind label %117

109:                                              ; preds = %108
  invoke void @__cxa_throw(ptr nonnull %101, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %192 unwind label %117

.thread87:                                        ; preds = %100
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  br label %122

111:                                              ; preds = %102
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %121

113:                                              ; preds = %105
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %120

115:                                              ; preds = %106
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %119

117:                                              ; preds = %109, %108
  %.020 = phi i1 [ false, %109 ], [ true, %108 ]
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %119

119:                                              ; preds = %117, %115
  %.pn = phi { ptr, i32 } [ %118, %117 ], [ %116, %115 ]
  %.121 = phi i1 [ %.020, %117 ], [ true, %115 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  br label %120

120:                                              ; preds = %119, %113
  %.pn.pn = phi { ptr, i32 } [ %.pn, %119 ], [ %114, %113 ]
  %.222 = phi i1 [ %.121, %119 ], [ true, %113 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #7
  br label %121

121:                                              ; preds = %111, %120
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %120 ], [ %112, %111 ]
  %.3 = phi i1 [ %.222, %120 ], [ true, %111 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  br i1 %.3, label %122, label %191

122:                                              ; preds = %.thread87, %121
  %.pn.pn.pn.pn90 = phi { ptr, i32 } [ %110, %.thread87 ], [ %.pn.pn.pn, %121 ]
  call void @__cxa_free_exception(ptr %101) #7
  br label %191

123:                                              ; preds = %97, %40, %1
  %124 = tail call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_weight_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %32)
  switch i32 %124, label %158 [
    i32 0, label %125
    i32 1, label %137
    i32 2, label %138
    i32 3, label %139
    i32 4, label %140
    i32 5, label %141
    i32 7, label %142
    i32 8, label %143
    i32 6, label %144
    i32 9, label %144
  ]

125:                                              ; preds = %123
  %126 = tail call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %23) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %24) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %127 unwind label %.thread91

127:                                              ; preds = %125
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %26) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %128 unwind label %131

128:                                              ; preds = %127
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %126, ptr noundef nonnull align 8 dereferenceable(32) %23, i32 noundef 270, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %129 unwind label %133

129:                                              ; preds = %128
  invoke void @__cxa_throw(ptr nonnull %126, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %192 unwind label %133

.thread91:                                        ; preds = %125
  %130 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #7
  br label %136

131:                                              ; preds = %127
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %135

133:                                              ; preds = %129, %128
  %.017 = phi i1 [ false, %129 ], [ true, %128 ]
  %134 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  br label %135

135:                                              ; preds = %131, %133
  %.pn73 = phi { ptr, i32 } [ %134, %133 ], [ %132, %131 ]
  %.118 = phi i1 [ %.017, %133 ], [ true, %131 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #7
  br i1 %.118, label %136, label %191

136:                                              ; preds = %.thread91, %135
  %.pn73.pn94 = phi { ptr, i32 } [ %130, %.thread91 ], [ %.pn73, %135 ]
  call void @__cxa_free_exception(ptr %126) #7
  br label %191

137:                                              ; preds = %123
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %0, i32 noundef 2)
  br label %170

138:                                              ; preds = %123
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %0, i32 noundef 3)
  br label %170

139:                                              ; preds = %123
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %0, i32 noundef 4)
  br label %170

140:                                              ; preds = %123
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %0, i32 noundef 5)
  br label %170

141:                                              ; preds = %123
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136) %0, i32 noundef 6)
  br label %170

142:                                              ; preds = %123
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta1Ev(ptr noundef nonnull align 8 dereferenceable(1136) %0)
  br label %170

143:                                              ; preds = %123
  tail call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta3Ev(ptr noundef nonnull align 8 dereferenceable(1136) %0)
  br label %170

144:                                              ; preds = %123, %123
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %27) #7
  call void @_ZNK7SGTELIB20Surrogate_Parameters10get_weightEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %27, ptr noundef nonnull align 8 dereferenceable(312) %32)
  %145 = getelementptr inbounds i8, ptr %0, i64 988
  %146 = load i32, ptr %145, align 4, !tbaa !55
  %147 = icmp sgt i32 %146, 0
  br i1 %147, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %144, %152
  %.055100 = phi i32 [ %153, %152 ], [ 0, %144 ]
  %148 = invoke noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat8is_readyEi(ptr noundef nonnull align 8 dereferenceable(1136) %0, i32 noundef %.055100)
          to label %149 unwind label %.loopexit99

149:                                              ; preds = %.lr.ph
  br i1 %148, label %152, label %150

150:                                              ; preds = %149
  invoke void @_ZN7SGTELIB6Matrix7set_rowEdi(ptr noundef nonnull align 8 dereferenceable(56) %27, double noundef 0.000000e+00, i32 noundef %.055100)
          to label %152 unwind label %.loopexit99

.loopexit99:                                      ; preds = %.lr.ph, %150
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %151

.loopexit.split-lp:                               ; preds = %._crit_edge, %156
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %151

151:                                              ; preds = %.loopexit.split-lp, %.loopexit99
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit99 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %27) #7
  br label %191

152:                                              ; preds = %149, %150
  %153 = add nuw nsw i32 %.055100, 1
  %154 = load i32, ptr %145, align 4, !tbaa !55
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %.lr.ph, label %._crit_edge, !llvm.loop !56

._crit_edge:                                      ; preds = %152, %144
  invoke void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %156 unwind label %.loopexit.split-lp

156:                                              ; preds = %._crit_edge
  invoke void @_ZN7SGTELIB20Surrogate_Parameters10set_weightERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(312) %32, ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %157 unwind label %.loopexit.split-lp

157:                                              ; preds = %156
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %27) #7
  br label %170

158:                                              ; preds = %123
  %159 = tail call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %28) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %29) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %160 unwind label %.thread95

160:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %30) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %161 unwind label %164

161:                                              ; preds = %160
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %159, ptr noundef nonnull align 8 dereferenceable(32) %28, i32 noundef 313, ptr noundef nonnull align 8 dereferenceable(32) %30)
          to label %162 unwind label %166

162:                                              ; preds = %161
  invoke void @__cxa_throw(ptr nonnull %159, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %192 unwind label %166

.thread95:                                        ; preds = %158
  %163 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #7
  br label %169

164:                                              ; preds = %160
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %168

166:                                              ; preds = %162, %161
  %.016 = phi i1 [ false, %162 ], [ true, %161 ]
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  br label %168

168:                                              ; preds = %164, %166
  %.pn76 = phi { ptr, i32 } [ %167, %166 ], [ %165, %164 ]
  %.1 = phi i1 [ %.016, %166 ], [ true, %164 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %28) #7
  br i1 %.1, label %169, label %191

169:                                              ; preds = %.thread95, %168
  %.pn76.pn98 = phi { ptr, i32 } [ %163, %.thread95 ], [ %.pn76, %168 ]
  call void @__cxa_free_exception(ptr %159) #7
  br label %191

170:                                              ; preds = %157, %143, %142, %141, %140, %139, %138, %137
  %171 = getelementptr inbounds i8, ptr %0, i64 472
  %172 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %171, ptr noundef nonnull @.str.19)
  %173 = call noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat19check_weight_vectorEv(ptr noundef nonnull align 8 dereferenceable(1136) %0)
  br i1 %173, label %174, label %176

174:                                              ; preds = %170
  %175 = getelementptr inbounds i8, ptr %0, i64 352
  store i8 0, ptr %175, align 8, !tbaa !58
  br label %.loopexit

176:                                              ; preds = %170
  call void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21compute_active_modelsEv(ptr noundef nonnull align 8 dereferenceable(1136) %0)
  %177 = getelementptr inbounds i8, ptr %0, i64 352
  store i8 1, ptr %177, align 8, !tbaa !58
  %178 = getelementptr inbounds i8, ptr %0, i64 332
  %179 = load i32, ptr %178, align 4, !tbaa !59
  %180 = icmp sgt i32 %179, 0
  br i1 %180, label %.lr.ph103, label %.loopexit

.lr.ph103:                                        ; preds = %176
  %181 = getelementptr inbounds i8, ptr %0, i64 1032
  br label %182

182:                                              ; preds = %.lr.ph103, %182
  %indvars.iv = phi i64 [ 0, %.lr.ph103 ], [ %indvars.iv.next, %182 ]
  %183 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_metric_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %32)
  %184 = trunc nuw nsw i64 %indvars.iv to i32
  %185 = call noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %0, i32 noundef %183, i32 noundef %184)
  %186 = load ptr, ptr %181, align 8, !tbaa !60
  %187 = getelementptr inbounds double, ptr %186, i64 %indvars.iv
  store double %185, ptr %187, align 8, !tbaa !61
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %188 = load i32, ptr %178, align 4, !tbaa !59
  %189 = sext i32 %188 to i64
  %190 = icmp slt i64 %indvars.iv.next, %189
  br i1 %190, label %182, label %.loopexit, !llvm.loop !62

.loopexit:                                        ; preds = %182, %176, %174
  %.056 = xor i1 %173, true
  ret i1 %.056

191:                                              ; preds = %168, %169, %135, %136, %121, %122, %95, %96, %67, %68, %151
  %.pn76.pn.pn = phi { ptr, i32 } [ %.pn76.pn98, %169 ], [ %.pn76, %168 ], [ %lpad.phi, %151 ], [ %.pn73.pn94, %136 ], [ %.pn73, %135 ], [ %.pn62.pn.pn.pn86, %96 ], [ %.pn62.pn.pn, %95 ], [ %.pn.pn.pn.pn90, %122 ], [ %.pn.pn.pn, %121 ], [ %.pn68.pn.pn.pn82, %68 ], [ %.pn68.pn.pn, %67 ]
  resume { ptr, i32 } %.pn76.pn.pn

192:                                              ; preds = %162, %129, %109, %83, %55
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21build_simplex_privateEv(ptr noundef nonnull align 8 dereferenceable(1136)) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #5

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

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17build_pss_privateEv(ptr noundef nonnull align 8 dereferenceable(1136)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat22compute_W_by_select_nbEi(ptr noundef nonnull align 8 dereferenceable(1136), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta1Ev(ptr noundef nonnull align 8 dereferenceable(1136)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat17compute_W_by_wta3Ev(ptr noundef nonnull align 8 dereferenceable(1136)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat8is_readyEi(ptr noundef nonnull align 8 dereferenceable(1136), i32 noundef) local_unnamed_addr #2 align 2

declare void @_ZN7SGTELIB6Matrix7set_rowEdi(ptr noundef nonnull align 8 dereferenceable(56), double noundef, i32 noundef) local_unnamed_addr #6

declare void @_ZN7SGTELIB6Matrix14normalize_colsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7SGTELIB23Surrogate_Ensemble_Stat19check_weight_vectorEv(ptr noundef nonnull align 8 dereferenceable(1136)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB23Surrogate_Ensemble_Stat21compute_active_modelsEv(ptr noundef nonnull align 8 dereferenceable(1136)) local_unnamed_addr #2 align 2

declare noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) local_unnamed_addr #6

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

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

!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, !16, i64 1112}
!6 = !{!"_ZTSN7SGTELIB23Surrogate_Ensemble_StatE", !7, i64 0, !13, i64 988, !13, i64 992, !47, i64 1000, !8, i64 1024, !8, i64 1032, !18, i64 1040, !13, i64 1096, !16, i64 1104, !16, i64 1112, !16, i64 1120, !16, i64 1128}
!7 = !{!"_ZTSN7SGTELIB9SurrogateE", !8, 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, !8, i64 360, !8, i64 368, !8, i64 376, !8, i64 384, !26, i64 392, !31, i64 416, !16, i64 464, !39, i64 472, !25, i64 984}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!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", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"_ZTSN7SGTELIB14param_status_tE", !9, i64 0}
!15 = !{!"_ZTSN7SGTELIB8kernel_tE", !9, i64 0}
!16 = !{!"double", !9, i64 0}
!17 = !{!"_ZTSN7SGTELIB10distance_tE", !9, i64 0}
!18 = !{!"_ZTSN7SGTELIB6MatrixE", !19, i64 8, !13, i64 40, !13, i64 44, !8, i64 48}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !9, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !8, i64 0}
!21 = !{!"long", !9, i64 0}
!22 = !{!"_ZTSN7SGTELIB8weight_tE", !9, i64 0}
!23 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !9, i64 0}
!24 = !{!"_ZTSN7SGTELIB8metric_tE", !9, i64 0}
!25 = !{!"bool", !9, 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", !8, i64 0, !8, 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, !8, i64 8, !8, i64 16, !8, i64 24}
!38 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!39 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !40, i64 0, !41, i64 8}
!40 = !{!"_ZTSSo"}
!41 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !42, i64 0, !9, i64 64, !44, i64 104, !45, i64 120, !46, i64 124, !46, i64 132, !46, i64 140, !8, i64 152, !21, i64 160, !25, i64 168, !25, i64 169, !25, i64 170, !9, i64 171, !8, i64 176, !8, i64 184, !25, i64 192, !8, i64 200, !8, i64 208, !21, i64 216, !8, i64 224, !8, i64 232}
!42 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !8, i64 40, !8, i64 48, !43, i64 56}
!43 = !{!"_ZTSSt6locale", !8, i64 0}
!44 = !{!"_ZTSSt12__basic_fileIcE", !8, i64 0, !25, i64 8}
!45 = !{!"_ZTSSt13_Ios_Openmode", !9, i64 0}
!46 = !{!"_ZTS11__mbstate_t", !13, i64 0, !9, i64 4}
!47 = !{!"_ZTSSt6vectorIPN7SGTELIB9SurrogateESaIS2_EE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIPN7SGTELIB9SurrogateESaIS2_EE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIPN7SGTELIB9SurrogateESaIS2_EE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIPN7SGTELIB9SurrogateESaIS2_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!51 = !{!6, !16, i64 1120}
!52 = !{!6, !16, i64 1128}
!53 = !{!6, !13, i64 1096}
!54 = !{!7, !13, i64 328}
!55 = !{!6, !13, i64 988}
!56 = distinct !{!56, !57}
!57 = !{!"llvm.loop.mustprogress"}
!58 = !{!7, !25, i64 352}
!59 = !{!7, !13, i64 332}
!60 = !{!6, !8, i64 1032}
!61 = !{!16, !16, i64 0}
!62 = distinct !{!62, !57}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass