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

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

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

@.str.23 = external hidden unnamed_addr constant [88 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.38 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [23 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7SGTELIB9Surrogate10is_definedENS_8metric_tE(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB9Surrogate14compute_metricENS_8metric_tE(ptr noundef nonnull align 8 dereferenceable(985) %0, i32 noundef %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.SGTELIB::Matrix", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %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 i32, align 4
  %18 = alloca %"class.SGTELIB::Matrix", align 8
  %19 = alloca %"class.SGTELIB::Matrix", align 8
  %20 = alloca %"class.SGTELIB::Matrix", align 8
  %21 = alloca %"class.SGTELIB::Matrix", align 8
  %22 = alloca %"class.SGTELIB::Matrix", align 8
  %23 = alloca %"class.SGTELIB::Matrix", align 8
  %24 = alloca %"class.SGTELIB::Matrix", align 8
  %25 = alloca %"class.SGTELIB::Matrix", align 8
  %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.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %32 = load ptr, ptr %4, align 8
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = call noundef zeroext i1 @_ZN7SGTELIB9Surrogate10is_definedENS_8metric_tE(ptr noundef nonnull align 8 dereferenceable(985) %32, i32 noundef %33)
  br i1 %34, label %35, label %36

35:                                               ; preds = %2
  store i1 true, ptr %3, align 1
  br label %269

36:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %8) #5
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %8, ptr noundef nonnull align 8 dereferenceable(985) %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = invoke noundef zeroext i1 @_ZN7SGTELIB14metric_uses_cvENS_8metric_tE(i32 noundef %37)
          to label %39 unwind label %51

39:                                               ; preds = %36
  br i1 %38, label %40, label %55

40:                                               ; preds = %39
  %41 = load ptr, ptr %32, align 8, !tbaa !11
  %42 = getelementptr inbounds ptr, ptr %41, i64 7
  %43 = load ptr, ptr %42, align 8
  %44 = invoke noundef ptr %43(ptr noundef nonnull align 8 dereferenceable(985) %32)
          to label %45 unwind label %51

45:                                               ; preds = %40
  store ptr %44, ptr %9, align 8, !tbaa !5
  %46 = load ptr, ptr %32, align 8, !tbaa !11
  %47 = getelementptr inbounds ptr, ptr %46, i64 10
  %48 = load ptr, ptr %47, align 8
  %49 = invoke noundef ptr %48(ptr noundef nonnull align 8 dereferenceable(985) %32)
          to label %50 unwind label %51

50:                                               ; preds = %45
  store ptr %49, ptr %10, align 8, !tbaa !5
  br label %66

51:                                               ; preds = %60, %55, %45, %40, %36
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %11, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %12, align 4
  br label %268

55:                                               ; preds = %39
  %56 = load ptr, ptr %32, align 8, !tbaa !11
  %57 = getelementptr inbounds ptr, ptr %56, i64 8
  %58 = load ptr, ptr %57, align 8
  %59 = invoke noundef ptr %58(ptr noundef nonnull align 8 dereferenceable(985) %32)
          to label %60 unwind label %51

60:                                               ; preds = %55
  store ptr %59, ptr %9, align 8, !tbaa !5
  %61 = load ptr, ptr %32, align 8, !tbaa !11
  %62 = getelementptr inbounds ptr, ptr %61, i64 9
  %63 = load ptr, ptr %62, align 8
  %64 = invoke noundef ptr %63(ptr noundef nonnull align 8 dereferenceable(985) %32)
          to label %65 unwind label %51

65:                                               ; preds = %60
  store ptr %64, ptr %10, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %65, %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %67 = load i32, ptr %5, align 4, !tbaa !9
  %68 = invoke noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef %67)
          to label %69 unwind label %80

69:                                               ; preds = %66
  br i1 %68, label %70, label %73

70:                                               ; preds = %69
  %71 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %32, i32 0, i32 4
  %72 = load i32, ptr %71, align 4, !tbaa !13
  br label %74

73:                                               ; preds = %69
  br label %74

74:                                               ; preds = %73, %70
  %75 = phi i32 [ %72, %70 ], [ 1, %73 ]
  store i32 %75, ptr %13, align 4, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 56, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.38, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %76 unwind label %84

76:                                               ; preds = %74
  %77 = load i32, ptr %13, align 4, !tbaa !50
  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 %77)
          to label %78 unwind label %88

78:                                               ; preds = %76
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %79 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %79, label %208 [
    i32 0, label %93
    i32 1, label %93
    i32 2, label %93
    i32 4, label %93
    i32 3, label %93
    i32 5, label %93
    i32 6, label %144
    i32 7, label %144
    i32 8, label %158
    i32 9, label %158
    i32 10, label %174
    i32 11, label %174
    i32 12, label %203
  ]

80:                                               ; preds = %66
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %11, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %12, align 4
  br label %267

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

88:                                               ; preds = %76
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %11, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %92

92:                                               ; preds = %88, %84
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %266

93:                                               ; preds = %78, %78, %78, %78, %78, %78
  %94 = load i32, ptr %5, align 4, !tbaa !9
  %95 = invoke noundef i32 @_ZN7SGTELIB24metric_type_to_norm_typeENS_8metric_tE(i32 noundef %94)
          to label %96 unwind label %112

96:                                               ; preds = %93
  store i32 %95, ptr %17, align 4, !tbaa !51
  call void @llvm.lifetime.start.p0(i64 56, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %19) #5
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %19, ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 8 dereferenceable(56) %97)
          to label %98 unwind label %116

