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

; 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.std::allocator" = type { i8 }
%"class.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"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.23 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN7SGTELIB9Surrogate15predict_privateERKNS_6MatrixEPS1_S4_S4_S4_ = external hidden unnamed_addr constant [16 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; 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: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #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

; 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 uwtable
declare dso_local void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56)) #4 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB9Surrogate15predict_privateERKNS_6MatrixEPS1_S4_S4_S4_(ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator", align 1
  %26 = alloca i1, align 1
  %27 = alloca %"class.SGTELIB::Matrix", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator", align 1
  %30 = alloca double, align 8
  %31 = alloca %"class.SGTELIB::Matrix", align 8
  %32 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  %33 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.23, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %34 unwind label %56

34:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @__FUNCTION__._ZN7SGTELIB9Surrogate15predict_privateERKNS_6MatrixEPS1_S4_S4_S4_, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %35 unwind label %60

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store i32 515, ptr %19, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985) %33, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %36 unwind label %64

36:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %37)
  store i32 %38, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %39 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %33, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = call noundef double @_ZNK7SGTELIB11TrainingSet10get_fs_minEv(ptr noundef nonnull align 8 dereferenceable(504) %40)
  store double %41, ptr %21, align 8, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %50, label %44

44:                                               ; preds = %36
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %50, label %47

47:                                               ; preds = %44
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %70

50:                                               ; preds = %47, %44, %36
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load ptr, ptr %33, align 8, !tbaa !49
  %54 = getelementptr inbounds ptr, ptr %53, i64 4
  %55 = load ptr, ptr %54, align 8
  call void %55(ptr noundef nonnull align 8 dereferenceable(985) %33, ptr noundef nonnull align 8 dereferenceable(56) %51, ptr noundef %52)
  br label %70

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

60:                                               ; preds = %34
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %15, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %16, align 4
  br label %68

64:                                               ; preds = %35
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %15, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %68

68:                                               ; preds = %64, %60
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #9
  br label %69

69:                                               ; preds = %68, %56
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #9
  br label %279

70:                                               ; preds = %50, %47
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %79, label %73

73:                                               ; preds = %70
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %79, label %76

76:                                               ; preds = %73
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %277

79:                                               ; preds = %76, %73, %70
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %84

82:                                               ; preds = %79
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %83, double noundef 0xFFEFFFFFFFFFFFFF)
  br label %103

84:                                               ; preds = %79
  %85 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 56) #10
  store i1 true, ptr %26, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.31, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %86 unwind label %91

86:                                               ; preds = %84
  %87 = load i32, ptr %20, align 4, !tbaa !9
  %88 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %33, i32 0, i32 4
  %89 = load i32, ptr %88, align 4, !tbaa !51
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %85, ptr noundef nonnull align 8 dereferenceable(32) %24, i32 noundef %87, i32 noundef %89)
          to label %90 unwind label %95

90:                                               ; preds = %86
  store i1 false, ptr %26, align 1
  store ptr %85, ptr %10, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #9
  br label %103

91:                                               ; preds = %84
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %15, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %16, align 4
  br label %99

95:                                               ; preds = %86
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %15, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  br label %99

99:                                               ; preds = %95, %91
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #9
  %100 = load i1, ptr %26, align 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  call void @_ZdlPvm(ptr noundef %85, i64 noundef 56) #11
  br label %102

102:                                              ; preds = %101, %99
  br label %278

103:                                              ; preds = %90, %82
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = icmp ne ptr %104, null
  br i1 %105, label %106, label %108

106:                                              ; preds = %103
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %107, double noundef 0xFFEFFFFFFFFFFFFF)
  br label %108

108:                                              ; preds = %106, %103
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %113

111:                                              ; preds = %108
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %112, double noundef 0xFFEFFFFFFFFFFFFF)
  br label %113

113:                                              ; preds = %111, %108
  call void @llvm.lifetime.start.p0(i64 56, ptr %27) #9
  %114 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %33, i32 0, i32 1
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK7SGTELIB11TrainingSet23get_distance_to_closestERKNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %27, ptr noundef nonnull align 8 dereferenceable(504) %115, ptr noundef nonnull align 8 dereferenceable(56) %116)
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @.str.34, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %117 unwind label %168

117:                                              ; preds = %113
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 8 dereferenceable(32) %28)
          to label %118 unwind label %172

