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

; 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.24", %"class.std::map.29", %"class.std::vector" }
%"class.std::map.24" = type { %"class.std::_Rb_tree.25" }
%"class.std::_Rb_tree.25" = 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.29" = type { %"class.std::_Rb_tree.30" }
%"class.std::_Rb_tree.30" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.gpt2_model = type { %struct.gpt2_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.3", ptr, ptr, ptr, %"class.std::vector.8", %"class.std::vector.13", ptr, ptr, %"class.std::map", ptr, ptr }
%struct.gpt2_hparams = type { i32, i32, i32, i32, i32, i32, float }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_Vector_impl" }
%"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_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.53" = type { %"struct.std::_Vector_base.54" }
%"struct.std::_Vector_base.54" = 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.55" = type { i8 }
%"class.std::vector.63" = type { %"struct.std::_Vector_base.64" }
%"struct.std::_Vector_base.64" = 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.__gnu_cxx::__normal_iterator.68" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.69" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@stderr = external global ptr, align 8
@.str.80 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external global ptr, align 8
@.str.91 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [30 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocabRK10gpt_params(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(160)) #2

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

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

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

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

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

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

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

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

declare ptr @ggml_backend_name(ptr noundef) #3

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

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

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

declare void @ggml_free(ptr noundef) #3

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #6 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca %struct.gpt_params, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::mersenne_twister_engine", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i64, align 8
  %14 = alloca %struct.gpt_vocab, align 8
  %15 = alloca %struct.gpt2_model, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %"class.std::vector.53", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::allocator.55", align 1
  %24 = alloca i64, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca %"class.std::vector.63", align 8
  %31 = alloca %"class.std::vector.53", align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.std::vector.53", align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i32, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i64, align 8
  %45 = alloca i64, align 8
  %46 = alloca ptr, align 8
  %47 = alloca %"class.__gnu_cxx::__normal_iterator.68", align 8
  %48 = alloca %"class.__gnu_cxx::__normal_iterator.68", align 8
  %49 = alloca i32, align 4
  %50 = alloca i64, align 8
  %51 = alloca ptr, align 8
  %52 = alloca %"class.__gnu_cxx::__normal_iterator.69", align 8
  %53 = alloca %"class.__gnu_cxx::__normal_iterator.69", align 8
  %54 = alloca ptr, align 8
  %55 = alloca ptr, align 8
  %56 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %57 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %58 = alloca ptr, 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
  %59 = call i64 @ggml_time_us()
  store i64 %59, 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)
  %60 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 13
  %61 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef @.str.80)
          to label %62 unwind label %70

62:                                               ; preds = %2
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = invoke noundef zeroext i1 @_Z16gpt_params_parseiPPcR10gpt_params(i32 noundef %63, ptr noundef %64, ptr noundef nonnull align 8 dereferenceable(160) %7)
          to label %66 unwind label %70

66:                                               ; preds = %62
  %67 = zext i1 %65 to i32
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %74

69:                                               ; preds = %66
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %564

70:                                               ; preds = %82, %62, %2
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %8, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %9, align 4
  br label %566

74:                                               ; preds = %66
  %75 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %76 = load i32, ptr %75, align 8, !tbaa !13
  %77 = icmp slt i32 %76, 0
  br i1 %77, label %78, label %82

78:                                               ; preds = %74
  %79 = call i64 @time(ptr noundef null) #8
  %80 = trunc i64 %79 to i32
  %81 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  store i32 %80, ptr %81, align 8, !tbaa !13
  br label %82

82:                                               ; preds = %78, %74
  %83 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !13
  %85 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.81, ptr noundef @__func__.main, i32 noundef %84)
          to label %86 unwind label %70

86:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 5000, ptr %11) #8
  %87 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !13
  %89 = sext i32 %88 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %11, i64 noundef %89)
          to label %90 unwind label %97

90:                                               ; preds = %86
  %91 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %92 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %91) #8
  br i1 %92, label %93, label %105

93:                                               ; preds = %90
  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 %94 unwind label %101

94:                                               ; preds = %93
  %95 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %96 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %95, 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 %105

97:                                               ; preds = %86
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %8, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %9, align 4
  br label %563

101:                                              ; preds = %93
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %8, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %563

105:                                              ; preds = %94, %90
  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 248, ptr %15) #8
  call void @_ZN10gpt2_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(248) %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %106 = invoke i64 @ggml_time_us()
          to label %107 unwind label %116

107:                                              ; preds = %105
  store i64 %106, ptr %16, align 8, !tbaa !11
  %108 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 13
  %109 = invoke noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocabRK10gpt_params(ptr noundef nonnull align 8 dereferenceable(32) %108, ptr noundef nonnull align 8 dereferenceable(248) %15, ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef nonnull align 8 dereferenceable(160) %7)
          to label %110 unwind label %116

110:                                              ; preds = %107
  br i1 %109, label %120, label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr @stderr, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 13
  %114 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %113) #8
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.82, ptr noundef @__func__.main, ptr noundef %114) #8
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %127

116:                                              ; preds = %122, %120, %107, %105
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %8, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %562

120:                                              ; preds = %110
  %121 = invoke i64 @ggml_time_us()
          to label %122 unwind label %116

122:                                              ; preds = %120
  %123 = load i64, ptr %16, align 8, !tbaa !11
  %124 = sub nsw i64 %121, %123
  store i64 %124, ptr %13, align 8, !tbaa !11
  %125 = 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) %125)
          to label %126 unwind label %116

126:                                              ; preds = %122
  store i32 0, ptr %10, align 4
  br label %127

127:                                              ; preds = %126, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %128 = load i32, ptr %10, align 4
  switch i32 %128, label %561 [
    i32 0, label %129
  ]

129:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %130 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 10
  %131 = call noundef ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %130) #8
  %132 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 10
  %133 = call noundef i64 @_ZNKSt6vectorIP12ggml_backendSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %132) #8
  %134 = trunc i64 %133 to i32
  %135 = invoke ptr @ggml_backend_sched_new(ptr noundef %131, ptr noundef null, i32 noundef %134, i64 noundef 4096, i1 noundef zeroext false)
          to label %136 unwind label %164

136:                                              ; preds = %129
  store ptr %135, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %137 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 0
  %138 = getelementptr inbounds %struct.gpt2_hparams, ptr %137, i32 0, i32 1
  %139 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 4
  %140 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %138, ptr noundef nonnull align 4 dereferenceable(4) %139)
          to label %141 unwind label %168

141:                                              ; preds = %136
  %142 = load i32, ptr %140, align 4, !tbaa !5
  store i32 %142, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %143 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 0
  %144 = getelementptr inbounds %struct.gpt2_hparams, ptr %143, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !19
  %146 = load i32, ptr %18, align 4, !tbaa !5
  %147 = sub nsw i32 %145, %146
  store i32 %147, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %148 = load i32, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #8
  %149 = load i32, ptr %18, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #8
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %150, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %151 unwind label %172

151:                                              ; preds = %141
  %152 = invoke noundef ptr @_Z10gpt2_graphRK10gpt2_modeliRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(248) %15, i32 noundef %148, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %153 unwind label %176

153:                                              ; preds = %151
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  store ptr %152, ptr %20, align 8, !tbaa !9
  %154 = load ptr, ptr %17, align 8, !tbaa !9
  %155 = load ptr, ptr %20, align 8, !tbaa !9
  %156 = invoke zeroext i1 @ggml_backend_sched_reserve(ptr noundef %154, ptr noundef %155)
          to label %157 unwind label %181

157:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  store i64 0, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store i64 0, ptr %25, align 8, !tbaa !11
  br label %158

