; 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.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB17Surrogate_Kriging13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1336) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.SGTELIB::Matrix", align 8
  %7 = alloca %"class.SGTELIB::Matrix", align 8
  %8 = alloca %"class.SGTELIB::Matrix", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.SGTELIB::Matrix", align 8
  %12 = alloca %"class.SGTELIB::Matrix", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.SGTELIB::Matrix", align 8
  %15 = alloca %"class.SGTELIB::Matrix", align 8
  %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.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.SGTELIB::Matrix", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca double, align 8
  %31 = alloca %"class.SGTELIB::Matrix", align 8
  %32 = alloca %"class.SGTELIB::Matrix", align 8
  %33 = alloca i32, align 4
  %34 = alloca %"class.SGTELIB::Matrix", 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 %"class.SGTELIB::Matrix", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %41 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %42 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %43)
  store i32 %44, ptr %4, align 4, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %6) #7
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %6, ptr noundef nonnull align 8 dereferenceable(985) %41)
  store ptr %6, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #7
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %8, ptr noundef nonnull align 8 dereferenceable(985) %41)
          to label %45 unwind label %67

45:                                               ; preds = %1
  invoke void @_ZN7SGTELIB17Surrogate_Kriging25compute_covariance_matrixERKNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(1336) %41, ptr noundef nonnull align 8 dereferenceable(56) %8)
          to label %46 unwind label %71

46:                                               ; preds = %45
  %47 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 1
  %48 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %47, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %49 unwind label %75

49:                                               ; preds = %46
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %11) #7
  %50 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %41, i32 0, i32 7
  %51 = load i32, ptr %50, align 8, !tbaa !48
  invoke void @_ZN7SGTELIB6Matrix4onesEii(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %11, i32 noundef %51, i32 noundef 1)
          to label %52 unwind label %81

52:                                               ; preds = %49
  %53 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 3
  %54 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %53, ptr noundef nonnull align 8 dereferenceable(56) %11)
          to label %55 unwind label %85

55:                                               ; preds = %52
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #7
  %56 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 1
  %57 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 7
  invoke void @_ZNK7SGTELIB6Matrix10lu_inverseEPd(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(56) %56, ptr noundef %57)
          to label %58 unwind label %90

58:                                               ; preds = %55
  %59 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 2
  %60 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %59, ptr noundef nonnull align 8 dereferenceable(56) %12)
          to label %61 unwind label %94

61:                                               ; preds = %58
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #7
  %62 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 7
  %63 = load double, ptr %62, align 8, !tbaa !49
  %64 = fcmp ole double %63, 0.000000e+00
  br i1 %64, label %65, label %99

65:                                               ; preds = %61
  %66 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 7
  store double 0x7FEFFFFFFFFFFFFF, ptr %66, align 8, !tbaa !49
  store i1 false, ptr %2, align 1
  store i32 1, ptr %13, align 4
  br label %336

67:                                               ; preds = %1
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  br label %80

71:                                               ; preds = %45
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %9, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %10, align 4
  br label %79

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

79:                                               ; preds = %75, %71
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  br label %80

80:                                               ; preds = %79, %67
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #7
  br label %338

81:                                               ; preds = %49
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %9, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %10, align 4
  br label %89

85:                                               ; preds = %52
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %9, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #7
  br label %89

89:                                               ; preds = %85, %81
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #7
  br label %338

90:                                               ; preds = %55
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %9, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %10, align 4
  br label %98

94:                                               ; preds = %58
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  br label %98

98:                                               ; preds = %94, %90
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #7
  br label %338

99:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #7
  %100 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 3
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %100)
          to label %101 unwind label %144

101:                                              ; preds = %99
  %102 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 2
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(56) %15, ptr noundef nonnull align 8 dereferenceable(56) %102)
          to label %103 unwind label %148

103:                                              ; preds = %101
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %16) #7
  %104 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 3
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %104)
          to label %105 unwind label %153

105:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 56, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #7
  invoke void @_ZNK7SGTELIB6Matrix16cholesky_inverseEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %19, ptr noundef nonnull align 8 dereferenceable(56) %16)
          to label %106 unwind label %157