118:                                              ; preds = %117
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #9
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %271, %118
  %120 = load i32, ptr %23, align 4, !tbaa !9
  %121 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %33, i32 0, i32 4
  %122 = load i32, ptr %121, align 4, !tbaa !51
  %123 = icmp slt i32 %120, %122
  br i1 %123, label %124, label %275

124:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #9
  %125 = load i32, ptr %23, align 4, !tbaa !9
  %126 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %33, i32 noundef 2, i32 noundef %125)
          to label %127 unwind label %177

127:                                              ; preds = %124
  store double %126, ptr %30, align 8, !tbaa !48
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %31) #9
  %129 = load double, ptr %30, align 8, !tbaa !48
  invoke void @_ZplRKN7SGTELIB6MatrixEd(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %31, ptr noundef nonnull align 8 dereferenceable(56) %27, double noundef %129)
          to label %130 unwind label %181

130:                                              ; preds = %127
  %131 = load i32, ptr %23, align 4, !tbaa !9
  invoke void @_ZN7SGTELIB6Matrix7set_colERKS0_i(ptr noundef nonnull align 8 dereferenceable(56) %128, ptr noundef nonnull align 8 dereferenceable(56) %31, i32 noundef %131)
          to label %132 unwind label %185

132:                                              ; preds = %130
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %31) #9
  %133 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %33, i32 0, i32 1
  %134 = load ptr, ptr %133, align 8, !tbaa !11
  %135 = load i32, ptr %23, align 4, !tbaa !9
  %136 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %134, i32 noundef %135)
          to label %137 unwind label %177

137:                                              ; preds = %132
  %138 = icmp eq i32 %136, 0
  br i1 %138, label %139, label %222

139:                                              ; preds = %137
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %191

142:                                              ; preds = %139
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %143

143:                                              ; preds = %165, %142
  %144 = load i32, ptr %22, align 4, !tbaa !9
  %145 = load i32, ptr %20, align 4, !tbaa !9
  %146 = icmp slt i32 %144, %145
  br i1 %146, label %147, label %190

147:                                              ; preds = %143
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  %149 = load i32, ptr %22, align 4, !tbaa !9
  %150 = load i32, ptr %23, align 4, !tbaa !9
  %151 = load double, ptr %21, align 8, !tbaa !48
  %152 = load ptr, ptr %9, align 8, !tbaa !5
  %153 = load i32, ptr %22, align 4, !tbaa !9
  %154 = load i32, ptr %23, align 4, !tbaa !9
  %155 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %152, i32 noundef %153, i32 noundef %154)
          to label %156 unwind label %177

156:                                              ; preds = %147
  %157 = load ptr, ptr %10, align 8, !tbaa !5
  %158 = load i32, ptr %22, align 4, !tbaa !9
  %159 = load i32, ptr %23, align 4, !tbaa !9
  %160 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %157, i32 noundef %158, i32 noundef %159)
          to label %161 unwind label %177

161:                                              ; preds = %156
  %162 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %151, double noundef %155, double noundef %160)
          to label %163 unwind label %177

163:                                              ; preds = %161
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %148, i32 noundef %149, i32 noundef %150, double noundef %162)
          to label %164 unwind label %177

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %22, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %22, align 4, !tbaa !9
  br label %143, !llvm.loop !52

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

172:                                              ; preds = %117
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %15, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  br label %176

176:                                              ; preds = %172, %168
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #9
  br label %276

177:                                              ; preds = %222, %215, %212, %207, %199, %163, %161, %156, %147, %132, %124
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %15, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %16, align 4
  br label %274

181:                                              ; preds = %127
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %15, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %16, align 4
  br label %189

185:                                              ; preds = %130
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %15, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %16, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #9
  br label %189

189:                                              ; preds = %185, %181
  call void @llvm.lifetime.end.p0(i64 56, ptr %31) #9
  br label %274

190:                                              ; preds = %143
  br label %191

191:                                              ; preds = %190, %139
  %192 = load ptr, ptr %11, align 8, !tbaa !5
  %193 = icmp ne ptr %192, null
  br i1 %193, label %194, label %221

194:                                              ; preds = %191
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %195

195:                                              ; preds = %217, %194
  %196 = load i32, ptr %22, align 4, !tbaa !9
  %197 = load i32, ptr %20, align 4, !tbaa !9
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %199, label %220

