; LLVM IR from ggml-org/ggml :: examples/gpt-2/main-alloc.ll (Z10gpt2_graphRK10gpt2_modelii)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ggml_init_params = type { i64, ptr, i8 }
%"class.std::allocator.27" = type { i8 }
%struct.gpt2_model = type { %struct.gpt2_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.4", ptr, ptr, ptr, %"class.std::map" }
%struct.gpt2_hparams = type { i32, i32, i32, i32, i32, i32, float }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gpt2_layer, std::allocator<gpt2_layer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%struct.gpt2_layer = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ggml_tensor = type { i32, ptr, [4 x i64], [4 x i64], i32, [16 x i32], i32, [10 x ptr], ptr, i64, ptr, [64 x i8], ptr, [8 x i8] }

@__dso_handle = external hidden global i8
@_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size = external hidden global i64, align 8
@_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size = external hidden global i64, align 8
@_ZZ10gpt2_graphRK10gpt2_modeliiE3buf = external hidden global %"class.std::vector.25", align 8
@_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf = external hidden global i64, align 8
@.str.39 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [7 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #1

declare ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8) #2

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

declare ptr @ggml_new_tensor_1d(ptr noundef, i32 noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z10gpt2_graphRK10gpt2_modelii(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1, i32 noundef %2) #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::allocator.27", align 1
  %16 = alloca %struct.ggml_init_params, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.ggml_init_params, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #1
  %40 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %40, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #1
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.gpt2_model, ptr %41, i32 0, i32 0
  store ptr %42, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #1
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.gpt2_hparams, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !11
  store i32 %45, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #1
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.gpt2_hparams, ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 4, !tbaa !14
  store i32 %48, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #1
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.gpt2_hparams, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 4, !tbaa !15
  store i32 %51, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #1
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.gpt2_hparams, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 4, !tbaa !16
  store i32 %54, ptr %12, align 4, !tbaa !9
  %55 = load atomic i8, ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size acquire, align 8
  %56 = icmp eq i8 %55, 0
  br i1 %56, label %57, label %67, !prof !17

57:                                               ; preds = %3
  %58 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size) #1
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %67

60:                                               ; preds = %57
  %61 = invoke i64 @ggml_tensor_overhead()
          to label %62 unwind label %119

62:                                               ; preds = %60
  %63 = mul i64 %61, 2048
  %64 = invoke i64 @ggml_graph_overhead()
          to label %65 unwind label %119

65:                                               ; preds = %62
  %66 = add i64 %63, %64
  store i64 %66, ptr @_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size, align 8, !tbaa !18
  call void @__cxa_guard_release(ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size) #1
  br label %67

67:                                               ; preds = %65, %57, %3
  %68 = load atomic i8, ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf acquire, align 8
  %69 = icmp eq i8 %68, 0
  br i1 %69, label %70, label %77, !prof !17

70:                                               ; preds = %67
  %71 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf) #1
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %77

73:                                               ; preds = %70
  %74 = load i64, ptr @_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #1
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #1
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ10gpt2_graphRK10gpt2_modeliiE3buf, i64 noundef %74, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %75 unwind label %123

75:                                               ; preds = %73
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #1
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #1
  %76 = call i32 @__cxa_atexit(ptr @_ZNSt6vectorIhSaIhEED2Ev, ptr @_ZZ10gpt2_graphRK10gpt2_modeliiE3buf, ptr @__dso_handle) #1
  call void @__cxa_guard_release(ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf) #1
  br label %77

77:                                               ; preds = %75, %70, %67
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #1
  %78 = getelementptr inbounds %struct.ggml_init_params, ptr %16, i32 0, i32 0
  %79 = load i64, ptr @_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size, align 8, !tbaa !18
  store i64 %79, ptr %78, align 8, !tbaa !20
  %80 = getelementptr inbounds %struct.ggml_init_params, ptr %16, i32 0, i32 1
  %81 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ10gpt2_graphRK10gpt2_modeliiE3buf) #1
  store ptr %81, ptr %80, align 8, !tbaa !23
  %82 = getelementptr inbounds %struct.ggml_init_params, ptr %16, i32 0, i32 2
  store i8 1, ptr %82, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %16, i64 24, i1 false), !tbaa.struct !25
  %83 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %18)
  store ptr %83, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #1
  %84 = load ptr, ptr %17, align 8, !tbaa !5
  %85 = call ptr @ggml_new_graph(ptr noundef %84)
  store ptr %85, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #1
  %86 = load ptr, ptr %17, align 8, !tbaa !5
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = call ptr @ggml_new_tensor_1d(ptr noundef %86, i32 noundef 26, i64 noundef %88)
  store ptr %89, ptr %20, align 8, !tbaa !5
  %90 = load ptr, ptr %20, align 8, !tbaa !5
  %91 = call ptr @ggml_set_name(ptr noundef %90, ptr noundef @.str.39)
  %92 = load ptr, ptr %20, align 8, !tbaa !5
  call void @ggml_set_input(ptr noundef %92)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #1
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = call ptr @ggml_new_tensor_1d(ptr noundef %93, i32 noundef 26, i64 noundef %95)
  store ptr %96, ptr %21, align 8, !tbaa !5
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = call ptr @ggml_set_name(ptr noundef %97, ptr noundef @.str.40)
  %99 = load ptr, ptr %21, align 8, !tbaa !5
  call void @ggml_set_input(ptr noundef %99)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #1
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.gpt2_model, ptr %102, i32 0, i32 3
  %104 = load ptr, ptr %103, align 8, !tbaa !27
  %105 = load ptr, ptr %20, align 8, !tbaa !5
  %106 = call ptr @ggml_get_rows(ptr noundef %101, ptr noundef %104, ptr noundef %105)
  %107 = load ptr, ptr %17, align 8, !tbaa !5
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.gpt2_model, ptr %108, i32 0, i32 4
  %110 = load ptr, ptr %109, align 8, !tbaa !41
  %111 = load ptr, ptr %21, align 8, !tbaa !5
  %112 = call ptr @ggml_get_rows(ptr noundef %107, ptr noundef %110, ptr noundef %111)
  %113 = call ptr @ggml_add(ptr noundef %100, ptr noundef %106, ptr noundef %112)
  store ptr %113, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #1
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %530, %77
  %115 = load i32, ptr %23, align 4, !tbaa !9
  %116 = load i32, ptr %10, align 4, !tbaa !9
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %127, label %118

118:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #1
  br label %533

119:                                              ; preds = %62, %60
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %13, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %14, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size) #1
  br label %570

123:                                              ; preds = %73
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %13, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #1
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #1
  call void @__cxa_guard_abort(ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf) #1
  br label %570

127:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #1
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = load ptr, ptr %22, align 8, !tbaa !5
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.gpt2_hparams, ptr %130, i32 0, i32 6
  %132 = load float, ptr %131, align 4, !tbaa !42
  %133 = call ptr @ggml_norm(ptr noundef %128, ptr noundef %129, float noundef %132)
  store ptr %133, ptr %24, align 8, !tbaa !5
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = load ptr, ptr %17, align 8, !tbaa !5
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.gpt2_model, ptr %137, i32 0, i32 6
  %139 = load i32, ptr %23, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %138, i64 noundef %140) #1
  %142 = getelementptr inbounds %struct.gpt2_layer, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !43
  %144 = load ptr, ptr %24, align 8, !tbaa !5
  %145 = call ptr @ggml_repeat(ptr noundef %136, ptr noundef %143, ptr noundef %144)
  %146 = load ptr, ptr %24, align 8, !tbaa !5
  %147 = call ptr @ggml_mul(ptr noundef %135, ptr noundef %145, ptr noundef %146)
  %148 = load ptr, ptr %17, align 8, !tbaa !5
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.gpt2_model, ptr %149, i32 0, i32 6
  %151 = load i32, ptr %23, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %150, i64 noundef %152) #1
  %154 = getelementptr inbounds %struct.gpt2_layer, ptr %153, i32 0, i32 1
  %155 = load ptr, ptr %154, align 8, !tbaa !45
  %156 = load ptr, ptr %24, align 8, !tbaa !5
  %157 = call ptr @ggml_repeat(ptr noundef %148, ptr noundef %155, ptr noundef %156)
  %158 = call ptr @ggml_add(ptr noundef %134, ptr noundef %147, ptr noundef %157)
  store ptr %158, ptr %24, align 8, !tbaa !5
  %159 = load ptr, ptr %17, align 8, !tbaa !5
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.gpt2_model, ptr %160, i32 0, i32 6
  %162 = load i32, ptr %23, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %163) #1
  %165 = getelementptr inbounds %struct.gpt2_layer, ptr %164, i32 0, i32 4
  %166 = load ptr, ptr %165, align 8, !tbaa !46
  %167 = load ptr, ptr %24, align 8, !tbaa !5
  %168 = call ptr @ggml_mul_mat(ptr noundef %159, ptr noundef %166, ptr noundef %167)
  store ptr %168, ptr %24, align 8, !tbaa !5
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = load ptr, ptr %17, align 8, !tbaa !5
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.gpt2_model, ptr %171, i32 0, i32 6
  %173 = load i32, ptr %23, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %174) #1
  %176 = getelementptr inbounds %struct.gpt2_layer, ptr %175, i32 0, i32 5
  %177 = load ptr, ptr %176, align 8, !tbaa !47
  %178 = load ptr, ptr %24, align 8, !tbaa !5
  %179 = call ptr @ggml_repeat(ptr noundef %170, ptr noundef %177, ptr noundef %178)
  %180 = load ptr, ptr %24, align 8, !tbaa !5
  %181 = call ptr @ggml_add(ptr noundef %169, ptr noundef %179, ptr noundef %180)
  store ptr %181, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #1
  %182 = load ptr, ptr %17, align 8, !tbaa !5
  %183 = load ptr, ptr %24, align 8, !tbaa !5
  %184 = load i32, ptr %9, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = load i32, ptr %7, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = load ptr, ptr %24, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.ggml_tensor, ptr %188, i32 0, i32 3
  %190 = getelementptr inbounds [4 x i64], ptr %189, i64 0, i64 1
  %191 = load i64, ptr %190, align 8, !tbaa !18
  %192 = load i32, ptr %9, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = mul i64 0, %193
  %195 = call ptr @ggml_view_2d(ptr noundef %182, ptr noundef %183, i64 noundef %185, i64 noundef %187, i64 noundef %191, i64 noundef %194)
  store ptr %195, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #1
  %196 = load ptr, ptr %17, align 8, !tbaa !5
  %197 = load ptr, ptr %24, align 8, !tbaa !5
  %198 = load i32, ptr %9, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = load i32, ptr %7, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = load ptr, ptr %24, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.ggml_tensor, ptr %202, i32 0, i32 3
  %204 = getelementptr inbounds [4 x i64], ptr %203, i64 0, i64 1
  %205 = load i64, ptr %204, align 8, !tbaa !18
  %206 = load i32, ptr %9, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = mul i64 4, %207
  %209 = call ptr @ggml_view_2d(ptr noundef %196, ptr noundef %197, i64 noundef %199, i64 noundef %201, i64 noundef %205, i64 noundef %208)
  store ptr %209, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #1
  %210 = load ptr, ptr %17, align 8, !tbaa !5
  %211 = load ptr, ptr %24, align 8, !tbaa !5
  %212 = load i32, ptr %9, align 4, !tbaa !9
  %213 = sext i32 %212 to i64
  %214 = load i32, ptr %7, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = load ptr, ptr %24, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.ggml_tensor, ptr %216, i32 0, i32 3
  %218 = getelementptr inbounds [4 x i64], ptr %217, i64 0, i64 1
  %219 = load i64, ptr %218, align 8, !tbaa !18
  %220 = load i32, ptr %9, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = mul i64 8, %221
  %223 = call ptr @ggml_view_2d(ptr noundef %210, ptr noundef %211, i64 noundef %213, i64 noundef %215, i64 noundef %219, i64 noundef %222)
  store ptr %223, ptr %27, align 8, !tbaa !5
  %224 = load i32, ptr %7, align 4, !tbaa !9
  %225 = icmp sge i32 %224, 1
  br i1 %225, label %226, label %283

226:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #1
  %227 = load ptr, ptr %17, align 8, !tbaa !5
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.gpt2_model, ptr %228, i32 0, i32 7
  %230 = load ptr, ptr %229, align 8, !tbaa !48
  %231 = load i32, ptr %7, align 4, !tbaa !9
  %232 = load i32, ptr %9, align 4, !tbaa !9
  %233 = mul nsw i32 %231, %232
  %234 = sext i32 %233 to i64
  %235 = load ptr, ptr %4, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.gpt2_model, ptr %235, i32 0, i32 7
  %237 = load ptr, ptr %236, align 8, !tbaa !48
  %238 = call i64 @ggml_element_size(ptr noundef %237)
  %239 = load i32, ptr %9, align 4, !tbaa !9
  %240 = sext i32 %239 to i64
  %241 = mul i64 %238, %240
  %242 = load i32, ptr %23, align 4, !tbaa !9
  %243 = load i32, ptr %11, align 4, !tbaa !9
  %244 = mul nsw i32 %242, %243
  %245 = load i32, ptr %5, align 4, !tbaa !9
  %246 = add nsw i32 %244, %245
  %247 = sext i32 %246 to i64
  %248 = mul i64 %241, %247
  %249 = call ptr @ggml_view_1d(ptr noundef %227, ptr noundef %230, i64 noundef %234, i64 noundef %248)
  store ptr %249, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #1
  %250 = load ptr, ptr %17, align 8, !tbaa !5
  %251 = load ptr, ptr %4, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.gpt2_model, ptr %251, i32 0, i32 8
  %253 = load ptr, ptr %252, align 8, !tbaa !49
  %254 = load i32, ptr %7, align 4, !tbaa !9
  %255 = load i32, ptr %9, align 4, !tbaa !9
  %256 = mul nsw i32 %254, %255
  %257 = sext i32 %256 to i64
  %258 = load ptr, ptr %4, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.gpt2_model, ptr %258, i32 0, i32 8
  %260 = load ptr, ptr %259, align 8, !tbaa !49
  %261 = call i64 @ggml_element_size(ptr noundef %260)
  %262 = load i32, ptr %9, align 4, !tbaa !9
  %263 = sext i32 %262 to i64
  %264 = mul i64 %261, %263
  %265 = load i32, ptr %23, align 4, !tbaa !9
  %266 = load i32, ptr %11, align 4, !tbaa !9
  %267 = mul nsw i32 %265, %266
  %268 = load i32, ptr %5, align 4, !tbaa !9
  %269 = add nsw i32 %267, %268
  %270 = sext i32 %269 to i64
  %271 = mul i64 %264, %270
  %272 = call ptr @ggml_view_1d(ptr noundef %250, ptr noundef %253, i64 noundef %257, i64 noundef %271)
  store ptr %272, ptr %29, align 8, !tbaa !5
  %273 = load ptr, ptr %19, align 8, !tbaa !5
  %274 = load ptr, ptr %17, align 8, !tbaa !5
  %275 = load ptr, ptr %26, align 8, !tbaa !5
  %276 = load ptr, ptr %28, align 8, !tbaa !5
  %277 = call ptr @ggml_cpy(ptr noundef %274, ptr noundef %275, ptr noundef %276)
  call void @ggml_build_forward_expand(ptr noundef %273, ptr noundef %277)
  %278 = load ptr, ptr %19, align 8, !tbaa !5
  %279 = load ptr, ptr %17, align 8, !tbaa !5
  %280 = load ptr, ptr %27, align 8, !tbaa !5
  %281 = load ptr, ptr %29, align 8, !tbaa !5
  %282 = call ptr @ggml_cpy(ptr noundef %279, ptr noundef %280, ptr noundef %281)
  call void @ggml_build_forward_expand(ptr noundef %278, ptr noundef %282)
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #1
  br label %283

