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

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

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

@.str.6 = external hidden unnamed_addr constant [96 x i8], align 1
@__FUNCTION__._ZN7SGTELIB17Surrogate_Kriging17compute_cv_valuesEv = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB17Surrogate_Kriging17compute_cv_valuesEv(ptr noundef nonnull align 8 dereferenceable(1336) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca i32, align 4
  %11 = alloca ptr, 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.SGTELIB::Matrix", align 8
  %20 = alloca %"class.SGTELIB::Matrix", align 8
  %21 = alloca %"class.SGTELIB::Matrix", align 8
  %22 = alloca %"class.SGTELIB::Matrix", align 8
  %23 = alloca %"class.SGTELIB::Matrix", align 8
  %24 = alloca %"class.SGTELIB::Matrix", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca i1, align 1
  %30 = alloca double, align 8
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  %36 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %37 unwind label %48

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

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 283, ptr %10, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985) %36, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %39 unwind label %56

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #9
  %40 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %62

43:                                               ; preds = %39
  %44 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 14
  %45 = load ptr, ptr %44, align 8, !tbaa !48
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %62

47:                                               ; preds = %43
  store i1 true, ptr %2, align 1
  br label %280

48:                                               ; preds = %1
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %7, align 4
  br label %61

52:                                               ; preds = %37
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  br label %60

56:                                               ; preds = %38
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #9
  br label %60

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

61:                                               ; preds = %60, %48
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #9
  br label %282

62:                                               ; preds = %43, %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #9
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(985) %36)
  store ptr %12, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #9
  %63 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %36, i32 0, i32 2
  %64 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %36, i32 0, i32 3
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %13, ptr noundef nonnull align 8 dereferenceable(56) %63, ptr noundef nonnull align 8 dereferenceable(56) %64)
          to label %65 unwind label %102

65:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #9
  %66 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %36, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #9
  %67 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %36, i32 0, i32 3
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %19, ptr noundef nonnull align 8 dereferenceable(56) %67)
          to label %68 unwind label %106

68:                                               ; preds = %65
  %69 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %36, i32 0, i32 2
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %18, ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef nonnull align 8 dereferenceable(56) %69)
          to label %70 unwind label %110

70:                                               ; preds = %68
  %71 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %36, i32 0, i32 3
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %17, ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %71)
          to label %72 unwind label %114

72:                                               ; preds = %70
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 8 dereferenceable(56) %17)
          to label %73 unwind label %118

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

74:                                               ; preds = %73
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %75 unwind label %126

75:                                               ; preds = %74
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(56) %66, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %76 unwind label %130

76:                                               ; preds = %75
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %21) #9
  invoke void @_ZNK7SGTELIB6Matrix12diag_inverseEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %77 unwind label %140

77:                                               ; preds = %76
  %78 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %79 = load ptr, ptr %78, align 8, !tbaa !11
  %80 = icmp ne ptr %79, null
  br i1 %80, label %180, label %81

81:                                               ; preds = %77
  %82 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #10
          to label %83 unwind label %144

83:                                               ; preds = %81
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %82)
          to label %84 unwind label %148

84:                                               ; preds = %83
  %85 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  store ptr %82, ptr %85, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #9
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 56, ptr %24) #9
  invoke void @_ZN7SGTELIB6Matrix13diagA_productERKS0_S2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %24, ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %87 unwind label %152

87:                                               ; preds = %84
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %23, ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 8 dereferenceable(56) %88)
          to label %89 unwind label %156

89:                                               ; preds = %87
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %22, ptr noundef nonnull align 8 dereferenceable(56) %86, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %90 unwind label %160

90:                                               ; preds = %89
  %91 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %92 = load ptr, ptr %91, align 8, !tbaa !11
  %93 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %92, ptr noundef nonnull align 8 dereferenceable(56) %22)
          to label %94 unwind label %164

94:                                               ; preds = %90
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #9
  %95 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %96 = load ptr, ptr %95, align 8, !tbaa !11
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %96, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %97 unwind label %144

97:                                               ; preds = %94
  %98 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %99 = load ptr, ptr %98, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %100 unwind label %171

100:                                              ; preds = %97
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %99, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %101 unwind label %175

101:                                              ; preds = %100
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #9
  br label %180

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

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

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

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

118:                                              ; preds = %72
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %6, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %7, align 4
  br label %136

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

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

130:                                              ; preds = %75
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %6, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %7, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #9
  br label %134

134:                                              ; preds = %130, %126
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #9
  br label %135

