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

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

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

@.str.6 = external hidden unnamed_addr constant [96 x i8], align 1
@__FUNCTION__._ZN7SGTELIB17Surrogate_Kriging15predict_privateERKNS_6MatrixEPS1_ = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 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(...)

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

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

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

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

declare void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #3

declare void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56)) #3

declare void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3

declare void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef) #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) #6 align 2

declare void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB17Surrogate_Kriging15predict_privateERKNS_6MatrixEPS1_S4_S4_S4_(ptr noundef nonnull align 8 dereferenceable(1336) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca %"class.SGTELIB::Matrix", align 8
  %23 = alloca %"class.SGTELIB::Matrix", align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca i1, align 1
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca %"class.SGTELIB::Matrix", align 8
  %32 = alloca %"class.SGTELIB::Matrix", align 8
  %33 = alloca %"class.SGTELIB::Matrix", align 8
  %34 = alloca double, align 8
  %35 = alloca %"class.SGTELIB::Matrix", align 8
  %36 = alloca %"class.SGTELIB::Matrix", align 8
  %37 = alloca %"class.SGTELIB::Matrix", align 8
  %38 = alloca %"class.SGTELIB::Matrix", align 8
  %39 = alloca %"class.SGTELIB::Matrix", align 8
  %40 = alloca double, align 8
  %41 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %43 unwind label %62

43:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @__FUNCTION__._ZN7SGTELIB17Surrogate_Kriging15predict_privateERKNS_6MatrixEPS1_, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %44 unwind label %66

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 204, ptr %19, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985) %42, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %45 unwind label %70

45:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %46)
  store i32 %47, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %48 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = call noundef double @_ZNK7SGTELIB11TrainingSet10get_fs_minEv(ptr noundef nonnull align 8 dereferenceable(504) %49)
  store double %50, ptr %21, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #9
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN7SGTELIB17Surrogate_Kriging25compute_covariance_matrixERKNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %23, ptr noundef nonnull align 8 dereferenceable(1336) %42, ptr noundef nonnull align 8 dereferenceable(56) %51)
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %22, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %52 unwind label %76

52:                                               ; preds = %45
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %84

55:                                               ; preds = %52
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load ptr, ptr %42, align 8, !tbaa !49
  %59 = getelementptr inbounds ptr, ptr %58, i64 4
  %60 = load ptr, ptr %59, align 8
  invoke void %60(ptr noundef nonnull align 8 dereferenceable(1336) %42, ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef %57)
          to label %61 unwind label %80

61:                                               ; preds = %55
  br label %84

62:                                               ; preds = %6
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %15, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %16, align 4
  br label %75

66:                                               ; preds = %43
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %15, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %16, align 4
  br label %74

70:                                               ; preds = %44
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %15, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %74

74:                                               ; preds = %70, %66
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  br label %75

75:                                               ; preds = %74, %62
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  br label %407

76:                                               ; preds = %45
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %15, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %16, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #9
  br label %406

80:                                               ; preds = %90, %87, %55
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %15, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %16, align 4
  br label %405

84:                                               ; preds = %61, %52
  %85 = load ptr, ptr %10, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %90

87:                                               ; preds = %84
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %88, double noundef 0xFFEFFFFFFFFFFFFF)
          to label %89 unwind label %80

89:                                               ; preds = %87
  br label %110

90:                                               ; preds = %84
  %91 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #10
          to label %92 unwind label %80

92:                                               ; preds = %90
  store i1 true, ptr %28, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef @.str.7, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %93 unwind label %98

93:                                               ; preds = %92
  %94 = load i32, ptr %20, align 4, !tbaa !9
  %95 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 4
  %96 = load i32, ptr %95, align 4, !tbaa !51
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %91, ptr noundef nonnull align 8 dereferenceable(32) %26, i32 noundef %94, i32 noundef %96)
          to label %97 unwind label %102

97:                                               ; preds = %93
  store i1 false, ptr %28, align 1
  store ptr %91, ptr %10, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #9
  br label %110

98:                                               ; preds = %92
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %15, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %16, align 4
  br label %106

102:                                              ; preds = %93
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %15, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  br label %106

106:                                              ; preds = %102, %98
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #9
  %107 = load i1, ptr %28, align 1
  br i1 %107, label %108, label %109

108:                                              ; preds = %106
  call void @_ZdlPvm(ptr noundef %91, i64 noundef 56) #11
  br label %109

109:                                              ; preds = %108, %106
  br label %405

110:                                              ; preds = %97, %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %31) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %32) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %33) #9
  %111 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %42, i32 0, i32 3
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %33, ptr noundef nonnull align 8 dereferenceable(56) %111)
          to label %112 unwind label %143

112:                                              ; preds = %110
  %113 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %42, i32 0, i32 2
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %32, ptr noundef nonnull align 8 dereferenceable(56) %33, ptr noundef nonnull align 8 dereferenceable(56) %113)
          to label %114 unwind label %147

114:                                              ; preds = %112
  %115 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %42, i32 0, i32 3
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %31, ptr noundef nonnull align 8 dereferenceable(56) %32, ptr noundef nonnull align 8 dereferenceable(56) %115)
          to label %116 unwind label %151

116:                                              ; preds = %114
  %117 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %31, i32 noundef 0, i32 noundef 0)
          to label %118 unwind label %155

118:                                              ; preds = %116
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %33) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %31) #9
  store double %117, ptr %30, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %35) #9
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35)
          to label %119 unwind label %162

119:                                              ; preds = %118
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %120

