; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Surrogate_RBF.ll (ZN7SGTELIB13Surrogate_RBF12init_privateEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"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.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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.SGTELIB::Surrogate_RBF" = type { %"class.SGTELIB::Surrogate.base", i32, i32, i32, %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.std::__cxx11::list" }
%"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.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::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" }
%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.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] }>

@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [61 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1

; 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 @_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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3

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

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB13Surrogate_RBF12init_privateEv(ptr noundef nonnull align 8 dereferenceable(1304) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::initializer_list", align 8
  %5 = alloca [1 x i32], align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i8, align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca i1, align 1
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca i1, align 1
  %18 = alloca i1, align 1
  %19 = alloca i1, align 1
  %20 = alloca i8, align 1
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca i8, align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca i1, align 1
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca %"class.std::__cxx11::list", align 8
  %35 = alloca %"class.SGTELIB::Matrix", align 8
  %36 = alloca i32, align 4
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  %42 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 -1, ptr %5, align 4, !tbaa !9
  %43 = getelementptr inbounds %"class.std::initializer_list", ptr %4, i32 0, i32 0
  store ptr %5, ptr %43, align 8, !tbaa !11
  %44 = getelementptr inbounds %"class.std::initializer_list", ptr %4, i32 0, i32 1
  store i64 1, ptr %44, align 8, !tbaa !14
  %45 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 9
  %46 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  %48 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %49 = load i64, ptr %48, align 8
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %45, ptr %47, i64 %49)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  %51 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 1
  store i32 -1, ptr %51, align 4, !tbaa !15
  %52 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  store i32 -1, ptr %52, align 8, !tbaa !52
  %53 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 3
  store i32 -1, ptr %53, align 4, !tbaa !53
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %54 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !54
  %56 = call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_pvarEv(ptr noundef nonnull align 8 dereferenceable(504) %55)
  store i32 %56, ptr %6, align 4, !tbaa !9
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = icmp slt i32 %57, 3
  br i1 %58, label %59, label %60

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

60:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  %61 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 2
  call void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(312) %61)
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  store i1 false, ptr %15, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %18, align 1
  store i1 false, ptr %19, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %62 unwind label %109

62:                                               ; preds = %60
  %63 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %64 unwind label %113

64:                                               ; preds = %62
  br i1 %63, label %69, label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  store i1 true, ptr %17, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  store i1 true, ptr %18, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %66 unwind label %117

66:                                               ; preds = %65
  store i1 true, ptr %19, align 1
  %67 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %68 unwind label %121

68:                                               ; preds = %66
  br label %69

69:                                               ; preds = %68, %64
  %70 = phi i1 [ true, %64 ], [ %67, %68 ]
  %71 = load i1, ptr %19, align 1
  br i1 %71, label %72, label %73

72:                                               ; preds = %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %73

73:                                               ; preds = %72, %69
  %74 = load i1, ptr %18, align 1
  br i1 %74, label %75, label %76

75:                                               ; preds = %73
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  br label %76

76:                                               ; preds = %75, %73
  %77 = load i1, ptr %17, align 1
  br i1 %77, label %78, label %79

78:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  br label %79

79:                                               ; preds = %78, %76
  %80 = load i1, ptr %15, align 1
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  br label %82

82:                                               ; preds = %81, %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  %83 = zext i1 %70 to i8
  store i8 %83, ptr %9, align 1, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %84 unwind label %140

84:                                               ; preds = %82
  %85 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %86 unwind label %144

86:                                               ; preds = %84
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  %87 = zext i1 %85 to i8
  store i8 %87, ptr %20, align 1, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %88 unwind label %149

88:                                               ; preds = %86
  %89 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %90 unwind label %153

90:                                               ; preds = %88
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  %91 = zext i1 %89 to i8
  store i8 %91, ptr %23, align 1, !tbaa !55
  %92 = load i8, ptr %9, align 1, !tbaa !55, !range !56, !noundef !57
  %93 = trunc i8 %92 to i1
  %94 = zext i1 %93 to i32
  %95 = load i8, ptr %20, align 1, !tbaa !55, !range !56, !noundef !57
  %96 = trunc i8 %95 to i1
  %97 = zext i1 %96 to i32
  %98 = add nsw i32 %94, %97
  %99 = load i8, ptr %23, align 1, !tbaa !55, !range !56, !noundef !57
  %100 = trunc i8 %99 to i1
  %101 = zext i1 %100 to i32
  %102 = add nsw i32 %98, %101
  %103 = icmp ne i32 %102, 1
  br i1 %103, label %104, label %175

