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

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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::__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::allocator" = type { i8 }

@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #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 nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind noalias 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) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB11TrainingSet13select_greedyB5cxx11ERKNS_6MatrixEiidNS_10distance_tE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::list") align 8 %0, ptr noundef nonnull align 8 dereferenceable(504) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %3, i32 noundef %4, double noundef %5, i32 noundef %6) #3 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca i1, align 1
  %24 = alloca i1, align 1
  %25 = alloca i32, align 4
  %26 = alloca %"class.SGTELIB::Matrix", align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca %"class.SGTELIB::Matrix", align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator", align 1
  %32 = alloca %"class.SGTELIB::Matrix", align 8
  %33 = alloca %"class.SGTELIB::Matrix", align 8
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator", align 1
  %36 = alloca %"class.SGTELIB::Matrix", align 8
  %37 = alloca %"class.SGTELIB::Matrix", align 8
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::allocator", align 1
  %40 = alloca %"class.SGTELIB::Matrix", align 8
  %41 = alloca double, align 8
  %42 = alloca i32, align 4
  %43 = alloca double, align 8
  %44 = alloca %"class.SGTELIB::Matrix", align 8
  %45 = alloca %"class.SGTELIB::Matrix", align 8
  %46 = alloca %"class.SGTELIB::Matrix", align 8
  %47 = alloca %"class.SGTELIB::Matrix", align 8
  %48 = alloca %"class.SGTELIB::Matrix", align 8
  %49 = alloca %"class.std::__cxx11::basic_string", align 8
  %50 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %8, align 8
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store double %5, ptr %13, align 8, !tbaa !11
  store i32 %6, ptr %14, align 4, !tbaa !13
  %51 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %52)
  store i32 %53, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %54)
  store i32 %55, ptr %16, align 4, !tbaa !9
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = icmp slt i32 %56, 3
  br i1 %57, label %62, label %58

58:                                               ; preds = %7
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = load i32, ptr %15, align 4, !tbaa !9
  %61 = icmp sge i32 %59, %60
  br i1 %61, label %62, label %88

62:                                               ; preds = %58, %7
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.38)
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %63, i32 noundef %64)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef @.str.7)
  store i1 true, ptr %23, align 1
  %67 = call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %68 unwind label %71

68:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.39, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %69 unwind label %75

69:                                               ; preds = %68
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %67, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef 1286, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %70 unwind label %79

70:                                               ; preds = %69
  store i1 false, ptr %23, align 1
  invoke void @__cxa_throw(ptr %67, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %349 unwind label %79

71:                                               ; preds = %62
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %19, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %20, align 4
  br label %84

75:                                               ; preds = %68
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %19, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %20, align 4
  br label %83

79:                                               ; preds = %70, %69
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %19, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %20, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %83

83:                                               ; preds = %79, %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %84

84:                                               ; preds = %83, %71
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  %85 = load i1, ptr %23, align 1
  br i1 %85, label %86, label %87

86:                                               ; preds = %84
  call void @__cxa_free_exception(ptr %67) #7
  br label %87

87:                                               ; preds = %86, %84
  br label %343

88:                                               ; preds = %58
  store i1 false, ptr %24, align 1
  call void @_ZNSt7__cxx114listIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  call void @_ZNSt7__cxx114listIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.40, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %89 unwind label %130

89:                                               ; preds = %88
  %90 = load i32, ptr %16, align 4, !tbaa !9
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 1, i32 noundef %90)
          to label %91 unwind label %134

91:                                               ; preds = %89
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef @.str.41, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %92 unwind label %139

92:                                               ; preds = %91
  %93 = load i32, ptr %16, align 4, !tbaa !9
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(32) %30, i32 noundef 1, i32 noundef %93)
          to label %94 unwind label %143

94:                                               ; preds = %92
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %32) #7
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = load i32, ptr %11, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB6Matrix7get_rowEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %32, ptr noundef nonnull align 8 dereferenceable(56) %95, i32 noundef %96)
          to label %97 unwind label %148

97:                                               ; preds = %94
  %98 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef nonnull align 8 dereferenceable(56) %32)
          to label %99 unwind label %152