158:                                              ; preds = %216, %157
  %159 = load i64, ptr %25, align 8, !tbaa !11
  %160 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 10
  %161 = call noundef i64 @_ZNKSt6vectorIP12ggml_backendSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %160) #8
  %162 = icmp ult i64 %159, %161
  br i1 %162, label %185, label %163

163:                                              ; preds = %158
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %219

164:                                              ; preds = %129
  %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 %560

168:                                              ; preds = %136
  %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 %261

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

176:                                              ; preds = %151
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %8, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %9, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  br label %180

180:                                              ; preds = %176, %172
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #8
  br label %260

181:                                              ; preds = %153
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %8, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %9, align 4
  br label %260

185:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %186 = load ptr, ptr %17, align 8, !tbaa !9
  %187 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 10
  %188 = load i64, ptr %25, align 8, !tbaa !11
  %189 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %187, i64 noundef %188) #8
  %190 = load ptr, ptr %189, align 8, !tbaa !9
  %191 = invoke i64 @ggml_backend_sched_get_buffer_size(ptr noundef %186, ptr noundef %190)
          to label %192 unwind label %211

192:                                              ; preds = %185
  store i64 %191, ptr %26, align 8, !tbaa !11
  %193 = load i64, ptr %26, align 8, !tbaa !11
  %194 = icmp ugt i64 %193, 0
  br i1 %194, label %195, label %215

195:                                              ; preds = %192
  %196 = load i64, ptr %26, align 8, !tbaa !11
  %197 = load i64, ptr %24, align 8, !tbaa !11
  %198 = add i64 %197, %196
  store i64 %198, ptr %24, align 8, !tbaa !11
  %199 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 10
  %200 = load i64, ptr %25, align 8, !tbaa !11
  %201 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %199, i64 noundef %200) #8
  %202 = load ptr, ptr %201, align 8, !tbaa !9
  %203 = invoke ptr @ggml_backend_name(ptr noundef %202)
          to label %204 unwind label %211

204:                                              ; preds = %195
  %205 = load i64, ptr %26, align 8, !tbaa !11
  %206 = uitofp i64 %205 to double
  %207 = fdiv double %206, 1.024000e+03
  %208 = fdiv double %207, 1.024000e+03
  %209 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.83, ptr noundef @__func__.main, ptr noundef %203, double noundef %208)
          to label %210 unwind label %211

210:                                              ; preds = %204
  br label %215

211:                                              ; preds = %204, %195, %185
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %8, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %259

215:                                              ; preds = %210, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %216

216:                                              ; preds = %215
  %217 = load i64, ptr %25, align 8, !tbaa !11
  %218 = add i64 %217, 1
  store i64 %218, ptr %25, align 8, !tbaa !11
  br label %158, !llvm.loop !42

219:                                              ; preds = %163
  %220 = load i64, ptr %24, align 8, !tbaa !11
  %221 = uitofp i64 %220 to double
  %222 = fdiv double %221, 1.024000e+03
  %223 = fdiv double %222, 1.024000e+03
  %224 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.84, ptr noundef @__func__.main, double noundef %223)
          to label %225 unwind label %255

225:                                              ; preds = %219
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  store i64 0, ptr %28, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  store i64 0, ptr %29, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #8
  call void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #8
  %226 = 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.53") align 8 %31, ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef nonnull align 8 dereferenceable(32) %226)
          to label %227 unwind label %262

227:                                              ; preds = %225
  %228 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  %229 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 0
  %230 = getelementptr inbounds %struct.gpt2_hparams, ptr %229, i32 0, i32 1
  %231 = load i32, ptr %230, align 4, !tbaa !19
  %232 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  %233 = trunc i64 %232 to i32
  %234 = sub nsw i32 %231, %233
  store i32 %234, ptr %32, align 4, !tbaa !5
  %235 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %228, ptr noundef nonnull align 4 dereferenceable(4) %32)
          to label %236 unwind label %266

236:                                              ; preds = %227
  %237 = load i32, ptr %235, align 4, !tbaa !5
  %238 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  store i32 %237, ptr %238, align 8, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  %239 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 14
  %240 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %239) #8
  %241 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.85, ptr noundef @__func__.main, ptr noundef %240)
          to label %242 unwind label %270

242:                                              ; preds = %236
  %243 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  %244 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.86, ptr noundef @__func__.main, i64 noundef %243)
          to label %245 unwind label %270

245:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  store i32 0, ptr %33, align 4, !tbaa !5
  br label %246

246:                                              ; preds = %285, %245
  %247 = load i32, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  store i32 8, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %248 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  %249 = trunc i64 %248 to i32
  store i32 %249, ptr %35, align 4, !tbaa !5
  %250 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %35)
          to label %251 unwind label %274

251:                                              ; preds = %246
  %252 = load i32, ptr %250, align 4, !tbaa !5
  %253 = icmp slt i32 %247, %252
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br i1 %253, label %278, label %254

254:                                              ; preds = %251
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %293

255:                                              ; preds = %219
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %8, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %9, align 4
  br label %259

259:                                              ; preds = %255, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %260

260:                                              ; preds = %259, %181, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %261

261:                                              ; preds = %260, %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %560

262:                                              ; preds = %225
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %8, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %9, align 4
  br label %559

266:                                              ; preds = %227
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %8, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %558

270:                                              ; preds = %293, %242, %236
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %8, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %9, align 4
  br label %558

274:                                              ; preds = %246
  %275 = landingpad { ptr, i32 }
          cleanup
  %276 = extractvalue { ptr, i32 } %275, 0
  store ptr %276, ptr %8, align 8
  %277 = extractvalue { ptr, i32 } %275, 1
  store i32 %277, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  br label %292

278:                                              ; preds = %251
  %279 = load i32, ptr %33, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %280) #8
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.87, i32 noundef %282)
          to label %284 unwind label %288

284:                                              ; preds = %278
  br label %285

285:                                              ; preds = %284
  %286 = load i32, ptr %33, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %33, align 4, !tbaa !5
  br label %246, !llvm.loop !45

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

292:                                              ; preds = %288, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %558

293:                                              ; preds = %254
  %294 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.88)
          to label %295 unwind label %270

295:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 24, ptr %36) #8
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #8
  %296 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  store i64 %296, ptr %37, align 8, !tbaa !11
  br label %297

297:                                              ; preds = %452, %295
  %298 = load i64, ptr %37, align 8, !tbaa !11
  %299 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  %300 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 2
  %301 = load i32, ptr %300, align 8, !tbaa !44
  %302 = sext i32 %301 to i64
  %303 = add i64 %299, %302
  %304 = icmp ult i64 %298, %303
  br i1 %304, label %306, label %305

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

306:                                              ; preds = %297
  %307 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  %308 = icmp ugt i64 %307, 0
  br i1 %308, label %309, label %333

309:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #8
  %310 = invoke i64 @ggml_time_us()
          to label %311 unwind label %319

311:                                              ; preds = %309
  store i64 %310, ptr %38, align 8, !tbaa !11
  %312 = load ptr, ptr %17, align 8, !tbaa !9
  %313 = load i32, ptr %27, align 4, !tbaa !5
  %314 = invoke noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modelP18ggml_backend_schediRKSt6vectorIiSaIiEERS4_IfSaIfEE(ptr noundef nonnull align 8 dereferenceable(248) %15, ptr noundef %312, i32 noundef %313, ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %315 unwind label %319

315:                                              ; preds = %311
  br i1 %314, label %323, label %316

316:                                              ; preds = %315
  %317 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.89)
          to label %318 unwind label %319

318:                                              ; preds = %316
  store i32 1, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %330

319:                                              ; preds = %323, %316, %311, %309
  %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
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  br label %457

323:                                              ; preds = %315
  %324 = invoke i64 @ggml_time_us()
          to label %325 unwind label %319

