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

; 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.gptj_model = type { %struct.gptj_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.4", ptr, ptr, ptr, %"class.std::map" }
%struct.gptj_hparams = type { i32, 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<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_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
@stdout = external global ptr, align 8
@.str.41 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@.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 @_Z15gptj_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gptj_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

declare i32 @fflush(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9gptj_evalRK10gptj_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.gptj_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 %"class.std::vector.25", align 8
  %24 = alloca i64, align 8
  %25 = alloca %"class.std::vector.25", align 8
  %26 = alloca %"class.std::initializer_list.35", align 8
  %27 = alloca [4 x i32], align 4
  %28 = alloca %"class.std::allocator.27", align 1
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i32, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca ptr, align 8
  %39 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %40 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %41 = alloca i32, align 4
  %42 = 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
  %43 = call i64 @ggml_time_us()
  store i64 %43, 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)
  %44 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 13
  %45 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %44, ptr noundef @.str.41)
          to label %46 unwind label %54

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

50:                                               ; preds = %46
  %51 = zext i1 %49 to i32
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %58

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

54:                                               ; preds = %66, %46, %2
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  br label %391

58:                                               ; preds = %50
  %59 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !13
  %61 = icmp slt i32 %60, 0
  br i1 %61, label %62, label %66

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

66:                                               ; preds = %62, %58
  %67 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %68 = load i32, ptr %67, align 8, !tbaa !13
  %69 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.42, ptr noundef @__func__.main, i32 noundef %68)
          to label %70 unwind label %54

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

74:                                               ; preds = %70
  %75 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %76 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %75) #8
  br i1 %76, label %77, label %89

77:                                               ; preds = %74
  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 %78 unwind label %85

78:                                               ; preds = %77
  %79 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %80 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %79, 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 %89

81:                                               ; preds = %70
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %8, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %9, align 4
  br label %388

85:                                               ; preds = %77
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %388

89:                                               ; preds = %78, %74
  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 @_ZN10gptj_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %90 = invoke i64 @ggml_time_us()
          to label %91 unwind label %100

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

94:                                               ; preds = %91
  br i1 %93, label %104, label %95

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

100:                                              ; preds = %106, %104, %91, %89
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %8, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %387

104:                                              ; preds = %94
  %105 = invoke i64 @ggml_time_us()
          to label %106 unwind label %100

106:                                              ; preds = %104
  %107 = load i64, ptr %16, align 8, !tbaa !11
  %108 = sub nsw i64 %105, %107
  store i64 %108, ptr %13, align 8, !tbaa !11
  %109 = 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) %109)
          to label %110 unwind label %100

110:                                              ; preds = %106
  store i32 0, ptr %10, align 4
  br label %111

111:                                              ; preds = %110, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %112 = load i32, ptr %10, align 4
  switch i32 %112, label %386 [
    i32 0, label %113
  ]

113:                                              ; preds = %111
  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
  %114 = 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) %114)
          to label %115 unwind label %156

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

124:                                              ; preds = %115
  %125 = load i32, ptr %123, align 4, !tbaa !5
  %126 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  store i32 %125, ptr %126, align 8, !tbaa !34
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  %127 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %128 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.44, ptr noundef @__func__.main, i64 noundef %127)
          to label %129 unwind label %164

129:                                              ; preds = %124
  %130 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.45)
          to label %131 unwind label %164

131:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store i64 0, ptr %24, align 8, !tbaa !11
  %132 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !5
  %134 = getelementptr inbounds i32, ptr %27, i64 1
  store i32 1, ptr %134, align 4, !tbaa !5
  %135 = getelementptr inbounds i32, ptr %27, i64 2
  store i32 2, ptr %135, align 4, !tbaa !5
  %136 = getelementptr inbounds i32, ptr %27, i64 3
  store i32 3, ptr %136, align 4, !tbaa !5
  %137 = getelementptr inbounds %"class.std::initializer_list.35", ptr %26, i32 0, i32 0
  store ptr %27, ptr %137, align 8, !tbaa !36
  %138 = getelementptr inbounds %"class.std::initializer_list.35", ptr %26, i32 0, i32 1
  store i64 4, ptr %138, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #8
  %139 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8
  %141 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %142 = load i64, ptr %141, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr %140, i64 %142, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %143 unwind label %168

143:                                              ; preds = %131
  %144 = invoke noundef zeroext i1 @_Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %15, i32 noundef %133, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %145 unwind label %172

