; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Surrogate_KS.ll (ZN7SGTELIB12Surrogate_KS14get_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.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 }

@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.3 = external hidden unnamed_addr constant [56 x i8], align 1
@__FUNCTION__._ZN7SGTELIB12Surrogate_KS14get_matrix_ZvsEv = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

declare ptr @__cxa_allocate_exception(i64)

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

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

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

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

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

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

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

declare void @_ZN7SGTELIB6kernelENS_8kernel_tEdNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, i32 noundef, double noundef, ptr noundef) #4

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

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

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

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

declare noundef double @_ZNK7SGTELIB11TrainingSet11get_Zs_meanEi(ptr noundef nonnull align 8 dereferenceable(504), i32 noundef) #4

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7SGTELIB12Surrogate_KS14get_matrix_ZvsEv(ptr noundef nonnull align 8 dereferenceable(985) %0) unnamed_addr #3 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 %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca i1, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, 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.SGTELIB::Matrix", align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca i32, align 4
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::allocator", align 1
  %33 = alloca i1, align 1
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %36 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %37 unwind label %114

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

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 218, ptr %9, 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) %3, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %39 unwind label %122

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #10
  %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 %285, label %43

43:                                               ; preds = %39
  %44 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #11
  store i1 true, ptr %12, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %45 unwind label %128

45:                                               ; preds = %43
  %46 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 7
  %47 = load i32, ptr %46, align 8, !tbaa !48
  %48 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 4
  %49 = load i32, ptr %48, align 4, !tbaa !49
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %44, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef %47, i32 noundef %49)
          to label %50 unwind label %132

50:                                               ; preds = %45
  store i1 false, ptr %12, align 1
  %51 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  store ptr %44, ptr %51, align 8, !tbaa !11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %52 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 2
  %53 = call noundef double @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_coefEv(ptr noundef nonnull align 8 dereferenceable(312) %52)
  %54 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !50
  %56 = call noundef double @_ZNK7SGTELIB11TrainingSet11get_Ds_meanEv(ptr noundef nonnull align 8 dereferenceable(504) %55)
  %57 = fdiv double %53, %56
  store double %57, ptr %19, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 56, ptr %20) #10
  %58 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 56, ptr %21) #10
  call void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(985) %36)
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #10
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %22, ptr noundef nonnull align 8 dereferenceable(985) %36)
          to label %60 unwind label %140

60:                                               ; preds = %50
  %61 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 2
  %62 = invoke noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters17get_distance_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %61)
          to label %63 unwind label %144

63:                                               ; preds = %60
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %20, ptr noundef nonnull align 8 dereferenceable(504) %59, ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 8 dereferenceable(56) %22, i32 noundef %62)
          to label %64 unwind label %144

64:                                               ; preds = %63
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #10
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %65 unwind label %149

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 56, ptr %24) #10
  %66 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 2
  %67 = invoke noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %66)
          to label %68 unwind label %153

68:                                               ; preds = %65
  %69 = load double, ptr %19, align 8, !tbaa !51
  invoke void @_ZN7SGTELIB6MatrixC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %70 unwind label %153

70:                                               ; preds = %68
  invoke void @_ZN7SGTELIB6kernelENS_8kernel_tEdNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %24, i32 noundef %67, double noundef %69, ptr noundef %25)
          to label %71 unwind label %157

71:                                               ; preds = %70
  %72 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %23, ptr noundef nonnull align 8 dereferenceable(56) %24)
          to label %73 unwind label %161

73:                                               ; preds = %71
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #10
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %262, %73
  %75 = load i32, ptr %14, align 4, !tbaa !9
  %76 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 4
  %77 = load i32, ptr %76, align 4, !tbaa !49
  %78 = icmp slt i32 %75, %77
  br i1 %78, label %79, label %265