120:                                              ; preds = %233, %119
  %121 = load i32, ptr %24, align 4, !tbaa !9
  %122 = load i32, ptr %20, align 4, !tbaa !9
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %124, label %236

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 56, ptr %36) #9
  %125 = load i32, ptr %24, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %36, ptr noundef nonnull align 8 dereferenceable(56) %22, i32 noundef %125)
          to label %126 unwind label %166

126:                                              ; preds = %124
  %127 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %35, ptr noundef nonnull align 8 dereferenceable(56) %36)
          to label %128 unwind label %170

128:                                              ; preds = %126
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %37) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %38) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %39) #9
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %39, ptr noundef nonnull align 8 dereferenceable(56) %35)
          to label %129 unwind label %175

129:                                              ; preds = %128
  %130 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %42, i32 0, i32 2
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %38, ptr noundef nonnull align 8 dereferenceable(56) %39, ptr noundef nonnull align 8 dereferenceable(56) %130)
          to label %131 unwind label %179

131:                                              ; preds = %129
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %37, ptr noundef nonnull align 8 dereferenceable(56) %38, ptr noundef nonnull align 8 dereferenceable(56) %35)
          to label %132 unwind label %183

132:                                              ; preds = %131
  %133 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %37, i32 noundef 0, i32 noundef 0)
          to label %134 unwind label %187

134:                                              ; preds = %132
  store double %133, ptr %29, align 8, !tbaa !48
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %38) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %39) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #9
  %135 = load double, ptr %29, align 8, !tbaa !48
  %136 = fsub double %135, 1.000000e+00
  %137 = call double @llvm.fabs.f64(double %136)
  %138 = fcmp olt double %137, 1.000000e-13
  br i1 %138, label %139, label %194

139:                                              ; preds = %134
  %140 = load double, ptr %29, align 8, !tbaa !48
  %141 = fsub double %140, 1.000000e+00
  %142 = call double @llvm.fabs.f64(double %141)
  store double %142, ptr %34, align 8, !tbaa !48
  br label %205

143:                                              ; preds = %110
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %15, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %16, align 4
  br label %161

147:                                              ; preds = %112
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %15, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %16, align 4
  br label %160

151:                                              ; preds = %114
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %15, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %16, align 4
  br label %159

155:                                              ; preds = %116
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %15, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %16, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #9
  br label %159

159:                                              ; preds = %155, %151
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32) #9
  br label %160

160:                                              ; preds = %159, %147
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %33) #9
  br label %161

161:                                              ; preds = %160, %143
  call void @llvm.lifetime.end.p0(i64 56, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %31) #9
  br label %404

162:                                              ; preds = %118
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %15, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %16, align 4
  br label %403

166:                                              ; preds = %124
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %15, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %16, align 4
  br label %174

170:                                              ; preds = %126
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %15, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %16, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #9
  br label %174

174:                                              ; preds = %170, %166
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #9
  br label %402

175:                                              ; preds = %128
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %15, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %16, align 4
  br label %193

179:                                              ; preds = %129
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %15, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %16, align 4
  br label %192

183:                                              ; preds = %131
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %15, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %16, align 4
  br label %191

187:                                              ; preds = %132
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %15, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %16, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #9
  br label %191

191:                                              ; preds = %187, %183
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %38) #9
  br label %192

192:                                              ; preds = %191, %179
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %39) #9
  br label %193

193:                                              ; preds = %192, %175
  call void @llvm.lifetime.end.p0(i64 56, ptr %39) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %38) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #9
  br label %402

194:                                              ; preds = %134
  %195 = load double, ptr %29, align 8, !tbaa !48
  %196 = fsub double 1.000000e+00, %195
  %197 = load double, ptr %29, align 8, !tbaa !48
  %198 = fsub double 1.000000e+00, %197
  %199 = load double, ptr %29, align 8, !tbaa !48
  %200 = fsub double 1.000000e+00, %199
  %201 = fmul double %198, %200
  %202 = load double, ptr %30, align 8, !tbaa !48
  %203 = fdiv double %201, %202
  %204 = fadd double %196, %203
  store double %204, ptr %34, align 8, !tbaa !48
  br label %205

205:                                              ; preds = %194, %139
  %206 = load double, ptr %34, align 8, !tbaa !48
  %207 = call double @llvm.fabs.f64(double %206)
  store double %207, ptr %34, align 8, !tbaa !48
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %208

208:                                              ; preds = %225, %205
  %209 = load i32, ptr %25, align 4, !tbaa !9
  %210 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 4
  %211 = load i32, ptr %210, align 4, !tbaa !51
  %212 = icmp slt i32 %209, %211
  br i1 %212, label %213, label %232

213:                                              ; preds = %208
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = load i32, ptr %24, align 4, !tbaa !9
  %216 = load i32, ptr %25, align 4, !tbaa !9
  %217 = load double, ptr %34, align 8, !tbaa !48
  %218 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %42, i32 0, i32 6
  %219 = load i32, ptr %25, align 4, !tbaa !9
  %220 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %218, i32 noundef %219)
          to label %221 unwind label %228

221:                                              ; preds = %213
  %222 = load double, ptr %220, align 8, !tbaa !48
  %223 = fmul double %217, %222
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %214, i32 noundef %215, i32 noundef %216, double noundef %223)
          to label %224 unwind label %228

224:                                              ; preds = %221
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr %25, align 4, !tbaa !9
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %25, align 4, !tbaa !9
  br label %208, !llvm.loop !52

228:                                              ; preds = %221, %213
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %15, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %16, align 4
  br label %402

232:                                              ; preds = %208
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %24, align 4, !tbaa !9
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %24, align 4, !tbaa !9
  br label %120, !llvm.loop !54

236:                                              ; preds = %120
  %237 = load ptr, ptr %11, align 8, !tbaa !5
  %238 = icmp ne ptr %237, null
  br i1 %238, label %242, label %239