325:                                              ; preds = %323
  %326 = load i64, ptr %38, align 8, !tbaa !11
  %327 = sub nsw i64 %324, %326
  %328 = load i64, ptr %29, align 8, !tbaa !11
  %329 = add nsw i64 %328, %327
  store i64 %329, ptr %29, align 8, !tbaa !11
  store i32 0, ptr %10, align 4
  br label %330

330:                                              ; preds = %325, %318
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #8
  %331 = load i32, ptr %10, align 4
  switch i32 %331, label %455 [
    i32 0, label %332
  ]

332:                                              ; preds = %330
  br label %333

333:                                              ; preds = %332, %306
  %334 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  %335 = load i32, ptr %27, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = add i64 %336, %334
  %338 = trunc i64 %337 to i32
  store i32 %338, ptr %27, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  %339 = load i64, ptr %37, align 8, !tbaa !11
  %340 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  %341 = icmp uge i64 %339, %340
  br i1 %341, label %342, label %383

342:                                              ; preds = %333
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %343 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 8
  %344 = load i32, ptr %343, align 8, !tbaa !46
  store i32 %344, ptr %39, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  %345 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 9
  %346 = load float, ptr %345, align 4, !tbaa !47
  store float %346, ptr %40, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  %347 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 10
  %348 = load float, ptr %347, align 8, !tbaa !49
  store float %348, ptr %41, align 4, !tbaa !48
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  %349 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 0
  %350 = getelementptr inbounds %struct.gpt2_hparams, ptr %349, i32 0, i32 0
  %351 = load i32, ptr %350, align 8, !tbaa !50
  store i32 %351, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  store i32 0, ptr %43, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %352 = invoke i64 @ggml_time_us()
          to label %353 unwind label %374

353:                                              ; preds = %342
  store i64 %352, ptr %44, align 8, !tbaa !11
  %354 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  %355 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  %356 = load i32, ptr %42, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = sub i64 %355, %357
  %359 = getelementptr inbounds float, ptr %354, i64 %358
  %360 = load i32, ptr %39, align 4, !tbaa !5
  %361 = load float, ptr %40, align 4, !tbaa !48
  %362 = fpext float %361 to double
  %363 = load float, ptr %41, align 4, !tbaa !48
  %364 = fpext float %363 to double
  %365 = invoke noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %14, ptr noundef %359, i32 noundef %360, double noundef %362, double noundef %364, ptr noundef nonnull align 8 dereferenceable(5000) %11)
          to label %366 unwind label %374

366:                                              ; preds = %353
  store i32 %365, ptr %43, align 4, !tbaa !5
  %367 = invoke i64 @ggml_time_us()
          to label %368 unwind label %374

368:                                              ; preds = %366
  %369 = load i64, ptr %44, align 8, !tbaa !11
  %370 = sub nsw i64 %367, %369
  %371 = load i64, ptr %28, align 8, !tbaa !11
  %372 = add nsw i64 %371, %370
  store i64 %372, ptr %28, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %373 unwind label %378

373:                                              ; preds = %368
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %414

374:                                              ; preds = %366, %353, %342
  %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 %44) #8
  br label %382

378:                                              ; preds = %368
  %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 %382

382:                                              ; preds = %378, %374
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  br label %457

383:                                              ; preds = %333
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %384 = load i64, ptr %37, align 8, !tbaa !11
  store i64 %384, ptr %45, align 8, !tbaa !11
  br label %385

385:                                              ; preds = %405, %383
  %386 = load i64, ptr %45, align 8, !tbaa !11
  %387 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  %388 = icmp ult i64 %386, %387
  br i1 %388, label %390, label %389

389:                                              ; preds = %385
  store i32 11, ptr %10, align 4
  br label %408

390:                                              ; preds = %385
  %391 = load i64, ptr %45, align 8, !tbaa !11
  %392 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %391) #8
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 4 dereferenceable(4) %392)
          to label %393 unwind label %400

393:                                              ; preds = %390
  %394 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  %395 = trunc i64 %394 to i32
  %396 = getelementptr inbounds %struct.gpt_params, ptr %7, i32 0, i32 4
  %397 = load i32, ptr %396, align 8, !tbaa !51
  %398 = icmp sge i32 %395, %397
  br i1 %398, label %399, label %404

399:                                              ; preds = %393
  store i32 11, ptr %10, align 4
  br label %408

400:                                              ; preds = %390
  %401 = landingpad { ptr, i32 }
          cleanup
  %402 = extractvalue { ptr, i32 } %401, 0
  store ptr %402, ptr %8, align 8
  %403 = extractvalue { ptr, i32 } %401, 1
  store i32 %403, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %457

404:                                              ; preds = %393
  br label %405

405:                                              ; preds = %404
  %406 = load i64, ptr %45, align 8, !tbaa !11
  %407 = add i64 %406, 1
  store i64 %407, ptr %45, align 8, !tbaa !11
  br label %385, !llvm.loop !52

408:                                              ; preds = %399, %389
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %409

409:                                              ; preds = %408
  %410 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  %411 = sub i64 %410, 1
  %412 = load i64, ptr %37, align 8, !tbaa !11
  %413 = add i64 %412, %411
  store i64 %413, ptr %37, align 8, !tbaa !11
  br label %414

414:                                              ; preds = %409, %373
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #8
  store ptr %36, ptr %46, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #8
  %415 = load ptr, ptr %46, align 8, !tbaa !9
  %416 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %415) #8
  %417 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.68", ptr %47, i32 0, i32 0
  store ptr %416, ptr %417, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #8
  %418 = load ptr, ptr %46, align 8, !tbaa !9
  %419 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %418) #8
  %420 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.68", ptr %48, i32 0, i32 0
  store ptr %419, ptr %420, align 8
  br label %421

421:                                              ; preds = %433, %414
  %422 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %48) #8
  br i1 %422, label %424, label %423

423:                                              ; preds = %421
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  br label %439

424:                                              ; preds = %421
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  %425 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  %426 = load i32, ptr %425, align 4, !tbaa !5
  store i32 %426, ptr %49, align 4, !tbaa !5
  %427 = getelementptr inbounds %struct.gpt_vocab, ptr %14, i32 0, i32 1
  %428 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %427, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %429 unwind label %435

429:                                              ; preds = %424
  %430 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %428) #8
  %431 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.90, ptr noundef %430)
          to label %432 unwind label %435

432:                                              ; preds = %429
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  br label %433

433:                                              ; preds = %432
  %434 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %47) #8
  br label %421

435:                                              ; preds = %429, %424
  %436 = landingpad { ptr, i32 }
          cleanup
  %437 = extractvalue { ptr, i32 } %436, 0
  store ptr %437, ptr %8, align 8
  %438 = extractvalue { ptr, i32 } %436, 1
  store i32 %438, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #8
  br label %457

439:                                              ; preds = %423
  %440 = load ptr, ptr @stdout, align 8, !tbaa !9
  %441 = invoke i32 @fflush(ptr noundef %440)
          to label %442 unwind label %447

442:                                              ; preds = %439
  %443 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  %444 = load i32, ptr %443, align 4, !tbaa !5
  %445 = icmp eq i32 %444, 50256
  br i1 %445, label %446, label %451

446:                                              ; preds = %442
  store i32 8, ptr %10, align 4
  br label %455

447:                                              ; preds = %439
  %448 = landingpad { ptr, i32 }
          cleanup
  %449 = extractvalue { ptr, i32 } %448, 0
  store ptr %449, ptr %8, align 8
  %450 = extractvalue { ptr, i32 } %448, 1
  store i32 %450, ptr %9, align 4
  br label %457

451:                                              ; preds = %442
  br label %452

452:                                              ; preds = %451
  %453 = load i64, ptr %37, align 8, !tbaa !11
  %454 = add i64 %453, 1
  store i64 %454, ptr %37, align 8, !tbaa !11
  br label %297, !llvm.loop !53

