; LLVM IR from ggml-org/ggml :: examples/gpt-2 (main-ctx)

; 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"

%struct.gpt_params = type { i32, i32, i32, i32, i32, i32, i32, i8, i32, float, float, i32, float, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i32 }
%"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::mersenne_twister_engine" = type { [624 x i64], i64 }
%struct.gpt_vocab = type { %"class.std::map.14", %"class.std::map.19", %"class.std::vector" }
%"class.std::map.14" = type { %"class.std::_Rb_tree.15" }
%"class.std::_Rb_tree.15" = 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.19" = type { %"class.std::_Rb_tree.20" }
%"class.std::_Rb_tree.20" = 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 }
%struct.gpt2_model = type { %struct.gpt2_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.4", ptr, ptr, ptr, %"class.std::map" }
%struct.gpt2_hparams = type { i32, i32, i32, i32, i32, i32, float }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, 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>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list.35" = type { ptr, i64 }
%"class.std::allocator.27" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@stderr = external global ptr, align 8
@.str.40 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external global ptr, align 8
@.str.49 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [30 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 uwtable
declare dso_local noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocab(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(120)) #2

declare i32 @printf(ptr noundef, ...) #3

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

declare void @ggml_free(ptr noundef) #3

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #5 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca %struct.gpt_params, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::mersenne_twister_engine", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i64, align 8
  %14 = alloca %struct.gpt_vocab, align 8
  %15 = alloca %struct.gpt2_model, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"class.std::vector.30", align 8
  %21 = alloca %"class.std::vector.25", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::vector.25", align 8
  %27 = alloca i64, align 8
  %28 = alloca %"class.std::vector.25", align 8
  %29 = alloca %"class.std::initializer_list.35", align 8
  %30 = alloca [4 x i32], align 4
  %31 = alloca %"class.std::allocator.27", align 1
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i32, align 4
  %35 = alloca float, align 4
  %36 = alloca float, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i64, align 8
  %40 = alloca i64, align 8
  %41 = alloca ptr, align 8
  %42 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %43 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %44 = alloca i32, align 4
  %45 = alloca i64, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @ggml_time_init()
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %46 = call i64 @ggml_time_us()
  store i64 %46, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 160, ptr %7) #8
  call void @_ZN10gpt_paramsC2Ev(ptr noundef nonnull align 8 dereferenceable(160) %7)
  %47 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 13
  %48 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %47, ptr noundef @.str.40)
          to label %49 unwind label %57

49:                                               ; preds = %2
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = load ptr, ptr %5, align 8, !tbaa !9
  %52 = invoke noundef zeroext i1 @_Z16gpt_params_parseiPPcR10gpt_params(i32 noundef %50, ptr noundef %51, ptr noundef nonnull align 8 dereferenceable(160) %7)
          to label %53 unwind label %57

53:                                               ; preds = %49
  %54 = zext i1 %52 to i32
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %61

56:                                               ; preds = %53
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %425

57:                                               ; preds = %69, %49, %2
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %8, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %9, align 4
  br label %427

61:                                               ; preds = %53
  %62 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !13
  %64 = icmp slt i32 %63, 0
  br i1 %64, label %65, label %69

65:                                               ; preds = %61
  %66 = call i64 @time(ptr noundef null) #8
  %67 = trunc i64 %66 to i32
  %68 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  store i32 %67, ptr %68, align 8, !tbaa !13
  br label %69

69:                                               ; preds = %65, %61
  %70 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %71 = load i32, ptr %70, align 8, !tbaa !13
  %72 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.41, ptr noundef @__func__.main, i32 noundef %71)
          to label %73 unwind label %57

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 5000, ptr %11) #8
  %74 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !13
  %76 = sext i32 %75 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %11, i64 noundef %76)
          to label %77 unwind label %84

77:                                               ; preds = %73
  %78 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %79 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %78) #8
  br i1 %79, label %80, label %92

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  invoke void @_Z17gpt_random_promptB5cxx11RSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %81 unwind label %88

81:                                               ; preds = %80
  %82 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %83 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %82, ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %92

84:                                               ; preds = %73
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %8, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %9, align 4
  br label %424

88:                                               ; preds = %80
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %8, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %424

92:                                               ; preds = %81, %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store i64 0, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 120, ptr %14) #8
  call void @_ZN9gpt_vocabC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %14) #8
  call void @llvm.lifetime.start.p0(i64 168, ptr %15) #8
  call void @_ZN10gpt2_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %93 = invoke i64 @ggml_time_us()
          to label %94 unwind label %103

94:                                               ; preds = %92
  store i64 %93, ptr %16, align 8, !tbaa !11
  %95 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 13
  %96 = invoke noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocab(ptr noundef nonnull align 8 dereferenceable(32) %95, ptr noundef nonnull align 8 dereferenceable(168) %15, ptr noundef nonnull align 8 dereferenceable(120) %14)
          to label %97 unwind label %103

97:                                               ; preds = %94
  br i1 %96, label %107, label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr @stderr, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 13
  %101 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %100) #8
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str.42, ptr noundef @__func__.main, ptr noundef %101) #8
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %114

103:                                              ; preds = %109, %107, %94, %92
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %8, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %423

107:                                              ; preds = %97
  %108 = invoke i64 @ggml_time_us()
          to label %109 unwind label %103

109:                                              ; preds = %107
  %110 = load i64, ptr %16, align 8, !tbaa !11
  %111 = sub nsw i64 %108, %110
  store i64 %111, ptr %13, align 8, !tbaa !11
  %112 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 15
  invoke void @_Z18test_gpt_tokenizerR9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef nonnull align 8 dereferenceable(32) %112)
          to label %113 unwind label %103

113:                                              ; preds = %109
  store i32 0, ptr %10, align 4
  br label %114