135:                                              ; preds = %134, %122
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #9
  br label %136

136:                                              ; preds = %135, %118
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #9
  br label %137

137:                                              ; preds = %136, %114
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #9
  br label %138

138:                                              ; preds = %137, %110
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #9
  br label %139

139:                                              ; preds = %138, %106
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #9
  br label %278

140:                                              ; preds = %76
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %6, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %7, align 4
  br label %277

144:                                              ; preds = %184, %94, %81
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %6, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %7, align 4
  br label %276

148:                                              ; preds = %83
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %6, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %82, i64 noundef 56) #11
  br label %276

152:                                              ; preds = %84
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %6, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %7, align 4
  br label %170

156:                                              ; preds = %87
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %6, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %7, align 4
  br label %169

160:                                              ; preds = %89
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %6, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %7, align 4
  br label %168

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

168:                                              ; preds = %164, %160
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #9
  br label %169

169:                                              ; preds = %168, %156
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #9
  br label %170

170:                                              ; preds = %169, %152
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #9
  br label %276

171:                                              ; preds = %97
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %6, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %7, align 4
  br label %179

175:                                              ; preds = %100
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %6, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #9
  br label %179

179:                                              ; preds = %175, %171
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #9
  br label %276

180:                                              ; preds = %101, %77
  %181 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 14
  %182 = load ptr, ptr %181, align 8, !tbaa !48
  %183 = icmp ne ptr %182, null
  br i1 %183, label %275, label %184

184:                                              ; preds = %180
  %185 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #10
          to label %186 unwind label %144

186:                                              ; preds = %184
  store i1 true, ptr %29, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %187 unwind label %200

187:                                              ; preds = %186
  %188 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 7
  %189 = load i32, ptr %188, align 8, !tbaa !49
  %190 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 4
  %191 = load i32, ptr %190, align 4, !tbaa !50
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %185, ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef %189, i32 noundef %191)
          to label %192 unwind label %204

192:                                              ; preds = %187
  store i1 false, ptr %29, align 1
  %193 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 14
  store ptr %185, ptr %193, align 8, !tbaa !48
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %249, %192
  %195 = load i32, ptr %31, align 4, !tbaa !9
  %196 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 7
  %197 = load i32, ptr %196, align 8, !tbaa !49
  %198 = icmp slt i32 %195, %197
  br i1 %198, label %212, label %199

199:                                              ; preds = %194
  store i32 2, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %253

200:                                              ; preds = %186
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %6, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %7, align 4
  br label %208

204:                                              ; preds = %187
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %6, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  br label %208

208:                                              ; preds = %204, %200
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  %209 = load i1, ptr %29, align 1
  br i1 %209, label %210, label %211

210:                                              ; preds = %208
  call void @_ZdlPvm(ptr noundef %185, i64 noundef 56) #11
  br label %211

211:                                              ; preds = %210, %208
  br label %276

212:                                              ; preds = %194
  %213 = load i32, ptr %31, align 4, !tbaa !9
  %214 = load i32, ptr %31, align 4, !tbaa !9
  %215 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %21, i32 noundef %213, i32 noundef %214)
          to label %216 unwind label %223

216:                                              ; preds = %212
  store double %215, ptr %30, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %217

217:                                              ; preds = %241, %216
  %218 = load i32, ptr %33, align 4, !tbaa !9
  %219 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 4
  %220 = load i32, ptr %219, align 4, !tbaa !50
  %221 = icmp slt i32 %218, %220
  br i1 %221, label %227, label %222

222:                                              ; preds = %217
  store i32 5, ptr %32, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %248

223:                                              ; preds = %212
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %6, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %7, align 4
  br label %252

227:                                              ; preds = %217
  %228 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 14
  %229 = load ptr, ptr %228, align 8, !tbaa !48
  %230 = load i32, ptr %31, align 4, !tbaa !9
  %231 = load i32, ptr %33, align 4, !tbaa !9
  %232 = getelementptr inbounds %"class.SGTELIB::Surrogate_Kriging", ptr %36, i32 0, i32 6
  %233 = load i32, ptr %33, align 4, !tbaa !9
  %234 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %232, i32 noundef %233)
          to label %235 unwind label %244

235:                                              ; preds = %227
  %236 = load double, ptr %234, align 8, !tbaa !51
  %237 = load double, ptr %30, align 8, !tbaa !51
  %238 = fmul double %236, %237
  %239 = call double @sqrt(double noundef %238) #9
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %229, i32 noundef %230, i32 noundef %231, double noundef %239)
          to label %240 unwind label %244

