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

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

%"class.std::__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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"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_RBF" = type { %"class.SGTELIB::Surrogate.base", i32, i32, i32, %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.SGTELIB::Matrix", %"class.std::__cxx11::list" }
%"class.SGTELIB::Surrogate.base" = type <{ ptr, ptr, %"class.SGTELIB::Surrogate_Parameters", i32, i32, i32, i32, i32, i32, i8, [7 x i8], ptr, ptr, ptr, ptr, %"class.std::__cxx11::list", %"class.std::map", double, %"class.std::basic_ofstream", i8 }>

@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB13Surrogate_RBF13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1304) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.SGTELIB::Matrix", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i1, align 1
  %13 = alloca i1, align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca i1, align 1
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca i1, align 1
  %18 = alloca i1, align 1
  %19 = alloca i1, align 1
  %20 = alloca %"class.SGTELIB::Matrix", align 8
  %21 = alloca %"class.SGTELIB::Matrix", align 8
  %22 = alloca %"class.SGTELIB::Matrix", align 8
  %23 = alloca %"class.SGTELIB::Matrix", align 8
  %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 double, align 8
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator", align 1
  %34 = alloca i32, align 4
  %35 = alloca %"class.std::__cxx11::basic_string", align 8
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::allocator", align 1
  %38 = alloca i32, align 4
  %39 = alloca %"class.std::__cxx11::basic_string", align 8
  %40 = alloca %"class.std::__cxx11::basic_string", align 8
  %41 = alloca %"class.std::allocator", align 1
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca %"class.SGTELIB::Matrix", align 8
  %45 = alloca %"class.SGTELIB::Matrix", align 8
  %46 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %47 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %5) #5
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %5, ptr noundef nonnull align 8 dereferenceable(985) %47)
  store ptr %5, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #5
  %48 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 2
  store i1 false, ptr %12, align 1
  store i1 false, ptr %13, align 1
  store i1 false, ptr %15, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %18, align 1
  store i1 false, ptr %19, align 1
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(312) %48)
          to label %49 unwind label %98

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

50:                                               ; preds = %49
  %51 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %52 unwind label %106

52:                                               ; preds = %50
  br i1 %51, label %59, label %53

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  store i1 true, ptr %12, align 1
  %54 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 2
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %11, ptr noundef nonnull align 8 dereferenceable(312) %54)
          to label %55 unwind label %110

55:                                               ; preds = %53
  store i1 true, ptr %13, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  store i1 true, ptr %15, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  store i1 true, ptr %17, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  store i1 true, ptr %18, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %56 unwind label %114

56:                                               ; preds = %55
  store i1 true, ptr %19, align 1
  %57 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %58 unwind label %118

58:                                               ; preds = %56
  br label %59

59:                                               ; preds = %58, %52
  %60 = phi i1 [ true, %52 ], [ %57, %58 ]
  %61 = load i1, ptr %19, align 1
  br i1 %61, label %62, label %63

62:                                               ; preds = %59
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %63

63:                                               ; preds = %62, %59
  %64 = load i1, ptr %18, align 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  br label %66

66:                                               ; preds = %65, %63
  %67 = load i1, ptr %17, align 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %69

69:                                               ; preds = %68, %66
  %70 = load i1, ptr %15, align 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %72

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

74:                                               ; preds = %72
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %75

75:                                               ; preds = %74, %72
  %76 = load i1, ptr %12, align 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %78

78:                                               ; preds = %77, %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br i1 %60, label %79, label %177

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 56, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %21) #5
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(985) %47)
          to label %80 unwind label %145

80:                                               ; preds = %79
  invoke void @_ZN7SGTELIB13Surrogate_RBF21compute_design_matrixERKNS_6MatrixEb(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %20, ptr noundef nonnull align 8 dereferenceable(1304) %47, ptr noundef nonnull align 8 dereferenceable(56) %21, i1 noundef zeroext true)
          to label %81 unwind label %149

81:                                               ; preds = %80
  %82 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 4
  %83 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %82, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %84 unwind label %153

84:                                               ; preds = %81
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #5
  %85 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 4
  invoke void @_ZNK7SGTELIB6Matrix10lu_inverseEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %22, ptr noundef nonnull align 8 dereferenceable(56) %85)
          to label %86 unwind label %159

86:                                               ; preds = %84
  %87 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 7
  %88 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %87, ptr noundef nonnull align 8 dereferenceable(56) %22)
          to label %89 unwind label %163

89:                                               ; preds = %86
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #5
  %90 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 7
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 7
  %93 = load i32, ptr %92, align 8, !tbaa !9
  invoke void @_ZN7SGTELIB6Matrix14subset_productERKS0_S2_iii(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %23, ptr noundef nonnull align 8 dereferenceable(56) %90, ptr noundef nonnull align 8 dereferenceable(56) %91, i32 noundef -1, i32 noundef %93, i32 noundef -1)
          to label %94 unwind label %168

94:                                               ; preds = %89
  %95 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 8
  %96 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %95, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %97 unwind label %172

97:                                               ; preds = %94
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #5
  br label %418

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

102:                                              ; preds = %49
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  br label %143