239:                                              ; preds = %236
  %240 = load ptr, ptr %12, align 8, !tbaa !5
  %241 = icmp ne ptr %240, null
  br i1 %241, label %242, label %401

242:                                              ; preds = %239, %236
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #9
  %243 = load ptr, ptr %11, align 8, !tbaa !5
  %244 = icmp ne ptr %243, null
  br i1 %244, label %245, label %252

245:                                              ; preds = %242
  %246 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %246, double noundef 0xFFEFFFFFFFFFFFFF)
          to label %247 unwind label %248

247:                                              ; preds = %245
  br label %252

248:                                              ; preds = %342, %331, %324, %319, %314, %296, %290, %285, %279, %264, %255, %245
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %15, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %16, align 4
  br label %400

252:                                              ; preds = %247, %242
  %253 = load ptr, ptr %12, align 8, !tbaa !5
  %254 = icmp ne ptr %253, null
  br i1 %254, label %255, label %258

255:                                              ; preds = %252
  %256 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %256, double noundef 0xFFEFFFFFFFFFFFFF)
          to label %257 unwind label %248

257:                                              ; preds = %255
  br label %258

258:                                              ; preds = %257, %252
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %259

259:                                              ; preds = %396, %258
  %260 = load i32, ptr %25, align 4, !tbaa !9
  %261 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 4
  %262 = load i32, ptr %261, align 4, !tbaa !51
  %263 = icmp slt i32 %260, %262
  br i1 %263, label %264, label %399

264:                                              ; preds = %259
  %265 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %266 = load ptr, ptr %265, align 8, !tbaa !11
  %267 = load i32, ptr %25, align 4, !tbaa !9
  %268 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %266, i32 noundef %267)
          to label %269 unwind label %248

269:                                              ; preds = %264
  %270 = icmp eq i32 %268, 0
  br i1 %270, label %271, label %342

271:                                              ; preds = %269
  %272 = load ptr, ptr %12, align 8, !tbaa !5
  %273 = icmp ne ptr %272, null
  br i1 %273, label %274, label %306

274:                                              ; preds = %271
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %275

275:                                              ; preds = %302, %274
  %276 = load i32, ptr %24, align 4, !tbaa !9
  %277 = load i32, ptr %20, align 4, !tbaa !9
  %278 = icmp slt i32 %276, %277
  br i1 %278, label %279, label %305

279:                                              ; preds = %275
  %280 = load double, ptr %21, align 8, !tbaa !48
  %281 = load ptr, ptr %9, align 8, !tbaa !5
  %282 = load i32, ptr %24, align 4, !tbaa !9
  %283 = load i32, ptr %25, align 4, !tbaa !9
  %284 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %281, i32 noundef %282, i32 noundef %283)
          to label %285 unwind label %248

285:                                              ; preds = %279
  %286 = load ptr, ptr %10, align 8, !tbaa !5
  %287 = load i32, ptr %24, align 4, !tbaa !9
  %288 = load i32, ptr %25, align 4, !tbaa !9
  %289 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %286, i32 noundef %287, i32 noundef %288)
          to label %290 unwind label %248

290:                                              ; preds = %285
  %291 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %280, double noundef %284, double noundef %289)
          to label %292 unwind label %248

292:                                              ; preds = %290
  store double %291, ptr %40, align 8, !tbaa !48
  %293 = load double, ptr %40, align 8, !tbaa !48
  %294 = fcmp olt double %293, 0.000000e+00
  br i1 %294, label %295, label %296

295:                                              ; preds = %292
  store double 0.000000e+00, ptr %40, align 8, !tbaa !48
  br label %296

296:                                              ; preds = %295, %292
  %297 = load ptr, ptr %12, align 8, !tbaa !5
  %298 = load i32, ptr %24, align 4, !tbaa !9
  %299 = load i32, ptr %25, align 4, !tbaa !9
  %300 = load double, ptr %40, align 8, !tbaa !48
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %297, i32 noundef %298, i32 noundef %299, double noundef %300)
          to label %301 unwind label %248

301:                                              ; preds = %296
  br label %302

302:                                              ; preds = %301
  %303 = load i32, ptr %24, align 4, !tbaa !9
  %304 = add nsw i32 %303, 1
  store i32 %304, ptr %24, align 4, !tbaa !9
  br label %275, !llvm.loop !55

305:                                              ; preds = %275
  br label %306

306:                                              ; preds = %305, %271
  %307 = load ptr, ptr %11, align 8, !tbaa !5
  %308 = icmp ne ptr %307, null
  br i1 %308, label %309, label %341

309:                                              ; preds = %306
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %310

310:                                              ; preds = %337, %309
  %311 = load i32, ptr %24, align 4, !tbaa !9
  %312 = load i32, ptr %20, align 4, !tbaa !9
  %313 = icmp slt i32 %311, %312
  br i1 %313, label %314, label %340

314:                                              ; preds = %310
  %315 = load ptr, ptr %9, align 8, !tbaa !5
  %316 = load i32, ptr %24, align 4, !tbaa !9
  %317 = load i32, ptr %25, align 4, !tbaa !9
  %318 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %315, i32 noundef %316, i32 noundef %317)
          to label %319 unwind label %248

319:                                              ; preds = %314
  %320 = load ptr, ptr %10, align 8, !tbaa !5
  %321 = load i32, ptr %24, align 4, !tbaa !9
  %322 = load i32, ptr %25, align 4, !tbaa !9
  %323 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %320, i32 noundef %321, i32 noundef %322)
          to label %324 unwind label %248

