; LLVM IR from ermig1979/Simd :: src/Test/TestNeural.ll (ZN4Test7PrepareERKNS_11TrainSampleEmRNS_9TrainDataE)

; 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.Test::Log" = type { %"class.std::mutex", %"class.std::basic_ofstream", i32, i8, i8, %"class.std::map", %"class.std::map" }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.15 }
%union.anon.15 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::thread::id, std::pair<const std::thread::id, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::thread::id, std::__cxx11::basic_string<char>>>, std::less<std::thread::id>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::thread::id, std::pair<const std::thread::id, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::thread::id, std::__cxx11::basic_string<char>>>, std::less<std::thread::id>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Simd::Allocator.41" = type { i8 }
%"class.std::random_device" = type { %union.anon.43 }
%union.anon.43 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"struct.Test::TrainSample" = type { %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.3" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::vector<float, Simd::Allocator<float>>, std::allocator<std::vector<float, Simd::Allocator<float>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<float, Simd::Allocator<float>>, std::allocator<std::vector<float, Simd::Allocator<float>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<float, Simd::Allocator<float>>, std::allocator<std::vector<float, Simd::Allocator<float>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<float, Simd::Allocator<float>>, std::allocator<std::vector<float, Simd::Allocator<float>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Test::TrainData" = type { %"struct.Test::TrainSample", %"struct.Test::TrainSample" }

@_ZN4Test3Log5s_logE = external global %"class.Test::Log", align 8
@.str.51 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

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

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

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

; 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) #3

declare void @_ZN4Test3Log5WriteENS0_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(656), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Test7PrepareERKNS_11TrainSampleEmRNS_9TrainDataE(ptr noundef nonnull align 8 dereferenceable(72) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(144) %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::vector.39", align 8
  %8 = alloca %"struct.Simd::Allocator.41", align 1
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::random_device", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::linear_congruential_engine", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.Test::TrainSample", ptr %20, i32 0, i32 0
  %22 = call noundef i64 @_ZNKSt6vectorIS_IfN4Simd9AllocatorIfEEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZN4Simd9AllocatorIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @_ZNSt6vectorIlN4Simd9AllocatorIlEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %22, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %23

23:                                               ; preds = %32, %3
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %35

28:                                               ; preds = %23
  %29 = load i64, ptr %9, align 8, !tbaa !9
  %30 = load i64, ptr %9, align 8, !tbaa !9
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %30) #7
  store i64 %29, ptr %31, align 8, !tbaa !9
  br label %32

32:                                               ; preds = %28
  %33 = load i64, ptr %9, align 8, !tbaa !9
  %34 = add i64 %33, 1
  store i64 %34, ptr %9, align 8, !tbaa !9
  br label %23, !llvm.loop !11

35:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 5000, ptr %10) #7
  invoke void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %10)
          to label %36 unwind label %63

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %37 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %10)
          to label %38 unwind label %67

38:                                               ; preds = %36
  %39 = zext i32 %37 to i64
  invoke void @_ZNSt26linear_congruential_engineImLm48271ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef %39)
          to label %40 unwind label %67

40:                                               ; preds = %38
  %41 = call ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  %43 = call ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %43, ptr %44, align 8
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  invoke void @_ZSt7shuffleIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlN4Simd9AllocatorIlEEEEERSt26linear_congruential_engineImLm48271ELm0ELm2147483647EEEvT_SC_OT0_(ptr %46, ptr %48, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %49 unwind label %67

49:                                               ; preds = %40
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.Test::TrainData", ptr %50, i32 0, i32 1
  %52 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  invoke void @_ZN4Test11TrainSample7ReserveEm(ptr noundef nonnull align 8 dereferenceable(72) %51, i64 noundef %52)
          to label %53 unwind label %67

53:                                               ; preds = %49
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.Test::TrainData", ptr %54, i32 0, i32 0
  %56 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  invoke void @_ZN4Test11TrainSample7ReserveEm(ptr noundef nonnull align 8 dereferenceable(72) %55, i64 noundef %56)
          to label %57 unwind label %67

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %58

58:                                               ; preds = %96, %57
  %59 = load i64, ptr %16, align 8, !tbaa !9
  %60 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  %61 = icmp ult i64 %59, %60
  br i1 %61, label %71, label %62

62:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %99

63:                                               ; preds = %35
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %11, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %12, align 4
  br label %142

67:                                               ; preds = %53, %49, %40, %38, %36
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %11, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %12, align 4
  br label %141

71:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %72 = load i64, ptr %16, align 8, !tbaa !9
  %73 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %72) #7
  %74 = load i64, ptr %73, align 8, !tbaa !9
  store i64 %74, ptr %17, align 8, !tbaa !9
  %75 = load i64, ptr %16, align 8, !tbaa !9
  %76 = load i64, ptr %5, align 8, !tbaa !9
  %77 = urem i64 %75, %76
  %78 = icmp eq i64 %77, 0
  br i1 %78, label %79, label %89