79:                                               ; preds = %74
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %258, %79
  %81 = load i32, ptr %15, align 4, !tbaa !9
  %82 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 7
  %83 = load i32, ptr %82, align 8, !tbaa !48
  %84 = icmp slt i32 %81, %83
  br i1 %84, label %85, label %261

85:                                               ; preds = %80
  store double 0.000000e+00, ptr %16, align 8, !tbaa !51
  store double 0.000000e+00, ptr %17, align 8, !tbaa !51
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %86

86:                                               ; preds = %172, %85
  %87 = load i32, ptr %13, align 4, !tbaa !9
  %88 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 7
  %89 = load i32, ptr %88, align 8, !tbaa !48
  %90 = icmp slt i32 %87, %89
  br i1 %90, label %91, label %175

91:                                               ; preds = %86
  %92 = load i32, ptr %13, align 4, !tbaa !9
  %93 = load i32, ptr %15, align 4, !tbaa !9
  %94 = icmp ne i32 %92, %93
  br i1 %94, label %95, label %171

95:                                               ; preds = %91
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = load i32, ptr %15, align 4, !tbaa !9
  %98 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %23, i32 noundef %96, i32 noundef %97)
          to label %99 unwind label %167

99:                                               ; preds = %95
  %100 = load double, ptr %16, align 8, !tbaa !51
  %101 = fadd double %100, %98
  store double %101, ptr %16, align 8, !tbaa !51
  %102 = load i32, ptr %13, align 4, !tbaa !9
  %103 = load i32, ptr %15, align 4, !tbaa !9
  %104 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %23, i32 noundef %102, i32 noundef %103)
          to label %105 unwind label %167

105:                                              ; preds = %99
  %106 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !50
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = invoke noundef double @_ZNK7SGTELIB11TrainingSet6get_ZsEii(ptr noundef nonnull align 8 dereferenceable(504) %107, i32 noundef %108, i32 noundef %109)
          to label %111 unwind label %167

111:                                              ; preds = %105
  %112 = load double, ptr %17, align 8, !tbaa !51
  %113 = call double @llvm.fmuladd.f64(double %104, double %110, double %112)
  store double %113, ptr %17, align 8, !tbaa !51
  br label %171

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

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

122:                                              ; preds = %38
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %5, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %126

126:                                              ; preds = %122, %118
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  br label %127

127:                                              ; preds = %126, %114
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #10
  br label %288

128:                                              ; preds = %43
  %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
  br label %136

132:                                              ; preds = %45
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %5, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br label %136

136:                                              ; preds = %132, %128
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #10
  %137 = load i1, ptr %12, align 1
  br i1 %137, label %138, label %139

138:                                              ; preds = %136
  call void @_ZdlPvm(ptr noundef %44, i64 noundef 56) #12
  br label %139

139:                                              ; preds = %138, %136
  br label %288

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

144:                                              ; preds = %63, %60
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %5, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %6, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #10
  br label %148

148:                                              ; preds = %144, %140
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #10
  br label %284

149:                                              ; preds = %64
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %5, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %6, align 4
  br label %283

153:                                              ; preds = %68, %65
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %5, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %6, align 4
  br label %166

157:                                              ; preds = %70
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %5, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %6, align 4
  br label %165

161:                                              ; preds = %71
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %5, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %6, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #10
  br label %165

165:                                              ; preds = %161, %157
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #10
  br label %166

166:                                              ; preds = %165, %153
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #10
  br label %282

167:                                              ; preds = %265, %251, %222, %182, %105, %99, %95
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %5, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %6, align 4
  br label %282

171:                                              ; preds = %111, %91
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %13, align 4, !tbaa !9
  br label %86, !llvm.loop !52

175:                                              ; preds = %86
  %176 = load double, ptr %16, align 8, !tbaa !51
  %177 = fcmp ogt double %176, 1.000000e-13
  br i1 %177, label %178, label %182