324:                                              ; preds = %319
  %325 = load double, ptr %21, align 8, !tbaa !48
  %326 = invoke noundef double @_ZN7SGTELIB6normeiEddd(double noundef %318, double noundef %323, double noundef %325)
          to label %327 unwind label %248

327:                                              ; preds = %324
  store double %326, ptr %40, align 8, !tbaa !48
  %328 = load double, ptr %40, align 8, !tbaa !48
  %329 = fcmp olt double %328, 0.000000e+00
  br i1 %329, label %330, label %331

330:                                              ; preds = %327
  store double 0.000000e+00, ptr %40, align 8, !tbaa !48
  br label %331

331:                                              ; preds = %330, %327
  %332 = load ptr, ptr %11, align 8, !tbaa !5
  %333 = load i32, ptr %24, align 4, !tbaa !9
  %334 = load i32, ptr %25, align 4, !tbaa !9
  %335 = load double, ptr %40, align 8, !tbaa !48
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %332, i32 noundef %333, i32 noundef %334, double noundef %335)
          to label %336 unwind label %248

336:                                              ; preds = %331
  br label %337

337:                                              ; preds = %336
  %338 = load i32, ptr %24, align 4, !tbaa !9
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %24, align 4, !tbaa !9
  br label %310, !llvm.loop !56

340:                                              ; preds = %310
  br label %341

341:                                              ; preds = %340, %306
  br label %395

342:                                              ; preds = %269
  %343 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %344 = load ptr, ptr %343, align 8, !tbaa !11
  %345 = load i32, ptr %25, align 4, !tbaa !9
  %346 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %344, i32 noundef %345)
          to label %347 unwind label %248

347:                                              ; preds = %342
  %348 = icmp eq i32 %346, 1
  br i1 %348, label %349, label %394

349:                                              ; preds = %347
  %350 = load ptr, ptr %12, align 8, !tbaa !5
  %351 = icmp ne ptr %350, null
  br i1 %351, label %352, label %393

352:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  %353 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %42, i32 0, i32 1
  %354 = load ptr, ptr %353, align 8, !tbaa !11
  %355 = load i32, ptr %25, align 4, !tbaa !9
  %356 = invoke noundef double @_ZNK7SGTELIB11TrainingSet7Z_scaleEdi(ptr noundef nonnull align 8 dereferenceable(504) %354, double noundef 0.000000e+00, i32 noundef %355)
          to label %357 unwind label %379

357:                                              ; preds = %352
  store double %356, ptr %41, align 8, !tbaa !48
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %358

358:                                              ; preds = %389, %357
  %359 = load i32, ptr %24, align 4, !tbaa !9
  %360 = load i32, ptr %20, align 4, !tbaa !9
  %361 = icmp slt i32 %359, %360
  br i1 %361, label %362, label %392

362:                                              ; preds = %358
  %363 = load double, ptr %41, align 8, !tbaa !48
  %364 = load ptr, ptr %9, align 8, !tbaa !5
  %365 = load i32, ptr %24, align 4, !tbaa !9
  %366 = load i32, ptr %25, align 4, !tbaa !9
  %367 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %364, i32 noundef %365, i32 noundef %366)
          to label %368 unwind label %379

368:                                              ; preds = %362
  %369 = load ptr, ptr %10, align 8, !tbaa !5
  %370 = load i32, ptr %24, align 4, !tbaa !9
  %371 = load i32, ptr %25, align 4, !tbaa !9
  %372 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %369, i32 noundef %370, i32 noundef %371)
          to label %373 unwind label %379

373:                                              ; preds = %368
  %374 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %363, double noundef %367, double noundef %372)
          to label %375 unwind label %379

375:                                              ; preds = %373
  store double %374, ptr %40, align 8, !tbaa !48
  %376 = load double, ptr %40, align 8, !tbaa !48
  %377 = fcmp olt double %376, 0.000000e+00
  br i1 %377, label %378, label %383

378:                                              ; preds = %375
  store double 0.000000e+00, ptr %40, align 8, !tbaa !48
  br label %383

379:                                              ; preds = %383, %373, %368, %362, %352
  %380 = landingpad { ptr, i32 }
          cleanup
  %381 = extractvalue { ptr, i32 } %380, 0
  store ptr %381, ptr %15, align 8
  %382 = extractvalue { ptr, i32 } %380, 1
  store i32 %382, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  br label %400

383:                                              ; preds = %378, %375
  %384 = load ptr, ptr %12, align 8, !tbaa !5
  %385 = load i32, ptr %24, align 4, !tbaa !9
  %386 = load i32, ptr %25, align 4, !tbaa !9
  %387 = load double, ptr %40, align 8, !tbaa !48
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %384, i32 noundef %385, i32 noundef %386, double noundef %387)
          to label %388 unwind label %379

388:                                              ; preds = %383
  br label %389

389:                                              ; preds = %388
  %390 = load i32, ptr %24, align 4, !tbaa !9
  %391 = add nsw i32 %390, 1
  store i32 %391, ptr %24, align 4, !tbaa !9
  br label %358, !llvm.loop !57

392:                                              ; preds = %358
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  br label %393

393:                                              ; preds = %392, %349
  br label %394

394:                                              ; preds = %393, %347
  br label %395

395:                                              ; preds = %394, %341
  br label %396

396:                                              ; preds = %395
  %397 = load i32, ptr %25, align 4, !tbaa !9
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %25, align 4, !tbaa !9
  br label %259, !llvm.loop !58

399:                                              ; preds = %259
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  br label %401

400:                                              ; preds = %379, %248
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #9
  br label %402

401:                                              ; preds = %399, %239
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  ret void

402:                                              ; preds = %400, %228, %193, %174
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #9
  br label %403