114:                                              ; preds = %113, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %115 = load i32, ptr %10, align 4
  switch i32 %115, label %422 [
    i32 0, label %116
  ]

116:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  store i64 0, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store i64 0, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #8
  call void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #8
  %117 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  invoke void @_Z12gpt_tokenizeRK9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::vector.25") align 8 %21, ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef nonnull align 8 dereferenceable(32) %117)
          to label %118 unwind label %146

118:                                              ; preds = %116
  %119 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %120 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 0
  %121 = getelementptr inbounds %struct.gpt2_hparams, ptr %120, i32 0, i32 1
  %122 = load i32, ptr %121, align 4, !tbaa !19
  %123 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %124 = trunc i64 %123 to i32
  %125 = sub nsw i32 %122, %124
  store i32 %125, ptr %22, align 4, !tbaa !5
  %126 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %119, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %127 unwind label %150

127:                                              ; preds = %118
  %128 = load i32, ptr %126, align 4, !tbaa !5
  %129 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  store i32 %128, ptr %129, align 8, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  %130 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %131 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %130) #8
  %132 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.43, ptr noundef @__func__.main, ptr noundef %131)
          to label %133 unwind label %154

133:                                              ; preds = %127
  %134 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %135 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.44, ptr noundef @__func__.main, i64 noundef %134)
          to label %136 unwind label %154

136:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %169, %136
  %138 = load i32, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 8, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  %139 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %140 = trunc i64 %139 to i32
  store i32 %140, ptr %25, align 4, !tbaa !5
  %141 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %142 unwind label %158

142:                                              ; preds = %137
  %143 = load i32, ptr %141, align 4, !tbaa !5
  %144 = icmp slt i32 %138, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br i1 %144, label %162, label %145

145:                                              ; preds = %142
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %177

146:                                              ; preds = %116
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %8, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %9, align 4
  br label %421

150:                                              ; preds = %118
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %8, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %420

154:                                              ; preds = %177, %133, %127
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %8, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %9, align 4
  br label %420

158:                                              ; preds = %137
  %159 = landingpad { ptr, i32 }
          cleanup
  %160 = extractvalue { ptr, i32 } %159, 0
  store ptr %160, ptr %8, align 8
  %161 = extractvalue { ptr, i32 } %159, 1
  store i32 %161, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %176

162:                                              ; preds = %142
  %163 = load i32, ptr %23, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %164) #8
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.45, i32 noundef %166)
          to label %168 unwind label %172

168:                                              ; preds = %162
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %23, align 4, !tbaa !5
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %23, align 4, !tbaa !5
  br label %137, !llvm.loop !35

172:                                              ; preds = %162
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %8, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %9, align 4
  br label %176

176:                                              ; preds = %172, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %420

177:                                              ; preds = %145
  %178 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.46)
          to label %179 unwind label %154

179:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store i64 0, ptr %27, align 8, !tbaa !11
  %180 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !37
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  store i32 0, ptr %30, align 4, !tbaa !5
  %182 = getelementptr inbounds i32, ptr %30, i64 1
  store i32 1, ptr %182, align 4, !tbaa !5
  %183 = getelementptr inbounds i32, ptr %30, i64 2
  store i32 2, ptr %183, align 4, !tbaa !5
  %184 = getelementptr inbounds i32, ptr %30, i64 3
  store i32 3, ptr %184, align 4, !tbaa !5
  %185 = getelementptr inbounds %"class.std::initializer_list.35", ptr %29, i32 0, i32 0
  store ptr %30, ptr %185, align 8, !tbaa !38
  %186 = getelementptr inbounds %"class.std::initializer_list.35", ptr %29, i32 0, i32 1
  store i64 4, ptr %186, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  %187 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8
  %189 = getelementptr inbounds { ptr, i64 }, ptr %29, i32 0, i32 1
  %190 = load i64, ptr %189, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr %188, i64 %190, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %191 unwind label %204

191:                                              ; preds = %179
  %192 = invoke noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %15, i32 noundef %181, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %193 unwind label %208

193:                                              ; preds = %191
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #8
  %194 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  store i64 %194, ptr %32, align 8, !tbaa !11
  br label %195

195:                                              ; preds = %360, %193
  %196 = load i64, ptr %32, align 8, !tbaa !11
  %197 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %198 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  %199 = load i32, ptr %198, align 8, !tbaa !34
  %200 = sext i32 %199 to i64
  %201 = add i64 %197, %200
  %202 = icmp ult i64 %196, %201
  br i1 %202, label %213, label %203

203:                                              ; preds = %195
  store i32 5, ptr %10, align 4
  br label %363

204:                                              ; preds = %179
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %8, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %9, align 4
  br label %212

208:                                              ; preds = %191
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %8, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %9, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #8
  br label %212

212:                                              ; preds = %208, %204
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #8
  br label %419

213:                                              ; preds = %195
  %214 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %215 = icmp ugt i64 %214, 0
  br i1 %215, label %216, label %241

216:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %217 = invoke i64 @ggml_time_us()
          to label %218 unwind label %227

218:                                              ; preds = %216
  store i64 %217, ptr %33, align 8, !tbaa !11
  %219 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 1
  %220 = load i32, ptr %219, align 4, !tbaa !37
  %221 = load i32, ptr %17, align 4, !tbaa !5
  %222 = invoke noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %15, i32 noundef %220, i32 noundef %221, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %223 unwind label %227

223:                                              ; preds = %218
  br i1 %222, label %231, label %224

224:                                              ; preds = %223
  %225 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.47)
          to label %226 unwind label %227

226:                                              ; preds = %224
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %238

227:                                              ; preds = %231, %224, %218, %216
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %8, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br label %365

231:                                              ; preds = %223
  %232 = invoke i64 @ggml_time_us()
          to label %233 unwind label %227