199:                                              ; preds = %195
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = load i32, ptr %22, align 4, !tbaa !9
  %202 = load i32, ptr %23, align 4, !tbaa !9
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  %204 = load i32, ptr %22, align 4, !tbaa !9
  %205 = load i32, ptr %23, align 4, !tbaa !9
  %206 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %203, i32 noundef %204, i32 noundef %205)
          to label %207 unwind label %177

207:                                              ; preds = %199
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = load i32, ptr %22, align 4, !tbaa !9
  %210 = load i32, ptr %23, align 4, !tbaa !9
  %211 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %208, i32 noundef %209, i32 noundef %210)
          to label %212 unwind label %177

212:                                              ; preds = %207
  %213 = load double, ptr %21, align 8, !tbaa !48
  %214 = invoke noundef double @_ZN7SGTELIB6normeiEddd(double noundef %206, double noundef %211, double noundef %213)
          to label %215 unwind label %177

215:                                              ; preds = %212
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %200, i32 noundef %201, i32 noundef %202, double noundef %214)
          to label %216 unwind label %177

216:                                              ; preds = %215
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %22, align 4, !tbaa !9
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %22, align 4, !tbaa !9
  br label %195, !llvm.loop !54

220:                                              ; preds = %195
  br label %221

221:                                              ; preds = %220, %191
  br label %270

222:                                              ; preds = %137
  %223 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %33, i32 0, i32 1
  %224 = load ptr, ptr %223, align 8, !tbaa !11
  %225 = load i32, ptr %23, align 4, !tbaa !9
  %226 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %224, i32 noundef %225)
          to label %227 unwind label %177

227:                                              ; preds = %222
  %228 = icmp eq i32 %226, 1
  br i1 %228, label %229, label %269

229:                                              ; preds = %227
  %230 = load ptr, ptr %12, align 8, !tbaa !5
  %231 = icmp ne ptr %230, null
  br i1 %231, label %232, label %268

232:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  %233 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %33, i32 0, i32 1
  %234 = load ptr, ptr %233, align 8, !tbaa !11
  %235 = load i32, ptr %23, align 4, !tbaa !9
  %236 = invoke noundef double @_ZNK7SGTELIB11TrainingSet7Z_scaleEdi(ptr noundef nonnull align 8 dereferenceable(504) %234, double noundef 0.000000e+00, i32 noundef %235)
          to label %237 unwind label %263

237:                                              ; preds = %232
  store double %236, ptr %32, align 8, !tbaa !48
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %238

238:                                              ; preds = %260, %237
  %239 = load i32, ptr %22, align 4, !tbaa !9
  %240 = load i32, ptr %20, align 4, !tbaa !9
  %241 = icmp slt i32 %239, %240
  br i1 %241, label %242, label %267

242:                                              ; preds = %238
  %243 = load ptr, ptr %12, align 8, !tbaa !5
  %244 = load i32, ptr %22, align 4, !tbaa !9
  %245 = load i32, ptr %23, align 4, !tbaa !9
  %246 = load double, ptr %32, align 8, !tbaa !48
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = load i32, ptr %22, align 4, !tbaa !9
  %249 = load i32, ptr %23, align 4, !tbaa !9
  %250 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %247, i32 noundef %248, i32 noundef %249)
          to label %251 unwind label %263

251:                                              ; preds = %242
  %252 = load ptr, ptr %10, align 8, !tbaa !5
  %253 = load i32, ptr %22, align 4, !tbaa !9
  %254 = load i32, ptr %23, align 4, !tbaa !9
  %255 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %252, i32 noundef %253, i32 noundef %254)
          to label %256 unwind label %263

256:                                              ; preds = %251
  %257 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %246, double noundef %250, double noundef %255)
          to label %258 unwind label %263

258:                                              ; preds = %256
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %243, i32 noundef %244, i32 noundef %245, double noundef %257)
          to label %259 unwind label %263

259:                                              ; preds = %258
  br label %260

260:                                              ; preds = %259
  %261 = load i32, ptr %22, align 4, !tbaa !9
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %22, align 4, !tbaa !9
  br label %238, !llvm.loop !55

263:                                              ; preds = %258, %256, %251, %242, %232
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %15, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %274

267:                                              ; preds = %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  br label %268

268:                                              ; preds = %267, %229
  br label %269

269:                                              ; preds = %268, %227
  br label %270

270:                                              ; preds = %269, %221
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #9
  br label %271

271:                                              ; preds = %270
  %272 = load i32, ptr %23, align 4, !tbaa !9
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %23, align 4, !tbaa !9
  br label %119, !llvm.loop !56

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