403:                                              ; preds = %402, %162
  call void @llvm.lifetime.end.p0(i64 56, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  br label %404

404:                                              ; preds = %403, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %405

405:                                              ; preds = %404, %109, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  br label %406

406:                                              ; preds = %405, %76
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %407

407:                                              ; preds = %406, %75
  %408 = load ptr, ptr %15, align 8
  %409 = load i32, ptr %16, align 4
  %410 = insertvalue { ptr, i32 } poison, ptr %408, 0
  %411 = insertvalue { ptr, i32 } %410, i32 %409, 1
  resume { ptr, i32 } %411
}

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #8

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #3

declare noundef double @_ZN7SGTELIB7normcdfEddd(double noundef, double noundef, double noundef) #3

declare noundef double @_ZN7SGTELIB6normeiEddd(double noundef, double noundef, double noundef) #3

declare noundef double @_ZNK7SGTELIB11TrainingSet7Z_scaleEdi(ptr noundef nonnull align 8 dereferenceable(504), double noundef, i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin 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 #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 = { nobuiltin allocsize(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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN7SGTELIB9SurrogateE", !6, i64 8, !13, i64 16, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !26, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !27, i64 392, !32, i64 416, !17, i64 464, !40, i64 472, !26, i64 984}
!13 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !14, i64 8, !10, 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, !10, i64 304, !10, 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, !10, i64 40, !10, i64 44, !6, i64 48}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!24 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!25 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!26 = !{!"bool", !7, i64 0}
!27 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !30, i64 0}
!30 = !{!"_ZTSNSt8__detail17_List_node_headerE", !31, i64 0, !22, i64 16}
!31 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!32 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !35, i64 0, !37, i64 8}
!35 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !36, i64 0}
!36 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!37 = !{!"_ZTSSt15_Rb_tree_header", !38, i64 0, !22, i64 32}
!38 = !{!"_ZTSSt18_Rb_tree_node_base", !39, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!39 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!40 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !41, i64 0, !42, i64 8}
!41 = !{!"_ZTSSo"}
!42 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !43, i64 0, !7, i64 64, !45, i64 104, !46, i64 120, !47, i64 124, !47, i64 132, !47, i64 140, !6, i64 152, !22, i64 160, !26, i64 168, !26, i64 169, !26, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !26, i64 192, !6, i64 200, !6, i64 208, !22, i64 216, !6, i64 224, !6, i64 232}
!43 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !44, i64 56}
!44 = !{!"_ZTSSt6locale", !6, i64 0}
!45 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !26, i64 8}
!46 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!47 = !{!"_ZTS11__mbstate_t", !10, i64 0, !7, i64 4}
!48 = !{!17, !17, i64 0}
!49 = !{!50, !50, i64 0}
!50 = !{!"vtable pointer", !8, i64 0}
!51 = !{!12, !10, i64 332}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = distinct !{!54, !53}
!55 = distinct !{!55, !53}
!56 = distinct !{!56, !53}
!57 = distinct !{!57, !53}
!58 = distinct !{!58, !53}


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

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

@.str.6 = external hidden unnamed_addr constant [96 x i8], align 1
@__FUNCTION__._ZN7SGTELIB17Surrogate_Kriging15predict_privateERKNS_6MatrixEPS1_ = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 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(...)

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

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

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

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

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

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

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

declare void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3

declare void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #6 align 2

declare void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB17Surrogate_Kriging15predict_privateERKNS_6MatrixEPS1_S4_S4_S4_(ptr noundef nonnull align 8 dereferenceable(1336) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca i32, align 4
  %12 = alloca %"class.SGTELIB::Matrix", align 8
  %13 = alloca %"class.SGTELIB::Matrix", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.SGTELIB::Matrix", align 8
  %17 = alloca %"class.SGTELIB::Matrix", align 8
  %18 = alloca %"class.SGTELIB::Matrix", align 8
  %19 = alloca %"class.SGTELIB::Matrix", align 8
  %20 = alloca %"class.SGTELIB::Matrix", align 8
  %21 = alloca %"class.SGTELIB::Matrix", align 8
  %22 = alloca %"class.SGTELIB::Matrix", align 8
  %23 = alloca %"class.SGTELIB::Matrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %24 unwind label %36

24:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @__FUNCTION__._ZN7SGTELIB17Surrogate_Kriging15predict_privateERKNS_6MatrixEPS1_, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %25 unwind label %38

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  store i32 204, ptr %11, align 4, !tbaa !5
  invoke void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %26 unwind label %40

26:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  %27 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = call noundef double @_ZNK7SGTELIB11TrainingSet10get_fs_minEv(ptr noundef nonnull align 8 dereferenceable(504) %29)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #9
  call void @_ZN7SGTELIB17Surrogate_Kriging25compute_covariance_matrixERKNS_6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %13, ptr noundef nonnull align 8 dereferenceable(1336) %0, ptr noundef nonnull align 8 dereferenceable(56) %1)
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %31 unwind label %44

31:                                               ; preds = %26
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #9
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %48, label %32

32:                                               ; preds = %31
  %33 = load ptr, ptr %0, align 8, !tbaa !47
  %34 = getelementptr inbounds i8, ptr %33, i64 32
  %35 = load ptr, ptr %34, align 8
  invoke void %35(ptr noundef nonnull align 8 dereferenceable(1336) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull %2)
          to label %48 unwind label %46

36:                                               ; preds = %6
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %43

38:                                               ; preds = %24
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %25
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  br label %43

43:                                               ; preds = %42, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %37, %36 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %175

44:                                               ; preds = %26
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #9
  br label %174

46:                                               ; preds = %50, %49, %32
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %173