98:                                               ; preds = %96
  %99 = load i32, ptr %17, align 4, !tbaa !51
  invoke void @_ZNK7SGTELIB6Matrix8col_normENS_6norm_tE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %18, ptr noundef nonnull align 8 dereferenceable(56) %19, i32 noundef %99)
          to label %100 unwind label %120

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %18)
          to label %102 unwind label %124

102:                                              ; preds = %100
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #5
  %103 = load i32, ptr %5, align 4, !tbaa !9
  %104 = icmp eq i32 %103, 3
  br i1 %104, label %108, label %105

105:                                              ; preds = %102
  %106 = load i32, ptr %5, align 4, !tbaa !9
  %107 = icmp eq i32 %106, 5
  br i1 %107, label %108, label %139

108:                                              ; preds = %105, %102
  call void @llvm.lifetime.start.p0(i64 56, ptr %20) #5
  invoke void @_ZNK7SGTELIB6Matrix3sumEi(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %20, ptr noundef nonnull align 8 dereferenceable(56) %14, i32 noundef 1)
          to label %109 unwind label %130

109:                                              ; preds = %108
  %110 = 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 %111 unwind label %134

111:                                              ; preds = %109
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #5
  br label %143

112:                                              ; preds = %262, %259, %252, %238, %235, %203, %139, %93
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %11, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %12, align 4
  br label %265

116:                                              ; preds = %96
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %11, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %12, align 4
  br label %129

120:                                              ; preds = %98
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %11, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %12, align 4
  br label %128

124:                                              ; preds = %100
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %11, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  br label %128

128:                                              ; preds = %124, %120
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #5
  br label %129

129:                                              ; preds = %128, %116
  call void @llvm.lifetime.end.p0(i64 56, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #5
  br label %265

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

134:                                              ; preds = %109
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %11, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  br label %138

138:                                              ; preds = %134, %130
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #5
  br label %265

139:                                              ; preds = %105
  %140 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %32, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !53
  invoke void @_ZN7SGTELIB11TrainingSet10ZE_unscaleERKNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %21, ptr noundef nonnull align 8 dereferenceable(504) %141, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %142 unwind label %112

142:                                              ; preds = %139
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %21) #5
  br label %143

143:                                              ; preds = %142, %111
  br label %230

144:                                              ; preds = %78, %78
  call void @llvm.lifetime.start.p0(i64 56, ptr %22) #5
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB9Surrogate19compute_order_errorERKNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %22, ptr noundef nonnull align 8 dereferenceable(985) %32, ptr noundef nonnull align 8 dereferenceable(56) %145)
          to label %146 unwind label %149

146:                                              ; preds = %144
  %147 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %22)
          to label %148 unwind label %153

148:                                              ; preds = %146
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #5
  br label %230

149:                                              ; preds = %144
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %11, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %12, align 4
  br label %157

153:                                              ; preds = %146
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %11, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  br label %157

157:                                              ; preds = %153, %149
  call void @llvm.lifetime.end.p0(i64 56, ptr %22) #5
  br label %265

158:                                              ; preds = %78, %78
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #5
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = invoke noundef double @_ZN7SGTELIB9Surrogate29compute_aggregate_order_errorERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(985) %32, ptr noundef nonnull align 8 dereferenceable(56) %159)
          to label %161 unwind label %165

161:                                              ; preds = %158
  invoke void @_ZN7SGTELIB6MatrixC1Ed(ptr noundef nonnull align 8 dereferenceable(56) %23, double noundef %160)
          to label %162 unwind label %165

162:                                              ; preds = %161
  %163 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %164 unwind label %169

164:                                              ; preds = %162
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #5
  br label %230

165:                                              ; preds = %161, %158
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %11, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %12, align 4
  br label %173

169:                                              ; preds = %162
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %11, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %23) #5
  br label %173

