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

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"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.std::__cxx11::basic_ostringstream" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare noundef ptr @_ZN7SGTELIB17Surrogate_FactoryERNS_11TrainingSetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(504), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare noundef zeroext i1 @_ZN7SGTELIB9Surrogate5buildEv(ptr noundef nonnull align 8 dereferenceable(985)) #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #0

declare noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) #2

declare void @_ZN7SGTELIB16surrogate_deleteEPNS_9SurrogateE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB10test_quickERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6MatrixE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.SGTELIB::Matrix", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca %"class.SGTELIB::TrainingSet", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::__cxx11::basic_ostringstream", align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.15)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.30)
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %31)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #11
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN7SGTELIB14test_functionsERKNS_6MatrixE(ptr dead_on_unwind writable sret(%"class.SGTELIB::Matrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(56) %34)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #11
  %35 = invoke noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %36 unwind label %59

36:                                               ; preds = %3
  store i32 %35, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #11
  call void @llvm.lifetime.start.p0(i64 504, ptr %12) #11
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB11TrainingSetC1ERKNS_6MatrixES3_(ptr noundef nonnull align 8 dereferenceable(504) %12, ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 8 dereferenceable(56) %7)
          to label %38 unwind label %63

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #11
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = invoke noundef ptr @_ZN7SGTELIB17Surrogate_FactoryERNS_11TrainingSetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(504) %12, ptr noundef nonnull align 8 dereferenceable(32) %39)
          to label %41 unwind label %67

41:                                               ; preds = %38
  store ptr %40, ptr %13, align 8, !tbaa !5
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = invoke noundef zeroext i1 @_ZN7SGTELIB9Surrogate5buildEv(ptr noundef nonnull align 8 dereferenceable(985) %42)
          to label %44 unwind label %67

44:                                               ; preds = %41
  %45 = zext i1 %43 to i8
  store i8 %45, ptr %11, align 1, !tbaa !11
  %46 = load i8, ptr %11, align 1, !tbaa !11, !range !13, !noundef !14
  %47 = trunc i8 %46 to i1
  br i1 %47, label %94, label %48

48:                                               ; preds = %44
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB16surrogate_deleteEPNS_9SurrogateE(ptr noundef %49)
          to label %50 unwind label %67

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #11
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef @.str.31, ptr noundef nonnull align 8 dereferenceable(32) %51)
          to label %52 unwind label %71

52:                                               ; preds = %50
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.32)
          to label %53 unwind label %75

53:                                               ; preds = %52
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %55 unwind label %79

55:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #11
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef @.str.31, ptr noundef nonnull align 8 dereferenceable(32) %56)
          to label %57 unwind label %85

57:                                               ; preds = %55
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.32)
          to label %58 unwind label %89

58:                                               ; preds = %57
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #11
  store i32 1, ptr %17, align 4
  br label %527

59:                                               ; preds = %3
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  br label %530

63:                                               ; preds = %36
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %9, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %10, align 4
  br label %529

67:                                               ; preds = %48, %41, %38
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  br label %528

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

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

79:                                               ; preds = %53
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #11
  br label %83

83:                                               ; preds = %79, %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #11
  br label %84

84:                                               ; preds = %83, %71
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #11
  br label %528

85:                                               ; preds = %55
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %9, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %10, align 4
  br label %93

89:                                               ; preds = %57
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %9, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #11
  br label %93

93:                                               ; preds = %89, %85
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #11
  br label %528

94:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #11
  %95 = load i32, ptr %8, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %96, i64 8)
  %98 = extractvalue { i64, i1 } %97, 1
  %99 = extractvalue { i64, i1 } %97, 0
  %100 = select i1 %98, i64 -1, i64 %99
  %101 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %100) #12
          to label %102 unwind label %148

102:                                              ; preds = %94
  store ptr %101, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #11
  %103 = load i32, ptr %8, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %104, i64 8)
  %106 = extractvalue { i64, i1 } %105, 1
  %107 = extractvalue { i64, i1 } %105, 0
  %108 = select i1 %106, i64 -1, i64 %107
  %109 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %108) #12
          to label %110 unwind label %152

110:                                              ; preds = %102
  store ptr %109, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #11
  %111 = load i32, ptr %8, align 4, !tbaa !9
  %112 = sext i32 %111 to i64
  %113 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %112, i64 8)
  %114 = extractvalue { i64, i1 } %113, 1
  %115 = extractvalue { i64, i1 } %113, 0
  %116 = select i1 %114, i64 -1, i64 %115
  %117 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %116) #12
          to label %118 unwind label %156

118:                                              ; preds = %110
  store ptr %117, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #11
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %120, i64 8)
  %122 = extractvalue { i64, i1 } %121, 1
  %123 = extractvalue { i64, i1 } %121, 0
  %124 = select i1 %122, i64 -1, i64 %123
  %125 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %124) #12
          to label %126 unwind label %160

126:                                              ; preds = %118
  store ptr %125, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #11
  %127 = load i32, ptr %8, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %128, i64 8)
  %130 = extractvalue { i64, i1 } %129, 1
  %131 = extractvalue { i64, i1 } %129, 0
  %132 = select i1 %130, i64 -1, i64 %131
  %133 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %132) #12
          to label %134 unwind label %164

134:                                              ; preds = %126
  store ptr %133, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #11
  %135 = load i32, ptr %8, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %136, i64 8)
  %138 = extractvalue { i64, i1 } %137, 1
  %139 = extractvalue { i64, i1 } %137, 0
  %140 = select i1 %138, i64 -1, i64 %139
  %141 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %140) #12
          to label %142 unwind label %168

142:                                              ; preds = %134
  store ptr %141, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #11
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %143

143:                                              ; preds = %221, %142
  %144 = load i32, ptr %24, align 4, !tbaa !9
  %145 = load i32, ptr %8, align 4, !tbaa !9
  %146 = icmp slt i32 %144, %145
  br i1 %146, label %172, label %147

147:                                              ; preds = %143
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %228

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

152:                                              ; preds = %102
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %9, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %10, align 4
  br label %525