106:                                              ; preds = %105
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %18, ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %107 unwind label %161

107:                                              ; preds = %106
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %17, ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %108)
          to label %109 unwind label %165

109:                                              ; preds = %107
  %110 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 5
  %111 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %110, ptr noundef nonnull align 8 dereferenceable(56) %17)
          to label %112 unwind label %169

112:                                              ; preds = %109
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %20) #7
  %113 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 56, ptr %21) #7
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #7
  %115 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 3
  %116 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 5
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %22, ptr noundef nonnull align 8 dereferenceable(56) %115, ptr noundef nonnull align 8 dereferenceable(56) %116)
          to label %117 unwind label %176

117:                                              ; preds = %112
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(56) %114, ptr noundef nonnull align 8 dereferenceable(56) %22)
          to label %118 unwind label %180

118:                                              ; preds = %117
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %20, ptr noundef nonnull align 8 dereferenceable(56) %113, ptr noundef nonnull align 8 dereferenceable(56) %21)
          to label %119 unwind label %184

119:                                              ; preds = %118
  %120 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 4
  %121 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %120, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %122 unwind label %188

122:                                              ; preds = %119
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #7
  %123 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %124 unwind label %195

124:                                              ; preds = %122
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %123, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %125 unwind label %199

125:                                              ; preds = %124
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  %126 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %127 unwind label %204

127:                                              ; preds = %125
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %126, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %128 unwind label %208

128:                                              ; preds = %127
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %129 unwind label %213

129:                                              ; preds = %128
  %130 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %41, i32 0, i32 4
  %131 = load i32, ptr %130, align 4, !tbaa !51
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 8 dereferenceable(32) %28, i32 noundef 1, i32 noundef %131)
          to label %132 unwind label %217

132:                                              ; preds = %129
  %133 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 6
  %134 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %133, ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %135 unwind label %221

135:                                              ; preds = %132
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %31) #7
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31)
          to label %136 unwind label %227

136:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 56, ptr %32) #7
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32)
          to label %137 unwind label %231

137:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  store i32 0, ptr %33, align 4, !tbaa !47
  br label %138

138:                                              ; preds = %322, %137
  %139 = load i32, ptr %33, align 4, !tbaa !47
  %140 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %41, i32 0, i32 4
  %141 = load i32, ptr %140, align 4, !tbaa !51
  %142 = icmp slt i32 %139, %141
  br i1 %142, label %235, label %143

143:                                              ; preds = %138
  store i32 2, ptr %13, align 4
  br label %325

144:                                              ; preds = %99
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %9, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %10, align 4
  br label %152

148:                                              ; preds = %101
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %9, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #7
  br label %152

152:                                              ; preds = %148, %144
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #7
  br label %335

153:                                              ; preds = %103
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %9, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %10, align 4
  br label %334

157:                                              ; preds = %105
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %9, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %10, align 4
  br label %175

161:                                              ; preds = %106
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %9, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %10, align 4
  br label %174

165:                                              ; preds = %107
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %9, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %10, align 4
  br label %173

169:                                              ; preds = %109
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %9, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #7
  br label %173

173:                                              ; preds = %169, %165
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #7
  br label %174

174:                                              ; preds = %173, %161
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #7
  br label %175

175:                                              ; preds = %174, %157
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #7
  br label %333

176:                                              ; preds = %112
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %9, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %10, align 4
  br label %194

180:                                              ; preds = %117
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %9, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %10, align 4
  br label %193

184:                                              ; preds = %118
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %9, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %10, align 4
  br label %192

188:                                              ; preds = %119
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %9, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  br label %192

192:                                              ; preds = %188, %184
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #7
  br label %193

193:                                              ; preds = %192, %180
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #7
  br label %194

194:                                              ; preds = %193, %176
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #7
  br label %333

195:                                              ; preds = %122
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %9, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %10, align 4
  br label %203

199:                                              ; preds = %124
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %9, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %203

203:                                              ; preds = %199, %195
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  br label %333

