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

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

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

@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [92 x i8], align 1
@__FUNCTION__._ZN7SGTELIB13Surrogate_RBF14get_matrix_ZvsEv = external hidden unnamed_addr constant [15 x i8], align 1
@.str.24 = 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(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7SGTELIB13Surrogate_RBF14get_matrix_ZvsEv(ptr noundef nonnull align 8 dereferenceable(1304) %0) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.SGTELIB::Matrix", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %23 unwind label %52

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @__FUNCTION__._ZN7SGTELIB13Surrogate_RBF14get_matrix_ZvsEv, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %24 unwind label %56

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 308, ptr %9, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985) %22, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %25 unwind label %60

25:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #8
  %26 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 13
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  %28 = icmp ne ptr %27, null
  br i1 %28, label %156, label %29

29:                                               ; preds = %25
  %30 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #9
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %30)
          to label %31 unwind label %66

31:                                               ; preds = %29
  %32 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 13
  store ptr %30, ptr %32, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr %11) #8
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %11, ptr noundef nonnull align 8 dereferenceable(985) %22)
  store ptr %11, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  %33 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 2
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(312) %33)
          to label %34 unwind label %70

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

35:                                               ; preds = %34
  %36 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %37 unwind label %78

37:                                               ; preds = %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br i1 %36, label %38, label %108

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 56, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr %16) #8
  %39 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %22, i32 0, i32 7
  invoke void @_ZNK7SGTELIB6Matrix12diag_inverseEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(56) %39)
          to label %40 unwind label %84

40:                                               ; preds = %38
  %41 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %22, i32 0, i32 8
  invoke void @_ZN7SGTELIB6Matrix13diagA_productERKS0_S2_(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) %41)
          to label %42 unwind label %88

42:                                               ; preds = %40
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #8
  %43 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %22, i32 0, i32 3
  %44 = load i32, ptr %43, align 4, !tbaa !48
  invoke void @_ZN7SGTELIB6Matrix11remove_rowsEi(ptr noundef nonnull align 8 dereferenceable(56) %15, i32 noundef %44)
          to label %45 unwind label %93

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 56, ptr %17) #8
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %17, ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %47 unwind label %97

47:                                               ; preds = %45
  %48 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 13
  %49 = load ptr, ptr %48, align 8, !tbaa !11
  %50 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %49, ptr noundef nonnull align 8 dereferenceable(56) %17)
          to label %51 unwind label %101

51:                                               ; preds = %47
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #8
  br label %134

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

56:                                               ; preds = %23
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %5, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %6, align 4
  br label %64

60:                                               ; preds = %24
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %5, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  br label %64

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

65:                                               ; preds = %64, %52
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #8
  br label %159

66:                                               ; preds = %29
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %5, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %6, align 4
  call void @_ZdlPvm(ptr noundef %30, i64 noundef 56) #10
  br label %159

70:                                               ; preds = %31
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %5, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %6, align 4
  br label %83

74:                                               ; preds = %34
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %5, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %6, align 4
  br label %82

78:                                               ; preds = %35
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %5, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #8
  br label %82

82:                                               ; preds = %78, %74
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  br label %83

83:                                               ; preds = %82, %70
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %155

84:                                               ; preds = %38
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %5, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %6, align 4
  br label %92

88:                                               ; preds = %40
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %5, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %6, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #8
  br label %92

92:                                               ; preds = %88, %84
  call void @llvm.lifetime.end.p0(i64 56, ptr %16) #8
  br label %107

93:                                               ; preds = %42
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %5, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %6, align 4
  br label %106

97:                                               ; preds = %45
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %5, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %6, align 4
  br label %105

101:                                              ; preds = %47
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %5, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %6, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #8
  br label %105

105:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #8
  br label %106

106:                                              ; preds = %105, %93
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #8
  br label %107

107:                                              ; preds = %106, %92
  call void @llvm.lifetime.end.p0(i64 56, ptr %15) #8
  br label %155

108:                                              ; preds = %37
  call void @llvm.lifetime.start.p0(i64 56, ptr %18) #8
  %109 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %22, i32 0, i32 7
  %110 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %22, i32 0, i32 4
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = getelementptr inbounds %"class.SGTELIB::Surrogate_RBF", ptr %22, i32 0, i32 8
  invoke void @_ZN7SGTELIB6Matrix17get_matrix_dPiPZsERKS0_S2_S2_S2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %18, ptr noundef nonnull align 8 dereferenceable(56) %109, ptr noundef nonnull align 8 dereferenceable(56) %110, ptr noundef nonnull align 8 dereferenceable(56) %111, ptr noundef nonnull align 8 dereferenceable(56) %112)
          to label %113 unwind label %120

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #8
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %19, ptr noundef nonnull align 8 dereferenceable(56) %114, ptr noundef nonnull align 8 dereferenceable(56) %18)
          to label %115 unwind label %124