145:                                              ; preds = %143
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %146 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  store i64 %146, ptr %29, align 8, !tbaa !11
  br label %147

147:                                              ; preds = %324, %145
  %148 = load i64, ptr %29, align 8, !tbaa !11
  %149 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %150 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  %151 = load i32, ptr %150, align 8, !tbaa !34
  %152 = sext i32 %151 to i64
  %153 = add i64 %149, %152
  %154 = icmp ult i64 %148, %153
  br i1 %154, label %177, label %155

155:                                              ; preds = %147
  store i32 2, ptr %10, align 4
  br label %327

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

160:                                              ; preds = %115
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %8, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %384

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

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

172:                                              ; preds = %143
  %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
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  br label %176

176:                                              ; preds = %172, %168
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #8
  br label %383

177:                                              ; preds = %147
  %178 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %179 = icmp ugt i64 %178, 0
  br i1 %179, label %180, label %205

180:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %181 = invoke i64 @ggml_time_us()
          to label %182 unwind label %191

182:                                              ; preds = %180
  store i64 %181, ptr %30, align 8, !tbaa !11
  %183 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 1
  %184 = load i32, ptr %183, align 4, !tbaa !35
  %185 = load i32, ptr %17, align 4, !tbaa !5
  %186 = invoke noundef zeroext i1 @_Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %15, i32 noundef %184, i32 noundef %185, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %24)
          to label %187 unwind label %191

187:                                              ; preds = %182
  br i1 %186, label %195, label %188

188:                                              ; preds = %187
  %189 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.46)
          to label %190 unwind label %191

190:                                              ; preds = %188
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %202

191:                                              ; preds = %195, %188, %182, %180
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %8, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %329

195:                                              ; preds = %187
  %196 = invoke i64 @ggml_time_us()
          to label %197 unwind label %191

197:                                              ; preds = %195
  %198 = load i64, ptr %30, align 8, !tbaa !11
  %199 = sub nsw i64 %196, %198
  %200 = load i64, ptr %19, align 8, !tbaa !11
  %201 = add nsw i64 %200, %199
  store i64 %201, ptr %19, align 8, !tbaa !11
  store i32 0, ptr %10, align 4
  br label %202

202:                                              ; preds = %197, %190
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  %203 = load i32, ptr %10, align 4
  switch i32 %203, label %327 [
    i32 0, label %204
  ]

204:                                              ; preds = %202
  br label %205

205:                                              ; preds = %204, %177
  %206 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %207 = load i32, ptr %17, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = add i64 %208, %206
  %210 = trunc i64 %209 to i32
  store i32 %210, ptr %17, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %211 = load i64, ptr %29, align 8, !tbaa !11
  %212 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %213 = icmp uge i64 %211, %212
  br i1 %213, label %214, label %255

214:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  %215 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 8
  %216 = load i32, ptr %215, align 8, !tbaa !39
  store i32 %216, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %217 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 9
  %218 = load float, ptr %217, align 4, !tbaa !40
  store float %218, ptr %32, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %219 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 10
  %220 = load float, ptr %219, align 8, !tbaa !42
  store float %220, ptr %33, align 4, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %221 = getelementptr inbounds %struct.gptj_model, ptr %15, i32 0, i32 0
  %222 = getelementptr inbounds %struct.gptj_hparams, ptr %221, i32 0, i32 0
  %223 = load i32, ptr %222, align 8, !tbaa !43
  store i32 %223, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  store i32 0, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %224 = invoke i64 @ggml_time_us()
          to label %225 unwind label %246

225:                                              ; preds = %214
  store i64 %224, ptr %36, align 8, !tbaa !11
  %226 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %227 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  %228 = load i32, ptr %34, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = sub i64 %227, %229
  %231 = getelementptr inbounds float, ptr %226, i64 %230
  %232 = load i32, ptr %31, align 4, !tbaa !5
  %233 = load float, ptr %32, align 4, !tbaa !41
  %234 = fpext float %233 to double
  %235 = load float, ptr %33, align 4, !tbaa !41
  %236 = fpext float %235 to double
  %237 = invoke noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef %231, i32 noundef %232, double noundef %234, double noundef %236, ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %238 unwind label %246

238:                                              ; preds = %225
  store i32 %237, ptr %35, align 4, !tbaa !5
  %239 = invoke i64 @ggml_time_us()
          to label %240 unwind label %246