204:                                              ; preds = %125
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %9, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %10, align 4
  br label %212

208:                                              ; preds = %127
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %9, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  br label %212

212:                                              ; preds = %208, %204
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  br label %333

213:                                              ; preds = %128
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %9, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %10, align 4
  br label %226

217:                                              ; preds = %129
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %9, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %10, align 4
  br label %225

221:                                              ; preds = %132
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %9, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  br label %225

225:                                              ; preds = %221, %217
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #7
  br label %226

226:                                              ; preds = %225, %213
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #7
  br label %333

227:                                              ; preds = %135
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %9, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %10, align 4
  br label %332

231:                                              ; preds = %136
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %9, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %10, align 4
  br label %331

235:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 56, ptr %34) #7
  %236 = load ptr, ptr %5, align 8, !tbaa !5
  %237 = load i32, ptr %33, align 4, !tbaa !47
  invoke void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %34, ptr noundef nonnull align 8 dereferenceable(56) %236, i32 noundef %237)
          to label %238 unwind label %266

238:                                              ; preds = %235
  %239 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %31, ptr noundef nonnull align 8 dereferenceable(56) %34)
          to label %240 unwind label %270

240:                                              ; preds = %238
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %34) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %36) #7
  %241 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 56, ptr %37) #7
  %242 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 5
  %243 = load i32, ptr %33, align 4, !tbaa !47
  invoke void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %37, ptr noundef nonnull align 8 dereferenceable(56) %242, i32 noundef %243)
          to label %244 unwind label %275

244:                                              ; preds = %240
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %36, ptr noundef nonnull align 8 dereferenceable(56) %241, ptr noundef nonnull align 8 dereferenceable(56) %37)
          to label %245 unwind label %279

245:                                              ; preds = %244
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %35, ptr noundef nonnull align 8 dereferenceable(56) %31, ptr noundef nonnull align 8 dereferenceable(56) %36)
          to label %246 unwind label %283

246:                                              ; preds = %245
  %247 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %31, ptr noundef nonnull align 8 dereferenceable(56) %35)
          to label %248 unwind label %287

248:                                              ; preds = %246
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %38) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %40) #7
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %40, ptr noundef nonnull align 8 dereferenceable(56) %31)
          to label %249 unwind label %294

249:                                              ; preds = %248
  %250 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 2
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %39, ptr noundef nonnull align 8 dereferenceable(56) %40, ptr noundef nonnull align 8 dereferenceable(56) %250)
          to label %251 unwind label %298

251:                                              ; preds = %249
  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) %31)
          to label %252 unwind label %302

252:                                              ; preds = %251
  %253 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %32, ptr noundef nonnull align 8 dereferenceable(56) %38)
          to label %254 unwind label %306

254:                                              ; preds = %252
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %38) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %39) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %40) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %38) #7
  %255 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %32, i32 noundef 0, i32 noundef 0)
          to label %256 unwind label %313

256:                                              ; preds = %254
  %257 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %41, i32 0, i32 7
  %258 = load i32, ptr %257, align 8, !tbaa !48
  %259 = load i32, ptr %4, align 4, !tbaa !47
  %260 = sub nsw i32 %258, %259
  %261 = sitofp i32 %260 to double
  %262 = fdiv double %255, %261
  store double %262, ptr %30, align 8, !tbaa !52
  %263 = load double, ptr %30, align 8, !tbaa !52
  %264 = fcmp olt double %263, 0.000000e+00
  br i1 %264, label %265, label %317

265:                                              ; preds = %256
  store i1 false, ptr %2, align 1
  store i32 1, ptr %13, align 4
  br label %325

266:                                              ; preds = %235
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %9, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %10, align 4
  br label %274

270:                                              ; preds = %238
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %9, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %34) #7
  br label %274

274:                                              ; preds = %270, %266
  call void @llvm.lifetime.end.p0(i64 56, ptr %34) #7
  br label %327

275:                                              ; preds = %240
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %9, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %10, align 4
  br label %293

279:                                              ; preds = %244
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %9, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %10, align 4
  br label %292