99:                                               ; preds = %97
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %33) #7
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = load i32, ptr %14, align 4, !tbaa !13
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %33, ptr noundef nonnull align 8 dereferenceable(504) %51, ptr noundef nonnull align 8 dereferenceable(56) %100, ptr noundef nonnull align 8 dereferenceable(56) %26, i32 noundef %101)
          to label %102 unwind label %157

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef @.str.42, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %103 unwind label %161

103:                                              ; preds = %102
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %33, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %104 unwind label %165

104:                                              ; preds = %103
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #7
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %105 unwind label %170

105:                                              ; preds = %104
  %106 = invoke noundef i32 @_ZN7SGTELIB6Matrix13get_max_indexEv(ptr noundef nonnull align 8 dereferenceable(56) %33)
          to label %107 unwind label %170

107:                                              ; preds = %105
  store i32 %106, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 56, ptr %36) #7
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = load i32, ptr %25, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB6Matrix7get_rowEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %36, ptr noundef nonnull align 8 dereferenceable(56) %108, i32 noundef %109)
          to label %110 unwind label %174

110:                                              ; preds = %107
  %111 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef nonnull align 8 dereferenceable(56) %36)
          to label %112 unwind label %178

112:                                              ; preds = %110
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %37) #7
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = load i32, ptr %14, align 4, !tbaa !13
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %37, ptr noundef nonnull align 8 dereferenceable(504) %51, ptr noundef nonnull align 8 dereferenceable(56) %113, ptr noundef nonnull align 8 dereferenceable(56) %26, i32 noundef %114)
          to label %115 unwind label %183

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef @.str.43, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %116 unwind label %187

116:                                              ; preds = %115
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(32) %38)
          to label %117 unwind label %191

117:                                              ; preds = %116
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #7
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %118 unwind label %196

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 56, ptr %40) #7
  invoke void @_ZN7SGTELIB6Matrix3minERKS0_S2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %40, ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(56) %33)
          to label %119 unwind label %200

119:                                              ; preds = %118
  %120 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(56) %40)
          to label %121 unwind label %204

121:                                              ; preds = %119
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %40) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %40) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  store double 0.000000e+00, ptr %41, align 8, !tbaa !11
  %122 = load double, ptr %13, align 8, !tbaa !11
  %123 = fcmp une double %122, 0.000000e+00
  br i1 %123, label %124, label %242

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  store i32 0, ptr %42, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %234, %124
  %126 = load i32, ptr %42, align 4, !tbaa !9
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %209, label %129

129:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %238

130:                                              ; preds = %88
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %19, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %20, align 4
  br label %138

134:                                              ; preds = %89
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %19, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %20, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #7
  br label %138

138:                                              ; preds = %134, %130
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #7
  br label %340

139:                                              ; preds = %91
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %19, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %20, align 4
  br label %147

143:                                              ; preds = %92
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %19, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %20, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #7
  br label %147

147:                                              ; preds = %143, %139
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #7
  br label %339

148:                                              ; preds = %94
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %19, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %20, align 4
  br label %156

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

156:                                              ; preds = %152, %148
  call void @llvm.lifetime.end.p0(i64 56, ptr %32) #7
  br label %338

157:                                              ; preds = %99
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %19, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %20, align 4
  br label %337

161:                                              ; preds = %102
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %19, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %20, align 4
  br label %169

165:                                              ; preds = %103
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %19, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %20, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  br label %169

169:                                              ; preds = %165, %161
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #7
  br label %336

170:                                              ; preds = %105, %104
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %19, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %20, align 4
  br label %336

174:                                              ; preds = %107
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %19, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %20, align 4
  br label %182

178:                                              ; preds = %110
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %19, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %20, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #7
  br label %182

182:                                              ; preds = %178, %174
  call void @llvm.lifetime.end.p0(i64 56, ptr %36) #7
  br label %336

183:                                              ; preds = %112
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %19, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %20, align 4
  br label %335

187:                                              ; preds = %115
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %19, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %20, align 4
  br label %195

191:                                              ; preds = %116
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %19, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %20, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #7
  br label %195

195:                                              ; preds = %191, %187
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #7
  br label %334

196:                                              ; preds = %117
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %19, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %20, align 4
  br label %334

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

204:                                              ; preds = %119
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %19, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %20, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %40) #7
  br label %208