240:                                              ; preds = %238
  %241 = load i64, ptr %36, align 8, !tbaa !11
  %242 = sub nsw i64 %239, %241
  %243 = load i64, ptr %18, align 8, !tbaa !11
  %244 = add nsw i64 %243, %242
  store i64 %244, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %245 unwind label %250

245:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %286

246:                                              ; preds = %238, %225, %214
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %8, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  br label %254

250:                                              ; preds = %240
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %8, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %9, align 4
  br label %254

254:                                              ; preds = %250, %246
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %329

255:                                              ; preds = %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %256 = load i64, ptr %29, align 8, !tbaa !11
  store i64 %256, ptr %37, align 8, !tbaa !11
  br label %257

257:                                              ; preds = %277, %255
  %258 = load i64, ptr %37, align 8, !tbaa !11
  %259 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %260 = icmp ult i64 %258, %259
  br i1 %260, label %262, label %261

261:                                              ; preds = %257
  store i32 5, ptr %10, align 4
  br label %280

262:                                              ; preds = %257
  %263 = load i64, ptr %37, align 8, !tbaa !11
  %264 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %263) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 4 dereferenceable(4) %264)
          to label %265 unwind label %272

265:                                              ; preds = %262
  %266 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %267 = trunc i64 %266 to i32
  %268 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 4
  %269 = load i32, ptr %268, align 8, !tbaa !44
  %270 = icmp sgt i32 %267, %269
  br i1 %270, label %271, label %276

271:                                              ; preds = %265
  store i32 5, ptr %10, align 4
  br label %280

272:                                              ; preds = %262
  %273 = landingpad { ptr, i32 }
          cleanup
  %274 = extractvalue { ptr, i32 } %273, 0
  store ptr %274, ptr %8, align 8
  %275 = extractvalue { ptr, i32 } %273, 1
  store i32 %275, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %329

276:                                              ; preds = %265
  br label %277

277:                                              ; preds = %276
  %278 = load i64, ptr %37, align 8, !tbaa !11
  %279 = add i64 %278, 1
  store i64 %279, ptr %37, align 8, !tbaa !11
  br label %257, !llvm.loop !45

280:                                              ; preds = %271, %261
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %281

281:                                              ; preds = %280
  %282 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %283 = sub i64 %282, 1
  %284 = load i64, ptr %29, align 8, !tbaa !11
  %285 = add i64 %284, %283
  store i64 %285, ptr %29, align 8, !tbaa !11
  br label %286

286:                                              ; preds = %281, %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  store ptr %23, ptr %38, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #8
  %287 = load ptr, ptr %38, align 8, !tbaa !9
  %288 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %287) #8
  %289 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %39, i32 0, i32 0
  store ptr %288, ptr %289, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #8
  %290 = load ptr, ptr %38, align 8, !tbaa !9
  %291 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %290) #8
  %292 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %40, i32 0, i32 0
  store ptr %291, ptr %292, align 8
  br label %293

293:                                              ; preds = %305, %286
  %294 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(8) %40) #8
  br i1 %294, label %296, label %295

295:                                              ; preds = %293
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %311

296:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %297 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  %298 = load i32, ptr %297, align 4, !tbaa !5
  store i32 %298, ptr %41, align 4, !tbaa !5
  %299 = getelementptr inbounds %struct.gpt_vocab, ptr %14, i32 0, i32 1
  %300 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %299, ptr noundef nonnull align 4 dereferenceable(4) %41)
          to label %301 unwind label %307

301:                                              ; preds = %296
  %302 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %300) #8
  %303 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.47, ptr noundef %302)
          to label %304 unwind label %307

304:                                              ; preds = %301
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %305

305:                                              ; preds = %304
  %306 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %39) #8
  br label %293

307:                                              ; preds = %301, %296
  %308 = landingpad { ptr, i32 }
          cleanup
  %309 = extractvalue { ptr, i32 } %308, 0
  store ptr %309, ptr %8, align 8
  %310 = extractvalue { ptr, i32 } %308, 1
  store i32 %310, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %329

311:                                              ; preds = %295
  %312 = load ptr, ptr @stdout, align 8, !tbaa !9
  %313 = invoke i32 @fflush(ptr noundef %312)
          to label %314 unwind label %319