283:                                              ; preds = %245
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %9, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %10, align 4
  br label %291

287:                                              ; preds = %246
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %9, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #7
  br label %291

291:                                              ; preds = %287, %283
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #7
  br label %292

292:                                              ; preds = %291, %279
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #7
  br label %293

293:                                              ; preds = %292, %275
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %35) #7
  br label %327

294:                                              ; preds = %248
  %295 = landingpad { ptr, i32 }
          cleanup
  %296 = extractvalue { ptr, i32 } %295, 0
  store ptr %296, ptr %9, align 8
  %297 = extractvalue { ptr, i32 } %295, 1
  store i32 %297, ptr %10, align 4
  br label %312

298:                                              ; preds = %249
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %9, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %10, align 4
  br label %311

302:                                              ; preds = %251
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %9, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %10, align 4
  br label %310

306:                                              ; preds = %252
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %9, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %10, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %38) #7
  br label %310

310:                                              ; preds = %306, %302
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %39) #7
  br label %311

311:                                              ; preds = %310, %298
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %40) #7
  br label %312

312:                                              ; preds = %311, %294
  call void @llvm.lifetime.end.p0(i64 56, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %38) #7
  br label %327

313:                                              ; preds = %317, %254
  %314 = landingpad { ptr, i32 }
          cleanup
  %315 = extractvalue { ptr, i32 } %314, 0
  store ptr %315, ptr %9, align 8
  %316 = extractvalue { ptr, i32 } %314, 1
  store i32 %316, ptr %10, align 4
  br label %327

317:                                              ; preds = %256
  %318 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %41, i32 0, i32 6
  %319 = load i32, ptr %33, align 4, !tbaa !47
  %320 = load double, ptr %30, align 8, !tbaa !52
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %318, i32 noundef 0, i32 noundef %319, double noundef %320)
          to label %321 unwind label %313

321:                                              ; preds = %317
  br label %322

322:                                              ; preds = %321
  %323 = load i32, ptr %33, align 4, !tbaa !47
  %324 = add nsw i32 %323, 1
  store i32 %324, ptr %33, align 4, !tbaa !47
  br label %138, !llvm.loop !53

325:                                              ; preds = %265, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  %326 = load i32, ptr %13, align 4
  switch i32 %326, label %330 [
    i32 2, label %328
  ]

327:                                              ; preds = %313, %312, %293, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32) #7
  br label %331

328:                                              ; preds = %325
  %329 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %41, i32 0, i32 9
  store i8 1, ptr %329, align 8, !tbaa !55
  store i1 true, ptr %2, align 1
  store i32 1, ptr %13, align 4
  br label %330

330:                                              ; preds = %328, %325
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #7
  br label %336

331:                                              ; preds = %327, %231
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #7
  br label %332

332:                                              ; preds = %331, %227
  call void @llvm.lifetime.end.p0(i64 56, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  br label %333

333:                                              ; preds = %332, %226, %212, %203, %194, %175
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #7
  br label %334

334:                                              ; preds = %333, %153
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #7
  br label %335

335:                                              ; preds = %334, %152
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #7
  br label %338

336:                                              ; preds = %330, %65
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  %337 = load i1, ptr %2, align 1
  ret i1 %337

338:                                              ; preds = %335, %98, %89, %80
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %339

339:                                              ; preds = %338
  %340 = load ptr, ptr %9, align 8
  %341 = load i32, ptr %10, align 4
  %342 = insertvalue { ptr, i32 } poison, ptr %340, 0
  %343 = insertvalue { ptr, i32 } %342, i32 %341, 1
  resume { ptr, i32 } %343
}

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

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

; 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 void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985)) #3

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 @_ZN7SGTELIB6Matrix4onesEii(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, i32 noundef, i32 noundef) #3