104:                                              ; preds = %90
  store i1 true, ptr %30, align 1
  %105 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %106 unwind label %158

106:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %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 @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %107 unwind label %162

107:                                              ; preds = %106
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %105, ptr noundef nonnull align 8 dereferenceable(32) %26, i32 noundef 92, ptr noundef nonnull align 8 dereferenceable(32) %28)
          to label %108 unwind label %166

108:                                              ; preds = %107
  store i1 false, ptr %30, align 1
  invoke void @__cxa_throw(ptr %105, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %355 unwind label %166

109:                                              ; preds = %60
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %12, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %13, align 4
  br label %139

113:                                              ; preds = %62
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %12, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %13, align 4
  br label %138

117:                                              ; preds = %65
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %12, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %13, align 4
  br label %128

121:                                              ; preds = %66
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %12, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %13, align 4
  %125 = load i1, ptr %19, align 1
  br i1 %125, label %126, label %127

126:                                              ; preds = %121
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %127

127:                                              ; preds = %126, %121
  br label %128

128:                                              ; preds = %127, %117
  %129 = load i1, ptr %18, align 1
  br i1 %129, label %130, label %131

130:                                              ; preds = %128
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  br label %131

131:                                              ; preds = %130, %128
  %132 = load i1, ptr %17, align 1
  br i1 %132, label %133, label %134

133:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  br label %134

134:                                              ; preds = %133, %131
  %135 = load i1, ptr %15, align 1
  br i1 %135, label %136, label %137

136:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  br label %137

137:                                              ; preds = %136, %134
  br label %138

138:                                              ; preds = %137, %113
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %139

139:                                              ; preds = %138, %109
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  br label %347

140:                                              ; preds = %82
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %12, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %13, align 4
  br label %148

144:                                              ; preds = %84
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %12, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %148

148:                                              ; preds = %144, %140
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  br label %346

149:                                              ; preds = %86
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %12, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %13, align 4
  br label %157

153:                                              ; preds = %88
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %12, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  br label %157

157:                                              ; preds = %153, %149
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  br label %345

158:                                              ; preds = %104
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %12, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %13, align 4
  br label %171

162:                                              ; preds = %106
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %12, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %13, align 4
  br label %170

166:                                              ; preds = %108, %107
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %12, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  br label %170

170:                                              ; preds = %166, %162
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br label %171

171:                                              ; preds = %170, %158
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #7
  %172 = load i1, ptr %30, align 1
  br i1 %172, label %173, label %174

173:                                              ; preds = %171
  call void @__cxa_free_exception(ptr %105) #7
  br label %174

174:                                              ; preds = %173, %171
  br label %345

175:                                              ; preds = %90
  %176 = load i8, ptr %23, align 1, !tbaa !55, !range !56, !noundef !57
  %177 = trunc i8 %176 to i1
  br i1 %177, label %178, label %245

178:                                              ; preds = %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %179 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %180 = load ptr, ptr %179, align 8, !tbaa !54
  %181 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %180)
          to label %182 unwind label %195

182:                                              ; preds = %178
  store i32 %181, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %183 = load i32, ptr %6, align 4, !tbaa !9
  %184 = sdiv i32 %183, 2
  store i32 %184, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %185 = load i32, ptr %31, align 4, !tbaa !9
  %186 = mul nsw i32 100, %185
  store i32 %186, ptr %33, align 4, !tbaa !9
  %187 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %33)
          to label %188 unwind label %199

188:                                              ; preds = %182
  %189 = load i32, ptr %187, align 4, !tbaa !9
  %190 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  store i32 %189, ptr %190, align 8, !tbaa !52
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  %191 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  %192 = load i32, ptr %191, align 8, !tbaa !52
  %193 = icmp slt i32 %192, 3
  br i1 %193, label %194, label %203

194:                                              ; preds = %188
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %241

195:                                              ; preds = %178
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %12, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %13, align 4
  br label %244