208:                                              ; preds = %204, %200
  call void @llvm.lifetime.end.p0(i64 56, ptr %40) #7
  br label %334

209:                                              ; preds = %125
  %210 = load i32, ptr %42, align 4, !tbaa !9
  %211 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %33, i32 noundef %210)
          to label %212 unwind label %225

212:                                              ; preds = %209
  %213 = fcmp ogt double %211, 0.000000e+00
  br i1 %213, label %214, label %233

214:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %215 = load i32, ptr %42, align 4, !tbaa !9
  %216 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %37, i32 noundef %215)
          to label %217 unwind label %229

217:                                              ; preds = %214
  %218 = load i32, ptr %42, align 4, !tbaa !9
  %219 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %33, i32 noundef %218)
          to label %220 unwind label %229

220:                                              ; preds = %217
  %221 = fdiv double %216, %219
  store double %221, ptr %43, align 8, !tbaa !11
  %222 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %223 unwind label %229

223:                                              ; preds = %220
  %224 = load double, ptr %222, align 8, !tbaa !11
  store double %224, ptr %41, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %233

225:                                              ; preds = %209
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %19, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %20, align 4
  br label %237

229:                                              ; preds = %220, %217, %214
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %19, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %237

233:                                              ; preds = %223, %212
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %42, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %42, align 4, !tbaa !9
  br label %125, !llvm.loop !15

237:                                              ; preds = %229, %225
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %333

238:                                              ; preds = %129
  %239 = load double, ptr %13, align 8, !tbaa !11
  %240 = load double, ptr %41, align 8, !tbaa !11
  %241 = fmul double %240, %239
  store double %241, ptr %41, align 8, !tbaa !11
  br label %242

242:                                              ; preds = %238, %121
  br label %243

243:                                              ; preds = %330, %242
  %244 = call noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %245 = trunc i64 %244 to i32
  %246 = load i32, ptr %12, align 4, !tbaa !9
  %247 = icmp slt i32 %245, %246
  br i1 %247, label %248, label %331

248:                                              ; preds = %243
  call void @llvm.lifetime.start.p0(i64 56, ptr %44) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %45) #7
  %249 = load double, ptr %41, align 8, !tbaa !11
  invoke void @_ZmldRKN7SGTELIB6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %45, double noundef %249, ptr noundef nonnull align 8 dereferenceable(56) %33)
          to label %250 unwind label %264

250:                                              ; preds = %248
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %44, ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(56) %45)
          to label %251 unwind label %268

251:                                              ; preds = %250
  %252 = invoke noundef i32 @_ZN7SGTELIB6Matrix13get_max_indexEv(ptr noundef nonnull align 8 dereferenceable(56) %44)
          to label %253 unwind label %272

253:                                              ; preds = %251
  store i32 %252, ptr %25, align 4, !tbaa !9
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %44) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %45) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %44) #7
  %254 = load i32, ptr %25, align 4, !tbaa !9
  %255 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %37, i32 noundef %254)
          to label %256 unwind label %278

256:                                              ; preds = %253
  %257 = fcmp oeq double %255, 0.000000e+00
  br i1 %257, label %258, label %283

258:                                              ; preds = %256
  %259 = load double, ptr %41, align 8, !tbaa !11
  %260 = fmul double %259, 0x3FEFAE147AE147AE
  store double %260, ptr %41, align 8, !tbaa !11
  %261 = load double, ptr %41, align 8, !tbaa !11
  %262 = fcmp olt double %261, 1.000000e-08
  br i1 %262, label %263, label %282

263:                                              ; preds = %258
  br label %331

264:                                              ; preds = %248
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %19, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %20, align 4
  br label %277

268:                                              ; preds = %250
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %19, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %20, align 4
  br label %276

272:                                              ; preds = %251
  %273 = landingpad { ptr, i32 }
          cleanup
  %274 = extractvalue { ptr, i32 } %273, 0
  store ptr %274, ptr %19, align 8
  %275 = extractvalue { ptr, i32 } %273, 1
  store i32 %275, ptr %20, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %44) #7
  br label %276

276:                                              ; preds = %272, %268
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %45) #7
  br label %277

277:                                              ; preds = %276, %264
  call void @llvm.lifetime.end.p0(i64 56, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %44) #7
  br label %333