314:                                              ; preds = %311
  %315 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  %316 = load i32, ptr %315, align 4, !tbaa !5
  %317 = icmp eq i32 %316, 50256
  br i1 %317, label %318, label %323

318:                                              ; preds = %314
  store i32 2, ptr %10, align 4
  br label %327

319:                                              ; preds = %311
  %320 = landingpad { ptr, i32 }
          cleanup
  %321 = extractvalue { ptr, i32 } %320, 0
  store ptr %321, ptr %8, align 8
  %322 = extractvalue { ptr, i32 } %320, 1
  store i32 %322, ptr %9, align 4
  br label %329

323:                                              ; preds = %314
  br label %324

324:                                              ; preds = %323
  %325 = load i64, ptr %29, align 8, !tbaa !11
  %326 = add i64 %325, 1
  store i64 %326, ptr %29, align 8, !tbaa !11
  br label %147, !llvm.loop !47

327:                                              ; preds = %318, %202, %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  %328 = load i32, ptr %10, align 4
  switch i32 %328, label %382 [
    i32 2, label %330
  ]

329:                                              ; preds = %319, %307, %272, %254, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %383

330:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #8
  %331 = invoke i64 @ggml_time_us()
          to label %332 unwind label %374

332:                                              ; preds = %330
  store i64 %331, ptr %42, align 8, !tbaa !11
  %333 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.48)
          to label %334 unwind label %374

334:                                              ; preds = %332
  %335 = load i64, ptr %24, align 8, !tbaa !11
  %336 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.49, ptr noundef @__func__.main, i64 noundef %335)
          to label %337 unwind label %374

337:                                              ; preds = %334
  %338 = load i64, ptr %13, align 8, !tbaa !11
  %339 = sitofp i64 %338 to float
  %340 = fdiv float %339, 1.000000e+03
  %341 = fpext float %340 to double
  %342 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.50, ptr noundef @__func__.main, double noundef %341)
          to label %343 unwind label %374

343:                                              ; preds = %337
  %344 = load i64, ptr %18, align 8, !tbaa !11
  %345 = sitofp i64 %344 to float
  %346 = fdiv float %345, 1.000000e+03
  %347 = fpext float %346 to double
  %348 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.51, ptr noundef @__func__.main, double noundef %347)
          to label %349 unwind label %374

349:                                              ; preds = %343
  %350 = load i64, ptr %19, align 8, !tbaa !11
  %351 = sitofp i64 %350 to float
  %352 = fdiv float %351, 1.000000e+03
  %353 = fpext float %352 to double
  %354 = load i64, ptr %19, align 8, !tbaa !11
  %355 = sitofp i64 %354 to float
  %356 = fdiv float %355, 1.000000e+03
  %357 = load i32, ptr %17, align 4, !tbaa !5
  %358 = sitofp i32 %357 to float
  %359 = fdiv float %356, %358
  %360 = fpext float %359 to double
  %361 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.52, ptr noundef @__func__.main, double noundef %353, double noundef %360)
          to label %362 unwind label %374

362:                                              ; preds = %349
  %363 = load i64, ptr %42, align 8, !tbaa !11
  %364 = load i64, ptr %6, align 8, !tbaa !11
  %365 = sub nsw i64 %363, %364
  %366 = sitofp i64 %365 to float
  %367 = fdiv float %366, 1.000000e+03
  %368 = fpext float %367 to double
  %369 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.53, ptr noundef @__func__.main, double noundef %368)
          to label %370 unwind label %374

370:                                              ; preds = %362
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  %371 = getelementptr inbounds %struct.gptj_model, ptr %15, i32 0, i32 9
  %372 = load ptr, ptr %371, align 8, !tbaa !48
  invoke void @ggml_free(ptr noundef %372)
          to label %373 unwind label %378

373:                                              ; preds = %370
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %382

374:                                              ; preds = %362, %349, %343, %337, %334, %332, %330
  %375 = landingpad { ptr, i32 }
          cleanup
  %376 = extractvalue { ptr, i32 } %375, 0
  store ptr %376, ptr %8, align 8
  %377 = extractvalue { ptr, i32 } %375, 1
  store i32 %377, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #8
  br label %383

378:                                              ; preds = %370
  %379 = landingpad { ptr, i32 }
          cleanup
  %380 = extractvalue { ptr, i32 } %379, 0
  store ptr %380, ptr %8, align 8
  %381 = extractvalue { ptr, i32 } %379, 1
  store i32 %381, ptr %9, align 4
  br label %383