178:                                              ; preds = %175
  %179 = load double, ptr %17, align 8, !tbaa !51
  %180 = load double, ptr %16, align 8, !tbaa !51
  %181 = fdiv double %179, %180
  store double %181, ptr %18, align 8, !tbaa !51
  br label %251

182:                                              ; preds = %175
  %183 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 2
  %184 = invoke noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %183)
          to label %185 unwind label %167

185:                                              ; preds = %182
  switch i32 %184, label %228 [
    i32 0, label %186
    i32 3, label %186
    i32 4, label %186
    i32 1, label %222
    i32 2, label %222
    i32 5, label %222
  ]

186:                                              ; preds = %185, %185, %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #10
  store double 0x7FEFFFFFFFFFFFFF, ptr %27, align 8, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #10
  store i32 0, ptr %28, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %187

187:                                              ; preds = %212, %186
  %188 = load i32, ptr %13, align 4, !tbaa !9
  %189 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 7
  %190 = load i32, ptr %189, align 8, !tbaa !48
  %191 = icmp slt i32 %188, %190
  br i1 %191, label %192, label %215

192:                                              ; preds = %187
  %193 = load i32, ptr %13, align 4, !tbaa !9
  %194 = load i32, ptr %15, align 4, !tbaa !9
  %195 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %20, i32 noundef %193, i32 noundef %194)
          to label %196 unwind label %207

196:                                              ; preds = %192
  store double %195, ptr %26, align 8, !tbaa !51
  %197 = load i32, ptr %13, align 4, !tbaa !9
  %198 = load i32, ptr %15, align 4, !tbaa !9
  %199 = icmp ne i32 %197, %198
  br i1 %199, label %200, label %211

200:                                              ; preds = %196
  %201 = load double, ptr %26, align 8, !tbaa !51
  %202 = load double, ptr %27, align 8, !tbaa !51
  %203 = fcmp olt double %201, %202
  br i1 %203, label %204, label %211

204:                                              ; preds = %200
  %205 = load double, ptr %26, align 8, !tbaa !51
  store double %205, ptr %27, align 8, !tbaa !51
  %206 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %206, ptr %28, align 4, !tbaa !9
  br label %211

207:                                              ; preds = %215, %192
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %5, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  br label %282

211:                                              ; preds = %204, %200, %196
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %13, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %13, align 4, !tbaa !9
  br label %187, !llvm.loop !54

215:                                              ; preds = %187
  %216 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 1
  %217 = load ptr, ptr %216, align 8, !tbaa !50
  %218 = load i32, ptr %28, align 4, !tbaa !9
  %219 = load i32, ptr %14, align 4, !tbaa !9
  %220 = invoke noundef double @_ZNK7SGTELIB11TrainingSet6get_ZsEii(ptr noundef nonnull align 8 dereferenceable(504) %217, i32 noundef %218, i32 noundef %219)
          to label %221 unwind label %207

221:                                              ; preds = %215
  store double %220, ptr %18, align 8, !tbaa !51
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  br label %250

222:                                              ; preds = %185, %185, %185
  %223 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 1
  %224 = load ptr, ptr %223, align 8, !tbaa !50
  %225 = load i32, ptr %14, align 4, !tbaa !9
  %226 = invoke noundef double @_ZNK7SGTELIB11TrainingSet11get_Zs_meanEi(ptr noundef nonnull align 8 dereferenceable(504) %224, i32 noundef %225)
          to label %227 unwind label %167

227:                                              ; preds = %222
  store double %226, ptr %18, align 8, !tbaa !51
  br label %250

228:                                              ; preds = %185
  store i1 true, ptr %33, align 1
  %229 = call ptr @__cxa_allocate_exception(i64 112) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %230 unwind label %233

230:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %231 unwind label %237

231:                                              ; preds = %230
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %229, ptr noundef nonnull align 8 dereferenceable(32) %29, i32 noundef 306, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %232 unwind label %241