115:                                              ; preds = %113
  %116 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 13
  %117 = load ptr, ptr %116, align 8, !tbaa !11
  %118 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %117, ptr noundef nonnull align 8 dereferenceable(56) %19)
          to label %119 unwind label %128

119:                                              ; preds = %115
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #8
  br label %134

120:                                              ; preds = %108
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %5, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %6, align 4
  br label %133

124:                                              ; preds = %113
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %5, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %6, align 4
  br label %132

128:                                              ; preds = %115
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %5, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %6, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #8
  br label %132

132:                                              ; preds = %128, %124
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #8
  br label %133

133:                                              ; preds = %132, %120
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #8
  br label %155

134:                                              ; preds = %119, %51
  %135 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 13
  %136 = load ptr, ptr %135, align 8, !tbaa !11
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %136, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %137 unwind label %142

137:                                              ; preds = %134
  %138 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 13
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.24, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %140 unwind label %146

140:                                              ; preds = %137
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %139, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %141 unwind label %150

141:                                              ; preds = %140
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %156

142:                                              ; preds = %134
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %5, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %6, align 4
  br label %155

146:                                              ; preds = %137
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %5, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %6, align 4
  br label %154

150:                                              ; preds = %140
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %5, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  br label %154

154:                                              ; preds = %150, %146
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #8
  br label %155

155:                                              ; preds = %154, %142, %133, %107, %83
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %159

156:                                              ; preds = %141, %25
  %157 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %22, i32 0, i32 13
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  ret ptr %158

159:                                              ; preds = %155, %66, %65
  %160 = load ptr, ptr %5, align 8
  %161 = load i32, ptr %6, align 4
  %162 = insertvalue { ptr, i32 } poison, ptr %160, 0
  %163 = insertvalue { ptr, i32 } %162, i32 %161, 1
  resume { ptr, i32 } %163
}

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

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

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

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

declare void @_ZN7SGTELIB6Matrix11remove_rowsEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #5

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

declare void @_ZN7SGTELIB6Matrix17get_matrix_dPiPZsERKS0_S2_S2_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), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #5

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

; 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)) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = !{!49, !10, i64 996}
!49 = !{!"_ZTSN7SGTELIB13Surrogate_RBFE", !12, i64 0, !10, i64 988, !10, i64 992, !10, i64 996, !19, i64 1000, !19, i64 1056, !19, i64 1112, !19, i64 1168, !19, i64 1224, !27, i64 1280}


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

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

@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [92 x i8], align 1
@__FUNCTION__._ZN7SGTELIB13Surrogate_RBF14get_matrix_ZvsEv = external hidden unnamed_addr constant [15 x i8], align 1
@.str.24 = 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(...)

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

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

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

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

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

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

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

declare 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 #5

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7SGTELIB13Surrogate_RBF14get_matrix_ZvsEv(ptr noundef nonnull align 8 dereferenceable(1304) %0) 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.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.SGTELIB::Matrix", align 8
  %12 = alloca %"class.SGTELIB::Matrix", align 8
  %13 = alloca %"class.SGTELIB::Matrix", align 8
  %14 = alloca %"class.SGTELIB::Matrix", align 8
  %15 = alloca %"class.SGTELIB::Matrix", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %18 unwind label %43

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @__FUNCTION__._ZN7SGTELIB13Surrogate_RBF14get_matrix_ZvsEv, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %19 unwind label %45

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 308, 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 %20 unwind label %47

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  %21 = getelementptr inbounds i8, ptr %0, i64 376
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %.not = icmp eq ptr %22, null
  br i1 %.not, label %23, label %106

23:                                               ; preds = %20
  %24 = call noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #9
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24)
          to label %25 unwind label %51

25:                                               ; preds = %23
  store ptr %24, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #8
  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 32, ptr nonnull %8) #8
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  invoke void @_ZNK7SGTELIB20Surrogate_Parameters10get_presetB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(312) %26)
          to label %27 unwind label %53

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

28:                                               ; preds = %27
  %29 = invoke noundef zeroext i1 @_ZN7SGTELIB11string_findERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %30 unwind label %57

30:                                               ; preds = %28
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br i1 %29, label %31, label %75

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #8
  %32 = getelementptr inbounds i8, ptr %0, i64 1168
  invoke void @_ZNK7SGTELIB6Matrix12diag_inverseEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(56) %32)
          to label %33 unwind label %61

33:                                               ; preds = %31
  %34 = getelementptr inbounds i8, ptr %0, i64 1224
  invoke void @_ZN7SGTELIB6Matrix13diagA_productERKS0_S2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %11, ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 8 dereferenceable(56) %34)
          to label %35 unwind label %63