173:                                              ; preds = %169, %165
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #5
  br label %265

174:                                              ; preds = %78, %78
  call void @llvm.lifetime.start.p0(i64 56, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %26) #5
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB9Surrogate11compute_efiERKNS_6MatrixES3_(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %26, ptr noundef nonnull align 8 dereferenceable(985) %32, ptr noundef nonnull align 8 dereferenceable(56) %175, ptr noundef nonnull align 8 dereferenceable(56) %176)
          to label %177 unwind label %184

177:                                              ; preds = %174
  invoke void @_ZngRKN7SGTELIB6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %25, ptr noundef nonnull align 8 dereferenceable(56) %26)
          to label %178 unwind label %188

178:                                              ; preds = %177
  %179 = invoke noundef double @_ZN7SGTELIB9Surrogate29compute_aggregate_order_errorERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(985) %32, ptr noundef nonnull align 8 dereferenceable(56) %25)
          to label %180 unwind label %192

180:                                              ; preds = %178
  invoke void @_ZN7SGTELIB6MatrixC1Ed(ptr noundef nonnull align 8 dereferenceable(56) %24, double noundef %179)
          to label %181 unwind label %192

181:                                              ; preds = %180
  %182 = 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 %183 unwind label %196

183:                                              ; preds = %181
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #5
  br label %230

184:                                              ; preds = %174
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %11, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %12, align 4
  br label %202

188:                                              ; preds = %177
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %11, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %12, align 4
  br label %201

192:                                              ; preds = %180, %178
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %11, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %12, align 4
  br label %200

196:                                              ; preds = %181
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %11, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %12, align 4
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #5
  br label %200

200:                                              ; preds = %196, %192
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %25) #5
  br label %201

201:                                              ; preds = %200, %188
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #5
  br label %202

202:                                              ; preds = %201, %184
  call void @llvm.lifetime.end.p0(i64 56, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #5
  br label %265

203:                                              ; preds = %78
  %204 = load ptr, ptr %32, align 8, !tbaa !11
  %205 = getelementptr inbounds ptr, ptr %204, i64 2
  %206 = load ptr, ptr %205, align 8
  invoke void %206(ptr noundef nonnull align 8 dereferenceable(985) %32)
          to label %207 unwind label %112

207:                                              ; preds = %203
  br label %230

208:                                              ; preds = %78
  store i1 true, ptr %31, align 1
  %209 = call ptr @__cxa_allocate_exception(i64 112) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.23, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %210 unwind label %213

210:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef @.str.39, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %211 unwind label %217

211:                                              ; preds = %210
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %209, ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 893, ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %212 unwind label %221

212:                                              ; preds = %211
  store i1 false, ptr %31, align 1
  invoke void @__cxa_throw(ptr %209, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #6
          to label %276 unwind label %221

213:                                              ; preds = %208
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %11, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %12, align 4
  br label %226

217:                                              ; preds = %210
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %11, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %12, align 4
  br label %225

221:                                              ; preds = %212, %211
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %11, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #5
  br label %225

225:                                              ; preds = %221, %217
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #5
  br label %226

226:                                              ; preds = %225, %213
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #5
  %227 = load i1, ptr %31, align 1
  br i1 %227, label %228, label %229

228:                                              ; preds = %226
  call void @__cxa_free_exception(ptr %209) #5
  br label %229

229:                                              ; preds = %228, %226
  br label %265

230:                                              ; preds = %207, %183, %164, %148, %143
  store i32 0, ptr %7, align 4, !tbaa !50
  br label %231

231:                                              ; preds = %256, %230
  %232 = load i32, ptr %7, align 4, !tbaa !50
  %233 = load i32, ptr %13, align 4, !tbaa !50
  %234 = icmp slt i32 %232, %233
  br i1 %234, label %235, label %259

235:                                              ; preds = %231
  %236 = load i32, ptr %7, align 4, !tbaa !50
  %237 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %14, i32 noundef %236)
          to label %238 unwind label %112

238:                                              ; preds = %235
  %239 = load double, ptr %237, align 8, !tbaa !54
  store double %239, ptr %6, align 8, !tbaa !54
  %240 = load double, ptr %6, align 8, !tbaa !54
  %241 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %240)
          to label %242 unwind label %112

242:                                              ; preds = %238
  br i1 %241, label %243, label %244

243:                                              ; preds = %242
  store double 0x7FEFFFFFFFFFFFFF, ptr %6, align 8, !tbaa !54
  br label %244

244:                                              ; preds = %243, %242
  %245 = load double, ptr %6, align 8, !tbaa !54
  %246 = fcmp olt double %245, -1.000000e-13
  br i1 %246, label %247, label %248