283:                                              ; preds = %226, %127
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #1
  %284 = load ptr, ptr %17, align 8, !tbaa !5
  %285 = load ptr, ptr %17, align 8, !tbaa !5
  %286 = load ptr, ptr %25, align 8, !tbaa !5
  %287 = load i32, ptr %9, align 4, !tbaa !9
  %288 = load i32, ptr %12, align 4, !tbaa !9
  %289 = sdiv i32 %287, %288
  %290 = sext i32 %289 to i64
  %291 = load i32, ptr %12, align 4, !tbaa !9
  %292 = sext i32 %291 to i64
  %293 = load i32, ptr %7, align 4, !tbaa !9
  %294 = sext i32 %293 to i64
  %295 = call ptr @ggml_cont_3d(ptr noundef %285, ptr noundef %286, i64 noundef %290, i64 noundef %292, i64 noundef %294)
  %296 = call ptr @ggml_permute(ptr noundef %284, ptr noundef %295, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  store ptr %296, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #1
  %297 = load ptr, ptr %17, align 8, !tbaa !5
  %298 = load ptr, ptr %17, align 8, !tbaa !5
  %299 = load ptr, ptr %17, align 8, !tbaa !5
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.gpt2_model, ptr %300, i32 0, i32 7
  %302 = load ptr, ptr %301, align 8, !tbaa !48
  %303 = load i32, ptr %5, align 4, !tbaa !9
  %304 = load i32, ptr %7, align 4, !tbaa !9
  %305 = add nsw i32 %303, %304
  %306 = load i32, ptr %9, align 4, !tbaa !9
  %307 = mul nsw i32 %305, %306
  %308 = sext i32 %307 to i64
  %309 = load i32, ptr %23, align 4, !tbaa !9
  %310 = load i32, ptr %11, align 4, !tbaa !9
  %311 = mul nsw i32 %309, %310
  %312 = sext i32 %311 to i64
  %313 = load ptr, ptr %4, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.gpt2_model, ptr %313, i32 0, i32 7
  %315 = load ptr, ptr %314, align 8, !tbaa !48
  %316 = call i64 @ggml_element_size(ptr noundef %315)
  %317 = mul i64 %312, %316
  %318 = load i32, ptr %9, align 4, !tbaa !9
  %319 = sext i32 %318 to i64
  %320 = mul i64 %317, %319
  %321 = call ptr @ggml_view_1d(ptr noundef %299, ptr noundef %302, i64 noundef %308, i64 noundef %320)
  %322 = load i32, ptr %9, align 4, !tbaa !9
  %323 = load i32, ptr %12, align 4, !tbaa !9
  %324 = sdiv i32 %322, %323
  %325 = sext i32 %324 to i64
  %326 = load i32, ptr %12, align 4, !tbaa !9
  %327 = sext i32 %326 to i64
  %328 = load i32, ptr %5, align 4, !tbaa !9
  %329 = load i32, ptr %7, align 4, !tbaa !9
  %330 = add nsw i32 %328, %329
  %331 = sext i32 %330 to i64
  %332 = call ptr @ggml_reshape_3d(ptr noundef %298, ptr noundef %321, i64 noundef %325, i64 noundef %327, i64 noundef %331)
  %333 = call ptr @ggml_permute(ptr noundef %297, ptr noundef %332, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  store ptr %333, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #1
  %334 = load ptr, ptr %17, align 8, !tbaa !5
  %335 = load ptr, ptr %31, align 8, !tbaa !5
  %336 = load ptr, ptr %30, align 8, !tbaa !5
  %337 = call ptr @ggml_mul_mat(ptr noundef %334, ptr noundef %335, ptr noundef %336)
  store ptr %337, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #1
  %338 = load ptr, ptr %17, align 8, !tbaa !5
  %339 = load ptr, ptr %32, align 8, !tbaa !5
  %340 = load i32, ptr %9, align 4, !tbaa !9
  %341 = sitofp i32 %340 to float
  %342 = load i32, ptr %12, align 4, !tbaa !9
  %343 = sitofp i32 %342 to float
  %344 = fdiv float %341, %343
  %345 = call float @sqrtf(float noundef %344) #1
  %346 = fdiv float 1.000000e+00, %345
  %347 = call ptr @ggml_scale(ptr noundef %338, ptr noundef %339, float noundef %346)
  store ptr %347, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #1
  %348 = load ptr, ptr %17, align 8, !tbaa !5
  %349 = load ptr, ptr %33, align 8, !tbaa !5
  %350 = load i32, ptr %5, align 4, !tbaa !9
  %351 = call ptr @ggml_diag_mask_inf(ptr noundef %348, ptr noundef %349, i32 noundef %350)
  store ptr %351, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #1
  %352 = load ptr, ptr %17, align 8, !tbaa !5
  %353 = load ptr, ptr %34, align 8, !tbaa !5
  %354 = call ptr @ggml_soft_max(ptr noundef %352, ptr noundef %353)
  store ptr %354, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #1
  %355 = load ptr, ptr %17, align 8, !tbaa !5
  %356 = load ptr, ptr %17, align 8, !tbaa !5
  %357 = load ptr, ptr %17, align 8, !tbaa !5
  %358 = load ptr, ptr %17, align 8, !tbaa !5
  %359 = load ptr, ptr %4, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.gpt2_model, ptr %359, i32 0, i32 8
  %361 = load ptr, ptr %360, align 8, !tbaa !49
  %362 = load i32, ptr %5, align 4, !tbaa !9
  %363 = load i32, ptr %7, align 4, !tbaa !9
  %364 = add nsw i32 %362, %363
  %365 = load i32, ptr %9, align 4, !tbaa !9
  %366 = mul nsw i32 %364, %365
  %367 = sext i32 %366 to i64
  %368 = load i32, ptr %23, align 4, !tbaa !9
  %369 = load i32, ptr %11, align 4, !tbaa !9
  %370 = mul nsw i32 %368, %369
  %371 = sext i32 %370 to i64
  %372 = load ptr, ptr %4, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct.gpt2_model, ptr %372, i32 0, i32 8
  %374 = load ptr, ptr %373, align 8, !tbaa !49
  %375 = call i64 @ggml_element_size(ptr noundef %374)
  %376 = mul i64 %371, %375
  %377 = load i32, ptr %9, align 4, !tbaa !9
  %378 = sext i32 %377 to i64
  %379 = mul i64 %376, %378
  %380 = call ptr @ggml_view_1d(ptr noundef %358, ptr noundef %361, i64 noundef %367, i64 noundef %379)
  %381 = load i32, ptr %9, align 4, !tbaa !9
  %382 = load i32, ptr %12, align 4, !tbaa !9
  %383 = sdiv i32 %381, %382
  %384 = sext i32 %383 to i64
  %385 = load i32, ptr %12, align 4, !tbaa !9
  %386 = sext i32 %385 to i64
  %387 = load i32, ptr %5, align 4, !tbaa !9
  %388 = load i32, ptr %7, align 4, !tbaa !9
  %389 = add nsw i32 %387, %388
  %390 = sext i32 %389 to i64
  %391 = call ptr @ggml_reshape_3d(ptr noundef %357, ptr noundef %380, i64 noundef %384, i64 noundef %386, i64 noundef %390)
  %392 = call ptr @ggml_permute(ptr noundef %356, ptr noundef %391, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 3)
  %393 = load i32, ptr %5, align 4, !tbaa !9
  %394 = load i32, ptr %7, align 4, !tbaa !9
  %395 = add nsw i32 %393, %394
  %396 = sext i32 %395 to i64
  %397 = load i32, ptr %9, align 4, !tbaa !9
  %398 = load i32, ptr %12, align 4, !tbaa !9
  %399 = sdiv i32 %397, %398
  %400 = sext i32 %399 to i64
  %401 = load i32, ptr %12, align 4, !tbaa !9
  %402 = sext i32 %401 to i64
  %403 = call ptr @ggml_cont_3d(ptr noundef %355, ptr noundef %392, i64 noundef %396, i64 noundef %400, i64 noundef %402)
  store ptr %403, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #1
  %404 = load ptr, ptr %17, align 8, !tbaa !5
  %405 = load ptr, ptr %36, align 8, !tbaa !5
  %406 = load ptr, ptr %35, align 8, !tbaa !5
  %407 = call ptr @ggml_mul_mat(ptr noundef %404, ptr noundef %405, ptr noundef %406)
  store ptr %407, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #1
  %408 = load ptr, ptr %17, align 8, !tbaa !5
  %409 = load ptr, ptr %37, align 8, !tbaa !5
  %410 = call ptr @ggml_permute(ptr noundef %408, ptr noundef %409, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  store ptr %410, ptr %38, align 8, !tbaa !5
  %411 = load ptr, ptr %17, align 8, !tbaa !5
  %412 = load ptr, ptr %38, align 8, !tbaa !5
  %413 = load i32, ptr %9, align 4, !tbaa !9
  %414 = sext i32 %413 to i64
  %415 = load i32, ptr %7, align 4, !tbaa !9
  %416 = sext i32 %415 to i64
  %417 = call ptr @ggml_cont_2d(ptr noundef %411, ptr noundef %412, i64 noundef %414, i64 noundef %416)
  store ptr %417, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #1
  %418 = load ptr, ptr %17, align 8, !tbaa !5
  %419 = load ptr, ptr %4, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.gpt2_model, ptr %419, i32 0, i32 6
  %421 = load i32, ptr %23, align 4, !tbaa !9
  %422 = sext i32 %421 to i64
  %423 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %420, i64 noundef %422) #1
  %424 = getelementptr inbounds %struct.gpt2_layer, ptr %423, i32 0, i32 6
  %425 = load ptr, ptr %424, align 8, !tbaa !50
  %426 = load ptr, ptr %24, align 8, !tbaa !5
  %427 = call ptr @ggml_mul_mat(ptr noundef %418, ptr noundef %425, ptr noundef %426)
  store ptr %427, ptr %24, align 8, !tbaa !5
  %428 = load ptr, ptr %17, align 8, !tbaa !5
  %429 = load ptr, ptr %17, align 8, !tbaa !5
  %430 = load ptr, ptr %4, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct.gpt2_model, ptr %430, i32 0, i32 6
  %432 = load i32, ptr %23, align 4, !tbaa !9
  %433 = sext i32 %432 to i64
  %434 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %431, i64 noundef %433) #1
  %435 = getelementptr inbounds %struct.gpt2_layer, ptr %434, i32 0, i32 7
  %436 = load ptr, ptr %435, align 8, !tbaa !51
  %437 = load ptr, ptr %24, align 8, !tbaa !5
  %438 = call ptr @ggml_repeat(ptr noundef %429, ptr noundef %436, ptr noundef %437)
  %439 = load ptr, ptr %24, align 8, !tbaa !5
  %440 = call ptr @ggml_add(ptr noundef %428, ptr noundef %438, ptr noundef %439)
  store ptr %440, ptr %24, align 8, !tbaa !5
  %441 = load ptr, ptr %17, align 8, !tbaa !5
  %442 = load ptr, ptr %24, align 8, !tbaa !5
  %443 = load ptr, ptr %22, align 8, !tbaa !5
  %444 = call ptr @ggml_add(ptr noundef %441, ptr noundef %442, ptr noundef %443)
  store ptr %444, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #1
  %445 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %445, ptr %39, align 8, !tbaa !5
  %446 = load ptr, ptr %17, align 8, !tbaa !5
  %447 = load ptr, ptr %39, align 8, !tbaa !5
  %448 = load ptr, ptr %8, align 8, !tbaa !5
  %449 = getelementptr inbounds %struct.gpt2_hparams, ptr %448, i32 0, i32 6
  %450 = load float, ptr %449, align 4, !tbaa !42
  %451 = call ptr @ggml_norm(ptr noundef %446, ptr noundef %447, float noundef %450)
  store ptr %451, ptr %24, align 8, !tbaa !5
  %452 = load ptr, ptr %17, align 8, !tbaa !5
  %453 = load ptr, ptr %17, align 8, !tbaa !5
  %454 = load ptr, ptr %17, align 8, !tbaa !5
  %455 = load ptr, ptr %4, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct.gpt2_model, ptr %455, i32 0, i32 6
  %457 = load i32, ptr %23, align 4, !tbaa !9
  %458 = sext i32 %457 to i64
  %459 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %456, i64 noundef %458) #1
  %460 = getelementptr inbounds %struct.gpt2_layer, ptr %459, i32 0, i32 2
  %461 = load ptr, ptr %460, align 8, !tbaa !52
  %462 = load ptr, ptr %24, align 8, !tbaa !5
  %463 = call ptr @ggml_repeat(ptr noundef %454, ptr noundef %461, ptr noundef %462)
  %464 = load ptr, ptr %24, align 8, !tbaa !5
  %465 = call ptr @ggml_mul(ptr noundef %453, ptr noundef %463, ptr noundef %464)
  %466 = load ptr, ptr %17, align 8, !tbaa !5
  %467 = load ptr, ptr %4, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct.gpt2_model, ptr %467, i32 0, i32 6
  %469 = load i32, ptr %23, align 4, !tbaa !9
  %470 = sext i32 %469 to i64
  %471 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %468, i64 noundef %470) #1
  %472 = getelementptr inbounds %struct.gpt2_layer, ptr %471, i32 0, i32 3
  %473 = load ptr, ptr %472, align 8, !tbaa !53
  %474 = load ptr, ptr %24, align 8, !tbaa !5
  %475 = call ptr @ggml_repeat(ptr noundef %466, ptr noundef %473, ptr noundef %474)
  %476 = call ptr @ggml_add(ptr noundef %452, ptr noundef %465, ptr noundef %475)
  store ptr %476, ptr %24, align 8, !tbaa !5
  %477 = load ptr, ptr %17, align 8, !tbaa !5
  %478 = load ptr, ptr %4, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.gpt2_model, ptr %478, i32 0, i32 6
  %480 = load i32, ptr %23, align 4, !tbaa !9
  %481 = sext i32 %480 to i64
  %482 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %479, i64 noundef %481) #1
  %483 = getelementptr inbounds %struct.gpt2_layer, ptr %482, i32 0, i32 8
  %484 = load ptr, ptr %483, align 8, !tbaa !54
  %485 = load ptr, ptr %24, align 8, !tbaa !5
  %486 = call ptr @ggml_mul_mat(ptr noundef %477, ptr noundef %484, ptr noundef %485)
  store ptr %486, ptr %24, align 8, !tbaa !5
  %487 = load ptr, ptr %17, align 8, !tbaa !5
  %488 = load ptr, ptr %17, align 8, !tbaa !5
  %489 = load ptr, ptr %4, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.gpt2_model, ptr %489, i32 0, i32 6
  %491 = load i32, ptr %23, align 4, !tbaa !9
  %492 = sext i32 %491 to i64
  %493 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %490, i64 noundef %492) #1
  %494 = getelementptr inbounds %struct.gpt2_layer, ptr %493, i32 0, i32 9
  %495 = load ptr, ptr %494, align 8, !tbaa !55
  %496 = load ptr, ptr %24, align 8, !tbaa !5
  %497 = call ptr @ggml_repeat(ptr noundef %488, ptr noundef %495, ptr noundef %496)
  %498 = load ptr, ptr %24, align 8, !tbaa !5
  %499 = call ptr @ggml_add(ptr noundef %487, ptr noundef %497, ptr noundef %498)
  store ptr %499, ptr %24, align 8, !tbaa !5
  %500 = load ptr, ptr %17, align 8, !tbaa !5
  %501 = load ptr, ptr %24, align 8, !tbaa !5
  %502 = call ptr @ggml_gelu(ptr noundef %500, ptr noundef %501)
  store ptr %502, ptr %24, align 8, !tbaa !5
  %503 = load ptr, ptr %17, align 8, !tbaa !5
  %504 = load ptr, ptr %4, align 8, !tbaa !5
  %505 = getelementptr inbounds %struct.gpt2_model, ptr %504, i32 0, i32 6
  %506 = load i32, ptr %23, align 4, !tbaa !9
  %507 = sext i32 %506 to i64
  %508 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %505, i64 noundef %507) #1
  %509 = getelementptr inbounds %struct.gpt2_layer, ptr %508, i32 0, i32 10
  %510 = load ptr, ptr %509, align 8, !tbaa !56
  %511 = load ptr, ptr %24, align 8, !tbaa !5
  %512 = call ptr @ggml_mul_mat(ptr noundef %503, ptr noundef %510, ptr noundef %511)
  store ptr %512, ptr %24, align 8, !tbaa !5
  %513 = load ptr, ptr %17, align 8, !tbaa !5
  %514 = load ptr, ptr %17, align 8, !tbaa !5
  %515 = load ptr, ptr %4, align 8, !tbaa !5
  %516 = getelementptr inbounds %struct.gpt2_model, ptr %515, i32 0, i32 6
  %517 = load i32, ptr %23, align 4, !tbaa !9
  %518 = sext i32 %517 to i64
  %519 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %516, i64 noundef %518) #1
  %520 = getelementptr inbounds %struct.gpt2_layer, ptr %519, i32 0, i32 11
  %521 = load ptr, ptr %520, align 8, !tbaa !57
  %522 = load ptr, ptr %24, align 8, !tbaa !5
  %523 = call ptr @ggml_repeat(ptr noundef %514, ptr noundef %521, ptr noundef %522)
  %524 = load ptr, ptr %24, align 8, !tbaa !5
  %525 = call ptr @ggml_add(ptr noundef %513, ptr noundef %523, ptr noundef %524)
  store ptr %525, ptr %24, align 8, !tbaa !5
  %526 = load ptr, ptr %17, align 8, !tbaa !5
  %527 = load ptr, ptr %24, align 8, !tbaa !5
  %528 = load ptr, ptr %39, align 8, !tbaa !5
  %529 = call ptr @ggml_add(ptr noundef %526, ptr noundef %527, ptr noundef %528)
  store ptr %529, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #1
  br label %530