233:                                              ; preds = %231
  %234 = load i64, ptr %33, align 8, !tbaa !11
  %235 = sub nsw i64 %232, %234
  %236 = load i64, ptr %19, align 8, !tbaa !11
  %237 = add nsw i64 %236, %235
  store i64 %237, ptr %19, align 8, !tbaa !11
  store i32 0, ptr %10, align 4
  br label %238

238:                                              ; preds = %233, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  %239 = load i32, ptr %10, align 4
  switch i32 %239, label %363 [
    i32 0, label %240
  ]

240:                                              ; preds = %238
  br label %241

241:                                              ; preds = %240, %213
  %242 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %243 = load i32, ptr %17, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = add i64 %244, %242
  %246 = trunc i64 %245 to i32
  store i32 %246, ptr %17, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %247 = load i64, ptr %32, align 8, !tbaa !11
  %248 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %249 = icmp uge i64 %247, %248
  br i1 %249, label %250, label %291

250:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %251 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 8
  %252 = load i32, ptr %251, align 8, !tbaa !41
  store i32 %252, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %253 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 9
  %254 = load float, ptr %253, align 4, !tbaa !42
  store float %254, ptr %35, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #8
  %255 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 10
  %256 = load float, ptr %255, align 8, !tbaa !44
  store float %256, ptr %36, align 4, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  %257 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 0
  %258 = getelementptr inbounds %struct.gpt2_hparams, ptr %257, i32 0, i32 0
  %259 = load i32, ptr %258, align 8, !tbaa !45
  store i32 %259, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  store i32 0, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %260 = invoke i64 @ggml_time_us()
          to label %261 unwind label %282

261:                                              ; preds = %250
  store i64 %260, ptr %39, align 8, !tbaa !11
  %262 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %263 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %264 = load i32, ptr %37, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = sub i64 %263, %265
  %267 = getelementptr inbounds float, ptr %262, i64 %266
  %268 = load i32, ptr %34, align 4, !tbaa !5
  %269 = load float, ptr %35, align 4, !tbaa !43
  %270 = fpext float %269 to double
  %271 = load float, ptr %36, align 4, !tbaa !43
  %272 = fpext float %271 to double
  %273 = invoke noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef %267, i32 noundef %268, double noundef %270, double noundef %272, ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %274 unwind label %282

274:                                              ; preds = %261
  store i32 %273, ptr %38, align 4, !tbaa !5
  %275 = invoke i64 @ggml_time_us()
          to label %276 unwind label %282

276:                                              ; preds = %274
  %277 = load i64, ptr %39, align 8, !tbaa !11
  %278 = sub nsw i64 %275, %277
  %279 = load i64, ptr %18, align 8, !tbaa !11
  %280 = add nsw i64 %279, %278
  store i64 %280, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %38)
          to label %281 unwind label %286

281:                                              ; preds = %276
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %322

282:                                              ; preds = %274, %261, %250
  %283 = landingpad { ptr, i32 }
          cleanup
  %284 = extractvalue { ptr, i32 } %283, 0
  store ptr %284, ptr %8, align 8
  %285 = extractvalue { ptr, i32 } %283, 1
  store i32 %285, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  br label %290

286:                                              ; preds = %276
  %287 = landingpad { ptr, i32 }
          cleanup
  %288 = extractvalue { ptr, i32 } %287, 0
  store ptr %288, ptr %8, align 8
  %289 = extractvalue { ptr, i32 } %287, 1
  store i32 %289, ptr %9, align 4
  br label %290

290:                                              ; preds = %286, %282
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %365

291:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %292 = load i64, ptr %32, align 8, !tbaa !11
  store i64 %292, ptr %40, align 8, !tbaa !11
  br label %293

293:                                              ; preds = %313, %291
  %294 = load i64, ptr %40, align 8, !tbaa !11
  %295 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %296 = icmp ult i64 %294, %295
  br i1 %296, label %298, label %297

297:                                              ; preds = %293
  store i32 8, ptr %10, align 4
  br label %316

298:                                              ; preds = %293
  %299 = load i64, ptr %40, align 8, !tbaa !11
  %300 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %299) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 4 dereferenceable(4) %300)
          to label %301 unwind label %308

301:                                              ; preds = %298
  %302 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %303 = trunc i64 %302 to i32
  %304 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 4
  %305 = load i32, ptr %304, align 8, !tbaa !46
  %306 = icmp sge i32 %303, %305
  br i1 %306, label %307, label %312

307:                                              ; preds = %301
  store i32 8, ptr %10, align 4
  br label %316

308:                                              ; preds = %298
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %8, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %365

312:                                              ; preds = %301
  br label %313

313:                                              ; preds = %312
  %314 = load i64, ptr %40, align 8, !tbaa !11
  %315 = add i64 %314, 1
  store i64 %315, ptr %40, align 8, !tbaa !11
  br label %293, !llvm.loop !47

316:                                              ; preds = %307, %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  br label %317

317:                                              ; preds = %316
  %318 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %319 = sub i64 %318, 1
  %320 = load i64, ptr %32, align 8, !tbaa !11
  %321 = add i64 %320, %319
  store i64 %321, ptr %32, align 8, !tbaa !11
  br label %322

322:                                              ; preds = %317, %281
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #8
  store ptr %26, ptr %41, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %323 = load ptr, ptr %41, align 8, !tbaa !9
  %324 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %323) #8
  %325 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %42, i32 0, i32 0
  store ptr %324, ptr %325, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  %326 = load ptr, ptr %41, align 8, !tbaa !9
  %327 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %326) #8
  %328 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %43, i32 0, i32 0
  store ptr %327, ptr %328, align 8
  br label %329

329:                                              ; preds = %341, %322
  %330 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  br i1 %330, label %332, label %331

331:                                              ; preds = %329
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %347