247:                                              ; preds = %244
  store double 0x7FEFFFFFFFFFFFFF, ptr %6, align 8, !tbaa !54
  br label %248

248:                                              ; preds = %247, %244
  %249 = load double, ptr %6, align 8, !tbaa !54
  %250 = fcmp ole double %249, 0.000000e+00
  br i1 %250, label %251, label %252

251:                                              ; preds = %248
  store double 0.000000e+00, ptr %6, align 8, !tbaa !54
  br label %252

252:                                              ; preds = %251, %248
  %253 = load i32, ptr %7, align 4, !tbaa !50
  %254 = load double, ptr %6, align 8, !tbaa !54
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %14, i32 noundef 0, i32 noundef %253, double noundef %254)
          to label %255 unwind label %112

255:                                              ; preds = %252
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %7, align 4, !tbaa !50
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %7, align 4, !tbaa !50
  br label %231, !llvm.loop !55

259:                                              ; preds = %231
  %260 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %32, i32 0, i32 16
  %261 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %260, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %262 unwind label %112

262:                                              ; preds = %259
  %263 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %261, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %264 unwind label %112

264:                                              ; preds = %262
  store i1 true, ptr %3, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %269

265:                                              ; preds = %229, %202, %173, %157, %138, %129, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  br label %266

266:                                              ; preds = %265, %92
  call void @llvm.lifetime.end.p0(i64 56, ptr %14) #5
  br label %267

267:                                              ; preds = %266, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %268

268:                                              ; preds = %267, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %271

269:                                              ; preds = %264, %35
  %270 = load i1, ptr %3, align 1
  ret i1 %270

271:                                              ; preds = %268
  %272 = load ptr, ptr %11, align 8
  %273 = load i32, ptr %12, align 4
  %274 = insertvalue { ptr, i32 } poison, ptr %272, 0
  %275 = insertvalue { ptr, i32 } %274, i32 %273, 1
  resume { ptr, i32 } %275

276:                                              ; preds = %212
  unreachable
}

declare noundef zeroext i1 @_ZN7SGTELIB14metric_uses_cvENS_8metric_tE(i32 noundef) #2

declare noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef) #2

declare noundef i32 @_ZN7SGTELIB24metric_type_to_norm_typeENS_8metric_tE(i32 noundef) #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)) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9Surrogate19compute_order_errorERKNS_6MatrixE(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(56)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN7SGTELIB9Surrogate29compute_aggregate_order_errorERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(56)) #4 align 2

declare void @_ZN7SGTELIB6MatrixC1Ed(ptr noundef nonnull align 8 dereferenceable(56), double noundef) unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9Surrogate11compute_efiERKNS_6MatrixES3_(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !17, i64 332}
!14 = !{!"_ZTSN7SGTELIB9SurrogateE", !6, i64 8, !15, i64 16, !17, i64 328, !17, i64 332, !17, i64 336, !17, i64 340, !17, i64 344, !17, i64 348, !28, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !29, i64 392, !34, i64 416, !20, i64 464, !42, i64 472, !28, i64 984}
!15 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !16, i64 8, !17, i64 12, !18, i64 16, !19, i64 20, !18, i64 24, !20, i64 32, !18, i64 40, !20, i64 48, !18, i64 56, !21, i64 60, !18, i64 64, !22, i64 72, !26, i64 128, !18, i64 132, !27, i64 136, !20, i64 144, !20, i64 152, !20, i64 160, !20, i64 168, !22, i64 176, !18, i64 232, !10, i64 236, !23, i64 240, !23, i64 272, !17, i64 304, !17, i64 308}
!16 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!19 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!22 = !{!"_ZTSN7SGTELIB6MatrixE", !23, i64 8, !17, i64 40, !17, i64 44, !6, i64 48}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !25, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"long", !7, i64 0}
!26 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!27 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!28 = !{!"bool", !7, i64 0}
!29 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !30, i64 0}
!30 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !31, i64 0}
!31 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !32, i64 0}
!32 = !{!"_ZTSNSt8__detail17_List_node_headerE", !33, i64 0, !25, i64 16}
!33 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!34 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !35, i64 0}
!35 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !36, i64 0}
!36 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !37, i64 0, !39, i64 8}
!37 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !38, i64 0}
!38 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!39 = !{!"_ZTSSt15_Rb_tree_header", !40, i64 0, !25, i64 32}
!40 = !{!"_ZTSSt18_Rb_tree_node_base", !41, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!41 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!42 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !43, i64 0, !44, i64 8}
!43 = !{!"_ZTSSo"}
!44 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !45, i64 0, !7, i64 64, !47, i64 104, !48, i64 120, !49, i64 124, !49, i64 132, !49, i64 140, !6, i64 152, !25, i64 160, !28, i64 168, !28, i64 169, !28, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !28, i64 192, !6, i64 200, !6, i64 208, !25, i64 216, !6, i64 224, !6, i64 232}
!45 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !46, i64 56}
!46 = !{!"_ZTSSt6locale", !6, i64 0}
!47 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !28, i64 8}
!48 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!49 = !{!"_ZTS11__mbstate_t", !17, i64 0, !7, i64 4}
!50 = !{!17, !17, i64 0}
!51 = !{!52, !52, i64 0}
!52 = !{!"_ZTSN7SGTELIB6norm_tE", !7, i64 0}
!53 = !{!14, !6, i64 8}
!54 = !{!20, !20, i64 0}
!55 = distinct !{!55, !56}
!56 = !{!"llvm.loop.mustprogress"}


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

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