156:                                              ; preds = %110
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %9, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %10, align 4
  br label %524

160:                                              ; preds = %118
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %9, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %10, align 4
  br label %523

164:                                              ; preds = %126
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %9, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %10, align 4
  br label %522

168:                                              ; preds = %134
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %9, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %10, align 4
  br label %521

172:                                              ; preds = %143
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = load i32, ptr %24, align 4, !tbaa !9
  %175 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %173, i32 noundef 0, i32 noundef %174)
          to label %176 unwind label %224

176:                                              ; preds = %172
  %177 = load ptr, ptr %18, align 8, !tbaa !5
  %178 = load i32, ptr %24, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds double, ptr %177, i64 %179
  store double %175, ptr %180, align 8, !tbaa !15
  %181 = load ptr, ptr %13, align 8, !tbaa !5
  %182 = load i32, ptr %24, align 4, !tbaa !9
  %183 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %181, i32 noundef 2, i32 noundef %182)
          to label %184 unwind label %224

184:                                              ; preds = %176
  %185 = load ptr, ptr %19, align 8, !tbaa !5
  %186 = load i32, ptr %24, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds double, ptr %185, i64 %187
  store double %183, ptr %188, align 8, !tbaa !15
  %189 = load ptr, ptr %13, align 8, !tbaa !5
  %190 = load i32, ptr %24, align 4, !tbaa !9
  %191 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %189, i32 noundef 4, i32 noundef %190)
          to label %192 unwind label %224

192:                                              ; preds = %184
  %193 = load ptr, ptr %20, align 8, !tbaa !5
  %194 = load i32, ptr %24, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds double, ptr %193, i64 %195
  store double %191, ptr %196, align 8, !tbaa !15
  %197 = load ptr, ptr %13, align 8, !tbaa !5
  %198 = load i32, ptr %24, align 4, !tbaa !9
  %199 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %197, i32 noundef 6, i32 noundef %198)
          to label %200 unwind label %224

200:                                              ; preds = %192
  %201 = load ptr, ptr %21, align 8, !tbaa !5
  %202 = load i32, ptr %24, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds double, ptr %201, i64 %203
  store double %199, ptr %204, align 8, !tbaa !15
  %205 = load ptr, ptr %13, align 8, !tbaa !5
  %206 = load i32, ptr %24, align 4, !tbaa !9
  %207 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %205, i32 noundef 7, i32 noundef %206)
          to label %208 unwind label %224

208:                                              ; preds = %200
  %209 = load ptr, ptr %22, align 8, !tbaa !5
  %210 = load i32, ptr %24, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds double, ptr %209, i64 %211
  store double %207, ptr %212, align 8, !tbaa !15
  %213 = load ptr, ptr %13, align 8, !tbaa !5
  %214 = load i32, ptr %24, align 4, !tbaa !9
  %215 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %213, i32 noundef 12, i32 noundef %214)
          to label %216 unwind label %224

216:                                              ; preds = %208
  %217 = load ptr, ptr %23, align 8, !tbaa !5
  %218 = load i32, ptr %24, align 4, !tbaa !9
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds double, ptr %217, i64 %219
  store double %215, ptr %220, align 8, !tbaa !15
  br label %221

221:                                              ; preds = %216
  %222 = load i32, ptr %24, align 4, !tbaa !9
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %24, align 4, !tbaa !9
  br label %143, !llvm.loop !17

224:                                              ; preds = %208, %200, %192, %184, %176, %172
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %9, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #11
  br label %521

228:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 376, ptr %25) #11
  invoke void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(112) %25)
          to label %229 unwind label %248

229:                                              ; preds = %228
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str.33)
          to label %231 unwind label %252

231:                                              ; preds = %229
  %232 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str.34)
          to label %233 unwind label %252

233:                                              ; preds = %231
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %232, ptr noundef nonnull align 8 dereferenceable(32) %234)
          to label %236 unwind label %252

236:                                              ; preds = %233
  %237 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %235, ptr noundef @.str.6)
          to label %238 unwind label %252

238:                                              ; preds = %236
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str.35)
          to label %240 unwind label %252

240:                                              ; preds = %238
  %241 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str.36)
          to label %242 unwind label %252

242:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #11
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %243

243:                                              ; preds = %358, %242
  %244 = load i32, ptr %26, align 4, !tbaa !9
  %245 = load i32, ptr %8, align 4, !tbaa !9
  %246 = icmp slt i32 %244, %245
  br i1 %246, label %256, label %247

247:                                              ; preds = %243
  store i32 5, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %365

248:                                              ; preds = %228
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %9, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %10, align 4
  br label %520

252:                                              ; preds = %517, %515, %365, %240, %238, %236, %233, %231, %229
  %253 = landingpad { ptr, i32 }
          cleanup
  %254 = extractvalue { ptr, i32 } %253, 0
  store ptr %254, ptr %9, align 8
  %255 = extractvalue { ptr, i32 } %253, 1
  store i32 %255, ptr %10, align 4
  br label %519

256:                                              ; preds = %243
  %257 = load ptr, ptr %25, align 8, !tbaa !19
  %258 = getelementptr i8, ptr %257, i64 -24
  %259 = load i64, ptr %258, align 8
  %260 = getelementptr inbounds i8, ptr %25, i64 %259
  %261 = invoke noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %260, i64 noundef 3)
          to label %262 unwind label %361

262:                                              ; preds = %256
  %263 = load i32, ptr %26, align 4, !tbaa !9
  %264 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %25, i32 noundef %263)
          to label %265 unwind label %361

265:                                              ; preds = %262
  %266 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @.str.37)
          to label %267 unwind label %361

267:                                              ; preds = %265
  %268 = load ptr, ptr %25, align 8, !tbaa !19
  %269 = getelementptr i8, ptr %268, i64 -24
  %270 = load i64, ptr %269, align 8
  %271 = getelementptr inbounds i8, ptr %25, i64 %270
  %272 = invoke noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %271, i64 noundef 14)
          to label %273 unwind label %361