48:                                               ; preds = %32, %31
  %.not131 = icmp eq ptr %3, null
  br i1 %.not131, label %50, label %49

49:                                               ; preds = %48
  invoke void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %3, double noundef 0xFFEFFFFFFFFFFFFF)
          to label %62 unwind label %46

50:                                               ; preds = %48
  %51 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #10
          to label %52 unwind label %46

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

53:                                               ; preds = %52
  %54 = getelementptr inbounds i8, ptr %0, i64 332
  %55 = load i32, ptr %54, align 4, !tbaa !49
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %51, ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef %27, i32 noundef %55)
          to label %56 unwind label %59

56:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #9
  br label %62

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

59:                                               ; preds = %53
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #9
  br label %61

61:                                               ; preds = %59, %57
  %.pn132 = phi { ptr, i32 } [ %60, %59 ], [ %58, %57 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #9
  call void @_ZdlPvm(ptr noundef nonnull %51, i64 noundef 56) #11
  br label %173

62:                                               ; preds = %49, %56
  %.0 = phi ptr [ %3, %49 ], [ %51, %56 ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %16) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %17) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %18) #9
  %63 = getelementptr inbounds i8, ptr %0, i64 1104
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %18, ptr noundef nonnull align 8 dereferenceable(56) %63)
          to label %64 unwind label %90

64:                                               ; preds = %62
  %65 = getelementptr inbounds i8, ptr %0, i64 1048
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %17, ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %65)
          to label %66 unwind label %92

66:                                               ; preds = %64
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 8 dereferenceable(56) %63)
          to label %67 unwind label %94

67:                                               ; preds = %66
  %68 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %16, i32 noundef 0, i32 noundef 0)
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %19) #9
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19)
          to label %.preheader167 unwind label %98

.preheader167:                                    ; preds = %67
  %69 = icmp sgt i32 %27, 0
  br i1 %69, label %.lr.ph170, label %._crit_edge171

.lr.ph170:                                        ; preds = %.preheader167
  %70 = getelementptr inbounds i8, ptr %0, i64 332
  %71 = getelementptr inbounds i8, ptr %0, i64 1272
  br label %72

72:                                               ; preds = %.lr.ph170, %._crit_edge
  %.0113169 = phi i32 [ 0, %.lr.ph170 ], [ %123, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %20) #9
  invoke void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %20, ptr noundef nonnull align 8 dereferenceable(56) %12, i32 noundef %.0113169)
          to label %73 unwind label %100

73:                                               ; preds = %72
  %74 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %75 unwind label %102

75:                                               ; preds = %73
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %21) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %22) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %23) #9
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %23, ptr noundef nonnull align 8 dereferenceable(56) %19)
          to label %76 unwind label %105

76:                                               ; preds = %75
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %22, ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(56) %65)
          to label %77 unwind label %107

77:                                               ; preds = %76
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(56) %22, ptr noundef nonnull align 8 dereferenceable(56) %19)
          to label %78 unwind label %109

78:                                               ; preds = %77
  %79 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %21, i32 noundef 0, i32 noundef 0)
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %23) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %21) #9
  %80 = fadd double %79, -1.000000e+00
  %81 = call double @llvm.fabs.f64(double %80)
  %82 = fcmp olt double %81, 1.000000e-13
  %83 = fsub double 1.000000e+00, %79
  %84 = fmul double %83, %83
  %85 = fdiv double %84, %68
  %86 = fadd double %83, %85
  %.092 = select i1 %82, double %81, double %86
  %87 = call double @llvm.fabs.f64(double %.092)
  %88 = load i32, ptr %70, align 4, !tbaa !49
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %.lr.ph, label %._crit_edge

90:                                               ; preds = %62
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %97

92:                                               ; preds = %64
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %96

94:                                               ; preds = %66
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #9
  br label %96

96:                                               ; preds = %94, %92
  %.pn134 = phi { ptr, i32 } [ %95, %94 ], [ %93, %92 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #9
  br label %97

97:                                               ; preds = %96, %90
  %.pn134.pn = phi { ptr, i32 } [ %.pn134, %96 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #9
  br label %173

98:                                               ; preds = %67
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %172

100:                                              ; preds = %72
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %104

102:                                              ; preds = %73
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #9
  br label %104

104:                                              ; preds = %102, %100
  %.pn139 = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #9
  br label %.loopexit.split-lp

105:                                              ; preds = %75
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %112

107:                                              ; preds = %76
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %111

109:                                              ; preds = %77
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  br label %111

111:                                              ; preds = %109, %107
  %.pn141 = phi { ptr, i32 } [ %110, %109 ], [ %108, %107 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #9
  br label %112

112:                                              ; preds = %111, %105
  %.pn141.pn = phi { ptr, i32 } [ %.pn141, %111 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %23) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %21) #9
  br label %.loopexit.split-lp

.lr.ph:                                           ; preds = %78, %117
  %.0111168 = phi i32 [ %118, %117 ], [ 0, %78 ]
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %71, i32 noundef %.0111168)
          to label %114 unwind label %121

114:                                              ; preds = %.lr.ph
  %115 = load double, ptr %113, align 8, !tbaa !50
  %116 = fmul double %87, %115
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %.0, i32 noundef %.0113169, i32 noundef %.0111168, double noundef %116)
          to label %117 unwind label %121

117:                                              ; preds = %114
  %118 = add nuw nsw i32 %.0111168, 1
  %119 = load i32, ptr %70, align 4, !tbaa !49
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %.lr.ph, label %._crit_edge, !llvm.loop !51

121:                                              ; preds = %114, %.lr.ph
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

