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

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

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

@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.21 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [41 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

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

; 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

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: mustprogress uwtable
define dso_local void @_ZN7SGTELIB11TrainingSet5buildEv(ptr noundef nonnull align 8 dereferenceable(504) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca i1, align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca i1, align 1
  %15 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  %17 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 11
  %18 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %17)
  %19 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 12
  %20 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %19)
  %21 = icmp ne i32 %18, %20
  br i1 %21, label %22, label %44

22:                                               ; preds = %1
  store i1 true, ptr %9, align 1
  %23 = call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %24 unwind label %27

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

25:                                               ; preds = %24
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %23, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 249, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %26 unwind label %35

26:                                               ; preds = %25
  store i1 false, ptr %9, align 1
  invoke void @__cxa_throw(ptr %23, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #5
          to label %132 unwind label %35

27:                                               ; preds = %22
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  br label %40

31:                                               ; preds = %24
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %5, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %6, align 4
  br label %39

35:                                               ; preds = %26, %25
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %5, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %39

39:                                               ; preds = %35, %31
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br label %40

40:                                               ; preds = %39, %27
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  %41 = load i1, ptr %9, align 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  call void @__cxa_free_exception(ptr %23) #4
  br label %43

43:                                               ; preds = %42, %40
  br label %127

44:                                               ; preds = %1
  %45 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 1
  %46 = load i32, ptr %45, align 8, !tbaa !9
  %47 = icmp slt i32 %46, 1
  br i1 %47, label %48, label %70

48:                                               ; preds = %44
  store i1 true, ptr %14, align 1
  %49 = call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %50 unwind label %53

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef @.str.22, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %51 unwind label %57

51:                                               ; preds = %50
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %49, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 254, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %52 unwind label %61

52:                                               ; preds = %51
  store i1 false, ptr %14, align 1
  invoke void @__cxa_throw(ptr %49, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #5
          to label %132 unwind label %61

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

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

61:                                               ; preds = %52, %51
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %5, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %65

65:                                               ; preds = %61, %57
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %66

66:                                               ; preds = %65, %53
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #4
  %67 = load i1, ptr %14, align 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  call void @__cxa_free_exception(ptr %49) #4
  br label %69

69:                                               ; preds = %68, %66
  br label %127

70:                                               ; preds = %44
  %71 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 4
  %72 = load i8, ptr %71, align 4, !tbaa !18, !range !19, !noundef !20
  %73 = trunc i8 %72 to i1
  br i1 %73, label %124, label %74

74:                                               ; preds = %70
  %75 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 11
  %76 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 25
  %77 = load ptr, ptr %76, align 8, !tbaa !21
  %78 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 16
  call void @_ZN7SGTELIB11TrainingSet14compute_nbdiffERKNS_6MatrixEPiRi(ptr noundef nonnull align 8 dereferenceable(56) %75, ptr noundef %77, ptr noundef nonnull align 4 dereferenceable(4) %78)
  %79 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 12
  %80 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 36
  %81 = load ptr, ptr %80, align 8, !tbaa !22
  %82 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 17
  call void @_ZN7SGTELIB11TrainingSet14compute_nbdiffERKNS_6MatrixEPiRi(ptr noundef nonnull align 8 dereferenceable(56) %79, ptr noundef %81, ptr noundef nonnull align 4 dereferenceable(4) %82)
  %83 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 26
  store i32 0, ptr %83, align 8, !tbaa !23
  %84 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 27
  store i32 0, ptr %84, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !25
  br label %85

85:                                               ; preds = %116, %74
  %86 = load i32, ptr %15, align 4, !tbaa !25
  %87 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 2
  %88 = load i32, ptr %87, align 4, !tbaa !26
  %89 = icmp slt i32 %86, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %119

91:                                               ; preds = %85
  %92 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 25
  %93 = load ptr, ptr %92, align 8, !tbaa !21
  %94 = load i32, ptr %15, align 4, !tbaa !25
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i32, ptr %93, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !25
  %98 = icmp sgt i32 %97, 1
  br i1 %98, label %99, label %103

99:                                               ; preds = %91
  %100 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 26
  %101 = load i32, ptr %100, align 8, !tbaa !23
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %100, align 8, !tbaa !23
  br label %103

103:                                              ; preds = %99, %91
  %104 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 25
  %105 = load ptr, ptr %104, align 8, !tbaa !21
  %106 = load i32, ptr %15, align 4, !tbaa !25
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i32, ptr %105, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !25
  %110 = icmp sgt i32 %109, 2
  br i1 %110, label %111, label %115

111:                                              ; preds = %103
  %112 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 27
  %113 = load i32, ptr %112, align 4, !tbaa !24
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %112, align 4, !tbaa !24
  br label %115

115:                                              ; preds = %111, %103
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %15, align 4, !tbaa !25
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %15, align 4, !tbaa !25
  br label %85, !llvm.loop !27

119:                                              ; preds = %90
  %120 = call noundef zeroext i1 @_ZN7SGTELIB11TrainingSet19check_singular_dataEv(ptr noundef nonnull align 8 dereferenceable(504) %16)
  br i1 %120, label %121, label %122

121:                                              ; preds = %119
  br label %126

122:                                              ; preds = %119
  call void @_ZN7SGTELIB11TrainingSet14compute_boundsEv(ptr noundef nonnull align 8 dereferenceable(504) %16)
  call void @_ZN7SGTELIB11TrainingSet15compute_scalingEv(ptr noundef nonnull align 8 dereferenceable(504) %16)
  call void @_ZN7SGTELIB11TrainingSet23compute_scaled_matricesEv(ptr noundef nonnull align 8 dereferenceable(504) %16)
  call void @_ZN7SGTELIB11TrainingSet10compute_DsEv(ptr noundef nonnull align 8 dereferenceable(504) %16)
  call void @_ZN7SGTELIB11TrainingSet13compute_f_minEv(ptr noundef nonnull align 8 dereferenceable(504) %16)
  %123 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 4
  store i8 1, ptr %123, align 4, !tbaa !18
  br label %124

124:                                              ; preds = %122, %70
  %125 = getelementptr inbounds %"class.SGTELIB::TrainingSet", ptr %16, i32 0, i32 6
  store i8 1, ptr %125, align 8, !tbaa !29
  br label %126

126:                                              ; preds = %124, %121
  ret void

127:                                              ; preds = %69, %43
  %128 = load ptr, ptr %5, align 8
  %129 = load i32, ptr %6, align 4
  %130 = insertvalue { ptr, i32 } poison, ptr %128, 0
  %131 = insertvalue { ptr, i32 } %130, i32 %129, 1
  resume { ptr, i32 } %131

132:                                              ; preds = %52, %26
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB11TrainingSet13compute_f_minEv(ptr noundef nonnull align 8 dereferenceable(504)) #3 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 = { nounwind }
attributes #5 = { 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, !11, i64 8}
!10 = !{!"_ZTSN7SGTELIB11TrainingSetE", !11, i64 8, !11, i64 12, !11, i64 16, !12, i64 20, !6, i64 24, !12, i64 32, !11, i64 36, !13, i64 40, !13, i64 48, !11, i64 56, !14, i64 64, !14, i64 120, !14, i64 176, !14, i64 232, !14, i64 288, !11, i64 344, !11, i64 348, !11, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !11, i64 416, !11, i64 420, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !13, i64 496}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_ZTSN7SGTELIB6MatrixE", !15, i64 8, !11, i64 40, !11, i64 44, !6, i64 48}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !17, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!10, !12, i64 20}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!10, !6, i64 408}
!22 = !{!10, !6, i64 488}
!23 = !{!10, !11, i64 416}
!24 = !{!10, !11, i64 420}
!25 = !{!11, !11, i64 0}
!26 = !{!10, !11, i64 12}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!10, !12, i64 32}


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

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

@.str.3 = external hidden unnamed_addr constant [90 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.21 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [41 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

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

; 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

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: mustprogress uwtable
define dso_local void @_ZN7SGTELIB11TrainingSet5buildEv(ptr noundef nonnull align 8 dereferenceable(504) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = getelementptr inbounds i8, ptr %0, i64 64
  %11 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %10)
  %12 = getelementptr inbounds i8, ptr %0, i64 120
  %13 = tail call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_rowsEv(ptr noundef nonnull align 8 dereferenceable(56) %12)
  %.not = icmp eq i32 %11, %13
  br i1 %.not, label %25, label %14

14:                                               ; preds = %1
  %15 = tail call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %16 unwind label %.thread

16:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.21, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %17 unwind label %20

17:                                               ; preds = %16
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %15, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 249, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %18 unwind label %22

18:                                               ; preds = %17
  invoke void @__cxa_throw(ptr nonnull %15, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #5
          to label %95 unwind label %22

.thread:                                          ; preds = %14
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  br label %.sink.split

20:                                               ; preds = %16
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %24

22:                                               ; preds = %18, %17
  %.09 = phi i1 [ false, %18 ], [ true, %17 ]
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %24

24:                                               ; preds = %20, %22
  %.pn22 = phi { ptr, i32 } [ %23, %22 ], [ %21, %20 ]
  %.110 = phi i1 [ %.09, %22 ], [ true, %20 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  br i1 %.110, label %.sink.split, label %94

25:                                               ; preds = %1
  %26 = getelementptr inbounds i8, ptr %0, i64 8
  %27 = load i32, ptr %26, align 8, !tbaa !5
  %28 = icmp slt i32 %27, 1
  br i1 %28, label %29, label %40

29:                                               ; preds = %25
  %30 = tail call ptr @__cxa_allocate_exception(i64 112) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %31 unwind label %.thread29

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.22, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %32 unwind label %35

32:                                               ; preds = %31
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %30, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 254, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %33 unwind label %37

33:                                               ; preds = %32
  invoke void @__cxa_throw(ptr nonnull %30, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #5
          to label %95 unwind label %37

.thread29:                                        ; preds = %29
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %.sink.split

35:                                               ; preds = %31
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %39

37:                                               ; preds = %33, %32
  %.08 = phi i1 [ false, %33 ], [ true, %32 ]
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %39

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

40:                                               ; preds = %25
  %41 = getelementptr inbounds i8, ptr %0, i64 20
  %42 = load i8, ptr %41, align 4, !tbaa !17, !range !18, !noundef !19
  %43 = trunc nuw i8 %42 to i1
  br i1 %43, label %91, label %44

44:                                               ; preds = %40
  %45 = getelementptr inbounds i8, ptr %0, i64 408
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = getelementptr inbounds i8, ptr %0, i64 344
  tail call void @_ZN7SGTELIB11TrainingSet14compute_nbdiffERKNS_6MatrixEPiRi(ptr noundef nonnull align 8 dereferenceable(56) %10, ptr noundef %46, ptr noundef nonnull align 4 dereferenceable(4) %47)
  %48 = getelementptr inbounds i8, ptr %0, i64 488
  %49 = load ptr, ptr %48, align 8, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %0, i64 348
  tail call void @_ZN7SGTELIB11TrainingSet14compute_nbdiffERKNS_6MatrixEPiRi(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef %49, ptr noundef nonnull align 4 dereferenceable(4) %50)
  %51 = getelementptr inbounds i8, ptr %0, i64 416
  store i32 0, ptr %51, align 8, !tbaa !22
  %52 = getelementptr inbounds i8, ptr %0, i64 420
  store i32 0, ptr %52, align 4, !tbaa !23
  %53 = getelementptr inbounds i8, ptr %0, i64 12
  %54 = load i32, ptr %53, align 4, !tbaa !24
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %44
  %56 = load ptr, ptr %45, align 8, !tbaa !20
  %wide.trip.count = zext nneg i32 %54 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %57 = icmp eq i32 %54, 1
  br i1 %57, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %67

._crit_edge.loopexit.unr-lcssa.loopexit:          ; preds = %.thread33.1
  %58 = add nsw i32 %89, 1
  %59 = add nsw i32 %88, 1
  br label %._crit_edge.loopexit.unr-lcssa

._crit_edge.loopexit.unr-lcssa:                   ; preds = %._crit_edge.loopexit.unr-lcssa.loopexit, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.1, %._crit_edge.loopexit.unr-lcssa.loopexit ]
  %.unr = phi i32 [ 1, %.lr.ph ], [ %58, %._crit_edge.loopexit.unr-lcssa.loopexit ]
  %.unr37 = phi i32 [ 1, %.lr.ph ], [ %59, %._crit_edge.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa
  %60 = getelementptr inbounds i32, ptr %56, i64 %indvars.iv.unr
  %61 = load i32, ptr %60, align 4, !tbaa !25
  %62 = icmp sgt i32 %61, 1
  br i1 %62, label %63, label %._crit_edge

63:                                               ; preds = %.epil.preheader
  store i32 %.unr, ptr %51, align 8, !tbaa !22
  %.pr.epil = load i32, ptr %60, align 4, !tbaa !25
  %64 = icmp sgt i32 %.pr.epil, 2
  br i1 %64, label %65, label %._crit_edge

65:                                               ; preds = %63
  store i32 %.unr37, ptr %52, align 4, !tbaa !23
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %65, %63, %.epil.preheader, %44
  %66 = tail call noundef zeroext i1 @_ZN7SGTELIB11TrainingSet19check_singular_dataEv(ptr noundef nonnull align 8 dereferenceable(504) %0)
  br i1 %66, label %93, label %90

67:                                               ; preds = %.thread33.1, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.1, %.thread33.1 ]
  %68 = phi i32 [ 0, %.lr.ph.new ], [ %89, %.thread33.1 ]
  %69 = phi i32 [ 0, %.lr.ph.new ], [ %88, %.thread33.1 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %.thread33.1 ]
  %70 = getelementptr inbounds i32, ptr %56, i64 %indvars.iv
  %71 = load i32, ptr %70, align 4, !tbaa !25
  %72 = icmp sgt i32 %71, 1
  br i1 %72, label %73, label %.thread33

73:                                               ; preds = %67
  %74 = add nsw i32 %68, 1
  store i32 %74, ptr %51, align 8, !tbaa !22
  %.pr = load i32, ptr %70, align 4, !tbaa !25
  %75 = icmp sgt i32 %.pr, 2
  br i1 %75, label %76, label %.thread33

76:                                               ; preds = %73
  %77 = add nsw i32 %69, 1
  store i32 %77, ptr %52, align 4, !tbaa !23
  br label %.thread33

.thread33:                                        ; preds = %67, %73, %76
  %78 = phi i32 [ %69, %67 ], [ %69, %73 ], [ %77, %76 ]
  %79 = phi i32 [ %68, %67 ], [ %74, %73 ], [ %74, %76 ]
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %80 = getelementptr inbounds i32, ptr %56, i64 %indvars.iv.next
  %81 = load i32, ptr %80, align 4, !tbaa !25
  %82 = icmp sgt i32 %81, 1
  br i1 %82, label %83, label %.thread33.1

83:                                               ; preds = %.thread33
  %84 = add nsw i32 %79, 1
  store i32 %84, ptr %51, align 8, !tbaa !22
  %.pr.1 = load i32, ptr %80, align 4, !tbaa !25
  %85 = icmp sgt i32 %.pr.1, 2
  br i1 %85, label %86, label %.thread33.1

86:                                               ; preds = %83
  %87 = add nsw i32 %78, 1
  store i32 %87, ptr %52, align 4, !tbaa !23
  br label %.thread33.1

.thread33.1:                                      ; preds = %86, %83, %.thread33
  %88 = phi i32 [ %78, %.thread33 ], [ %78, %83 ], [ %87, %86 ]
  %89 = phi i32 [ %79, %.thread33 ], [ %84, %83 ], [ %84, %86 ]
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa.loopexit, label %67, !llvm.loop !26

90:                                               ; preds = %._crit_edge
  tail call void @_ZN7SGTELIB11TrainingSet14compute_boundsEv(ptr noundef nonnull align 8 dereferenceable(504) %0)
  tail call void @_ZN7SGTELIB11TrainingSet15compute_scalingEv(ptr noundef nonnull align 8 dereferenceable(504) %0)
  tail call void @_ZN7SGTELIB11TrainingSet23compute_scaled_matricesEv(ptr noundef nonnull align 8 dereferenceable(504) %0)
  tail call void @_ZN7SGTELIB11TrainingSet10compute_DsEv(ptr noundef nonnull align 8 dereferenceable(504) %0)
  tail call void @_ZN7SGTELIB11TrainingSet13compute_f_minEv(ptr noundef nonnull align 8 dereferenceable(504) %0)
  store i8 1, ptr %41, align 4, !tbaa !17
  br label %91

91:                                               ; preds = %90, %40
  %92 = getelementptr inbounds i8, ptr %0, i64 32
  store i8 1, ptr %92, align 8, !tbaa !28
  br label %93

93:                                               ; preds = %._crit_edge, %91
  ret void

.sink.split:                                      ; preds = %39, %.thread29, %24, %.thread
  %.sink = phi ptr [ %15, %.thread ], [ %15, %24 ], [ %30, %.thread29 ], [ %30, %39 ]
  %.pn22.pn.pn.ph = phi { ptr, i32 } [ %19, %.thread ], [ %.pn22, %24 ], [ %34, %.thread29 ], [ %.pn, %39 ]
  call void @__cxa_free_exception(ptr %.sink) #4
  br label %94

94:                                               ; preds = %.sink.split, %39, %24
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22, %24 ], [ %.pn, %39 ], [ %.pn22.pn.pn.ph, %.sink.split ]
  resume { ptr, i32 } %.pn22.pn.pn

95:                                               ; preds = %33, %18
  unreachable
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB11TrainingSet13compute_f_minEv(ptr noundef nonnull align 8 dereferenceable(504)) local_unnamed_addr #3 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 = { nounwind }
attributes #5 = { 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, !7, i64 8}
!6 = !{!"_ZTSN7SGTELIB11TrainingSetE", !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 20, !11, i64 24, !10, i64 32, !7, i64 36, !12, i64 40, !12, i64 48, !7, i64 56, !13, i64 64, !13, i64 120, !13, i64 176, !13, i64 232, !13, i64 288, !7, i64 344, !7, i64 348, !7, i64 352, !11, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !11, i64 392, !11, i64 400, !11, i64 408, !7, i64 416, !7, i64 420, !11, i64 424, !11, i64 432, !11, i64 440, !11, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !12, i64 496}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"double", !8, i64 0}
!13 = !{!"_ZTSN7SGTELIB6MatrixE", !14, i64 8, !7, i64 40, !7, i64 44, !11, i64 48}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !16, i64 8, !8, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !11, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!6, !10, i64 20}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!6, !11, i64 408}
!21 = !{!6, !11, i64 488}
!22 = !{!6, !7, i64 416}
!23 = !{!6, !7, i64 420}
!24 = !{!6, !7, i64 12}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!6, !10, i64 32}


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