declare void @_ZNK7SGTELIB6Matrix10lu_inverseEPd(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #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 @_ZNK7SGTELIB6Matrix16cholesky_inverseEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56)) #3

declare void @_ZmiRKN7SGTELIB6MatrixES2_(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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #5 align 2

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

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

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


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

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

@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB17Surrogate_Kriging13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1336) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.SGTELIB::Matrix", align 8
  %3 = alloca %"class.SGTELIB::Matrix", align 8
  %4 = alloca %"class.SGTELIB::Matrix", align 8
  %5 = alloca %"class.SGTELIB::Matrix", align 8
  %6 = alloca %"class.SGTELIB::Matrix", align 8
  %7 = alloca %"class.SGTELIB::Matrix", align 8
  %8 = alloca %"class.SGTELIB::Matrix", align 8
  %9 = alloca %"class.SGTELIB::Matrix", align 8
  %10 = alloca %"class.SGTELIB::Matrix", align 8
  %11 = alloca %"class.SGTELIB::Matrix", align 8
  %12 = alloca %"class.SGTELIB::Matrix", align 8
  %13 = alloca %"class.SGTELIB::Matrix", align 8
  %14 = alloca %"class.SGTELIB::Matrix", align 8
  %15 = alloca %"class.SGTELIB::Matrix", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %"class.SGTELIB::Matrix", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.SGTELIB::Matrix", align 8
  %24 = alloca %"class.SGTELIB::Matrix", align 8
  %25 = alloca %"class.SGTELIB::Matrix", align 8
  %26 = alloca %"class.SGTELIB::Matrix", align 8
  %27 = alloca %"class.SGTELIB::Matrix", align 8
  %28 = alloca %"class.SGTELIB::Matrix", align 8
  %29 = alloca %"class.SGTELIB::Matrix", align 8
  %30 = alloca %"class.SGTELIB::Matrix", align 8
  %31 = alloca %"class.SGTELIB::Matrix", align 8
  %32 = getelementptr inbounds i8, ptr %0, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  %34 = tail call noundef i32 @_ZNK7SGTELIB11TrainingSet8get_nvarEv(ptr noundef nonnull align 8 dereferenceable(504) %33)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #7
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %2, ptr noundef nonnull align 8 dereferenceable(985) %0)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #7
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %4, ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %35 unwind label %54

35:                                               ; preds = %1
  invoke void @_ZN7SGTELIB17Surrogate_Kriging25compute_covariance_matrixERKNS_6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %3, ptr noundef nonnull align 8 dereferenceable(1336) %0, ptr noundef nonnull align 8 dereferenceable(56) %4)
          to label %36 unwind label %56

36:                                               ; preds = %35
  %37 = getelementptr inbounds i8, ptr %0, i64 992
  %38 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(56) %3)
          to label %39 unwind label %58

39:                                               ; preds = %36
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #7
  %40 = getelementptr inbounds i8, ptr %0, i64 344
  %41 = load i32, ptr %40, align 8, !tbaa !46
  invoke void @_ZN7SGTELIB6Matrix4onesEii(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %5, i32 noundef %41, i32 noundef 1)
          to label %42 unwind label %62

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %0, i64 1104
  %44 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull align 8 dereferenceable(56) %5)
          to label %45 unwind label %64

45:                                               ; preds = %42
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #7
  %46 = getelementptr inbounds i8, ptr %0, i64 1328
  invoke void @_ZNK7SGTELIB6Matrix10lu_inverseEPd(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %6, ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull %46)
          to label %47 unwind label %67

47:                                               ; preds = %45
  %48 = getelementptr inbounds i8, ptr %0, i64 1048
  %49 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %50 unwind label %69

50:                                               ; preds = %47
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #7
  %51 = load double, ptr %46, align 8, !tbaa !47
  %52 = fcmp ugt double %51, 0.000000e+00
  br i1 %52, label %72, label %53

53:                                               ; preds = %50
  store double 0x7FEFFFFFFFFFFFFF, ptr %46, align 8, !tbaa !47
  br label %211

54:                                               ; preds = %1
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %61

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

58:                                               ; preds = %36
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #7
  br label %60

60:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #7
  br label %61

61:                                               ; preds = %60, %54
  %.pn.pn = phi { ptr, i32 } [ %.pn, %60 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #7
  br label %212

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

64:                                               ; preds = %42
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #7
  br label %66

66:                                               ; preds = %64, %62
  %.pn52 = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #7
  br label %212

67:                                               ; preds = %45
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %47
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #7
  br label %71

71:                                               ; preds = %69, %67
  %.pn54 = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #7
  br label %212

72:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %8) #7
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %8, ptr noundef nonnull align 8 dereferenceable(56) %43)
          to label %73 unwind label %101

73:                                               ; preds = %72
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(56) %48)
          to label %74 unwind label %103

74:                                               ; preds = %73
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #7
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %9, ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 8 dereferenceable(56) %43)
          to label %75 unwind label %106

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #7
  invoke void @_ZNK7SGTELIB6Matrix16cholesky_inverseEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %76 unwind label %108

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

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

78:                                               ; preds = %77
  %79 = getelementptr inbounds i8, ptr %0, i64 1216
  %80 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %79, ptr noundef nonnull align 8 dereferenceable(56) %10)
          to label %81 unwind label %114

81:                                               ; preds = %78
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) #7
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull align 8 dereferenceable(56) %79)
          to label %82 unwind label %119

82:                                               ; preds = %81
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %83 unwind label %121

83:                                               ; preds = %82
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %13, ptr noundef nonnull align 8 dereferenceable(56) %48, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %84 unwind label %123

84:                                               ; preds = %83
  %85 = getelementptr inbounds i8, ptr %0, i64 1160
  %86 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %85, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %87 unwind label %125

87:                                               ; preds = %84
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.4, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %88 unwind label %130

88:                                               ; preds = %87
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %79, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %89 unwind label %132

89:                                               ; preds = %88
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %90 unwind label %135

90:                                               ; preds = %89
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %85, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %91 unwind label %137

91:                                               ; preds = %90
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %92 unwind label %140

92:                                               ; preds = %91
  %93 = getelementptr inbounds i8, ptr %0, i64 332
  %94 = load i32, ptr %93, align 4, !tbaa !49
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 8 dereferenceable(32) %21, i32 noundef 1, i32 noundef %94)
          to label %95 unwind label %142

95:                                               ; preds = %92
  %96 = getelementptr inbounds i8, ptr %0, i64 1272
  %97 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %96, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %98 unwind label %144

98:                                               ; preds = %95
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %23) #7
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %99 unwind label %148

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %24) #7
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24)
          to label %.preheader unwind label %150

.preheader:                                       ; preds = %99
  %100 = load i32, ptr %93, align 4, !tbaa !49
  %.not104 = icmp slt i32 %100, 1
  br i1 %.not104, label %.critedge, label %.lr.ph

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

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