._crit_edge:                                      ; preds = %117, %78
  %123 = add nuw nsw i32 %.0113169, 1
  %exitcond.not = icmp eq i32 %123, %27
  br i1 %exitcond.not, label %._crit_edge171, label %72, !llvm.loop !53

._crit_edge171:                                   ; preds = %._crit_edge, %.preheader167
  %124 = icmp ne ptr %4, null
  %125 = icmp ne ptr %5, null
  %or.cond = or i1 %124, %125
  br i1 %or.cond, label %126, label %.loopexit163

126:                                              ; preds = %._crit_edge171
  br i1 %124, label %127, label %128

127:                                              ; preds = %126
  invoke void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %4, double noundef 0xFFEFFFFFFFFFFFFF)
          to label %128 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

.loopexit151:                                     ; preds = %.lr.ph177, %150
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %143, %.lr.ph175
  %lpad.loopexit154 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %134, %154
  %lpad.loopexit164 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %127, %129
  %lpad.loopexit.split-lp165 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

128:                                              ; preds = %127, %126
  br i1 %125, label %129, label %130

129:                                              ; preds = %128
  invoke void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %5, double noundef 0xFFEFFFFFFFFFFFFF)
          to label %130 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

130:                                              ; preds = %129, %128
  %131 = getelementptr inbounds i8, ptr %0, i64 332
  %132 = load i32, ptr %131, align 4, !tbaa !49
  %133 = icmp sgt i32 %132, 0
  br i1 %133, label %.lr.ph182, label %.loopexit163

.lr.ph182:                                        ; preds = %130
  %brmerge.not = and i1 %69, %125
  %brmerge187.not = and i1 %69, %124
  br label %134

134:                                              ; preds = %.lr.ph182, %.loopexit
  %.1112178 = phi i32 [ 0, %.lr.ph182 ], [ %169, %.loopexit ]
  %135 = load ptr, ptr %28, align 8, !tbaa !9
  %136 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %135, i32 noundef %.1112178)
          to label %137 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

137:                                              ; preds = %134
  %138 = icmp eq i32 %136, 0
  br i1 %138, label %139, label %154

139:                                              ; preds = %137
  br i1 %brmerge.not, label %.lr.ph175, label %.loopexit153

.lr.ph175:                                        ; preds = %139, %145
  %.1114174 = phi i32 [ %146, %145 ], [ 0, %139 ]
  %140 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %.1114174, i32 noundef %.1112178)
  %141 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %.0, i32 noundef %.1114174, i32 noundef %.1112178)
  %142 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %30, double noundef %140, double noundef %141)
          to label %143 unwind label %.loopexit.split-lp.loopexit

143:                                              ; preds = %.lr.ph175
  %144 = fcmp olt double %142, 0.000000e+00
  %.091 = select i1 %144, double 0.000000e+00, double %142
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef %.1114174, i32 noundef %.1112178, double noundef %.091)
          to label %145 unwind label %.loopexit.split-lp.loopexit

145:                                              ; preds = %143
  %146 = add nuw nsw i32 %.1114174, 1
  %exitcond192.not = icmp eq i32 %146, %27
  br i1 %exitcond192.not, label %.loopexit153, label %.lr.ph175, !llvm.loop !54

.loopexit153:                                     ; preds = %145, %139
  br i1 %brmerge187.not, label %.lr.ph177, label %.loopexit

.lr.ph177:                                        ; preds = %.loopexit153, %152
  %.2115176 = phi i32 [ %153, %152 ], [ 0, %.loopexit153 ]
  %147 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %.2115176, i32 noundef %.1112178)
  %148 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %.0, i32 noundef %.2115176, i32 noundef %.1112178)
  %149 = invoke noundef double @_ZN7SGTELIB6normeiEddd(double noundef %147, double noundef %148, double noundef %30)
          to label %150 unwind label %.loopexit151

150:                                              ; preds = %.lr.ph177
  %151 = fcmp olt double %149, 0.000000e+00
  %.1 = select i1 %151, double 0.000000e+00, double %149
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %4, i32 noundef %.2115176, i32 noundef %.1112178, double noundef %.1)
          to label %152 unwind label %.loopexit151

152:                                              ; preds = %150
  %153 = add nuw nsw i32 %.2115176, 1
  %exitcond193.not = icmp eq i32 %153, %27
  br i1 %exitcond193.not, label %.loopexit, label %.lr.ph177, !llvm.loop !55

154:                                              ; preds = %137
  %155 = load ptr, ptr %28, align 8, !tbaa !9
  %156 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %155, i32 noundef %.1112178)
          to label %157 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

157:                                              ; preds = %154
  %158 = icmp eq i32 %156, 1
  %or.cond3 = and i1 %125, %158
  br i1 %or.cond3, label %159, label %.loopexit

159:                                              ; preds = %157
  %160 = load ptr, ptr %28, align 8, !tbaa !9
  %161 = invoke noundef double @_ZNK7SGTELIB11TrainingSet7Z_scaleEdi(ptr noundef nonnull align 8 dereferenceable(504) %160, double noundef 0.000000e+00, i32 noundef %.1112178)
          to label %.preheader157 unwind label %.loopexit.split-lp160

.preheader157:                                    ; preds = %159
  br i1 %69, label %.lr.ph173, label %.loopexit

.lr.ph173:                                        ; preds = %.preheader157, %167
  %.3116172 = phi i32 [ %168, %167 ], [ 0, %.preheader157 ]
  %162 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %.3116172, i32 noundef %.1112178)
  %163 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %.0, i32 noundef %.3116172, i32 noundef %.1112178)
  %164 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %161, double noundef %162, double noundef %163)
          to label %165 unwind label %.loopexit159