332:                                              ; preds = %329
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  %333 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  %334 = load i32, ptr %333, align 4, !tbaa !5
  store i32 %334, ptr %44, align 4, !tbaa !5
  %335 = getelementptr inbounds %struct.gpt_vocab, ptr %14, i32 0, i32 1
  %336 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %335, ptr noundef nonnull align 4 dereferenceable(4) %44)
          to label %337 unwind label %343

337:                                              ; preds = %332
  %338 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %336) #8
  %339 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.48, ptr noundef %338)
          to label %340 unwind label %343

340:                                              ; preds = %337
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  br label %341

341:                                              ; preds = %340
  %342 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %42) #8
  br label %329

343:                                              ; preds = %337, %332
  %344 = landingpad { ptr, i32 }
          cleanup
  %345 = extractvalue { ptr, i32 } %344, 0
  store ptr %345, ptr %8, align 8
  %346 = extractvalue { ptr, i32 } %344, 1
  store i32 %346, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #8
  br label %365

347:                                              ; preds = %331
  %348 = load ptr, ptr @stdout, align 8, !tbaa !9
  %349 = invoke i32 @fflush(ptr noundef %348)
          to label %350 unwind label %355

350:                                              ; preds = %347
  %351 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  %352 = load i32, ptr %351, align 4, !tbaa !5
  %353 = icmp eq i32 %352, 50256
  br i1 %353, label %354, label %359

354:                                              ; preds = %350
  store i32 5, ptr %10, align 4
  br label %363

355:                                              ; preds = %347
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %8, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %9, align 4
  br label %365

359:                                              ; preds = %350
  br label %360

360:                                              ; preds = %359
  %361 = load i64, ptr %32, align 8, !tbaa !11
  %362 = add i64 %361, 1
  store i64 %362, ptr %32, align 8, !tbaa !11
  br label %195, !llvm.loop !48

363:                                              ; preds = %354, %238, %203
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  %364 = load i32, ptr %10, align 4
  switch i32 %364, label %418 [
    i32 5, label %366
  ]

365:                                              ; preds = %355, %343, %308, %290, %227
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #8
  br label %419

366:                                              ; preds = %363
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %367 = invoke i64 @ggml_time_us()
          to label %368 unwind label %410

368:                                              ; preds = %366
  store i64 %367, ptr %45, align 8, !tbaa !11
  %369 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.46)
          to label %370 unwind label %410

370:                                              ; preds = %368
  %371 = load i64, ptr %27, align 8, !tbaa !11
  %372 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.49, ptr noundef @__func__.main, i64 noundef %371)
          to label %373 unwind label %410

373:                                              ; preds = %370
  %374 = load i64, ptr %13, align 8, !tbaa !11
  %375 = sitofp i64 %374 to float
  %376 = fdiv float %375, 1.000000e+03
  %377 = fpext float %376 to double
  %378 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.50, ptr noundef @__func__.main, double noundef %377)
          to label %379 unwind label %410

379:                                              ; preds = %373
  %380 = load i64, ptr %18, align 8, !tbaa !11
  %381 = sitofp i64 %380 to float
  %382 = fdiv float %381, 1.000000e+03
  %383 = fpext float %382 to double
  %384 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.51, ptr noundef @__func__.main, double noundef %383)
          to label %385 unwind label %410

385:                                              ; preds = %379
  %386 = load i64, ptr %19, align 8, !tbaa !11
  %387 = sitofp i64 %386 to float
  %388 = fdiv float %387, 1.000000e+03
  %389 = fpext float %388 to double
  %390 = load i64, ptr %19, align 8, !tbaa !11
  %391 = sitofp i64 %390 to float
  %392 = fdiv float %391, 1.000000e+03
  %393 = load i32, ptr %17, align 4, !tbaa !5
  %394 = sitofp i32 %393 to float
  %395 = fdiv float %392, %394
  %396 = fpext float %395 to double
  %397 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.52, ptr noundef @__func__.main, double noundef %389, double noundef %396)
          to label %398 unwind label %410

398:                                              ; preds = %385
  %399 = load i64, ptr %45, align 8, !tbaa !11
  %400 = load i64, ptr %6, align 8, !tbaa !11
  %401 = sub nsw i64 %399, %400
  %402 = sitofp i64 %401 to float
  %403 = fdiv float %402, 1.000000e+03
  %404 = fpext float %403 to double
  %405 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.53, ptr noundef @__func__.main, double noundef %404)
          to label %406 unwind label %410

406:                                              ; preds = %398
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  %407 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 9
  %408 = load ptr, ptr %407, align 8, !tbaa !49
  invoke void @ggml_free(ptr noundef %408)
          to label %409 unwind label %414

409:                                              ; preds = %406
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %418

410:                                              ; preds = %398, %385, %379, %373, %370, %368, %366
  %411 = landingpad { ptr, i32 }
          cleanup
  %412 = extractvalue { ptr, i32 } %411, 0
  store ptr %412, ptr %8, align 8
  %413 = extractvalue { ptr, i32 } %411, 1
  store i32 %413, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %419

414:                                              ; preds = %406
  %415 = landingpad { ptr, i32 }
          cleanup
  %416 = extractvalue { ptr, i32 } %415, 0
  store ptr %416, ptr %8, align 8
  %417 = extractvalue { ptr, i32 } %415, 1
  store i32 %417, ptr %9, align 4
  br label %419

418:                                              ; preds = %409, %363
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %422

419:                                              ; preds = %414, %410, %365, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #8
  br label %420

420:                                              ; preds = %419, %176, %154, %150
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  br label %421

421:                                              ; preds = %420, %146
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %423

422:                                              ; preds = %418, %114
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %15) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr %15) #8
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %14) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 5000, ptr %11) #8
  br label %425