273:                                              ; preds = %267
  %274 = load ptr, ptr %18, align 8, !tbaa !5
  %275 = load i32, ptr %26, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds double, ptr %274, i64 %276
  %278 = load double, ptr %277, align 8, !tbaa !15
  %279 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %25, double noundef %278)
          to label %280 unwind label %361

280:                                              ; preds = %273
  %281 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %279, ptr noundef @.str.37)
          to label %282 unwind label %361

282:                                              ; preds = %280
  %283 = load ptr, ptr %25, align 8, !tbaa !19
  %284 = getelementptr i8, ptr %283, i64 -24
  %285 = load i64, ptr %284, align 8
  %286 = getelementptr inbounds i8, ptr %25, i64 %285
  %287 = invoke noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %286, i64 noundef 14)
          to label %288 unwind label %361

288:                                              ; preds = %282
  %289 = load ptr, ptr %19, align 8, !tbaa !5
  %290 = load i32, ptr %26, align 4, !tbaa !9
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds double, ptr %289, i64 %291
  %293 = load double, ptr %292, align 8, !tbaa !15
  %294 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %25, double noundef %293)
          to label %295 unwind label %361

295:                                              ; preds = %288
  %296 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %294, ptr noundef @.str.37)
          to label %297 unwind label %361

297:                                              ; preds = %295
  %298 = load ptr, ptr %25, align 8, !tbaa !19
  %299 = getelementptr i8, ptr %298, i64 -24
  %300 = load i64, ptr %299, align 8
  %301 = getelementptr inbounds i8, ptr %25, i64 %300
  %302 = invoke noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %301, i64 noundef 14)
          to label %303 unwind label %361

303:                                              ; preds = %297
  %304 = load ptr, ptr %20, align 8, !tbaa !5
  %305 = load i32, ptr %26, align 4, !tbaa !9
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds double, ptr %304, i64 %306
  %308 = load double, ptr %307, align 8, !tbaa !15
  %309 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %25, double noundef %308)
          to label %310 unwind label %361

310:                                              ; preds = %303
  %311 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %309, ptr noundef @.str.37)
          to label %312 unwind label %361

312:                                              ; preds = %310
  %313 = load ptr, ptr %25, align 8, !tbaa !19
  %314 = getelementptr i8, ptr %313, i64 -24
  %315 = load i64, ptr %314, align 8
  %316 = getelementptr inbounds i8, ptr %25, i64 %315
  %317 = invoke noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %316, i64 noundef 14)
          to label %318 unwind label %361

318:                                              ; preds = %312
  %319 = load ptr, ptr %21, align 8, !tbaa !5
  %320 = load i32, ptr %26, align 4, !tbaa !9
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds double, ptr %319, i64 %321
  %323 = load double, ptr %322, align 8, !tbaa !15
  %324 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %25, double noundef %323)
          to label %325 unwind label %361

325:                                              ; preds = %318
  %326 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %324, ptr noundef @.str.37)
          to label %327 unwind label %361

327:                                              ; preds = %325
  %328 = load ptr, ptr %25, align 8, !tbaa !19
  %329 = getelementptr i8, ptr %328, i64 -24
  %330 = load i64, ptr %329, align 8
  %331 = getelementptr inbounds i8, ptr %25, i64 %330
  %332 = invoke noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %331, i64 noundef 14)
          to label %333 unwind label %361

333:                                              ; preds = %327
  %334 = load ptr, ptr %22, align 8, !tbaa !5
  %335 = load i32, ptr %26, align 4, !tbaa !9
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds double, ptr %334, i64 %336
  %338 = load double, ptr %337, align 8, !tbaa !15
  %339 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %25, double noundef %338)
          to label %340 unwind label %361

340:                                              ; preds = %333
  %341 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %339, ptr noundef @.str.37)
          to label %342 unwind label %361

342:                                              ; preds = %340
  %343 = load ptr, ptr %25, align 8, !tbaa !19
  %344 = getelementptr i8, ptr %343, i64 -24
  %345 = load i64, ptr %344, align 8
  %346 = getelementptr inbounds i8, ptr %25, i64 %345
  %347 = invoke noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %346, i64 noundef 14)
          to label %348 unwind label %361

348:                                              ; preds = %342
  %349 = load ptr, ptr %23, align 8, !tbaa !5
  %350 = load i32, ptr %26, align 4, !tbaa !9
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds double, ptr %349, i64 %351
  %353 = load double, ptr %352, align 8, !tbaa !15
  %354 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %25, double noundef %353)
          to label %355 unwind label %361

355:                                              ; preds = %348
  %356 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %354, ptr noundef @.str.38)
          to label %357 unwind label %361

357:                                              ; preds = %355
  br label %358

358:                                              ; preds = %357
  %359 = load i32, ptr %26, align 4, !tbaa !9
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %26, align 4, !tbaa !9
  br label %243, !llvm.loop !21

361:                                              ; preds = %355, %348, %342, %340, %333, %327, %325, %318, %312, %310, %303, %297, %295, %288, %282, %280, %273, %267, %265, %262, %256
  %362 = landingpad { ptr, i32 }
          cleanup
  %363 = extractvalue { ptr, i32 } %362, 0
  store ptr %363, ptr %9, align 8
  %364 = extractvalue { ptr, i32 } %362, 1
  store i32 %364, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #11
  br label %519

365:                                              ; preds = %247
  %366 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @.str.36)
          to label %367 unwind label %252

367:                                              ; preds = %365
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #11
  invoke void @_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %27, ptr noundef nonnull align 8 dereferenceable(112) %25)
          to label %368 unwind label %376

368:                                              ; preds = %367
  %369 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %370 unwind label %380

370:                                              ; preds = %368
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #11
  store i32 0, ptr %28, align 4, !tbaa !9
  br label %371

371:                                              ; preds = %488, %370
  %372 = load i32, ptr %28, align 4, !tbaa !9
  %373 = load i32, ptr %8, align 4, !tbaa !9
  %374 = icmp slt i32 %372, %373
  br i1 %374, label %385, label %375

375:                                              ; preds = %371
  store i32 8, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  br label %491