165:                                              ; preds = %.lr.ph173
  %166 = fcmp olt double %164, 0.000000e+00
  %.2 = select i1 %166, double 0.000000e+00, double %164
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef %.3116172, i32 noundef %.1112178, double noundef %.2)
          to label %167 unwind label %.loopexit159

.loopexit159:                                     ; preds = %.lr.ph173, %165
  %lpad.loopexit161 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

167:                                              ; preds = %165
  %168 = add nuw nsw i32 %.3116172, 1
  %exitcond191.not = icmp eq i32 %168, %27
  br i1 %exitcond191.not, label %.loopexit, label %.lr.ph173, !llvm.loop !56

.loopexit:                                        ; preds = %167, %152, %.loopexit153, %.preheader157, %157
  %169 = add nuw nsw i32 %.1112178, 1
  %170 = load i32, ptr %131, align 4, !tbaa !49
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %134, label %.loopexit163, !llvm.loop !57

.loopexit163:                                     ; preds = %.loopexit, %130, %._crit_edge171
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #9
  ret void

.loopexit.split-lp:                               ; preds = %.loopexit159, %.loopexit.split-lp160, %.loopexit151, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %121, %112, %104
  %.pn144 = phi { ptr, i32 } [ %122, %121 ], [ %.pn141.pn, %112 ], [ %.pn139, %104 ], [ %lpad.loopexit, %.loopexit151 ], [ %lpad.loopexit154, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit164, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp165, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ], [ %lpad.loopexit161, %.loopexit159 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp160 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #9
  br label %172

172:                                              ; preds = %.loopexit.split-lp, %98
  %.pn144.pn = phi { ptr, i32 } [ %.pn144, %.loopexit.split-lp ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #9
  br label %173

173:                                              ; preds = %97, %172, %61, %46
  %.pn144.pn.pn.pn = phi { ptr, i32 } [ %47, %46 ], [ %.pn132, %61 ], [ %.pn144.pn, %172 ], [ %.pn134.pn, %97 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #9
  br label %174

174:                                              ; preds = %173, %44
  %.pn144.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn144.pn.pn.pn, %173 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #9
  br label %175

175:                                              ; preds = %174, %43
  %.pn144.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn144.pn.pn.pn.pn, %174 ], [ %.pn.pn, %43 ]
  resume { ptr, i32 } %.pn144.pn.pn.pn.pn.pn
}

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #8

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #3

declare noundef double @_ZN7SGTELIB7normcdfEddd(double noundef, double noundef, double noundef) local_unnamed_addr #3

declare noundef double @_ZN7SGTELIB6normeiEddd(double noundef, double noundef, double noundef) local_unnamed_addr #3

declare noundef double @_ZNK7SGTELIB11TrainingSet7Z_scaleEdi(ptr noundef nonnull align 8 dereferenceable(504), double noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin 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 #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 = { nobuiltin allocsize(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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN7SGTELIB9SurrogateE", !11, i64 8, !12, i64 16, !6, i64 328, !6, i64 332, !6, i64 336, !6, i64 340, !6, i64 344, !6, i64 348, !25, i64 352, !11, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !26, i64 392, !31, i64 416, !16, i64 464, !39, i64 472, !25, i64 984}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !13, i64 8, !6, i64 12, !14, i64 16, !15, i64 20, !14, i64 24, !16, i64 32, !14, i64 40, !16, i64 48, !14, i64 56, !17, i64 60, !14, i64 64, !18, i64 72, !22, i64 128, !14, i64 132, !23, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !18, i64 176, !14, i64 232, !24, i64 236, !19, i64 240, !19, i64 272, !6, i64 304, !6, i64 308}
!13 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!14 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!15 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!18 = !{!"_ZTSN7SGTELIB6MatrixE", !19, i64 8, !6, i64 40, !6, i64 44, !11, i64 48}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!23 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!24 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !27, i64 0}
!27 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !29, i64 0}
!29 = !{!"_ZTSNSt8__detail17_List_node_headerE", !30, i64 0, !21, i64 16}
!30 = !{!"_ZTSNSt8__detail15_List_node_baseE", !11, i64 0, !11, i64 8}
!31 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !32, i64 0}
!32 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !33, i64 0}
!33 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !34, i64 0, !36, i64 8}
!34 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !35, i64 0}
!35 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!36 = !{!"_ZTSSt15_Rb_tree_header", !37, i64 0, !21, i64 32}
!37 = !{!"_ZTSSt18_Rb_tree_node_base", !38, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!38 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!39 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !40, i64 0, !41, i64 8}
!40 = !{!"_ZTSSo"}
!41 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !42, i64 0, !7, i64 64, !44, i64 104, !45, i64 120, !46, i64 124, !46, i64 132, !46, i64 140, !11, i64 152, !21, i64 160, !25, i64 168, !25, i64 169, !25, i64 170, !7, i64 171, !11, i64 176, !11, i64 184, !25, i64 192, !11, i64 200, !11, i64 208, !21, i64 216, !11, i64 224, !11, i64 232}
!42 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !43, i64 56}
!43 = !{!"_ZTSSt6locale", !11, i64 0}
!44 = !{!"_ZTSSt12__basic_fileIcE", !11, i64 0, !25, i64 8}
!45 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!46 = !{!"_ZTS11__mbstate_t", !6, i64 0, !7, i64 4}
!47 = !{!48, !48, i64 0}
!48 = !{!"vtable pointer", !8, i64 0}
!49 = !{!10, !6, i64 332}
!50 = !{!16, !16, i64 0}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.mustprogress"}
!53 = distinct !{!53, !52}
!54 = distinct !{!54, !52}
!55 = distinct !{!55, !52}
!56 = distinct !{!56, !52}
!57 = distinct !{!57, !52}


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