106:                                              ; preds = %50
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %7, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %8, align 4
  br label %142

110:                                              ; preds = %53
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %7, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %8, align 4
  br label %138

114:                                              ; preds = %55
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %7, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %8, align 4
  br label %125

118:                                              ; preds = %56
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %7, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %8, align 4
  %122 = load i1, ptr %19, align 1
  br i1 %122, label %123, label %124

123:                                              ; preds = %118
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %124

124:                                              ; preds = %123, %118
  br label %125

125:                                              ; preds = %124, %114
  %126 = load i1, ptr %18, align 1
  br i1 %126, label %127, label %128

127:                                              ; preds = %125
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  br label %128

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

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

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

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

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

136:                                              ; preds = %134
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %137

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

138:                                              ; preds = %137, %110
  %139 = load i1, ptr %12, align 1
  br i1 %139, label %140, label %141

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %141

141:                                              ; preds = %140, %138
  br label %142

142:                                              ; preds = %141, %106
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %143

143:                                              ; preds = %142, %102
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %144

144:                                              ; preds = %143, %98
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #5
  br label %431

145:                                              ; preds = %79
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %7, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %8, align 4
  br label %158

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

153:                                              ; preds = %81
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %7, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  br label %157

157:                                              ; preds = %153, %149
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #5
  br label %158

158:                                              ; preds = %157, %145
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #5
  br label %431

159:                                              ; preds = %84
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %7, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %8, align 4
  br label %167

163:                                              ; preds = %86
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %7, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  br label %167

167:                                              ; preds = %163, %159
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #5
  br label %431

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

172:                                              ; preds = %94
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %7, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #5
  br label %176

176:                                              ; preds = %172, %168
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #5
  br label %431

177:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 56, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %25) #5
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %25, ptr noundef nonnull align 8 dereferenceable(985) %47)
          to label %178 unwind label %212

178:                                              ; preds = %177
  invoke void @_ZN7SGTELIB13Surrogate_RBF21compute_design_matrixERKNS_6MatrixEb(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %24, ptr noundef nonnull align 8 dereferenceable(1304) %47, ptr noundef nonnull align 8 dereferenceable(56) %25, i1 noundef zeroext false)
          to label %179 unwind label %216

179:                                              ; preds = %178
  %180 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 4
  %181 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %180, ptr noundef nonnull align 8 dereferenceable(56) %24)
          to label %182 unwind label %220

182:                                              ; preds = %179
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %26) #5
  %183 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 4
  %184 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 4
  invoke void @_ZN7SGTELIB6Matrix18transposeA_productERKS0_S2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %26, ptr noundef nonnull align 8 dereferenceable(56) %183, ptr noundef nonnull align 8 dereferenceable(56) %184)
          to label %185 unwind label %226

185:                                              ; preds = %182
  %186 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 5
  %187 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %186, ptr noundef nonnull align 8 dereferenceable(56) %26)
          to label %188 unwind label %230

188:                                              ; preds = %185
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %27) #5
  %189 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 56, ptr %28) #5
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %28, ptr noundef nonnull align 8 dereferenceable(985) %47)
          to label %190 unwind label %235

190:                                              ; preds = %188
  invoke void @_ZN7SGTELIB6Matrix18transposeA_productERKS0_S2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %27, ptr noundef nonnull align 8 dereferenceable(56) %189, ptr noundef nonnull align 8 dereferenceable(56) %28)
          to label %191 unwind label %239

191:                                              ; preds = %190
  %192 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 6
  %193 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %192, ptr noundef nonnull align 8 dereferenceable(56) %27)
          to label %194 unwind label %243

194:                                              ; preds = %191
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %29) #5
  %195 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 5
  invoke void @_ZN7SGTELIB6MatrixC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(56) %195)
          to label %196 unwind label %249

196:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %197 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 2
  %198 = invoke noundef double @_ZNK7SGTELIB20Surrogate_Parameters9get_ridgeEv(ptr noundef nonnull align 8 dereferenceable(312) %197)
          to label %199 unwind label %253

199:                                              ; preds = %196
  store double %198, ptr %30, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #5
  %200 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 2
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %31, ptr noundef nonnull align 8 dereferenceable(312) %200)
          to label %201 unwind label %257

201:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %202 unwind label %261

202:                                              ; preds = %201
  %203 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %204 unwind label %265

204:                                              ; preds = %202
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #5
  br i1 %203, label %205, label %284

205:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  store i32 0, ptr %34, align 4, !tbaa !48
  br label %206

206:                                              ; preds = %276, %205
  %207 = load i32, ptr %34, align 4, !tbaa !48
  %208 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 1
  %209 = load i32, ptr %208, align 4, !tbaa !49
  %210 = icmp slt i32 %207, %209
  br i1 %210, label %271, label %211

211:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %283

212:                                              ; preds = %177
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %7, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %8, align 4
  br label %225

216:                                              ; preds = %178
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %7, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %8, align 4
  br label %224

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

224:                                              ; preds = %220, %216
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #5
  br label %225