423:                                              ; preds = %421, %103
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %15) #8
  call void @llvm.lifetime.end.p0(i64 168, ptr %15) #8
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %14) #8
  call void @llvm.lifetime.end.p0(i64 120, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %424

424:                                              ; preds = %423, %88, %84
  call void @llvm.lifetime.end.p0(i64 5000, ptr %11) #8
  br label %427

425:                                              ; preds = %422, %56
  call void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %7) #8
  call void @llvm.lifetime.end.p0(i64 160, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %426 = load i32, ptr %3, align 4
  ret i32 %426

427:                                              ; preds = %424, %57
  call void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %7) #8
  call void @llvm.lifetime.end.p0(i64 160, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %428

428:                                              ; preds = %427
  %429 = load ptr, ptr %8, align 8
  %430 = load i32, ptr %9, align 4
  %431 = insertvalue { ptr, i32 } poison, ptr %429, 0
  %432 = insertvalue { ptr, i32 } %431, i32 %430, 1
  resume { ptr, i32 } %432
}

declare void @ggml_time_init() #3

declare i64 @ggml_time_us() #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10gpt_paramsC2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #6 align 2

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

declare noundef zeroext i1 @_Z16gpt_params_parseiPPcR10gpt_params(i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(160)) #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

declare void @_Z17gpt_random_promptB5cxx11RSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(5000)) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9gpt_vocabC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt2_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #7 align 2

declare void @_Z18test_gpt_tokenizerR9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

declare void @_Z12gpt_tokenizeRK9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::vector.25") align 8, ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

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

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

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

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

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

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

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

declare noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i32 noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(5000)) #3

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

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

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

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

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

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

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

declare i32 @fflush(ptr noundef) #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(168)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #7 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "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 norecurse 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 = { 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 #7 = { 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 #8 = { 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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS10gpt_params", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !15, i64 28, !6, i64 32, !16, i64 36, !16, i64 40, !6, i64 44, !16, i64 48, !17, i64 56, !17, i64 88, !17, i64 120, !15, i64 152, !6, i64 156}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !12, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!19 = !{!20, !6, i64 4}
!20 = !{!"_ZTS10gpt2_model", !21, i64 0, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !22, i64 72, !10, i64 96, !10, i64 104, !10, i64 112, !26, i64 120}
!21 = !{!"_ZTS12gpt2_hparams", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !16, i64 24}
!22 = !{!"_ZTSSt6vectorI10gpt2_layerSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI10gpt2_layerSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!26 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !29, i64 0, !31, i64 8}
!29 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !30, i64 0}
!30 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!31 = !{!"_ZTSSt15_Rb_tree_header", !32, i64 0, !12, i64 32}
!32 = !{!"_ZTSSt18_Rb_tree_node_base", !33, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!33 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!34 = !{!14, !6, i64 8}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!14, !6, i64 4}
!38 = !{!39, !10, i64 0}
!39 = !{!"_ZTSSt16initializer_listIiE", !10, i64 0, !12, i64 8}
!40 = !{!39, !12, i64 8}
!41 = !{!14, !6, i64 32}
!42 = !{!14, !16, i64 36}
!43 = !{!16, !16, i64 0}
!44 = !{!14, !16, i64 40}
!45 = !{!20, !6, i64 0}
!46 = !{!14, !6, i64 16}
!47 = distinct !{!47, !36}
!48 = distinct !{!48, !36}
!49 = !{!20, !10, i64 112}


; 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"

%struct.gpt_params = type { i32, i32, i32, i32, i32, i32, i32, i8, i32, float, float, i32, float, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i32 }
%"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::mersenne_twister_engine" = type { [624 x i64], i64 }
%struct.gpt_vocab = type { %"class.std::map.14", %"class.std::map.19", %"class.std::vector" }
%"class.std::map.14" = type { %"class.std::_Rb_tree.15" }
%"class.std::_Rb_tree.15" = 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.19" = type { %"class.std::_Rb_tree.20" }
%"class.std::_Rb_tree.20" = 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 }
%struct.gpt2_model = type { %struct.gpt2_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.4", ptr, ptr, ptr, %"class.std::map" }
%struct.gpt2_hparams = type { i32, i32, i32, i32, i32, i32, float }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, 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>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator.27" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.40 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.49 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [30 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 uwtable
declare dso_local noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocab(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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

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

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

declare void @ggml_free(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.gpt_params, align 8
  %4 = alloca %"class.std::mersenne_twister_engine", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %struct.gpt_vocab, align 8
  %7 = alloca %struct.gpt2_model, align 8
  %8 = alloca %"class.std::vector.30", align 8
  %9 = alloca %"class.std::vector.25", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector.25", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::vector.25", align 8
  %16 = alloca [4 x i32], align 16
  %17 = alloca %"class.std::allocator.27", align 1
  %18 = alloca i32, align 4
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca i32, align 4
  tail call void @ggml_time_init()
  %22 = tail call i64 @ggml_time_us()
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %3) #9
  call void @_ZN10gpt_paramsC2Ev(ptr noundef nonnull align 8 dereferenceable(160) %3)
  %23 = getelementptr inbounds i8, ptr %3, i64 56
  %24 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull @.str.40)
          to label %25 unwind label %28

25:                                               ; preds = %2
  %26 = invoke noundef zeroext i1 @_Z16gpt_params_parseiPPcR10gpt_params(i32 noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(160) %3)
          to label %27 unwind label %28

27:                                               ; preds = %25
  br i1 %26, label %30, label %245

28:                                               ; preds = %25, %2
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %246

30:                                               ; preds = %27
  %31 = load i32, ptr %3, align 8, !tbaa !5
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %33, label %36

33:                                               ; preds = %30
  %34 = call i64 @time(ptr noundef null) #9
  %35 = trunc i64 %34 to i32
  store i32 %35, ptr %3, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %33, %30
  %37 = phi i32 [ %35, %33 ], [ %31, %30 ]
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.41, ptr noundef nonnull @__func__.main, i32 noundef %37)
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %4) #9
  %39 = load i32, ptr %3, align 8, !tbaa !5
  %40 = sext i32 %39 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %4, i64 noundef %40)
          to label %41 unwind label %47