199:                                              ; preds = %182
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %12, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  br label %244

203:                                              ; preds = %188
  %204 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 9
  call void @_ZNSt7__cxx114listIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %204) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %34) #7
  %205 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 56, ptr %35) #7
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %35, ptr noundef nonnull align 8 dereferenceable(985) %42)
          to label %207 unwind label %231

207:                                              ; preds = %203
  %208 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %209 = load ptr, ptr %208, align 8, !tbaa !54
  %210 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet9get_i_minEv(ptr noundef nonnull align 8 dereferenceable(504) %209)
          to label %211 unwind label %235

211:                                              ; preds = %207
  %212 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  %213 = load i32, ptr %212, align 8, !tbaa !52
  %214 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 2
  %215 = invoke noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters17get_distance_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %214)
          to label %216 unwind label %235

216:                                              ; preds = %211
  invoke void @_ZN7SGTELIB11TrainingSet13select_greedyB5cxx11ERKNS_6MatrixEiidNS_10distance_tE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::list") align 8 %34, ptr noundef nonnull align 8 dereferenceable(504) %206, ptr noundef nonnull align 8 dereferenceable(56) %35, i32 noundef %210, i32 noundef %213, double noundef 1.000000e+00, i32 noundef %215)
          to label %217 unwind label %235

217:                                              ; preds = %216
  %218 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 9
  %219 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listIiSaIiEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %218, ptr noundef nonnull align 8 dereferenceable(24) %34) #7
  call void @_ZNSt7__cxx1110_List_baseIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #7
  %220 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 9
  %221 = call noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %220) #7
  %222 = trunc i64 %221 to i32
  %223 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  %224 = load i32, ptr %223, align 8, !tbaa !52
  %225 = icmp slt i32 %222, %224
  br i1 %225, label %226, label %240

226:                                              ; preds = %217
  %227 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 9
  %228 = call noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %227) #7
  %229 = trunc i64 %228 to i32
  %230 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  store i32 %229, ptr %230, align 8, !tbaa !52
  br label %240

231:                                              ; preds = %203
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %12, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %13, align 4
  br label %239

235:                                              ; preds = %216, %211, %207
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %12, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %13, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #7
  br label %239

239:                                              ; preds = %235, %231
  call void @llvm.lifetime.end.p0(i64 56, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #7
  br label %244

240:                                              ; preds = %226, %217
  store i32 0, ptr %7, align 4
  br label %241

241:                                              ; preds = %240, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  %242 = load i32, ptr %7, align 4
  switch i32 %242, label %344 [
    i32 0, label %243
  ]

243:                                              ; preds = %241
  br label %249

244:                                              ; preds = %239, %199, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  br label %345

245:                                              ; preds = %175
  %246 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 7
  %247 = load i32, ptr %246, align 8, !tbaa !58
  %248 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  store i32 %247, ptr %248, align 8, !tbaa !52
  br label %249

249:                                              ; preds = %245, %243
  %250 = load i8, ptr %9, align 1, !tbaa !55, !range !56, !noundef !57
  %251 = trunc i8 %250 to i1
  br i1 %251, label %252, label %314

252:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %253 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 2
  %254 = invoke noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %253)
          to label %255 unwind label %262

255:                                              ; preds = %252
  %256 = invoke noundef i32 @_ZN7SGTELIB11kernel_dminENS_8kernel_tE(i32 noundef %254)
          to label %257 unwind label %262

257:                                              ; preds = %255
  store i32 %256, ptr %36, align 4, !tbaa !9
  %258 = load i32, ptr %36, align 4, !tbaa !9
  %259 = icmp eq i32 %258, -1
  br i1 %259, label %260, label %266

260:                                              ; preds = %257
  %261 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 3
  store i32 0, ptr %261, align 4, !tbaa !53
  br label %312

262:                                              ; preds = %286, %283, %281, %274, %255, %252
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %12, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %13, align 4
  br label %313

266:                                              ; preds = %257
  %267 = load i32, ptr %36, align 4, !tbaa !9
  %268 = icmp eq i32 %267, 0
  br i1 %268, label %269, label %271

269:                                              ; preds = %266
  %270 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 3
  store i32 1, ptr %270, align 4, !tbaa !53
  br label %311