455:                                              ; preds = %446, %330, %305
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  %456 = load i32, ptr %10, align 4
  switch i32 %456, label %556 [
    i32 8, label %458
  ]

457:                                              ; preds = %447, %435, %400, %382, %319
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #8
  br label %557

458:                                              ; preds = %455
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #8
  %459 = invoke i64 @ggml_time_us()
          to label %460 unwind label %514

460:                                              ; preds = %458
  store i64 %459, ptr %50, align 8, !tbaa !11
  %461 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.88)
          to label %462 unwind label %514

462:                                              ; preds = %460
  %463 = load i64, ptr %13, align 8, !tbaa !11
  %464 = sitofp i64 %463 to float
  %465 = fdiv float %464, 1.000000e+03
  %466 = fpext float %465 to double
  %467 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.91, ptr noundef @__func__.main, double noundef %466)
          to label %468 unwind label %514

468:                                              ; preds = %462
  %469 = load i64, ptr %28, align 8, !tbaa !11
  %470 = sitofp i64 %469 to float
  %471 = fdiv float %470, 1.000000e+03
  %472 = fpext float %471 to double
  %473 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.92, ptr noundef @__func__.main, double noundef %472)
          to label %474 unwind label %514

474:                                              ; preds = %468
  %475 = load i64, ptr %29, align 8, !tbaa !11
  %476 = sitofp i64 %475 to float
  %477 = fdiv float %476, 1.000000e+03
  %478 = fpext float %477 to double
  %479 = load i64, ptr %29, align 8, !tbaa !11
  %480 = sitofp i64 %479 to float
  %481 = fdiv float %480, 1.000000e+03
  %482 = load i32, ptr %27, align 4, !tbaa !5
  %483 = sitofp i32 %482 to float
  %484 = fdiv float %481, %483
  %485 = fpext float %484 to double
  %486 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.93, ptr noundef @__func__.main, double noundef %478, double noundef %485)
          to label %487 unwind label %514

487:                                              ; preds = %474
  %488 = load i64, ptr %50, align 8, !tbaa !11
  %489 = load i64, ptr %6, align 8, !tbaa !11
  %490 = sub nsw i64 %488, %489
  %491 = sitofp i64 %490 to float
  %492 = fdiv float %491, 1.000000e+03
  %493 = fpext float %492 to double
  %494 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.94, ptr noundef @__func__.main, double noundef %493)
          to label %495 unwind label %514

495:                                              ; preds = %487
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  %496 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 9
  %497 = load ptr, ptr %496, align 8, !tbaa !54
  invoke void @ggml_free(ptr noundef %497)
          to label %498 unwind label %518

498:                                              ; preds = %495
  %499 = load ptr, ptr %17, align 8, !tbaa !9
  invoke void @ggml_backend_sched_free(ptr noundef %499)
          to label %500 unwind label %518

500:                                              ; preds = %498
  %501 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 12
  %502 = load ptr, ptr %501, align 8, !tbaa !55
  invoke void @ggml_backend_buffer_free(ptr noundef %502)
          to label %503 unwind label %518

503:                                              ; preds = %500
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #8
  %504 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 11
  store ptr %504, ptr %51, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #8
  %505 = load ptr, ptr %51, align 8, !tbaa !9
  %506 = call ptr @_ZNSt6vectorIP19ggml_backend_bufferSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %505) #8
  %507 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.69", ptr %52, i32 0, i32 0
  store ptr %506, ptr %507, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %508 = load ptr, ptr %51, align 8, !tbaa !9
  %509 = call ptr @_ZNSt6vectorIP19ggml_backend_bufferSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %508) #8
  %510 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.69", ptr %53, i32 0, i32 0
  store ptr %509, ptr %510, align 8
  br label %511

511:                                              ; preds = %527, %503
  %512 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(8) %53) #8
  br i1 %512, label %522, label %513

513:                                              ; preds = %511
  store i32 16, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  br label %533

514:                                              ; preds = %487, %474, %468, %462, %460, %458
  %515 = landingpad { ptr, i32 }
          cleanup
  %516 = extractvalue { ptr, i32 } %515, 0
  store ptr %516, ptr %8, align 8
  %517 = extractvalue { ptr, i32 } %515, 1
  store i32 %517, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #8
  br label %557

518:                                              ; preds = %500, %498, %495
  %519 = landingpad { ptr, i32 }
          cleanup
  %520 = extractvalue { ptr, i32 } %519, 0
  store ptr %520, ptr %8, align 8
  %521 = extractvalue { ptr, i32 } %519, 1
  store i32 %521, ptr %9, align 4
  br label %557

522:                                              ; preds = %511
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #8
  %523 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %52) #8
  %524 = load ptr, ptr %523, align 8, !tbaa !9
  store ptr %524, ptr %54, align 8, !tbaa !9
  %525 = load ptr, ptr %54, align 8, !tbaa !9
  invoke void @ggml_backend_buffer_free(ptr noundef %525)
          to label %526 unwind label %529

526:                                              ; preds = %522
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  br label %527

527:                                              ; preds = %526
  %528 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %52) #8
  br label %511

529:                                              ; preds = %522
  %530 = landingpad { ptr, i32 }
          cleanup
  %531 = extractvalue { ptr, i32 } %530, 0
  store ptr %531, ptr %8, align 8
  %532 = extractvalue { ptr, i32 } %530, 1
  store i32 %532, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #8
  br label %557

533:                                              ; preds = %513
  call void @llvm.lifetime.start.p0(i64 8, ptr %55) #8
  %534 = getelementptr inbounds %struct.gpt2_model, ptr %15, i32 0, i32 10
  store ptr %534, ptr %55, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #8
  %535 = load ptr, ptr %55, align 8, !tbaa !9
  %536 = call ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %535) #8
  %537 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %56, i32 0, i32 0
  store ptr %536, ptr %537, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #8
  %538 = load ptr, ptr %55, align 8, !tbaa !9
  %539 = call ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %538) #8
  %540 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %57, i32 0, i32 0
  store ptr %539, ptr %540, align 8
  br label %541

541:                                              ; preds = %549, %533
  %542 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ggml_backendSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %57) #8
  br i1 %542, label %544, label %543

543:                                              ; preds = %541
  store i32 18, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #8
  br label %555

544:                                              ; preds = %541
  call void @llvm.lifetime.start.p0(i64 8, ptr %58) #8
  %545 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP12ggml_backendSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %56) #8
  %546 = load ptr, ptr %545, align 8, !tbaa !9
  store ptr %546, ptr %58, align 8, !tbaa !9
  %547 = load ptr, ptr %58, align 8, !tbaa !9
  invoke void @ggml_backend_free(ptr noundef %547)
          to label %548 unwind label %551

548:                                              ; preds = %544
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  br label %549

549:                                              ; preds = %548
  %550 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP12ggml_backendSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %56) #8
  br label %541

551:                                              ; preds = %544
  %552 = landingpad { ptr, i32 }
          cleanup
  %553 = extractvalue { ptr, i32 } %552, 0
  store ptr %553, ptr %8, align 8
  %554 = extractvalue { ptr, i32 } %552, 1
  store i32 %554, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %58) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %55) #8
  br label %557

555:                                              ; preds = %543
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %556

556:                                              ; preds = %555, %455
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #8
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %561

557:                                              ; preds = %551, %529, %518, %514, %457
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %36) #8
  br label %558

558:                                              ; preds = %557, %292, %270, %266
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  br label %559

559:                                              ; preds = %558, %262
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %560

560:                                              ; preds = %559, %261, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %562