382:                                              ; preds = %373, %327
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #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 %386

383:                                              ; preds = %378, %374, %329, %176
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  br label %384

384:                                              ; preds = %383, %164, %160
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  br label %385

385:                                              ; preds = %384, %156
  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 %387

386:                                              ; preds = %382, %111
  call void @_ZN10gptj_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 %389

387:                                              ; preds = %385, %100
  call void @_ZN10gptj_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 %388

388:                                              ; preds = %387, %85, %81
  call void @llvm.lifetime.end.p0(i64 5000, ptr %11) #8
  br label %391

389:                                              ; preds = %386, %53
  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
  %390 = load i32, ptr %3, align 4
  ret i32 %390

391:                                              ; preds = %388, %54
  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 %392

392:                                              ; preds = %391
  %393 = load ptr, ptr %8, align 8
  %394 = load i32, ptr %9, align 4
  %395 = insertvalue { ptr, i32 } poison, ptr %393, 0
  %396 = insertvalue { ptr, i32 } %395, i32 %394, 1
  resume { ptr, i32 } %396
}

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 @_ZN10gptj_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 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 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 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

; 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 @_ZN10gptj_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 = !{!"_ZTS10gptj_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 = !{!"_ZTS12gptj_hparams", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !16, i64 28}
!22 = !{!"_ZTSSt6vectorI10gptj_layerSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI10gptj_layerSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI10gptj_layerSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI10gptj_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 = !{!14, !6, i64 4}
!36 = !{!37, !10, i64 0}
!37 = !{!"_ZTSSt16initializer_listIiE", !10, i64 0, !12, i64 8}
!38 = !{!37, !12, i64 8}
!39 = !{!14, !6, i64 32}
!40 = !{!14, !16, i64 36}
!41 = !{!16, !16, i64 0}
!42 = !{!14, !16, i64 40}
!43 = !{!20, !6, i64 0}
!44 = !{!14, !6, i64 16}
!45 = distinct !{!45, !46}
!46 = !{!"llvm.loop.mustprogress"}
!47 = distinct !{!47, !46}
!48 = !{!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.gptj_model = type { %struct.gptj_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.4", ptr, ptr, ptr, %"class.std::map" }
%struct.gptj_hparams = type { i32, 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<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_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
@stdout = external local_unnamed_addr global ptr, align 8
@.str.41 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [3 x i8], align 1
@.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 @_Z15gptj_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gptj_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: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9gptj_evalRK10gptj_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.gptj_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 %"class.std::vector.25", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.std::vector.25", align 8
  %14 = alloca [4 x i32], align 16
  %15 = alloca %"class.std::allocator.27", align 1
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca i32, align 4
  tail call void @ggml_time_init()
  %20 = 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)
  %21 = getelementptr inbounds i8, ptr %3, i64 56
  %22 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull @.str.41)
          to label %23 unwind label %26

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

25:                                               ; preds = %23
  br i1 %24, label %28, label %228

26:                                               ; preds = %23, %2
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %229

28:                                               ; preds = %25
  %29 = load i32, ptr %3, align 8, !tbaa !5
  %30 = icmp slt i32 %29, 0
  br i1 %30, label %31, label %34

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

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

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

42:                                               ; preds = %39
  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 %43 unwind label %47

43:                                               ; preds = %42
  %44 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %40, 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 %49

45:                                               ; preds = %34
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %227

47:                                               ; preds = %42
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br label %227

49:                                               ; preds = %43, %39
  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 @_ZN10gptj_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %7) #9
  %50 = invoke i64 @ggml_time_us()
          to label %51 unwind label %54

51:                                               ; preds = %49
  %52 = invoke noundef zeroext i1 @_Z15gptj_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gptj_modelR9gpt_vocab(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(168) %7, ptr noundef nonnull align 8 dereferenceable(120) %6)
          to label %53 unwind label %54

53:                                               ; preds = %51
  br i1 %52, label %56, label %60

54:                                               ; preds = %58, %56, %51, %49
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %226

56:                                               ; preds = %53
  %57 = invoke i64 @ggml_time_us()
          to label %58 unwind label %54

58:                                               ; preds = %56
  %59 = 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) %59)
          to label %64 unwind label %54

