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

; 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.ggml_init_params = type { i64, ptr, i8 }
%struct.gptj_model = type { %struct.gptj_hparams, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.4", ptr, ptr, ptr, %"class.std::map" }
%struct.gptj_hparams = type { i32, i32, i32, i32, i32, i32, i32, float }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl" }
%"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl" = type { %"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<gptj_layer, std::allocator<gptj_layer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, ggml_tensor *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"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.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] }
%struct.gptj_layer = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@stderr = external global ptr, align 8
@_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size = external hidden global i64, align 8
@_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf = external hidden global ptr, align 8
@_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf = external hidden global i64, align 8
@.str.40 = external hidden unnamed_addr constant [34 x i8], align 1
@__func__._Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm = external hidden unnamed_addr constant [10 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

; 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 @fprintf(ptr noundef, ptr noundef, ...) #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_2d(ptr noundef, i32 noundef, i64 noundef, i64 noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca i32, align 4
  %24 = alloca %struct.ggml_init_params, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %struct.ggml_init_params, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %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
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca ptr, align 8
  %47 = alloca ptr, align 8
  %48 = alloca ptr, align 8
  %49 = alloca ptr, align 8
  %50 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #6
  %53 = trunc i64 %52 to i32
  store i32 %53, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.gptj_model, ptr %54, i32 0, i32 0
  store ptr %55, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.gptj_hparams, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !11
  store i32 %58, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.gptj_hparams, ptr %59, i32 0, i32 4
  %61 = load i32, ptr %60, align 4, !tbaa !14
  store i32 %61, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %62 = load ptr, ptr %15, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.gptj_hparams, ptr %62, i32 0, i32 1
  %64 = load i32, ptr %63, align 4, !tbaa !15
  store i32 %64, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %65 = load ptr, ptr %15, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.gptj_hparams, ptr %65, i32 0, i32 3
  %67 = load i32, ptr %66, align 4, !tbaa !16
  store i32 %67, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %68 = load ptr, ptr %15, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.gptj_hparams, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 4, !tbaa !17
  store i32 %70, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.gptj_hparams, ptr %71, i32 0, i32 5
  %73 = load i32, ptr %72, align 4, !tbaa !18
  store i32 %73, ptr %21, align 4, !tbaa !9
  %74 = load atomic i8, ptr @_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf acquire, align 8
  %75 = icmp eq i8 %74, 0
  br i1 %75, label %76, label %82, !prof !19

76:                                               ; preds = %6
  %77 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf) #6
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %82

79:                                               ; preds = %76
  %80 = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !20
  %81 = call noalias ptr @malloc(i64 noundef %80) #9
  store ptr %81, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !5
  call void @__cxa_guard_release(ptr @_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf) #6
  br label %82

82:                                               ; preds = %79, %76, %6
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = load i64, ptr %83, align 8, !tbaa !20
  %85 = icmp ugt i64 %84, 0
  br i1 %85, label %86, label %117

86:                                               ; preds = %82
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = load i64, ptr %87, align 8, !tbaa !20
  %89 = load i32, ptr %14, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = mul i64 %88, %90
  %92 = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !20
  %93 = icmp ugt i64 %91, %92
  br i1 %93, label %94, label %117

94:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = load i64, ptr %95, align 8, !tbaa !20
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = mul i64 %96, %98
  %100 = uitofp i64 %99 to double
  %101 = fmul double 1.100000e+00, %100
  %102 = fptoui double %101 to i64
  store i64 %102, ptr %22, align 8, !tbaa !20
  %103 = load i64, ptr %22, align 8, !tbaa !20
  store i64 %103, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !20
  %104 = load ptr, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !5
  %105 = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !20
  %106 = call ptr @realloc(ptr noundef %104, i64 noundef %105) #10
  store ptr %106, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !5
  %107 = load ptr, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !5
  %108 = icmp eq ptr %107, null
  br i1 %108, label %109, label %113

109:                                              ; preds = %94
  %110 = load ptr, ptr @stderr, align 8, !tbaa !5
  %111 = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !20
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.40, ptr noundef @__func__._Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm, i64 noundef %111) #6
  store i1 false, ptr %7, align 1
  store i32 1, ptr %23, align 4
  br label %114

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

114:                                              ; preds = %113, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  %115 = load i32, ptr %23, align 4
  switch i32 %115, label %607 [
    i32 0, label %116
  ]

116:                                              ; preds = %114
  br label %117

117:                                              ; preds = %116, %86, %82
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #6
  %118 = getelementptr inbounds %struct.ggml_init_params, ptr %24, i32 0, i32 0
  %119 = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !20
  store i64 %119, ptr %118, align 8, !tbaa !22
  %120 = getelementptr inbounds %struct.ggml_init_params, ptr %24, i32 0, i32 1
  %121 = load ptr, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !5
  store ptr %121, ptr %120, align 8, !tbaa !25
  %122 = getelementptr inbounds %struct.ggml_init_params, ptr %24, i32 0, i32 2
  store i8 0, ptr %122, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %24, i64 24, i1 false), !tbaa.struct !27
  %123 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %26)
  store ptr %123, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %124 = load ptr, ptr %25, align 8, !tbaa !5
  %125 = call ptr @ggml_new_graph(ptr noundef %124)
  store ptr %125, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %126 = load ptr, ptr %25, align 8, !tbaa !5
  %127 = load i32, ptr %14, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = call ptr @ggml_new_tensor_1d(ptr noundef %126, i32 noundef 26, i64 noundef %128)
  store ptr %129, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %130 = load ptr, ptr %28, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.ggml_tensor, ptr %130, i32 0, i32 10
  %132 = load ptr, ptr %131, align 8, !tbaa !29
  store ptr %132, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %146, %117
  %134 = load i32, ptr %30, align 4, !tbaa !9
  %135 = load i32, ptr %14, align 4, !tbaa !9
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %138, label %137

137:                                              ; preds = %133
  store i32 2, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %149

138:                                              ; preds = %133
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = load i32, ptr %30, align 4, !tbaa !9
  %141 = add nsw i32 %139, %140
  %142 = load ptr, ptr %29, align 8, !tbaa !5
  %143 = load i32, ptr %30, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds i32, ptr %142, i64 %144
  store i32 %141, ptr %145, align 4, !tbaa !9
  br label %146

146:                                              ; preds = %138
  %147 = load i32, ptr %30, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %30, align 4, !tbaa !9
  br label %133, !llvm.loop !33

149:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %150 = load ptr, ptr %25, align 8, !tbaa !5
  %151 = load i32, ptr %14, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = call ptr @ggml_new_tensor_1d(ptr noundef %150, i32 noundef 26, i64 noundef %152)
  store ptr %153, ptr %31, align 8, !tbaa !5
  %154 = load ptr, ptr %31, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ggml_tensor, ptr %154, i32 0, i32 10
  %156 = load ptr, ptr %155, align 8, !tbaa !29
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %157) #6
  %159 = load i32, ptr %14, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = load ptr, ptr %31, align 8, !tbaa !5
  %162 = call i64 @ggml_element_size(ptr noundef %161)
  %163 = mul i64 %160, %162
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %156, ptr align 4 %158, i64 %163, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %164 = load ptr, ptr %25, align 8, !tbaa !5
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.gptj_model, ptr %165, i32 0, i32 3
  %167 = load ptr, ptr %166, align 8, !tbaa !35
  %168 = load ptr, ptr %31, align 8, !tbaa !5
  %169 = call ptr @ggml_get_rows(ptr noundef %164, ptr noundef %167, ptr noundef %168)
  store ptr %169, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %531, %149
  %171 = load i32, ptr %33, align 4, !tbaa !9
  %172 = load i32, ptr %17, align 4, !tbaa !9
  %173 = icmp slt i32 %171, %172
  br i1 %173, label %175, label %174

174:                                              ; preds = %170
  store i32 5, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %534