561:                                              ; preds = %556, %127
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(248) %15) #8
  call void @llvm.lifetime.end.p0(i64 248, 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 %564

562:                                              ; preds = %560, %116
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(248) %15) #8
  call void @llvm.lifetime.end.p0(i64 248, 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 %563

563:                                              ; preds = %562, %101, %97
  call void @llvm.lifetime.end.p0(i64 5000, ptr %11) #8
  br label %566

564:                                              ; preds = %561, %69
  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
  %565 = load i32, ptr %3, align 4
  ret i32 %565

566:                                              ; preds = %563, %70
  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 %567

567:                                              ; preds = %566
  %568 = load ptr, ptr %8, align 8
  %569 = load i32, ptr %9, align 4
  %570 = insertvalue { ptr, i32 } poison, ptr %568, 0
  %571 = insertvalue { ptr, i32 } %570, i32 %569, 1
  resume { ptr, i32 } %571
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt2_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #5 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

declare ptr @ggml_backend_sched_new(ptr noundef, ptr noundef, i32 noundef, i64 noundef, i1 noundef zeroext) #3

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

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

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

; 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 @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), 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

declare zeroext i1 @ggml_backend_sched_reserve(ptr noundef, ptr noundef) #3

declare i64 @ggml_backend_sched_get_buffer_size(ptr noundef, ptr noundef) #3

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

; 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.53") align 8, ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

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

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

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

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

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

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

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

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

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

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

declare i32 @fflush(ptr noundef) #3

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

declare void @ggml_backend_sched_free(ptr noundef) #3

declare void @ggml_backend_buffer_free(ptr noundef) #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEdeEv(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_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare void @ggml_backend_free(ptr noundef) #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #5 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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTS10gpt_params", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !15, i64 28, !6, i64 32, !16, i64 36, !16, i64 40, !6, i64 44, !16, i64 48, !17, i64 56, !17, i64 88, !17, i64 120, !15, i64 152, !6, i64 156}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !18, i64 0, !12, i64 8, !7, i64 16}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!19 = !{!20, !6, i64 4}
!20 = !{!"_ZTS10gpt2_model", !21, i64 0, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !22, i64 72, !10, i64 96, !10, i64 104, !10, i64 112, !26, i64 120, !30, i64 144, !10, i64 168, !10, i64 176, !34, i64 184, !10, i64 232, !10, i64 240}
!21 = !{!"_ZTS12gpt2_hparams", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !16, i64 24}
!22 = !{!"_ZTSSt6vectorI10gpt2_layerSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI10gpt2_layerSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!26 = !{!"_ZTSSt6vectorIP12ggml_backendSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIP12ggml_backendSaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!30 = !{!"_ZTSSt6vectorIP19ggml_backend_bufferSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIP19ggml_backend_bufferSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP19ggml_backend_bufferSaIS1_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIP19ggml_backend_bufferSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!34 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !35, i64 0}
!35 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !36, i64 0}
!36 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !37, i64 0, !39, i64 8}
!37 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !38, i64 0}
!38 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!39 = !{!"_ZTSSt15_Rb_tree_header", !40, i64 0, !12, i64 32}
!40 = !{!"_ZTSSt18_Rb_tree_node_base", !41, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!41 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}
!44 = !{!14, !6, i64 8}
!45 = distinct !{!45, !43}
!46 = !{!14, !6, i64 32}
!47 = !{!14, !16, i64 36}
!48 = !{!16, !16, i64 0}
!49 = !{!14, !16, i64 40}
!50 = !{!20, !6, i64 0}
!51 = !{!14, !6, i64 16}
!52 = distinct !{!52, !43}
!53 = distinct !{!53, !43}
!54 = !{!20, !10, i64 112}
!55 = !{!20, !10, i64 168}


; 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.24", %"class.std::map.29", %"class.std::vector" }
%"class.std::map.24" = type { %"class.std::_Rb_tree.25" }
%"class.std::_Rb_tree.25" = 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.29" = type { %"class.std::_Rb_tree.30" }
%"class.std::_Rb_tree.30" = type { %"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const int, std::__cxx11::basic_string<char>>>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.gpt2_model = type { %struct.gpt2_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.3", ptr, ptr, ptr, %"class.std::vector.8", %"class.std::vector.13", ptr, ptr, %"class.std::map", ptr, ptr }
%struct.gpt2_hparams = type { i32, i32, i32, i32, i32, i32, float }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ggml_backend *, std::allocator<ggml_backend *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_Vector_impl" }
%"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ggml_backend_buffer *, std::allocator<ggml_backend_buffer *>>::_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.53" = type { %"struct.std::_Vector_base.54" }
%"struct.std::_Vector_base.54" = 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.55" = type { i8 }
%"class.std::vector.63" = type { %"struct.std::_Vector_base.64" }
%"struct.std::_Vector_base.64" = 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.__gnu_cxx::__normal_iterator.68" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.69" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.80 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [15 x i8], align 1
@__func__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.91 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [30 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocabRK10gpt_params(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EE3endEv(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_cxxneIPP12ggml_backendSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

declare ptr @ggml_backend_name(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z10gpt2_graphRK10gpt2_modeliRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(248), i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) 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

declare void @ggml_free(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modelP18ggml_backend_schediRKSt6vectorIiSaIiEERS4_IfSaIfEE(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #6 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.gpt_params, align 8
  %4 = alloca %"class.std::mersenne_twister_engine", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %struct.gpt_vocab, align 8
  %7 = alloca %struct.gpt2_model, align 8
  %8 = alloca %"class.std::vector.53", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::allocator.55", align 1
  %11 = alloca %"class.std::vector.63", align 8
  %12 = alloca %"class.std::vector.53", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::vector.53", align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.68", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.68", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.69", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.69", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  tail call void @ggml_time_init()
  %25 = 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)
  %26 = getelementptr inbounds i8, ptr %3, i64 56
  %27 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull @.str.80)
          to label %28 unwind label %31

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

30:                                               ; preds = %28
  br i1 %29, label %33, label %310

31:                                               ; preds = %28, %2
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %311

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

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

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

44:                                               ; preds = %39
  %45 = getelementptr inbounds i8, ptr %3, i64 88
  %46 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  br i1 %46, label %47, label %54

47:                                               ; preds = %44
  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 %48 unwind label %52

48:                                               ; preds = %47
  %49 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %45, 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 %54

50:                                               ; preds = %39
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %309

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

54:                                               ; preds = %48, %44
  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 248, ptr nonnull %7) #9
  call void @_ZN10gpt2_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(248) %7) #9
  %55 = invoke i64 @ggml_time_us()
          to label %56 unwind label %59

56:                                               ; preds = %54
  %57 = invoke noundef zeroext i1 @_Z15gpt2_model_loadRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEER10gpt2_modelR9gpt_vocabRK10gpt_params(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(248) %7, ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(160) %3)
          to label %58 unwind label %59

58:                                               ; preds = %56
  br i1 %57, label %61, label %65

59:                                               ; preds = %63, %61, %56, %54
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %308

61:                                               ; preds = %58
  %62 = invoke i64 @ggml_time_us()
          to label %63 unwind label %59

63:                                               ; preds = %61
  %64 = 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) %64)
          to label %69 unwind label %59

65:                                               ; preds = %58
  %66 = load ptr, ptr @stderr, align 8, !tbaa !16
  %67 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.82, ptr noundef nonnull @__func__.main, ptr noundef %67) #10
  br label %307

69:                                               ; preds = %63
  %70 = sub nsw i64 %62, %55
  %71 = getelementptr inbounds i8, ptr %7, i64 120
  %72 = call noundef ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  %73 = call noundef i64 @_ZNKSt6vectorIP12ggml_backendSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  %74 = trunc i64 %73 to i32
  %75 = invoke ptr @ggml_backend_sched_new(ptr noundef %72, ptr noundef null, i32 noundef %74, i64 noundef 4096, i1 noundef zeroext false)
          to label %76 unwind label %93