232:                                              ; preds = %231
  store i1 false, ptr %33, align 1
  invoke void @__cxa_throw(ptr %229, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #13
          to label %293 unwind label %241

233:                                              ; preds = %228
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %5, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %6, align 4
  br label %246

237:                                              ; preds = %230
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %5, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %6, align 4
  br label %245

241:                                              ; preds = %232, %231
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %5, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #10
  br label %245

245:                                              ; preds = %241, %237
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #10
  br label %246

246:                                              ; preds = %245, %233
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #10
  %247 = load i1, ptr %33, align 1
  br i1 %247, label %248, label %249

248:                                              ; preds = %246
  call void @__cxa_free_exception(ptr %229) #10
  br label %249

249:                                              ; preds = %248, %246
  br label %282

250:                                              ; preds = %227, %221
  br label %251

251:                                              ; preds = %250, %178
  %252 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %253 = load ptr, ptr %252, align 8, !tbaa !11
  %254 = load i32, ptr %15, align 4, !tbaa !9
  %255 = load i32, ptr %14, align 4, !tbaa !9
  %256 = load double, ptr %18, align 8, !tbaa !51
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %253, i32 noundef %254, i32 noundef %255, double noundef %256)
          to label %257 unwind label %167

257:                                              ; preds = %251
  br label %258

258:                                              ; preds = %257
  %259 = load i32, ptr %15, align 4, !tbaa !9
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %15, align 4, !tbaa !9
  br label %80, !llvm.loop !55

261:                                              ; preds = %80
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %14, align 4, !tbaa !9
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %14, align 4, !tbaa !9
  br label %74, !llvm.loop !56

265:                                              ; preds = %74
  %266 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %267 = load ptr, ptr %266, align 8, !tbaa !11
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %267, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %268 unwind label %167

268:                                              ; preds = %265
  %269 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %270 = load ptr, ptr %269, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %271 unwind label %273

271:                                              ; preds = %268
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %270, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %272 unwind label %277

272:                                              ; preds = %271
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %285

273:                                              ; preds = %268
  %274 = landingpad { ptr, i32 }
          cleanup
  %275 = extractvalue { ptr, i32 } %274, 0
  store ptr %275, ptr %5, align 8
  %276 = extractvalue { ptr, i32 } %274, 1
  store i32 %276, ptr %6, align 4
  br label %281

277:                                              ; preds = %271
  %278 = landingpad { ptr, i32 }
          cleanup
  %279 = extractvalue { ptr, i32 } %278, 0
  store ptr %279, ptr %5, align 8
  %280 = extractvalue { ptr, i32 } %278, 1
  store i32 %280, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #10
  br label %281

281:                                              ; preds = %277, %273
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #10
  br label %282

282:                                              ; preds = %281, %249, %207, %167, %166
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #10
  br label %283

283:                                              ; preds = %282, %149
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #10
  br label %284

284:                                              ; preds = %283, %148
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %288

285:                                              ; preds = %272, %39
  %286 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %36, i32 0, i32 13
  %287 = load ptr, ptr %286, align 8, !tbaa !11
  ret ptr %287

288:                                              ; preds = %284, %139, %127
  %289 = load ptr, ptr %5, align 8
  %290 = load i32, ptr %6, align 4
  %291 = insertvalue { ptr, i32 } poison, ptr %289, 0
  %292 = insertvalue { ptr, i32 } %291, i32 %290, 1
  resume { ptr, i32 } %292

293:                                              ; preds = %232
  unreachable
}

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

declare noundef double @_ZNK7SGTELIB11TrainingSet6get_ZsEii(ptr noundef nonnull align 8 dereferenceable(504), i32 noundef, i32 noundef) #4

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

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

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

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