278:                                              ; preds = %283, %253
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %19, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %20, align 4
  br label %333

282:                                              ; preds = %258
  br label %330

283:                                              ; preds = %256
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %284 unwind label %278

284:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 56, ptr %46) #7
  %285 = load ptr, ptr %10, align 8, !tbaa !5
  %286 = load i32, ptr %25, align 4, !tbaa !9
  invoke void @_ZNK7SGTELIB6Matrix7get_rowEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %46, ptr noundef nonnull align 8 dereferenceable(56) %285, i32 noundef %286)
          to label %287 unwind label %298

287:                                              ; preds = %284
  %288 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef nonnull align 8 dereferenceable(56) %46)
          to label %289 unwind label %302

289:                                              ; preds = %287
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %46) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %46) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %48) #7
  %290 = load ptr, ptr %10, align 8, !tbaa !5
  %291 = load i32, ptr %14, align 4, !tbaa !13
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %48, ptr noundef nonnull align 8 dereferenceable(504) %51, ptr noundef nonnull align 8 dereferenceable(56) %290, ptr noundef nonnull align 8 dereferenceable(56) %26, i32 noundef %291)
          to label %292 unwind label %307

292:                                              ; preds = %289
  invoke void @_ZN7SGTELIB6Matrix3minERKS0_S2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %47, ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(56) %48)
          to label %293 unwind label %311

293:                                              ; preds = %292
  %294 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(56) %47)
          to label %295 unwind label %315

295:                                              ; preds = %293
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %47) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %48) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %49) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %50) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %49, ptr noundef @.str.43, ptr noundef nonnull align 1 dereferenceable(1) %50)
          to label %296 unwind label %321

296:                                              ; preds = %295
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(32) %49)
          to label %297 unwind label %325

297:                                              ; preds = %296
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #7
  br label %330

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

302:                                              ; preds = %287
  %303 = landingpad { ptr, i32 }
          cleanup
  %304 = extractvalue { ptr, i32 } %303, 0
  store ptr %304, ptr %19, align 8
  %305 = extractvalue { ptr, i32 } %303, 1
  store i32 %305, ptr %20, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %46) #7
  br label %306

306:                                              ; preds = %302, %298
  call void @llvm.lifetime.end.p0(i64 56, ptr %46) #7
  br label %333

307:                                              ; preds = %289
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %19, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %20, align 4
  br label %320

311:                                              ; preds = %292
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %19, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %20, align 4
  br label %319

315:                                              ; preds = %293
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %19, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %20, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %47) #7
  br label %319

319:                                              ; preds = %315, %311
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %48) #7
  br label %320

320:                                              ; preds = %319, %307
  call void @llvm.lifetime.end.p0(i64 56, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %47) #7
  br label %333

321:                                              ; preds = %295
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %19, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %20, align 4
  br label %329

325:                                              ; preds = %296
  %326 = landingpad { ptr, i32 }
          cleanup
  %327 = extractvalue { ptr, i32 } %326, 0
  store ptr %327, ptr %19, align 8
  %328 = extractvalue { ptr, i32 } %326, 1
  store i32 %328, ptr %20, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %49) #7
  br label %329

329:                                              ; preds = %325, %321
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %50) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %49) #7
  br label %333

330:                                              ; preds = %297, %282
  br label %243, !llvm.loop !17

331:                                              ; preds = %263, %243
  store i1 true, ptr %24, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %33) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %33) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  %332 = load i1, ptr %24, align 1
  br i1 %332, label %342, label %341

333:                                              ; preds = %329, %320, %306, %278, %277, %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  br label %334

334:                                              ; preds = %333, %208, %196, %195
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #7
  br label %335

335:                                              ; preds = %334, %183
  call void @llvm.lifetime.end.p0(i64 56, ptr %37) #7
  br label %336

336:                                              ; preds = %335, %182, %170, %169
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %33) #7
  br label %337

337:                                              ; preds = %336, %157
  call void @llvm.lifetime.end.p0(i64 56, ptr %33) #7
  br label %338

338:                                              ; preds = %337, %156
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %29) #7
  br label %339

339:                                              ; preds = %338, %147
  call void @llvm.lifetime.end.p0(i64 56, ptr %29) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #7
  br label %340