76:                                               ; preds = %69
  %77 = getelementptr inbounds i8, ptr %7, i64 4
  %78 = getelementptr inbounds i8, ptr %3, i64 16
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %77, ptr noundef nonnull align 4 dereferenceable(4) %78)
  %80 = load i32, ptr %79, align 4, !tbaa !17
  %81 = load i32, ptr %77, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  %82 = sext i32 %80 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #9
  store i32 0, ptr %9, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #9
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %82, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %83 unwind label %95

83:                                               ; preds = %76
  %84 = sub nsw i32 %81, %80
  %85 = invoke noundef ptr @_Z10gpt2_graphRK10gpt2_modeliRKSt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(248) %7, i32 noundef %84, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %86 unwind label %97

86:                                               ; preds = %83
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  %87 = invoke zeroext i1 @ggml_backend_sched_reserve(ptr noundef %75, ptr noundef %85)
          to label %.preheader135 unwind label %100

.preheader135:                                    ; preds = %86
  %88 = call noundef i64 @_ZNKSt6vectorIP12ggml_backendSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  %.not170 = icmp eq i64 %88, 0
  br i1 %.not170, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %118, %.preheader135
  %.085.lcssa = phi i64 [ 0, %.preheader135 ], [ %.186, %118 ]
  %89 = uitofp i64 %.085.lcssa to double
  %90 = fmul double %89, 0x3F50000000000000
  %91 = fmul double %90, 0x3F50000000000000
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.84, ptr noundef nonnull @__func__.main, double noundef %91)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #9
  call void @_ZNSt6vectorIfSaIfEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #9
  invoke void @_Z12gpt_tokenizeRK9gpt_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.53") align 8 %12, ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef nonnull align 8 dereferenceable(32) %45)
          to label %122 unwind label %150

93:                                               ; preds = %69
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %308

95:                                               ; preds = %76
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %99

97:                                               ; preds = %83
  %98 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #9
  br label %99

99:                                               ; preds = %97, %95
  %.pn = phi { ptr, i32 } [ %98, %97 ], [ %96, %95 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  br label %308

100:                                              ; preds = %86
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %308

.lr.ph:                                           ; preds = %.preheader135, %118
  %.085138 = phi i64 [ %.186, %118 ], [ 0, %.preheader135 ]
  %.088137 = phi i64 [ %119, %118 ], [ 0, %.preheader135 ]
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %.088137) #9
  %103 = load ptr, ptr %102, align 8, !tbaa !16
  %104 = invoke i64 @ggml_backend_sched_get_buffer_size(ptr noundef %75, ptr noundef %103)
          to label %105 unwind label %116

105:                                              ; preds = %.lr.ph
  %.not111 = icmp eq i64 %104, 0
  br i1 %.not111, label %118, label %106

106:                                              ; preds = %105
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %.088137) #9
  %108 = load ptr, ptr %107, align 8, !tbaa !16
  %109 = invoke ptr @ggml_backend_name(ptr noundef %108)
          to label %110 unwind label %116

110:                                              ; preds = %106
  %111 = add i64 %104, %.085138
  %112 = uitofp i64 %104 to double
  %113 = fmul double %112, 0x3F50000000000000
  %114 = fmul double %113, 0x3F50000000000000
  %115 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.83, ptr noundef nonnull @__func__.main, ptr noundef %109, double noundef %114)
  br label %118

116:                                              ; preds = %106, %.lr.ph
  %117 = landingpad { ptr, i32 }
          cleanup
  br label %308

118:                                              ; preds = %110, %105
  %.186 = phi i64 [ %111, %110 ], [ %.085138, %105 ]
  %119 = add nuw i64 %.088137, 1
  %120 = call noundef i64 @_ZNKSt6vectorIP12ggml_backendSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  %121 = icmp ult i64 %119, %120
  br i1 %121, label %.lr.ph, label %._crit_edge, !llvm.loop !41

122:                                              ; preds = %._crit_edge
  %123 = getelementptr inbounds i8, ptr %3, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #9
  %124 = load i32, ptr %77, align 4, !tbaa !18
  %125 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %126 = trunc i64 %125 to i32
  %127 = sub nsw i32 %124, %126
  store i32 %127, ptr %13, align 4, !tbaa !17
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %123, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %129 = load i32, ptr %128, align 4, !tbaa !17
  store i32 %129, ptr %123, align 8, !tbaa !43
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #9
  %130 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  %131 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.85, ptr noundef nonnull @__func__.main, ptr noundef %130)
  %132 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %133 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.86, ptr noundef nonnull @__func__.main, i64 noundef %132)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #9
  store i32 8, ptr %14, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  %134 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %15, align 4, !tbaa !17
  %136 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %137 = load i32, ptr %136, align 4, !tbaa !17
  %138 = icmp sgt i32 %137, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #9
  br i1 %138, label %.lr.ph141, label %._crit_edge142

._crit_edge142:                                   ; preds = %.lr.ph141, %122
  %139 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.88)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #9
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %140 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %141 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %142 = load i32, ptr %123, align 8, !tbaa !43
  %143 = sext i32 %142 to i64
  %144 = add i64 %141, %143
  %145 = icmp ult i64 %140, %144
  br i1 %145, label %.lr.ph155, label %._crit_edge156

.lr.ph155:                                        ; preds = %._crit_edge142
  %146 = getelementptr inbounds i8, ptr %3, i64 32
  %147 = getelementptr inbounds i8, ptr %3, i64 36
  %148 = getelementptr inbounds i8, ptr %3, i64 40
  %149 = getelementptr inbounds i8, ptr %6, i64 48
  br label %168

150:                                              ; preds = %._crit_edge
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %306

.lr.ph141:                                        ; preds = %122, %.lr.ph141
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph141 ], [ 0, %122 ]
  %152 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %indvars.iv) #9
  %153 = load i32, ptr %152, align 4, !tbaa !17
  %154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.87, i32 noundef %153)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #9
  store i32 8, ptr %14, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #9
  %155 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %156 = trunc i64 %155 to i32
  store i32 %156, ptr %15, align 4, !tbaa !17
  %157 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %158 = load i32, ptr %157, align 4, !tbaa !17
  %159 = sext i32 %158 to i64
  %160 = icmp slt i64 %indvars.iv.next, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #9
  br i1 %160, label %.lr.ph141, label %._crit_edge142, !llvm.loop !44

161:                                              ; preds = %._crit_edge149
  %162 = add i64 %.1100, 1
  %163 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %164 = load i32, ptr %123, align 8, !tbaa !43
  %165 = sext i32 %164 to i64
  %166 = add i64 %163, %165
  %167 = icmp ult i64 %162, %166
  br i1 %167, label %168, label %._crit_edge156.loopexit, !llvm.loop !45

168:                                              ; preds = %.lr.ph155, %161
  %.089153 = phi i32 [ 0, %.lr.ph155 ], [ %184, %161 ]
  %.091152 = phi i64 [ 0, %.lr.ph155 ], [ %.192, %161 ]
  %.094151 = phi i64 [ 0, %.lr.ph155 ], [ %.296, %161 ]
  %.099150 = phi i64 [ %140, %.lr.ph155 ], [ %162, %161 ]
  %169 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %.not = icmp eq i64 %169, 0
  br i1 %.not, label %181, label %170

170:                                              ; preds = %168
  %171 = invoke i64 @ggml_time_us()
          to label %172 unwind label %175