175:                                              ; preds = %170
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %176 = load ptr, ptr %25, align 8, !tbaa !5
  %177 = load ptr, ptr %32, align 8, !tbaa !5
  %178 = load ptr, ptr %15, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.gptj_hparams, ptr %178, i32 0, i32 7
  %180 = load float, ptr %179, align 4, !tbaa !49
  %181 = call ptr @ggml_norm(ptr noundef %176, ptr noundef %177, float noundef %180)
  store ptr %181, ptr %34, align 8, !tbaa !5
  %182 = load ptr, ptr %25, align 8, !tbaa !5
  %183 = load ptr, ptr %25, align 8, !tbaa !5
  %184 = load ptr, ptr %25, align 8, !tbaa !5
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.gptj_model, ptr %185, i32 0, i32 6
  %187 = load i32, ptr %33, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %186, i64 noundef %188) #6
  %190 = getelementptr inbounds %struct.gptj_layer, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !50
  %192 = load ptr, ptr %34, align 8, !tbaa !5
  %193 = call ptr @ggml_repeat(ptr noundef %184, ptr noundef %191, ptr noundef %192)
  %194 = load ptr, ptr %34, align 8, !tbaa !5
  %195 = call ptr @ggml_mul(ptr noundef %183, ptr noundef %193, ptr noundef %194)
  %196 = load ptr, ptr %25, align 8, !tbaa !5
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.gptj_model, ptr %197, i32 0, i32 6
  %199 = load i32, ptr %33, align 4, !tbaa !9
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %198, i64 noundef %200) #6
  %202 = getelementptr inbounds %struct.gptj_layer, ptr %201, i32 0, i32 1
  %203 = load ptr, ptr %202, align 8, !tbaa !52
  %204 = load ptr, ptr %34, align 8, !tbaa !5
  %205 = call ptr @ggml_repeat(ptr noundef %196, ptr noundef %203, ptr noundef %204)
  %206 = call ptr @ggml_add(ptr noundef %182, ptr noundef %195, ptr noundef %205)
  store ptr %206, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  %207 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %207, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %208 = load ptr, ptr %25, align 8, !tbaa !5
  %209 = load ptr, ptr %25, align 8, !tbaa !5
  %210 = load ptr, ptr %25, align 8, !tbaa !5
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.gptj_model, ptr %211, i32 0, i32 6
  %213 = load i32, ptr %33, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  %215 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %212, i64 noundef %214) #6
  %216 = getelementptr inbounds %struct.gptj_layer, ptr %215, i32 0, i32 2
  %217 = load ptr, ptr %216, align 8, !tbaa !53
  %218 = load ptr, ptr %34, align 8, !tbaa !5
  %219 = call ptr @ggml_mul_mat(ptr noundef %210, ptr noundef %217, ptr noundef %218)
  %220 = load i32, ptr %16, align 4, !tbaa !9
  %221 = load i32, ptr %19, align 4, !tbaa !9
  %222 = sdiv i32 %220, %221
  %223 = sext i32 %222 to i64
  %224 = load i32, ptr %19, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = load i32, ptr %14, align 4, !tbaa !9
  %227 = sext i32 %226 to i64
  %228 = call ptr @ggml_reshape_3d(ptr noundef %209, ptr noundef %219, i64 noundef %223, i64 noundef %225, i64 noundef %227)
  %229 = load ptr, ptr %28, align 8, !tbaa !5
  %230 = load i32, ptr %21, align 4, !tbaa !9
  %231 = call ptr @ggml_rope_inplace(ptr noundef %208, ptr noundef %228, ptr noundef %229, i32 noundef %230, i32 noundef 0)
  store ptr %231, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #6
  %232 = load ptr, ptr %25, align 8, !tbaa !5
  %233 = load ptr, ptr %25, align 8, !tbaa !5
  %234 = load ptr, ptr %25, align 8, !tbaa !5
  %235 = load ptr, ptr %8, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.gptj_model, ptr %235, i32 0, i32 6
  %237 = load i32, ptr %33, align 4, !tbaa !9
  %238 = sext i32 %237 to i64
  %239 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %236, i64 noundef %238) #6
  %240 = getelementptr inbounds %struct.gptj_layer, ptr %239, i32 0, i32 3
  %241 = load ptr, ptr %240, align 8, !tbaa !54
  %242 = load ptr, ptr %34, align 8, !tbaa !5
  %243 = call ptr @ggml_mul_mat(ptr noundef %234, ptr noundef %241, ptr noundef %242)
  %244 = load i32, ptr %16, align 4, !tbaa !9
  %245 = load i32, ptr %19, align 4, !tbaa !9
  %246 = sdiv i32 %244, %245
  %247 = sext i32 %246 to i64
  %248 = load i32, ptr %19, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = load i32, ptr %14, align 4, !tbaa !9
  %251 = sext i32 %250 to i64
  %252 = call ptr @ggml_reshape_3d(ptr noundef %233, ptr noundef %243, i64 noundef %247, i64 noundef %249, i64 noundef %251)
  %253 = load ptr, ptr %28, align 8, !tbaa !5
  %254 = load i32, ptr %21, align 4, !tbaa !9
  %255 = call ptr @ggml_rope_inplace(ptr noundef %232, ptr noundef %252, ptr noundef %253, i32 noundef %254, i32 noundef 0)
  store ptr %255, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #6
  %256 = load ptr, ptr %25, align 8, !tbaa !5
  %257 = load ptr, ptr %25, align 8, !tbaa !5
  %258 = load ptr, ptr %8, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.gptj_model, ptr %258, i32 0, i32 6
  %260 = load i32, ptr %33, align 4, !tbaa !9
  %261 = sext i32 %260 to i64
  %262 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %259, i64 noundef %261) #6
  %263 = getelementptr inbounds %struct.gptj_layer, ptr %262, i32 0, i32 4
  %264 = load ptr, ptr %263, align 8, !tbaa !55
  %265 = load ptr, ptr %34, align 8, !tbaa !5
  %266 = call ptr @ggml_mul_mat(ptr noundef %257, ptr noundef %264, ptr noundef %265)
  %267 = call ptr @ggml_transpose(ptr noundef %256, ptr noundef %266)
  store ptr %267, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  %268 = load ptr, ptr %25, align 8, !tbaa !5
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.gptj_model, ptr %269, i32 0, i32 7
  %271 = load ptr, ptr %270, align 8, !tbaa !56
  %272 = load i32, ptr %14, align 4, !tbaa !9
  %273 = load i32, ptr %16, align 4, !tbaa !9
  %274 = mul nsw i32 %272, %273
  %275 = sext i32 %274 to i64
  %276 = load ptr, ptr %8, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.gptj_model, ptr %276, i32 0, i32 7
  %278 = load ptr, ptr %277, align 8, !tbaa !56
  %279 = call i64 @ggml_element_size(ptr noundef %278)
  %280 = load i32, ptr %16, align 4, !tbaa !9
  %281 = sext i32 %280 to i64
  %282 = mul i64 %279, %281
  %283 = load i32, ptr %33, align 4, !tbaa !9
  %284 = load i32, ptr %18, align 4, !tbaa !9
  %285 = mul nsw i32 %283, %284
  %286 = load i32, ptr %10, align 4, !tbaa !9
  %287 = add nsw i32 %285, %286
  %288 = sext i32 %287 to i64
  %289 = mul i64 %282, %288
  %290 = call ptr @ggml_view_1d(ptr noundef %268, ptr noundef %271, i64 noundef %275, i64 noundef %289)
  store ptr %290, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #6
  %291 = load ptr, ptr %25, align 8, !tbaa !5
  %292 = load ptr, ptr %8, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.gptj_model, ptr %292, i32 0, i32 8
  %294 = load ptr, ptr %293, align 8, !tbaa !57
  %295 = load i32, ptr %14, align 4, !tbaa !9
  %296 = sext i32 %295 to i64
  %297 = load i32, ptr %16, align 4, !tbaa !9
  %298 = sext i32 %297 to i64
  %299 = load i32, ptr %18, align 4, !tbaa !9
  %300 = sext i32 %299 to i64
  %301 = load ptr, ptr %8, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.gptj_model, ptr %301, i32 0, i32 8
  %303 = load ptr, ptr %302, align 8, !tbaa !57
  %304 = call i64 @ggml_element_size(ptr noundef %303)
  %305 = mul i64 %300, %304
  %306 = load i32, ptr %33, align 4, !tbaa !9
  %307 = load i32, ptr %18, align 4, !tbaa !9
  %308 = mul nsw i32 %306, %307
  %309 = sext i32 %308 to i64
  %310 = load ptr, ptr %8, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.gptj_model, ptr %310, i32 0, i32 8
  %312 = load ptr, ptr %311, align 8, !tbaa !57
  %313 = call i64 @ggml_element_size(ptr noundef %312)
  %314 = mul i64 %309, %313
  %315 = load i32, ptr %16, align 4, !tbaa !9
  %316 = sext i32 %315 to i64
  %317 = mul i64 %314, %316
  %318 = load i32, ptr %10, align 4, !tbaa !9
  %319 = sext i32 %318 to i64
  %320 = load ptr, ptr %8, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.gptj_model, ptr %320, i32 0, i32 8
  %322 = load ptr, ptr %321, align 8, !tbaa !57
  %323 = call i64 @ggml_element_size(ptr noundef %322)
  %324 = mul i64 %319, %323
  %325 = add i64 %317, %324
  %326 = call ptr @ggml_view_2d(ptr noundef %291, ptr noundef %294, i64 noundef %296, i64 noundef %298, i64 noundef %305, i64 noundef %325)
  store ptr %326, ptr %40, align 8, !tbaa !5
  %327 = load ptr, ptr %27, align 8, !tbaa !5
  %328 = load ptr, ptr %25, align 8, !tbaa !5
  %329 = load ptr, ptr %37, align 8, !tbaa !5
  %330 = load ptr, ptr %39, align 8, !tbaa !5
  %331 = call ptr @ggml_cpy(ptr noundef %328, ptr noundef %329, ptr noundef %330)
  call void @ggml_build_forward_expand(ptr noundef %327, ptr noundef %331)
  %332 = load ptr, ptr %27, align 8, !tbaa !5
  %333 = load ptr, ptr %25, align 8, !tbaa !5
  %334 = load ptr, ptr %38, align 8, !tbaa !5
  %335 = load ptr, ptr %40, align 8, !tbaa !5
  %336 = call ptr @ggml_cpy(ptr noundef %333, ptr noundef %334, ptr noundef %335)
  call void @ggml_build_forward_expand(ptr noundef %332, ptr noundef %336)
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #6
  %337 = load ptr, ptr %25, align 8, !tbaa !5
  %338 = load ptr, ptr %36, align 8, !tbaa !5
  %339 = call ptr @ggml_permute(ptr noundef %337, ptr noundef %338, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  store ptr %339, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #6
  %340 = load ptr, ptr %25, align 8, !tbaa !5
  %341 = load ptr, ptr %25, align 8, !tbaa !5
  %342 = load ptr, ptr %25, align 8, !tbaa !5
  %343 = load ptr, ptr %8, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.gptj_model, ptr %343, i32 0, i32 7
  %345 = load ptr, ptr %344, align 8, !tbaa !56
  %346 = load i32, ptr %10, align 4, !tbaa !9
  %347 = load i32, ptr %14, align 4, !tbaa !9
  %348 = add nsw i32 %346, %347
  %349 = load i32, ptr %16, align 4, !tbaa !9
  %350 = mul nsw i32 %348, %349
  %351 = sext i32 %350 to i64
  %352 = load i32, ptr %33, align 4, !tbaa !9
  %353 = load i32, ptr %18, align 4, !tbaa !9
  %354 = mul nsw i32 %352, %353
  %355 = sext i32 %354 to i64
  %356 = load ptr, ptr %8, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.gptj_model, ptr %356, i32 0, i32 7
  %358 = load ptr, ptr %357, align 8, !tbaa !56
  %359 = call i64 @ggml_element_size(ptr noundef %358)
  %360 = mul i64 %355, %359
  %361 = load i32, ptr %16, align 4, !tbaa !9
  %362 = sext i32 %361 to i64
  %363 = mul i64 %360, %362
  %364 = call ptr @ggml_view_1d(ptr noundef %342, ptr noundef %345, i64 noundef %351, i64 noundef %363)
  %365 = load i32, ptr %16, align 4, !tbaa !9
  %366 = load i32, ptr %19, align 4, !tbaa !9
  %367 = sdiv i32 %365, %366
  %368 = sext i32 %367 to i64
  %369 = load i32, ptr %19, align 4, !tbaa !9
  %370 = sext i32 %369 to i64
  %371 = load i32, ptr %10, align 4, !tbaa !9
  %372 = load i32, ptr %14, align 4, !tbaa !9
  %373 = add nsw i32 %371, %372
  %374 = sext i32 %373 to i64
  %375 = call ptr @ggml_reshape_3d(ptr noundef %341, ptr noundef %364, i64 noundef %368, i64 noundef %370, i64 noundef %374)
  %376 = call ptr @ggml_permute(ptr noundef %340, ptr noundef %375, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  store ptr %376, ptr %42, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #6
  %377 = load ptr, ptr %25, align 8, !tbaa !5
  %378 = load ptr, ptr %42, align 8, !tbaa !5
  %379 = load ptr, ptr %41, align 8, !tbaa !5
  %380 = call ptr @ggml_mul_mat(ptr noundef %377, ptr noundef %378, ptr noundef %379)
  store ptr %380, ptr %43, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #6
  %381 = load ptr, ptr %25, align 8, !tbaa !5
  %382 = load ptr, ptr %43, align 8, !tbaa !5
  %383 = load i32, ptr %16, align 4, !tbaa !9
  %384 = sitofp i32 %383 to float
  %385 = load i32, ptr %19, align 4, !tbaa !9
  %386 = sitofp i32 %385 to float
  %387 = fdiv float %384, %386
  %388 = fpext float %387 to double
  %389 = call double @sqrt(double noundef %388) #6
  %390 = fdiv double 1.000000e+00, %389
  %391 = fptrunc double %390 to float
  %392 = call ptr @ggml_scale_inplace(ptr noundef %381, ptr noundef %382, float noundef %391)
  store ptr %392, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #6
  %393 = load ptr, ptr %25, align 8, !tbaa !5
  %394 = load ptr, ptr %44, align 8, !tbaa !5
  %395 = load i32, ptr %10, align 4, !tbaa !9
  %396 = call ptr @ggml_diag_mask_inf_inplace(ptr noundef %393, ptr noundef %394, i32 noundef %395)
  store ptr %396, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #6
  %397 = load ptr, ptr %25, align 8, !tbaa !5
  %398 = load ptr, ptr %45, align 8, !tbaa !5
  %399 = call ptr @ggml_soft_max_inplace(ptr noundef %397, ptr noundef %398)
  store ptr %399, ptr %46, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #6
  %400 = load ptr, ptr %25, align 8, !tbaa !5
  %401 = load ptr, ptr %8, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.gptj_model, ptr %401, i32 0, i32 8
  %403 = load ptr, ptr %402, align 8, !tbaa !57
  %404 = load i32, ptr %10, align 4, !tbaa !9
  %405 = load i32, ptr %14, align 4, !tbaa !9
  %406 = add nsw i32 %404, %405
  %407 = sext i32 %406 to i64
  %408 = load i32, ptr %16, align 4, !tbaa !9
  %409 = load i32, ptr %19, align 4, !tbaa !9
  %410 = sdiv i32 %408, %409
  %411 = sext i32 %410 to i64
  %412 = load i32, ptr %19, align 4, !tbaa !9
  %413 = sext i32 %412 to i64
  %414 = load i32, ptr %18, align 4, !tbaa !9
  %415 = sext i32 %414 to i64
  %416 = load ptr, ptr %8, align 8, !tbaa !5
  %417 = getelementptr inbounds %struct.gptj_model, ptr %416, i32 0, i32 8
  %418 = load ptr, ptr %417, align 8, !tbaa !57
  %419 = call i64 @ggml_element_size(ptr noundef %418)
  %420 = mul i64 %415, %419
  %421 = load i32, ptr %18, align 4, !tbaa !9
  %422 = sext i32 %421 to i64
  %423 = load ptr, ptr %8, align 8, !tbaa !5
  %424 = getelementptr inbounds %struct.gptj_model, ptr %423, i32 0, i32 8
  %425 = load ptr, ptr %424, align 8, !tbaa !57
  %426 = call i64 @ggml_element_size(ptr noundef %425)
  %427 = mul i64 %422, %426
  %428 = load i32, ptr %16, align 4, !tbaa !9
  %429 = sext i32 %428 to i64
  %430 = mul i64 %427, %429
  %431 = load i32, ptr %19, align 4, !tbaa !9
  %432 = sext i32 %431 to i64
  %433 = udiv i64 %430, %432
  %434 = load i32, ptr %33, align 4, !tbaa !9
  %435 = load i32, ptr %18, align 4, !tbaa !9
  %436 = mul nsw i32 %434, %435
  %437 = sext i32 %436 to i64
  %438 = load ptr, ptr %8, align 8, !tbaa !5
  %439 = getelementptr inbounds %struct.gptj_model, ptr %438, i32 0, i32 8
  %440 = load ptr, ptr %439, align 8, !tbaa !57
  %441 = call i64 @ggml_element_size(ptr noundef %440)
  %442 = mul i64 %437, %441
  %443 = load i32, ptr %16, align 4, !tbaa !9
  %444 = sext i32 %443 to i64
  %445 = mul i64 %442, %444
  %446 = call ptr @ggml_view_3d(ptr noundef %400, ptr noundef %403, i64 noundef %407, i64 noundef %411, i64 noundef %413, i64 noundef %420, i64 noundef %433, i64 noundef %445)
  store ptr %446, ptr %47, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #6
  %447 = load ptr, ptr %25, align 8, !tbaa !5
  %448 = load ptr, ptr %47, align 8, !tbaa !5
  %449 = load ptr, ptr %46, align 8, !tbaa !5
  %450 = call ptr @ggml_mul_mat(ptr noundef %447, ptr noundef %448, ptr noundef %449)
  store ptr %450, ptr %48, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #6
  %451 = load ptr, ptr %25, align 8, !tbaa !5
  %452 = load ptr, ptr %48, align 8, !tbaa !5
  %453 = call ptr @ggml_permute(ptr noundef %451, ptr noundef %452, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  store ptr %453, ptr %49, align 8, !tbaa !5
  %454 = load ptr, ptr %25, align 8, !tbaa !5
  %455 = load ptr, ptr %49, align 8, !tbaa !5
  %456 = load ptr, ptr %25, align 8, !tbaa !5
  %457 = load i32, ptr %16, align 4, !tbaa !9
  %458 = sext i32 %457 to i64
  %459 = load i32, ptr %14, align 4, !tbaa !9
  %460 = sext i32 %459 to i64
  %461 = call ptr @ggml_new_tensor_2d(ptr noundef %456, i32 noundef 0, i64 noundef %458, i64 noundef %460)
  %462 = call ptr @ggml_cpy(ptr noundef %454, ptr noundef %455, ptr noundef %461)
  store ptr %462, ptr %34, align 8, !tbaa !5
  %463 = load ptr, ptr %25, align 8, !tbaa !5
  %464 = load ptr, ptr %8, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.gptj_model, ptr %464, i32 0, i32 6
  %466 = load i32, ptr %33, align 4, !tbaa !9
  %467 = sext i32 %466 to i64
  %468 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %465, i64 noundef %467) #6
  %469 = getelementptr inbounds %struct.gptj_layer, ptr %468, i32 0, i32 5
  %470 = load ptr, ptr %469, align 8, !tbaa !58
  %471 = load ptr, ptr %34, align 8, !tbaa !5
  %472 = call ptr @ggml_mul_mat(ptr noundef %463, ptr noundef %470, ptr noundef %471)
  store ptr %472, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #6
  %473 = load ptr, ptr %34, align 8, !tbaa !5
  store ptr %473, ptr %50, align 8, !tbaa !5
  %474 = load ptr, ptr %25, align 8, !tbaa !5
  %475 = load ptr, ptr %8, align 8, !tbaa !5
  %476 = getelementptr inbounds %struct.gptj_model, ptr %475, i32 0, i32 6
  %477 = load i32, ptr %33, align 4, !tbaa !9
  %478 = sext i32 %477 to i64
  %479 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %476, i64 noundef %478) #6
  %480 = getelementptr inbounds %struct.gptj_layer, ptr %479, i32 0, i32 6
  %481 = load ptr, ptr %480, align 8, !tbaa !59
  %482 = load ptr, ptr %35, align 8, !tbaa !5
  %483 = call ptr @ggml_mul_mat(ptr noundef %474, ptr noundef %481, ptr noundef %482)
  store ptr %483, ptr %34, align 8, !tbaa !5
  %484 = load ptr, ptr %25, align 8, !tbaa !5
  %485 = load ptr, ptr %25, align 8, !tbaa !5
  %486 = load ptr, ptr %8, align 8, !tbaa !5
  %487 = getelementptr inbounds %struct.gptj_model, ptr %486, i32 0, i32 6
  %488 = load i32, ptr %33, align 4, !tbaa !9
  %489 = sext i32 %488 to i64
  %490 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %487, i64 noundef %489) #6
  %491 = getelementptr inbounds %struct.gptj_layer, ptr %490, i32 0, i32 7
  %492 = load ptr, ptr %491, align 8, !tbaa !60
  %493 = load ptr, ptr %34, align 8, !tbaa !5
  %494 = call ptr @ggml_repeat(ptr noundef %485, ptr noundef %492, ptr noundef %493)
  %495 = load ptr, ptr %34, align 8, !tbaa !5
  %496 = call ptr @ggml_add(ptr noundef %484, ptr noundef %494, ptr noundef %495)
  store ptr %496, ptr %34, align 8, !tbaa !5
  %497 = load ptr, ptr %25, align 8, !tbaa !5
  %498 = load ptr, ptr %34, align 8, !tbaa !5
  %499 = call ptr @ggml_gelu(ptr noundef %497, ptr noundef %498)
  store ptr %499, ptr %34, align 8, !tbaa !5
  %500 = load ptr, ptr %25, align 8, !tbaa !5
  %501 = load ptr, ptr %8, align 8, !tbaa !5
  %502 = getelementptr inbounds %struct.gptj_model, ptr %501, i32 0, i32 6
  %503 = load i32, ptr %33, align 4, !tbaa !9
  %504 = sext i32 %503 to i64
  %505 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %502, i64 noundef %504) #6
  %506 = getelementptr inbounds %struct.gptj_layer, ptr %505, i32 0, i32 8
  %507 = load ptr, ptr %506, align 8, !tbaa !61
  %508 = load ptr, ptr %34, align 8, !tbaa !5
  %509 = call ptr @ggml_mul_mat(ptr noundef %500, ptr noundef %507, ptr noundef %508)
  store ptr %509, ptr %34, align 8, !tbaa !5
  %510 = load ptr, ptr %25, align 8, !tbaa !5
  %511 = load ptr, ptr %25, align 8, !tbaa !5
  %512 = load ptr, ptr %8, align 8, !tbaa !5
  %513 = getelementptr inbounds %struct.gptj_model, ptr %512, i32 0, i32 6
  %514 = load i32, ptr %33, align 4, !tbaa !9
  %515 = sext i32 %514 to i64
  %516 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %513, i64 noundef %515) #6
  %517 = getelementptr inbounds %struct.gptj_layer, ptr %516, i32 0, i32 9
  %518 = load ptr, ptr %517, align 8, !tbaa !62
  %519 = load ptr, ptr %34, align 8, !tbaa !5
  %520 = call ptr @ggml_repeat(ptr noundef %511, ptr noundef %518, ptr noundef %519)
  %521 = load ptr, ptr %34, align 8, !tbaa !5
  %522 = call ptr @ggml_add(ptr noundef %510, ptr noundef %520, ptr noundef %521)
  store ptr %522, ptr %34, align 8, !tbaa !5
  %523 = load ptr, ptr %25, align 8, !tbaa !5
  %524 = load ptr, ptr %34, align 8, !tbaa !5
  %525 = load ptr, ptr %50, align 8, !tbaa !5
  %526 = call ptr @ggml_add(ptr noundef %523, ptr noundef %524, ptr noundef %525)
  store ptr %526, ptr %34, align 8, !tbaa !5
  %527 = load ptr, ptr %25, align 8, !tbaa !5
  %528 = load ptr, ptr %34, align 8, !tbaa !5
  %529 = load ptr, ptr %32, align 8, !tbaa !5
  %530 = call ptr @ggml_add(ptr noundef %527, ptr noundef %528, ptr noundef %529)
  store ptr %530, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %531