79:                                               ; preds = %71
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load i64, ptr %17, align 8, !tbaa !9
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.Test::TrainData", ptr %82, i32 0, i32 1
  invoke void @_ZN4Test3AddERKNS_11TrainSampleEmRS0_(ptr noundef nonnull align 8 dereferenceable(72) %80, i64 noundef %81, ptr noundef nonnull align 8 dereferenceable(72) %83)
          to label %84 unwind label %85

84:                                               ; preds = %79
  br label %95

85:                                               ; preds = %89, %79
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %11, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %141

89:                                               ; preds = %71
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = load i64, ptr %17, align 8, !tbaa !9
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.Test::TrainData", ptr %92, i32 0, i32 0
  invoke void @_ZN4Test3AddERKNS_11TrainSampleEmRS0_(ptr noundef nonnull align 8 dereferenceable(72) %90, i64 noundef %91, ptr noundef nonnull align 8 dereferenceable(72) %93)
          to label %94 unwind label %85

94:                                               ; preds = %89
  br label %95

95:                                               ; preds = %94, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %96

96:                                               ; preds = %95
  %97 = load i64, ptr %16, align 8, !tbaa !9
  %98 = add i64 %97, 1
  store i64 %98, ptr %16, align 8, !tbaa !9
  br label %58, !llvm.loop !13

99:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 392, ptr %18) #7
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %18)
          to label %100 unwind label %122

100:                                              ; preds = %99
  %101 = getelementptr inbounds i8, ptr %18, i64 16
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @.str.51)
          to label %103 unwind label %126

103:                                              ; preds = %100
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.Test::TrainData", ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds %"struct.Test::TrainSample", ptr %105, i32 0, i32 0
  %107 = call noundef i64 @_ZNKSt6vectorIS_IfN4Simd9AllocatorIfEEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %106) #7
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %102, i64 noundef %107)
          to label %109 unwind label %126

109:                                              ; preds = %103
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef @.str.52)
          to label %111 unwind label %126

111:                                              ; preds = %109
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.Test::TrainData", ptr %112, i32 0, i32 1
  %114 = getelementptr inbounds %"struct.Test::TrainSample", ptr %113, i32 0, i32 0
  %115 = call noundef i64 @_ZNKSt6vectorIS_IfN4Simd9AllocatorIfEEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #7
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %110, i64 noundef %115)
          to label %117 unwind label %126

117:                                              ; preds = %111
  %118 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef @.str.53)
          to label %119 unwind label %126

119:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(128) %18)
          to label %120 unwind label %130

120:                                              ; preds = %119
  invoke void @_ZN4Test3Log5WriteENS0_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(656) @_ZN4Test3Log5s_logE, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %121 unwind label %134

121:                                              ; preds = %120
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %18) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %10) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr %10) #7
  call void @_ZNSt6vectorIlN4Simd9AllocatorIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  ret void

122:                                              ; preds = %99
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %11, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %12, align 4
  br label %140

126:                                              ; preds = %117, %111, %109, %103, %100
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %11, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %12, align 4
  br label %139

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

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