376:                                              ; preds = %367
  %377 = landingpad { ptr, i32 }
          cleanup
  %378 = extractvalue { ptr, i32 } %377, 0
  store ptr %378, ptr %9, align 8
  %379 = extractvalue { ptr, i32 } %377, 1
  store i32 %379, ptr %10, align 4
  br label %384

380:                                              ; preds = %368
  %381 = landingpad { ptr, i32 }
          cleanup
  %382 = extractvalue { ptr, i32 } %381, 0
  store ptr %382, ptr %9, align 8
  %383 = extractvalue { ptr, i32 } %381, 1
  store i32 %383, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #11
  br label %384

384:                                              ; preds = %380, %376
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #11
  br label %519

385:                                              ; preds = %371
  %386 = load ptr, ptr %18, align 8, !tbaa !5
  %387 = load i32, ptr %28, align 4, !tbaa !9
  %388 = sext i32 %387 to i64
  %389 = getelementptr inbounds double, ptr %386, i64 %388
  %390 = load double, ptr %389, align 8, !tbaa !15
  %391 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %390)
          to label %392 unwind label %430

392:                                              ; preds = %385
  br i1 %391, label %425, label %393

393:                                              ; preds = %392
  %394 = load ptr, ptr %20, align 8, !tbaa !5
  %395 = load i32, ptr %28, align 4, !tbaa !9
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds double, ptr %394, i64 %396
  %398 = load double, ptr %397, align 8, !tbaa !15
  %399 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %398)
          to label %400 unwind label %430

400:                                              ; preds = %393
  br i1 %399, label %425, label %401

401:                                              ; preds = %400
  %402 = load ptr, ptr %21, align 8, !tbaa !5
  %403 = load i32, ptr %28, align 4, !tbaa !9
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds double, ptr %402, i64 %404
  %406 = load double, ptr %405, align 8, !tbaa !15
  %407 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %406)
          to label %408 unwind label %430

408:                                              ; preds = %401
  br i1 %407, label %425, label %409

409:                                              ; preds = %408
  %410 = load ptr, ptr %22, align 8, !tbaa !5
  %411 = load i32, ptr %28, align 4, !tbaa !9
  %412 = sext i32 %411 to i64
  %413 = getelementptr inbounds double, ptr %410, i64 %412
  %414 = load double, ptr %413, align 8, !tbaa !15
  %415 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %414)
          to label %416 unwind label %430

416:                                              ; preds = %409
  br i1 %415, label %425, label %417

417:                                              ; preds = %416
  %418 = load ptr, ptr %23, align 8, !tbaa !5
  %419 = load i32, ptr %28, align 4, !tbaa !9
  %420 = sext i32 %419 to i64
  %421 = getelementptr inbounds double, ptr %418, i64 %420
  %422 = load double, ptr %421, align 8, !tbaa !15
  %423 = invoke noundef zeroext i1 @_ZSt5isnand(double noundef %422)
          to label %424 unwind label %430

424:                                              ; preds = %417
  br i1 %423, label %425, label %434

425:                                              ; preds = %424, %416, %408, %400, %392
  %426 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.39)
          to label %427 unwind label %430

427:                                              ; preds = %425
  %428 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.40)
          to label %429 unwind label %430

429:                                              ; preds = %427
  call void @exit(i32 noundef 0) #13
  unreachable

430:                                              ; preds = %484, %482, %474, %466, %458, %450, %442, %434, %427, %425, %417, %409, %401, %393, %385
  %431 = landingpad { ptr, i32 }
          cleanup
  %432 = extractvalue { ptr, i32 } %431, 0
  store ptr %432, ptr %9, align 8
  %433 = extractvalue { ptr, i32 } %431, 1
  store i32 %433, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #11
  br label %519

434:                                              ; preds = %424
  %435 = load ptr, ptr %18, align 8, !tbaa !5
  %436 = load i32, ptr %28, align 4, !tbaa !9
  %437 = sext i32 %436 to i64
  %438 = getelementptr inbounds double, ptr %435, i64 %437
  %439 = load double, ptr %438, align 8, !tbaa !15
  %440 = invoke noundef zeroext i1 @_ZSt5isinfd(double noundef %439)
          to label %441 unwind label %430

441:                                              ; preds = %434
  br i1 %440, label %482, label %442

442:                                              ; preds = %441
  %443 = load ptr, ptr %19, align 8, !tbaa !5
  %444 = load i32, ptr %28, align 4, !tbaa !9
  %445 = sext i32 %444 to i64
  %446 = getelementptr inbounds double, ptr %443, i64 %445
  %447 = load double, ptr %446, align 8, !tbaa !15
  %448 = invoke noundef zeroext i1 @_ZSt5isinfd(double noundef %447)
          to label %449 unwind label %430

449:                                              ; preds = %442
  br i1 %448, label %482, label %450

450:                                              ; preds = %449
  %451 = load ptr, ptr %20, align 8, !tbaa !5
  %452 = load i32, ptr %28, align 4, !tbaa !9
  %453 = sext i32 %452 to i64
  %454 = getelementptr inbounds double, ptr %451, i64 %453
  %455 = load double, ptr %454, align 8, !tbaa !15
  %456 = invoke noundef zeroext i1 @_ZSt5isinfd(double noundef %455)
          to label %457 unwind label %430

457:                                              ; preds = %450
  br i1 %456, label %482, label %458

458:                                              ; preds = %457
  %459 = load ptr, ptr %21, align 8, !tbaa !5
  %460 = load i32, ptr %28, align 4, !tbaa !9
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds double, ptr %459, i64 %461
  %463 = load double, ptr %462, align 8, !tbaa !15
  %464 = invoke noundef zeroext i1 @_ZSt5isinfd(double noundef %463)
          to label %465 unwind label %430

465:                                              ; preds = %458
  br i1 %464, label %482, label %466

466:                                              ; preds = %465
  %467 = load ptr, ptr %22, align 8, !tbaa !5
  %468 = load i32, ptr %28, align 4, !tbaa !9
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds double, ptr %467, i64 %469
  %471 = load double, ptr %470, align 8, !tbaa !15
  %472 = invoke noundef zeroext i1 @_ZSt5isinfd(double noundef %471)
          to label %473 unwind label %430