41:                                               ; preds = %36
  %42 = getelementptr inbounds i8, ptr %3, i64 88
  %43 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  br i1 %43, label %44, label %51

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  invoke void @_Z17gpt_random_promptB5cxx11RSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %45 unwind label %49

45:                                               ; preds = %44
  %46 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br label %51

47:                                               ; preds = %36
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %244

49:                                               ; preds = %44
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br label %244

51:                                               ; preds = %45, %41
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %6) #9
  call void @_ZN9gpt_vocabC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #9
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %7) #9
  call void @_ZN10gpt2_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %7) #9
  %52 = invoke i64 @ggml_time_us()
          to label %53 unwind label %56

53:                                               ; preds = %51
  %54 = invoke noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocab(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(168) %7, ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %55 unwind label %56

55:                                               ; preds = %53
  br i1 %54, label %58, label %62

56:                                               ; preds = %60, %58, %53, %51
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %243

58:                                               ; preds = %55
  %59 = invoke i64 @ggml_time_us()
          to label %60 unwind label %56

60:                                               ; preds = %58
  %61 = getelementptr inbounds i8, ptr %3, i64 120
  invoke void @_Z18test_gpt_tokenizerR9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(32) %61)
          to label %66 unwind label %56

62:                                               ; preds = %55
  %63 = load ptr, ptr @stderr, align 8, !tbaa !16
  %64 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %23) #9
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef nonnull @.str.42, ptr noundef nonnull @__func__.main, ptr noundef %64) #10
  br label %242

66:                                               ; preds = %60
  %67 = sub nsw i64 %59, %52
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  call void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #9
  invoke void @_Z12gpt_tokenizeRK9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.25") align 8 %9, ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(32) %42)
          to label %68 unwind label %89

68:                                               ; preds = %66
  %69 = getelementptr inbounds i8, ptr %3, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  %70 = getelementptr inbounds i8, ptr %7, i64 4
  %71 = load i32, ptr %70, align 4, !tbaa !17
  %72 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %73 = trunc i64 %72 to i32
  %74 = sub nsw i32 %71, %73
  store i32 %74, ptr %10, align 4, !tbaa !32
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %69, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %76 = load i32, ptr %75, align 4, !tbaa !32
  store i32 %76, ptr %69, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  %77 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.43, ptr noundef nonnull @__func__.main, ptr noundef %77)
  %79 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44, ptr noundef nonnull @__func__.main, i64 noundef %79)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  store i32 8, ptr %11, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #9
  %81 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %82 = trunc i64 %81 to i32
  store i32 %82, ptr %12, align 4, !tbaa !32
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %84 = load i32, ptr %83, align 4, !tbaa !32
  %85 = icmp sgt i32 %84, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  br i1 %85, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %68
  %86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #9
  store i64 0, ptr %14, align 8, !tbaa !34
  %87 = getelementptr inbounds i8, ptr %3, i64 4
  %88 = load i32, ptr %87, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #9
  store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr %16, align 16, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr nonnull %16, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %100 unwind label %121

89:                                               ; preds = %66
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %241

.lr.ph:                                           ; preds = %68, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %68 ]
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %indvars.iv) #9
  %92 = load i32, ptr %91, align 4, !tbaa !32
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45, i32 noundef %92)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #9
  store i32 8, ptr %11, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #9
  %94 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %95 = trunc i64 %94 to i32
  store i32 %95, ptr %12, align 4, !tbaa !32
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %97 = load i32, ptr %96, align 4, !tbaa !32
  %98 = sext i32 %97 to i64
  %99 = icmp slt i64 %indvars.iv.next, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #9
  br i1 %99, label %.lr.ph, label %._crit_edge, !llvm.loop !36

100:                                              ; preds = %._crit_edge
  %101 = invoke noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %7, i32 noundef %88, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %102 unwind label %123

102:                                              ; preds = %100
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #9
  %103 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %104 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %105 = load i32, ptr %69, align 8, !tbaa !33
  %106 = sext i32 %105 to i64
  %107 = add i64 %104, %106
  %108 = icmp ult i64 %103, %107
  br i1 %108, label %.lr.ph115, label %._crit_edge116

.lr.ph115:                                        ; preds = %102
  %109 = getelementptr inbounds i8, ptr %3, i64 32
  %110 = getelementptr inbounds i8, ptr %3, i64 36
  %111 = getelementptr inbounds i8, ptr %3, i64 40
  %112 = getelementptr inbounds i8, ptr %3, i64 16
  %113 = getelementptr inbounds i8, ptr %6, i64 48
  br label %126

114:                                              ; preds = %._crit_edge109
  %115 = add i64 %.171, 1
  %116 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %117 = load i32, ptr %69, align 8, !tbaa !33
  %118 = sext i32 %117 to i64
  %119 = add i64 %116, %118
  %120 = icmp ult i64 %115, %119
  br i1 %120, label %126, label %._crit_edge116.loopexit, !llvm.loop !38

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

123:                                              ; preds = %100
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #9
  br label %125