275:                                              ; preds = %119
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %27) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %27) #9
  br label %277

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

277:                                              ; preds = %275, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  ret void

278:                                              ; preds = %276, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %279

279:                                              ; preds = %278, %69
  %280 = load ptr, ptr %15, align 8
  %281 = load i32, ptr %16, align 4
  %282 = insertvalue { ptr, i32 } poison, ptr %280, 0
  %283 = insertvalue { ptr, i32 } %282, i32 %281, 1
  resume { ptr, i32 } %283
}

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

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

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

declare void @_ZNK7SGTELIB11TrainingSet23get_distance_to_closestERKNS_6MatrixE(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)) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) #3 align 2

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

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

declare noundef double @_ZN7SGTELIB7normcdfEddd(double noundef, double noundef, double noundef) #5

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

declare noundef double @_ZN7SGTELIB6normeiEddd(double noundef, double noundef, double noundef) #5

declare noundef double @_ZNK7SGTELIB11TrainingSet7Z_scaleEdi(ptr noundef nonnull align 8 dereferenceable(504), double noundef, i32 noundef) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!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 = !{!17, !17, i64 0}
!49 = !{!50, !50, i64 0}
!50 = !{!"vtable pointer", !8, i64 0}
!51 = !{!12, !10, i64 332}
!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.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::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }

@.str.23 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__._ZN7SGTELIB9Surrogate15predict_privateERKNS_6MatrixEPS1_S4_S4_S4_ = external hidden unnamed_addr constant [16 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [4 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; 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: nounwind
declare void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #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

; 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 uwtable
declare dso_local void @_ZNK7SGTELIB9Surrogate11check_readyERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_RKi(ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

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

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

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

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

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

18:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @__FUNCTION__._ZN7SGTELIB9Surrogate15predict_privateERKNS_6MatrixEPS1_S4_S4_S4_, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %19 unwind label %34

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  store i32 515, ptr %11, 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) %7, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %20 unwind label %36

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  %21 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %1)
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = call noundef double @_ZNK7SGTELIB11TrainingSet10get_fs_minEv(ptr noundef nonnull align 8 dereferenceable(504) %23)
  %25 = icmp ne ptr %2, null
  %26 = icmp ne ptr %4, null
  %or.cond = or i1 %25, %26
  %27 = icmp ne ptr %5, null
  %or.cond3 = or i1 %or.cond, %27
  br i1 %or.cond3, label %28, label %40

28:                                               ; preds = %20
  %29 = load ptr, ptr %0, align 8, !tbaa !47
  %30 = getelementptr inbounds i8, ptr %29, i64 32
  %31 = load ptr, ptr %30, align 8
  call void %31(ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef %2)
  br label %40

32:                                               ; preds = %6
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %39

34:                                               ; preds = %18
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %38

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

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

39:                                               ; preds = %38, %32
  %.pn.pn = phi { ptr, i32 } [ %.pn, %38 ], [ %33, %32 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #9
  br label %117

40:                                               ; preds = %20, %28
  %41 = icmp ne ptr %3, null
  %or.cond5 = or i1 %41, %26
  %or.cond7 = or i1 %or.cond5, %27
  br i1 %or.cond7, label %42, label %116

42:                                               ; preds = %40
  br i1 %41, label %43, label %44

43:                                               ; preds = %42
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %3, double noundef 0xFFEFFFFFFFFFFFFF)
  br label %55

44:                                               ; preds = %42
  %45 = call noalias noundef nonnull dereferenceable(56) ptr @_Znwm(i64 noundef 56) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.31, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %46 unwind label %50

46:                                               ; preds = %44
  %47 = getelementptr inbounds i8, ptr %0, i64 332
  %48 = load i32, ptr %47, align 4, !tbaa !49
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %45, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef %21, i32 noundef %48)
          to label %49 unwind label %52

49:                                               ; preds = %46
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #9
  br label %55

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

52:                                               ; preds = %46
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  br label %54

54:                                               ; preds = %52, %50
  %.pn102 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #9
  call void @_ZdlPvm(ptr noundef nonnull %45, i64 noundef 56) #11
  br label %117

55:                                               ; preds = %49, %43
  %.0 = phi ptr [ %3, %43 ], [ %45, %49 ]
  br i1 %26, label %56, label %57

56:                                               ; preds = %55
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %4, double noundef 0xFFEFFFFFFFFFFFFF)
  br label %57