240:                                              ; preds = %235
  br label %241

241:                                              ; preds = %240
  %242 = load i32, ptr %33, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %33, align 4, !tbaa !9
  br label %217, !llvm.loop !52

244:                                              ; preds = %235, %227
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %6, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %252

248:                                              ; preds = %222
  br label %249

249:                                              ; preds = %248
  %250 = load i32, ptr %31, align 4, !tbaa !9
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %31, align 4, !tbaa !9
  br label %194, !llvm.loop !54

252:                                              ; preds = %244, %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  br label %274

253:                                              ; preds = %199
  %254 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 14
  %255 = load ptr, ptr %254, align 8, !tbaa !48
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %255, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %256 unwind label %261

256:                                              ; preds = %253
  %257 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 14
  %258 = load ptr, ptr %257, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %259 unwind label %265

259:                                              ; preds = %256
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %258, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %260 unwind label %269

260:                                              ; preds = %259
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  br label %275

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

265:                                              ; preds = %256
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %6, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %7, align 4
  br label %273

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

273:                                              ; preds = %269, %265
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #9
  br label %274

274:                                              ; preds = %273, %261, %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  br label %276

275:                                              ; preds = %260, %180
  store i1 true, ptr %2, align 1
  store i32 1, ptr %32, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %280

276:                                              ; preds = %274, %211, %179, %170, %148, %144
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #9
  br label %277

277:                                              ; preds = %276, %140
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #9
  br label %278

278:                                              ; preds = %277, %139
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #9
  br label %279

279:                                              ; preds = %278, %102
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  br label %282

280:                                              ; preds = %275, %47
  %281 = load i1, ptr %2, align 1
  ret i1 %281

282:                                              ; preds = %279, %61
  %283 = load ptr, ptr %6, align 8
  %284 = load i32, ptr %7, align 4
  %285 = insertvalue { ptr, i32 } poison, ptr %283, 0
  %286 = insertvalue { ptr, i32 } %285, i32 %284, 1
  resume { ptr, i32 } %286
}

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

declare void @_ZN7SGTELIB6Matrix13diagA_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)) #3

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

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

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

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

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


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

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

@.str.6 = external hidden unnamed_addr constant [96 x i8], align 1
@__FUNCTION__._ZN7SGTELIB17Surrogate_Kriging17compute_cv_valuesEv = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

26:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @__FUNCTION__._ZN7SGTELIB17Surrogate_Kriging17compute_cv_valuesEv, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %27 unwind label %35

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  store i32 283, ptr %6, align 4, !tbaa !5
  invoke void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %28 unwind label %37

28:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #10
  %29 = getelementptr inbounds i8, ptr %0, i64 376
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %.not = icmp eq ptr %30, null
  %31 = getelementptr inbounds i8, ptr %0, i64 384
  %32 = load ptr, ptr %31, align 8
  %.not41 = icmp eq ptr %32, null
  %or.cond = select i1 %.not, i1 true, i1 %.not41
  br i1 %or.cond, label %41, label %168

33:                                               ; preds = %1
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %40

35:                                               ; preds = %26
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %39

37:                                               ; preds = %27
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #10
  br label %39

39:                                               ; preds = %37, %35
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #10
  br label %40

40:                                               ; preds = %39, %33
  %.pn.pn = phi { ptr, i32 } [ %.pn, %39 ], [ %34, %33 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #10
  br label %169

41:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #10
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(985) %0)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %8) #10
  %42 = getelementptr inbounds i8, ptr %0, i64 1048
  %43 = getelementptr inbounds i8, ptr %0, i64 1104
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %8, ptr noundef nonnull align 8 dereferenceable(56) %42, ptr noundef nonnull align 8 dereferenceable(56) %43)
          to label %44 unwind label %69

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %11) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #10
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(56) %43)
          to label %45 unwind label %71

45:                                               ; preds = %44
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %13, ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %42)
          to label %46 unwind label %73

46:                                               ; preds = %45
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 8 dereferenceable(56) %43)
          to label %47 unwind label %75

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

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) #10
  invoke void @_ZNK7SGTELIB6Matrix9transposeEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %8)
          to label %49 unwind label %79

49:                                               ; preds = %48
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %10, ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %50 unwind label %81

50:                                               ; preds = %49
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %9, ptr noundef nonnull align 8 dereferenceable(56) %42, ptr noundef nonnull align 8 dereferenceable(56) %10)
          to label %51 unwind label %83