531:                                              ; preds = %175
  %532 = load i32, ptr %33, align 4, !tbaa !9
  %533 = add nsw i32 %532, 1
  store i32 %533, ptr %33, align 4, !tbaa !9
  br label %170, !llvm.loop !63

534:                                              ; preds = %174
  %535 = load ptr, ptr %25, align 8, !tbaa !5
  %536 = load ptr, ptr %32, align 8, !tbaa !5
  %537 = load ptr, ptr %15, align 8, !tbaa !5
  %538 = getelementptr inbounds %struct.gptj_hparams, ptr %537, i32 0, i32 7
  %539 = load float, ptr %538, align 4, !tbaa !49
  %540 = call ptr @ggml_norm(ptr noundef %535, ptr noundef %536, float noundef %539)
  store ptr %540, ptr %32, align 8, !tbaa !5
  %541 = load ptr, ptr %25, align 8, !tbaa !5
  %542 = load ptr, ptr %25, align 8, !tbaa !5
  %543 = load ptr, ptr %25, align 8, !tbaa !5
  %544 = load ptr, ptr %8, align 8, !tbaa !5
  %545 = getelementptr inbounds %struct.gptj_model, ptr %544, i32 0, i32 1
  %546 = load ptr, ptr %545, align 8, !tbaa !64
  %547 = load ptr, ptr %32, align 8, !tbaa !5
  %548 = call ptr @ggml_repeat(ptr noundef %543, ptr noundef %546, ptr noundef %547)
  %549 = load ptr, ptr %32, align 8, !tbaa !5
  %550 = call ptr @ggml_mul(ptr noundef %542, ptr noundef %548, ptr noundef %549)
  %551 = load ptr, ptr %25, align 8, !tbaa !5
  %552 = load ptr, ptr %8, align 8, !tbaa !5
  %553 = getelementptr inbounds %struct.gptj_model, ptr %552, i32 0, i32 2
  %554 = load ptr, ptr %553, align 8, !tbaa !65
  %555 = load ptr, ptr %32, align 8, !tbaa !5
  %556 = call ptr @ggml_repeat(ptr noundef %551, ptr noundef %554, ptr noundef %555)
  %557 = call ptr @ggml_add(ptr noundef %541, ptr noundef %550, ptr noundef %556)
  store ptr %557, ptr %32, align 8, !tbaa !5
  %558 = load ptr, ptr %25, align 8, !tbaa !5
  %559 = load ptr, ptr %8, align 8, !tbaa !5
  %560 = getelementptr inbounds %struct.gptj_model, ptr %559, i32 0, i32 4
  %561 = load ptr, ptr %560, align 8, !tbaa !66
  %562 = load ptr, ptr %32, align 8, !tbaa !5
  %563 = call ptr @ggml_mul_mat(ptr noundef %558, ptr noundef %561, ptr noundef %562)
  store ptr %563, ptr %32, align 8, !tbaa !5
  %564 = load ptr, ptr %25, align 8, !tbaa !5
  %565 = load ptr, ptr %25, align 8, !tbaa !5
  %566 = load ptr, ptr %8, align 8, !tbaa !5
  %567 = getelementptr inbounds %struct.gptj_model, ptr %566, i32 0, i32 5
  %568 = load ptr, ptr %567, align 8, !tbaa !67
  %569 = load ptr, ptr %32, align 8, !tbaa !5
  %570 = call ptr @ggml_repeat(ptr noundef %565, ptr noundef %568, ptr noundef %569)
  %571 = load ptr, ptr %32, align 8, !tbaa !5
  %572 = call ptr @ggml_add(ptr noundef %564, ptr noundef %570, ptr noundef %571)
  store ptr %572, ptr %32, align 8, !tbaa !5
  %573 = load ptr, ptr %27, align 8, !tbaa !5
  %574 = load ptr, ptr %32, align 8, !tbaa !5
  call void @ggml_build_forward_expand(ptr noundef %573, ptr noundef %574)
  %575 = load ptr, ptr %25, align 8, !tbaa !5
  %576 = load ptr, ptr %27, align 8, !tbaa !5
  %577 = load i32, ptr %9, align 4, !tbaa !9
  %578 = call i32 @ggml_graph_compute_with_ctx(ptr noundef %575, ptr noundef %576, i32 noundef %577)
  %579 = load ptr, ptr %12, align 8, !tbaa !5
  %580 = load i32, ptr %20, align 4, !tbaa !9
  %581 = sext i32 %580 to i64
  call void @_ZNSt6vectorIfSaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %579, i64 noundef %581)
  %582 = load ptr, ptr %12, align 8, !tbaa !5
  %583 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %582) #6
  %584 = load ptr, ptr %32, align 8, !tbaa !5
  %585 = call ptr @ggml_get_data(ptr noundef %584)
  %586 = load i32, ptr %20, align 4, !tbaa !9
  %587 = load i32, ptr %14, align 4, !tbaa !9
  %588 = sub nsw i32 %587, 1
  %589 = mul nsw i32 %586, %588
  %590 = sext i32 %589 to i64
  %591 = getelementptr inbounds float, ptr %585, i64 %590
  %592 = load i32, ptr %20, align 4, !tbaa !9
  %593 = sext i32 %592 to i64
  %594 = mul i64 4, %593
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %583, ptr align 4 %591, i64 %594, i1 false)
  %595 = load ptr, ptr %13, align 8, !tbaa !5
  %596 = load i64, ptr %595, align 8, !tbaa !20
  %597 = icmp eq i64 %596, 0
  br i1 %597, label %598, label %605