!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, !10, i64 344}
!49 = !{!12, !10, i64 332}
!50 = !{!12, !6, i64 8}
!51 = !{!17, !17, i64 0}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = distinct !{!54, !53}
!55 = distinct !{!55, !53}
!56 = distinct !{!56, !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.1 = external hidden unnamed_addr constant [91 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.3 = external hidden unnamed_addr constant [56 x i8], align 1
@__FUNCTION__._ZN7SGTELIB12Surrogate_KS14get_matrix_ZvsEv = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

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

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

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

declare void @_ZN7SGTELIB6kernelENS_8kernel_tEdNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8, i32 noundef, double noundef, ptr noundef) local_unnamed_addr #4

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN7SGTELIB12Surrogate_KS14get_matrix_ZvsEv(ptr noundef nonnull align 8 dereferenceable(985) %0) unnamed_addr #3 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.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.SGTELIB::Matrix", align 8
  %10 = alloca %"class.SGTELIB::Matrix", align 8
  %11 = alloca %"class.SGTELIB::Matrix", align 8
  %12 = alloca %"class.SGTELIB::Matrix", align 8
  %13 = alloca %"class.SGTELIB::Matrix", align 8
  %14 = alloca %"class.SGTELIB::Matrix", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = 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.1, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %21 unwind label %68

21:                                               ; 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__._ZN7SGTELIB12Surrogate_KS14get_matrix_ZvsEv, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %22 unwind label %70

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  store i32 218, 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 %23 unwind label %72

23:                                               ; preds = %22
  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
  %24 = getelementptr inbounds i8, ptr %0, i64 376
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %.not = icmp eq ptr %25, null
  br i1 %.not, label %26, label %153

26:                                               ; preds = %23
  %27 = call noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %28 unwind label %76

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %0, i64 344
  %30 = load i32, ptr %29, align 8, !tbaa !47
  %31 = getelementptr inbounds i8, ptr %0, i64 332
  %32 = load i32, ptr %31, align 4, !tbaa !48
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef %30, i32 noundef %32)
          to label %33 unwind label %78

33:                                               ; preds = %28
  store ptr %27, ptr %24, align 8, !tbaa !9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = call noundef double @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_coefEv(ptr noundef nonnull align 8 dereferenceable(312) %34)
  %36 = getelementptr inbounds i8, ptr %0, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !49
  %38 = call noundef double @_ZNK7SGTELIB11TrainingSet11get_Ds_meanEv(ptr noundef nonnull align 8 dereferenceable(504) %37)
  %39 = fdiv double %35, %38
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #10
  %40 = load ptr, ptr %36, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #10
  call void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %10, ptr noundef nonnull align 8 dereferenceable(985) %0)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %11) #10
  invoke void @_ZN7SGTELIB9Surrogate13get_matrix_XsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %11, ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %41 unwind label %81

41:                                               ; preds = %33
  %42 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters17get_distance_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %34)
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %9, ptr noundef nonnull align 8 dereferenceable(504) %40, ptr noundef nonnull align 8 dereferenceable(56) %10, ptr noundef nonnull align 8 dereferenceable(56) %11, i32 noundef %42)
          to label %43 unwind label %83

43:                                               ; preds = %41
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #10
  invoke void @_ZN7SGTELIB6MatrixC1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12)
          to label %44 unwind label %86

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #10
  %45 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %34)
  invoke void @_ZN7SGTELIB6MatrixC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %9)
          to label %46 unwind label %88

46:                                               ; preds = %44
  invoke void @_ZN7SGTELIB6kernelENS_8kernel_tEdNS_6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %13, i32 noundef %45, double noundef %39, ptr noundef nonnull %14)
          to label %47 unwind label %90

47:                                               ; preds = %46
  %48 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %49 unwind label %92

49:                                               ; preds = %47
  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 %13) #10
  %50 = load i32, ptr %31, align 4, !tbaa !48
  %51 = icmp sgt i32 %50, 0
  %52 = load i32, ptr %29, align 8
  %53 = icmp sgt i32 %52, 0
  %or.cond121 = select i1 %51, i1 %53, i1 false
  br i1 %or.cond121, label %.preheader94, label %._crit_edge114