225:                                              ; preds = %224, %212
  call void @llvm.lifetime.end.p0(i64 56, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #5
  br label %431

226:                                              ; preds = %182
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %7, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %8, align 4
  br label %234

230:                                              ; preds = %185
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %7, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #5
  br label %234

234:                                              ; preds = %230, %226
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #5
  br label %431

235:                                              ; preds = %188
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %7, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %8, align 4
  br label %248

239:                                              ; preds = %190
  %240 = landingpad { ptr, i32 }
          cleanup
  %241 = extractvalue { ptr, i32 } %240, 0
  store ptr %241, ptr %7, align 8
  %242 = extractvalue { ptr, i32 } %240, 1
  store i32 %242, ptr %8, align 4
  br label %247

243:                                              ; preds = %191
  %244 = landingpad { ptr, i32 }
          cleanup
  %245 = extractvalue { ptr, i32 } %244, 0
  store ptr %245, ptr %7, align 8
  %246 = extractvalue { ptr, i32 } %244, 1
  store i32 %246, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #5
  br label %247

247:                                              ; preds = %243, %239
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  br label %248

248:                                              ; preds = %247, %235
  call void @llvm.lifetime.end.p0(i64 56, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #5
  br label %431

249:                                              ; preds = %194
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %7, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %8, align 4
  br label %417

253:                                              ; preds = %196
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %7, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %8, align 4
  br label %416

257:                                              ; preds = %199
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %7, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %8, align 4
  br label %270

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

265:                                              ; preds = %202
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %7, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #5
  br label %269

269:                                              ; preds = %265, %261
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  br label %270

270:                                              ; preds = %269, %257
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #5
  br label %416

271:                                              ; preds = %206
  %272 = load i32, ptr %34, align 4, !tbaa !48
  %273 = load i32, ptr %34, align 4, !tbaa !48
  %274 = load double, ptr %30, align 8, !tbaa !47
  invoke void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %29, i32 noundef %272, i32 noundef %273, double noundef %274)
          to label %275 unwind label %279

275:                                              ; preds = %271
  br label %276

276:                                              ; preds = %275
  %277 = load i32, ptr %34, align 4, !tbaa !48
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %34, align 4, !tbaa !48
  br label %206, !llvm.loop !51

279:                                              ; preds = %271
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %7, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %416

283:                                              ; preds = %211
  br label %387

284:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #5
  %285 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 2
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %35, ptr noundef nonnull align 8 dereferenceable(312) %285)
          to label %286 unwind label %298

286:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %287 unwind label %302

287:                                              ; preds = %286
  %288 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %289 unwind label %306

289:                                              ; preds = %287
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #5
  br i1 %288, label %290, label %325

290:                                              ; preds = %289
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  store i32 0, ptr %38, align 4, !tbaa !48
  br label %291

291:                                              ; preds = %317, %290
  %292 = load i32, ptr %38, align 4, !tbaa !48
  %293 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 1
  %294 = load i32, ptr %293, align 4, !tbaa !49
  %295 = sub nsw i32 %294, 1
  %296 = icmp slt i32 %292, %295
  br i1 %296, label %312, label %297

297:                                              ; preds = %291
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %324

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

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

306:                                              ; preds = %287
  %307 = landingpad { ptr, i32 }
          cleanup
  %308 = extractvalue { ptr, i32 } %307, 0
  store ptr %308, ptr %7, align 8
  %309 = extractvalue { ptr, i32 } %307, 1
  store i32 %309, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #5
  br label %310

310:                                              ; preds = %306, %302
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %35) #5
  br label %311

311:                                              ; preds = %310, %298
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #5
  br label %416

312:                                              ; preds = %291
  %313 = load i32, ptr %38, align 4, !tbaa !48
  %314 = load i32, ptr %38, align 4, !tbaa !48
  %315 = load double, ptr %30, align 8, !tbaa !47
  invoke void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %29, i32 noundef %313, i32 noundef %314, double noundef %315)
          to label %316 unwind label %320

316:                                              ; preds = %312
  br label %317

317:                                              ; preds = %316
  %318 = load i32, ptr %38, align 4, !tbaa !48
  %319 = add nsw i32 %318, 1
  store i32 %319, ptr %38, align 4, !tbaa !48
  br label %291, !llvm.loop !53

320:                                              ; preds = %312
  %321 = landingpad { ptr, i32 }
          cleanup
  %322 = extractvalue { ptr, i32 } %321, 0
  store ptr %322, ptr %7, align 8
  %323 = extractvalue { ptr, i32 } %321, 1
  store i32 %323, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  br label %416

324:                                              ; preds = %297
  br label %386

325:                                              ; preds = %289
  call void @llvm.lifetime.start.p0(i64 32, ptr %39) #5
  %326 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 2
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %39, ptr noundef nonnull align 8 dereferenceable(312) %326)
          to label %327 unwind label %338

327:                                              ; preds = %325
  call void @llvm.lifetime.start.p0(i64 32, ptr %40) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %41) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %40, ptr noundef @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %41)
          to label %328 unwind label %342

328:                                              ; preds = %327
  %329 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef nonnull align 8 dereferenceable(32) %40)
          to label %330 unwind label %346

330:                                              ; preds = %328
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #5
  br i1 %329, label %331, label %365

331:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #5
  store i32 0, ptr %42, align 4, !tbaa !48
  br label %332