@.str.23 = external hidden unnamed_addr constant [88 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.38 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [23 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7SGTELIB9Surrogate10is_definedENS_8metric_tE(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7SGTELIB9Surrogate14compute_metricENS_8metric_tE(ptr noundef nonnull align 8 dereferenceable(985) %0, i32 noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca %"class.SGTELIB::Matrix", align 8
  %5 = alloca %"class.SGTELIB::Matrix", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.SGTELIB::Matrix", align 8
  %9 = alloca %"class.SGTELIB::Matrix", align 8
  %10 = alloca %"class.SGTELIB::Matrix", align 8
  %11 = alloca %"class.SGTELIB::Matrix", align 8
  %12 = alloca %"class.SGTELIB::Matrix", align 8
  %13 = alloca %"class.SGTELIB::Matrix", align 8
  %14 = alloca %"class.SGTELIB::Matrix", align 8
  %15 = alloca %"class.SGTELIB::Matrix", align 8
  %16 = alloca %"class.SGTELIB::Matrix", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  store i32 %1, ptr %3, align 4, !tbaa !5
  %21 = tail call noundef zeroext i1 @_ZN7SGTELIB9Surrogate10is_definedENS_8metric_tE(ptr noundef nonnull align 8 dereferenceable(985) %0, i32 noundef %1)
  br i1 %21, label %161, label %22

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #5
  call void @_ZN7SGTELIB9Surrogate13get_matrix_ZsEv(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %4, ptr noundef nonnull align 8 dereferenceable(985) %0)
  %23 = invoke noundef zeroext i1 @_ZN7SGTELIB14metric_uses_cvENS_8metric_tE(i32 noundef %1)
          to label %24 unwind label %35

24:                                               ; preds = %22
  %25 = load ptr, ptr %0, align 8, !tbaa !9
  br i1 %23, label %26, label %37

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %25, i64 56
  %28 = load ptr, ptr %27, align 8
  %29 = invoke noundef ptr %28(ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %30 unwind label %35

30:                                               ; preds = %26
  %31 = load ptr, ptr %0, align 8, !tbaa !9
  %32 = getelementptr inbounds i8, ptr %31, i64 80
  %33 = load ptr, ptr %32, align 8
  %34 = invoke noundef ptr %33(ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %46 unwind label %35

35:                                               ; preds = %41, %37, %30, %26, %22
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %160

37:                                               ; preds = %24
  %38 = getelementptr inbounds i8, ptr %25, i64 64
  %39 = load ptr, ptr %38, align 8
  %40 = invoke noundef ptr %39(ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %41 unwind label %35

41:                                               ; preds = %37
  %42 = load ptr, ptr %0, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %42, i64 72
  %44 = load ptr, ptr %43, align 8
  %45 = invoke noundef ptr %44(ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %46 unwind label %35

46:                                               ; preds = %41, %30
  %.044 = phi ptr [ %29, %30 ], [ %40, %41 ]
  %.043 = phi ptr [ %34, %30 ], [ %45, %41 ]
  %47 = invoke noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef %1)
          to label %48 unwind label %54

48:                                               ; preds = %46
  %49 = getelementptr inbounds i8, ptr %0, i64 332
  %50 = load i32, ptr %49, align 4
  %51 = select i1 %47, i32 %50, i32 1
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.38, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %52 unwind label %56

52:                                               ; preds = %48
  invoke void @_ZN7SGTELIB6MatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 1, i32 noundef %51)
          to label %53 unwind label %58

53:                                               ; preds = %52
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  switch i32 %1, label %132 [
    i32 0, label %61
    i32 1, label %61
    i32 2, label %61
    i32 4, label %61
    i32 3, label %61
    i32 5, label %61
    i32 6, label %89
    i32 7, label %89
    i32 8, label %98
    i32 9, label %98
    i32 10, label %109
    i32 11, label %109
    i32 12, label %128
  ]

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

56:                                               ; preds = %48
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

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

60:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %159

61:                                               ; preds = %53, %53, %53, %53, %53, %53
  %62 = invoke noundef i32 @_ZN7SGTELIB24metric_type_to_norm_typeENS_8metric_tE(i32 noundef %1)
          to label %63 unwind label %.loopexit.split-lp

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #5
  invoke void @_ZmiRKN7SGTELIB6MatrixES2_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %9, ptr noundef nonnull align 8 dereferenceable(56) %4, ptr noundef nonnull align 8 dereferenceable(56) %.044)
          to label %64 unwind label %72

64:                                               ; preds = %63
  invoke void @_ZNK7SGTELIB6Matrix8col_normENS_6norm_tE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %8, ptr noundef nonnull align 8 dereferenceable(56) %9, i32 noundef %62)
          to label %65 unwind label %74

65:                                               ; preds = %64
  %66 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(56) %8)
          to label %67 unwind label %76

67:                                               ; preds = %65
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #5
  switch i32 %1, label %85 [
    i32 5, label %68
    i32 3, label %68
  ]

68:                                               ; preds = %67, %67
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #5
  invoke void @_ZNK7SGTELIB6Matrix3sumEi(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %10, ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef 1)
          to label %69 unwind label %80

69:                                               ; preds = %68
  %70 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(56) %10)
          to label %71 unwind label %82

71:                                               ; preds = %69
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  br label %144

.loopexit:                                        ; preds = %.lr.ph, %147
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %158

.loopexit.split-lp:                               ; preds = %61, %85, %128, %._crit_edge, %155
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %158

72:                                               ; preds = %63
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %79

74:                                               ; preds = %64
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %65
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %8) #5
  br label %78

78:                                               ; preds = %76, %74
  %.pn55 = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #5
  br label %79

79:                                               ; preds = %78, %72
  %.pn55.pn = phi { ptr, i32 } [ %.pn55, %78 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %8) #5
  br label %158

80:                                               ; preds = %68
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

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

84:                                               ; preds = %82, %80
  %.pn58 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #5
  br label %158

85:                                               ; preds = %67
  %86 = getelementptr inbounds i8, ptr %0, i64 8
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  invoke void @_ZN7SGTELIB11TrainingSet10ZE_unscaleERKNS_6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %11, ptr noundef nonnull align 8 dereferenceable(504) %87, ptr noundef nonnull align 8 dereferenceable(56) %5)
          to label %88 unwind label %.loopexit.split-lp