473:                                              ; preds = %466
  br i1 %472, label %482, label %474

474:                                              ; preds = %473
  %475 = load ptr, ptr %23, align 8, !tbaa !5
  %476 = load i32, ptr %28, align 4, !tbaa !9
  %477 = sext i32 %476 to i64
  %478 = getelementptr inbounds double, ptr %475, i64 %477
  %479 = load double, ptr %478, align 8, !tbaa !15
  %480 = invoke noundef zeroext i1 @_ZSt5isinfd(double noundef %479)
          to label %481 unwind label %430

481:                                              ; preds = %474
  br i1 %480, label %482, label %487

482:                                              ; preds = %481, %473, %465, %457, %449, %441
  %483 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.41)
          to label %484 unwind label %430

484:                                              ; preds = %482
  %485 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.40)
          to label %486 unwind label %430

486:                                              ; preds = %484
  call void @exit(i32 noundef 0) #13
  unreachable

487:                                              ; preds = %481
  br label %488

488:                                              ; preds = %487
  %489 = load i32, ptr %28, align 4, !tbaa !9
  %490 = add nsw i32 %489, 1
  store i32 %490, ptr %28, align 4, !tbaa !9
  br label %371, !llvm.loop !22

491:                                              ; preds = %375
  %492 = load ptr, ptr %18, align 8, !tbaa !5
  %493 = icmp eq ptr %492, null
  br i1 %493, label %495, label %494

494:                                              ; preds = %491
  call void @_ZdaPv(ptr noundef %492) #14
  br label %495

495:                                              ; preds = %494, %491
  %496 = load ptr, ptr %19, align 8, !tbaa !5
  %497 = icmp eq ptr %496, null
  br i1 %497, label %499, label %498

498:                                              ; preds = %495
  call void @_ZdaPv(ptr noundef %496) #14
  br label %499

499:                                              ; preds = %498, %495
  %500 = load ptr, ptr %20, align 8, !tbaa !5
  %501 = icmp eq ptr %500, null
  br i1 %501, label %503, label %502

502:                                              ; preds = %499
  call void @_ZdaPv(ptr noundef %500) #14
  br label %503

503:                                              ; preds = %502, %499
  %504 = load ptr, ptr %21, align 8, !tbaa !5
  %505 = icmp eq ptr %504, null
  br i1 %505, label %507, label %506

506:                                              ; preds = %503
  call void @_ZdaPv(ptr noundef %504) #14
  br label %507

507:                                              ; preds = %506, %503
  %508 = load ptr, ptr %22, align 8, !tbaa !5
  %509 = icmp eq ptr %508, null
  br i1 %509, label %511, label %510

510:                                              ; preds = %507
  call void @_ZdaPv(ptr noundef %508) #14
  br label %511

511:                                              ; preds = %510, %507
  %512 = load ptr, ptr %23, align 8, !tbaa !5
  %513 = icmp eq ptr %512, null
  br i1 %513, label %515, label %514

514:                                              ; preds = %511
  call void @_ZdaPv(ptr noundef %512) #14
  br label %515

515:                                              ; preds = %514, %511
  %516 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN7SGTELIB16surrogate_deleteEPNS_9SurrogateE(ptr noundef %516)
          to label %517 unwind label %252

517:                                              ; preds = %515
  invoke void @_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(112) %25)
          to label %518 unwind label %252

518:                                              ; preds = %517
  store i32 1, ptr %17, align 4
  call void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(112) %25) #11
  call void @llvm.lifetime.end.p0(i64 376, ptr %25) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  br label %527

519:                                              ; preds = %430, %384, %361, %252
  call void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(112) %25) #11
  br label %520

520:                                              ; preds = %519, %248
  call void @llvm.lifetime.end.p0(i64 376, ptr %25) #11
  br label %521

521:                                              ; preds = %520, %224, %168
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #11
  br label %522

522:                                              ; preds = %521, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #11
  br label %523

523:                                              ; preds = %522, %160
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #11
  br label %524

524:                                              ; preds = %523, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #11
  br label %525

525:                                              ; preds = %524, %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #11
  br label %526

526:                                              ; preds = %525, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #11
  br label %528