60:                                               ; preds = %53
  %61 = load ptr, ptr @stderr, align 8, !tbaa !16
  %62 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.43, ptr noundef nonnull @__func__.main, ptr noundef %62) #10
  br label %225

64:                                               ; preds = %58
  %65 = sub nsw i64 %57, %50
  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) %40)
          to label %66 unwind label %101

66:                                               ; preds = %64
  %67 = getelementptr inbounds i8, ptr %3, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #9
  %68 = getelementptr inbounds i8, ptr %7, i64 4
  %69 = load i32, ptr %68, align 4, !tbaa !17
  %70 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %71 = trunc i64 %70 to i32
  %72 = sub nsw i32 %69, %71
  store i32 %72, ptr %10, align 4, !tbaa !32
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %67, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %74 = load i32, ptr %73, align 4, !tbaa !32
  store i32 %74, ptr %67, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #9
  %75 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44, ptr noundef nonnull @__func__.main, i64 noundef %75)
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #9
  store i64 0, ptr %12, align 8, !tbaa !34
  %78 = getelementptr inbounds i8, ptr %3, i64 4
  %79 = load i32, ptr %78, align 4, !tbaa !35
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #9
  store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, ptr %14, align 16, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr nonnull %14, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %80 unwind label %103

80:                                               ; preds = %66
  %81 = invoke noundef zeroext i1 @_Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %7, i32 noundef %79, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %82 unwind label %105

82:                                               ; preds = %80
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  %83 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %84 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %85 = load i32, ptr %67, align 8, !tbaa !33
  %86 = sext i32 %85 to i64
  %87 = add i64 %84, %86
  %88 = icmp ult i64 %83, %87
  br i1 %88, label %.lr.ph107, label %._crit_edge108

.lr.ph107:                                        ; preds = %82
  %89 = getelementptr inbounds i8, ptr %3, i64 32
  %90 = getelementptr inbounds i8, ptr %3, i64 36
  %91 = getelementptr inbounds i8, ptr %3, i64 40
  %92 = getelementptr inbounds i8, ptr %3, i64 16
  %93 = getelementptr inbounds i8, ptr %6, i64 48
  br label %108

94:                                               ; preds = %._crit_edge101
  %95 = add i64 %.168, 1
  %96 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %97 = load i32, ptr %67, align 8, !tbaa !33
  %98 = sext i32 %97 to i64
  %99 = add i64 %96, %98
  %100 = icmp ult i64 %95, %99
  br i1 %100, label %108, label %._crit_edge108.loopexit, !llvm.loop !36

101:                                              ; preds = %64
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %224

103:                                              ; preds = %66
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %107

105:                                              ; preds = %80
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #9
  br label %107

107:                                              ; preds = %105, %103
  %.pn = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #9
  br label %223

108:                                              ; preds = %.lr.ph107, %94
  %.058105 = phi i32 [ 0, %.lr.ph107 ], [ %125, %94 ]
  %.060104 = phi i64 [ 0, %.lr.ph107 ], [ %.161, %94 ]
  %.063103 = phi i64 [ 0, %.lr.ph107 ], [ %.265, %94 ]
  %.067102 = phi i64 [ %83, %.lr.ph107 ], [ %95, %94 ]
  %109 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %.not = icmp eq i64 %109, 0
  br i1 %.not, label %122, label %110

110:                                              ; preds = %108
  %111 = invoke i64 @ggml_time_us()
          to label %112 unwind label %116

112:                                              ; preds = %110
  %113 = load i32, ptr %78, align 4, !tbaa !35
  %114 = invoke noundef zeroext i1 @_Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %7, i32 noundef %113, i32 noundef %.058105, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %115 unwind label %116

115:                                              ; preds = %112
  br i1 %114, label %118, label %189

116:                                              ; preds = %118, %112, %110
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %223

118:                                              ; preds = %115
  %119 = invoke i64 @ggml_time_us()
          to label %.thread84 unwind label %116

.thread84:                                        ; preds = %118
  %120 = sub i64 %.063103, %111
  %121 = add i64 %120, %119
  br label %122

122:                                              ; preds = %.thread84, %108
  %.265 = phi i64 [ %.063103, %108 ], [ %121, %.thread84 ]
  %123 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %124 = trunc i64 %123 to i32
  %125 = add i32 %.058105, %124
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %126 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %.not70 = icmp ult i64 %.067102, %126
  br i1 %.not70, label %.preheader, label %129