88:                                               ; preds = %85
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  br label %144

89:                                               ; preds = %53, %53
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #5
  invoke void @_ZN7SGTELIB9Surrogate19compute_order_errorERKNS_6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %12, ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(56) %.044)
          to label %90 unwind label %93

90:                                               ; preds = %89
  %91 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(56) %12)
          to label %92 unwind label %95

92:                                               ; preds = %90
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #5
  br label %144

93:                                               ; preds = %89
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %90
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #5
  br label %97

97:                                               ; preds = %95, %93
  %.pn53 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #5
  br label %158

98:                                               ; preds = %53, %53
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %13) #5
  %99 = invoke noundef double @_ZN7SGTELIB9Surrogate29compute_aggregate_order_errorERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(56) %.044)
          to label %100 unwind label %104

100:                                              ; preds = %98
  invoke void @_ZN7SGTELIB6MatrixC1Ed(ptr noundef nonnull align 8 dereferenceable(56) %13, double noundef %99)
          to label %101 unwind label %104

101:                                              ; preds = %100
  %102 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(56) %13)
          to label %103 unwind label %106

103:                                              ; preds = %101
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #5
  br label %144

104:                                              ; preds = %100, %98
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %108

106:                                              ; preds = %101
  %107 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  br label %108

108:                                              ; preds = %106, %104
  %.pn51 = phi { ptr, i32 } [ %107, %106 ], [ %105, %104 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %13) #5
  br label %158

109:                                              ; preds = %53, %53
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %15) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %16) #5
  invoke void @_ZN7SGTELIB9Surrogate11compute_efiERKNS_6MatrixES3_(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %16, ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(56) %.044, ptr noundef nonnull align 8 dereferenceable(56) %.043)
          to label %110 unwind label %117

110:                                              ; preds = %109
  invoke void @_ZngRKN7SGTELIB6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %15, ptr noundef nonnull align 8 dereferenceable(56) %16)
          to label %111 unwind label %119