125:                                              ; preds = %123, %121
  %.pn = phi { ptr, i32 } [ %124, %123 ], [ %122, %121 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #9
  br label %240

126:                                              ; preds = %.lr.ph115, %114
  %.061113 = phi i32 [ 0, %.lr.ph115 ], [ %143, %114 ]
  %.063112 = phi i64 [ 0, %.lr.ph115 ], [ %.164, %114 ]
  %.066111 = phi i64 [ 0, %.lr.ph115 ], [ %.268, %114 ]
  %.070110 = phi i64 [ %103, %.lr.ph115 ], [ %115, %114 ]
  %127 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %.not = icmp eq i64 %127, 0
  br i1 %.not, label %140, label %128

128:                                              ; preds = %126
  %129 = invoke i64 @ggml_time_us()
          to label %130 unwind label %134

130:                                              ; preds = %128
  %131 = load i32, ptr %87, align 4, !tbaa !35
  %132 = invoke noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %7, i32 noundef %131, i32 noundef %.061113, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %133 unwind label %134

133:                                              ; preds = %130
  br i1 %132, label %136, label %206

134:                                              ; preds = %136, %130, %128
  %135 = landingpad { ptr, i32 }
          cleanup
  br label %240

136:                                              ; preds = %133
  %137 = invoke i64 @ggml_time_us()
          to label %.thread89 unwind label %134

.thread89:                                        ; preds = %136
  %138 = sub i64 %.066111, %129
  %139 = add i64 %138, %137
  br label %140

140:                                              ; preds = %.thread89, %126
  %.268 = phi i64 [ %.066111, %126 ], [ %139, %.thread89 ]
  %141 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %142 = trunc i64 %141 to i32
  %143 = add i32 %.061113, %142
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %144 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %.not74 = icmp ult i64 %.070110, %144
  br i1 %.not74, label %.preheader, label %147

.preheader:                                       ; preds = %140
  %145 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %146 = icmp ult i64 %.070110, %145
  br i1 %146, label %.lr.ph104, label %._crit_edge105

147:                                              ; preds = %140
  %148 = load i32, ptr %109, align 8, !tbaa !39
  %149 = load float, ptr %110, align 4, !tbaa !40
  %150 = load float, ptr %111, align 8, !tbaa !41
  %151 = load i32, ptr %7, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #9
  store i32 0, ptr %18, align 4, !tbaa !32
  %152 = invoke i64 @ggml_time_us()
          to label %153 unwind label %168

153:                                              ; preds = %147
  %154 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  %155 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  %156 = sext i32 %151 to i64
  %157 = sub i64 %155, %156
  %158 = getelementptr inbounds float, ptr %154, i64 %157
  %159 = fpext float %149 to double
  %160 = fpext float %150 to double
  %161 = invoke noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef %158, i32 noundef %148, double noundef %159, double noundef %160, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %162 unwind label %168

162:                                              ; preds = %153
  store i32 %161, ptr %18, align 4, !tbaa !32
  %163 = invoke i64 @ggml_time_us()
          to label %164 unwind label %168

164:                                              ; preds = %162
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %165 unwind label %170

165:                                              ; preds = %164
  %166 = sub i64 %.063112, %152
  %167 = add i64 %166, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #9
  br label %187

168:                                              ; preds = %162, %153, %147
  %169 = landingpad { ptr, i32 }
          cleanup
  br label %172

170:                                              ; preds = %164
  %171 = landingpad { ptr, i32 }
          cleanup
  br label %172

172:                                              ; preds = %170, %168
  %.pn76 = phi { ptr, i32 } [ %171, %170 ], [ %169, %168 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #9
  br label %240

173:                                              ; preds = %178
  %174 = add nuw i64 %.048103, 1
  %175 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %176 = icmp ult i64 %174, %175
  br i1 %176, label %.lr.ph104, label %._crit_edge105, !llvm.loop !43

.lr.ph104:                                        ; preds = %.preheader, %173
  %.048103 = phi i64 [ %174, %173 ], [ %.070110, %.preheader ]
  %177 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.048103) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(4) %177)
          to label %178 unwind label %182

178:                                              ; preds = %.lr.ph104
  %179 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %180 = trunc i64 %179 to i32
  %181 = load i32, ptr %112, align 8, !tbaa !44
  %.not75 = icmp sgt i32 %181, %180
  br i1 %.not75, label %173, label %._crit_edge105

182:                                              ; preds = %.lr.ph104
  %183 = landingpad { ptr, i32 }
          cleanup
  br label %240

._crit_edge105:                                   ; preds = %173, %178, %.preheader
  %184 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %185 = add i64 %.070110, -1
  %186 = add i64 %185, %184
  br label %187

187:                                              ; preds = %._crit_edge105, %165
  %.171 = phi i64 [ %.070110, %165 ], [ %186, %._crit_edge105 ]
  %.164 = phi i64 [ %167, %165 ], [ %.063112, %._crit_edge105 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #9
  %188 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  store ptr %188, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #9
  %189 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  store ptr %189, ptr %20, align 8
  %190 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  br i1 %190, label %.lr.ph108, label %._crit_edge109

._crit_edge109:                                   ; preds = %199, %187
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #9
  %191 = load ptr, ptr @stdout, align 8, !tbaa !16
  %192 = call i32 @fflush(ptr noundef %191)
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  %194 = load i32, ptr %193, align 4, !tbaa !32
  %195 = icmp eq i32 %194, 50256
  br i1 %195, label %._crit_edge116.loopexit, label %114

.lr.ph108:                                        ; preds = %187, %199
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #9
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  %197 = load i32, ptr %196, align 4, !tbaa !32
  store i32 %197, ptr %21, align 4, !tbaa !32
  %198 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %113, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %199 unwind label %204

199:                                              ; preds = %.lr.ph108
  %200 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %198) #9
  %201 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48, ptr noundef %200)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #9
  %202 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  %203 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #9
  br i1 %203, label %.lr.ph108, label %._crit_edge109

204:                                              ; preds = %.lr.ph108
  %205 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #9
  br label %240

206:                                              ; preds = %133
  %207 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47)
  br label %239

._crit_edge116.loopexit:                          ; preds = %114, %._crit_edge109
  %208 = sitofp i64 %.164 to float
  %209 = sitofp i64 %.268 to float
  %210 = sitofp i32 %143 to float
  br label %._crit_edge116