598:                                              ; preds = %534
  %599 = load ptr, ptr %25, align 8, !tbaa !5
  %600 = call i64 @ggml_used_mem(ptr noundef %599)
  %601 = load i32, ptr %14, align 4, !tbaa !9
  %602 = sext i32 %601 to i64
  %603 = udiv i64 %600, %602
  %604 = load ptr, ptr %13, align 8, !tbaa !5
  store i64 %603, ptr %604, align 8, !tbaa !20
  br label %605

605:                                              ; preds = %598, %534
  %606 = load ptr, ptr %25, align 8, !tbaa !5
  call void @ggml_free(ptr noundef %606)
  store i1 true, ptr %7, align 1
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %607

607:                                              ; preds = %605, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  %608 = load i1, ptr %7, align 1
  ret i1 %608
}

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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #7

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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #8

declare ptr @ggml_new_graph(ptr noundef) #2

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

declare i64 @ggml_element_size(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_add(ptr noundef, ptr noundef, ptr 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(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

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

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

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

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

declare ptr @ggml_view_2d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 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_scale_inplace(ptr noundef, ptr noundef, float noundef) #2

; Function Attrs: nounwind
declare double @sqrt(double noundef) #1

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

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

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

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

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

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

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

declare ptr @ggml_get_data(ptr noundef) #2

declare i64 @ggml_used_mem(ptr noundef) #2

declare void @ggml_free(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 }
attributes #7 = { nounwind allocsize(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 allocsize(1) "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 allocsize(0) }
attributes #10 = { nounwind allocsize(1) }

!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 = !{!"_ZTS12gptj_hparams", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !13, i64 28}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !10, i64 4}
!16 = !{!12, !10, i64 12}
!17 = !{!12, !10, i64 0}
!18 = !{!12, !10, i64 20}
!19 = !{!"branch_weights", i32 1, i32 1048575}
!20 = !{!21, !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!23, !21, i64 0}
!23 = !{!"_ZTS16ggml_init_params", !21, i64 0, !6, i64 8, !24, i64 16}
!24 = !{!"bool", !7, i64 0}
!25 = !{!23, !6, i64 8}
!26 = !{!23, !24, i64 16}
!27 = !{i64 0, i64 8, !20, i64 8, i64 8, !5, i64 16, i64 1, !28}
!28 = !{!24, !24, i64 0}
!29 = !{!30, !6, i64 248}
!30 = !{!"_ZTS11ggml_tensor", !31, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !32, i64 80, !7, i64 84, !10, i64 148, !7, i64 152, !6, i64 232, !21, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!31 = !{!"_ZTS9ggml_type", !7, i64 0}
!32 = !{!"_ZTS7ggml_op", !7, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!36, !6, i64 48}
!36 = !{!"_ZTS10gptj_model", !12, i64 0, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !37, i64 72, !6, i64 96, !6, i64 104, !6, i64 112, !41, i64 120}
!37 = !{!"_ZTSSt6vectorI10gptj_layerSaIS0_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseI10gptj_layerSaIS0_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseI10gptj_layerSaIS0_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseI10gptj_layerSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !42, i64 0}
!42 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !43, i64 0}
!43 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !44, i64 0, !46, i64 8}
!44 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !45, i64 0}
!45 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!46 = !{!"_ZTSSt15_Rb_tree_header", !47, i64 0, !21, i64 32}
!47 = !{!"_ZTSSt18_Rb_tree_node_base", !48, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!48 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!49 = !{!12, !13, i64 28}
!50 = !{!51, !6, i64 0}
!51 = !{!"_ZTS10gptj_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}
!52 = !{!51, !6, i64 8}
!53 = !{!51, !6, i64 16}
!54 = !{!51, !6, i64 24}
!55 = !{!51, !6, i64 32}
!56 = !{!36, !6, i64 96}
!57 = !{!36, !6, i64 104}
!58 = !{!51, !6, i64 40}
!59 = !{!51, !6, i64 48}
!60 = !{!51, !6, i64 56}
!61 = !{!51, !6, i64 64}
!62 = !{!51, !6, i64 72}
!63 = distinct !{!63, !34}
!64 = !{!36, !6, i64 32}
!65 = !{!36, !6, i64 40}
!66 = !{!36, !6, i64 56}
!67 = !{!36, !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"

%struct.ggml_init_params = type { i64, ptr, i8 }

@stderr = external local_unnamed_addr global ptr, align 8
@_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size = external hidden local_unnamed_addr global i64, align 8
@_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf = external hidden local_unnamed_addr global ptr, align 8
@_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf = external hidden global i64, align 8
@.str.40 = external hidden unnamed_addr constant [34 x i8], align 1
@__func__._Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm = external hidden unnamed_addr constant [10 x i8], align 1

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

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

; Function Attrs: mustprogress 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) #2

declare ptr @ggml_new_tensor_2d(ptr noundef, i32 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm(ptr noundef nonnull align 8 dereferenceable(168) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr nocapture noundef nonnull align 8 dereferenceable(8) %5) local_unnamed_addr #3 {
  %7 = alloca %struct.ggml_init_params, align 8
  %8 = tail call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  %9 = trunc i64 %8 to i32
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = load i32, ptr %12, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !12
  %16 = getelementptr inbounds i8, ptr %0, i64 12
  %17 = load i32, ptr %16, align 4, !tbaa !13
  %18 = load i32, ptr %0, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %0, i64 20
  %20 = load i32, ptr %19, align 4, !tbaa !15
  %21 = load atomic i8, ptr @_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf acquire, align 8
  %22 = icmp eq i8 %21, 0
  br i1 %22, label %23, label %28, !prof !16

23:                                               ; preds = %6
  %24 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf) #9
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %28, label %25

25:                                               ; preds = %23
  %26 = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !17
  %27 = tail call noalias ptr @malloc(i64 noundef %26) #10
  store ptr %27, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !19
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf) #9
  br label %28

28:                                               ; preds = %25, %23, %6
  %29 = load i64, ptr %5, align 8, !tbaa !17
  %.not244 = icmp eq i64 %29, 0
  %.pre259 = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !17
  br i1 %.not244, label %..critedge_crit_edge, label %30

..critedge_crit_edge:                             ; preds = %28
  %.pre260 = load ptr, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !19
  %.pre262 = shl i64 %8, 32
  %.pre263 = ashr exact i64 %.pre262, 32
  br label %.critedge

30:                                               ; preds = %28
  %sext = shl i64 %8, 32
  %31 = ashr exact i64 %sext, 32
  %32 = mul i64 %29, %31
  %33 = icmp ugt i64 %32, %.pre259
  %.pre261 = load ptr, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !19
  br i1 %33, label %34, label %.critedge

34:                                               ; preds = %30
  %35 = uitofp i64 %32 to double
  %36 = fmul double %35, 1.100000e+00
  %37 = fptoui double %36 to i64
  store i64 %37, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !17
  %38 = tail call ptr @realloc(ptr noundef %.pre261, i64 noundef %37) #11
  store ptr %38, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE3buf, align 8, !tbaa !19
  %.not245 = icmp eq ptr %38, null
  %.pre = load i64, ptr @_ZZ9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERmE8buf_size, align 8, !tbaa !17
  br i1 %.not245, label %39, label %.critedge

39:                                               ; preds = %34
  %40 = load ptr, ptr @stderr, align 8, !tbaa !19
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.40, ptr noundef nonnull @__func__._Z9gptj_evalRK10gptj_modeliiRKSt6vectorIiSaIiEERS2_IfSaIfEERm, i64 noundef %.pre) #12
  br label %226

.critedge:                                        ; preds = %..critedge_crit_edge, %34, %30
  %.pre-phi = phi i64 [ %.pre263, %..critedge_crit_edge ], [ %31, %34 ], [ %31, %30 ]
  %42 = phi ptr [ %.pre260, %..critedge_crit_edge ], [ %38, %34 ], [ %.pre261, %30 ]
  %43 = phi i64 [ %.pre259, %..critedge_crit_edge ], [ %.pre, %34 ], [ %.pre259, %30 ]
  store i64 %43, ptr %7, align 8, !tbaa !17
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %42, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !19
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 16
  store i8 0, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !21
  %44 = tail call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %7)
  %45 = tail call ptr @ggml_new_graph(ptr noundef %44)
  %46 = tail call ptr @ggml_new_tensor_1d(ptr noundef %44, i32 noundef 26, i64 noundef %.pre-phi)
  %47 = getelementptr inbounds i8, ptr %46, i64 248
  %48 = load ptr, ptr %47, align 8, !tbaa !23
  %49 = icmp sgt i32 %9, 0
  br i1 %49, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.critedge
  %wide.trip.count = and i64 %8, 2147483647
  %min.iters.check = icmp ult i64 %wide.trip.count, 8
  br i1 %min.iters.check, label %.lr.ph.preheader265, label %vector.ph