332:                                              ; preds = %357, %331
  %333 = load i32, ptr %42, align 4, !tbaa !48
  %334 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 2
  %335 = load i32, ptr %334, align 8, !tbaa !54
  %336 = icmp slt i32 %333, %335
  br i1 %336, label %352, label %337

337:                                              ; preds = %332
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #5
  br label %364

338:                                              ; preds = %325
  %339 = landingpad { ptr, i32 }
          cleanup
  %340 = extractvalue { ptr, i32 } %339, 0
  store ptr %340, ptr %7, align 8
  %341 = extractvalue { ptr, i32 } %339, 1
  store i32 %341, ptr %8, align 4
  br label %351

342:                                              ; preds = %327
  %343 = landingpad { ptr, i32 }
          cleanup
  %344 = extractvalue { ptr, i32 } %343, 0
  store ptr %344, ptr %7, align 8
  %345 = extractvalue { ptr, i32 } %343, 1
  store i32 %345, ptr %8, align 4
  br label %350

346:                                              ; preds = %328
  %347 = landingpad { ptr, i32 }
          cleanup
  %348 = extractvalue { ptr, i32 } %347, 0
  store ptr %348, ptr %7, align 8
  %349 = extractvalue { ptr, i32 } %347, 1
  store i32 %349, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %40) #5
  br label %350

350:                                              ; preds = %346, %342
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %41) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %41) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #5
  br label %351

351:                                              ; preds = %350, %338
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #5
  br label %416

352:                                              ; preds = %332
  %353 = load i32, ptr %42, align 4, !tbaa !48
  %354 = load i32, ptr %42, align 4, !tbaa !48
  %355 = load double, ptr %30, align 8, !tbaa !47
  invoke void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %29, i32 noundef %353, i32 noundef %354, double noundef %355)
          to label %356 unwind label %360

356:                                              ; preds = %352
  br label %357

357:                                              ; preds = %356
  %358 = load i32, ptr %42, align 4, !tbaa !48
  %359 = add nsw i32 %358, 1
  store i32 %359, ptr %42, align 4, !tbaa !48
  br label %332, !llvm.loop !55

360:                                              ; preds = %352
  %361 = landingpad { ptr, i32 }
          cleanup
  %362 = extractvalue { ptr, i32 } %361, 0
  store ptr %362, ptr %7, align 8
  %363 = extractvalue { ptr, i32 } %361, 1
  store i32 %363, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #5
  br label %416

364:                                              ; preds = %337
  br label %385

365:                                              ; preds = %330
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #5
  store i32 0, ptr %43, align 4, !tbaa !48
  br label %366

366:                                              ; preds = %377, %365
  %367 = load i32, ptr %43, align 4, !tbaa !48
  %368 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 2
  %369 = load i32, ptr %368, align 8, !tbaa !54
  %370 = icmp slt i32 %367, %369
  br i1 %370, label %372, label %371

371:                                              ; preds = %366
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #5
  br label %384

372:                                              ; preds = %366
  %373 = load i32, ptr %43, align 4, !tbaa !48
  %374 = load i32, ptr %43, align 4, !tbaa !48
  %375 = load double, ptr %30, align 8, !tbaa !47
  invoke void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %29, i32 noundef %373, i32 noundef %374, double noundef %375)
          to label %376 unwind label %380

376:                                              ; preds = %372
  br label %377

377:                                              ; preds = %376
  %378 = load i32, ptr %43, align 4, !tbaa !48
  %379 = add nsw i32 %378, 1
  store i32 %379, ptr %43, align 4, !tbaa !48
  br label %366, !llvm.loop !56

380:                                              ; preds = %372
  %381 = landingpad { ptr, i32 }
          cleanup
  %382 = extractvalue { ptr, i32 } %381, 0
  store ptr %382, ptr %7, align 8
  %383 = extractvalue { ptr, i32 } %381, 1
  store i32 %383, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #5
  br label %416

384:                                              ; preds = %371
  br label %385

385:                                              ; preds = %384, %364
  br label %386

386:                                              ; preds = %385, %324
  br label %387

387:                                              ; preds = %386, %283
  call void @llvm.lifetime.start.p0(i64 56, ptr %44) #5
  invoke void @_ZNK7SGTELIB6Matrix16cholesky_inverseEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %44, ptr noundef nonnull align 8 dereferenceable(56) %29)
          to label %388 unwind label %398

388:                                              ; preds = %387
  %389 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 7
  %390 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %389, ptr noundef nonnull align 8 dereferenceable(56) %44)
          to label %391 unwind label %402

391:                                              ; preds = %388
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %44) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %44) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %45) #5
  %392 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 7
  %393 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 6
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %45, ptr noundef nonnull align 8 dereferenceable(56) %392, ptr noundef nonnull align 8 dereferenceable(56) %393)
          to label %394 unwind label %407

394:                                              ; preds = %391
  %395 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 8
  %396 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %395, ptr noundef nonnull align 8 dereferenceable(56) %45)
          to label %397 unwind label %411

397:                                              ; preds = %394
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %45) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #5
  br label %418