138:                                              ; preds = %134, %130
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  br label %139

139:                                              ; preds = %138, %126
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %18) #7
  br label %140

140:                                              ; preds = %139, %122
  call void @llvm.lifetime.end.p0(i64 392, ptr %18) #7
  br label %141

141:                                              ; preds = %140, %85, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %10) #7
  br label %142

142:                                              ; preds = %141, %63
  call void @llvm.lifetime.end.p0(i64 5000, ptr %10) #7
  call void @_ZNSt6vectorIlN4Simd9AllocatorIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %143

143:                                              ; preds = %142
  %144 = load ptr, ptr %11, align 8
  %145 = load i32, ptr %12, align 4
  %146 = insertvalue { ptr, i32 } poison, ptr %144, 0
  %147 = insertvalue { ptr, i32 } %146, i32 %145, 1
  resume { ptr, i32 } %147
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlN4Simd9AllocatorIlEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm48271ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Test11TrainSample7ReserveEm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Test3AddERKNS_11TrainSampleEmRS0_(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, ptr noundef nonnull align 8 dereferenceable(72)) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

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

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

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

!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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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.Test::Log" = type { %"class.std::mutex", %"class.std::basic_ofstream", i32, i8, i8, %"class.std::map", %"class.std::map" }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.15 }
%union.anon.15 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::thread::id, std::pair<const std::thread::id, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::thread::id, std::__cxx11::basic_string<char>>>, std::less<std::thread::id>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::thread::id, std::pair<const std::thread::id, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::thread::id, std::__cxx11::basic_string<char>>>, std::less<std::thread::id>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, Simd::Allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.Simd::Allocator.41" = type { i8 }
%"class.std::random_device" = type { %union.anon.43 }
%union.anon.43 = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }

@_ZN4Test3Log5s_logE = external global %"class.Test::Log", align 8
@.str.51 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

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

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

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

; 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 #3

declare void @_ZN4Test3Log5WriteENS0_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(656), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Test7PrepareERKNS_11TrainSampleEmRNS_9TrainDataE(ptr noundef nonnull align 8 dereferenceable(72) %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(144) %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector.39", align 8
  %5 = alloca %"struct.Simd::Allocator.41", align 1
  %6 = alloca %"class.std::random_device", align 8
  %7 = alloca %"class.std::linear_congruential_engine", align 8
  %8 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %10 = tail call noundef i64 @_ZNKSt6vectorIS_IfN4Simd9AllocatorIfEEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZN4Simd9AllocatorIlEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @_ZNSt6vectorIlN4Simd9AllocatorIlEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %10, ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  %11 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %3
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %6) #7
  invoke void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %6)
          to label %16 unwind label %29

.lr.ph:                                           ; preds = %3, %.lr.ph
  %.035 = phi i64 [ %13, %.lr.ph ], [ 0, %3 ]
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.035) #7
  store i64 %.035, ptr %12, align 8, !tbaa !5
  %13 = add nuw i64 %.035, 1
  %14 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %15 = icmp ult i64 %13, %14
  br i1 %15, label %.lr.ph, label %._crit_edge, !llvm.loop !9

16:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %17 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %6)
          to label %18 unwind label %31

18:                                               ; preds = %16
  %19 = zext i32 %17 to i64
  invoke void @_ZNSt26linear_congruential_engineImLm48271ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %19)
          to label %20 unwind label %31

20:                                               ; preds = %18
  %21 = call ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %22 = call ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  invoke void @_ZSt7shuffleIN9__gnu_cxx17__normal_iteratorIPlSt6vectorIlN4Simd9AllocatorIlEEEEERSt26linear_congruential_engineImLm48271ELm0ELm2147483647EEEvT_SC_OT0_(ptr %21, ptr %22, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %23 unwind label %31

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %2, i64 72
  %25 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  invoke void @_ZN4Test11TrainSample7ReserveEm(ptr noundef nonnull align 8 dereferenceable(72) %24, i64 noundef %25)
          to label %26 unwind label %31

26:                                               ; preds = %23
  %27 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  invoke void @_ZN4Test11TrainSample7ReserveEm(ptr noundef nonnull align 8 dereferenceable(72) %2, i64 noundef %27)
          to label %.preheader unwind label %31

.preheader:                                       ; preds = %26
  %28 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %.not39 = icmp eq i64 %28, 0
  br i1 %.not39, label %._crit_edge38, label %.lr.ph37

._crit_edge38:                                    ; preds = %40, %.preheader
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %8) #7
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8)
          to label %44 unwind label %60