.preheader94:                                     ; preds = %49, %._crit_edge112
  %54 = phi i32 [ %137, %._crit_edge112 ], [ %50, %49 ]
  %55 = phi i32 [ %138, %._crit_edge112 ], [ %52, %49 ]
  %.066113 = phi i32 [ %139, %._crit_edge112 ], [ 0, %49 ]
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.preheader, label %._crit_edge112

.preheader:                                       ; preds = %.preheader94, %133
  %57 = phi i32 [ %135, %133 ], [ %55, %.preheader94 ]
  %.065111 = phi i32 [ %134, %133 ], [ 0, %.preheader94 ]
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %.preheader, %96
  %59 = phi i32 [ %97, %96 ], [ %57, %.preheader ]
  %.061102 = phi double [ %.162, %96 ], [ 0.000000e+00, %.preheader ]
  %.063101 = phi double [ %.164, %96 ], [ 0.000000e+00, %.preheader ]
  %.067100 = phi i32 [ %98, %96 ], [ 0, %.preheader ]
  %.not85 = icmp eq i32 %.067100, %.065111
  br i1 %.not85, label %96, label %60

60:                                               ; preds = %.lr.ph
  %61 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %12, i32 noundef %.067100, i32 noundef %.065111)
  %62 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %12, i32 noundef %.067100, i32 noundef %.065111)
  %63 = load ptr, ptr %36, align 8, !tbaa !49
  %64 = invoke noundef double @_ZNK7SGTELIB11TrainingSet6get_ZsEii(ptr noundef nonnull align 8 dereferenceable(504) %63, i32 noundef %.067100, i32 noundef %.066113)
          to label %65 unwind label %.loopexit

65:                                               ; preds = %60
  %66 = fadd double %.063101, %61
  %67 = call double @llvm.fmuladd.f64(double %62, double %64, double %.061102)
  %.pre = load i32, ptr %29, align 8, !tbaa !47
  br label %96

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

70:                                               ; preds = %21
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %22
  %73 = 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 %74

74:                                               ; preds = %72, %70
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  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 %75

75:                                               ; preds = %74, %68
  %.pn.pn = phi { ptr, i32 } [ %.pn, %74 ], [ %69, %68 ]
  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 %155

76:                                               ; preds = %26
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %80

78:                                               ; preds = %28
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %80