271:                                              ; preds = %266
  %272 = load i32, ptr %36, align 4, !tbaa !9
  %273 = icmp eq i32 %272, 1
  br i1 %273, label %274, label %281

274:                                              ; preds = %271
  %275 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %276 = load ptr, ptr %275, align 8, !tbaa !54
  %277 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %276)
          to label %278 unwind label %262

278:                                              ; preds = %274
  %279 = add nsw i32 1, %277
  %280 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 3
  store i32 %279, ptr %280, align 4, !tbaa !53
  br label %310

281:                                              ; preds = %271
  %282 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.17)
          to label %283 unwind label %262

283:                                              ; preds = %281
  %284 = load i32, ptr %36, align 4, !tbaa !9
  %285 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %282, i32 noundef %284)
          to label %286 unwind label %262

286:                                              ; preds = %283
  %287 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %285, ptr noundef @.str.6)
          to label %288 unwind label %262

288:                                              ; preds = %286
  store i1 true, ptr %41, align 1
  %289 = 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.15, ptr noundef nonnull align 1 dereferenceable(1) %38)
          to label %290 unwind label %293

290:                                              ; preds = %288
  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 %291 unwind label %297

291:                                              ; preds = %290
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %289, ptr noundef nonnull align 8 dereferenceable(32) %37, i32 noundef 125, ptr noundef nonnull align 8 dereferenceable(32) %39)
          to label %292 unwind label %301

292:                                              ; preds = %291
  store i1 false, ptr %41, align 1
  invoke void @__cxa_throw(ptr %289, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %355 unwind label %301

293:                                              ; preds = %288
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %12, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %13, align 4
  br label %306

297:                                              ; preds = %290
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %12, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %13, align 4
  br label %305

301:                                              ; preds = %292, %291
  %302 = landingpad { ptr, i32 }
          cleanup
  %303 = extractvalue { ptr, i32 } %302, 0
  store ptr %303, ptr %12, align 8
  %304 = extractvalue { ptr, i32 } %302, 1
  store i32 %304, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #7
  br label %305

305:                                              ; preds = %301, %297
  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 %306

306:                                              ; preds = %305, %293
  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
  %307 = load i1, ptr %41, align 1
  br i1 %307, label %308, label %309

308:                                              ; preds = %306
  call void @__cxa_free_exception(ptr %289) #7
  br label %309

309:                                              ; preds = %308, %306
  br label %313

310:                                              ; preds = %278
  br label %311

311:                                              ; preds = %310, %269
  br label %312

312:                                              ; preds = %311, %260
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %325

313:                                              ; preds = %309, %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %345

314:                                              ; preds = %249
  %315 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %316 = load ptr, ptr %315, align 8, !tbaa !54
  %317 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %316)
          to label %318 unwind label %321

318:                                              ; preds = %314
  %319 = add nsw i32 1, %317
  %320 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 3
  store i32 %319, ptr %320, align 4, !tbaa !53
  br label %325

321:                                              ; preds = %314
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %12, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %13, align 4
  br label %345

325:                                              ; preds = %318, %312
  %326 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 2
  %327 = load i32, ptr %326, align 8, !tbaa !52
  %328 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 3
  %329 = load i32, ptr %328, align 4, !tbaa !53
  %330 = add nsw i32 %327, %329
  %331 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 1
  store i32 %330, ptr %331, align 4, !tbaa !15
  %332 = load i8, ptr %9, align 1, !tbaa !55, !range !56, !noundef !57
  %333 = trunc i8 %332 to i1
  %334 = zext i1 %333 to i32
  %335 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %42, i32 0, i32 1
  %336 = load i32, ptr %335, align 4, !tbaa !15
  %337 = load i32, ptr %6, align 4, !tbaa !9
  %338 = icmp sgt i32 %336, %337
  %339 = zext i1 %338 to i32
  %340 = and i32 %334, %339
  %341 = icmp ne i32 %340, 0
  br i1 %341, label %342, label %343

342:                                              ; preds = %325
  store i1 false, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %344

343:                                              ; preds = %325
  store i1 true, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %344

344:                                              ; preds = %343, %342, %241
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %348

345:                                              ; preds = %321, %313, %244, %174, %157
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #7
  br label %346

346:                                              ; preds = %345, %148
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  br label %347

347:                                              ; preds = %346, %139
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %350