51:                                               ; preds = %50
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %16) #10
  invoke void @_ZNK7SGTELIB6Matrix12diag_inverseEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %52 unwind label %91

52:                                               ; preds = %51
  %53 = load ptr, ptr %29, align 8, !tbaa !9
  %.not49 = icmp eq ptr %53, null
  br i1 %.not49, label %54, label %113

54:                                               ; preds = %52
  %55 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #11
          to label %56 unwind label %93

56:                                               ; preds = %54
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %55)
          to label %57 unwind label %95

57:                                               ; preds = %56
  store ptr %55, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %17) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %18) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %19) #10
  invoke void @_ZN7SGTELIB6Matrix13diagA_productERKS0_S2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %19, ptr noundef nonnull align 8 dereferenceable(56) %16, ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %58 unwind label %97

58:                                               ; preds = %57
  invoke void @_ZmlRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %18, ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %59 unwind label %99

59:                                               ; preds = %58
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %17, ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 8 dereferenceable(56) %18)
          to label %60 unwind label %101

60:                                               ; preds = %59
  %61 = load ptr, ptr %29, align 8, !tbaa !9
  %62 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %61, ptr noundef nonnull align 8 dereferenceable(56) %17)
          to label %63 unwind label %103

63:                                               ; preds = %60
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #10
  %64 = load ptr, ptr %29, align 8, !tbaa !9
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %64, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %65 unwind label %93

65:                                               ; preds = %63
  %66 = load ptr, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull @.str.8, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %67 unwind label %108

67:                                               ; preds = %65
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %66, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %68 unwind label %110

68:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #10
  br label %113

69:                                               ; preds = %41
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %167

71:                                               ; preds = %44
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %90

73:                                               ; preds = %45
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %89

75:                                               ; preds = %46
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %88

77:                                               ; preds = %47
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %87

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

81:                                               ; preds = %49
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %85

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

85:                                               ; preds = %83, %81
  %.pn42 = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #10
  br label %86

86:                                               ; preds = %85, %79
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %85 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #10
  br label %87

87:                                               ; preds = %86, %77
  %.pn42.pn.pn = phi { ptr, i32 } [ %.pn42.pn, %86 ], [ %78, %77 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #10
  br label %88

88:                                               ; preds = %87, %75
  %.pn42.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn, %87 ], [ %76, %75 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #10
  br label %89

89:                                               ; preds = %88, %73
  %.pn42.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn.pn, %88 ], [ %74, %73 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #10
  br label %90

90:                                               ; preds = %89, %71
  %.pn42.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn42.pn.pn.pn.pn, %89 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #10
  br label %166

91:                                               ; preds = %51
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %165

93:                                               ; preds = %115, %63, %54
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %164

95:                                               ; preds = %56
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %55, i64 noundef 56) #12
  br label %164

97:                                               ; preds = %57
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %107

99:                                               ; preds = %58
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %106

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

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