530:                                              ; preds = %283
  %531 = load i32, ptr %23, align 4, !tbaa !9
  %532 = add nsw i32 %531, 1
  store i32 %532, ptr %23, align 4, !tbaa !9
  br label %114, !llvm.loop !58

533:                                              ; preds = %118
  %534 = load ptr, ptr %17, align 8, !tbaa !5
  %535 = load ptr, ptr %22, align 8, !tbaa !5
  %536 = load ptr, ptr %8, align 8, !tbaa !5
  %537 = getelementptr inbounds %struct.gpt2_hparams, ptr %536, i32 0, i32 6
  %538 = load float, ptr %537, align 4, !tbaa !42
  %539 = call ptr @ggml_norm(ptr noundef %534, ptr noundef %535, float noundef %538)
  store ptr %539, ptr %22, align 8, !tbaa !5
  %540 = load ptr, ptr %17, align 8, !tbaa !5
  %541 = load ptr, ptr %17, align 8, !tbaa !5
  %542 = load ptr, ptr %17, align 8, !tbaa !5
  %543 = load ptr, ptr %4, align 8, !tbaa !5
  %544 = getelementptr inbounds %struct.gpt2_model, ptr %543, i32 0, i32 1
  %545 = load ptr, ptr %544, align 8, !tbaa !60
  %546 = load ptr, ptr %22, align 8, !tbaa !5
  %547 = call ptr @ggml_repeat(ptr noundef %542, ptr noundef %545, ptr noundef %546)
  %548 = load ptr, ptr %22, align 8, !tbaa !5
  %549 = call ptr @ggml_mul(ptr noundef %541, ptr noundef %547, ptr noundef %548)
  %550 = load ptr, ptr %17, align 8, !tbaa !5
  %551 = load ptr, ptr %4, align 8, !tbaa !5
  %552 = getelementptr inbounds %struct.gpt2_model, ptr %551, i32 0, i32 2
  %553 = load ptr, ptr %552, align 8, !tbaa !61
  %554 = load ptr, ptr %22, align 8, !tbaa !5
  %555 = call ptr @ggml_repeat(ptr noundef %550, ptr noundef %553, ptr noundef %554)
  %556 = call ptr @ggml_add(ptr noundef %540, ptr noundef %549, ptr noundef %555)
  store ptr %556, ptr %22, align 8, !tbaa !5
  %557 = load ptr, ptr %17, align 8, !tbaa !5
  %558 = load ptr, ptr %4, align 8, !tbaa !5
  %559 = getelementptr inbounds %struct.gpt2_model, ptr %558, i32 0, i32 5
  %560 = load ptr, ptr %559, align 8, !tbaa !62
  %561 = load ptr, ptr %22, align 8, !tbaa !5
  %562 = call ptr @ggml_mul_mat(ptr noundef %557, ptr noundef %560, ptr noundef %561)
  store ptr %562, ptr %22, align 8, !tbaa !5
  %563 = load ptr, ptr %22, align 8, !tbaa !5
  %564 = call ptr @ggml_set_name(ptr noundef %563, ptr noundef @.str.41)
  %565 = load ptr, ptr %22, align 8, !tbaa !5
  call void @ggml_set_output(ptr noundef %565)
  %566 = load ptr, ptr %19, align 8, !tbaa !5
  %567 = load ptr, ptr %22, align 8, !tbaa !5
  call void @ggml_build_forward_expand(ptr noundef %566, ptr noundef %567)
  %568 = load ptr, ptr %17, align 8, !tbaa !5
  call void @ggml_free(ptr noundef %568)
  %569 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #1
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #1
  ret ptr %569

570:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #1
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #1
  br label %571

571:                                              ; preds = %570
  %572 = load ptr, ptr %13, align 8
  %573 = load i32, ptr %14, align 4
  %574 = insertvalue { ptr, i32 } poison, ptr %572, 0
  %575 = insertvalue { ptr, i32 } %574, i32 %573, 1
  resume { ptr, i32 } %575
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #1

declare i64 @ggml_tensor_overhead() #2

declare i64 @ggml_graph_overhead() #2

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #1

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #1

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

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

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

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

declare ptr @ggml_new_graph(ptr noundef) #2

declare ptr @ggml_set_name(ptr noundef, ptr noundef) #2

declare void @ggml_set_input(ptr noundef) #2

declare ptr @ggml_add(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @ggml_get_rows(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @ggml_norm(ptr noundef, ptr noundef, float noundef) #2

declare ptr @ggml_mul(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @ggml_repeat(ptr noundef, ptr noundef, ptr noundef) #2

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

declare ptr @ggml_mul_mat(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @ggml_view_2d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #2

declare ptr @ggml_view_1d(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare i64 @ggml_element_size(ptr noundef) #2

declare void @ggml_build_forward_expand(ptr noundef, ptr noundef) #2

declare ptr @ggml_cpy(ptr noundef, ptr noundef, ptr noundef) #2

declare ptr @ggml_permute(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare ptr @ggml_cont_3d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) #2

declare ptr @ggml_reshape_3d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) #2

declare ptr @ggml_scale(ptr noundef, ptr noundef, float noundef) #2

; Function Attrs: nounwind
declare float @sqrtf(float noundef) #6

declare ptr @ggml_diag_mask_inf(ptr noundef, ptr noundef, i32 noundef) #2

declare ptr @ggml_soft_max(ptr noundef, ptr noundef) #2

declare ptr @ggml_cont_2d(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare ptr @ggml_gelu(ptr noundef, ptr noundef) #2

declare void @ggml_set_output(ptr noundef) #2

declare void @ggml_free(ptr noundef) #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS12gpt2_hparams", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !10, i64 4}
!16 = !{!12, !10, i64 12}
!17 = !{!"branch_weights", i32 1, i32 1048575}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!21, !19, i64 0}
!21 = !{!"_ZTS16ggml_init_params", !19, i64 0, !6, i64 8, !22, i64 16}
!22 = !{!"bool", !7, i64 0}
!23 = !{!21, !6, i64 8}
!24 = !{!21, !22, i64 16}
!25 = !{i64 0, i64 8, !18, i64 8, i64 8, !5, i64 16, i64 1, !26}
!26 = !{!22, !22, i64 0}
!27 = !{!28, !6, i64 48}
!28 = !{!"_ZTS10gpt2_model", !12, i64 0, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !29, i64 72, !6, i64 96, !6, i64 104, !6, i64 112, !33, i64 120}
!29 = !{!"_ZTSSt6vectorI10gpt2_layerSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseI10gpt2_layerSaIS0_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseI10gpt2_layerSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, 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, !19, i64 32}
!39 = !{!"_ZTSSt18_Rb_tree_node_base", !40, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!40 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!41 = !{!28, !6, i64 56}
!42 = !{!12, !13, i64 24}
!43 = !{!44, !6, i64 0}
!44 = !{!"_ZTS10gpt2_layer", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!45 = !{!44, !6, i64 8}
!46 = !{!44, !6, i64 32}
!47 = !{!44, !6, i64 40}
!48 = !{!28, !6, i64 96}
!49 = !{!28, !6, i64 104}
!50 = !{!44, !6, i64 48}
!51 = !{!44, !6, i64 56}
!52 = !{!44, !6, i64 16}
!53 = !{!44, !6, i64 24}
!54 = !{!44, !6, i64 64}
!55 = !{!44, !6, i64 72}
!56 = !{!44, !6, i64 80}
!57 = !{!44, !6, i64 88}
!58 = distinct !{!58, !59}
!59 = !{!"llvm.loop.mustprogress"}
!60 = !{!28, !6, i64 32}
!61 = !{!28, !6, i64 40}
!62 = !{!28, !6, i64 64}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ggml_init_params = type { i64, ptr, i8 }
%"class.std::allocator.27" = type { i8 }

@__dso_handle = external hidden global i8
@_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size = external hidden local_unnamed_addr global i64, align 8
@_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size = external hidden global i64, align 8
@_ZZ10gpt2_graphRK10gpt2_modeliiE3buf = external hidden global %"class.std::vector.25", align 8
@_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf = external hidden global i64, align 8
@.str.39 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [7 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #1

declare ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8) local_unnamed_addr #2

declare ptr @ggml_new_tensor_1d(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z10gpt2_graphRK10gpt2_modelii(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::allocator.27", align 1
  %5 = alloca %struct.ggml_init_params, align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i32, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = load i32, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %0, i64 12
  %13 = load i32, ptr %12, align 4, !tbaa !13
  %14 = load atomic i8, ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size acquire, align 8
  %15 = icmp eq i8 %14, 0
  br i1 %15, label %16, label %25, !prof !14

16:                                               ; preds = %3
  %17 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size) #6
  %.not = icmp eq i32 %17, 0
  br i1 %.not, label %25, label %18

18:                                               ; preds = %16
  %19 = invoke i64 @ggml_tensor_overhead()
          to label %20 unwind label %87

20:                                               ; preds = %18
  %21 = invoke i64 @ggml_graph_overhead()
          to label %22 unwind label %87

22:                                               ; preds = %20
  %23 = shl i64 %19, 11
  %24 = add i64 %21, %23
  store i64 %24, ptr @_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size, align 8, !tbaa !15
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size) #6
  br label %25

25:                                               ; preds = %22, %16, %3
  %26 = load atomic i8, ptr @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf acquire, align 8
  %27 = icmp eq i8 %26, 0
  br i1 %27, label %28, label %34, !prof !14

28:                                               ; preds = %25
  %29 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf) #6
  %.not239 = icmp eq i32 %29, 0
  br i1 %.not239, label %34, label %30

30:                                               ; preds = %28
  %31 = load i64, ptr @_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ10gpt2_graphRK10gpt2_modeliiE3buf, i64 noundef %31, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %32 unwind label %89

32:                                               ; preds = %30
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  %33 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt6vectorIhSaIhEED2Ev, ptr nonnull @_ZZ10gpt2_graphRK10gpt2_modeliiE3buf, ptr nonnull @__dso_handle) #6
  call void @__cxa_guard_release(ptr nonnull @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf) #6
  br label %34

34:                                               ; preds = %32, %28, %25
  %35 = load i64, ptr @_ZZ10gpt2_graphRK10gpt2_modeliiE8buf_size, align 8, !tbaa !15
  %36 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) @_ZZ10gpt2_graphRK10gpt2_modeliiE3buf) #6
  store i64 %35, ptr %5, align 8, !tbaa !15
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %36, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !17
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 16
  store i8 1, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !19
  %37 = call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %5)
  %38 = call ptr @ggml_new_graph(ptr noundef %37)
  %39 = sext i32 %2 to i64
  %40 = call ptr @ggml_new_tensor_1d(ptr noundef %37, i32 noundef 26, i64 noundef %39)
  %41 = call ptr @ggml_set_name(ptr noundef %40, ptr noundef nonnull @.str.39)
  call void @ggml_set_input(ptr noundef %40)
  %42 = call ptr @ggml_new_tensor_1d(ptr noundef %37, i32 noundef 26, i64 noundef %39)
  %43 = call ptr @ggml_set_name(ptr noundef %42, ptr noundef nonnull @.str.40)
  call void @ggml_set_input(ptr noundef %42)
  %44 = getelementptr inbounds i8, ptr %0, i64 48
  %45 = load ptr, ptr %44, align 8, !tbaa !21
  %46 = call ptr @ggml_get_rows(ptr noundef %37, ptr noundef %45, ptr noundef %40)
  %47 = getelementptr inbounds i8, ptr %0, i64 56
  %48 = load ptr, ptr %47, align 8, !tbaa !35
  %49 = call ptr @ggml_get_rows(ptr noundef %37, ptr noundef %48, ptr noundef %42)
  %50 = call ptr @ggml_add(ptr noundef %37, ptr noundef %46, ptr noundef %49)
  %51 = icmp sgt i32 %9, 0
  br i1 %51, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %34
  %52 = getelementptr inbounds i8, ptr %0, i64 24
  %53 = getelementptr inbounds i8, ptr %0, i64 72
  %54 = sext i32 %7 to i64
  %55 = shl nsw i64 %54, 2
  %56 = shl nsw i64 %54, 3
  %57 = icmp sgt i32 %2, 0
  %58 = getelementptr inbounds i8, ptr %0, i64 96
  %59 = mul nsw i32 %7, %2
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %0, i64 104
  %62 = sext i32 %13 to i64
  %63 = add nsw i32 %2, %1
  %64 = mul nsw i32 %7, %63
  %65 = sext i32 %64 to i64
  %66 = sext i32 %63 to i64
  %67 = sitofp i32 %7 to float
  %68 = sitofp i32 %13 to float
  %69 = fdiv float %67, %68
  %70 = sext i32 %11 to i64
  %71 = sext i32 %1 to i64
  %wide.trip.count = zext nneg i32 %9 to i64
  br label %91

._crit_edge:                                      ; preds = %133, %34
  %.0236.lcssa = phi ptr [ %50, %34 ], [ %202, %133 ]
  %72 = getelementptr inbounds i8, ptr %0, i64 24
  %73 = load float, ptr %72, align 8, !tbaa !36
  %74 = call ptr @ggml_norm(ptr noundef %37, ptr noundef %.0236.lcssa, float noundef %73)
  %75 = getelementptr inbounds i8, ptr %0, i64 32
  %76 = load ptr, ptr %75, align 8, !tbaa !37
  %77 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %76, ptr noundef %74)
  %78 = call ptr @ggml_mul(ptr noundef %37, ptr noundef %77, ptr noundef %74)
  %79 = getelementptr inbounds i8, ptr %0, i64 40
  %80 = load ptr, ptr %79, align 8, !tbaa !38
  %81 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %80, ptr noundef %74)
  %82 = call ptr @ggml_add(ptr noundef %37, ptr noundef %78, ptr noundef %81)
  %83 = getelementptr inbounds i8, ptr %0, i64 64
  %84 = load ptr, ptr %83, align 8, !tbaa !39
  %85 = call ptr @ggml_mul_mat(ptr noundef %37, ptr noundef %84, ptr noundef %82)
  %86 = call ptr @ggml_set_name(ptr noundef %85, ptr noundef nonnull @.str.41)
  call void @ggml_set_output(ptr noundef %85)
  call void @ggml_build_forward_expand(ptr noundef %38, ptr noundef %85)
  call void @ggml_free(ptr noundef %37)
  ret ptr %38