.lr.ph.preheader265:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.mod.vf = and i64 %8, 7
  %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %2, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %50 = getelementptr inbounds i32, ptr %48, i64 %index
  %51 = add <4 x i32> %vec.ind, %broadcast.splat
  %52 = add <4 x i32> %step.add, %broadcast.splat
  %53 = getelementptr inbounds i8, ptr %50, i64 16
  store <4 x i32> %51, ptr %50, align 4, !tbaa !27
  store <4 x i32> %52, ptr %53, align 4, !tbaa !27
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %54 = icmp eq i64 %index.next, %n.vec
  br i1 %54, label %middle.block, label %vector.body, !llvm.loop !28

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.mod.vf, 0
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader265

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.critedge
  %55 = tail call ptr @ggml_new_tensor_1d(ptr noundef %44, i32 noundef 26, i64 noundef %.pre-phi)
  %56 = getelementptr inbounds i8, ptr %55, i64 248
  %57 = load ptr, ptr %56, align 8, !tbaa !23
  %58 = tail call noundef ptr @_ZNKSt6vectorIiSaIiEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #9
  %59 = tail call i64 @ggml_element_size(ptr noundef %55)
  %60 = mul i64 %59, %.pre-phi
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %57, ptr align 4 %58, i64 %60, i1 false)
  %61 = getelementptr inbounds i8, ptr %0, i64 48
  %62 = load ptr, ptr %61, align 8, !tbaa !32
  %63 = tail call ptr @ggml_get_rows(ptr noundef %44, ptr noundef %62, ptr noundef %55)
  %64 = icmp sgt i32 %13, 0
  br i1 %64, label %.lr.ph251, label %._crit_edge252