105:                                              ; preds = %103, %101
  %.pn56 = phi { ptr, i32 } [ %104, %103 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #7
  br label %210

106:                                              ; preds = %74
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %209

108:                                              ; preds = %75
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %118

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

112:                                              ; preds = %77
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %116

114:                                              ; preds = %78
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #7
  br label %116

116:                                              ; preds = %114, %112
  %.pn58 = phi { ptr, i32 } [ %115, %114 ], [ %113, %112 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #7
  br label %117

117:                                              ; preds = %116, %110
  %.pn58.pn = phi { ptr, i32 } [ %.pn58, %116 ], [ %111, %110 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  br label %118

118:                                              ; preds = %117, %108
  %.pn58.pn.pn = phi { ptr, i32 } [ %.pn58.pn, %117 ], [ %109, %108 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #7
  br label %208

119:                                              ; preds = %81
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %129

121:                                              ; preds = %82
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %128

123:                                              ; preds = %83
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %127

125:                                              ; preds = %84
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #7
  br label %127

127:                                              ; preds = %125, %123
  %.pn62 = phi { ptr, i32 } [ %126, %125 ], [ %124, %123 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #7
  br label %128

128:                                              ; preds = %127, %121
  %.pn62.pn = phi { ptr, i32 } [ %.pn62, %127 ], [ %122, %121 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #7
  br label %129

129:                                              ; preds = %128, %119
  %.pn62.pn.pn = phi { ptr, i32 } [ %.pn62.pn, %128 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #7
  br label %208

130:                                              ; preds = %87
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %134

132:                                              ; preds = %88
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %134

134:                                              ; preds = %132, %130
  %.pn66 = phi { ptr, i32 } [ %133, %132 ], [ %131, %130 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #7
  br label %208

135:                                              ; preds = %89
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %139

137:                                              ; preds = %90
  %138 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %139

139:                                              ; preds = %137, %135
  %.pn68 = phi { ptr, i32 } [ %138, %137 ], [ %136, %135 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  br label %208

140:                                              ; preds = %91
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %147

142:                                              ; preds = %92
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %146

144:                                              ; preds = %95
  %145 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  br label %146

146:                                              ; preds = %144, %142
  %.pn70 = phi { ptr, i32 } [ %145, %144 ], [ %143, %142 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %147

147:                                              ; preds = %146, %140
  %.pn70.pn = phi { ptr, i32 } [ %.pn70, %146 ], [ %141, %140 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #7
  br label %208

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

150:                                              ; preds = %99
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %206

.lr.ph:                                           ; preds = %.preheader, %201
  %.0105 = phi i32 [ %202, %201 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %25) #7
  invoke void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %25, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %.0105)
          to label %152 unwind label %171

152:                                              ; preds = %.lr.ph
  %153 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(56) %25)
          to label %154 unwind label %173

154:                                              ; preds = %152
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %25) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %27) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %28) #7
  invoke void @_ZNK7SGTELIB6Matrix7get_colEi(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %28, ptr noundef nonnull align 8 dereferenceable(56) %79, i32 noundef %.0105)
          to label %155 unwind label %176

155:                                              ; preds = %154
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %27, ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull align 8 dereferenceable(56) %28)
          to label %156 unwind label %178

156:                                              ; preds = %155
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %26, ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %157 unwind label %180

157:                                              ; preds = %156
  %158 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(56) %26)
          to label %159 unwind label %182

159:                                              ; preds = %157
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %29) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %30) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %31) #7
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %31, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %160 unwind label %187

160:                                              ; preds = %159
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %30, ptr noundef nonnull align 8 dereferenceable(56) %31, ptr noundef nonnull align 8 dereferenceable(56) %48)
          to label %161 unwind label %189

161:                                              ; preds = %160
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %29, ptr noundef nonnull align 8 dereferenceable(56) %30, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %162 unwind label %191

162:                                              ; preds = %161
  %163 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 8 dereferenceable(56) %29)
          to label %164 unwind label %193

164:                                              ; preds = %162
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %30) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %30) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %29) #7
  %165 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %24, i32 noundef 0, i32 noundef 0)
  %166 = load i32, ptr %40, align 8, !tbaa !46
  %167 = sub nsw i32 %166, %34
  %168 = sitofp i32 %167 to double
  %169 = fdiv double %165, %168
  %170 = fcmp olt double %169, 0.000000e+00
  br i1 %170, label %.loopexit, label %200

171:                                              ; preds = %.lr.ph
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %175

173:                                              ; preds = %152
  %174 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #7
  br label %175

175:                                              ; preds = %173, %171
  %.pn73 = phi { ptr, i32 } [ %174, %173 ], [ %172, %171 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %25) #7
  br label %204

176:                                              ; preds = %154
  %177 = landingpad { ptr, i32 }
          cleanup
  br label %186

178:                                              ; preds = %155
  %179 = landingpad { ptr, i32 }
          cleanup
  br label %185

180:                                              ; preds = %156
  %181 = landingpad { ptr, i32 }
          cleanup
  br label %184

182:                                              ; preds = %157
  %183 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #7
  br label %184