._crit_edge116:                                   ; preds = %._crit_edge116.loopexit, %102
  %.369.ph = phi float [ 0.000000e+00, %102 ], [ %209, %._crit_edge116.loopexit ]
  %.265.ph = phi float [ 0.000000e+00, %102 ], [ %208, %._crit_edge116.loopexit ]
  %.162.ph = phi float [ 0.000000e+00, %102 ], [ %210, %._crit_edge116.loopexit ]
  %211 = invoke i64 @ggml_time_us()
          to label %212 unwind label %235

212:                                              ; preds = %._crit_edge116
  %213 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46)
  %214 = load i64, ptr %14, align 8, !tbaa !34
  %215 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49, ptr noundef nonnull @__func__.main, i64 noundef %214)
  %216 = sitofp i64 %67 to float
  %217 = fdiv float %216, 1.000000e+03
  %218 = fpext float %217 to double
  %219 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50, ptr noundef nonnull @__func__.main, double noundef %218)
  %220 = fdiv float %.265.ph, 1.000000e+03
  %221 = fpext float %220 to double
  %222 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51, ptr noundef nonnull @__func__.main, double noundef %221)
  %223 = fdiv float %.369.ph, 1.000000e+03
  %224 = fpext float %223 to double
  %225 = fdiv float %223, %.162.ph
  %226 = fpext float %225 to double
  %227 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52, ptr noundef nonnull @__func__.main, double noundef %224, double noundef %226)
  %228 = sub nsw i64 %211, %22
  %229 = sitofp i64 %228 to float
  %230 = fdiv float %229, 1.000000e+03
  %231 = fpext float %230 to double
  %232 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.53, ptr noundef nonnull @__func__.main, double noundef %231)
  %233 = getelementptr inbounds i8, ptr %7, i64 112
  %234 = load ptr, ptr %233, align 8, !tbaa !45
  invoke void @ggml_free(ptr noundef %234)
          to label %239 unwind label %237

235:                                              ; preds = %._crit_edge116
  %236 = landingpad { ptr, i32 }
          cleanup
  br label %240

237:                                              ; preds = %212
  %238 = landingpad { ptr, i32 }
          cleanup
  br label %240

239:                                              ; preds = %206, %212
  %.5 = phi i32 [ 1, %206 ], [ 0, %212 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  br label %242

240:                                              ; preds = %134, %172, %182, %204, %237, %235, %125
  %.pn78.pn = phi { ptr, i32 } [ %238, %237 ], [ %236, %235 ], [ %.pn, %125 ], [ %205, %204 ], [ %.pn76, %172 ], [ %183, %182 ], [ %135, %134 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  br label %241

241:                                              ; preds = %240, %89
  %.pn78.pn.pn = phi { ptr, i32 } [ %.pn78.pn, %240 ], [ %90, %89 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  br label %243

242:                                              ; preds = %62, %239
  %.6 = phi i32 [ %.5, %239 ], [ 1, %62 ]
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %7) #9
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %7) #9
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #9
  br label %245

243:                                              ; preds = %241, %56
  %.pn78.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn, %241 ], [ %57, %56 ]
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %7) #9
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %7) #9
  call void @_ZN9gpt_vocabD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %6) #9
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %6) #9
  br label %244

244:                                              ; preds = %243, %49, %47
  %.pn78.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn.pn, %243 ], [ %50, %49 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #9
  br label %246

245:                                              ; preds = %27, %242
  %.7 = phi i32 [ %.6, %242 ], [ 1, %27 ]
  call void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %3) #9
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %3) #9
  ret i32 %.7

246:                                              ; preds = %244, %28
  %.pn78.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn78.pn.pn.pn.pn, %244 ], [ %29, %28 ]
  call void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160) %3) #9
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %3) #9
  resume { ptr, i32 } %.pn78.pn.pn.pn.pn.pn
}

declare void @ggml_time_init() local_unnamed_addr #4

declare i64 @ggml_time_us() local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10gpt_paramsC2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #6 align 2

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

declare noundef zeroext i1 @_Z16gpt_params_parseiPPcR10gpt_params(i32 noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #4

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #7

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

declare void @_Z17gpt_random_promptB5cxx11RSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

declare void @_Z18test_gpt_tokenizerR9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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

declare void @_Z12gpt_tokenizeRK9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::vector.25") align 8, ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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

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

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

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

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

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

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

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

declare noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef, i32 noundef, double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #4

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

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

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

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #8 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 norecurse 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 = { 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 #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { cold 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, !7, i64 0}
!6 = !{!"_ZTS10gpt_params", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 28, !7, i64 32, !11, i64 36, !11, i64 40, !7, i64 44, !11, i64 48, !12, i64 56, !12, i64 88, !12, i64 120, !10, i64 152, !7, i64 156}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !8, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!14, !14, i64 0}
!17 = !{!18, !7, i64 4}
!18 = !{!"_ZTS10gpt2_model", !19, i64 0, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !20, i64 72, !14, i64 96, !14, i64 104, !14, i64 112, !24, i64 120}
!19 = !{!"_ZTS12gpt2_hparams", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !11, i64 24}
!20 = !{!"_ZTSSt6vectorI10gpt2_layerSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseI10gpt2_layerSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !25, i64 0}
!25 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !26, i64 0}
!26 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !27, i64 0, !29, i64 8}
!27 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !28, i64 0}
!28 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!29 = !{!"_ZTSSt15_Rb_tree_header", !30, i64 0, !15, i64 32}
!30 = !{!"_ZTSSt18_Rb_tree_node_base", !31, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!31 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!32 = !{!7, !7, i64 0}
!33 = !{!6, !7, i64 8}
!34 = !{!15, !15, i64 0}
!35 = !{!6, !7, i64 4}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}
!39 = !{!6, !7, i64 32}
!40 = !{!6, !11, i64 36}
!41 = !{!6, !11, i64 40}
!42 = !{!18, !7, i64 0}
!43 = distinct !{!43, !37}
!44 = !{!6, !7, i64 16}
!45 = !{!18, !14, i64 112}


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