340:                                              ; preds = %339, %138
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @_ZNSt7__cxx1110_List_baseIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %343

341:                                              ; preds = %331
  call void @_ZNSt7__cxx1110_List_baseIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %342

342:                                              ; preds = %341, %331
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  ret void

343:                                              ; preds = %340, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %344

344:                                              ; preds = %343
  %345 = load ptr, ptr %19, align 8
  %346 = load i32, ptr %20, align 4
  %347 = insertvalue { ptr, i32 } poison, ptr %345, 0
  %348 = insertvalue { ptr, i32 } %347, i32 %346, 1
  resume { ptr, i32 } %348

349:                                              ; preds = %70
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx114listIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

declare noundef i32 @_ZN7SGTELIB6Matrix13get_max_indexEv(ptr noundef nonnull align 8 dereferenceable(56)) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 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 = { nounwind }
attributes #8 = { 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, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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::__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::allocator" = type { i8 }

@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_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 nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind noalias 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 #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB11TrainingSet13select_greedyB5cxx11ERKNS_6MatrixEiidNS_10distance_tE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::list") align 8 %0, ptr noundef nonnull align 8 dereferenceable(504) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %3, i32 noundef %4, double noundef %5, i32 noundef %6) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i32, align 4
  %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
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %"class.SGTELIB::Matrix", align 8
  %21 = alloca %"class.SGTELIB::Matrix", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca %"class.SGTELIB::Matrix", align 8
  %25 = alloca %"class.SGTELIB::Matrix", align 8
  %26 = alloca %"class.std::__cxx11::basic_string", align 8
  %27 = alloca %"class.std::allocator", align 1
  %28 = alloca %"class.SGTELIB::Matrix", align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca %"class.SGTELIB::Matrix", align 8
  %32 = alloca %"class.SGTELIB::Matrix", align 8
  %33 = alloca %"class.SGTELIB::Matrix", align 8
  %34 = alloca %"class.SGTELIB::Matrix", align 8
  %35 = alloca %"class.SGTELIB::Matrix", align 8
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::allocator", align 1
  store i32 %3, ptr %8, align 4, !tbaa !5
  %38 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %39 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %2)
  %40 = icmp sgt i32 %4, 2
  %.not = icmp sgt i32 %38, %4
  %or.cond = and i1 %40, %.not
  br i1 %or.cond, label %56, label %41

41:                                               ; preds = %7
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.38)
  %43 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef %4)
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @.str.7)
  %45 = tail call ptr @__cxa_allocate_exception(i64 112) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %46 unwind label %.thread

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.39, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %47 unwind label %50

47:                                               ; preds = %46
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %45, ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1286, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %48 unwind label %52

48:                                               ; preds = %47
  invoke void @__cxa_throw(ptr nonnull %45, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #8
          to label %215 unwind label %52

.thread:                                          ; preds = %41
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %55

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

52:                                               ; preds = %48, %47
  %.030 = phi i1 [ false, %48 ], [ true, %47 ]
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %54

54:                                               ; preds = %50, %52
  %.pn95 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  %.1 = phi i1 [ %.030, %52 ], [ true, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br i1 %.1, label %55, label %214

55:                                               ; preds = %.thread, %54
  %.pn95.pn101 = phi { ptr, i32 } [ %49, %.thread ], [ %.pn95, %54 ]
  call void @__cxa_free_exception(ptr %45) #7
  br label %214

56:                                               ; preds = %7
  tail call void @_ZNSt7__cxx114listIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  tail call void @_ZNSt7__cxx114listIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.40, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %57 unwind label %85

57:                                               ; preds = %56
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 1, i32 noundef %39)
          to label %58 unwind label %87

58:                                               ; preds = %57
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %17) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.41, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %59 unwind label %90

59:                                               ; preds = %58
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 8 dereferenceable(32) %18, i32 noundef 1, i32 noundef %39)
          to label %60 unwind label %92

60:                                               ; preds = %59
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %20) #7
  %61 = load i32, ptr %8, align 4, !tbaa !5
  invoke void @_ZNK7SGTELIB6Matrix7get_rowEi(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %20, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %61)
          to label %62 unwind label %95

62:                                               ; preds = %60
  %63 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %20)
          to label %64 unwind label %97