.lr.ph251:                                        ; preds = %._crit_edge
  %65 = getelementptr inbounds i8, ptr %0, i64 28
  %66 = getelementptr inbounds i8, ptr %0, i64 72
  %67 = sext i32 %17 to i64
  %68 = getelementptr inbounds i8, ptr %0, i64 96
  %69 = mul nsw i32 %11, %9
  %70 = sext i32 %69 to i64
  %71 = sext i32 %11 to i64
  %72 = getelementptr inbounds i8, ptr %0, i64 104
  %73 = sext i32 %15 to i64
  %74 = sext i32 %2 to i64
  %75 = add nsw i32 %9, %2
  %76 = mul nsw i32 %75, %11
  %77 = sext i32 %76 to i64
  %78 = sext i32 %75 to i64
  %79 = sitofp i32 %11 to float
  %80 = sitofp i32 %17 to float
  %81 = fdiv float %79, %80
  %82 = fpext float %81 to double
  %83 = mul nsw i64 %73, %71
  %wide.trip.count257 = zext nneg i32 %13 to i64
  br label %116

.lr.ph:                                           ; preds = %.lr.ph.preheader265, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader265 ]
  %84 = getelementptr inbounds i32, ptr %48, i64 %indvars.iv
  %85 = trunc i64 %indvars.iv to i32
  %86 = add i32 %85, %2
  store i32 %86, ptr %84, align 4, !tbaa !27
  %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 %.lr.ph, !llvm.loop !46