57:                                               ; preds = %56, %55
  br i1 %27, label %58, label %59

58:                                               ; preds = %57
  call void @_ZN7SGTELIB6Matrix4fillEd(ptr noundef nonnull align 8 dereferenceable(56) %5, double noundef 0xFFEFFFFFFFFFFFFF)
  br label %59

59:                                               ; preds = %58, %57
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #9
  %60 = load ptr, ptr %22, align 8, !tbaa !9
  call void @_ZNK7SGTELIB11TrainingSet23get_distance_to_closestERKNS_6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(504) %60, ptr noundef nonnull align 8 dereferenceable(56) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.34, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %61 unwind label %83

61:                                               ; preds = %59
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %62 unwind label %85

62:                                               ; preds = %61
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #9
  %63 = getelementptr inbounds i8, ptr %0, i64 332
  %64 = load i32, ptr %63, align 4, !tbaa !49
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph133, label %._crit_edge

.lr.ph133:                                        ; preds = %62
  %66 = icmp sgt i32 %21, 0
  %brmerge.not = and i1 %66, %27
  %brmerge137.not = and i1 %66, %26
  br label %67

67:                                               ; preds = %.lr.ph133, %.loopexit
  %.081130 = phi i32 [ 0, %.lr.ph133 ], [ %113, %.loopexit ]
  %68 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %0, i32 noundef 2, i32 noundef %.081130)
          to label %69 unwind label %.loopexit.split-lp.loopexit.split-lp

69:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %17) #9
  invoke void @_ZplRKN7SGTELIB6MatrixEd(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %17, ptr noundef nonnull align 8 dereferenceable(56) %14, double noundef %68)
          to label %70 unwind label %88

70:                                               ; preds = %69
  invoke void @_ZN7SGTELIB6Matrix7set_colERKS0_i(ptr noundef nonnull align 8 dereferenceable(56) %.0, ptr noundef nonnull align 8 dereferenceable(56) %17, i32 noundef %.081130)
          to label %71 unwind label %90

71:                                               ; preds = %70
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #9
  %72 = load ptr, ptr %22, align 8, !tbaa !9
  %73 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %72, i32 noundef %.081130)
          to label %74 unwind label %.loopexit.split-lp.loopexit.split-lp

74:                                               ; preds = %71
  %75 = icmp eq i32 %73, 0
  br i1 %75, label %76, label %99

76:                                               ; preds = %74
  br i1 %brmerge.not, label %.lr.ph127, label %.loopexit115

.lr.ph127:                                        ; preds = %76, %81
  %.082126 = phi i32 [ %82, %81 ], [ 0, %76 ]
  %77 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %.082126, i32 noundef %.081130)
  %78 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %.0, i32 noundef %.082126, i32 noundef %.081130)
  %79 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %24, double noundef %77, double noundef %78)
          to label %80 unwind label %.loopexit.split-lp.loopexit

80:                                               ; preds = %.lr.ph127
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef %.082126, i32 noundef %.081130, double noundef %79)
          to label %81 unwind label %.loopexit.split-lp.loopexit

81:                                               ; preds = %80
  %82 = add nuw nsw i32 %.082126, 1
  %exitcond140.not = icmp eq i32 %82, %21
  br i1 %exitcond140.not, label %.loopexit115, label %.lr.ph127, !llvm.loop !50

83:                                               ; preds = %59
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %87

85:                                               ; preds = %61
  %86 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #9
  br label %87

87:                                               ; preds = %85, %83
  %.pn104 = phi { ptr, i32 } [ %86, %85 ], [ %84, %83 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #9
  br label %.loopexit.split-lp

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

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

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

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

90:                                               ; preds = %70
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #9
  br label %92

92:                                               ; preds = %90, %88
  %.pn106 = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #9
  br label %.loopexit.split-lp

.loopexit115:                                     ; preds = %81, %76
  br i1 %brmerge137.not, label %.lr.ph129, label %.loopexit

.lr.ph129:                                        ; preds = %.loopexit115, %97
  %.183128 = phi i32 [ %98, %97 ], [ 0, %.loopexit115 ]
  %93 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %.183128, i32 noundef %.081130)
  %94 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %.0, i32 noundef %.183128, i32 noundef %.081130)
  %95 = invoke noundef double @_ZN7SGTELIB6normeiEddd(double noundef %93, double noundef %94, double noundef %24)
          to label %96 unwind label %.loopexit113

96:                                               ; preds = %.lr.ph129
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %4, i32 noundef %.183128, i32 noundef %.081130, double noundef %95)
          to label %97 unwind label %.loopexit113

97:                                               ; preds = %96
  %98 = add nuw nsw i32 %.183128, 1
  %exitcond141.not = icmp eq i32 %98, %21
  br i1 %exitcond141.not, label %.loopexit, label %.lr.ph129, !llvm.loop !52

99:                                               ; preds = %74
  %100 = load ptr, ptr %22, align 8, !tbaa !9
  %101 = invoke noundef i32 @_ZNK7SGTELIB11TrainingSet7get_bboEi(ptr noundef nonnull align 8 dereferenceable(504) %100, i32 noundef %.081130)
          to label %102 unwind label %.loopexit.split-lp.loopexit.split-lp

102:                                              ; preds = %99
  %103 = icmp eq i32 %101, 1
  %or.cond9 = and i1 %27, %103
  br i1 %or.cond9, label %104, label %.loopexit

104:                                              ; preds = %102
  %105 = load ptr, ptr %22, align 8, !tbaa !9
  %106 = invoke noundef double @_ZNK7SGTELIB11TrainingSet7Z_scaleEdi(ptr noundef nonnull align 8 dereferenceable(504) %105, double noundef 0.000000e+00, i32 noundef %.081130)
          to label %.preheader119 unwind label %.loopexit.split-lp122

.preheader119:                                    ; preds = %104
  br i1 %66, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader119, %111
  %.284125 = phi i32 [ %112, %111 ], [ 0, %.preheader119 ]
  %107 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %.284125, i32 noundef %.081130)
  %108 = call noundef double @_ZNK7SGTELIB6Matrix3getEii(ptr noundef nonnull align 8 dereferenceable(56) %.0, i32 noundef %.284125, i32 noundef %.081130)
  %109 = invoke noundef double @_ZN7SGTELIB7normcdfEddd(double noundef %106, double noundef %107, double noundef %108)
          to label %110 unwind label %.loopexit121

110:                                              ; preds = %.lr.ph
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef %.284125, i32 noundef %.081130, double noundef %109)
          to label %111 unwind label %.loopexit121

111:                                              ; preds = %110
  %112 = add nuw nsw i32 %.284125, 1
  %exitcond.not = icmp eq i32 %112, %21
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !53

.loopexit121:                                     ; preds = %.lr.ph, %110
  %lpad.loopexit123 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

.loopexit:                                        ; preds = %111, %97, %.loopexit115, %.preheader119, %102
  %113 = add nuw nsw i32 %.081130, 1
  %114 = load i32, ptr %63, align 4, !tbaa !49
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %67, label %._crit_edge, !llvm.loop !54

._crit_edge:                                      ; preds = %.loopexit, %62
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #9
  br label %116

.loopexit.split-lp:                               ; preds = %.loopexit121, %.loopexit.split-lp122, %.loopexit113, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %92, %87
  %.pn108.pn = phi { ptr, i32 } [ %.pn104, %87 ], [ %.pn106, %92 ], [ %lpad.loopexit, %.loopexit113 ], [ %lpad.loopexit116, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp117, %.loopexit.split-lp.loopexit.split-lp ], [ %lpad.loopexit123, %.loopexit121 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp122 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #9
  br label %117

116:                                              ; preds = %40, %._crit_edge
  ret void

117:                                              ; preds = %.loopexit.split-lp, %54, %39
  %.pn108.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %39 ], [ %.pn108.pn, %.loopexit.split-lp ], [ %.pn102, %54 ]
  resume { ptr, i32 } %.pn108.pn.pn.pn
}

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

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

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

declare void @_ZNK7SGTELIB11TrainingSet23get_distance_to_closestERKNS_6MatrixE(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)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

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

declare noundef double @_ZN7SGTELIB7normcdfEddd(double noundef, double noundef, double noundef) local_unnamed_addr #5

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

declare noundef double @_ZN7SGTELIB6normeiEddd(double noundef, double noundef, double noundef) local_unnamed_addr #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!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, !48, i64 0}
!48 = !{!"vtable pointer", !8, i64 0}
!49 = !{!10, !6, i64 332}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}
!52 = distinct !{!52, !51}
!53 = distinct !{!53, !51}
!54 = distinct !{!54, !51}


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