29:                                               ; preds = %._crit_edge
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %72

31:                                               ; preds = %26, %23, %20, %18, %16
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %71

.lr.ph37:                                         ; preds = %.preheader, %40
  %.02236 = phi i64 [ %41, %40 ], [ 0, %.preheader ]
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlN4Simd9AllocatorIlEEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.02236) #7
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = urem i64 %.02236, %1
  %36 = icmp eq i64 %35, 0
  %37 = select i1 %36, ptr %24, ptr %2
  invoke void @_ZN4Test3AddERKNS_11TrainSampleEmRS0_(ptr noundef nonnull align 8 dereferenceable(72) %0, i64 noundef %34, ptr noundef nonnull align 8 dereferenceable(72) %37)
          to label %40 unwind label %38

38:                                               ; preds = %.lr.ph37
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %71

40:                                               ; preds = %.lr.ph37
  %41 = add nuw i64 %.02236, 1
  %42 = call noundef i64 @_ZNKSt6vectorIlN4Simd9AllocatorIlEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %43 = icmp ult i64 %41, %42
  br i1 %43, label %.lr.ph37, label %._crit_edge38, !llvm.loop !11

44:                                               ; preds = %._crit_edge38
  %45 = getelementptr inbounds i8, ptr %8, i64 16
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @.str.51)
          to label %47 unwind label %62

47:                                               ; preds = %44
  %48 = call noundef i64 @_ZNKSt6vectorIS_IfN4Simd9AllocatorIfEEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #7
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %46, i64 noundef %48)
          to label %50 unwind label %62

50:                                               ; preds = %47
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @.str.52)
          to label %52 unwind label %62

52:                                               ; preds = %50
  %53 = call noundef i64 @_ZNKSt6vectorIS_IfN4Simd9AllocatorIfEEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #7
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %51, i64 noundef %53)
          to label %55 unwind label %62

55:                                               ; preds = %52
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @.str.53)
          to label %57 unwind label %62

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(128) %8)
          to label %58 unwind label %64

58:                                               ; preds = %57
  invoke void @_ZN4Test3Log5WriteENS0_5LevelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(656) @_ZN4Test3Log5s_logE, i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %59 unwind label %66

59:                                               ; preds = %58
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %6) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #7
  call void @_ZNSt6vectorIlN4Simd9AllocatorIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  ret void

60:                                               ; preds = %._crit_edge38
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %70

62:                                               ; preds = %55, %52, %50, %47, %44
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %69

64:                                               ; preds = %57
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %68

66:                                               ; preds = %58
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %68

68:                                               ; preds = %66, %64
  %.pn = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %69

69:                                               ; preds = %68, %62
  %.pn.pn = phi { ptr, i32 } [ %.pn, %68 ], [ %63, %62 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #7
  br label %70

70:                                               ; preds = %69, %60
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %69 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %8) #7
  br label %71

71:                                               ; preds = %70, %38, %31
  %.pn32 = phi { ptr, i32 } [ %39, %38 ], [ %.pn.pn.pn, %70 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %6) #7
  br label %72

72:                                               ; preds = %71, %29
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %71 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #7
  call void @_ZNSt6vectorIlN4Simd9AllocatorIlEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn32.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIlN4Simd9AllocatorIlEEEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt26linear_congruential_engineImLm48271ELm0ELm2147483647EEC2Em(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4Test11TrainSample7ReserveEm(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Test3AddERKNS_11TrainSampleEmRS0_(ptr noundef nonnull align 8 dereferenceable(72), i64 noundef, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #6

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

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

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

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

!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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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