398:                                              ; preds = %387
  %399 = landingpad { ptr, i32 }
          cleanup
  %400 = extractvalue { ptr, i32 } %399, 0
  store ptr %400, ptr %7, align 8
  %401 = extractvalue { ptr, i32 } %399, 1
  store i32 %401, ptr %8, align 4
  br label %406

402:                                              ; preds = %388
  %403 = landingpad { ptr, i32 }
          cleanup
  %404 = extractvalue { ptr, i32 } %403, 0
  store ptr %404, ptr %7, align 8
  %405 = extractvalue { ptr, i32 } %403, 1
  store i32 %405, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %44) #5
  br label %406

406:                                              ; preds = %402, %398
  call void @llvm.lifetime.end.p0(i64 56, ptr %44) #5
  br label %416

407:                                              ; preds = %391
  %408 = landingpad { ptr, i32 }
          cleanup
  %409 = extractvalue { ptr, i32 } %408, 0
  store ptr %409, ptr %7, align 8
  %410 = extractvalue { ptr, i32 } %408, 1
  store i32 %410, ptr %8, align 4
  br label %415

411:                                              ; preds = %394
  %412 = landingpad { ptr, i32 }
          cleanup
  %413 = extractvalue { ptr, i32 } %412, 0
  store ptr %413, ptr %7, align 8
  %414 = extractvalue { ptr, i32 } %412, 1
  store i32 %414, ptr %8, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %45) #5
  br label %415

415:                                              ; preds = %411, %407
  call void @llvm.lifetime.end.p0(i64 56, ptr %45) #5
  br label %416

416:                                              ; preds = %415, %406, %380, %360, %351, %320, %311, %279, %270, %253
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #5
  br label %417

417:                                              ; preds = %416, %249
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #5
  br label %431

418:                                              ; preds = %397, %97
  %419 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %47, i32 0, i32 8
  %420 = invoke noundef zeroext i1 @_ZNK7SGTELIB6Matrix7has_nanEv(ptr noundef nonnull align 8 dereferenceable(56) %419)
          to label %421 unwind label %423

421:                                              ; preds = %418
  br i1 %420, label %422, label %427

422:                                              ; preds = %421
  store i1 false, ptr %2, align 1
  store i32 1, ptr %46, align 4
  br label %429

423:                                              ; preds = %418
  %424 = landingpad { ptr, i32 }
          cleanup
  %425 = extractvalue { ptr, i32 } %424, 0
  store ptr %425, ptr %7, align 8
  %426 = extractvalue { ptr, i32 } %424, 1
  store i32 %426, ptr %8, align 4
  br label %431

427:                                              ; preds = %421
  %428 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %47, i32 0, i32 9
  store i8 1, ptr %428, align 8, !tbaa !57
  store i1 true, ptr %2, align 1
  store i32 1, ptr %46, align 4
  br label %429

429:                                              ; preds = %427, %422
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %430 = load i1, ptr %2, align 1
  ret i1 %430

431:                                              ; preds = %423, %417, %248, %234, %225, %176, %167, %158, %144
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %432

432:                                              ; preds = %431
  %433 = load ptr, ptr %7, align 8
  %434 = load i32, ptr %8, align 4
  %435 = insertvalue { ptr, i32 } poison, ptr %433, 0
  %436 = insertvalue { ptr, i32 } %435, i32 %434, 1
  resume { ptr, i32 } %436
}

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

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

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

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

declare void @_ZN7SGTELIB6Matrix14subset_productERKS0_S2_iii(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), i32 noundef, i32 noundef, i32 noundef) #4

declare void @_ZN7SGTELIB6Matrix18transposeA_productERKS0_S2_(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)) #4

declare void @_ZN7SGTELIB6MatrixC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4

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

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

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)) #4

declare noundef zeroext i1 @_ZNK7SGTELIB6Matrix7has_nanEv(ptr noundef nonnull align 8 dereferenceable(56)) #4

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 344}
!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 = !{!16, !16, i64 0}
!48 = !{!13, !13, i64 0}
!49 = !{!50, !13, i64 988}
!50 = !{!"_ZTSN7SGTELIB13Surrogate_RBFE", !10, i64 0, !13, i64 988, !13, i64 992, !13, i64 996, !18, i64 1000, !18, i64 1056, !18, i64 1112, !18, i64 1168, !18, i64 1224, !26, i64 1280}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.mustprogress"}
!53 = distinct !{!53, !52}
!54 = !{!50, !13, i64 992}
!55 = distinct !{!55, !52}
!56 = distinct !{!56, !52}
!57 = !{!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.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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::allocator" = type { i8 }

@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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 #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB13Surrogate_RBF13build_privateEv(ptr noundef nonnull align 8 dereferenceable(1304) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.SGTELIB::Matrix", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %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.SGTELIB::Matrix", align 8
  %17 = alloca %"class.SGTELIB::Matrix", align 8
  %18 = alloca %"class.SGTELIB::Matrix", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator", align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca %"class.SGTELIB::Matrix", align 8
  %29 = alloca %"class.SGTELIB::Matrix", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #5
  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 32, ptr nonnull %3) #5
  %30 = getelementptr inbounds i8, ptr %0, i64 16
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(312) %30)
          to label %31 unwind label %55

31:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %32 unwind label %57

32:                                               ; preds = %31
  %33 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %34 unwind label %59

34:                                               ; preds = %32
  br i1 %33, label %.critedge113, label %35

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(312) %30)
          to label %36 unwind label %61

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

37:                                               ; preds = %36
  %38 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %.critedge unwind label %65

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

.critedge113:                                     ; preds = %34
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %39

39:                                               ; preds = %.critedge113, %.critedge
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #5
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %10, ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %40 unwind label %72

40:                                               ; preds = %39
  invoke void @_ZN7SGTELIB13Surrogate_RBF21compute_design_matrixERKNS_6MatrixEb(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %9, ptr noundef nonnull align 8 dereferenceable(1304) %0, ptr noundef nonnull align 8 dereferenceable(56) %10, i1 noundef zeroext true)
          to label %41 unwind label %74

41:                                               ; preds = %40
  %42 = getelementptr inbounds i8, ptr %0, i64 1000
  %43 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %42, ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %44 unwind label %76

44:                                               ; preds = %41
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %11) #5
  invoke void @_ZNK7SGTELIB6Matrix10lu_inverseEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %11, ptr noundef nonnull align 8 dereferenceable(56) %42)
          to label %45 unwind label %80

45:                                               ; preds = %44
  %46 = getelementptr inbounds i8, ptr %0, i64 1168
  %47 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(56) %11)
          to label %48 unwind label %82

48:                                               ; preds = %45
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #5
  %49 = getelementptr inbounds i8, ptr %0, i64 344
  %50 = load i32, ptr %49, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB6Matrix14subset_productERKS0_S2_iii(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef -1, i32 noundef %50, i32 noundef -1)
          to label %51 unwind label %85

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %0, i64 1224
  %53 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %52, ptr noundef nonnull align 8 dereferenceable(56) %12)
          to label %54 unwind label %87

54:                                               ; preds = %51
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #5
  br label %210

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

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

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

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

63:                                               ; preds = %36
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %67

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

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

68:                                               ; preds = %61, %67
  %.pn.pn = phi { ptr, i32 } [ %.pn, %67 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %69

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

70:                                               ; preds = %69, %57
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %69 ], [ %58, %57 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #5
  br label %71

71:                                               ; preds = %70, %55
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %70 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #5
  br label %219

72:                                               ; preds = %39
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %79

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

76:                                               ; preds = %41
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  br label %78

78:                                               ; preds = %76, %74
  %.pn100 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  br label %79

79:                                               ; preds = %78, %72
  %.pn100.pn = phi { ptr, i32 } [ %.pn100, %78 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #5
  br label %219

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

82:                                               ; preds = %45
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  br label %84

84:                                               ; preds = %82, %80
  %.pn103 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #5
  br label %219

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

87:                                               ; preds = %51
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #5
  br label %89

89:                                               ; preds = %87, %85
  %.pn105 = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #5
  br label %219

90:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #5
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %91 unwind label %114

91:                                               ; preds = %90
  invoke void @_ZN7SGTELIB13Surrogate_RBF21compute_design_matrixERKNS_6MatrixEb(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %13, ptr noundef nonnull align 8 dereferenceable(1304) %0, ptr noundef nonnull align 8 dereferenceable(56) %14, i1 noundef zeroext false)
          to label %92 unwind label %116

92:                                               ; preds = %91
  %93 = getelementptr inbounds i8, ptr %0, i64 1000
  %94 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %93, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %95 unwind label %118

95:                                               ; preds = %92
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) #5
  invoke void @_ZN7SGTELIB6Matrix18transposeA_productERKS0_S2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %93, ptr noundef nonnull align 8 dereferenceable(56) %93)
          to label %96 unwind label %122

96:                                               ; preds = %95
  %97 = getelementptr inbounds i8, ptr %0, i64 1056
  %98 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %97, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %99 unwind label %124

99:                                               ; preds = %96
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %17) #5
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %17, ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %100 unwind label %127

100:                                              ; preds = %99
  invoke void @_ZN7SGTELIB6Matrix18transposeA_productERKS0_S2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(56) %93, ptr noundef nonnull align 8 dereferenceable(56) %17)
          to label %101 unwind label %129

101:                                              ; preds = %100
  %102 = getelementptr inbounds i8, ptr %0, i64 1112
  %103 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %102, ptr noundef nonnull align 8 dereferenceable(56) %16)
          to label %104 unwind label %131

104:                                              ; preds = %101
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %18) #5
  invoke void @_ZN7SGTELIB6MatrixC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %97)
          to label %105 unwind label %135

105:                                              ; preds = %104
  %106 = call noundef double @_ZNK7SGTELIB20Surrogate_Parameters9get_ridgeEv(ptr noundef nonnull align 8 dereferenceable(312) %30)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #5
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(312) %30)
          to label %107 unwind label %137

107:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %108 unwind label %139

108:                                              ; preds = %107
  %109 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %110 unwind label %141

110:                                              ; preds = %108
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #5
  br i1 %109, label %.preheader, label %148