._crit_edge252:                                   ; preds = %116, %._crit_edge
  %.0240.lcssa = phi ptr [ %63, %._crit_edge ], [ %221, %116 ]
  %87 = getelementptr inbounds i8, ptr %0, i64 28
  %88 = load float, ptr %87, align 4, !tbaa !47
  %89 = tail call ptr @ggml_norm(ptr noundef %44, ptr noundef %.0240.lcssa, float noundef %88)
  %90 = getelementptr inbounds i8, ptr %0, i64 32
  %91 = load ptr, ptr %90, align 8, !tbaa !48
  %92 = tail call ptr @ggml_repeat(ptr noundef %44, ptr noundef %91, ptr noundef %89)
  %93 = tail call ptr @ggml_mul(ptr noundef %44, ptr noundef %92, ptr noundef %89)
  %94 = getelementptr inbounds i8, ptr %0, i64 40
  %95 = load ptr, ptr %94, align 8, !tbaa !49
  %96 = tail call ptr @ggml_repeat(ptr noundef %44, ptr noundef %95, ptr noundef %89)
  %97 = tail call ptr @ggml_add(ptr noundef %44, ptr noundef %93, ptr noundef %96)
  %98 = getelementptr inbounds i8, ptr %0, i64 56
  %99 = load ptr, ptr %98, align 8, !tbaa !50
  %100 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %99, ptr noundef %97)
  %101 = getelementptr inbounds i8, ptr %0, i64 64
  %102 = load ptr, ptr %101, align 8, !tbaa !51
  %103 = tail call ptr @ggml_repeat(ptr noundef %44, ptr noundef %102, ptr noundef %100)
  %104 = tail call ptr @ggml_add(ptr noundef %44, ptr noundef %103, ptr noundef %100)
  tail call void @ggml_build_forward_expand(ptr noundef %45, ptr noundef %104)
  %105 = tail call i32 @ggml_graph_compute_with_ctx(ptr noundef %44, ptr noundef %45, i32 noundef %1)
  %106 = sext i32 %18 to i64
  tail call void @_ZNSt6vectorIfSaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %106)
  %107 = tail call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %108 = tail call ptr @ggml_get_data(ptr noundef %104)
  %109 = add nsw i32 %9, -1
  %110 = mul nsw i32 %18, %109
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds float, ptr %108, i64 %111
  %113 = shl nsw i64 %106, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 4 %112, i64 %113, i1 false)
  %114 = load i64, ptr %5, align 8, !tbaa !17
  %115 = icmp eq i64 %114, 0
  br i1 %115, label %222, label %225

116:                                              ; preds = %.lr.ph251, %116
  %indvars.iv254 = phi i64 [ 0, %.lr.ph251 ], [ %indvars.iv.next255, %116 ]
  %.0240249 = phi ptr [ %63, %.lr.ph251 ], [ %221, %116 ]
  %117 = load float, ptr %65, align 4, !tbaa !47
  %118 = tail call ptr @ggml_norm(ptr noundef %44, ptr noundef %.0240249, float noundef %117)
  %119 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %120 = load ptr, ptr %119, align 8, !tbaa !52
  %121 = tail call ptr @ggml_repeat(ptr noundef %44, ptr noundef %120, ptr noundef %118)
  %122 = tail call ptr @ggml_mul(ptr noundef %44, ptr noundef %121, ptr noundef %118)
  %123 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %124 = getelementptr inbounds i8, ptr %123, i64 8
  %125 = load ptr, ptr %124, align 8, !tbaa !54
  %126 = tail call ptr @ggml_repeat(ptr noundef %44, ptr noundef %125, ptr noundef %118)
  %127 = tail call ptr @ggml_add(ptr noundef %44, ptr noundef %122, ptr noundef %126)
  %128 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %129 = getelementptr inbounds i8, ptr %128, i64 16
  %130 = load ptr, ptr %129, align 8, !tbaa !55
  %131 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %130, ptr noundef %127)
  %132 = sdiv i32 %11, %17
  %133 = sext i32 %132 to i64
  %134 = tail call ptr @ggml_reshape_3d(ptr noundef %44, ptr noundef %131, i64 noundef %133, i64 noundef %67, i64 noundef %.pre-phi)
  %135 = tail call ptr @ggml_rope_inplace(ptr noundef %44, ptr noundef %134, ptr noundef %46, i32 noundef %20, i32 noundef 0)
  %136 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %137 = getelementptr inbounds i8, ptr %136, i64 24
  %138 = load ptr, ptr %137, align 8, !tbaa !56
  %139 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %138, ptr noundef %127)
  %140 = tail call ptr @ggml_reshape_3d(ptr noundef %44, ptr noundef %139, i64 noundef %133, i64 noundef %67, i64 noundef %.pre-phi)
  %141 = tail call ptr @ggml_rope_inplace(ptr noundef %44, ptr noundef %140, ptr noundef %46, i32 noundef %20, i32 noundef 0)
  %142 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %143 = getelementptr inbounds i8, ptr %142, i64 32
  %144 = load ptr, ptr %143, align 8, !tbaa !57
  %145 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %144, ptr noundef %127)
  %146 = tail call ptr @ggml_transpose(ptr noundef %44, ptr noundef %145)
  %147 = load ptr, ptr %68, align 8, !tbaa !58
  %148 = tail call i64 @ggml_element_size(ptr noundef %147)
  %149 = mul nsw i64 %indvars.iv254, %73
  %150 = add nsw i64 %149, %74
  %151 = mul nsw i64 %150, %71
  %152 = mul i64 %151, %148
  %153 = tail call ptr @ggml_view_1d(ptr noundef %44, ptr noundef %147, i64 noundef %70, i64 noundef %152)
  %154 = load ptr, ptr %72, align 8, !tbaa !59
  %155 = tail call i64 @ggml_element_size(ptr noundef %154)
  %156 = mul i64 %155, %73
  %157 = load ptr, ptr %72, align 8, !tbaa !59
  %158 = tail call i64 @ggml_element_size(ptr noundef %157)
  %159 = mul nsw i64 %149, %71
  %160 = mul i64 %159, %158
  %161 = load ptr, ptr %72, align 8, !tbaa !59
  %162 = tail call i64 @ggml_element_size(ptr noundef %161)
  %163 = mul i64 %162, %74
  %164 = add i64 %163, %160
  %165 = tail call ptr @ggml_view_2d(ptr noundef %44, ptr noundef %154, i64 noundef %.pre-phi, i64 noundef %71, i64 noundef %156, i64 noundef %164)
  %166 = tail call ptr @ggml_cpy(ptr noundef %44, ptr noundef %141, ptr noundef %153)
  tail call void @ggml_build_forward_expand(ptr noundef %45, ptr noundef %166)
  %167 = tail call ptr @ggml_cpy(ptr noundef %44, ptr noundef %146, ptr noundef %165)
  tail call void @ggml_build_forward_expand(ptr noundef %45, ptr noundef %167)
  %168 = tail call ptr @ggml_permute(ptr noundef %44, ptr noundef %135, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %169 = load ptr, ptr %68, align 8, !tbaa !58
  %170 = tail call i64 @ggml_element_size(ptr noundef %169)
  %171 = mul i64 %159, %170
  %172 = tail call ptr @ggml_view_1d(ptr noundef %44, ptr noundef %169, i64 noundef %77, i64 noundef %171)
  %173 = tail call ptr @ggml_reshape_3d(ptr noundef %44, ptr noundef %172, i64 noundef %133, i64 noundef %67, i64 noundef %78)
  %174 = tail call ptr @ggml_permute(ptr noundef %44, ptr noundef %173, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %175 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %174, ptr noundef %168)
  %176 = tail call double @sqrt(double noundef %82) #9
  %177 = fdiv double 1.000000e+00, %176
  %178 = fptrunc double %177 to float
  %179 = tail call ptr @ggml_scale_inplace(ptr noundef %44, ptr noundef %175, float noundef %178)
  %180 = tail call ptr @ggml_diag_mask_inf_inplace(ptr noundef %44, ptr noundef %179, i32 noundef %2)
  %181 = tail call ptr @ggml_soft_max_inplace(ptr noundef %44, ptr noundef %180)
  %182 = load ptr, ptr %72, align 8, !tbaa !59
  %183 = tail call i64 @ggml_element_size(ptr noundef %182)
  %184 = mul i64 %183, %73
  %185 = load ptr, ptr %72, align 8, !tbaa !59
  %186 = tail call i64 @ggml_element_size(ptr noundef %185)
  %187 = mul i64 %83, %186
  %188 = udiv i64 %187, %67
  %189 = load ptr, ptr %72, align 8, !tbaa !59
  %190 = tail call i64 @ggml_element_size(ptr noundef %189)
  %191 = mul i64 %159, %190
  %192 = tail call ptr @ggml_view_3d(ptr noundef %44, ptr noundef %182, i64 noundef %78, i64 noundef %133, i64 noundef %67, i64 noundef %184, i64 noundef %188, i64 noundef %191)
  %193 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %192, ptr noundef %181)
  %194 = tail call ptr @ggml_permute(ptr noundef %44, ptr noundef %193, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %195 = tail call ptr @ggml_new_tensor_2d(ptr noundef %44, i32 noundef 0, i64 noundef %71, i64 noundef %.pre-phi)
  %196 = tail call ptr @ggml_cpy(ptr noundef %44, ptr noundef %194, ptr noundef %195)
  %197 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %198 = getelementptr inbounds i8, ptr %197, i64 40
  %199 = load ptr, ptr %198, align 8, !tbaa !60
  %200 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %199, ptr noundef %196)
  %201 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %202 = getelementptr inbounds i8, ptr %201, i64 48
  %203 = load ptr, ptr %202, align 8, !tbaa !61
  %204 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %203, ptr noundef %127)
  %205 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %206 = getelementptr inbounds i8, ptr %205, i64 56
  %207 = load ptr, ptr %206, align 8, !tbaa !62
  %208 = tail call ptr @ggml_repeat(ptr noundef %44, ptr noundef %207, ptr noundef %204)
  %209 = tail call ptr @ggml_add(ptr noundef %44, ptr noundef %208, ptr noundef %204)
  %210 = tail call ptr @ggml_gelu(ptr noundef %44, ptr noundef %209)
  %211 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %212 = getelementptr inbounds i8, ptr %211, i64 64
  %213 = load ptr, ptr %212, align 8, !tbaa !63
  %214 = tail call ptr @ggml_mul_mat(ptr noundef %44, ptr noundef %213, ptr noundef %210)
  %215 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNKSt6vectorI10gptj_layerSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %indvars.iv254) #9
  %216 = getelementptr inbounds i8, ptr %215, i64 72
  %217 = load ptr, ptr %216, align 8, !tbaa !64
  %218 = tail call ptr @ggml_repeat(ptr noundef %44, ptr noundef %217, ptr noundef %214)
  %219 = tail call ptr @ggml_add(ptr noundef %44, ptr noundef %218, ptr noundef %214)
  %220 = tail call ptr @ggml_add(ptr noundef %44, ptr noundef %219, ptr noundef %200)
  %221 = tail call ptr @ggml_add(ptr noundef %44, ptr noundef %220, ptr noundef %.0240249)
  %indvars.iv.next255 = add nuw nsw i64 %indvars.iv254, 1
  %exitcond258.not = icmp eq i64 %indvars.iv.next255, %wide.trip.count257
  br i1 %exitcond258.not, label %._crit_edge252, label %116, !llvm.loop !65