.preheader:                                       ; preds = %122
  %127 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %128 = icmp ult i64 %.067102, %127
  br i1 %128, label %.lr.ph, label %._crit_edge

129:                                              ; preds = %122
  %130 = load i32, ptr %89, align 8, !tbaa !38
  %131 = load float, ptr %90, align 4, !tbaa !39
  %132 = load float, ptr %91, align 8, !tbaa !40
  %133 = load i32, ptr %7, align 8, !tbaa !41
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #9
  store i32 0, ptr %16, align 4, !tbaa !32
  %134 = invoke i64 @ggml_time_us()
          to label %135 unwind label %150

135:                                              ; preds = %129
  %136 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  %137 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  %138 = sext i32 %133 to i64
  %139 = sub i64 %137, %138
  %140 = getelementptr inbounds float, ptr %136, i64 %139
  %141 = fpext float %131 to double
  %142 = fpext float %132 to double
  %143 = invoke noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef %140, i32 noundef %130, double noundef %141, double noundef %142, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %144 unwind label %150

144:                                              ; preds = %135
  store i32 %143, ptr %16, align 4, !tbaa !32
  %145 = invoke i64 @ggml_time_us()
          to label %146 unwind label %150

146:                                              ; preds = %144
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %147 unwind label %152

147:                                              ; preds = %146
  %148 = sub i64 %.060104, %134
  %149 = add i64 %148, %145
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  br label %170

150:                                              ; preds = %144, %135, %129
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %154

152:                                              ; preds = %146
  %153 = landingpad { ptr, i32 }
          cleanup
  br label %154

154:                                              ; preds = %152, %150
  %.pn71 = phi { ptr, i32 } [ %153, %152 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #9
  br label %223

155:                                              ; preds = %160
  %156 = add nuw i64 %.04597, 1
  %157 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  %158 = icmp ult i64 %156, %157
  br i1 %158, label %.lr.ph, label %._crit_edge, !llvm.loop !42

.lr.ph:                                           ; preds = %.preheader, %155
  %.04597 = phi i64 [ %156, %155 ], [ %.067102, %.preheader ]
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.04597) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %159)
          to label %160 unwind label %165

160:                                              ; preds = %.lr.ph
  %161 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %162 = trunc i64 %161 to i32
  %163 = load i32, ptr %92, align 8, !tbaa !43
  %164 = icmp slt i32 %163, %162
  br i1 %164, label %._crit_edge, label %155

165:                                              ; preds = %.lr.ph
  %166 = landingpad { ptr, i32 }
          cleanup
  br label %223

._crit_edge:                                      ; preds = %155, %160, %.preheader
  %167 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %168 = add i64 %.067102, -1
  %169 = add i64 %168, %167
  br label %170

170:                                              ; preds = %._crit_edge, %147
  %.168 = phi i64 [ %.067102, %147 ], [ %169, %._crit_edge ]
  %.161 = phi i64 [ %149, %147 ], [ %.060104, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #9
  %171 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  store ptr %171, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %172 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  store ptr %172, ptr %18, align 8
  %173 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br i1 %173, label %.lr.ph100, label %._crit_edge101

._crit_edge101:                                   ; preds = %182, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  %174 = load ptr, ptr @stdout, align 8, !tbaa !16
  %175 = call i32 @fflush(ptr noundef %174)
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %177 = load i32, ptr %176, align 4, !tbaa !32
  %178 = icmp eq i32 %177, 50256
  br i1 %178, label %._crit_edge108.loopexit, label %94

.lr.ph100:                                        ; preds = %170, %182
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #9
  %179 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  %180 = load i32, ptr %179, align 4, !tbaa !32
  store i32 %180, ptr %19, align 4, !tbaa !32
  %181 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %93, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %182 unwind label %187

182:                                              ; preds = %.lr.ph100
  %183 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %181) #9
  %184 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47, ptr noundef %183)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #9
  %186 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br i1 %186, label %.lr.ph100, label %._crit_edge101

187:                                              ; preds = %.lr.ph100
  %188 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #9
  br label %223

189:                                              ; preds = %115
  %190 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46)
  br label %222

._crit_edge108.loopexit:                          ; preds = %94, %._crit_edge101
  %191 = sitofp i64 %.161 to float
  %192 = sitofp i64 %.265 to float
  %193 = sitofp i32 %125 to float
  br label %._crit_edge108