184:                                              ; preds = %182, %180
  %.pn75 = phi { ptr, i32 } [ %183, %182 ], [ %181, %180 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #7
  br label %185

185:                                              ; preds = %184, %178
  %.pn75.pn = phi { ptr, i32 } [ %.pn75, %184 ], [ %179, %178 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #7
  br label %186

186:                                              ; preds = %185, %176
  %.pn75.pn.pn = phi { ptr, i32 } [ %.pn75.pn, %185 ], [ %177, %176 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %28) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %26) #7
  br label %204

187:                                              ; preds = %159
  %188 = landingpad { ptr, i32 }
          cleanup
  br label %197

189:                                              ; preds = %160
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %196

191:                                              ; preds = %161
  %192 = landingpad { ptr, i32 }
          cleanup
  br label %195

193:                                              ; preds = %162
  %194 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #7
  br label %195

195:                                              ; preds = %193, %191
  %.pn79 = phi { ptr, i32 } [ %194, %193 ], [ %192, %191 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %30) #7
  br label %196

196:                                              ; preds = %195, %189
  %.pn79.pn = phi { ptr, i32 } [ %.pn79, %195 ], [ %190, %189 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #7
  br label %197

197:                                              ; preds = %196, %187
  %.pn79.pn.pn = phi { ptr, i32 } [ %.pn79.pn, %196 ], [ %188, %187 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %31) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %30) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %29) #7
  br label %204

198:                                              ; preds = %200
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %204

200:                                              ; preds = %164
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %96, i32 noundef 0, i32 noundef %.0105, double noundef %169)
          to label %201 unwind label %198

201:                                              ; preds = %200
  %202 = add nuw nsw i32 %.0105, 1
  %203 = load i32, ptr %93, align 4, !tbaa !49
  %.not.not = icmp slt i32 %202, %203
  br i1 %.not.not, label %.lr.ph, label %.critedge, !llvm.loop !50

204:                                              ; preds = %198, %197, %186, %175
  %.pn83 = phi { ptr, i32 } [ %199, %198 ], [ %.pn79.pn.pn, %197 ], [ %.pn75.pn.pn, %186 ], [ %.pn73, %175 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #7
  br label %206

.critedge:                                        ; preds = %201, %.preheader
  %205 = getelementptr inbounds i8, ptr %0, i64 352
  store i8 1, ptr %205, align 8, !tbaa !52
  br label %.loopexit

.loopexit:                                        ; preds = %164, %.critedge
  %.not103 = phi i1 [ true, %.critedge ], [ false, %164 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %24) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %23) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #7
  br label %211

206:                                              ; preds = %204, %150
  %.pn83.pn = phi { ptr, i32 } [ %.pn83, %204 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %24) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #7
  br label %207

207:                                              ; preds = %206, %148
  %.pn83.pn.pn = phi { ptr, i32 } [ %.pn83.pn, %206 ], [ %149, %148 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %23) #7
  br label %208

208:                                              ; preds = %207, %147, %139, %134, %129, %118
  %.pn83.pn.pn.pn = phi { ptr, i32 } [ %.pn83.pn.pn, %207 ], [ %.pn70.pn, %147 ], [ %.pn68, %139 ], [ %.pn66, %134 ], [ %.pn62.pn.pn, %129 ], [ %.pn58.pn.pn, %118 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #7
  br label %209

209:                                              ; preds = %208, %106
  %.pn83.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn83.pn.pn.pn, %208 ], [ %107, %106 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #7
  br label %210

210:                                              ; preds = %209, %105
  %.pn83.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn83.pn.pn.pn.pn, %209 ], [ %.pn56, %105 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #7
  br label %212

211:                                              ; preds = %.loopexit, %53
  %.2 = phi i1 [ false, %53 ], [ %.not103, %.loopexit ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #7
  ret i1 %.2

212:                                              ; preds = %210, %71, %66, %61
  %.pn83.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn83.pn.pn.pn.pn.pn, %210 ], [ %.pn54, %71 ], [ %.pn52, %66 ], [ %.pn.pn, %61 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn83.pn.pn.pn.pn.pn.pn
}

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

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

; 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 void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985)) local_unnamed_addr #3

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 @_ZN7SGTELIB6Matrix4onesEii(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZNK7SGTELIB6Matrix10lu_inverseEPd(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) 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 @_ZNK7SGTELIB6Matrix16cholesky_inverseEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

declare void @_ZmiRKN7SGTELIB6MatrixES2_(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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5 align 2

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

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

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


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