80:                                               ; preds = %78, %76
  %.pn72 = phi { ptr, i32 } [ %79, %78 ], [ %77, %76 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  call void @_ZdlPvm(ptr noundef nonnull %27, i64 noundef 56) #12
  br label %155

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

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

85:                                               ; preds = %83, %81
  %.pn74 = phi { ptr, i32 } [ %84, %83 ], [ %82, %81 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %11) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #10
  br label %152

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

88:                                               ; preds = %44
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %95

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

92:                                               ; preds = %47
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #10
  br label %94

94:                                               ; preds = %92, %90
  %.pn76 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #10
  br label %95

95:                                               ; preds = %94, %88
  %.pn76.pn = phi { ptr, i32 } [ %.pn76, %94 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #10
  br label %.loopexit.split-lp

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

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

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

96:                                               ; preds = %.lr.ph, %65
  %97 = phi i32 [ %.pre, %65 ], [ %59, %.lr.ph ]
  %.164 = phi double [ %66, %65 ], [ %.063101, %.lr.ph ]
  %.162 = phi double [ %67, %65 ], [ %.061102, %.lr.ph ]
  %98 = add nuw nsw i32 %.067100, 1
  %99 = icmp slt i32 %98, %97
  br i1 %99, label %.lr.ph, label %._crit_edge, !llvm.loop !50

._crit_edge:                                      ; preds = %96
  %100 = fcmp ogt double %.164, 1.000000e-13
  br i1 %100, label %101, label %._crit_edge.thread

101:                                              ; preds = %._crit_edge
  %102 = fdiv double %.162, %.164
  br label %131

._crit_edge.thread:                               ; preds = %.preheader, %._crit_edge
  %103 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_kernel_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %34)
  switch i32 %103, label %119 [
    i32 0, label %104
    i32 3, label %104
    i32 4, label %104
    i32 1, label %116
    i32 2, label %116
    i32 5, label %116
  ]

104:                                              ; preds = %._crit_edge.thread, %._crit_edge.thread, %._crit_edge.thread
  %105 = load i32, ptr %29, align 8, !tbaa !47
  %106 = icmp sgt i32 %105, 0
  br i1 %106, label %.lr.ph108, label %._crit_edge109

.lr.ph108:                                        ; preds = %104, %.lr.ph108
  %.040106 = phi i32 [ %.141, %.lr.ph108 ], [ 0, %104 ]
  %.042105 = phi double [ %.143, %.lr.ph108 ], [ 0x7FEFFFFFFFFFFFFF, %104 ]
  %.168104 = phi i32 [ %109, %.lr.ph108 ], [ 0, %104 ]
  %107 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %9, i32 noundef %.168104, i32 noundef %.065111)
  %.not81 = icmp ne i32 %.168104, %.065111
  %108 = fcmp olt double %107, %.042105
  %or.cond = select i1 %.not81, i1 %108, i1 false
  %.143 = select i1 %or.cond, double %107, double %.042105
  %.141 = select i1 %or.cond, i32 %.168104, i32 %.040106
  %109 = add nuw nsw i32 %.168104, 1
  %110 = load i32, ptr %29, align 8, !tbaa !47
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %.lr.ph108, label %._crit_edge109, !llvm.loop !52

112:                                              ; preds = %._crit_edge109
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

._crit_edge109:                                   ; preds = %.lr.ph108, %104
  %.040.lcssa = phi i32 [ 0, %104 ], [ %.141, %.lr.ph108 ]
  %114 = load ptr, ptr %36, align 8, !tbaa !49
  %115 = invoke noundef double @_ZNK7SGTELIB11TrainingSet6get_ZsEii(ptr noundef nonnull align 8 dereferenceable(504) %114, i32 noundef %.040.lcssa, i32 noundef %.066113)
          to label %131 unwind label %112

116:                                              ; preds = %._crit_edge.thread, %._crit_edge.thread, %._crit_edge.thread
  %117 = load ptr, ptr %36, align 8, !tbaa !49
  %118 = invoke noundef double @_ZNK7SGTELIB11TrainingSet11get_Zs_meanEi(ptr noundef nonnull align 8 dereferenceable(504) %117, i32 noundef %.066113)
          to label %131 unwind label %.loopexit.split-lp.loopexit

119:                                              ; preds = %._crit_edge.thread
  %120 = call ptr @__cxa_allocate_exception(i64 112) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %121 unwind label %.thread

121:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %122 unwind label %125

122:                                              ; preds = %121
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %120, ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 306, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %123 unwind label %127