87:                                               ; preds = %20, %18
  %88 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZ10gpt2_graphRK10gpt2_modeliiE8buf_size) #6
  br label %203

89:                                               ; preds = %30
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZ10gpt2_graphRK10gpt2_modeliiE3buf) #6
  br label %203

91:                                               ; preds = %.lr.ph, %133
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %133 ]
  %.0236242 = phi ptr [ %50, %.lr.ph ], [ %202, %133 ]
  %92 = load float, ptr %52, align 8, !tbaa !36
  %93 = call ptr @ggml_norm(ptr noundef %37, ptr noundef %.0236242, float noundef %92)
  %94 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %95 = load ptr, ptr %94, align 8, !tbaa !40
  %96 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %95, ptr noundef %93)
  %97 = call ptr @ggml_mul(ptr noundef %37, ptr noundef %96, ptr noundef %93)
  %98 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %99 = getelementptr inbounds i8, ptr %98, i64 8
  %100 = load ptr, ptr %99, align 8, !tbaa !42
  %101 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %100, ptr noundef %93)
  %102 = call ptr @ggml_add(ptr noundef %37, ptr noundef %97, ptr noundef %101)
  %103 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %104 = getelementptr inbounds i8, ptr %103, i64 32
  %105 = load ptr, ptr %104, align 8, !tbaa !43
  %106 = call ptr @ggml_mul_mat(ptr noundef %37, ptr noundef %105, ptr noundef %102)
  %107 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %108 = getelementptr inbounds i8, ptr %107, i64 40
  %109 = load ptr, ptr %108, align 8, !tbaa !44
  %110 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %109, ptr noundef %106)
  %111 = call ptr @ggml_add(ptr noundef %37, ptr noundef %110, ptr noundef %106)
  %112 = getelementptr inbounds i8, ptr %111, i64 56
  %113 = load i64, ptr %112, align 8, !tbaa !15
  %114 = call ptr @ggml_view_2d(ptr noundef %37, ptr noundef %111, i64 noundef %54, i64 noundef %39, i64 noundef %113, i64 noundef 0)
  %115 = load i64, ptr %112, align 8, !tbaa !15
  %116 = call ptr @ggml_view_2d(ptr noundef %37, ptr noundef %111, i64 noundef %54, i64 noundef %39, i64 noundef %115, i64 noundef %55)
  %117 = load i64, ptr %112, align 8, !tbaa !15
  %118 = call ptr @ggml_view_2d(ptr noundef %37, ptr noundef %111, i64 noundef %54, i64 noundef %39, i64 noundef %117, i64 noundef %56)
  br i1 %57, label %119, label %._crit_edge244