172:                                              ; preds = %170
  %173 = invoke noundef zeroext i1 @_Z9gpt2_evalRK10gpt2_modelP18ggml_backend_schediRKSt6vectorIiSaIiEERS4_IfSaIfEE(ptr noundef nonnull align 8 dereferenceable(248) %7, ptr noundef %75, i32 noundef %.089153, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %174 unwind label %175

174:                                              ; preds = %172
  br i1 %173, label %177, label %247

175:                                              ; preds = %177, %172, %170
  %176 = landingpad { ptr, i32 }
          cleanup
  br label %305

177:                                              ; preds = %174
  %178 = invoke i64 @ggml_time_us()
          to label %.thread122 unwind label %175

.thread122:                                       ; preds = %177
  %179 = sub i64 %.094151, %171
  %180 = add i64 %179, %178
  br label %181

181:                                              ; preds = %.thread122, %168
  %.296 = phi i64 [ %.094151, %168 ], [ %180, %.thread122 ]
  %182 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %183 = trunc i64 %182 to i32
  %184 = add i32 %.089153, %183
  call void @_ZNSt6vectorIiSaIiEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %185 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %.not103 = icmp ult i64 %.099150, %185
  br i1 %.not103, label %.preheader, label %188

.preheader:                                       ; preds = %181
  %186 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %187 = icmp ult i64 %.099150, %186
  br i1 %187, label %.lr.ph144, label %._crit_edge145

188:                                              ; preds = %181
  %189 = load i32, ptr %146, align 8, !tbaa !46
  %190 = load float, ptr %147, align 4, !tbaa !47
  %191 = load float, ptr %148, align 8, !tbaa !48
  %192 = load i32, ptr %7, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #9
  store i32 0, ptr %17, align 4, !tbaa !17
  %193 = invoke i64 @ggml_time_us()
          to label %194 unwind label %209

194:                                              ; preds = %188
  %195 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %196 = call noundef i64 @_ZNKSt6vectorIfSaIfEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  %197 = sext i32 %192 to i64
  %198 = sub i64 %196, %197
  %199 = getelementptr inbounds float, ptr %195, i64 %198
  %200 = fpext float %190 to double
  %201 = fpext float %191 to double
  %202 = invoke noundef i32 @_Z22gpt_sample_top_k_top_pRK9gpt_vocabPKfiddRSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EE(ptr noundef nonnull align 8 dereferenceable(120) %6, ptr noundef %199, i32 noundef %189, double noundef %200, double noundef %201, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %203 unwind label %209

203:                                              ; preds = %194
  store i32 %202, ptr %17, align 4, !tbaa !17
  %204 = invoke i64 @ggml_time_us()
          to label %205 unwind label %209

205:                                              ; preds = %203
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %206 unwind label %211

206:                                              ; preds = %205
  %207 = sub i64 %.091152, %193
  %208 = add i64 %207, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #9
  br label %228

209:                                              ; preds = %203, %194, %188
  %210 = landingpad { ptr, i32 }
          cleanup
  br label %213

211:                                              ; preds = %205
  %212 = landingpad { ptr, i32 }
          cleanup
  br label %213

213:                                              ; preds = %211, %209
  %.pn105 = phi { ptr, i32 } [ %212, %211 ], [ %210, %209 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #9
  br label %305

214:                                              ; preds = %219
  %215 = add nuw i64 %.087143, 1
  %216 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  %217 = icmp ult i64 %215, %216
  br i1 %217, label %.lr.ph144, label %._crit_edge145, !llvm.loop !50

.lr.ph144:                                        ; preds = %.preheader, %214
  %.087143 = phi i64 [ %215, %214 ], [ %.099150, %.preheader ]
  %218 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.087143) #9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 4 dereferenceable(4) %218)
          to label %219 unwind label %223

219:                                              ; preds = %.lr.ph144
  %220 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %221 = trunc i64 %220 to i32
  %222 = load i32, ptr %78, align 8, !tbaa !51
  %.not104 = icmp sgt i32 %222, %221
  br i1 %.not104, label %214, label %._crit_edge145

223:                                              ; preds = %.lr.ph144
  %224 = landingpad { ptr, i32 }
          cleanup
  br label %305

._crit_edge145:                                   ; preds = %214, %219, %.preheader
  %225 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %226 = add i64 %.099150, -1
  %227 = add i64 %226, %225
  br label %228

228:                                              ; preds = %._crit_edge145, %206
  %.1100 = phi i64 [ %.099150, %206 ], [ %227, %._crit_edge145 ]
  %.192 = phi i64 [ %208, %206 ], [ %.091152, %._crit_edge145 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %229 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  store ptr %229, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #9
  %230 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  store ptr %230, ptr %19, align 8
  %231 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br i1 %231, label %.lr.ph148, label %._crit_edge149

._crit_edge149:                                   ; preds = %240, %228
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  %232 = load ptr, ptr @stdout, align 8, !tbaa !16
  %233 = call i32 @fflush(ptr noundef %232)
  %234 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  %235 = load i32, ptr %234, align 4, !tbaa !17
  %236 = icmp eq i32 %235, 50256
  br i1 %236, label %._crit_edge156.loopexit, label %161

.lr.ph148:                                        ; preds = %228, %240
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #9
  %237 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  %238 = load i32, ptr %237, align 4, !tbaa !17
  store i32 %238, ptr %20, align 4, !tbaa !17
  %239 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIiESaISt4pairIKiS5_EEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %149, ptr noundef nonnull align 4 dereferenceable(4) %20)
          to label %240 unwind label %245

240:                                              ; preds = %.lr.ph148
  %241 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %239) #9
  %242 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.90, ptr noundef %241)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #9
  %243 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  %244 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br i1 %244, label %.lr.ph148, label %._crit_edge149

245:                                              ; preds = %.lr.ph148
  %246 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  br label %305

247:                                              ; preds = %174
  %248 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.89)
  br label %304

._crit_edge156.loopexit:                          ; preds = %161, %._crit_edge149
  %249 = sitofp i64 %.192 to float
  %250 = sitofp i64 %.296 to float
  %251 = sitofp i32 %184 to float
  br label %._crit_edge156

._crit_edge156:                                   ; preds = %._crit_edge156.loopexit, %._crit_edge142
  %.397.ph = phi float [ 0.000000e+00, %._crit_edge142 ], [ %250, %._crit_edge156.loopexit ]
  %.293.ph = phi float [ 0.000000e+00, %._crit_edge142 ], [ %249, %._crit_edge156.loopexit ]
  %.190.ph = phi float [ 0.000000e+00, %._crit_edge142 ], [ %251, %._crit_edge156.loopexit ]
  %252 = invoke i64 @ggml_time_us()
          to label %253 unwind label %286

253:                                              ; preds = %._crit_edge156
  %254 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.88)
  %255 = sitofp i64 %70 to float
  %256 = fdiv float %255, 1.000000e+03
  %257 = fpext float %256 to double
  %258 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.91, ptr noundef nonnull @__func__.main, double noundef %257)
  %259 = fdiv float %.293.ph, 1.000000e+03
  %260 = fpext float %259 to double
  %261 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.92, ptr noundef nonnull @__func__.main, double noundef %260)
  %262 = fdiv float %.397.ph, 1.000000e+03
  %263 = fpext float %262 to double
  %264 = fdiv float %262, %.190.ph
  %265 = fpext float %264 to double
  %266 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.93, ptr noundef nonnull @__func__.main, double noundef %263, double noundef %265)
  %267 = sub nsw i64 %252, %25
  %268 = sitofp i64 %267 to float
  %269 = fdiv float %268, 1.000000e+03
  %270 = fpext float %269 to double
  %271 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.94, ptr noundef nonnull @__func__.main, double noundef %270)
  %272 = getelementptr inbounds i8, ptr %7, i64 112
  %273 = load ptr, ptr %272, align 8, !tbaa !52
  invoke void @ggml_free(ptr noundef %273)
          to label %274 unwind label %288