64:                                               ; preds = %62
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %21) #7
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(504) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %14, i32 noundef %6)
          to label %65 unwind label %100

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @.str.42, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %66 unwind label %102

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

67:                                               ; preds = %66
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #7
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %68 unwind label %107

68:                                               ; preds = %67
  %69 = invoke noundef i32 @_ZN7SGTELIB6Matrix13get_max_indexEv(ptr noundef nonnull align 8 dereferenceable(56) %21)
          to label %70 unwind label %107

70:                                               ; preds = %68
  store i32 %69, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %24) #7
  invoke void @_ZNK7SGTELIB6Matrix7get_rowEi(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %24, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %69)
          to label %71 unwind label %109

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

73:                                               ; preds = %71
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %24) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %25) #7
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %25, ptr noundef nonnull align 8 dereferenceable(504) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %14, i32 noundef %6)
          to label %74 unwind label %114

74:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %26) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %27) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull @.str.43, ptr noundef nonnull align 1 dereferenceable(1) %27)
          to label %75 unwind label %116

75:                                               ; preds = %74
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %76 unwind label %118

76:                                               ; preds = %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #7
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %77 unwind label %121

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %28) #7
  invoke void @_ZN7SGTELIB6Matrix3minERKS0_S2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %28, ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(56) %21)
          to label %78 unwind label %123

78:                                               ; preds = %77
  %79 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(56) %28)
          to label %80 unwind label %125

80:                                               ; preds = %78
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %28) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #7
  store double 0.000000e+00, ptr %29, align 8, !tbaa !9
  %81 = fcmp une double %5, 0.000000e+00
  br i1 %81, label %.preheader, label %145

.preheader:                                       ; preds = %80
  %82 = icmp sgt i32 %38, 0
  br i1 %82, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %143
  %.pre = load double, ptr %29, align 8, !tbaa !9
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %83 = phi double [ %.pre, %._crit_edge.loopexit ], [ 0.000000e+00, %.preheader ]
  %84 = fmul double %83, %5
  store double %84, ptr %29, align 8, !tbaa !9
  br label %145

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

87:                                               ; preds = %57
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %89

89:                                               ; preds = %87, %85
  %.pn = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  br label %213

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

92:                                               ; preds = %59
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %94

94:                                               ; preds = %92, %90
  %.pn63 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %18) #7
  br label %212

95:                                               ; preds = %60
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

97:                                               ; preds = %62
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  br label %99

99:                                               ; preds = %97, %95
  %.pn65 = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %20) #7
  br label %211

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

102:                                              ; preds = %65
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %106

104:                                              ; preds = %66
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  br label %106

106:                                              ; preds = %104, %102
  %.pn67 = phi { ptr, i32 } [ %105, %104 ], [ %103, %102 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #7
  br label %209

107:                                              ; preds = %68, %67
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %209

109:                                              ; preds = %70
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %113

111:                                              ; preds = %71
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #7
  br label %113

113:                                              ; preds = %111, %109
  %.pn69 = phi { ptr, i32 } [ %112, %111 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %24) #7
  br label %209

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

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

118:                                              ; preds = %75
  %119 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br label %120

120:                                              ; preds = %118, %116
  %.pn71 = phi { ptr, i32 } [ %119, %118 ], [ %117, %116 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %27) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %27) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %26) #7
  br label %207

121:                                              ; preds = %76
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %207

123:                                              ; preds = %77
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %127

125:                                              ; preds = %78
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #7
  br label %127

127:                                              ; preds = %125, %123
  %.pn73 = phi { ptr, i32 } [ %126, %125 ], [ %124, %123 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %28) #7
  br label %207

.lr.ph:                                           ; preds = %.preheader, %143
  %.0102 = phi i32 [ %144, %143 ], [ 0, %.preheader ]
  %128 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %21, i32 noundef %.0102)
          to label %129 unwind label %139

129:                                              ; preds = %.lr.ph
  %130 = fcmp ogt double %128, 0.000000e+00
  br i1 %130, label %131, label %143

131:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %30) #7
  %132 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %25, i32 noundef %.0102)
          to label %133 unwind label %141

133:                                              ; preds = %131
  %134 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %21, i32 noundef %.0102)
          to label %135 unwind label %141