123:                                              ; preds = %122
  invoke void @__cxa_throw(ptr nonnull %120, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #13
          to label %156 unwind label %127

.thread:                                          ; preds = %119
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #10
  br label %130

125:                                              ; preds = %121
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %129

127:                                              ; preds = %123, %122
  %.0 = phi i1 [ false, %123 ], [ true, %122 ]
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  br label %129

129:                                              ; preds = %125, %127
  %.pn82 = phi { ptr, i32 } [ %128, %127 ], [ %126, %125 ]
  %.1 = phi i1 [ %.0, %127 ], [ true, %125 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #10
  br i1 %.1, label %130, label %.loopexit.split-lp

130:                                              ; preds = %.thread, %129
  %.pn82.pn93 = phi { ptr, i32 } [ %124, %.thread ], [ %.pn82, %129 ]
  call void @__cxa_free_exception(ptr %120) #10
  br label %.loopexit.split-lp

131:                                              ; preds = %116, %._crit_edge109, %101
  %.060 = phi double [ %102, %101 ], [ %115, %._crit_edge109 ], [ %118, %116 ]
  %132 = load ptr, ptr %24, align 8, !tbaa !9
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %132, i32 noundef %.065111, i32 noundef %.066113, double noundef %.060)
          to label %133 unwind label %.loopexit.split-lp.loopexit

133:                                              ; preds = %131
  %134 = add nuw nsw i32 %.065111, 1
  %135 = load i32, ptr %29, align 8, !tbaa !47
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %.preheader, label %._crit_edge112.loopexit, !llvm.loop !53

._crit_edge112.loopexit:                          ; preds = %133
  %.pre116 = load i32, ptr %31, align 4, !tbaa !48
  br label %._crit_edge112

._crit_edge112:                                   ; preds = %._crit_edge112.loopexit, %.preheader94
  %137 = phi i32 [ %.pre116, %._crit_edge112.loopexit ], [ %54, %.preheader94 ]
  %138 = phi i32 [ %135, %._crit_edge112.loopexit ], [ %55, %.preheader94 ]
  %139 = add nuw nsw i32 %.066113, 1
  %140 = icmp slt i32 %139, %137
  br i1 %140, label %.preheader94, label %._crit_edge114, !llvm.loop !54

._crit_edge114:                                   ; preds = %._crit_edge112, %49
  %141 = load ptr, ptr %24, align 8, !tbaa !9
  invoke void @_ZN7SGTELIB6Matrix11replace_nanEd(ptr noundef nonnull align 8 dereferenceable(56) %141, double noundef 0x7FEFFFFFFFFFFFFF)
          to label %142 unwind label %.loopexit.split-lp.loopexit.split-lp

142:                                              ; preds = %._crit_edge114
  %143 = load ptr, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %144 unwind label %146

144:                                              ; preds = %142
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %143, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %145 unwind label %148

145:                                              ; preds = %144
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #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
  %.pre117 = load ptr, ptr %24, align 8, !tbaa !9
  br label %153

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

148:                                              ; preds = %144
  %149 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  br label %150

150:                                              ; preds = %148, %146
  %.pn79 = phi { ptr, i32 } [ %149, %148 ], [ %147, %146 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #10
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %129, %130, %150, %112, %95
  %.pn86 = phi { ptr, i32 } [ %.pn82.pn93, %130 ], [ %.pn82, %129 ], [ %113, %112 ], [ %.pn79, %150 ], [ %.pn76.pn, %95 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit95, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp96, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #10
  br label %151

151:                                              ; preds = %.loopexit.split-lp, %86
  %.pn86.pn = phi { ptr, i32 } [ %.pn86, %.loopexit.split-lp ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #10
  br label %152

152:                                              ; preds = %151, %85
  %.pn86.pn.pn = phi { ptr, i32 } [ %.pn86.pn, %151 ], [ %.pn74, %85 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #10
  br label %155

153:                                              ; preds = %145, %23
  %154 = phi ptr [ %.pre117, %145 ], [ %25, %23 ]
  ret ptr %154

155:                                              ; preds = %80, %152, %75
  %.pn86.pn.pn.pn = phi { ptr, i32 } [ %.pn86.pn.pn, %152 ], [ %.pn72, %80 ], [ %.pn.pn, %75 ]
  resume { ptr, i32 } %.pn86.pn.pn.pn

156:                                              ; preds = %123
  unreachable
}

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

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

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

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

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

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

!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, !6, i64 344}
!48 = !{!10, !6, i64 332}
!49 = !{!10, !11, i64 8}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}
!52 = distinct !{!52, !51}
!53 = distinct !{!53, !51}
!54 = distinct !{!54, !51, !55}
!55 = !{!"llvm.loop.unswitch.partial.disable"}


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