.preheader:                                       ; preds = %110
  %111 = getelementptr inbounds i8, ptr %0, i64 988
  %112 = load i32, ptr %111, align 4, !tbaa !46
  %113 = icmp sgt i32 %112, 0
  br i1 %113, label %.lr.ph126, label %.loopexit

114:                                              ; preds = %90
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %121

116:                                              ; preds = %91
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %120

118:                                              ; preds = %92
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  br label %120

120:                                              ; preds = %118, %116
  %.pn77 = phi { ptr, i32 } [ %119, %118 ], [ %117, %116 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  br label %121

121:                                              ; preds = %120, %114
  %.pn77.pn = phi { ptr, i32 } [ %.pn77, %120 ], [ %115, %114 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #5
  br label %219

122:                                              ; preds = %95
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %126

124:                                              ; preds = %96
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  br label %126

126:                                              ; preds = %124, %122
  %.pn80 = phi { ptr, i32 } [ %125, %124 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #5
  br label %219

127:                                              ; preds = %99
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %134

129:                                              ; preds = %100
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %133

131:                                              ; preds = %101
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #5
  br label %133

133:                                              ; preds = %131, %129
  %.pn82 = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #5
  br label %134

134:                                              ; preds = %133, %127
  %.pn82.pn = phi { ptr, i32 } [ %.pn82, %133 ], [ %128, %127 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #5
  br label %219

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

137:                                              ; preds = %105
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %144

139:                                              ; preds = %107
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %143

141:                                              ; preds = %108
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  br label %143

143:                                              ; preds = %141, %139
  %.pn85 = phi { ptr, i32 } [ %142, %141 ], [ %140, %139 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %144

144:                                              ; preds = %143, %137
  %.pn85.pn = phi { ptr, i32 } [ %.pn85, %143 ], [ %138, %137 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #5
  br label %208

.lr.ph126:                                        ; preds = %.preheader, %.lr.ph126
  %.038125 = phi i32 [ %145, %.lr.ph126 ], [ 0, %.preheader ]
  call void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %18, i32 noundef %.038125, i32 noundef %.038125, double noundef %106)
  %145 = add nuw nsw i32 %.038125, 1
  %146 = load i32, ptr %111, align 4, !tbaa !46
  %147 = icmp slt i32 %145, %146
  br i1 %147, label %.lr.ph126, label %.loopexit, !llvm.loop !48

148:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #5
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %22, ptr noundef nonnull align 8 dereferenceable(312) %30)
          to label %149 unwind label %156

149:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %23) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %24) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull @.str.20, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %150 unwind label %158

150:                                              ; preds = %149
  %151 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %152 unwind label %160

152:                                              ; preds = %150
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #5
  br i1 %151, label %.preheader114, label %168

.preheader114:                                    ; preds = %152
  %153 = getelementptr inbounds i8, ptr %0, i64 988
  %154 = load i32, ptr %153, align 4, !tbaa !46
  %155 = icmp sgt i32 %154, 1
  br i1 %155, label %.lr.ph124, label %.loopexit

156:                                              ; preds = %148
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %163

158:                                              ; preds = %149
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %162

160:                                              ; preds = %150
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  br label %162

162:                                              ; preds = %160, %158
  %.pn88 = phi { ptr, i32 } [ %161, %160 ], [ %159, %158 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %24) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  br label %163

163:                                              ; preds = %162, %156
  %.pn88.pn = phi { ptr, i32 } [ %.pn88, %162 ], [ %157, %156 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #5
  br label %208

.lr.ph124:                                        ; preds = %.preheader114, %.lr.ph124
  %.037123 = phi i32 [ %164, %.lr.ph124 ], [ 0, %.preheader114 ]
  call void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %18, i32 noundef %.037123, i32 noundef %.037123, double noundef %106)
  %164 = add nuw nsw i32 %.037123, 1
  %165 = load i32, ptr %153, align 4, !tbaa !46
  %166 = add nsw i32 %165, -1
  %167 = icmp slt i32 %164, %166
  br i1 %167, label %.lr.ph124, label %.loopexit, !llvm.loop !50

168:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %25) #5
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %25, ptr noundef nonnull align 8 dereferenceable(312) %30)
          to label %169 unwind label %176

169:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %26) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %27) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %170 unwind label %178

170:                                              ; preds = %169
  %171 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %172 unwind label %180

172:                                              ; preds = %170
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #5
  %173 = getelementptr inbounds i8, ptr %0, i64 992
  %174 = load i32, ptr %173, align 8, !tbaa !51
  %175 = icmp sgt i32 %174, 0
  br i1 %171, label %.preheader116, label %.preheader118

.preheader118:                                    ; preds = %172
  br i1 %175, label %.lr.ph, label %.loopexit

.preheader116:                                    ; preds = %172
  br i1 %175, label %.lr.ph122, label %.loopexit

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

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

180:                                              ; preds = %170
  %181 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #5
  br label %182