348:                                              ; preds = %344, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %349 = load i1, ptr %2, align 1
  ret i1 %349

350:                                              ; preds = %347
  %351 = load ptr, ptr %12, align 8
  %352 = load i32, ptr %13, align 4
  %353 = insertvalue { ptr, i32 } poison, ptr %351, 0
  %354 = insertvalue { ptr, i32 } %353, i32 %352, 1
  resume { ptr, i32 } %354

355:                                              ; preds = %292, %108
  unreachable
}

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

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

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

declare noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #5

declare ptr @__cxa_allocate_exception(i64)

; 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 noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

declare void @_ZN7SGTELIB11TrainingSet13select_greedyB5cxx11ERKNS_6MatrixEiidNS_10distance_tE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::list") align 8, ptr noundef nonnull align 8 dereferenceable(504), ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, double noundef, i32 noundef) #5

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

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

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

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

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

declare noundef i32 @_ZN7SGTELIB11kernel_dminENS_8kernel_tE(i32 noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt16initializer_listIiE", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !10, i64 988}
!16 = !{!"_ZTSN7SGTELIB13Surrogate_RBFE", !17, i64 0, !10, i64 988, !10, i64 992, !10, i64 996, !24, i64 1000, !24, i64 1056, !24, i64 1112, !24, i64 1168, !24, i64 1224, !31, i64 1280}
!17 = !{!"_ZTSN7SGTELIB9SurrogateE", !6, i64 8, !18, i64 16, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !30, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !31, i64 392, !36, i64 416, !22, i64 464, !44, i64 472, !30, i64 984}
!18 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !19, i64 8, !10, i64 12, !20, i64 16, !21, i64 20, !20, i64 24, !22, i64 32, !20, i64 40, !22, i64 48, !20, i64 56, !23, i64 60, !20, i64 64, !24, i64 72, !27, i64 128, !20, i64 132, !28, i64 136, !22, i64 144, !22, i64 152, !22, i64 160, !22, i64 168, !24, i64 176, !20, i64 232, !29, i64 236, !25, i64 240, !25, i64 272, !10, i64 304, !10, i64 308}
!19 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!20 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!21 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!22 = !{!"double", !7, i64 0}
!23 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!24 = !{!"_ZTSN7SGTELIB6MatrixE", !25, i64 8, !10, i64 40, !10, i64 44, !6, i64 48}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !13, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!27 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!28 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!29 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !32, i64 0}
!32 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !33, i64 0}
!33 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !34, i64 0}
!34 = !{!"_ZTSNSt8__detail17_List_node_headerE", !35, i64 0, !13, i64 16}
!35 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!36 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !37, i64 0}
!37 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !38, i64 0}
!38 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !39, i64 0, !41, i64 8}
!39 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !40, i64 0}
!40 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!41 = !{!"_ZTSSt15_Rb_tree_header", !42, i64 0, !13, i64 32}
!42 = !{!"_ZTSSt18_Rb_tree_node_base", !43, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!43 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!44 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !45, i64 0, !46, i64 8}
!45 = !{!"_ZTSSo"}
!46 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !47, i64 0, !7, i64 64, !49, i64 104, !50, i64 120, !51, i64 124, !51, i64 132, !51, i64 140, !6, i64 152, !13, i64 160, !30, i64 168, !30, i64 169, !30, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !30, i64 192, !6, i64 200, !6, i64 208, !13, i64 216, !6, i64 224, !6, i64 232}
!47 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !48, i64 56}
!48 = !{!"_ZTSSt6locale", !6, i64 0}
!49 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !30, i64 8}
!50 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!51 = !{!"_ZTS11__mbstate_t", !10, i64 0, !7, i64 4}
!52 = !{!16, !10, i64 992}
!53 = !{!16, !10, i64 996}
!54 = !{!17, !6, i64 8}
!55 = !{!30, !30, i64 0}
!56 = !{i8 0, i8 2}
!57 = !{}
!58 = !{!17, !10, i64 344}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::__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.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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }

@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [61 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.17 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [19 x i8], align 1

; 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 @_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

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3

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

; 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB13Surrogate_RBF12init_privateEv(ptr noundef nonnull align 8 dereferenceable(1304) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca [1 x i32], align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::list", align 8
  %19 = alloca %"class.SGTELIB::Matrix", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 -1, ptr %2, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %0, i64 1280
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listIiSaIiEEaSESt16initializer_listIiE(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr nonnull %2, i64 1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %26 = getelementptr inbounds i8, ptr %0, i64 988
  store i32 -1, ptr %26, align 4, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %0, i64 992
  store i32 -1, ptr %27, align 8, !tbaa !48
  %28 = getelementptr inbounds i8, ptr %0, i64 996
  store i32 -1, ptr %28, align 4, !tbaa !49
  %29 = getelementptr inbounds i8, ptr %0, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !50
  %31 = call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_pvarEv(ptr noundef nonnull align 8 dereferenceable(504) %30)
  %32 = icmp slt i32 %31, 3
  br i1 %32, label %167, label %33

33:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  call void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(312) %34)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %35 unwind label %58

35:                                               ; preds = %33
  %36 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %37 unwind label %60

37:                                               ; preds = %35
  br i1 %36, label %.critedge81, label %38

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %39 unwind label %62

39:                                               ; preds = %38
  %40 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %.critedge unwind label %64

.critedge:                                        ; preds = %39
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %.critedge81

.critedge81:                                      ; preds = %37, %.critedge
  %41 = phi i1 [ %40, %.critedge ], [ true, %37 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %42 unwind label %69

42:                                               ; preds = %.critedge81
  %43 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %44 unwind label %71

44:                                               ; preds = %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %45 unwind label %74

45:                                               ; preds = %44
  %46 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %47 unwind label %76

47:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  %48 = zext i1 %41 to i32
  %49 = zext i1 %43 to i32
  %50 = add nuw nsw i32 %49, %48
  %51 = zext i1 %46 to i32
  %52 = add nuw nsw i32 %50, %51
  %.not = icmp eq i32 %52, 1
  br i1 %.not, label %86, label %53

53:                                               ; preds = %47
  %54 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %55 unwind label %.thread84

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %56 unwind label %80

56:                                               ; preds = %55
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %54, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef 92, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %57 unwind label %82

57:                                               ; preds = %56
  invoke void @__cxa_throw(ptr nonnull %54, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %168 unwind label %82

58:                                               ; preds = %33
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %68

60:                                               ; preds = %35
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %67

62:                                               ; preds = %38
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %39
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %66

66:                                               ; preds = %62, %64
  %.pn = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %67

67:                                               ; preds = %66, %60
  %.pn.pn = phi { ptr, i32 } [ %.pn, %66 ], [ %61, %60 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %68

68:                                               ; preds = %67, %58
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %67 ], [ %59, %58 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %166

69:                                               ; preds = %.critedge81
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %42
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %73

73:                                               ; preds = %71, %69
  %.pn62 = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %166

74:                                               ; preds = %44
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %45
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %78

78:                                               ; preds = %76, %74
  %.pn64 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %166

.thread84:                                        ; preds = %53
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br label %85

80:                                               ; preds = %55
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %57, %56
  %.032 = phi i1 [ false, %57 ], [ true, %56 ]
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %84

84:                                               ; preds = %80, %82
  %.pn74 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  %.133 = phi i1 [ %.032, %82 ], [ true, %80 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  br i1 %.133, label %85, label %166

85:                                               ; preds = %.thread84, %84
  %.pn74.pn87 = phi { ptr, i32 } [ %79, %.thread84 ], [ %.pn74, %84 ]
  call void @__cxa_free_exception(ptr %54) #7
  br label %166

86:                                               ; preds = %47
  br i1 %46, label %87, label %120

87:                                               ; preds = %86
  %88 = load ptr, ptr %29, align 8, !tbaa !50
  %89 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %88)
          to label %90 unwind label %96

90:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  %91 = lshr i32 %31, 1
  store i32 %91, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  %92 = mul nsw i32 %89, 100
  store i32 %92, ptr %17, align 4, !tbaa !5
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %94 = load i32, ptr %93, align 4, !tbaa !5
  store i32 %94, ptr %27, align 8, !tbaa !48
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  %95 = icmp sgt i32 %94, 2
  br i1 %95, label %98, label %.critedge83

96:                                               ; preds = %87
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %166

98:                                               ; preds = %90
  call void @_ZNSt7__cxx114listIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #7
  %99 = load ptr, ptr %29, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %19) #7
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %19, ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %100 unwind label %115

100:                                              ; preds = %98
  %101 = load ptr, ptr %29, align 8, !tbaa !50
  %102 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet9get_i_minEv(ptr noundef nonnull align 8 dereferenceable(504) %101)
          to label %103 unwind label %117

103:                                              ; preds = %100
  %104 = load i32, ptr %27, align 8, !tbaa !48
  %105 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters17get_distance_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %34)
  invoke void @_ZN7SGTELIB11TrainingSet13select_greedyB5cxx11ERKNS_6MatrixEiidNS_10distance_tE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::list") align 8 %18, ptr noundef nonnull align 8 dereferenceable(504) %99, ptr noundef nonnull align 8 dereferenceable(56) %19, i32 noundef %102, i32 noundef %104, double noundef 1.000000e+00, i32 noundef %105)
          to label %106 unwind label %117

106:                                              ; preds = %103
  %107 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt7__cxx114listIiSaIiEEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @_ZNSt7__cxx1110_List_baseIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  %108 = call noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %109 = trunc i64 %108 to i32
  %110 = load i32, ptr %27, align 8, !tbaa !48
  %111 = icmp sgt i32 %110, %109
  br i1 %111, label %112, label %123

112:                                              ; preds = %106
  %113 = call noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %114 = trunc i64 %113 to i32
  br label %.sink.split

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

117:                                              ; preds = %103, %100
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  br label %119

119:                                              ; preds = %117, %115
  %.pn66 = phi { ptr, i32 } [ %118, %117 ], [ %116, %115 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  br label %166

120:                                              ; preds = %86
  %121 = getelementptr inbounds i8, ptr %0, i64 344
  %122 = load i32, ptr %121, align 8, !tbaa !51
  br label %.sink.split

.sink.split:                                      ; preds = %120, %112
  %.sink = phi i32 [ %114, %112 ], [ %122, %120 ]
  store i32 %.sink, ptr %27, align 8, !tbaa !48
  br label %123

123:                                              ; preds = %.sink.split, %106
  br i1 %41, label %124, label %154

124:                                              ; preds = %123
  %125 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %34)
  %126 = invoke noundef i32 @_ZN7SGTELIB11kernel_dminENS_8kernel_tE(i32 noundef %125)
          to label %127 unwind label %128

127:                                              ; preds = %124
  switch i32 %126, label %136 [
    i32 -1, label %161
    i32 0, label %130
    i32 1, label %131
  ]

128:                                              ; preds = %140, %138, %136, %131, %124
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %166

130:                                              ; preds = %127
  br label %161

131:                                              ; preds = %127
  %132 = load ptr, ptr %29, align 8, !tbaa !50
  %133 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %132)
          to label %134 unwind label %128

134:                                              ; preds = %131
  %135 = add nsw i32 %133, 1
  br label %161

136:                                              ; preds = %127
  %137 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.17)
          to label %138 unwind label %128

138:                                              ; preds = %136
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %137, i32 noundef %126)
          to label %140 unwind label %128