105:                                              ; preds = %103, %101
  %.pn50 = phi { ptr, i32 } [ %104, %103 ], [ %102, %101 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #10
  br label %106

106:                                              ; preds = %105, %99
  %.pn50.pn = phi { ptr, i32 } [ %.pn50, %105 ], [ %100, %99 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #10
  br label %107

107:                                              ; preds = %106, %97
  %.pn50.pn.pn = phi { ptr, i32 } [ %.pn50.pn, %106 ], [ %98, %97 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %19) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #10
  br label %164

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

110:                                              ; preds = %67
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  br label %112

112:                                              ; preds = %110, %108
  %.pn54 = phi { ptr, i32 } [ %111, %110 ], [ %109, %108 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #10
  br label %164

113:                                              ; preds = %68, %52
  %114 = load ptr, ptr %31, align 8, !tbaa !47
  %.not56 = icmp eq ptr %114, null
  br i1 %.not56, label %115, label %163

115:                                              ; preds = %113
  %116 = invoke noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #11
          to label %117 unwind label %93

117:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %118 unwind label %128

118:                                              ; preds = %117
  %119 = getelementptr inbounds i8, ptr %0, i64 344
  %120 = load i32, ptr %119, align 8, !tbaa !48
  %121 = getelementptr inbounds i8, ptr %0, i64 332
  %122 = load i32, ptr %121, align 4, !tbaa !49
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %116, ptr noundef nonnull align 8 dereferenceable(32) %22, i32 noundef %120, i32 noundef %122)
          to label %123 unwind label %130

123:                                              ; preds = %118
  store ptr %116, ptr %31, align 8, !tbaa !47
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #10
  %124 = load i32, ptr %119, align 8, !tbaa !48
  %125 = icmp sgt i32 %124, 0
  br i1 %125, label %.lr.ph72, label %._crit_edge73

.lr.ph72:                                         ; preds = %123
  %126 = getelementptr inbounds i8, ptr %0, i64 1272
  br label %133

._crit_edge73:                                    ; preds = %._crit_edge, %123
  %127 = load ptr, ptr %31, align 8, !tbaa !47
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %127, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %152 unwind label %156

128:                                              ; preds = %117
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %132

130:                                              ; preds = %118
  %131 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #10
  br label %132

132:                                              ; preds = %130, %128
  %.pn57 = phi { ptr, i32 } [ %131, %130 ], [ %129, %128 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #10
  call void @_ZdlPvm(ptr noundef nonnull %116, i64 noundef 56) #12
  br label %164

133:                                              ; preds = %.lr.ph72, %._crit_edge
  %.01670 = phi i32 [ 0, %.lr.ph72 ], [ %137, %._crit_edge ]
  %134 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %16, i32 noundef %.01670, i32 noundef %.01670)
  %135 = load i32, ptr %121, align 4, !tbaa !49
  %136 = icmp sgt i32 %135, 0
  br i1 %136, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %146, %133
  %137 = add nuw nsw i32 %.01670, 1
  %138 = load i32, ptr %119, align 8, !tbaa !48
  %139 = icmp slt i32 %137, %138
  br i1 %139, label %133, label %._crit_edge73, !llvm.loop !50

.lr.ph:                                           ; preds = %133, %146
  %.069 = phi i32 [ %147, %146 ], [ 0, %133 ]
  %140 = load ptr, ptr %31, align 8, !tbaa !47
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %126, i32 noundef %.069)
          to label %142 unwind label %150

142:                                              ; preds = %.lr.ph
  %143 = load double, ptr %141, align 8, !tbaa !52
  %144 = fmul double %134, %143
  %145 = call double @sqrt(double noundef %144) #10
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %140, i32 noundef %.01670, i32 noundef %.069, double noundef %145)
          to label %146 unwind label %150

146:                                              ; preds = %142
  %147 = add nuw nsw i32 %.069, 1
  %148 = load i32, ptr %121, align 4, !tbaa !49
  %149 = icmp slt i32 %147, %148
  br i1 %149, label %.lr.ph, label %._crit_edge, !llvm.loop !53

150:                                              ; preds = %142, %.lr.ph
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %164

152:                                              ; preds = %._crit_edge73
  %153 = load ptr, ptr %31, align 8, !tbaa !47
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %25) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull @.str.9, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %154 unwind label %158

154:                                              ; preds = %152
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %153, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %155 unwind label %160

155:                                              ; preds = %154
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #10
  br label %163

156:                                              ; preds = %._crit_edge73
  %157 = landingpad { ptr, i32 }
          cleanup
  br label %164

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

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

162:                                              ; preds = %160, %158
  %.pn59 = phi { ptr, i32 } [ %161, %160 ], [ %159, %158 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %25) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #10
  br label %164

163:                                              ; preds = %155, %113
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #10
  br label %168

164:                                              ; preds = %150, %156, %162, %132, %112, %107, %95, %93
  %.pn61.pn = phi { ptr, i32 } [ %.pn57, %132 ], [ %94, %93 ], [ %.pn54, %112 ], [ %.pn50.pn.pn, %107 ], [ %96, %95 ], [ %151, %150 ], [ %.pn59, %162 ], [ %157, %156 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #10
  br label %165

165:                                              ; preds = %164, %91
  %.pn61.pn.pn = phi { ptr, i32 } [ %.pn61.pn, %164 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #10
  br label %166

166:                                              ; preds = %165, %90
  %.pn61.pn.pn.pn = phi { ptr, i32 } [ %.pn61.pn.pn, %165 ], [ %.pn42.pn.pn.pn.pn.pn, %90 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #10
  br label %167

167:                                              ; preds = %166, %69
  %.pn61.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn61.pn.pn.pn, %166 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #10
  br label %169

168:                                              ; preds = %28, %163
  ret i1 true

169:                                              ; preds = %167, %40
  %.pn61.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn61.pn.pn.pn.pn, %167 ], [ %.pn.pn, %40 ]
  resume { ptr, i32 } %.pn61.pn.pn.pn.pn.pn
}

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

declare void @_ZN7SGTELIB6Matrix13diagA_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 #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #9

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

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

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

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


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