222:                                              ; preds = %._crit_edge252
  %223 = tail call i64 @ggml_used_mem(ptr noundef %44)
  %224 = udiv i64 %223, %.pre-phi
  store i64 %224, ptr %5, align 8, !tbaa !17
  br label %225

225:                                              ; preds = %222, %._crit_edge252
  tail call void @ggml_free(ptr noundef %44)
  br label %226

226:                                              ; preds = %39, %225
  %.1 = phi i1 [ true, %225 ], [ false, %39 ]
  ret i1 %.1
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #7

declare ptr @ggml_new_graph(ptr noundef) local_unnamed_addr #1

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

declare i64 @ggml_element_size(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

declare ptr @ggml_rope_inplace(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

declare ptr @ggml_transpose(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

declare ptr @ggml_scale_inplace(ptr noundef, ptr noundef, float noundef) local_unnamed_addr #1

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

declare ptr @ggml_diag_mask_inf_inplace(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare ptr @ggml_soft_max_inplace(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ggml_view_3d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

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

declare i32 @ggml_graph_compute_with_ctx(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

declare ptr @ggml_get_data(ptr noundef) local_unnamed_addr #1

declare i64 @ggml_used_mem(ptr noundef) local_unnamed_addr #1

declare void @ggml_free(ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #1 = { "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { nofree nounwind }
attributes #6 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #9 = { nounwind }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { nounwind allocsize(1) }
attributes #12 = { 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 8}
!6 = !{!"_ZTS12gptj_hparams", !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 = !{!"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 = !{!6, !7, i64 0}
!15 = !{!6, !7, i64 20}
!16 = !{!"branch_weights", i32 1, i32 1048575}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !8, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"bool", !8, i64 0}
!23 = !{!24, !20, i64 248}
!24 = !{!"_ZTS11ggml_tensor", !25, i64 0, !20, i64 8, !8, i64 16, !8, i64 48, !26, i64 80, !8, i64 84, !7, i64 148, !8, i64 152, !20, i64 232, !18, i64 240, !20, i64 248, !8, i64 256, !20, i64 320, !8, i64 328}
!25 = !{!"_ZTS9ggml_type", !8, i64 0}
!26 = !{!"_ZTS7ggml_op", !8, i64 0}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29, !30, !31}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!"llvm.loop.isvectorized", i32 1}
!31 = !{!"llvm.loop.unroll.runtime.disable"}
!32 = !{!33, !20, i64 48}
!33 = !{!"_ZTS10gptj_model", !6, i64 0, !20, i64 32, !20, i64 40, !20, i64 48, !20, i64 56, !20, i64 64, !34, i64 72, !20, i64 96, !20, i64 104, !20, i64 112, !38, i64 120}
!34 = !{!"_ZTSSt6vectorI10gptj_layerSaIS0_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseI10gptj_layerSaIS0_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseI10gptj_layerSaIS0_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseI10gptj_layerSaIS0_EE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!38 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP11ggml_tensorSt4lessIS5_ESaISt4pairIKS5_S7_EEE", !39, i64 0}
!39 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE", !40, i64 0}
!40 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EE13_Rb_tree_implISE_Lb1EEE", !41, i64 0, !43, i64 8}
!41 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !42, i64 0}
!42 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!43 = !{!"_ZTSSt15_Rb_tree_header", !44, i64 0, !18, i64 32}
!44 = !{!"_ZTSSt18_Rb_tree_node_base", !45, i64 0, !20, i64 8, !20, i64 16, !20, i64 24}
!45 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!46 = distinct !{!46, !29, !31, !30}
!47 = !{!6, !10, i64 28}
!48 = !{!33, !20, i64 32}
!49 = !{!33, !20, i64 40}
!50 = !{!33, !20, i64 56}
!51 = !{!33, !20, i64 64}
!52 = !{!53, !20, i64 0}
!53 = !{!"_ZTS10gptj_layer", !20, i64 0, !20, i64 8, !20, i64 16, !20, i64 24, !20, i64 32, !20, i64 40, !20, i64 48, !20, i64 56, !20, i64 64, !20, i64 72}
!54 = !{!53, !20, i64 8}
!55 = !{!53, !20, i64 16}
!56 = !{!53, !20, i64 24}
!57 = !{!53, !20, i64 32}
!58 = !{!33, !20, i64 96}
!59 = !{!33, !20, i64 104}
!60 = !{!53, !20, i64 40}
!61 = !{!53, !20, i64 48}
!62 = !{!53, !20, i64 56}
!63 = !{!53, !20, i64 64}
!64 = !{!53, !20, i64 72}
!65 = distinct !{!65, !29}


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