140:                                              ; preds = %138
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef nonnull @.str.6)
          to label %142 unwind label %128

142:                                              ; preds = %140
  %143 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %144 unwind label %.thread88

144:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %145 unwind label %148

145:                                              ; preds = %144
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %143, ptr noundef nonnull align 8 dereferenceable(32) %20, i32 noundef 125, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %146 unwind label %150

146:                                              ; preds = %145
  invoke void @__cxa_throw(ptr nonnull %143, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %168 unwind label %150

.thread88:                                        ; preds = %142
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #7
  br label %153

148:                                              ; preds = %144
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %152

150:                                              ; preds = %146, %145
  %.0 = phi i1 [ false, %146 ], [ true, %145 ]
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %152

152:                                              ; preds = %148, %150
  %.pn69 = phi { ptr, i32 } [ %151, %150 ], [ %149, %148 ]
  %.1 = phi i1 [ %.0, %150 ], [ true, %148 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #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) %20) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #7
  br i1 %.1, label %153, label %166

153:                                              ; preds = %.thread88, %152
  %.pn69.pn91 = phi { ptr, i32 } [ %147, %.thread88 ], [ %.pn69, %152 ]
  call void @__cxa_free_exception(ptr %143) #7
  br label %166

154:                                              ; preds = %123
  %155 = load ptr, ptr %29, align 8, !tbaa !50
  %156 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %155)
          to label %157 unwind label %159

157:                                              ; preds = %154
  %158 = add nsw i32 %156, 1
  br label %161

159:                                              ; preds = %154
  %160 = landingpad { ptr, i32 }
          cleanup
  br label %166

161:                                              ; preds = %127, %134, %130, %157
  %.sink92 = phi i32 [ %135, %134 ], [ 1, %130 ], [ %158, %157 ], [ 0, %127 ]
  store i32 %.sink92, ptr %28, align 4, !tbaa !49
  %162 = load i32, ptr %27, align 8, !tbaa !48
  %163 = add nsw i32 %.sink92, %162
  store i32 %163, ptr %26, align 4, !tbaa !9
  %164 = icmp sgt i32 %163, %31
  %165 = and i1 %41, %164
  %not. = xor i1 %165, true
  br label %.critedge83

.critedge83:                                      ; preds = %90, %161
  %.129 = phi i1 [ %not., %161 ], [ false, %90 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  br label %167

166:                                              ; preds = %73, %128, %153, %152, %96, %119, %84, %85, %159, %78, %68
  %.pn74.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %68 ], [ %.pn62, %73 ], [ %.pn74.pn87, %85 ], [ %.pn74, %84 ], [ %160, %159 ], [ %.pn64, %78 ], [ %.pn66, %119 ], [ %97, %96 ], [ %129, %128 ], [ %.pn69.pn91, %153 ], [ %.pn69, %152 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn74.pn.pn.pn.pn

167:                                              ; preds = %1, %.critedge83
  %.230 = phi i1 [ %.129, %.critedge83 ], [ false, %1 ]
  ret i1 %.230

168:                                              ; preds = %146, %57
  unreachable
}

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

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

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

declare noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; 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 noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

declare void @_ZN7SGTELIB11TrainingSet13select_greedyB5cxx11ERKNS_6MatrixEiidNS_10distance_tE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::list") align 8, ptr noundef nonnull align 8 dereferenceable(504), ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, double noundef, i32 noundef) local_unnamed_addr #5

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

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

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

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

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

declare noundef i32 @_ZN7SGTELIB11kernel_dminENS_8kernel_tE(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 988}
!10 = !{!"_ZTSN7SGTELIB13Surrogate_RBFE", !11, i64 0, !6, i64 988, !6, i64 992, !6, i64 996, !19, i64 1000, !19, i64 1056, !19, i64 1112, !19, i64 1168, !19, i64 1224, !27, i64 1280}
!11 = !{!"_ZTSN7SGTELIB9SurrogateE", !12, i64 8, !13, i64 16, !6, i64 328, !6, i64 332, !6, i64 336, !6, i64 340, !6, i64 344, !6, i64 348, !26, i64 352, !12, i64 360, !12, i64 368, !12, i64 376, !12, i64 384, !27, i64 392, !32, i64 416, !17, i64 464, !40, i64 472, !26, i64 984}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !14, i64 8, !6, 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, !6, i64 304, !6, i64 308}
!14 = !{!"_ZTSN7SGTELIB7model_tE", !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, !6, i64 40, !6, i64 44, !12, i64 48}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, 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", !12, i64 0, !12, 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, !12, i64 8, !12, i64 16, !12, 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, !12, i64 152, !22, i64 160, !26, i64 168, !26, i64 169, !26, i64 170, !7, i64 171, !12, i64 176, !12, i64 184, !26, i64 192, !12, i64 200, !12, i64 208, !22, i64 216, !12, i64 224, !12, i64 232}
!43 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !44, i64 56}
!44 = !{!"_ZTSSt6locale", !12, i64 0}
!45 = !{!"_ZTSSt12__basic_fileIcE", !12, i64 0, !26, i64 8}
!46 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!47 = !{!"_ZTS11__mbstate_t", !6, i64 0, !7, i64 4}
!48 = !{!10, !6, i64 992}
!49 = !{!10, !6, i64 996}
!50 = !{!11, !12, i64 8}
!51 = !{!11, !6, i64 344}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass