; LLVM IR from ggml-org/ggml :: examples/sam/main.ll (Z16sam_encode_imageRK9sam_modelR9sam_stateRK13sam_image_f32)

; 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.sam_model = type { %struct.sam_hparams, %struct.sam_encoder_image, %struct.sam_encoder_prompt, %struct.sam_decoder_mask, ptr, %"class.std::map" }
%struct.sam_hparams = type { i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float }
%struct.sam_encoder_image = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.9" }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<sam_layer_enc, std::allocator<sam_layer_enc>>::_Vector_impl" }
%"struct.std::_Vector_base<sam_layer_enc, std::allocator<sam_layer_enc>>::_Vector_impl" = type { %"struct.std::_Vector_base<sam_layer_enc, std::allocator<sam_layer_enc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sam_layer_enc, std::allocator<sam_layer_enc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.sam_encoder_prompt = type { ptr, ptr, %"class.std::vector.14", ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<ggml_tensor *, std::allocator<ggml_tensor *>>::_Vector_impl" }
%"struct.std::_Vector_base<ggml_tensor *, std::allocator<ggml_tensor *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ggml_tensor *, std::allocator<ggml_tensor *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ggml_tensor *, std::allocator<ggml_tensor *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.sam_decoder_mask = type { %"class.std::vector.19", %struct.sam_layer_dec_transformer_attn, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.24", ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.19" = type { %"struct.std::_Vector_base.20" }
%"struct.std::_Vector_base.20" = type { %"struct.std::_Vector_base<sam_layer_dec_transformer, std::allocator<sam_layer_dec_transformer>>::_Vector_impl" }
%"struct.std::_Vector_base<sam_layer_dec_transformer, std::allocator<sam_layer_dec_transformer>>::_Vector_impl" = type { %"struct.std::_Vector_base<sam_layer_dec_transformer, std::allocator<sam_layer_dec_transformer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sam_layer_dec_transformer, std::allocator<sam_layer_dec_transformer>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.sam_layer_dec_transformer_attn = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<sam_layer_dec_output_hypernet_mlps, std::allocator<sam_layer_dec_output_hypernet_mlps>>::_Vector_impl" }
%"struct.std::_Vector_base<sam_layer_dec_output_hypernet_mlps, std::allocator<sam_layer_dec_output_hypernet_mlps>>::_Vector_impl" = type { %"struct.std::_Vector_base<sam_layer_dec_output_hypernet_mlps, std::allocator<sam_layer_dec_output_hypernet_mlps>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sam_layer_dec_output_hypernet_mlps, std::allocator<sam_layer_dec_output_hypernet_mlps>>::_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.sam_state = type { ptr, ptr, ptr, ptr, %"class.std::vector", %"class.std::vector", %"class.std::vector", ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.sam_layer_enc = type { ptr, ptr, 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] }
%struct.sam_image_f32 = type { i32, i32, %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.132 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [37 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: 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) #1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11sam_hparams14n_enc_head_dimEv(ptr noundef nonnull align 4 dereferenceable(52)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11sam_hparams13n_window_sizeEv(ptr noundef nonnull align 4 dereferenceable(52)) #2 align 2

declare ptr @ggml_new_tensor_4d(ptr noundef, i32 noundef, i64 noundef, i64 noundef, i64 noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11sam_hparams14is_global_attnEi(ptr noundef nonnull align 4 dereferenceable(52), i32 noundef) #4 align 2

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

declare void @ggml_set_input(ptr noundef) #3

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

declare ptr @ggml_cont(ptr noundef, ptr noundef) #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z17sam_layer_norm_2dP12ggml_contextP11ggml_tensoriS2_S2_f(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, float noundef) #4

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z16sam_encode_imageRK9sam_modelR9sam_stateRK13sam_image_f32(ptr noundef nonnull align 8 dereferenceable(496) %0, ptr noundef nonnull align 8 dereferenceable(112) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %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 i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %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 i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %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
  %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 i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.sam_model, ptr %53, i32 0, i32 0
  store ptr %54, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.sam_model, ptr %55, i32 0, i32 1
  store ptr %56, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.sam_hparams, ptr %57, i32 0, i32 0
  %59 = load i32, ptr %58, align 4, !tbaa !9
  store i32 %59, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.sam_hparams, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 4, !tbaa !14
  store i32 %62, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.sam_hparams, ptr %63, i32 0, i32 2
  %65 = load i32, ptr %64, align 4, !tbaa !15
  store i32 %65, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = call noundef i32 @_ZNK11sam_hparams14n_enc_head_dimEv(ptr noundef nonnull align 4 dereferenceable(52) %66)
  store i32 %67, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.sam_hparams, ptr %68, i32 0, i32 3
  %70 = load i32, ptr %69, align 4, !tbaa !16
  store i32 %70, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = call noundef i32 @_ZNK11sam_hparams10n_img_sizeEv(ptr noundef nonnull align 4 dereferenceable(52) %71)
  store i32 %72, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = call noundef i32 @_ZNK11sam_hparams13n_window_sizeEv(ptr noundef nonnull align 4 dereferenceable(52) %73)
  store i32 %74, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #7
  %75 = getelementptr inbounds %struct.ggml_init_params, ptr %16, i32 0, i32 0
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.sam_state, ptr %76, i32 0, i32 5
  %78 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #7
  store i64 %78, ptr %75, align 8, !tbaa !17
  %79 = getelementptr inbounds %struct.ggml_init_params, ptr %16, i32 0, i32 1
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.sam_state, ptr %80, i32 0, i32 5
  %82 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %81) #7
  store ptr %82, ptr %79, align 8, !tbaa !21
  %83 = getelementptr inbounds %struct.ggml_init_params, ptr %16, i32 0, i32 2
  store i8 1, ptr %83, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %16, i64 24, i1 false), !tbaa.struct !23
  %84 = call ptr @ggml_init(ptr noundef byval(%struct.ggml_init_params) align 8 %18)
  store ptr %84, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = call ptr @ggml_new_graph(ptr noundef %85)
  store ptr %86, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %87 = load ptr, ptr %17, align 8, !tbaa !5
  %88 = load i32, ptr %14, align 4, !tbaa !13
  %89 = sext i32 %88 to i64
  %90 = load i32, ptr %14, align 4, !tbaa !13
  %91 = sext i32 %90 to i64
  %92 = call ptr @ggml_new_tensor_4d(ptr noundef %87, i32 noundef 0, i64 noundef %89, i64 noundef %91, i64 noundef 3, i64 noundef 1)
  store ptr %92, ptr %20, align 8, !tbaa !5
  %93 = load ptr, ptr %20, align 8, !tbaa !5
  %94 = call ptr @ggml_set_name(ptr noundef %93, ptr noundef @.str.139)
  %95 = load ptr, ptr %20, align 8, !tbaa !5
  call void @ggml_set_input(ptr noundef %95)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %96 = load ptr, ptr %17, align 8, !tbaa !5
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.sam_encoder_image, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !26
  %100 = load ptr, ptr %20, align 8, !tbaa !5
  %101 = call ptr @ggml_conv_2d_sk_p0(ptr noundef %96, ptr noundef %99, ptr noundef %100)
  store ptr %101, ptr %21, align 8, !tbaa !5
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  %103 = load ptr, ptr %21, align 8, !tbaa !5
  %104 = load ptr, ptr %17, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.sam_encoder_image, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !32
  %108 = load ptr, ptr %21, align 8, !tbaa !5
  %109 = call ptr @ggml_repeat(ptr noundef %104, ptr noundef %107, ptr noundef %108)
  %110 = call ptr @ggml_add_inplace(ptr noundef %102, ptr noundef %103, ptr noundef %109)
  store ptr %110, ptr %21, align 8, !tbaa !5
  %111 = load ptr, ptr %17, align 8, !tbaa !5
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = load ptr, ptr %21, align 8, !tbaa !5
  %114 = call ptr @ggml_permute(ptr noundef %112, ptr noundef %113, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 3)
  %115 = call ptr @ggml_cont(ptr noundef %111, ptr noundef %114)
  store ptr %115, ptr %21, align 8, !tbaa !5
  %116 = load ptr, ptr %17, align 8, !tbaa !5
  %117 = load ptr, ptr %21, align 8, !tbaa !5
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.sam_encoder_image, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !33
  %121 = call ptr @ggml_add_inplace(ptr noundef %116, ptr noundef %117, ptr noundef %120)
  store ptr %121, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %122, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !13
  br label %123

123:                                              ; preds = %540, %3
  %124 = load i32, ptr %23, align 4, !tbaa !13
  %125 = load i32, ptr %10, align 4, !tbaa !13
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %543

128:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.sam_encoder_image, ptr %129, i32 0, i32 9
  %131 = load i32, ptr %23, align 4, !tbaa !13
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 8 dereferenceable(112) ptr @_ZNKSt6vectorI13sam_layer_encSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %132) #7
  store ptr %133, ptr %24, align 8, !tbaa !5
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  %135 = load ptr, ptr %22, align 8, !tbaa !5
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.sam_hparams, ptr %136, i32 0, i32 11
  %138 = load float, ptr %137, align 4, !tbaa !34
  %139 = call ptr @ggml_norm(ptr noundef %134, ptr noundef %135, float noundef %138)
  store ptr %139, ptr %21, align 8, !tbaa !5
  %140 = load ptr, ptr %17, align 8, !tbaa !5
  %141 = load ptr, ptr %21, align 8, !tbaa !5
  %142 = load ptr, ptr %24, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.sam_layer_enc, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !35
  %145 = call ptr @ggml_mul(ptr noundef %140, ptr noundef %141, ptr noundef %144)
  store ptr %145, ptr %21, align 8, !tbaa !5
  %146 = load ptr, ptr %17, align 8, !tbaa !5
  %147 = load ptr, ptr %21, align 8, !tbaa !5
  %148 = load ptr, ptr %24, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.sam_layer_enc, ptr %148, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !37
  %151 = call ptr @ggml_add_inplace(ptr noundef %146, ptr noundef %147, ptr noundef %150)
  store ptr %151, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %152 = load ptr, ptr %21, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.ggml_tensor, ptr %152, i32 0, i32 2
  %154 = getelementptr inbounds [4 x i64], ptr %153, i64 0, i64 1
  %155 = load i64, ptr %154, align 8, !tbaa !24
  store i64 %155, ptr %25, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %156 = load ptr, ptr %21, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.ggml_tensor, ptr %156, i32 0, i32 2
  %158 = getelementptr inbounds [4 x i64], ptr %157, i64 0, i64 2
  %159 = load i64, ptr %158, align 8, !tbaa !24
  store i64 %159, ptr %26, align 8, !tbaa !24
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = load i32, ptr %23, align 4, !tbaa !13
  %162 = call noundef zeroext i1 @_ZNK11sam_hparams14is_global_attnEi(ptr noundef nonnull align 4 dereferenceable(52) %160, i32 noundef %161)
  %163 = zext i1 %162 to i32
  %164 = icmp eq i32 %163, 0
  br i1 %164, label %165, label %170

165:                                              ; preds = %128
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = load ptr, ptr %21, align 8, !tbaa !5
  %168 = load i32, ptr %15, align 4, !tbaa !13
  %169 = call ptr @ggml_win_part(ptr noundef %166, ptr noundef %167, i32 noundef %168)
  store ptr %169, ptr %21, align 8, !tbaa !5
  br label %170

170:                                              ; preds = %165, %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %171 = load ptr, ptr %21, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.ggml_tensor, ptr %171, i32 0, i32 2
  %173 = getelementptr inbounds [4 x i64], ptr %172, i64 0, i64 1
  %174 = load i64, ptr %173, align 8, !tbaa !24
  store i64 %174, ptr %27, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %175 = load ptr, ptr %21, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.ggml_tensor, ptr %175, i32 0, i32 2
  %177 = getelementptr inbounds [4 x i64], ptr %176, i64 0, i64 2
  %178 = load i64, ptr %177, align 8, !tbaa !24
  store i64 %178, ptr %28, align 8, !tbaa !24
  %179 = load ptr, ptr %17, align 8, !tbaa !5
  %180 = load ptr, ptr %24, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.sam_layer_enc, ptr %180, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !38
  %183 = load ptr, ptr %21, align 8, !tbaa !5
  %184 = call ptr @ggml_mul_mat(ptr noundef %179, ptr noundef %182, ptr noundef %183)
  store ptr %184, ptr %21, align 8, !tbaa !5
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = load ptr, ptr %21, align 8, !tbaa !5
  %187 = load ptr, ptr %24, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.sam_layer_enc, ptr %187, i32 0, i32 5
  %189 = load ptr, ptr %188, align 8, !tbaa !39
  %190 = call ptr @ggml_add_inplace(ptr noundef %185, ptr noundef %186, ptr noundef %189)
  store ptr %190, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  %191 = load ptr, ptr %21, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.ggml_tensor, ptr %191, i32 0, i32 2
  %193 = getelementptr inbounds [4 x i64], ptr %192, i64 0, i64 3
  %194 = load i64, ptr %193, align 8, !tbaa !24
  %195 = trunc i64 %194 to i32
  store i32 %195, ptr %29, align 4, !tbaa !13
  %196 = load ptr, ptr %17, align 8, !tbaa !5
  %197 = load ptr, ptr %21, align 8, !tbaa !5
  %198 = load i32, ptr %9, align 4, !tbaa !13
  %199 = sext i32 %198 to i64
  %200 = load i64, ptr %27, align 8, !tbaa !24
  %201 = load i64, ptr %28, align 8, !tbaa !24
  %202 = mul nsw i64 %200, %201
  %203 = load i32, ptr %29, align 4, !tbaa !13
  %204 = sext i32 %203 to i64
  %205 = call ptr @ggml_reshape_4d(ptr noundef %196, ptr noundef %197, i64 noundef %199, i64 noundef 3, i64 noundef %202, i64 noundef %204)
  store ptr %205, ptr %21, align 8, !tbaa !5
  %206 = load ptr, ptr %17, align 8, !tbaa !5
  %207 = load ptr, ptr %17, align 8, !tbaa !5
  %208 = load ptr, ptr %21, align 8, !tbaa !5
  %209 = call ptr @ggml_permute(ptr noundef %207, ptr noundef %208, i32 noundef 0, i32 noundef 3, i32 noundef 1, i32 noundef 2)
  %210 = call ptr @ggml_cont(ptr noundef %206, ptr noundef %209)
  store ptr %210, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  %211 = load ptr, ptr %17, align 8, !tbaa !5
  %212 = load ptr, ptr %21, align 8, !tbaa !5
  %213 = load i32, ptr %9, align 4, !tbaa !13
  %214 = sext i32 %213 to i64
  %215 = load i64, ptr %27, align 8, !tbaa !24
  %216 = load i64, ptr %28, align 8, !tbaa !24
  %217 = mul nsw i64 %215, %216
  %218 = load i32, ptr %29, align 4, !tbaa !13
  %219 = sext i32 %218 to i64
  %220 = load ptr, ptr %21, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.ggml_tensor, ptr %220, i32 0, i32 3
  %222 = getelementptr inbounds [4 x i64], ptr %221, i64 0, i64 1
  %223 = load i64, ptr %222, align 8, !tbaa !24
  %224 = load ptr, ptr %21, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.ggml_tensor, ptr %224, i32 0, i32 3
  %226 = getelementptr inbounds [4 x i64], ptr %225, i64 0, i64 2
  %227 = load i64, ptr %226, align 8, !tbaa !24
  %228 = load ptr, ptr %21, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.ggml_tensor, ptr %228, i32 0, i32 3
  %230 = getelementptr inbounds [4 x i64], ptr %229, i64 0, i64 3
  %231 = load i64, ptr %230, align 8, !tbaa !24
  %232 = mul i64 0, %231
  %233 = call ptr @ggml_view_3d(ptr noundef %211, ptr noundef %212, i64 noundef %214, i64 noundef %217, i64 noundef %219, i64 noundef %223, i64 noundef %227, i64 noundef %232)
  store ptr %233, ptr %30, align 8, !tbaa !5
  %234 = load ptr, ptr %17, align 8, !tbaa !5
  %235 = load ptr, ptr %30, align 8, !tbaa !5
  %236 = load i32, ptr %12, align 4, !tbaa !13
  %237 = sext i32 %236 to i64
  %238 = load i32, ptr %11, align 4, !tbaa !13
  %239 = sext i32 %238 to i64
  %240 = load i64, ptr %27, align 8, !tbaa !24
  %241 = load i64, ptr %28, align 8, !tbaa !24
  %242 = mul nsw i64 %240, %241
  %243 = load i32, ptr %29, align 4, !tbaa !13
  %244 = sext i32 %243 to i64
  %245 = call ptr @ggml_reshape_4d(ptr noundef %234, ptr noundef %235, i64 noundef %237, i64 noundef %239, i64 noundef %242, i64 noundef %244)
  store ptr %245, ptr %30, align 8, !tbaa !5
  %246 = load ptr, ptr %17, align 8, !tbaa !5
  %247 = load ptr, ptr %17, align 8, !tbaa !5
  %248 = load ptr, ptr %30, align 8, !tbaa !5
  %249 = call ptr @ggml_permute(ptr noundef %247, ptr noundef %248, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %250 = call ptr @ggml_cont(ptr noundef %246, ptr noundef %249)
  store ptr %250, ptr %30, align 8, !tbaa !5
  %251 = load ptr, ptr %17, align 8, !tbaa !5
  %252 = load ptr, ptr %30, align 8, !tbaa !5
  %253 = load i32, ptr %12, align 4, !tbaa !13
  %254 = sext i32 %253 to i64
  %255 = load i64, ptr %27, align 8, !tbaa !24
  %256 = load i64, ptr %28, align 8, !tbaa !24
  %257 = mul nsw i64 %255, %256
  %258 = load i32, ptr %29, align 4, !tbaa !13
  %259 = load i32, ptr %11, align 4, !tbaa !13
  %260 = mul nsw i32 %258, %259
  %261 = sext i32 %260 to i64
  %262 = call ptr @ggml_reshape_3d(ptr noundef %251, ptr noundef %252, i64 noundef %254, i64 noundef %257, i64 noundef %261)
  store ptr %262, ptr %30, align 8, !tbaa !5
  %263 = load ptr, ptr %17, align 8, !tbaa !5
  %264 = load ptr, ptr %21, align 8, !tbaa !5
  %265 = load i32, ptr %9, align 4, !tbaa !13
  %266 = sext i32 %265 to i64
  %267 = load i64, ptr %27, align 8, !tbaa !24
  %268 = load i64, ptr %28, align 8, !tbaa !24
  %269 = mul nsw i64 %267, %268
  %270 = load i32, ptr %29, align 4, !tbaa !13
  %271 = sext i32 %270 to i64
  %272 = load ptr, ptr %21, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.ggml_tensor, ptr %272, i32 0, i32 3
  %274 = getelementptr inbounds [4 x i64], ptr %273, i64 0, i64 1
  %275 = load i64, ptr %274, align 8, !tbaa !24
  %276 = load ptr, ptr %21, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.ggml_tensor, ptr %276, i32 0, i32 3
  %278 = getelementptr inbounds [4 x i64], ptr %277, i64 0, i64 2
  %279 = load i64, ptr %278, align 8, !tbaa !24
  %280 = load ptr, ptr %21, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.ggml_tensor, ptr %280, i32 0, i32 3
  %282 = getelementptr inbounds [4 x i64], ptr %281, i64 0, i64 3
  %283 = load i64, ptr %282, align 8, !tbaa !24
  %284 = mul i64 1, %283
  %285 = call ptr @ggml_view_3d(ptr noundef %263, ptr noundef %264, i64 noundef %266, i64 noundef %269, i64 noundef %271, i64 noundef %275, i64 noundef %279, i64 noundef %284)
  store ptr %285, ptr %31, align 8, !tbaa !5
  %286 = load ptr, ptr %17, align 8, !tbaa !5
  %287 = load ptr, ptr %31, align 8, !tbaa !5
  %288 = load i32, ptr %12, align 4, !tbaa !13
  %289 = sext i32 %288 to i64
  %290 = load i32, ptr %11, align 4, !tbaa !13
  %291 = sext i32 %290 to i64
  %292 = load i64, ptr %27, align 8, !tbaa !24
  %293 = load i64, ptr %28, align 8, !tbaa !24
  %294 = mul nsw i64 %292, %293
  %295 = load i32, ptr %29, align 4, !tbaa !13
  %296 = sext i32 %295 to i64
  %297 = call ptr @ggml_reshape_4d(ptr noundef %286, ptr noundef %287, i64 noundef %289, i64 noundef %291, i64 noundef %294, i64 noundef %296)
  store ptr %297, ptr %31, 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 %31, align 8, !tbaa !5
  %301 = call ptr @ggml_permute(ptr noundef %299, ptr noundef %300, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %302 = call ptr @ggml_cont(ptr noundef %298, ptr noundef %301)
  store ptr %302, ptr %31, align 8, !tbaa !5
  %303 = load ptr, ptr %17, align 8, !tbaa !5
  %304 = load ptr, ptr %31, align 8, !tbaa !5
  %305 = load i32, ptr %12, align 4, !tbaa !13
  %306 = sext i32 %305 to i64
  %307 = load i64, ptr %27, align 8, !tbaa !24
  %308 = load i64, ptr %28, align 8, !tbaa !24
  %309 = mul nsw i64 %307, %308
  %310 = load i32, ptr %29, align 4, !tbaa !13
  %311 = load i32, ptr %11, align 4, !tbaa !13
  %312 = mul nsw i32 %310, %311
  %313 = sext i32 %312 to i64
  %314 = call ptr @ggml_reshape_3d(ptr noundef %303, ptr noundef %304, i64 noundef %306, i64 noundef %309, i64 noundef %313)
  store ptr %314, ptr %31, align 8, !tbaa !5
  %315 = load ptr, ptr %17, align 8, !tbaa !5
  %316 = load ptr, ptr %21, align 8, !tbaa !5
  %317 = load i32, ptr %9, align 4, !tbaa !13
  %318 = sext i32 %317 to i64
  %319 = load i64, ptr %27, align 8, !tbaa !24
  %320 = load i64, ptr %28, align 8, !tbaa !24
  %321 = mul nsw i64 %319, %320
  %322 = load i32, ptr %29, align 4, !tbaa !13
  %323 = sext i32 %322 to i64
  %324 = load ptr, ptr %21, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.ggml_tensor, ptr %324, i32 0, i32 3
  %326 = getelementptr inbounds [4 x i64], ptr %325, i64 0, i64 1
  %327 = load i64, ptr %326, align 8, !tbaa !24
  %328 = load ptr, ptr %21, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.ggml_tensor, ptr %328, i32 0, i32 3
  %330 = getelementptr inbounds [4 x i64], ptr %329, i64 0, i64 2
  %331 = load i64, ptr %330, align 8, !tbaa !24
  %332 = load ptr, ptr %21, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.ggml_tensor, ptr %332, i32 0, i32 3
  %334 = getelementptr inbounds [4 x i64], ptr %333, i64 0, i64 3
  %335 = load i64, ptr %334, align 8, !tbaa !24
  %336 = mul i64 2, %335
  %337 = call ptr @ggml_view_3d(ptr noundef %315, ptr noundef %316, i64 noundef %318, i64 noundef %321, i64 noundef %323, i64 noundef %327, i64 noundef %331, i64 noundef %336)
  store ptr %337, ptr %32, align 8, !tbaa !5
  %338 = load ptr, ptr %17, align 8, !tbaa !5
  %339 = load ptr, ptr %32, align 8, !tbaa !5
  %340 = load i32, ptr %12, align 4, !tbaa !13
  %341 = sext i32 %340 to i64
  %342 = load i32, ptr %11, align 4, !tbaa !13
  %343 = sext i32 %342 to i64
  %344 = load i64, ptr %27, align 8, !tbaa !24
  %345 = load i64, ptr %28, align 8, !tbaa !24
  %346 = mul nsw i64 %344, %345
  %347 = load i32, ptr %29, align 4, !tbaa !13
  %348 = sext i32 %347 to i64
  %349 = call ptr @ggml_reshape_4d(ptr noundef %338, ptr noundef %339, i64 noundef %341, i64 noundef %343, i64 noundef %346, i64 noundef %348)
  store ptr %349, ptr %32, align 8, !tbaa !5
  %350 = load ptr, ptr %17, align 8, !tbaa !5
  %351 = load ptr, ptr %17, align 8, !tbaa !5
  %352 = load ptr, ptr %32, align 8, !tbaa !5
  %353 = call ptr @ggml_permute(ptr noundef %351, ptr noundef %352, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 3)
  %354 = call ptr @ggml_cont(ptr noundef %350, ptr noundef %353)
  store ptr %354, ptr %32, align 8, !tbaa !5
  %355 = load ptr, ptr %17, align 8, !tbaa !5
  %356 = load ptr, ptr %32, align 8, !tbaa !5
  %357 = load i64, ptr %27, align 8, !tbaa !24
  %358 = load i64, ptr %28, align 8, !tbaa !24
  %359 = mul nsw i64 %357, %358
  %360 = load i32, ptr %12, align 4, !tbaa !13
  %361 = sext i32 %360 to i64
  %362 = load i32, ptr %29, align 4, !tbaa !13
  %363 = load i32, ptr %11, align 4, !tbaa !13
  %364 = mul nsw i32 %362, %363
  %365 = sext i32 %364 to i64
  %366 = call ptr @ggml_reshape_3d(ptr noundef %355, ptr noundef %356, i64 noundef %359, i64 noundef %361, i64 noundef %365)
  store ptr %366, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #7
  %367 = load ptr, ptr %17, align 8, !tbaa !5
  %368 = load ptr, ptr %31, align 8, !tbaa !5
  %369 = load ptr, ptr %30, align 8, !tbaa !5
  %370 = call ptr @ggml_mul_mat(ptr noundef %367, ptr noundef %368, ptr noundef %369)
  store ptr %370, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #7
  %371 = load ptr, ptr %17, align 8, !tbaa !5
  %372 = load ptr, ptr %33, align 8, !tbaa !5
  %373 = load i32, ptr %12, align 4, !tbaa !13
  %374 = sitofp i32 %373 to float
  %375 = call float @sqrtf(float noundef %374) #7
  %376 = fdiv float 1.000000e+00, %375
  %377 = call ptr @ggml_scale_inplace(ptr noundef %371, ptr noundef %372, float noundef %376)
  store ptr %377, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %378 = load ptr, ptr %17, align 8, !tbaa !5
  %379 = load ptr, ptr %24, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.sam_layer_enc, ptr %379, i32 0, i32 2
  %381 = load ptr, ptr %380, align 8, !tbaa !40
  %382 = load i64, ptr %27, align 8, !tbaa !24
  %383 = trunc i64 %382 to i32
  %384 = load i64, ptr %27, align 8, !tbaa !24
  %385 = trunc i64 %384 to i32
  %386 = call ptr @ggml_get_rel_pos(ptr noundef %378, ptr noundef %381, i32 noundef %383, i32 noundef %385)
  store ptr %386, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #7
  %387 = load ptr, ptr %17, align 8, !tbaa !5
  %388 = load ptr, ptr %24, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct.sam_layer_enc, ptr %388, i32 0, i32 3
  %390 = load ptr, ptr %389, align 8, !tbaa !41
  %391 = load i64, ptr %28, align 8, !tbaa !24
  %392 = trunc i64 %391 to i32
  %393 = load i64, ptr %28, align 8, !tbaa !24
  %394 = trunc i64 %393 to i32
  %395 = call ptr @ggml_get_rel_pos(ptr noundef %387, ptr noundef %390, i32 noundef %392, i32 noundef %394)
  store ptr %395, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #7
  %396 = load ptr, ptr %17, align 8, !tbaa !5
  %397 = load ptr, ptr %30, align 8, !tbaa !5
  %398 = load i32, ptr %12, align 4, !tbaa !13
  %399 = sext i32 %398 to i64
  %400 = load i64, ptr %27, align 8, !tbaa !24
  %401 = load i64, ptr %28, align 8, !tbaa !24
  %402 = load i32, ptr %29, align 4, !tbaa !13
  %403 = load i32, ptr %11, align 4, !tbaa !13
  %404 = mul nsw i32 %402, %403
  %405 = sext i32 %404 to i64
  %406 = call ptr @ggml_reshape_4d(ptr noundef %396, ptr noundef %397, i64 noundef %399, i64 noundef %400, i64 noundef %401, i64 noundef %405)
  store ptr %406, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #7
  %407 = load ptr, ptr %17, align 8, !tbaa !5
  %408 = load ptr, ptr %17, align 8, !tbaa !5
  %409 = load ptr, ptr %17, align 8, !tbaa !5
  %410 = load ptr, ptr %35, align 8, !tbaa !5
  %411 = load ptr, ptr %17, align 8, !tbaa !5
  %412 = load ptr, ptr %17, align 8, !tbaa !5
  %413 = load ptr, ptr %37, align 8, !tbaa !5
  %414 = call ptr @ggml_permute(ptr noundef %412, ptr noundef %413, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %415 = call ptr @ggml_cont(ptr noundef %411, ptr noundef %414)
  %416 = call ptr @ggml_mul_mat(ptr noundef %409, ptr noundef %410, ptr noundef %415)
  %417 = call ptr @ggml_permute(ptr noundef %408, ptr noundef %416, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %418 = call ptr @ggml_cont(ptr noundef %407, ptr noundef %417)
  store ptr %418, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #7
  %419 = load ptr, ptr %17, align 8, !tbaa !5
  %420 = load ptr, ptr %36, align 8, !tbaa !5
  %421 = load ptr, ptr %37, align 8, !tbaa !5
  %422 = call ptr @ggml_mul_mat(ptr noundef %419, ptr noundef %420, ptr noundef %421)
  store ptr %422, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #7
  %423 = load ptr, ptr %17, align 8, !tbaa !5
  %424 = load ptr, ptr %34, align 8, !tbaa !5
  %425 = load ptr, ptr %38, align 8, !tbaa !5
  %426 = load ptr, ptr %39, align 8, !tbaa !5
  %427 = call ptr @ggml_add_rel_pos_inplace(ptr noundef %423, ptr noundef %424, ptr noundef %425, ptr noundef %426)
  store ptr %427, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #7
  %428 = load ptr, ptr %17, align 8, !tbaa !5
  %429 = load ptr, ptr %40, align 8, !tbaa !5
  %430 = call ptr @ggml_soft_max_inplace(ptr noundef %428, ptr noundef %429)
  store ptr %430, ptr %41, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %431 = load ptr, ptr %17, align 8, !tbaa !5
  %432 = load ptr, ptr %32, align 8, !tbaa !5
  %433 = load ptr, ptr %41, align 8, !tbaa !5
  %434 = call ptr @ggml_mul_mat(ptr noundef %431, ptr noundef %432, ptr noundef %433)
  store ptr %434, ptr %42, align 8, !tbaa !5
  %435 = load ptr, ptr %17, align 8, !tbaa !5
  %436 = load ptr, ptr %17, align 8, !tbaa !5
  %437 = load ptr, ptr %17, align 8, !tbaa !5
  %438 = load ptr, ptr %17, align 8, !tbaa !5
  %439 = load ptr, ptr %42, align 8, !tbaa !5
  %440 = load i32, ptr %12, align 4, !tbaa !13
  %441 = sext i32 %440 to i64
  %442 = load i64, ptr %27, align 8, !tbaa !24
  %443 = load i64, ptr %28, align 8, !tbaa !24
  %444 = mul nsw i64 %442, %443
  %445 = load i32, ptr %11, align 4, !tbaa !13
  %446 = sext i32 %445 to i64
  %447 = load i32, ptr %29, align 4, !tbaa !13
  %448 = sext i32 %447 to i64
  %449 = call ptr @ggml_reshape_4d(ptr noundef %438, ptr noundef %439, i64 noundef %441, i64 noundef %444, i64 noundef %446, i64 noundef %448)
  %450 = call ptr @ggml_permute(ptr noundef %437, ptr noundef %449, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %451 = call ptr @ggml_cont(ptr noundef %436, ptr noundef %450)
  %452 = load i32, ptr %9, align 4, !tbaa !13
  %453 = sext i32 %452 to i64
  %454 = load i64, ptr %27, align 8, !tbaa !24
  %455 = load i64, ptr %28, align 8, !tbaa !24
  %456 = load i32, ptr %29, align 4, !tbaa !13
  %457 = sext i32 %456 to i64
  %458 = call ptr @ggml_reshape_4d(ptr noundef %435, ptr noundef %451, i64 noundef %453, i64 noundef %454, i64 noundef %455, i64 noundef %457)
  store ptr %458, ptr %21, align 8, !tbaa !5
  %459 = load ptr, ptr %17, align 8, !tbaa !5
  %460 = load ptr, ptr %24, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.sam_layer_enc, ptr %460, i32 0, i32 6
  %462 = load ptr, ptr %461, align 8, !tbaa !42
  %463 = load ptr, ptr %21, align 8, !tbaa !5
  %464 = call ptr @ggml_mul_mat(ptr noundef %459, ptr noundef %462, ptr noundef %463)
  store ptr %464, ptr %21, align 8, !tbaa !5
  %465 = load ptr, ptr %17, align 8, !tbaa !5
  %466 = load ptr, ptr %21, align 8, !tbaa !5
  %467 = load ptr, ptr %24, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct.sam_layer_enc, ptr %467, i32 0, i32 7
  %469 = load ptr, ptr %468, align 8, !tbaa !43
  %470 = call ptr @ggml_add_inplace(ptr noundef %465, ptr noundef %466, ptr noundef %469)
  store ptr %470, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  %471 = load ptr, ptr %7, align 8, !tbaa !5
  %472 = load i32, ptr %23, align 4, !tbaa !13
  %473 = call noundef zeroext i1 @_ZNK11sam_hparams14is_global_attnEi(ptr noundef nonnull align 4 dereferenceable(52) %471, i32 noundef %472)
  %474 = zext i1 %473 to i32
  %475 = icmp eq i32 %474, 0
  br i1 %475, label %476, label %485

476:                                              ; preds = %170
  %477 = load ptr, ptr %17, align 8, !tbaa !5
  %478 = load ptr, ptr %21, align 8, !tbaa !5
  %479 = load i64, ptr %25, align 8, !tbaa !24
  %480 = trunc i64 %479 to i32
  %481 = load i64, ptr %26, align 8, !tbaa !24
  %482 = trunc i64 %481 to i32
  %483 = load i32, ptr %15, align 4, !tbaa !13
  %484 = call ptr @ggml_win_unpart(ptr noundef %477, ptr noundef %478, i32 noundef %480, i32 noundef %482, i32 noundef %483)
  store ptr %484, ptr %21, align 8, !tbaa !5
  br label %485

485:                                              ; preds = %476, %170
  %486 = load ptr, ptr %17, align 8, !tbaa !5
  %487 = load ptr, ptr %21, align 8, !tbaa !5
  %488 = load ptr, ptr %22, align 8, !tbaa !5
  %489 = call ptr @ggml_add_inplace(ptr noundef %486, ptr noundef %487, ptr noundef %488)
  store ptr %489, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #7
  %490 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %490, ptr %43, align 8, !tbaa !5
  %491 = load ptr, ptr %17, align 8, !tbaa !5
  %492 = load ptr, ptr %43, align 8, !tbaa !5
  %493 = load ptr, ptr %7, align 8, !tbaa !5
  %494 = getelementptr inbounds %struct.sam_hparams, ptr %493, i32 0, i32 11
  %495 = load float, ptr %494, align 4, !tbaa !34
  %496 = call ptr @ggml_norm(ptr noundef %491, ptr noundef %492, float noundef %495)
  store ptr %496, ptr %21, align 8, !tbaa !5
  %497 = load ptr, ptr %17, align 8, !tbaa !5
  %498 = load ptr, ptr %21, align 8, !tbaa !5
  %499 = load ptr, ptr %24, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.sam_layer_enc, ptr %499, i32 0, i32 8
  %501 = load ptr, ptr %500, align 8, !tbaa !44
  %502 = call ptr @ggml_mul(ptr noundef %497, ptr noundef %498, ptr noundef %501)
  store ptr %502, ptr %21, align 8, !tbaa !5
  %503 = load ptr, ptr %17, align 8, !tbaa !5
  %504 = load ptr, ptr %21, align 8, !tbaa !5
  %505 = load ptr, ptr %24, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.sam_layer_enc, ptr %505, i32 0, i32 9
  %507 = load ptr, ptr %506, align 8, !tbaa !45
  %508 = call ptr @ggml_add_inplace(ptr noundef %503, ptr noundef %504, ptr noundef %507)
  store ptr %508, ptr %21, align 8, !tbaa !5
  %509 = load ptr, ptr %17, align 8, !tbaa !5
  %510 = load ptr, ptr %24, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.sam_layer_enc, ptr %510, i32 0, i32 10
  %512 = load ptr, ptr %511, align 8, !tbaa !46
  %513 = load ptr, ptr %21, align 8, !tbaa !5
  %514 = call ptr @ggml_mul_mat(ptr noundef %509, ptr noundef %512, ptr noundef %513)
  store ptr %514, ptr %21, align 8, !tbaa !5
  %515 = load ptr, ptr %17, align 8, !tbaa !5
  %516 = load ptr, ptr %21, align 8, !tbaa !5
  %517 = load ptr, ptr %24, align 8, !tbaa !5
  %518 = getelementptr inbounds %struct.sam_layer_enc, ptr %517, i32 0, i32 11
  %519 = load ptr, ptr %518, align 8, !tbaa !47
  %520 = call ptr @ggml_add_inplace(ptr noundef %515, ptr noundef %516, ptr noundef %519)
  store ptr %520, ptr %21, align 8, !tbaa !5
  %521 = load ptr, ptr %17, align 8, !tbaa !5
  %522 = load ptr, ptr %21, align 8, !tbaa !5
  %523 = call ptr @ggml_gelu(ptr noundef %521, ptr noundef %522)
  store ptr %523, ptr %21, align 8, !tbaa !5
  %524 = load ptr, ptr %17, align 8, !tbaa !5
  %525 = load ptr, ptr %24, align 8, !tbaa !5
  %526 = getelementptr inbounds %struct.sam_layer_enc, ptr %525, i32 0, i32 12
  %527 = load ptr, ptr %526, align 8, !tbaa !48
  %528 = load ptr, ptr %21, align 8, !tbaa !5
  %529 = call ptr @ggml_mul_mat(ptr noundef %524, ptr noundef %527, ptr noundef %528)
  store ptr %529, ptr %21, align 8, !tbaa !5
  %530 = load ptr, ptr %17, align 8, !tbaa !5
  %531 = load ptr, ptr %21, align 8, !tbaa !5
  %532 = load ptr, ptr %24, align 8, !tbaa !5
  %533 = getelementptr inbounds %struct.sam_layer_enc, ptr %532, i32 0, i32 13
  %534 = load ptr, ptr %533, align 8, !tbaa !49
  %535 = call ptr @ggml_add_inplace(ptr noundef %530, ptr noundef %531, ptr noundef %534)
  store ptr %535, ptr %21, align 8, !tbaa !5
  %536 = load ptr, ptr %17, align 8, !tbaa !5
  %537 = load ptr, ptr %21, align 8, !tbaa !5
  %538 = load ptr, ptr %43, align 8, !tbaa !5
  %539 = call ptr @ggml_add(ptr noundef %536, ptr noundef %537, ptr noundef %538)
  store ptr %539, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %540

540:                                              ; preds = %485
  %541 = load i32, ptr %23, align 4, !tbaa !13
  %542 = add nsw i32 %541, 1
  store i32 %542, ptr %23, align 4, !tbaa !13
  br label %123, !llvm.loop !50

543:                                              ; preds = %127
  %544 = load ptr, ptr %17, align 8, !tbaa !5
  %545 = load ptr, ptr %17, align 8, !tbaa !5
  %546 = load ptr, ptr %22, align 8, !tbaa !5
  %547 = call ptr @ggml_permute(ptr noundef %545, ptr noundef %546, i32 noundef 2, i32 noundef 0, i32 noundef 1, i32 noundef 3)
  %548 = call ptr @ggml_cont(ptr noundef %544, ptr noundef %547)
  store ptr %548, ptr %21, align 8, !tbaa !5
  %549 = load ptr, ptr %17, align 8, !tbaa !5
  %550 = load ptr, ptr %8, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.sam_encoder_image, ptr %550, i32 0, i32 3
  %552 = load ptr, ptr %551, align 8, !tbaa !52
  %553 = load ptr, ptr %21, align 8, !tbaa !5
  %554 = call ptr @ggml_conv_2d_sk_p0(ptr noundef %549, ptr noundef %552, ptr noundef %553)
  store ptr %554, ptr %21, align 8, !tbaa !5
  %555 = load ptr, ptr %17, align 8, !tbaa !5
  %556 = load ptr, ptr %21, align 8, !tbaa !5
  %557 = load i32, ptr %13, align 4, !tbaa !13
  %558 = load ptr, ptr %8, align 8, !tbaa !5
  %559 = getelementptr inbounds %struct.sam_encoder_image, ptr %558, i32 0, i32 4
  %560 = load ptr, ptr %559, align 8, !tbaa !53
  %561 = load ptr, ptr %8, align 8, !tbaa !5
  %562 = getelementptr inbounds %struct.sam_encoder_image, ptr %561, i32 0, i32 5
  %563 = load ptr, ptr %562, align 8, !tbaa !54
  %564 = load ptr, ptr %7, align 8, !tbaa !5
  %565 = getelementptr inbounds %struct.sam_hparams, ptr %564, i32 0, i32 11
  %566 = load float, ptr %565, align 4, !tbaa !34
  %567 = call noundef ptr @_Z17sam_layer_norm_2dP12ggml_contextP11ggml_tensoriS2_S2_f(ptr noundef %555, ptr noundef %556, i32 noundef %557, ptr noundef %560, ptr noundef %563, float noundef %566)
  store ptr %567, ptr %21, align 8, !tbaa !5
  %568 = load ptr, ptr %17, align 8, !tbaa !5
  %569 = load ptr, ptr %8, align 8, !tbaa !5
  %570 = getelementptr inbounds %struct.sam_encoder_image, ptr %569, i32 0, i32 6
  %571 = load ptr, ptr %570, align 8, !tbaa !55
  %572 = load ptr, ptr %21, align 8, !tbaa !5
  %573 = call ptr @ggml_conv_2d_s1_ph(ptr noundef %568, ptr noundef %571, ptr noundef %572)
  store ptr %573, ptr %21, align 8, !tbaa !5
  %574 = load ptr, ptr %17, align 8, !tbaa !5
  %575 = load ptr, ptr %21, align 8, !tbaa !5
  %576 = load i32, ptr %13, align 4, !tbaa !13
  %577 = load ptr, ptr %8, align 8, !tbaa !5
  %578 = getelementptr inbounds %struct.sam_encoder_image, ptr %577, i32 0, i32 7
  %579 = load ptr, ptr %578, align 8, !tbaa !56
  %580 = load ptr, ptr %8, align 8, !tbaa !5
  %581 = getelementptr inbounds %struct.sam_encoder_image, ptr %580, i32 0, i32 8
  %582 = load ptr, ptr %581, align 8, !tbaa !57
  %583 = load ptr, ptr %7, align 8, !tbaa !5
  %584 = getelementptr inbounds %struct.sam_hparams, ptr %583, i32 0, i32 11
  %585 = load float, ptr %584, align 4, !tbaa !34
  %586 = call noundef ptr @_Z17sam_layer_norm_2dP12ggml_contextP11ggml_tensoriS2_S2_f(ptr noundef %574, ptr noundef %575, i32 noundef %576, ptr noundef %579, ptr noundef %582, float noundef %585)
  store ptr %586, ptr %21, align 8, !tbaa !5
  %587 = load ptr, ptr %17, align 8, !tbaa !5
  %588 = load ptr, ptr %21, align 8, !tbaa !5
  %589 = load ptr, ptr %5, align 8, !tbaa !5
  %590 = getelementptr inbounds %struct.sam_state, ptr %589, i32 0, i32 0
  %591 = load ptr, ptr %590, align 8, !tbaa !58
  %592 = call ptr @ggml_cpy(ptr noundef %587, ptr noundef %588, ptr noundef %591)
  store ptr %592, ptr %21, align 8, !tbaa !5
  %593 = load ptr, ptr %19, align 8, !tbaa !5
  %594 = load ptr, ptr %21, align 8, !tbaa !5
  call void @ggml_build_forward_expand(ptr noundef %593, ptr noundef %594)
  %595 = load ptr, ptr %5, align 8, !tbaa !5
  %596 = getelementptr inbounds %struct.sam_state, ptr %595, i32 0, i32 0
  %597 = load ptr, ptr %596, align 8, !tbaa !58
  call void @_ZL31ggml_disconnect_node_from_graphP11ggml_tensor(ptr noundef %597)
  %598 = load ptr, ptr %17, align 8, !tbaa !5
  call void @ggml_free(ptr noundef %598)
  %599 = load ptr, ptr %5, align 8, !tbaa !5
  %600 = getelementptr inbounds %struct.sam_state, ptr %599, i32 0, i32 7
  %601 = load ptr, ptr %600, align 8, !tbaa !64
  %602 = load ptr, ptr %19, align 8, !tbaa !5
  %603 = call zeroext i1 @ggml_gallocr_alloc_graph(ptr noundef %601, ptr noundef %602)
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #7
  %604 = load ptr, ptr %19, align 8, !tbaa !5
  %605 = call ptr @ggml_graph_get_tensor(ptr noundef %604, ptr noundef @.str.139)
  store ptr %605, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %606 = load ptr, ptr %44, align 8, !tbaa !5
  %607 = call ptr @ggml_get_data(ptr noundef %606)
  store ptr %607, ptr %45, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  %608 = load ptr, ptr %6, align 8, !tbaa !5
  %609 = getelementptr inbounds %struct.sam_image_f32, ptr %608, i32 0, i32 0
  %610 = load i32, ptr %609, align 8, !tbaa !65
  store i32 %610, ptr %46, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  %611 = load ptr, ptr %6, align 8, !tbaa !5
  %612 = getelementptr inbounds %struct.sam_image_f32, ptr %611, i32 0, i32 1
  %613 = load i32, ptr %612, align 4, !tbaa !71
  store i32 %613, ptr %47, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  %614 = load i32, ptr %46, align 4, !tbaa !13
  %615 = load i32, ptr %47, align 4, !tbaa !13
  %616 = mul nsw i32 %614, %615
  store i32 %616, ptr %48, align 4, !tbaa !13
  %617 = load i32, ptr %46, align 4, !tbaa !13
  %618 = load i32, ptr %14, align 4, !tbaa !13
  %619 = icmp eq i32 %617, %618
  br i1 %619, label %620, label %624

620:                                              ; preds = %543
  %621 = load i32, ptr %47, align 4, !tbaa !13
  %622 = load i32, ptr %14, align 4, !tbaa !13
  %623 = icmp eq i32 %621, %622
  br i1 %623, label %625, label %624

624:                                              ; preds = %620, %543
  call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef @.str.132, i32 noundef 1377, ptr noundef @.str.140, ptr noundef @.str.141) #8
  unreachable

625:                                              ; preds = %620
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  store i32 0, ptr %49, align 4, !tbaa !13
  br label %626

626:                                              ; preds = %676, %625
  %627 = load i32, ptr %49, align 4, !tbaa !13
  %628 = icmp slt i32 %627, 3
  br i1 %628, label %630, label %629

629:                                              ; preds = %626
  store i32 5, ptr %50, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  br label %679

630:                                              ; preds = %626
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #7
  store i32 0, ptr %51, align 4, !tbaa !13
  br label %631

631:                                              ; preds = %672, %630
  %632 = load i32, ptr %51, align 4, !tbaa !13
  %633 = load i32, ptr %47, align 4, !tbaa !13
  %634 = icmp slt i32 %632, %633
  br i1 %634, label %636, label %635

635:                                              ; preds = %631
  store i32 8, ptr %50, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  br label %675

636:                                              ; preds = %631
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #7
  store i32 0, ptr %52, align 4, !tbaa !13
  br label %637

637:                                              ; preds = %668, %636
  %638 = load i32, ptr %52, align 4, !tbaa !13
  %639 = load i32, ptr %46, align 4, !tbaa !13
  %640 = icmp slt i32 %638, %639
  br i1 %640, label %642, label %641

641:                                              ; preds = %637
  store i32 11, ptr %50, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #7
  br label %671

642:                                              ; preds = %637
  %643 = load ptr, ptr %6, align 8, !tbaa !5
  %644 = getelementptr inbounds %struct.sam_image_f32, ptr %643, i32 0, i32 2
  %645 = load i32, ptr %51, align 4, !tbaa !13
  %646 = load i32, ptr %46, align 4, !tbaa !13
  %647 = mul nsw i32 %645, %646
  %648 = load i32, ptr %52, align 4, !tbaa !13
  %649 = add nsw i32 %647, %648
  %650 = mul nsw i32 3, %649
  %651 = load i32, ptr %49, align 4, !tbaa !13
  %652 = add nsw i32 %650, %651
  %653 = sext i32 %652 to i64
  %654 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %644, i64 noundef %653) #7
  %655 = load float, ptr %654, align 4, !tbaa !72
  %656 = load ptr, ptr %45, align 8, !tbaa !5
  %657 = load i32, ptr %49, align 4, !tbaa !13
  %658 = load i32, ptr %48, align 4, !tbaa !13
  %659 = mul nsw i32 %657, %658
  %660 = load i32, ptr %51, align 4, !tbaa !13
  %661 = load i32, ptr %46, align 4, !tbaa !13
  %662 = mul nsw i32 %660, %661
  %663 = add nsw i32 %659, %662
  %664 = load i32, ptr %52, align 4, !tbaa !13
  %665 = add nsw i32 %663, %664
  %666 = sext i32 %665 to i64
  %667 = getelementptr inbounds float, ptr %656, i64 %666
  store float %655, ptr %667, align 4, !tbaa !72
  br label %668

668:                                              ; preds = %642
  %669 = load i32, ptr %52, align 4, !tbaa !13
  %670 = add nsw i32 %669, 1
  store i32 %670, ptr %52, align 4, !tbaa !13
  br label %637, !llvm.loop !73

671:                                              ; preds = %641
  br label %672

672:                                              ; preds = %671
  %673 = load i32, ptr %51, align 4, !tbaa !13
  %674 = add nsw i32 %673, 1
  store i32 %674, ptr %51, align 4, !tbaa !13
  br label %631, !llvm.loop !74

675:                                              ; preds = %635
  br label %676

676:                                              ; preds = %675
  %677 = load i32, ptr %49, align 4, !tbaa !13
  %678 = add nsw i32 %677, 1
  store i32 %678, ptr %49, align 4, !tbaa !13
  br label %626, !llvm.loop !75

679:                                              ; preds = %629
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #7
  %680 = load ptr, ptr %19, align 8, !tbaa !5
  store i32 1, ptr %50, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret ptr %680
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11sam_hparams10n_img_sizeEv(ptr noundef nonnull align 4 dereferenceable(52)) #2 align 2

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

declare ptr @ggml_new_graph(ptr noundef) #3

declare ptr @ggml_conv_2d_sk_p0(ptr noundef, ptr noundef, ptr noundef) #3

declare ptr @ggml_add_inplace(ptr noundef, ptr noundef, ptr noundef) #3

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

declare ptr @ggml_win_part(ptr noundef, ptr noundef, i32 noundef) #3

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

declare ptr @ggml_scale_inplace(ptr noundef, ptr noundef, float noundef) #3

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

declare ptr @ggml_get_rel_pos(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

declare ptr @ggml_add_rel_pos_inplace(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

declare ptr @ggml_win_unpart(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

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

declare ptr @ggml_conv_2d_s1_ph(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL31ggml_disconnect_node_from_graphP11ggml_tensor(ptr noundef) #2

declare void @ggml_free(ptr noundef) #3

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

declare ptr @ggml_graph_get_tensor(ptr noundef, ptr noundef) #3

declare ptr @ggml_get_data(ptr noundef) #3

; Function Attrs: noreturn
declare void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) #6

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

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

!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, !11, i64 0}
!10 = !{!"_ZTS11sam_hparams", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !11, i64 8}
!16 = !{!10, !11, i64 12}
!17 = !{!18, !19, i64 0}
!18 = !{!"_ZTS16ggml_init_params", !19, i64 0, !6, i64 8, !20, i64 16}
!19 = !{!"long", !7, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!18, !6, i64 8}
!22 = !{!18, !20, i64 16}
!23 = !{i64 0, i64 8, !24, i64 8, i64 8, !5, i64 16, i64 1, !25}
!24 = !{!19, !19, i64 0}
!25 = !{!20, !20, i64 0}
!26 = !{!27, !6, i64 8}
!27 = !{!"_ZTS17sam_encoder_image", !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, !28, i64 72}
!28 = !{!"_ZTSSt6vectorI13sam_layer_encSaIS0_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseI13sam_layer_encSaIS0_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseI13sam_layer_encSaIS0_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseI13sam_layer_encSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!32 = !{!27, !6, i64 16}
!33 = !{!27, !6, i64 0}
!34 = !{!10, !12, i64 44}
!35 = !{!36, !6, i64 0}
!36 = !{!"_ZTS13sam_layer_enc", !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, !6, i64 96, !6, i64 104}
!37 = !{!36, !6, i64 8}
!38 = !{!36, !6, i64 32}
!39 = !{!36, !6, i64 40}
!40 = !{!36, !6, i64 16}
!41 = !{!36, !6, i64 24}
!42 = !{!36, !6, i64 48}
!43 = !{!36, !6, i64 56}
!44 = !{!36, !6, i64 64}
!45 = !{!36, !6, i64 72}
!46 = !{!36, !6, i64 80}
!47 = !{!36, !6, i64 88}
!48 = !{!36, !6, i64 96}
!49 = !{!36, !6, i64 104}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}
!52 = !{!27, !6, i64 24}
!53 = !{!27, !6, i64 32}
!54 = !{!27, !6, i64 40}
!55 = !{!27, !6, i64 48}
!56 = !{!27, !6, i64 56}
!57 = !{!27, !6, i64 64}
!58 = !{!59, !6, i64 0}
!59 = !{!"_ZTS9sam_state", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !60, i64 32, !60, i64 56, !60, i64 80, !6, i64 104}
!60 = !{!"_ZTSSt6vectorIhSaIhEE", !61, i64 0}
!61 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !62, i64 0}
!62 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !63, i64 0}
!63 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!64 = !{!59, !6, i64 104}
!65 = !{!66, !11, i64 0}
!66 = !{!"_ZTS13sam_image_f32", !11, i64 0, !11, i64 4, !67, i64 8}
!67 = !{!"_ZTSSt6vectorIfSaIfEE", !68, i64 0}
!68 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !69, i64 0}
!69 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !70, i64 0}
!70 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!71 = !{!66, !11, i64 4}
!72 = !{!12, !12, i64 0}
!73 = distinct !{!73, !51}
!74 = distinct !{!74, !51}
!75 = distinct !{!75, !51}


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

@.str.132 = external hidden unnamed_addr constant [69 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.141 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11sam_hparams14n_enc_head_dimEv(ptr noundef nonnull align 4 dereferenceable(52)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11sam_hparams13n_window_sizeEv(ptr noundef nonnull align 4 dereferenceable(52)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11sam_hparams14is_global_attnEi(ptr noundef nonnull align 4 dereferenceable(52), i32 noundef) local_unnamed_addr #2 align 2

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

declare void @ggml_set_input(ptr noundef) local_unnamed_addr #1

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

declare ptr @ggml_cont(ptr noundef, ptr 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_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_permute(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_Z17sam_layer_norm_2dP12ggml_contextP11ggml_tensoriS2_S2_f(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, float noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z16sam_encode_imageRK9sam_modelR9sam_stateRK13sam_image_f32(ptr noundef nonnull align 8 dereferenceable(496) %0, ptr noundef nonnull align 8 dereferenceable(112) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #2 {
  %4 = alloca %struct.ggml_init_params, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 56
  %6 = load i32, ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i32, ptr %9, align 8, !tbaa !12
  %11 = tail call noundef i32 @_ZNK11sam_hparams14n_enc_head_dimEv(ptr noundef nonnull align 4 dereferenceable(52) %0)
  %12 = getelementptr inbounds i8, ptr %0, i64 12
  %13 = load i32, ptr %12, align 4, !tbaa !13
  %14 = tail call noundef i32 @_ZNK11sam_hparams10n_img_sizeEv(ptr noundef nonnull align 4 dereferenceable(52) %0)
  %15 = tail call noundef i32 @_ZNK11sam_hparams13n_window_sizeEv(ptr noundef nonnull align 4 dereferenceable(52) %0)
  %16 = getelementptr inbounds i8, ptr %1, i64 56
  %17 = tail call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  %18 = tail call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #5
  store i64 %17, ptr %4, align 8, !tbaa !14
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %18, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 16
  store i8 1, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !18
  %19 = tail call ptr @ggml_init(ptr noundef nonnull byval(%struct.ggml_init_params) align 8 %4)
  %20 = tail call ptr @ggml_new_graph(ptr noundef %19)
  %21 = sext i32 %14 to i64
  %22 = tail call ptr @ggml_new_tensor_4d(ptr noundef %19, i32 noundef 0, i64 noundef %21, i64 noundef %21, i64 noundef 3, i64 noundef 1)
  %23 = tail call ptr @ggml_set_name(ptr noundef %22, ptr noundef nonnull @.str.139)
  tail call void @ggml_set_input(ptr noundef %22)
  %24 = getelementptr inbounds i8, ptr %0, i64 64
  %25 = load ptr, ptr %24, align 8, !tbaa !20
  %26 = tail call ptr @ggml_conv_2d_sk_p0(ptr noundef %19, ptr noundef %25, ptr noundef %22)
  %27 = getelementptr inbounds i8, ptr %0, i64 72
  %28 = load ptr, ptr %27, align 8, !tbaa !26
  %29 = tail call ptr @ggml_repeat(ptr noundef %19, ptr noundef %28, ptr noundef %26)
  %30 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %26, ptr noundef %29)
  %31 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %30, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 3)
  %32 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %31)
  %33 = load ptr, ptr %5, align 8, !tbaa !27
  %34 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %32, ptr noundef %33)
  %35 = icmp sgt i32 %8, 0
  br i1 %35, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %36 = getelementptr inbounds i8, ptr %0, i64 128
  %37 = getelementptr inbounds i8, ptr %0, i64 44
  %38 = sext i32 %6 to i64
  %39 = sext i32 %11 to i64
  %40 = sext i32 %10 to i64
  %41 = sitofp i32 %11 to float
  %wide.trip.count = zext nneg i32 %8 to i64
  br label %104

._crit_edge:                                      ; preds = %206, %3
  %.0308.lcssa = phi ptr [ %34, %3 ], [ %229, %206 ]
  %42 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %.0308.lcssa, i32 noundef 2, i32 noundef 0, i32 noundef 1, i32 noundef 3)
  %43 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %42)
  %44 = getelementptr inbounds i8, ptr %0, i64 80
  %45 = load ptr, ptr %44, align 8, !tbaa !28
  %46 = tail call ptr @ggml_conv_2d_sk_p0(ptr noundef %19, ptr noundef %45, ptr noundef %43)
  %47 = getelementptr inbounds i8, ptr %0, i64 88
  %48 = load ptr, ptr %47, align 8, !tbaa !29
  %49 = getelementptr inbounds i8, ptr %0, i64 96
  %50 = load ptr, ptr %49, align 8, !tbaa !30
  %51 = getelementptr inbounds i8, ptr %0, i64 44
  %52 = load float, ptr %51, align 4, !tbaa !31
  %53 = tail call noundef ptr @_Z17sam_layer_norm_2dP12ggml_contextP11ggml_tensoriS2_S2_f(ptr noundef %19, ptr noundef %46, i32 noundef %13, ptr noundef %48, ptr noundef %50, float noundef %52)
  %54 = getelementptr inbounds i8, ptr %0, i64 104
  %55 = load ptr, ptr %54, align 8, !tbaa !32
  %56 = tail call ptr @ggml_conv_2d_s1_ph(ptr noundef %19, ptr noundef %55, ptr noundef %53)
  %57 = getelementptr inbounds i8, ptr %0, i64 112
  %58 = load ptr, ptr %57, align 8, !tbaa !33
  %59 = getelementptr inbounds i8, ptr %0, i64 120
  %60 = load ptr, ptr %59, align 8, !tbaa !34
  %61 = load float, ptr %51, align 4, !tbaa !31
  %62 = tail call noundef ptr @_Z17sam_layer_norm_2dP12ggml_contextP11ggml_tensoriS2_S2_f(ptr noundef %19, ptr noundef %56, i32 noundef %13, ptr noundef %58, ptr noundef %60, float noundef %61)
  %63 = load ptr, ptr %1, align 8, !tbaa !35
  %64 = tail call ptr @ggml_cpy(ptr noundef %19, ptr noundef %62, ptr noundef %63)
  tail call void @ggml_build_forward_expand(ptr noundef %20, ptr noundef %64)
  %65 = load ptr, ptr %1, align 8, !tbaa !35
  tail call void @_ZL31ggml_disconnect_node_from_graphP11ggml_tensor(ptr noundef %65)
  tail call void @ggml_free(ptr noundef %19)
  %66 = getelementptr inbounds i8, ptr %1, i64 104
  %67 = load ptr, ptr %66, align 8, !tbaa !41
  %68 = tail call zeroext i1 @ggml_gallocr_alloc_graph(ptr noundef %67, ptr noundef %20)
  %69 = tail call ptr @ggml_graph_get_tensor(ptr noundef %20, ptr noundef nonnull @.str.139)
  %70 = tail call ptr @ggml_get_data(ptr noundef %69)
  %71 = load i32, ptr %2, align 8, !tbaa !42
  %72 = getelementptr inbounds i8, ptr %2, i64 4
  %73 = load i32, ptr %72, align 4, !tbaa !48
  %74 = mul nsw i32 %73, %71
  %75 = icmp eq i32 %71, %14
  %76 = icmp eq i32 %73, %14
  %or.cond = select i1 %75, i1 %76, i1 false
  br i1 %or.cond, label %.preheader314, label %230

.preheader314:                                    ; preds = %._crit_edge
  %77 = icmp sgt i32 %14, 0
  %78 = getelementptr inbounds i8, ptr %2, i64 8
  br i1 %77, label %.preheader313.us.us.preheader, label %.split.us

.preheader313.us.us.preheader:                    ; preds = %.preheader314
  %79 = zext nneg i32 %14 to i64
  %80 = zext i32 %74 to i64
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge319.us.us.us, %.preheader313.us.us.preheader
  %indvars.iv336 = phi i64 [ %indvars.iv.next337, %._crit_edge319.us.us.us ], [ 0, %.preheader313.us.us.preheader ]
  %81 = mul nuw nsw i64 %indvars.iv336, %79
  br label %82

82:                                               ; preds = %82, %.preheader.us.us.us
  %indvars.iv331 = phi i64 [ %indvars.iv.next332, %82 ], [ 0, %.preheader.us.us.us ]
  %83 = add nuw nsw i64 %indvars.iv331, %81
  %84 = mul nuw nsw i64 %83, 3
  %85 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %84) #5
  %86 = load float, ptr %85, align 4, !tbaa !49
  %87 = getelementptr inbounds float, ptr %70, i64 %83
  store float %86, ptr %87, align 4, !tbaa !49
  %indvars.iv.next332 = add nuw nsw i64 %indvars.iv331, 1
  %exitcond335.not = icmp eq i64 %indvars.iv.next332, %79
  br i1 %exitcond335.not, label %._crit_edge319.us.us.us, label %82, !llvm.loop !50

._crit_edge319.us.us.us:                          ; preds = %82
  %indvars.iv.next337 = add nuw nsw i64 %indvars.iv336, 1
  %exitcond340.not = icmp eq i64 %indvars.iv.next337, %79
  br i1 %exitcond340.not, label %._crit_edge321.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !52

._crit_edge321.split.us.us.us:                    ; preds = %._crit_edge319.us.us.us
  %invariant.gep = getelementptr inbounds float, ptr %70, i64 %80
  br label %.preheader.us.us.us.1

.preheader.us.us.us.1:                            ; preds = %._crit_edge319.us.us.us.1, %._crit_edge321.split.us.us.us
  %indvars.iv336.1 = phi i64 [ %indvars.iv.next337.1, %._crit_edge319.us.us.us.1 ], [ 0, %._crit_edge321.split.us.us.us ]
  %88 = mul nuw nsw i64 %indvars.iv336.1, %79
  %gep = getelementptr inbounds float, ptr %invariant.gep, i64 %88
  br label %89

89:                                               ; preds = %89, %.preheader.us.us.us.1
  %indvars.iv331.1 = phi i64 [ %indvars.iv.next332.1, %89 ], [ 0, %.preheader.us.us.us.1 ]
  %90 = add nuw nsw i64 %indvars.iv331.1, %88
  %91 = mul nuw nsw i64 %90, 3
  %92 = add nuw nsw i64 %91, 1
  %93 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %92) #5
  %94 = load float, ptr %93, align 4, !tbaa !49
  %95 = getelementptr inbounds float, ptr %gep, i64 %indvars.iv331.1
  store float %94, ptr %95, align 4, !tbaa !49
  %indvars.iv.next332.1 = add nuw nsw i64 %indvars.iv331.1, 1
  %exitcond335.1.not = icmp eq i64 %indvars.iv.next332.1, %79
  br i1 %exitcond335.1.not, label %._crit_edge319.us.us.us.1, label %89, !llvm.loop !50

._crit_edge319.us.us.us.1:                        ; preds = %89
  %indvars.iv.next337.1 = add nuw nsw i64 %indvars.iv336.1, 1
  %exitcond340.1.not = icmp eq i64 %indvars.iv.next337.1, %79
  br i1 %exitcond340.1.not, label %._crit_edge321.split.us.us.us.1, label %.preheader.us.us.us.1, !llvm.loop !52

._crit_edge321.split.us.us.us.1:                  ; preds = %._crit_edge319.us.us.us.1
  %.idx = shl nuw nsw i64 %80, 3
  %invariant.gep345 = getelementptr inbounds i8, ptr %70, i64 %.idx
  br label %.preheader.us.us.us.2

.preheader.us.us.us.2:                            ; preds = %._crit_edge319.us.us.us.2, %._crit_edge321.split.us.us.us.1
  %indvars.iv336.2 = phi i64 [ %indvars.iv.next337.2, %._crit_edge319.us.us.us.2 ], [ 0, %._crit_edge321.split.us.us.us.1 ]
  %96 = mul nuw nsw i64 %indvars.iv336.2, %79
  %gep346 = getelementptr inbounds float, ptr %invariant.gep345, i64 %96
  br label %97

97:                                               ; preds = %97, %.preheader.us.us.us.2
  %indvars.iv331.2 = phi i64 [ %indvars.iv.next332.2, %97 ], [ 0, %.preheader.us.us.us.2 ]
  %98 = add nuw nsw i64 %indvars.iv331.2, %96
  %99 = mul nuw nsw i64 %98, 3
  %100 = add nuw nsw i64 %99, 2
  %101 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %78, i64 noundef %100) #5
  %102 = load float, ptr %101, align 4, !tbaa !49
  %103 = getelementptr inbounds float, ptr %gep346, i64 %indvars.iv331.2
  store float %102, ptr %103, align 4, !tbaa !49
  %indvars.iv.next332.2 = add nuw nsw i64 %indvars.iv331.2, 1
  %exitcond335.2.not = icmp eq i64 %indvars.iv.next332.2, %79
  br i1 %exitcond335.2.not, label %._crit_edge319.us.us.us.2, label %97, !llvm.loop !50

._crit_edge319.us.us.us.2:                        ; preds = %97
  %indvars.iv.next337.2 = add nuw nsw i64 %indvars.iv336.2, 1
  %exitcond340.2.not = icmp eq i64 %indvars.iv.next337.2, %79
  br i1 %exitcond340.2.not, label %.split.us, label %.preheader.us.us.us.2, !llvm.loop !52

104:                                              ; preds = %.lr.ph, %206
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %206 ]
  %.0308316 = phi ptr [ %34, %.lr.ph ], [ %229, %206 ]
  %105 = tail call noundef nonnull align 8 dereferenceable(112) ptr @_ZNKSt6vectorI13sam_layer_encSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %indvars.iv) #5
  %106 = load float, ptr %37, align 4, !tbaa !31
  %107 = tail call ptr @ggml_norm(ptr noundef %19, ptr noundef %.0308316, float noundef %106)
  %108 = load ptr, ptr %105, align 8, !tbaa !53
  %109 = tail call ptr @ggml_mul(ptr noundef %19, ptr noundef %107, ptr noundef %108)
  %110 = getelementptr inbounds i8, ptr %105, i64 8
  %111 = load ptr, ptr %110, align 8, !tbaa !55
  %112 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %109, ptr noundef %111)
  %113 = getelementptr inbounds i8, ptr %112, i64 24
  %114 = load i64, ptr %113, align 8, !tbaa !14
  %115 = getelementptr inbounds i8, ptr %112, i64 32
  %116 = load i64, ptr %115, align 8, !tbaa !14
  %117 = trunc nuw nsw i64 %indvars.iv to i32
  %118 = tail call noundef zeroext i1 @_ZNK11sam_hparams14is_global_attnEi(ptr noundef nonnull align 4 dereferenceable(52) %0, i32 noundef %117)
  br i1 %118, label %121, label %119

119:                                              ; preds = %104
  %120 = tail call ptr @ggml_win_part(ptr noundef %19, ptr noundef nonnull %112, i32 noundef %15)
  br label %121

121:                                              ; preds = %119, %104
  %.0307 = phi ptr [ %120, %119 ], [ %112, %104 ]
  %122 = getelementptr inbounds i8, ptr %.0307, i64 24
  %123 = load i64, ptr %122, align 8, !tbaa !14
  %124 = getelementptr inbounds i8, ptr %.0307, i64 32
  %125 = load i64, ptr %124, align 8, !tbaa !14
  %126 = getelementptr inbounds i8, ptr %105, i64 32
  %127 = load ptr, ptr %126, align 8, !tbaa !56
  %128 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %127, ptr noundef %.0307)
  %129 = getelementptr inbounds i8, ptr %105, i64 40
  %130 = load ptr, ptr %129, align 8, !tbaa !57
  %131 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %128, ptr noundef %130)
  %132 = getelementptr inbounds i8, ptr %131, i64 40
  %133 = load i64, ptr %132, align 8, !tbaa !14
  %134 = trunc i64 %133 to i32
  %135 = mul nsw i64 %125, %123
  %sext = shl i64 %133, 32
  %136 = ashr exact i64 %sext, 32
  %137 = tail call ptr @ggml_reshape_4d(ptr noundef %19, ptr noundef %131, i64 noundef %38, i64 noundef 3, i64 noundef %135, i64 noundef %136)
  %138 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %137, i32 noundef 0, i32 noundef 3, i32 noundef 1, i32 noundef 2)
  %139 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %138)
  %140 = getelementptr inbounds i8, ptr %139, i64 56
  %141 = load i64, ptr %140, align 8, !tbaa !14
  %142 = getelementptr inbounds i8, ptr %139, i64 64
  %143 = load i64, ptr %142, align 8, !tbaa !14
  %144 = getelementptr inbounds i8, ptr %139, i64 72
  %145 = tail call ptr @ggml_view_3d(ptr noundef %19, ptr noundef %139, i64 noundef %38, i64 noundef %135, i64 noundef %136, i64 noundef %141, i64 noundef %143, i64 noundef 0)
  %146 = tail call ptr @ggml_reshape_4d(ptr noundef %19, ptr noundef %145, i64 noundef %39, i64 noundef %40, i64 noundef %135, i64 noundef %136)
  %147 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %146, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %148 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %147)
  %149 = mul nsw i32 %10, %134
  %150 = sext i32 %149 to i64
  %151 = tail call ptr @ggml_reshape_3d(ptr noundef %19, ptr noundef %148, i64 noundef %39, i64 noundef %135, i64 noundef %150)
  %152 = load i64, ptr %140, align 8, !tbaa !14
  %153 = load i64, ptr %142, align 8, !tbaa !14
  %154 = load i64, ptr %144, align 8, !tbaa !14
  %155 = tail call ptr @ggml_view_3d(ptr noundef %19, ptr noundef %139, i64 noundef %38, i64 noundef %135, i64 noundef %136, i64 noundef %152, i64 noundef %153, i64 noundef %154)
  %156 = tail call ptr @ggml_reshape_4d(ptr noundef %19, ptr noundef %155, i64 noundef %39, i64 noundef %40, i64 noundef %135, i64 noundef %136)
  %157 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %156, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %158 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %157)
  %159 = tail call ptr @ggml_reshape_3d(ptr noundef %19, ptr noundef %158, i64 noundef %39, i64 noundef %135, i64 noundef %150)
  %160 = load i64, ptr %140, align 8, !tbaa !14
  %161 = load i64, ptr %142, align 8, !tbaa !14
  %162 = load i64, ptr %144, align 8, !tbaa !14
  %163 = shl i64 %162, 1
  %164 = tail call ptr @ggml_view_3d(ptr noundef %19, ptr noundef %139, i64 noundef %38, i64 noundef %135, i64 noundef %136, i64 noundef %160, i64 noundef %161, i64 noundef %163)
  %165 = tail call ptr @ggml_reshape_4d(ptr noundef %19, ptr noundef %164, i64 noundef %39, i64 noundef %40, i64 noundef %135, i64 noundef %136)
  %166 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %165, i32 noundef 1, i32 noundef 2, i32 noundef 0, i32 noundef 3)
  %167 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %166)
  %168 = tail call ptr @ggml_reshape_3d(ptr noundef %19, ptr noundef %167, i64 noundef %135, i64 noundef %39, i64 noundef %150)
  %169 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %159, ptr noundef %151)
  %170 = tail call float @sqrtf(float noundef %41) #5
  %171 = fdiv float 1.000000e+00, %170
  %172 = tail call ptr @ggml_scale_inplace(ptr noundef %19, ptr noundef %169, float noundef %171)
  %173 = getelementptr inbounds i8, ptr %105, i64 16
  %174 = load ptr, ptr %173, align 8, !tbaa !58
  %175 = trunc i64 %123 to i32
  %176 = tail call ptr @ggml_get_rel_pos(ptr noundef %19, ptr noundef %174, i32 noundef %175, i32 noundef %175)
  %177 = getelementptr inbounds i8, ptr %105, i64 24
  %178 = load ptr, ptr %177, align 8, !tbaa !59
  %179 = trunc i64 %125 to i32
  %180 = tail call ptr @ggml_get_rel_pos(ptr noundef %19, ptr noundef %178, i32 noundef %179, i32 noundef %179)
  %181 = tail call ptr @ggml_reshape_4d(ptr noundef %19, ptr noundef %151, i64 noundef %39, i64 noundef %123, i64 noundef %125, i64 noundef %150)
  %182 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %181, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %183 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %182)
  %184 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %176, ptr noundef %183)
  %185 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %184, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %186 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %185)
  %187 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %180, ptr noundef %181)
  %188 = tail call ptr @ggml_add_rel_pos_inplace(ptr noundef %19, ptr noundef %172, ptr noundef %186, ptr noundef %187)
  %189 = tail call ptr @ggml_soft_max_inplace(ptr noundef %19, ptr noundef %188)
  %190 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %168, ptr noundef %189)
  %191 = tail call ptr @ggml_reshape_4d(ptr noundef %19, ptr noundef %190, i64 noundef %39, i64 noundef %135, i64 noundef %40, i64 noundef %136)
  %192 = tail call ptr @ggml_permute(ptr noundef %19, ptr noundef %191, i32 noundef 0, i32 noundef 2, i32 noundef 1, i32 noundef 3)
  %193 = tail call ptr @ggml_cont(ptr noundef %19, ptr noundef %192)
  %194 = tail call ptr @ggml_reshape_4d(ptr noundef %19, ptr noundef %193, i64 noundef %38, i64 noundef %123, i64 noundef %125, i64 noundef %136)
  %195 = getelementptr inbounds i8, ptr %105, i64 48
  %196 = load ptr, ptr %195, align 8, !tbaa !60
  %197 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %196, ptr noundef %194)
  %198 = getelementptr inbounds i8, ptr %105, i64 56
  %199 = load ptr, ptr %198, align 8, !tbaa !61
  %200 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %197, ptr noundef %199)
  %201 = tail call noundef zeroext i1 @_ZNK11sam_hparams14is_global_attnEi(ptr noundef nonnull align 4 dereferenceable(52) %0, i32 noundef %117)
  br i1 %201, label %206, label %202

202:                                              ; preds = %121
  %203 = trunc i64 %114 to i32
  %204 = trunc i64 %116 to i32
  %205 = tail call ptr @ggml_win_unpart(ptr noundef %19, ptr noundef %200, i32 noundef %203, i32 noundef %204, i32 noundef %15)
  br label %206

206:                                              ; preds = %202, %121
  %.1 = phi ptr [ %205, %202 ], [ %200, %121 ]
  %207 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %.1, ptr noundef %.0308316)
  %208 = load float, ptr %37, align 4, !tbaa !31
  %209 = tail call ptr @ggml_norm(ptr noundef %19, ptr noundef %207, float noundef %208)
  %210 = getelementptr inbounds i8, ptr %105, i64 64
  %211 = load ptr, ptr %210, align 8, !tbaa !62
  %212 = tail call ptr @ggml_mul(ptr noundef %19, ptr noundef %209, ptr noundef %211)
  %213 = getelementptr inbounds i8, ptr %105, i64 72
  %214 = load ptr, ptr %213, align 8, !tbaa !63
  %215 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %212, ptr noundef %214)
  %216 = getelementptr inbounds i8, ptr %105, i64 80
  %217 = load ptr, ptr %216, align 8, !tbaa !64
  %218 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %217, ptr noundef %215)
  %219 = getelementptr inbounds i8, ptr %105, i64 88
  %220 = load ptr, ptr %219, align 8, !tbaa !65
  %221 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %218, ptr noundef %220)
  %222 = tail call ptr @ggml_gelu(ptr noundef %19, ptr noundef %221)
  %223 = getelementptr inbounds i8, ptr %105, i64 96
  %224 = load ptr, ptr %223, align 8, !tbaa !66
  %225 = tail call ptr @ggml_mul_mat(ptr noundef %19, ptr noundef %224, ptr noundef %222)
  %226 = getelementptr inbounds i8, ptr %105, i64 104
  %227 = load ptr, ptr %226, align 8, !tbaa !67
  %228 = tail call ptr @ggml_add_inplace(ptr noundef %19, ptr noundef %225, ptr noundef %227)
  %229 = tail call ptr @ggml_add(ptr noundef %19, ptr noundef %228, ptr noundef %207)
  %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 %104, !llvm.loop !68

230:                                              ; preds = %._crit_edge
  tail call void (ptr, i32, ptr, ...) @ggml_abort(ptr noundef nonnull @.str.132, i32 noundef 1377, ptr noundef nonnull @.str.140, ptr noundef nonnull @.str.141) #6
  unreachable

.split.us:                                        ; preds = %._crit_edge319.us.us.us.2, %.preheader314
  ret ptr %20
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11sam_hparams10n_img_sizeEv(ptr noundef nonnull align 4 dereferenceable(52)) local_unnamed_addr #0 align 2

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

declare ptr @ggml_new_graph(ptr noundef) local_unnamed_addr #1

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

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

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

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

declare ptr @ggml_reshape_4d(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i64 noundef, i64 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 float @sqrtf(float noundef) local_unnamed_addr #3

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL31ggml_disconnect_node_from_graphP11ggml_tensor(ptr noundef) local_unnamed_addr #0

declare void @ggml_free(ptr noundef) local_unnamed_addr #1

declare zeroext i1 @ggml_gallocr_alloc_graph(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare ptr @ggml_get_data(ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn
declare void @ggml_abort(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS11sam_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, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 12}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !8, i64 0}
!20 = !{!21, !17, i64 8}
!21 = !{!"_ZTS17sam_encoder_image", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !22, i64 72}
!22 = !{!"_ZTSSt6vectorI13sam_layer_encSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseI13sam_layer_encSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI13sam_layer_encSaIS0_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI13sam_layer_encSaIS0_EE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!26 = !{!21, !17, i64 16}
!27 = !{!21, !17, i64 0}
!28 = !{!21, !17, i64 24}
!29 = !{!21, !17, i64 32}
!30 = !{!21, !17, i64 40}
!31 = !{!6, !10, i64 44}
!32 = !{!21, !17, i64 48}
!33 = !{!21, !17, i64 56}
!34 = !{!21, !17, i64 64}
!35 = !{!36, !17, i64 0}
!36 = !{!"_ZTS9sam_state", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !37, i64 32, !37, i64 56, !37, i64 80, !17, i64 104}
!37 = !{!"_ZTSSt6vectorIhSaIhEE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!41 = !{!36, !17, i64 104}
!42 = !{!43, !7, i64 0}
!43 = !{!"_ZTS13sam_image_f32", !7, i64 0, !7, i64 4, !44, i64 8}
!44 = !{!"_ZTSSt6vectorIfSaIfEE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!48 = !{!43, !7, i64 4}
!49 = !{!10, !10, i64 0}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}
!52 = distinct !{!52, !51}
!53 = !{!54, !17, i64 0}
!54 = !{!"_ZTS13sam_layer_enc", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104}
!55 = !{!54, !17, i64 8}
!56 = !{!54, !17, i64 32}
!57 = !{!54, !17, i64 40}
!58 = !{!54, !17, i64 16}
!59 = !{!54, !17, i64 24}
!60 = !{!54, !17, i64 48}
!61 = !{!54, !17, i64 56}
!62 = !{!54, !17, i64 64}
!63 = !{!54, !17, i64 72}
!64 = !{!54, !17, i64 80}
!65 = !{!54, !17, i64 88}
!66 = !{!54, !17, i64 96}
!67 = !{!54, !17, i64 104}
!68 = distinct !{!68, !51}


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