._crit_edge108:                                   ; preds = %._crit_edge108.loopexit, %82
  %.366.ph = phi float [ 0.000000e+00, %82 ], [ %192, %._crit_edge108.loopexit ]
  %.262.ph = phi float [ 0.000000e+00, %82 ], [ %191, %._crit_edge108.loopexit ]
  %.159.ph = phi float [ 0.000000e+00, %82 ], [ %193, %._crit_edge108.loopexit ]
  %194 = invoke i64 @ggml_time_us()
          to label %195 unwind label %218

195:                                              ; preds = %._crit_edge108
  %196 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48)
  %197 = load i64, ptr %12, align 8, !tbaa !34
  %198 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49, ptr noundef nonnull @__func__.main, i64 noundef %197)
  %199 = sitofp i64 %65 to float
  %200 = fdiv float %199, 1.000000e+03
  %201 = fpext float %200 to double
  %202 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50, ptr noundef nonnull @__func__.main, double noundef %201)
  %203 = fdiv float %.262.ph, 1.000000e+03
  %204 = fpext float %203 to double
  %205 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51, ptr noundef nonnull @__func__.main, double noundef %204)
  %206 = fdiv float %.366.ph, 1.000000e+03
  %207 = fpext float %206 to double
  %208 = fdiv float %206, %.159.ph
  %209 = fpext float %208 to double
  %210 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52, ptr noundef nonnull @__func__.main, double noundef %207, double noundef %209)
  %211 = sub nsw i64 %194, %20
  %212 = sitofp i64 %211 to float
  %213 = fdiv float %212, 1.000000e+03
  %214 = fpext float %213 to double
  %215 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.53, ptr noundef nonnull @__func__.main, double noundef %214)
  %216 = getelementptr inbounds i8, ptr %7, i64 112
  %217 = load ptr, ptr %216, align 8, !tbaa !44
  invoke void @ggml_free(ptr noundef %217)
          to label %222 unwind label %220

218:                                              ; preds = %._crit_edge108
  %219 = landingpad { ptr, i32 }
          cleanup
  br label %223

220:                                              ; preds = %195
  %221 = landingpad { ptr, i32 }
          cleanup
  br label %223

222:                                              ; preds = %189, %195
  %.5 = phi i32 [ 1, %189 ], [ 0, %195 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #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 %225

223:                                              ; preds = %116, %154, %165, %187, %220, %218, %107
  %.pn73.pn = phi { ptr, i32 } [ %221, %220 ], [ %219, %218 ], [ %.pn, %107 ], [ %188, %187 ], [ %.pn71, %154 ], [ %166, %165 ], [ %117, %116 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #9
  br label %224

224:                                              ; preds = %223, %101
  %.pn73.pn.pn = phi { ptr, i32 } [ %.pn73.pn, %223 ], [ %102, %101 ]
  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 %226

225:                                              ; preds = %60, %222
  %.6 = phi i32 [ %.5, %222 ], [ 1, %60 ]
  call void @_ZN10gptj_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 %228

226:                                              ; preds = %224, %54
  %.pn73.pn.pn.pn = phi { ptr, i32 } [ %.pn73.pn.pn, %224 ], [ %55, %54 ]
  call void @_ZN10gptj_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 %227

227:                                              ; preds = %226, %47, %45
  %.pn73.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn73.pn.pn.pn, %226 ], [ %48, %47 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #9
  br label %229

228:                                              ; preds = %25, %225
  %.7 = phi i32 [ %.6, %225 ], [ 1, %25 ]
  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

229:                                              ; preds = %227, %26
  %.pn73.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn73.pn.pn.pn.pn, %227 ], [ %27, %26 ]
  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 } %.pn73.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 @_ZN10gptj_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 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 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 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: 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 @_ZN10gptj_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 = !{!"_ZTS10gptj_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 = !{!"_ZTS12gptj_hparams", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !11, i64 28}
!20 = !{!"_ZTSSt6vectorI10gptj_layerSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseI10gptj_layerSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI10gptj_layerSaIS0_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI10gptj_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 = !{!6, !7, i64 32}
!39 = !{!6, !11, i64 36}
!40 = !{!6, !11, i64 40}
!41 = !{!18, !7, i64 0}
!42 = distinct !{!42, !37}
!43 = !{!6, !7, i64 16}
!44 = !{!18, !14, i64 112}


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