135:                                              ; preds = %133
  %136 = fdiv double %132, %134
  store double %136, ptr %30, align 8, !tbaa !9
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30)
  %138 = load double, ptr %137, align 8, !tbaa !9
  store double %138, ptr %29, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  br label %143

139:                                              ; preds = %.lr.ph
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %206

141:                                              ; preds = %133, %131
  %142 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %30) #7
  br label %206

143:                                              ; preds = %129, %135
  %144 = add nuw nsw i32 %.0102, 1
  %exitcond.not = icmp eq i32 %144, %38
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !11

145:                                              ; preds = %._crit_edge, %80
  %146 = call noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %147 = trunc i64 %146 to i32
  %148 = icmp slt i32 %147, %4
  br i1 %148, label %.lr.ph104, label %._crit_edge105

.lr.ph104:                                        ; preds = %145, %202
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %31) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %32) #7
  %149 = load double, ptr %29, align 8, !tbaa !9
  invoke void @_ZmldRKN7SGTELIB6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %32, double noundef %149, ptr noundef nonnull align 8 dereferenceable(56) %21)
          to label %150 unwind label %162

150:                                              ; preds = %.lr.ph104
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %31, ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(56) %32)
          to label %151 unwind label %164

151:                                              ; preds = %150
  %152 = invoke noundef i32 @_ZN7SGTELIB6Matrix13get_max_indexEv(ptr noundef nonnull align 8 dereferenceable(56) %31)
          to label %153 unwind label %166

153:                                              ; preds = %151
  store i32 %152, ptr %13, align 4, !tbaa !5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %31) #7
  %154 = load i32, ptr %13, align 4, !tbaa !5
  %155 = invoke noundef double @_ZNK7SGTELIB6Matrix3getEi(ptr noundef nonnull align 8 dereferenceable(56) %25, i32 noundef %154)
          to label %156 unwind label %170

156:                                              ; preds = %153
  %157 = fcmp oeq double %155, 0.000000e+00
  br i1 %157, label %158, label %172

158:                                              ; preds = %156
  %159 = load double, ptr %29, align 8, !tbaa !9
  %160 = fmul double %159, 0x3FEFAE147AE147AE
  store double %160, ptr %29, align 8, !tbaa !9
  %161 = fcmp olt double %160, 1.000000e-08
  br i1 %161, label %._crit_edge105, label %202

162:                                              ; preds = %.lr.ph104
  %163 = landingpad { ptr, i32 }
          cleanup
  br label %169

164:                                              ; preds = %150
  %165 = landingpad { ptr, i32 }
          cleanup
  br label %168

166:                                              ; preds = %151
  %167 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %31) #7
  br label %168

168:                                              ; preds = %166, %164
  %.pn75 = phi { ptr, i32 } [ %167, %166 ], [ %165, %164 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %32) #7
  br label %169

169:                                              ; preds = %168, %162
  %.pn75.pn = phi { ptr, i32 } [ %.pn75, %168 ], [ %163, %162 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %31) #7
  br label %206

170:                                              ; preds = %172, %153
  %171 = landingpad { ptr, i32 }
          cleanup
  br label %206

172:                                              ; preds = %156
  invoke void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %173 unwind label %170

173:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %33) #7
  %174 = load i32, ptr %13, align 4, !tbaa !5
  invoke void @_ZNK7SGTELIB6Matrix7get_rowEi(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %33, ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef %174)
          to label %175 unwind label %184

175:                                              ; preds = %173
  %176 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %33)
          to label %177 unwind label %186

177:                                              ; preds = %175
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %33) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %33) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %34) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %35) #7
  invoke void @_ZNK7SGTELIB11TrainingSet13get_distancesERKNS_6MatrixES3_NS_10distance_tE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %35, ptr noundef nonnull align 8 dereferenceable(504) %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %14, i32 noundef %6)
          to label %178 unwind label %189

178:                                              ; preds = %177
  invoke void @_ZN7SGTELIB6Matrix3minERKS0_S2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %34, ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(56) %35)
          to label %179 unwind label %191

179:                                              ; preds = %178
  %180 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(56) %34)
          to label %181 unwind label %193

181:                                              ; preds = %179
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %34) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %34) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %36) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %37) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull @.str.43, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %182 unwind label %197