._crit_edge244:                                   ; preds = %91
  %.pre = mul nsw i64 %indvars.iv, %70
  br label %133

119:                                              ; preds = %91
  %120 = load ptr, ptr %58, align 8, !tbaa !45
  %121 = call i64 @ggml_element_size(ptr noundef %120)
  %122 = mul nsw i64 %indvars.iv, %70
  %123 = add nsw i64 %122, %71
  %124 = mul nsw i64 %123, %54
  %125 = mul i64 %124, %121
  %126 = call ptr @ggml_view_1d(ptr noundef %37, ptr noundef %120, i64 noundef %60, i64 noundef %125)
  %127 = load ptr, ptr %61, align 8, !tbaa !46
  %128 = call i64 @ggml_element_size(ptr noundef %127)
  %129 = mul i64 %124, %128
  %130 = call ptr @ggml_view_1d(ptr noundef %37, ptr noundef %127, i64 noundef %60, i64 noundef %129)
  %131 = call ptr @ggml_cpy(ptr noundef %37, ptr noundef %116, ptr noundef %126)
  call void @ggml_build_forward_expand(ptr noundef %38, ptr noundef %131)
  %132 = call ptr @ggml_cpy(ptr noundef %37, ptr noundef %118, ptr noundef %130)
  call void @ggml_build_forward_expand(ptr noundef %38, ptr noundef %132)
  br label %133