35:                                               ; preds = %33
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #8
  %36 = getelementptr inbounds i8, ptr %0, i64 996
  %37 = load i32, ptr %36, align 4, !tbaa !47
  invoke void @_ZN7SGTELIB6Matrix11remove_rowsEi(ptr noundef nonnull align 8 dereferenceable(56) %11, i32 noundef %37)
          to label %38 unwind label %66

38:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #8
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %13, ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 8 dereferenceable(56) %11)
          to label %39 unwind label %68

39:                                               ; preds = %38
  %40 = load ptr, ptr %21, align 8, !tbaa !9
  %41 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %40, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %42 unwind label %70

42:                                               ; preds = %39
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #8
  br label %92

43:                                               ; preds = %1
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %50

45:                                               ; preds = %18
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %19
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %49

49:                                               ; preds = %47, %45
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #8
  br label %50

50:                                               ; preds = %49, %43
  %.pn.pn = phi { ptr, i32 } [ %.pn, %49 ], [ %44, %43 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  br label %108

51:                                               ; preds = %23
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %24, i64 noundef 56) #10
  br label %108

53:                                               ; preds = %25
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %60

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

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

59:                                               ; preds = %57, %55
  %.pn20 = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %60

60:                                               ; preds = %59, %53
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %59 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %105

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

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

65:                                               ; preds = %63, %61
  %.pn26 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #8
  br label %74

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

68:                                               ; preds = %38
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %72

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

72:                                               ; preds = %70, %68
  %.pn28 = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #8
  br label %73

73:                                               ; preds = %72, %66
  %.pn28.pn = phi { ptr, i32 } [ %.pn28, %72 ], [ %67, %66 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #8
  br label %74

74:                                               ; preds = %73, %65
  %.pn28.pn.pn = phi { ptr, i32 } [ %.pn28.pn, %73 ], [ %.pn26, %65 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #8
  br label %105

75:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #8
  %76 = getelementptr inbounds i8, ptr %0, i64 1168
  %77 = getelementptr inbounds i8, ptr %0, i64 1000
  %78 = getelementptr inbounds i8, ptr %0, i64 1224
  invoke void @_ZN7SGTELIB6Matrix17get_matrix_dPiPZsERKS0_S2_S2_S2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(56) %76, ptr noundef nonnull align 8 dereferenceable(56) %77, ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 8 dereferenceable(56) %78)
          to label %79 unwind label %84

79:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) #8
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %80 unwind label %86

80:                                               ; preds = %79
  %81 = load ptr, ptr %21, align 8, !tbaa !9
  %82 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %81, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %83 unwind label %88

83:                                               ; preds = %80
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #8
  br label %92

84:                                               ; preds = %75
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %91

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

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

90:                                               ; preds = %88, %86
  %.pn23 = phi { ptr, i32 } [ %89, %88 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #8
  br label %91

91:                                               ; preds = %90, %84
  %.pn23.pn = phi { ptr, i32 } [ %.pn23, %90 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #8
  br label %105

92:                                               ; preds = %83, %42
  %93 = load ptr, ptr %21, align 8, !tbaa !9
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %93, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %94 unwind label %98

94:                                               ; preds = %92
  %95 = load ptr, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull @.str.24, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %96 unwind label %100

96:                                               ; preds = %94
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %95, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %97 unwind label %102

97:                                               ; preds = %96
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #8
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #8
  %.pre = load ptr, ptr %21, align 8, !tbaa !9
  br label %106

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

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

102:                                              ; preds = %96
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %104

104:                                              ; preds = %102, %100
  %.pn32 = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #8
  br label %105

105:                                              ; preds = %104, %98, %91, %74, %60
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %104 ], [ %99, %98 ], [ %.pn28.pn.pn, %74 ], [ %.pn23.pn, %91 ], [ %.pn20.pn, %60 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #8
  br label %108

106:                                              ; preds = %97, %20
  %107 = phi ptr [ %.pre, %97 ], [ %22, %20 ]
  ret ptr %107

108:                                              ; preds = %105, %51, %50
  %.pn32.pn.pn = phi { ptr, i32 } [ %.pn32.pn, %105 ], [ %52, %51 ], [ %.pn.pn, %50 ]
  resume { ptr, i32 } %.pn32.pn.pn
}

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

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

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

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

declare void @_ZN7SGTELIB6Matrix11remove_rowsEi(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #5

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

declare void @_ZN7SGTELIB6Matrix17get_matrix_dPiPZsERKS0_S2_S2_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), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #5

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

; 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 #7 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = !{!48, !6, i64 996}
!48 = !{!"_ZTSN7SGTELIB13Surrogate_RBFE", !10, i64 0, !6, i64 988, !6, i64 992, !6, i64 996, !18, i64 1000, !18, i64 1056, !18, i64 1112, !18, i64 1168, !18, i64 1224, !26, i64 1280}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass