; LLVM IR from ggml-org/ggml :: examples (common)

; 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::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.44" = type <{ double, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator.47" = type { ptr }
%class.anon = type { i8 }
%"class.std::vector.48" = type { %"struct.std::_Vector_base.49" }
%"struct.std::_Vector_base.49" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.53" = type { ptr }
%"class.std::discrete_distribution" = type { %"struct.std::discrete_distribution<>::param_type" }
%"struct.std::discrete_distribution<>::param_type" = type { %"class.std::vector.48", %"class.std::vector.48" }
%struct.gpt_vocab = type { %"class.std::map", %"class.std::map.8", %"class.std::vector" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<std::__cxx11::basic_string<char>>>::_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::map.8" = type { %"class.std::_Rb_tree.9" }
%"class.std::_Rb_tree.9" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef %1, i32 noundef %2, double noundef %3, double noundef %4, ptr noundef nonnull align 8 dereferenceable(5000) %5) #2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector.39", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"struct.std::pair.44", align 8
  %20 = alloca double, align 8
  %21 = alloca { double, i32 }, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %26 = alloca %class.anon, align 1
  %27 = alloca double, align 8
  %28 = alloca ptr, align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %30 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"class.std::vector.48", align 8
  %33 = alloca double, align 8
  %34 = alloca ptr, align 8
  %35 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %36 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %37 = alloca ptr, align 8
  %38 = alloca double, align 8
  %39 = alloca ptr, align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator.53", align 8
  %41 = alloca %"class.__gnu_cxx::__normal_iterator.53", align 8
  %42 = alloca ptr, align 8
  %43 = alloca double, align 8
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %46 = alloca i32, align 4
  %47 = alloca %"class.std::discrete_distribution", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator.53", align 8
  %49 = alloca %"class.__gnu_cxx::__normal_iterator.53", align 8
  %50 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !11
  store double %4, ptr %11, align 8, !tbaa !11
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.gpt_vocab, ptr %51, i32 0, i32 1
  %53 = call noundef i64 @_ZNKSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %52) #7
  %54 = trunc i64 %53 to i32
  store i32 %54, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #7
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %56)
          to label %57 unwind label %65

57:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %58 = load double, ptr %11, align 8, !tbaa !11
  %59 = fdiv double 1.000000e+00, %58
  store double %59, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %81, %57
  %61 = load i32, ptr %18, align 4, !tbaa !9
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %69, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %88

65:                                               ; preds = %105, %6
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %15, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %16, align 4
  br label %274

69:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load i32, ptr %18, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds float, ptr %70, i64 %72
  %74 = load float, ptr %73, align 4, !tbaa !13
  %75 = fpext float %74 to double
  %76 = load double, ptr %17, align 8, !tbaa !11
  %77 = fmul double %75, %76
  store double %77, ptr %20, align 8, !tbaa !11
  %78 = invoke { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %79 unwind label %84

79:                                               ; preds = %69
  store { double, i32 } %78, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %21, i64 12, i1 false)
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(12) %19)
          to label %80 unwind label %84

80:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %18, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %18, align 4, !tbaa !9
  br label %60, !llvm.loop !15

84:                                               ; preds = %79, %69
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %15, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %274

88:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  %89 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %90 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %22, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %91 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %92 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %24, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef %94) #7
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %23, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  %97 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  %98 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %25, i32 0, i32 0
  store ptr %97, ptr %98, align 8
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %22, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %23, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %25, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8
  invoke void @"_ZSt12partial_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS3_SaIS3_EEEEZ22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEE3$_0EvT_SI_SI_T0_"(ptr %100, ptr %102, ptr %104)
          to label %105 unwind label %118

105:                                              ; preds = %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %107)
          to label %108 unwind label %65

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store double 0xFFF0000000000000, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  store ptr %14, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %109 = load ptr, ptr %28, align 8, !tbaa !5
  %110 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %109) #7
  %111 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %29, i32 0, i32 0
  store ptr %110, ptr %111, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  %112 = load ptr, ptr %28, align 8, !tbaa !5
  %113 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %112) #7
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %30, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  br label %115

115:                                              ; preds = %129, %108
  %116 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #7
  br i1 %116, label %122, label %117

117:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %135

118:                                              ; preds = %88
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %15, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %274

122:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %123 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  store ptr %123, ptr %31, align 8, !tbaa !5
  %124 = load ptr, ptr %31, align 8, !tbaa !5
  %125 = getelementptr inbounds %"struct.std::pair.44", ptr %124, i32 0, i32 0
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %125)
          to label %127 unwind label %131

127:                                              ; preds = %122
  %128 = load double, ptr %126, align 8, !tbaa !11
  store double %128, ptr %27, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  br label %129

129:                                              ; preds = %127
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  br label %115

131:                                              ; preds = %122
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %15, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  br label %273

135:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #7
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  %136 = call noundef i64 @_ZNKSt6vectorISt4pairIdiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  invoke void @_ZNSt6vectorIdSaIdEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %136)
          to label %137 unwind label %147

137:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  store double 0.000000e+00, ptr %33, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  store ptr %14, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %138 = load ptr, ptr %34, align 8, !tbaa !5
  %139 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %138) #7
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %35, i32 0, i32 0
  store ptr %139, ptr %140, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %141 = load ptr, ptr %34, align 8, !tbaa !5
  %142 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %141) #7
  %143 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.47", ptr %36, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  br label %144

144:                                              ; preds = %163, %137
  %145 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36) #7
  br i1 %145, label %151, label %146

146:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %169

147:                                              ; preds = %135
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %15, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %16, align 4
  br label %272

151:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %152 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  store ptr %152, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %153 = load ptr, ptr %37, align 8, !tbaa !5
  %154 = getelementptr inbounds %"struct.std::pair.44", ptr %153, i32 0, i32 0
  %155 = load double, ptr %154, align 8, !tbaa !17
  %156 = load double, ptr %27, align 8, !tbaa !11
  %157 = fsub double %155, %156
  %158 = call double @exp(double noundef %157) #7
  store double %158, ptr %38, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %159 unwind label %165

159:                                              ; preds = %151
  %160 = load double, ptr %38, align 8, !tbaa !11
  %161 = load double, ptr %33, align 8, !tbaa !11
  %162 = fadd double %161, %160
  store double %162, ptr %33, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  br label %163

163:                                              ; preds = %159
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %35) #7
  br label %144

165:                                              ; preds = %151
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %15, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  br label %271

169:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  store ptr %32, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %170 = load ptr, ptr %39, align 8, !tbaa !5
  %171 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  %172 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.53", ptr %40, i32 0, i32 0
  store ptr %171, ptr %172, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %173 = load ptr, ptr %39, align 8, !tbaa !5
  %174 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %173) #7
  %175 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.53", ptr %41, i32 0, i32 0
  store ptr %174, ptr %175, align 8
  br label %176

176:                                              ; preds = %185, %169
  %177 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %41) #7
  br i1 %177, label %179, label %178

178:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  br label %187

179:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %180 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #7
  store ptr %180, ptr %42, align 8, !tbaa !5
  %181 = load double, ptr %33, align 8, !tbaa !11
  %182 = load ptr, ptr %42, align 8, !tbaa !5
  %183 = load double, ptr %182, align 8, !tbaa !11
  %184 = fdiv double %183, %181
  store double %184, ptr %182, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  br label %185

185:                                              ; preds = %179
  %186 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %40) #7
  br label %176

187:                                              ; preds = %178
  %188 = load double, ptr %10, align 8, !tbaa !11
  %189 = fcmp olt double %188, 1.000000e+00
  br i1 %189, label %190, label %244

190:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  store double 0.000000e+00, ptr %43, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  store i32 0, ptr %44, align 4, !tbaa !9
  br label %191

191:                                              ; preds = %220, %190
  %192 = load i32, ptr %44, align 4, !tbaa !9
  %193 = load i32, ptr %9, align 4, !tbaa !9
  %194 = icmp slt i32 %192, %193
  br i1 %194, label %196, label %195

195:                                              ; preds = %191
  store i32 11, ptr %45, align 4
  br label %223

196:                                              ; preds = %191
  %197 = load i32, ptr %44, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %198) #7
  %200 = load double, ptr %199, align 8, !tbaa !11
  %201 = load double, ptr %43, align 8, !tbaa !11
  %202 = fadd double %201, %200
  store double %202, ptr %43, align 8, !tbaa !11
  %203 = load double, ptr %43, align 8, !tbaa !11
  %204 = load double, ptr %10, align 8, !tbaa !11
  %205 = fcmp oge double %203, %204
  br i1 %205, label %206, label %219

206:                                              ; preds = %196
  %207 = load i32, ptr %44, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %9, align 4, !tbaa !9
  %209 = load i32, ptr %9, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %210)
          to label %211 unwind label %215

211:                                              ; preds = %206
  %212 = load i32, ptr %9, align 4, !tbaa !9
  %213 = sext i32 %212 to i64
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %213)
          to label %214 unwind label %215

214:                                              ; preds = %211
  store i32 11, ptr %45, align 4
  br label %223

215:                                              ; preds = %211, %206
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %15, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %271

219:                                              ; preds = %196
  br label %220

220:                                              ; preds = %219
  %221 = load i32, ptr %44, align 4, !tbaa !9
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %44, align 4, !tbaa !9
  br label %191, !llvm.loop !19

223:                                              ; preds = %214, %195
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  br label %224

224:                                              ; preds = %223
  %225 = load double, ptr %43, align 8, !tbaa !11
  %226 = fdiv double 1.000000e+00, %225
  store double %226, ptr %43, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  store i32 0, ptr %46, align 4, !tbaa !9
  br label %227

227:                                              ; preds = %240, %224
  %228 = load i32, ptr %46, align 4, !tbaa !9
  %229 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  %230 = trunc i64 %229 to i32
  %231 = icmp slt i32 %228, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %227
  store i32 14, ptr %45, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  br label %243

233:                                              ; preds = %227
  %234 = load double, ptr %43, align 8, !tbaa !11
  %235 = load i32, ptr %46, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %236) #7
  %238 = load double, ptr %237, align 8, !tbaa !11
  %239 = fmul double %238, %234
  store double %239, ptr %237, align 8, !tbaa !11
  br label %240

240:                                              ; preds = %233
  %241 = load i32, ptr %46, align 4, !tbaa !9
  %242 = add nsw i32 %241, 1
  store i32 %242, ptr %46, align 4, !tbaa !9
  br label %227, !llvm.loop !20

243:                                              ; preds = %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  br label %244

244:                                              ; preds = %243, %187
  call void @llvm.lifetime.start.p0(i64 48, ptr %47) #7
  %245 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  %246 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.53", ptr %48, i32 0, i32 0
  store ptr %245, ptr %246, align 8
  %247 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  %248 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.53", ptr %49, i32 0, i32 0
  store ptr %247, ptr %248, align 8
  %249 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.53", ptr %48, i32 0, i32 0
  %250 = load ptr, ptr %249, align 8
  %251 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.53", ptr %49, i32 0, i32 0
  %252 = load ptr, ptr %251, align 8
  invoke void @_ZNSt21discrete_distributionIiEC2IN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEET_S9_(ptr noundef nonnull align 8 dereferenceable(48) %47, ptr %250, ptr %252)
          to label %253 unwind label %262

253:                                              ; preds = %244
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #7
  %254 = load ptr, ptr %12, align 8, !tbaa !5
  %255 = invoke noundef i32 @_ZNSt21discrete_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 8 dereferenceable(48) %47, ptr noundef nonnull align 8 dereferenceable(5000) %254)
          to label %256 unwind label %266

256:                                              ; preds = %253
  store i32 %255, ptr %50, align 4, !tbaa !9
  %257 = load i32, ptr %50, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIdiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %258) #7
  %260 = getelementptr inbounds %"struct.std::pair.44", ptr %259, i32 0, i32 1
  %261 = load i32, ptr %260, align 8, !tbaa !21
  store i32 1, ptr %45, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  call void @_ZNSt21discrete_distributionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %47) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  ret i32 %261

262:                                              ; preds = %244
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %15, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %16, align 4
  br label %270

266:                                              ; preds = %253
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %15, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  call void @_ZNSt21discrete_distributionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %47) #7
  br label %270

270:                                              ; preds = %266, %262
  call void @llvm.lifetime.end.p0(i64 48, ptr %47) #7
  br label %271

271:                                              ; preds = %270, %215, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  br label %272

272:                                              ; preds = %271, %147
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #7
  br label %273

273:                                              ; preds = %272, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %274

274:                                              ; preds = %273, %118, %84, %65
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %275

275:                                              ; preds = %274
  %276 = load ptr, ptr %15, align 8
  %277 = load i32, ptr %16, align 4
  %278 = insertvalue { ptr, i32 } poison, ptr %276, 0
  %279 = insertvalue { ptr, i32 } %278, i32 %277, 1
  resume { ptr, i32 } %279
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt12partial_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS3_SaIS3_EEEEZ22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEE3$_0EvT_SI_SI_T0_"(ptr, ptr, ptr) #4

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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

; Function Attrs: nounwind
declare double @exp(double noundef) #6

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt21discrete_distributionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !12, i64 0}
!18 = !{!"_ZTSSt4pairIdiE", !12, i64 0, !10, i64 8}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = !{!18, !10, i64 8}


; 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::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<double, int>, std::allocator<std::pair<double, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.44" = type <{ double, i32, [4 x i8] }>
%"class.__gnu_cxx::__normal_iterator.47" = type { ptr }
%"class.std::vector.48" = type { %"struct.std::_Vector_base.49" }
%"struct.std::_Vector_base.49" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.53" = type { ptr }
%"class.std::discrete_distribution" = type { %"struct.std::discrete_distribution<>::param_type" }
%"struct.std::discrete_distribution<>::param_type" = type { %"class.std::vector.48", %"class.std::vector.48" }

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr nocapture noundef readonly %1, i32 noundef %2, double noundef %3, double noundef %4, ptr noundef nonnull align 8 dereferenceable(5000) %5) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"class.std::vector.39", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair.44", align 8
  %10 = alloca double, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %12 = alloca double, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %15 = alloca %"class.std::vector.48", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.47", align 8
  %18 = alloca double, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.53", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.53", align 8
  %21 = alloca %"class.std::discrete_distribution", align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  %23 = tail call noundef i64 @_ZNKSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %22) #6
  %24 = trunc i64 %23 to i32
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %sext = shl i64 %23, 32
  %25 = ashr exact i64 %sext, 32
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %25)
          to label %26 unwind label %34

26:                                               ; preds = %6
  %27 = fdiv double 1.000000e+00, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  %28 = icmp sgt i32 %24, 0
  br i1 %28, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %26
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  br label %36

._crit_edge:                                      ; preds = %44, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %29 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %30 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  store ptr %30, ptr %11, align 8
  %31 = sext i32 %2 to i64
  %32 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %31) #6
  %33 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  invoke void @"_ZSt12partial_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS3_SaIS3_EEEEZ22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEE3$_0EvT_SI_SI_T0_"(ptr %29, ptr %32, ptr %33)
          to label %50 unwind label %56

34:                                               ; preds = %50, %6
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %126

36:                                               ; preds = %.lr.ph, %44
  %storemerge65 = phi i32 [ 0, %.lr.ph ], [ %46, %44 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %37 = sext i32 %storemerge65 to i64
  %38 = getelementptr inbounds float, ptr %1, i64 %37
  %39 = load float, ptr %38, align 4, !tbaa !9
  %40 = fpext float %39 to double
  %41 = fmul double %27, %40
  store double %41, ptr %10, align 8, !tbaa !11
  %42 = invoke { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %43 unwind label %48

43:                                               ; preds = %36
  %.fca.0.extract = extractvalue { double, i32 } %42, 0
  %.fca.1.extract = extractvalue { double, i32 } %42, 1
  store double %.fca.0.extract, ptr %9, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(12) %9)
          to label %44 unwind label %48

44:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %8, align 4, !tbaa !5
  %47 = icmp slt i32 %46, %24
  br i1 %47, label %36, label %._crit_edge, !llvm.loop !13

48:                                               ; preds = %43, %36
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %126

50:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %31)
          to label %51 unwind label %34

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  store double 0xFFF0000000000000, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %52 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  store ptr %52, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %53 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  store ptr %53, ptr %14, align 8
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %54, label %.lr.ph67, label %._crit_edge68

._crit_edge68:                                    ; preds = %.lr.ph67, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %55 = call noundef i64 @_ZNKSt6vectorISt4pairIdiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  invoke void @_ZNSt6vectorIdSaIdEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %55)
          to label %63 unwind label %70

56:                                               ; preds = %._crit_edge
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %126

.lr.ph67:                                         ; preds = %51, %.lr.ph67
  %58 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %58)
  %60 = load double, ptr %59, align 8, !tbaa !11
  store double %60, ptr %12, align 8, !tbaa !11
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  %62 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br i1 %62, label %.lr.ph67, label %._crit_edge68

63:                                               ; preds = %._crit_edge68
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  %64 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  store ptr %64, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %65 = call ptr @_ZNSt6vectorISt4pairIdiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  store ptr %65, ptr %17, align 8
  %66 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %66, label %.lr.ph71, label %._crit_edge72

._crit_edge72:                                    ; preds = %77, %63
  %.051.lcssa = phi double [ 0.000000e+00, %63 ], [ %79, %77 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %67 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  store ptr %67, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %68 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  store ptr %68, ptr %20, align 8
  %69 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br i1 %69, label %.lr.ph74, label %._crit_edge75

70:                                               ; preds = %._crit_edge68
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %125

.lr.ph71:                                         ; preds = %63, %77
  %.05169 = phi double [ %79, %77 ], [ 0.000000e+00, %63 ]
  %72 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %73 = load double, ptr %72, align 8, !tbaa !15
  %74 = load double, ptr %12, align 8, !tbaa !11
  %75 = fsub double %73, %74
  %76 = call double @exp(double noundef %75) #6
  store double %76, ptr %18, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIdSaIdEE9push_backERKd(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %77 unwind label %82

77:                                               ; preds = %.lr.ph71
  %78 = load double, ptr %18, align 8, !tbaa !11
  %79 = fadd double %.05169, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %81 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  br i1 %81, label %.lr.ph71, label %._crit_edge72

82:                                               ; preds = %.lr.ph71
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  br label %125

._crit_edge75:                                    ; preds = %.lr.ph74, %._crit_edge72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  %84 = fcmp olt double %3, 1.000000e+00
  br i1 %84, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %._crit_edge75
  %85 = icmp sgt i32 %2, 0
  br i1 %85, label %.lr.ph78.preheader, label %.loopexit61

.lr.ph78.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %2 to i64
  br label %.lr.ph78

.lr.ph74:                                         ; preds = %._crit_edge72, %.lr.ph74
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %87 = load double, ptr %86, align 8, !tbaa !11
  %88 = fdiv double %87, %.051.lcssa
  store double %88, ptr %86, align 8, !tbaa !11
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #6
  %90 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br i1 %90, label %.lr.ph74, label %._crit_edge75

.lr.ph78:                                         ; preds = %.lr.ph78.preheader, %100
  %indvars.iv = phi i64 [ 0, %.lr.ph78.preheader ], [ %indvars.iv.next, %100 ]
  %.04976 = phi double [ 0.000000e+00, %.lr.ph78.preheader ], [ %93, %100 ]
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv) #6
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = fadd double %.04976, %92
  %94 = fcmp ult double %93, %3
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  br i1 %94, label %100, label %95

95:                                               ; preds = %.lr.ph78
  %96 = and i64 %indvars.iv.next, 4294967295
  invoke void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %96)
          to label %97 unwind label %98

97:                                               ; preds = %95
  invoke void @_ZNSt6vectorISt4pairIdiESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %96)
          to label %.loopexit61 unwind label %98

98:                                               ; preds = %97, %95
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %125

100:                                              ; preds = %.lr.ph78
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit61, label %.lr.ph78, !llvm.loop !17

.loopexit61:                                      ; preds = %100, %.preheader, %97
  %.150 = phi double [ %93, %97 ], [ 0.000000e+00, %.preheader ], [ %93, %100 ]
  %101 = fdiv double 1.000000e+00, %.150
  %102 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %103 = trunc i64 %102 to i32
  %104 = icmp sgt i32 %103, 0
  br i1 %104, label %.lr.ph82, label %.loopexit

.lr.ph82:                                         ; preds = %.loopexit61, %.lr.ph82
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %.lr.ph82 ], [ 0, %.loopexit61 ]
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %indvars.iv87) #6
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = fmul double %101, %106
  store double %107, ptr %105, align 8, !tbaa !11
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %108 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %sext90 = shl i64 %108, 32
  %109 = ashr exact i64 %sext90, 32
  %110 = icmp slt i64 %indvars.iv.next88, %109
  br i1 %110, label %.lr.ph82, label %.loopexit, !llvm.loop !18

.loopexit:                                        ; preds = %.lr.ph82, %.loopexit61, %._crit_edge75
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %21) #6
  %111 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  %112 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  invoke void @_ZNSt21discrete_distributionIiEC2IN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEET_S9_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr %111, ptr %112)
          to label %113 unwind label %120

113:                                              ; preds = %.loopexit
  %114 = invoke noundef i32 @_ZNSt21discrete_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 8 dereferenceable(48) %21, ptr noundef nonnull align 8 dereferenceable(5000) %5)
          to label %115 unwind label %122

115:                                              ; preds = %113
  %116 = sext i32 %114 to i64
  %117 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNSt6vectorISt4pairIdiESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %116) #6
  %118 = getelementptr inbounds i8, ptr %117, i64 8
  %119 = load i32, ptr %118, align 8, !tbaa !19
  call void @_ZNSt21discrete_distributionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %21) #6
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  ret i32 %119

120:                                              ; preds = %.loopexit
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %124

122:                                              ; preds = %113
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt21discrete_distributionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  br label %124

124:                                              ; preds = %122, %120
  %.pn = phi { ptr, i32 } [ %123, %122 ], [ %121, %120 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %21) #6
  br label %125

125:                                              ; preds = %82, %98, %124, %70
  %.pn56.pn = phi { ptr, i32 } [ %71, %70 ], [ %83, %82 ], [ %.pn, %124 ], [ %99, %98 ]
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %126

126:                                              ; preds = %125, %56, %48, %34
  %.pn59 = phi { ptr, i32 } [ %49, %48 ], [ %.pn56.pn, %125 ], [ %35, %34 ], [ %57, %56 ]
  call void @_ZNSt6vectorISt4pairIdiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  resume { ptr, i32 } %.pn59
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { double, i32 } @_ZSt9make_pairIdRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt12partial_sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIdiESt6vectorIS3_SaIS3_EEEEZ22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEE3$_0EvT_SI_SI_T0_"(ptr, ptr, ptr) local_unnamed_addr #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIdiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @exp(double noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt21discrete_distributionIiED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #5 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSSt4pairIdiE", !12, i64 0, !6, i64 8}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = !{!16, !6, i64 8}


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