527:                                              ; preds = %518, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  call void @_ZN7SGTELIB11TrainingSetD1Ev(ptr noundef nonnull align 8 dereferenceable(504) %12) #11
  call void @llvm.lifetime.end.p0(i64 504, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #11
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #11
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #11
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #11
  ret void

528:                                              ; preds = %526, %93, %84, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  call void @_ZN7SGTELIB11TrainingSetD1Ev(ptr noundef nonnull align 8 dereferenceable(504) %12) #11
  br label %529

529:                                              ; preds = %528, %63
  call void @llvm.lifetime.end.p0(i64 504, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #11
  br label %530

530:                                              ; preds = %529, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #11
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #11
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #11
  br label %531

531:                                              ; preds = %530
  %532 = load ptr, ptr %9, align 8
  %533 = load i32, ptr %10, align 4
  %534 = insertvalue { ptr, i32 } poison, ptr %532, 0
  %535 = insertvalue { ptr, i32 } %534, i32 %533, 1
  resume { ptr, i32 } %535
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #7

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(112)) #3 align 2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #9

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #10

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.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.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"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.std::__cxx11::basic_ostringstream" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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 void @_ZN7SGTELIB11TrainingSetC1ERKNS_6MatrixES3_(ptr noundef nonnull align 8 dereferenceable(504), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2

declare noundef ptr @_ZN7SGTELIB17Surrogate_FactoryERNS_11TrainingSetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(504), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN7SGTELIB9Surrogate5buildEv(ptr noundef nonnull align 8 dereferenceable(985)) local_unnamed_addr #2

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

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

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

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

declare noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @_ZN7SGTELIB16surrogate_deleteEPNS_9SurrogateE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7SGTELIB10test_quickERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6MatrixE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.SGTELIB::Matrix", align 8
  %5 = alloca %"class.SGTELIB::TrainingSet", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_ostringstream", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.15)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.30)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.6)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %4) #10
  call void @_ZN7SGTELIB14test_functionsERKNS_6MatrixE(ptr dead_on_unwind nonnull writable sret(%"class.SGTELIB::Matrix") align 8 %4, ptr noundef nonnull align 8 dereferenceable(56) %2)
  %15 = call noundef i32 @_ZNK7SGTELIB6Matrix11get_nb_colsEv(ptr noundef nonnull align 8 dereferenceable(56) %4)
  call void @llvm.lifetime.start.p0(i64 504, ptr nonnull %5) #10
  invoke void @_ZN7SGTELIB11TrainingSetC1ERKNS_6MatrixES3_(ptr noundef nonnull align 8 dereferenceable(504) %5, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %4)
          to label %16 unwind label %29

16:                                               ; preds = %3
  %17 = invoke noundef ptr @_ZN7SGTELIB17Surrogate_FactoryERNS_11TrainingSetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(504) %5, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %18 unwind label %31

18:                                               ; preds = %16
  %19 = invoke noundef zeroext i1 @_ZN7SGTELIB9Surrogate5buildEv(ptr noundef nonnull align 8 dereferenceable(985) %17)
          to label %20 unwind label %31

20:                                               ; preds = %18
  br i1 %19, label %46, label %21

21:                                               ; preds = %20
  invoke void @_ZN7SGTELIB16surrogate_deleteEPNS_9SurrogateE(ptr noundef nonnull %17)
          to label %22 unwind label %31

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #10
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull @.str.31, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %23 unwind label %33

23:                                               ; preds = %22
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.32)
          to label %24 unwind label %35

24:                                               ; preds = %23
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %26 unwind label %37

26:                                               ; preds = %24
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #10
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull @.str.31, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %27 unwind label %41

27:                                               ; preds = %26
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.32)
          to label %28 unwind label %43

28:                                               ; preds = %27
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  br label %250

29:                                               ; preds = %3
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %252

31:                                               ; preds = %21, %18, %16
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %251

33:                                               ; preds = %22
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %40

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

37:                                               ; preds = %24
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  br label %39

39:                                               ; preds = %37, %35
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %40

40:                                               ; preds = %39, %33
  %.pn.pn = phi { ptr, i32 } [ %.pn, %39 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #10
  br label %251

41:                                               ; preds = %26
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %27
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #10
  br label %45

45:                                               ; preds = %43, %41
  %.pn112 = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #10
  br label %251

46:                                               ; preds = %20
  %47 = zext i32 %15 to i64
  %48 = icmp slt i32 %15, 0
  %49 = shl nuw nsw i64 %47, 3
  %50 = select i1 %48, i64 -1, i64 %49
  %51 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %50) #11
          to label %52 unwind label %63

52:                                               ; preds = %46
  %53 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %50) #11
          to label %54 unwind label %65

54:                                               ; preds = %52
  %55 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %50) #11
          to label %56 unwind label %67

56:                                               ; preds = %54
  %57 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %50) #11
          to label %58 unwind label %69

58:                                               ; preds = %56
  %59 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %50) #11
          to label %60 unwind label %71

60:                                               ; preds = %58
  %61 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %50) #11
          to label %.preheader128 unwind label %73

.preheader128:                                    ; preds = %60
  %62 = icmp sgt i32 %15, 0
  br i1 %62, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %92, %.preheader128
  call void @llvm.lifetime.start.p0(i64 376, ptr nonnull %9) #10
  invoke void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(112) %9)
          to label %96 unwind label %109

63:                                               ; preds = %46
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %251

65:                                               ; preds = %52
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %251

67:                                               ; preds = %54
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %251

69:                                               ; preds = %56
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %251

71:                                               ; preds = %58
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %251

73:                                               ; preds = %60
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %251

.lr.ph:                                           ; preds = %.preheader128, %92
  %indvars.iv = phi i64 [ %indvars.iv.next, %92 ], [ 0, %.preheader128 ]
  %75 = trunc nuw nsw i64 %indvars.iv to i32
  %76 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %17, i32 noundef 0, i32 noundef %75)
          to label %77 unwind label %94

77:                                               ; preds = %.lr.ph
  %78 = getelementptr inbounds double, ptr %51, i64 %indvars.iv
  store double %76, ptr %78, align 8, !tbaa !5
  %79 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %17, i32 noundef 2, i32 noundef %75)
          to label %80 unwind label %94

80:                                               ; preds = %77
  %81 = getelementptr inbounds double, ptr %53, i64 %indvars.iv
  store double %79, ptr %81, align 8, !tbaa !5
  %82 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %17, i32 noundef 4, i32 noundef %75)
          to label %83 unwind label %94

83:                                               ; preds = %80
  %84 = getelementptr inbounds double, ptr %55, i64 %indvars.iv
  store double %82, ptr %84, align 8, !tbaa !5
  %85 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %17, i32 noundef 6, i32 noundef %75)
          to label %86 unwind label %94

86:                                               ; preds = %83
  %87 = getelementptr inbounds double, ptr %57, i64 %indvars.iv
  store double %85, ptr %87, align 8, !tbaa !5
  %88 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %17, i32 noundef 7, i32 noundef %75)
          to label %89 unwind label %94

89:                                               ; preds = %86
  %90 = getelementptr inbounds double, ptr %59, i64 %indvars.iv
  store double %88, ptr %90, align 8, !tbaa !5
  %91 = invoke noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %17, i32 noundef 12, i32 noundef %75)
          to label %92 unwind label %94

92:                                               ; preds = %89
  %93 = getelementptr inbounds double, ptr %61, i64 %indvars.iv
  store double %91, ptr %93, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %47
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

94:                                               ; preds = %89, %86, %83, %80, %77, %.lr.ph
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %251

96:                                               ; preds = %._crit_edge
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.33)
          to label %98 unwind label %111

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.34)
          to label %100 unwind label %111

100:                                              ; preds = %98
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %102 unwind label %111

102:                                              ; preds = %100
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @.str.6)
          to label %104 unwind label %111