182:                                              ; preds = %180, %178
  %.pn91 = phi { ptr, i32 } [ %181, %180 ], [ %179, %178 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  br label %183

183:                                              ; preds = %182, %176
  %.pn91.pn = phi { ptr, i32 } [ %.pn91, %182 ], [ %177, %176 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #5
  br label %208

.lr.ph122:                                        ; preds = %.preheader116, %.lr.ph122
  %.036121 = phi i32 [ %184, %.lr.ph122 ], [ 0, %.preheader116 ]
  call void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %18, i32 noundef %.036121, i32 noundef %.036121, double noundef %106)
  %184 = add nuw nsw i32 %.036121, 1
  %185 = load i32, ptr %173, align 8, !tbaa !51
  %186 = icmp slt i32 %184, %185
  br i1 %186, label %.lr.ph122, label %.loopexit, !llvm.loop !52

.lr.ph:                                           ; preds = %.preheader118, %.lr.ph
  %.0120 = phi i32 [ %187, %.lr.ph ], [ 0, %.preheader118 ]
  call void @_ZN7SGTELIB6Matrix3addEiid(ptr noundef nonnull align 8 dereferenceable(56) %18, i32 noundef %.0120, i32 noundef %.0120, double noundef %106)
  %187 = add nuw nsw i32 %.0120, 1
  %188 = load i32, ptr %173, align 8, !tbaa !51
  %189 = icmp slt i32 %187, %188
  br i1 %189, label %.lr.ph, label %.loopexit, !llvm.loop !53

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph122, %.lr.ph124, %.lr.ph126, %.preheader118, %.preheader116, %.preheader114, %.preheader
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %28) #5
  invoke void @_ZNK7SGTELIB6Matrix16cholesky_inverseEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %28, ptr noundef nonnull align 8 dereferenceable(56) %18)
          to label %190 unwind label %198

190:                                              ; preds = %.loopexit
  %191 = getelementptr inbounds i8, ptr %0, i64 1168
  %192 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %191, ptr noundef nonnull align 8 dereferenceable(56) %28)
          to label %193 unwind label %200

193:                                              ; preds = %190
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %28) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %29) #5
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %29, ptr noundef nonnull align 8 dereferenceable(56) %191, ptr noundef nonnull align 8 dereferenceable(56) %102)
          to label %194 unwind label %203

194:                                              ; preds = %193
  %195 = getelementptr inbounds i8, ptr %0, i64 1224
  %196 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %195, ptr noundef nonnull align 8 dereferenceable(56) %29)
          to label %197 unwind label %205

197:                                              ; preds = %194
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %29) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %18) #5
  br label %210

198:                                              ; preds = %.loopexit
  %199 = landingpad { ptr, i32 }
          cleanup
  br label %202

200:                                              ; preds = %190
  %201 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  br label %202

202:                                              ; preds = %200, %198
  %.pn94 = phi { ptr, i32 } [ %201, %200 ], [ %199, %198 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %28) #5
  br label %208

203:                                              ; preds = %193
  %204 = landingpad { ptr, i32 }
          cleanup
  br label %207

205:                                              ; preds = %194
  %206 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #5
  br label %207

207:                                              ; preds = %205, %203
  %.pn96 = phi { ptr, i32 } [ %206, %205 ], [ %204, %203 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %29) #5
  br label %208

208:                                              ; preds = %207, %202, %183, %163, %144
  %.pn96.pn = phi { ptr, i32 } [ %.pn96, %207 ], [ %.pn94, %202 ], [ %.pn91.pn, %183 ], [ %.pn88.pn, %163 ], [ %.pn85.pn, %144 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  br label %209

209:                                              ; preds = %208, %135
  %.pn96.pn.pn = phi { ptr, i32 } [ %.pn96.pn, %208 ], [ %136, %135 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %18) #5
  br label %219

210:                                              ; preds = %197, %54
  %211 = getelementptr inbounds i8, ptr %0, i64 1224
  %212 = invoke noundef zeroext i1 @_ZNK7SGTELIB6Matrix7has_nanEv(ptr noundef nonnull align 8 dereferenceable(56) %211)
          to label %213 unwind label %214

213:                                              ; preds = %210
  br i1 %212, label %218, label %216

214:                                              ; preds = %210
  %215 = landingpad { ptr, i32 }
          cleanup
  br label %219

216:                                              ; preds = %213
  %217 = getelementptr inbounds i8, ptr %0, i64 352
  store i8 1, ptr %217, align 8, !tbaa !54
  br label %218

218:                                              ; preds = %213, %216
  %.039 = xor i1 %212, true
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  ret i1 %.039

219:                                              ; preds = %214, %209, %134, %126, %121, %89, %84, %79, %71
  %.pn107 = phi { ptr, i32 } [ %215, %214 ], [ %.pn105, %89 ], [ %.pn103, %84 ], [ %.pn100.pn, %79 ], [ %.pn96.pn.pn, %209 ], [ %.pn82.pn, %134 ], [ %.pn80, %126 ], [ %.pn77.pn, %121 ], [ %.pn.pn.pn.pn.pn, %71 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn107
}

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 #4

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

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

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

declare void @_ZN7SGTELIB6Matrix14subset_productERKS0_S2_iii(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), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

declare void @_ZN7SGTELIB6Matrix18transposeA_productERKS0_S2_(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 #4

declare void @_ZN7SGTELIB6MatrixC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #4

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

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 #4

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 #4

declare noundef zeroext i1 @_ZNK7SGTELIB6Matrix7has_nanEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4

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

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

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


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