133:                                              ; preds = %._crit_edge244, %119
  %.pre-phi = phi i64 [ %.pre, %._crit_edge244 ], [ %122, %119 ]
  %134 = sdiv i32 %7, %13
  %135 = sext i32 %134 to i64
  %136 = call ptr @ggml_cont_3d(ptr noundef %37, ptr noundef %114, i64 noundef %135, i64 noundef %62, i64 noundef %39)
  %137 = call ptr @ggml_permute(ptr noundef %37, ptr noundef %136, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %138 = load ptr, ptr %58, align 8, !tbaa !45
  %139 = call i64 @ggml_element_size(ptr noundef %138)
  %140 = mul nsw i64 %.pre-phi, %54
  %141 = mul i64 %140, %139
  %142 = call ptr @ggml_view_1d(ptr noundef %37, ptr noundef %138, i64 noundef %65, i64 noundef %141)
  %143 = call ptr @ggml_reshape_3d(ptr noundef %37, ptr noundef %142, i64 noundef %135, i64 noundef %62, i64 noundef %66)
  %144 = call ptr @ggml_permute(ptr noundef %37, ptr noundef %143, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %145 = call ptr @ggml_mul_mat(ptr noundef %37, ptr noundef %144, ptr noundef %137)
  %146 = call float @sqrtf(float noundef %69) #6
  %147 = fdiv float 1.000000e+00, %146
  %148 = call ptr @ggml_scale(ptr noundef %37, ptr noundef %145, float noundef %147)
  %149 = call ptr @ggml_diag_mask_inf(ptr noundef %37, ptr noundef %148, i32 noundef %1)
  %150 = call ptr @ggml_soft_max(ptr noundef %37, ptr noundef %149)
  %151 = load ptr, ptr %61, align 8, !tbaa !46
  %152 = call i64 @ggml_element_size(ptr noundef %151)
  %153 = mul i64 %140, %152
  %154 = call ptr @ggml_view_1d(ptr noundef %37, ptr noundef %151, i64 noundef %65, i64 noundef %153)
  %155 = call ptr @ggml_reshape_3d(ptr noundef %37, ptr noundef %154, i64 noundef %135, i64 noundef %62, i64 noundef %66)
  %156 = call ptr @ggml_permute(ptr noundef %37, ptr noundef %155, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 3)
  %157 = call ptr @ggml_cont_3d(ptr noundef %37, ptr noundef %156, i64 noundef %66, i64 noundef %135, i64 noundef %62)
  %158 = call ptr @ggml_mul_mat(ptr noundef %37, ptr noundef %157, ptr noundef %150)
  %159 = call ptr @ggml_permute(ptr noundef %37, ptr noundef %158, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %160 = call ptr @ggml_cont_2d(ptr noundef %37, ptr noundef %159, i64 noundef %54, i64 noundef %39)
  %161 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %162 = getelementptr inbounds i8, ptr %161, i64 48
  %163 = load ptr, ptr %162, align 8, !tbaa !47
  %164 = call ptr @ggml_mul_mat(ptr noundef %37, ptr noundef %163, ptr noundef %160)
  %165 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %166 = getelementptr inbounds i8, ptr %165, i64 56
  %167 = load ptr, ptr %166, align 8, !tbaa !48
  %168 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %167, ptr noundef %164)
  %169 = call ptr @ggml_add(ptr noundef %37, ptr noundef %168, ptr noundef %164)
  %170 = call ptr @ggml_add(ptr noundef %37, ptr noundef %169, ptr noundef %.0236242)
  %171 = load float, ptr %52, align 8, !tbaa !36
  %172 = call ptr @ggml_norm(ptr noundef %37, ptr noundef %170, float noundef %171)
  %173 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %174 = getelementptr inbounds i8, ptr %173, i64 16
  %175 = load ptr, ptr %174, align 8, !tbaa !49
  %176 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %175, ptr noundef %172)
  %177 = call ptr @ggml_mul(ptr noundef %37, ptr noundef %176, ptr noundef %172)
  %178 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %179 = getelementptr inbounds i8, ptr %178, i64 24
  %180 = load ptr, ptr %179, align 8, !tbaa !50
  %181 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %180, ptr noundef %172)
  %182 = call ptr @ggml_add(ptr noundef %37, ptr noundef %177, ptr noundef %181)
  %183 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %184 = getelementptr inbounds i8, ptr %183, i64 64
  %185 = load ptr, ptr %184, align 8, !tbaa !51
  %186 = call ptr @ggml_mul_mat(ptr noundef %37, ptr noundef %185, ptr noundef %182)
  %187 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %188 = getelementptr inbounds i8, ptr %187, i64 72
  %189 = load ptr, ptr %188, align 8, !tbaa !52
  %190 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %189, ptr noundef %186)
  %191 = call ptr @ggml_add(ptr noundef %37, ptr noundef %190, ptr noundef %186)
  %192 = call ptr @ggml_gelu(ptr noundef %37, ptr noundef %191)
  %193 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %194 = getelementptr inbounds i8, ptr %193, i64 80
  %195 = load ptr, ptr %194, align 8, !tbaa !53
  %196 = call ptr @ggml_mul_mat(ptr noundef %37, ptr noundef %195, ptr noundef %192)
  %197 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNKSt6vectorI10gpt2_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %indvars.iv) #6
  %198 = getelementptr inbounds i8, ptr %197, i64 88
  %199 = load ptr, ptr %198, align 8, !tbaa !54
  %200 = call ptr @ggml_repeat(ptr noundef %37, ptr noundef %199, ptr noundef %196)
  %201 = call ptr @ggml_add(ptr noundef %37, ptr noundef %200, ptr noundef %196)
  %202 = call ptr @ggml_add(ptr noundef %37, ptr noundef %201, ptr noundef %170)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %91, !llvm.loop !55

203:                                              ; preds = %89, %87
  %.pn = phi { ptr, i32 } [ %90, %89 ], [ %88, %87 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #1

declare i64 @ggml_tensor_overhead() local_unnamed_addr #2

declare i64 @ggml_graph_overhead() local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #1

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

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

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

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

declare ptr @ggml_new_graph(ptr noundef) local_unnamed_addr #2

declare ptr @ggml_set_name(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @ggml_set_input(ptr noundef) local_unnamed_addr #2

declare ptr @ggml_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ggml_get_rows(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ggml_norm(ptr noundef, ptr noundef, float noundef) local_unnamed_addr #2

declare ptr @ggml_mul(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ggml_repeat(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare ptr @ggml_mul_mat(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ggml_view_2d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare ptr @ggml_view_1d(ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare i64 @ggml_element_size(ptr noundef) local_unnamed_addr #2

declare void @ggml_build_forward_expand(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ggml_cpy(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ggml_permute(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare ptr @ggml_cont_3d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare ptr @ggml_reshape_3d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare ptr @ggml_scale(ptr noundef, ptr noundef, float noundef) local_unnamed_addr #2

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

declare ptr @ggml_diag_mask_inf(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare ptr @ggml_soft_max(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @ggml_cont_2d(ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare ptr @ggml_gelu(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @ggml_set_output(ptr noundef) local_unnamed_addr #2

declare void @ggml_free(ptr noundef) local_unnamed_addr #2

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

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

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

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


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