104:                                              ; preds = %102
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.35)
          to label %106 unwind label %111

106:                                              ; preds = %104
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.36)
          to label %.preheader unwind label %111

.preheader:                                       ; preds = %106
  br i1 %62, label %.lr.ph131, label %._crit_edge132

._crit_edge132:                                   ; preds = %188, %.preheader
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.36)
          to label %191 unwind label %111

109:                                              ; preds = %._crit_edge
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %249

111:                                              ; preds = %246, %._crit_edge136, %._crit_edge132, %106, %104, %102, %100, %98, %96
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %248

.lr.ph131:                                        ; preds = %.preheader, %188
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %188 ], [ 0, %.preheader ]
  %113 = load ptr, ptr %9, align 8, !tbaa !11
  %114 = getelementptr i8, ptr %113, i64 -24
  %115 = load i64, ptr %114, align 8
  %116 = getelementptr inbounds i8, ptr %9, i64 %115
  %117 = call noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %116, i64 noundef 3)
  %118 = trunc nuw nsw i64 %indvars.iv138 to i32
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef %118)
          to label %120 unwind label %189

120:                                              ; preds = %.lr.ph131
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull @.str.37)
          to label %122 unwind label %189

122:                                              ; preds = %120
  %123 = load ptr, ptr %9, align 8, !tbaa !11
  %124 = getelementptr i8, ptr %123, i64 -24
  %125 = load i64, ptr %124, align 8
  %126 = getelementptr inbounds i8, ptr %9, i64 %125
  %127 = call noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %126, i64 noundef 14)
  %128 = getelementptr inbounds double, ptr %51, i64 %indvars.iv138
  %129 = load double, ptr %128, align 8, !tbaa !5
  %130 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %129)
          to label %131 unwind label %189

131:                                              ; preds = %122
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @.str.37)
          to label %133 unwind label %189

133:                                              ; preds = %131
  %134 = load ptr, ptr %9, align 8, !tbaa !11
  %135 = getelementptr i8, ptr %134, i64 -24
  %136 = load i64, ptr %135, align 8
  %137 = getelementptr inbounds i8, ptr %9, i64 %136
  %138 = call noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %137, i64 noundef 14)
  %139 = getelementptr inbounds double, ptr %53, i64 %indvars.iv138
  %140 = load double, ptr %139, align 8, !tbaa !5
  %141 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %140)
          to label %142 unwind label %189

142:                                              ; preds = %133
  %143 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull @.str.37)
          to label %144 unwind label %189

144:                                              ; preds = %142
  %145 = load ptr, ptr %9, align 8, !tbaa !11
  %146 = getelementptr i8, ptr %145, i64 -24
  %147 = load i64, ptr %146, align 8
  %148 = getelementptr inbounds i8, ptr %9, i64 %147
  %149 = call noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %148, i64 noundef 14)
  %150 = getelementptr inbounds double, ptr %55, i64 %indvars.iv138
  %151 = load double, ptr %150, align 8, !tbaa !5
  %152 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %151)
          to label %153 unwind label %189

153:                                              ; preds = %144
  %154 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef nonnull @.str.37)
          to label %155 unwind label %189

155:                                              ; preds = %153
  %156 = load ptr, ptr %9, align 8, !tbaa !11
  %157 = getelementptr i8, ptr %156, i64 -24
  %158 = load i64, ptr %157, align 8
  %159 = getelementptr inbounds i8, ptr %9, i64 %158
  %160 = call noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %159, i64 noundef 14)
  %161 = getelementptr inbounds double, ptr %57, i64 %indvars.iv138
  %162 = load double, ptr %161, align 8, !tbaa !5
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %162)
          to label %164 unwind label %189

164:                                              ; preds = %155
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef nonnull @.str.37)
          to label %166 unwind label %189

166:                                              ; preds = %164
  %167 = load ptr, ptr %9, align 8, !tbaa !11
  %168 = getelementptr i8, ptr %167, i64 -24
  %169 = load i64, ptr %168, align 8
  %170 = getelementptr inbounds i8, ptr %9, i64 %169
  %171 = call noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %170, i64 noundef 14)
  %172 = getelementptr inbounds double, ptr %59, i64 %indvars.iv138
  %173 = load double, ptr %172, align 8, !tbaa !5
  %174 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %173)
          to label %175 unwind label %189

175:                                              ; preds = %166
  %176 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %174, ptr noundef nonnull @.str.37)
          to label %177 unwind label %189

177:                                              ; preds = %175
  %178 = load ptr, ptr %9, align 8, !tbaa !11
  %179 = getelementptr i8, ptr %178, i64 -24
  %180 = load i64, ptr %179, align 8
  %181 = getelementptr inbounds i8, ptr %9, i64 %180
  %182 = call noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216) %181, i64 noundef 14)
  %183 = getelementptr inbounds double, ptr %61, i64 %indvars.iv138
  %184 = load double, ptr %183, align 8, !tbaa !5
  %185 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %9, double noundef %184)
          to label %186 unwind label %189

186:                                              ; preds = %177
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %185, ptr noundef nonnull @.str.38)
          to label %188 unwind label %189

188:                                              ; preds = %186
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond142.not = icmp eq i64 %indvars.iv.next139, %47
  br i1 %exitcond142.not, label %._crit_edge132, label %.lr.ph131, !llvm.loop !13

189:                                              ; preds = %186, %177, %175, %166, %164, %155, %153, %144, %142, %133, %131, %122, %120, %.lr.ph131
  %190 = landingpad { ptr, i32 }
          cleanup
  br label %248

191:                                              ; preds = %._crit_edge132
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  invoke void @_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(112) %9)
          to label %192 unwind label %196

192:                                              ; preds = %191
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %194 unwind label %198

194:                                              ; preds = %192
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  br i1 %62, label %.lr.ph135, label %._crit_edge136

195:                                              ; preds = %239
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %exitcond147.not = icmp eq i64 %indvars.iv.next144, %47
  br i1 %exitcond147.not, label %._crit_edge136, label %.lr.ph135, !llvm.loop !14