274:                                              ; preds = %253
  invoke void @ggml_backend_sched_free(ptr noundef %75)
          to label %275 unwind label %288

275:                                              ; preds = %274
  %276 = getelementptr inbounds i8, ptr %7, i64 168
  %277 = load ptr, ptr %276, align 8, !tbaa !53
  invoke void @ggml_backend_buffer_free(ptr noundef %277)
          to label %278 unwind label %288

278:                                              ; preds = %275
  %279 = getelementptr inbounds i8, ptr %7, i64 144
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #9
  %280 = call ptr @_ZNSt6vectorIP19ggml_backend_bufferSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %279) #9
  store ptr %280, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #9
  %281 = call ptr @_ZNSt6vectorIP19ggml_backend_bufferSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %279) #9
  store ptr %281, ptr %22, align 8
  %282 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br i1 %282, label %.lr.ph165, label %._crit_edge166

._crit_edge166:                                   ; preds = %292, %278
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %23) #9
  %283 = call ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  store ptr %283, ptr %23, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #9
  %284 = call ptr @_ZNSt6vectorIP12ggml_backendSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #9
  store ptr %284, ptr %24, align 8
  %285 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ggml_backendSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  br i1 %285, label %.lr.ph168, label %._crit_edge169

286:                                              ; preds = %._crit_edge156
  %287 = landingpad { ptr, i32 }
          cleanup
  br label %305

288:                                              ; preds = %275, %274, %253
  %289 = landingpad { ptr, i32 }
          cleanup
  br label %305

.lr.ph165:                                        ; preds = %278, %292
  %290 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  %291 = load ptr, ptr %290, align 8, !tbaa !16
  invoke void @ggml_backend_buffer_free(ptr noundef %291)
          to label %292 unwind label %295

292:                                              ; preds = %.lr.ph165
  %293 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #9
  %294 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #9
  br i1 %294, label %.lr.ph165, label %._crit_edge166

295:                                              ; preds = %.lr.ph165
  %296 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #9
  br label %305

._crit_edge169:                                   ; preds = %299, %._crit_edge166
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #9
  br label %304

.lr.ph168:                                        ; preds = %._crit_edge166, %299
  %297 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP12ggml_backendSt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  %298 = load ptr, ptr %297, align 8, !tbaa !16
  invoke void @ggml_backend_free(ptr noundef %298)
          to label %299 unwind label %302

299:                                              ; preds = %.lr.ph168
  %300 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPP12ggml_backendSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  %301 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPP12ggml_backendSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  br i1 %301, label %.lr.ph168, label %._crit_edge169

302:                                              ; preds = %.lr.ph168
  %303 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %23) #9
  br label %305

304:                                              ; preds = %247, %._crit_edge169
  %.5 = phi i32 [ 0, %._crit_edge169 ], [ 1, %247 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  br label %307

305:                                              ; preds = %175, %213, %223, %245, %302, %295, %288, %286
  %.pn107.pn = phi { ptr, i32 } [ %296, %295 ], [ %303, %302 ], [ %289, %288 ], [ %287, %286 ], [ %246, %245 ], [ %.pn105, %213 ], [ %224, %223 ], [ %176, %175 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #9
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  br label %306

306:                                              ; preds = %305, %150
  %.pn107.pn.pn = phi { ptr, i32 } [ %.pn107.pn, %305 ], [ %151, %150 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #9
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  br label %308

307:                                              ; preds = %65, %304
  %.6 = phi i32 [ %.5, %304 ], [ 1, %65 ]
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(248) %7) #9
  call void @llvm.lifetime.end.p0(i64 248, 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 %310

308:                                              ; preds = %93, %306, %116, %100, %99, %59
  %.pn112.pn.pn = phi { ptr, i32 } [ %60, %59 ], [ %.pn107.pn.pn, %306 ], [ %94, %93 ], [ %117, %116 ], [ %101, %100 ], [ %.pn, %99 ]
  call void @_ZN10gpt2_modelD2Ev(ptr noundef nonnull align 8 dereferenceable(248) %7) #9
  call void @llvm.lifetime.end.p0(i64 248, 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 %309

309:                                              ; preds = %308, %52, %50
  %.pn112.pn.pn.pn = phi { ptr, i32 } [ %.pn112.pn.pn, %308 ], [ %53, %52 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #9
  br label %311

310:                                              ; preds = %30, %307
  %.7 = phi i32 [ %.6, %307 ], [ 1, %30 ]
  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

311:                                              ; preds = %309, %31
  %.pn112.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn112.pn.pn.pn, %309 ], [ %32, %31 ]
  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 } %.pn112.pn.pn.pn.pn
}

declare void @ggml_time_init() local_unnamed_addr #5

declare i64 @ggml_time_us() local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10gpt_paramsC2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #7 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 #5

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

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

; 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 #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt2_modelC2Ev(ptr noundef nonnull align 8 dereferenceable(248)) unnamed_addr #4 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 #5

declare ptr @ggml_backend_sched_new(ptr noundef, ptr noundef, i32 noundef, i64 noundef, i1 noundef zeroext) local_unnamed_addr #5

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

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

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

; 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 @_ZNSt6vectorIiSaIiEEC2EmRKiRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 4 dereferenceable(4), 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

declare zeroext i1 @ggml_backend_sched_reserve(ptr noundef, ptr noundef) local_unnamed_addr #5

declare i64 @ggml_backend_sched_get_buffer_size(ptr noundef, ptr noundef) local_unnamed_addr #5

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

; 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.53") align 8, ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_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 #5

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

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

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

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

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

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

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

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

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

declare void @ggml_backend_sched_free(ptr noundef) local_unnamed_addr #5

declare void @ggml_backend_buffer_free(ptr noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIP19ggml_backend_bufferSaIS1_EE3endEv(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_cxxneIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEdeEv(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_iteratorIPP19ggml_backend_bufferSt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare void @ggml_backend_free(ptr noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10gpt_paramsD2Ev(ptr noundef nonnull align 8 dereferenceable(160)) unnamed_addr #4 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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { 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 #7 = { 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 #8 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { 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 = !{!7, !7, i64 0}
!18 = !{!19, !7, i64 4}
!19 = !{!"_ZTS10gpt2_model", !20, i64 0, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !21, i64 72, !14, i64 96, !14, i64 104, !14, i64 112, !25, i64 120, !29, i64 144, !14, i64 168, !14, i64 176, !33, i64 184, !14, i64 232, !14, i64 240}
!20 = !{!"_ZTS12gpt2_hparams", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !11, i64 24}
!21 = !{!"_ZTSSt6vectorI10gpt2_layerSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseI10gpt2_layerSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!25 = !{!"_ZTSSt6vectorIP12ggml_backendSaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIP12ggml_backendSaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIP12ggml_backendSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!29 = !{!"_ZTSSt6vectorIP19ggml_backend_bufferSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIP19ggml_backend_bufferSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIP19ggml_backend_bufferSaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIP19ggml_backend_bufferSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!33 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !34, i64 0}
!34 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !35, i64 0}
!35 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !36, i64 0, !38, i64 8}
!36 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !37, i64 0}
!37 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!38 = !{!"_ZTSSt15_Rb_tree_header", !39, i64 0, !15, i64 32}
!39 = !{!"_ZTSSt18_Rb_tree_node_base", !40, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!40 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!6, !7, i64 8}
!44 = distinct !{!44, !42}
!45 = distinct !{!45, !42}
!46 = !{!6, !7, i64 32}
!47 = !{!6, !11, i64 36}
!48 = !{!6, !11, i64 40}
!49 = !{!19, !7, i64 0}
!50 = distinct !{!50, !42}
!51 = !{!6, !7, i64 16}
!52 = !{!19, !14, i64 112}
!53 = !{!19, !14, i64 168}


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