111:                                              ; preds = %110
  %112 = invoke noundef double @_ZN7SGTELIB9Surrogate29compute_aggregate_order_errorERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(985) %0, ptr noundef nonnull align 8 dereferenceable(56) %15)
          to label %113 unwind label %121

113:                                              ; preds = %111
  invoke void @_ZN7SGTELIB6MatrixC1Ed(ptr noundef nonnull align 8 dereferenceable(56) %14, double noundef %112)
          to label %114 unwind label %121

114:                                              ; preds = %113
  %115 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(56) %14)
          to label %116 unwind label %123

116:                                              ; preds = %114
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #5
  br label %144

117:                                              ; preds = %109
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %127

119:                                              ; preds = %110
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %126

121:                                              ; preds = %113, %111
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %125

123:                                              ; preds = %114
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %14) #5
  br label %125

125:                                              ; preds = %123, %121
  %.pn47 = phi { ptr, i32 } [ %124, %123 ], [ %122, %121 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #5
  br label %126

126:                                              ; preds = %125, %119
  %.pn47.pn = phi { ptr, i32 } [ %.pn47, %125 ], [ %120, %119 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %16) #5
  br label %127

127:                                              ; preds = %126, %117
  %.pn47.pn.pn = phi { ptr, i32 } [ %.pn47.pn, %126 ], [ %118, %117 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %16) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #5
  br label %158

128:                                              ; preds = %53
  %129 = load ptr, ptr %0, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %129, i64 16
  %131 = load ptr, ptr %130, align 8
  invoke void %131(ptr noundef nonnull align 8 dereferenceable(985) %0)
          to label %144 unwind label %.loopexit.split-lp

132:                                              ; preds = %53
  %133 = call ptr @__cxa_allocate_exception(i64 112) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @.str.23, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %134 unwind label %.thread

134:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull @.str.39, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %135 unwind label %138

135:                                              ; preds = %134
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %133, ptr noundef nonnull align 8 dereferenceable(32) %17, i32 noundef 893, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %136 unwind label %140

136:                                              ; preds = %135
  invoke void @__cxa_throw(ptr nonnull %133, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #6
          to label %162 unwind label %140

.thread:                                          ; preds = %132
  %137 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #5
  br label %143

138:                                              ; preds = %134
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %142

140:                                              ; preds = %136, %135
  %.0 = phi i1 [ false, %136 ], [ true, %135 ]
  %141 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %142

142:                                              ; preds = %138, %140
  %.pn60 = phi { ptr, i32 } [ %141, %140 ], [ %139, %138 ]
  %.1 = phi i1 [ %.0, %140 ], [ true, %138 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #5
  br i1 %.1, label %143, label %158

143:                                              ; preds = %.thread, %142
  %.pn60.pn69 = phi { ptr, i32 } [ %137, %.thread ], [ %.pn60, %142 ]
  call void @__cxa_free_exception(ptr %133) #5
  br label %158

144:                                              ; preds = %128, %71, %88, %116, %103, %92
  %145 = icmp sgt i32 %51, 0
  br i1 %145, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %144, %151
  %.04570 = phi i32 [ %152, %151 ], [ 0, %144 ]
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7SGTELIB6MatrixixEi(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef %.04570)
          to label %147 unwind label %.loopexit

147:                                              ; preds = %.lr.ph
  %148 = load double, ptr %146, align 8, !tbaa !49
  %149 = call noundef zeroext i1 @_ZSt5isnand(double noundef %148)
  %.022 = select i1 %149, double 0x7FEFFFFFFFFFFFFF, double %148
  %150 = fcmp olt double %.022, -1.000000e-13
  %.123 = select i1 %150, double 0x7FEFFFFFFFFFFFFF, double %.022
  %.inv = fcmp ole double %.123, 0.000000e+00
  %.224 = select i1 %.inv, double 0.000000e+00, double %.123
  invoke void @_ZN7SGTELIB6Matrix3setEiid(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef 0, i32 noundef %.04570, double noundef %.224)
          to label %151 unwind label %.loopexit

151:                                              ; preds = %147
  %152 = add nuw nsw i32 %.04570, 1
  %exitcond.not = icmp eq i32 %152, %51
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !50

._crit_edge:                                      ; preds = %151, %144
  %153 = getelementptr inbounds i8, ptr %0, i64 416
  %154 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEEixERS6_(ptr noundef nonnull align 8 dereferenceable(48) %153, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %155 unwind label %.loopexit.split-lp

155:                                              ; preds = %._crit_edge
  %156 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZN7SGTELIB6MatrixaSERKS0_(ptr noundef nonnull align 8 dereferenceable(56) %154, ptr noundef nonnull align 8 dereferenceable(56) %5)
          to label %157 unwind label %.loopexit.split-lp

157:                                              ; preds = %155
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #5
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #5
  br label %161

158:                                              ; preds = %.loopexit, %.loopexit.split-lp, %142, %143, %127, %108, %97, %84, %79
  %.pn60.pn.pn = phi { ptr, i32 } [ %.pn60.pn69, %143 ], [ %.pn60, %142 ], [ %.pn47.pn.pn, %127 ], [ %.pn51, %108 ], [ %.pn53, %97 ], [ %.pn58, %84 ], [ %.pn55.pn, %79 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  br label %159

159:                                              ; preds = %158, %60
  %.pn60.pn.pn.pn = phi { ptr, i32 } [ %.pn60.pn.pn, %158 ], [ %.pn, %60 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #5
  br label %160

160:                                              ; preds = %54, %159, %35
  %.pn60.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %.pn60.pn.pn.pn, %159 ], [ %55, %54 ]
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn60.pn.pn.pn.pn.pn

161:                                              ; preds = %2, %157
  ret i1 true

162:                                              ; preds = %136
  unreachable
}

declare noundef zeroext i1 @_ZN7SGTELIB14metric_uses_cvENS_8metric_tE(i32 noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef) local_unnamed_addr #2

declare noundef i32 @_ZN7SGTELIB24metric_type_to_norm_typeENS_8metric_tE(i32 noundef) local_unnamed_addr #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 #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9Surrogate19compute_order_errorERKNS_6MatrixE(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN7SGTELIB9Surrogate29compute_aggregate_order_errorERKNS_6MatrixE(ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4 align 2

declare void @_ZN7SGTELIB6MatrixC1Ed(ptr noundef nonnull align 8 dereferenceable(56), double noundef) unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9Surrogate11compute_efiERKNS_6MatrixES3_(ptr dead_on_unwind noalias writable sret(%"class.SGTELIB::Matrix") align 8, ptr noundef nonnull align 8 dereferenceable(985), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nounwind }
attributes #6 = { 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 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN7SGTELIB9SurrogateE", !13, i64 8, !14, i64 16, !16, i64 328, !16, i64 332, !16, i64 336, !16, i64 340, !16, i64 344, !16, i64 348, !27, i64 352, !13, i64 360, !13, i64 368, !13, i64 376, !13, i64 384, !28, i64 392, !33, i64 416, !19, i64 464, !41, i64 472, !27, i64 984}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !15, i64 8, !16, i64 12, !17, i64 16, !18, i64 20, !17, i64 24, !19, i64 32, !17, i64 40, !19, i64 48, !17, i64 56, !20, i64 60, !17, i64 64, !21, i64 72, !25, i64 128, !17, i64 132, !26, i64 136, !19, i64 144, !19, i64 152, !19, i64 160, !19, i64 168, !21, i64 176, !17, i64 232, !6, i64 236, !22, i64 240, !22, i64 272, !16, i64 304, !16, i64 308}
!15 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!18 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!21 = !{!"_ZTSN7SGTELIB6MatrixE", !22, i64 8, !16, i64 40, !16, i64 44, !13, i64 48}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !24, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!26 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !30, i64 0}
!30 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !31, i64 0}
!31 = !{!"_ZTSNSt8__detail17_List_node_headerE", !32, i64 0, !24, i64 16}
!32 = !{!"_ZTSNSt8__detail15_List_node_baseE", !13, i64 0, !13, i64 8}
!33 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !34, i64 0}
!34 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !35, i64 0}
!35 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !36, i64 0, !38, i64 8}
!36 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !37, i64 0}
!37 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!38 = !{!"_ZTSSt15_Rb_tree_header", !39, i64 0, !24, i64 32}
!39 = !{!"_ZTSSt18_Rb_tree_node_base", !40, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!40 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!41 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !42, i64 0, !43, i64 8}
!42 = !{!"_ZTSSo"}
!43 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !44, i64 0, !7, i64 64, !46, i64 104, !47, i64 120, !48, i64 124, !48, i64 132, !48, i64 140, !13, i64 152, !24, i64 160, !27, i64 168, !27, i64 169, !27, i64 170, !7, i64 171, !13, i64 176, !13, i64 184, !27, i64 192, !13, i64 200, !13, i64 208, !24, i64 216, !13, i64 224, !13, i64 232}
!44 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !45, i64 56}
!45 = !{!"_ZTSSt6locale", !13, i64 0}
!46 = !{!"_ZTSSt12__basic_fileIcE", !13, i64 0, !27, i64 8}
!47 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!48 = !{!"_ZTS11__mbstate_t", !16, i64 0, !7, i64 4}
!49 = !{!19, !19, i64 0}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}


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