196:                                              ; preds = %191
  %197 = landingpad { ptr, i32 }
          cleanup
  br label %200

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

200:                                              ; preds = %198, %196
  %.pn114 = phi { ptr, i32 } [ %199, %198 ], [ %197, %196 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  br label %248

.lr.ph135:                                        ; preds = %194, %195
  %indvars.iv143 = phi i64 [ %indvars.iv.next144, %195 ], [ 0, %194 ]
  %201 = getelementptr inbounds double, ptr %51, i64 %indvars.iv143
  %202 = load double, ptr %201, align 8, !tbaa !5
  %203 = call noundef zeroext i1 @_ZSt5isnand(double noundef %202)
  br i1 %203, label %220, label %204

204:                                              ; preds = %.lr.ph135
  %205 = getelementptr inbounds double, ptr %55, i64 %indvars.iv143
  %206 = load double, ptr %205, align 8, !tbaa !5
  %207 = call noundef zeroext i1 @_ZSt5isnand(double noundef %206)
  br i1 %207, label %220, label %208

208:                                              ; preds = %204
  %209 = getelementptr inbounds double, ptr %57, i64 %indvars.iv143
  %210 = load double, ptr %209, align 8, !tbaa !5
  %211 = call noundef zeroext i1 @_ZSt5isnand(double noundef %210)
  br i1 %211, label %220, label %212

212:                                              ; preds = %208
  %213 = getelementptr inbounds double, ptr %59, i64 %indvars.iv143
  %214 = load double, ptr %213, align 8, !tbaa !5
  %215 = call noundef zeroext i1 @_ZSt5isnand(double noundef %214)
  br i1 %215, label %220, label %216

216:                                              ; preds = %212
  %217 = getelementptr inbounds double, ptr %61, i64 %indvars.iv143
  %218 = load double, ptr %217, align 8, !tbaa !5
  %219 = call noundef zeroext i1 @_ZSt5isnand(double noundef %218)
  br i1 %219, label %220, label %227

220:                                              ; preds = %216, %212, %208, %204, %.lr.ph135
  %221 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.39)
          to label %222 unwind label %225

222:                                              ; preds = %220
  %223 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.40)
          to label %224 unwind label %225

224:                                              ; preds = %222
  call void @exit(i32 noundef 0) #12
  unreachable

225:                                              ; preds = %243, %241, %222, %220
  %226 = landingpad { ptr, i32 }
          cleanup
  br label %248

227:                                              ; preds = %216
  %228 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %202)
  br i1 %228, label %241, label %229

229:                                              ; preds = %227
  %230 = getelementptr inbounds double, ptr %53, i64 %indvars.iv143
  %231 = load double, ptr %230, align 8, !tbaa !5
  %232 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %231)
  br i1 %232, label %241, label %233

233:                                              ; preds = %229
  %234 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %206)
  br i1 %234, label %241, label %235

235:                                              ; preds = %233
  %236 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %210)
  br i1 %236, label %241, label %237

237:                                              ; preds = %235
  %238 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %214)
  br i1 %238, label %241, label %239

239:                                              ; preds = %237
  %240 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %218)
  br i1 %240, label %241, label %195

241:                                              ; preds = %239, %237, %235, %233, %229, %227
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.41)
          to label %243 unwind label %225

243:                                              ; preds = %241
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.40)
          to label %245 unwind label %225

245:                                              ; preds = %243
  call void @exit(i32 noundef 0) #12
  unreachable

._crit_edge136:                                   ; preds = %195, %194
  call void @_ZdaPv(ptr noundef nonnull %51) #13
  call void @_ZdaPv(ptr noundef nonnull %53) #13
  call void @_ZdaPv(ptr noundef nonnull %55) #13
  call void @_ZdaPv(ptr noundef nonnull %57) #13
  call void @_ZdaPv(ptr noundef nonnull %59) #13
  call void @_ZdaPv(ptr noundef nonnull %61) #13
  invoke void @_ZN7SGTELIB16surrogate_deleteEPNS_9SurrogateE(ptr noundef nonnull %17)
          to label %246 unwind label %111

246:                                              ; preds = %._crit_edge136
  invoke void @_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(112) %9)
          to label %247 unwind label %111

247:                                              ; preds = %246
  call void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(112) %9) #10
  call void @llvm.lifetime.end.p0(i64 376, ptr nonnull %9) #10
  br label %250

248:                                              ; preds = %225, %200, %189, %111
  %.pn116 = phi { ptr, i32 } [ %190, %189 ], [ %226, %225 ], [ %112, %111 ], [ %.pn114, %200 ]
  call void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(112) %9) #10
  br label %249

249:                                              ; preds = %248, %109
  %.pn116.pn = phi { ptr, i32 } [ %.pn116, %248 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 376, ptr nonnull %9) #10
  br label %251

250:                                              ; preds = %247, %28
  call void @_ZN7SGTELIB11TrainingSetD1Ev(ptr noundef nonnull align 8 dereferenceable(504) %5) #10
  call void @llvm.lifetime.end.p0(i64 504, ptr nonnull %5) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #10
  ret void

251:                                              ; preds = %63, %67, %71, %249, %94, %73, %69, %65, %45, %40, %31
  %.pn119.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn112, %45 ], [ %.pn.pn, %40 ], [ %32, %31 ], [ %64, %63 ], [ %66, %65 ], [ %68, %67 ], [ %70, %69 ], [ %72, %71 ], [ %95, %94 ], [ %.pn116.pn, %249 ], [ %74, %73 ]
  call void @_ZN7SGTELIB11TrainingSetD1Ev(ptr noundef nonnull align 8 dereferenceable(504) %5) #10
  br label %252

252:                                              ; preds = %251, %29
  %.pn119.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn119.pn.pn.pn.pn.pn.pn, %251 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 504, ptr nonnull %5) #10
  call void @_ZN7SGTELIB6MatrixD1Ev(ptr noundef nonnull align 8 dereferenceable(56) %4) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn119.pn.pn.pn.pn.pn.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt8ios_base5widthEl(ptr noundef nonnull align 8 dereferenceable(216), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #3 align 2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #8

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #9

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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