182:                                              ; preds = %181
  invoke void @_ZN7SGTELIB6Matrix8set_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(56) %25, ptr noundef nonnull align 8 dereferenceable(32) %36)
          to label %183 unwind label %199

183:                                              ; preds = %182
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %37) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %36) #7
  br label %202

184:                                              ; preds = %173
  %185 = landingpad { ptr, i32 }
          cleanup
  br label %188

186:                                              ; preds = %175
  %187 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %33) #7
  br label %188

188:                                              ; preds = %186, %184
  %.pn78 = phi { ptr, i32 } [ %187, %186 ], [ %185, %184 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %33) #7
  br label %206

189:                                              ; preds = %177
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %196

191:                                              ; preds = %178
  %192 = landingpad { ptr, i32 }
          cleanup
  br label %195

193:                                              ; preds = %179
  %194 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %34) #7
  br label %195

195:                                              ; preds = %193, %191
  %.pn80 = phi { ptr, i32 } [ %194, %193 ], [ %192, %191 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %35) #7
  br label %196

196:                                              ; preds = %195, %189
  %.pn80.pn = phi { ptr, i32 } [ %.pn80, %195 ], [ %190, %189 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %34) #7
  br label %206

197:                                              ; preds = %181
  %198 = landingpad { ptr, i32 }
          cleanup
  br label %201

199:                                              ; preds = %182
  %200 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  br label %201

201:                                              ; preds = %199, %197
  %.pn83 = phi { ptr, i32 } [ %200, %199 ], [ %198, %197 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %37) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %36) #7
  br label %206

202:                                              ; preds = %158, %183
  %203 = call noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %204 = trunc i64 %203 to i32
  %205 = icmp slt i32 %204, %4
  br i1 %205, label %.lr.ph104, label %._crit_edge105, !llvm.loop !13

._crit_edge105:                                   ; preds = %202, %158, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %25) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %21) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  ret void

206:                                              ; preds = %139, %141, %201, %196, %188, %170, %169
  %.pn85.pn = phi { ptr, i32 } [ %.pn83, %201 ], [ %.pn80.pn, %196 ], [ %.pn78, %188 ], [ %171, %170 ], [ %.pn75.pn, %169 ], [ %142, %141 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #7
  br label %207

207:                                              ; preds = %206, %127, %121, %120
  %.pn85.pn.pn = phi { ptr, i32 } [ %.pn85.pn, %206 ], [ %.pn73, %127 ], [ %122, %121 ], [ %.pn71, %120 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #7
  br label %208

208:                                              ; preds = %207, %114
  %.pn85.pn.pn.pn = phi { ptr, i32 } [ %.pn85.pn.pn, %207 ], [ %115, %114 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %25) #7
  br label %209

209:                                              ; preds = %208, %113, %107, %106
  %.pn85.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn85.pn.pn.pn, %208 ], [ %.pn69, %113 ], [ %108, %107 ], [ %.pn67, %106 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #7
  br label %210

210:                                              ; preds = %209, %100
  %.pn85.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn85.pn.pn.pn.pn, %209 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %21) #7
  br label %211

211:                                              ; preds = %210, %99
  %.pn85.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn85.pn.pn.pn.pn.pn, %210 ], [ %.pn65, %99 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #7
  br label %212

212:                                              ; preds = %211, %94
  %.pn85.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn85.pn.pn.pn.pn.pn.pn, %211 ], [ %.pn63, %94 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %17) #7
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #7
  br label %213

213:                                              ; preds = %212, %89
  %.pn85.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn85.pn.pn.pn.pn.pn.pn.pn, %212 ], [ %.pn, %89 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @_ZNSt7__cxx1110_List_baseIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %214

214:                                              ; preds = %54, %55, %213
  %.pn95.pn.pn = phi { ptr, i32 } [ %.pn95.pn101, %55 ], [ %.pn95, %54 ], [ %.pn85.pn.pn.pn.pn.pn.pn.pn.pn, %213 ]
  resume { ptr, i32 } %.pn95.pn.pn

215:                                              ; preds = %48
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx114listIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx114listIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

declare noundef i32 @_ZN7SGTELIB6Matrix13get_max_indexEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt7__cxx114listIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 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 = { nounwind }
attributes #8 = { 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, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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