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

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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 }
%"class.std::allocator.5" = type { i8 }
%struct.sam_image_u8 = type { i32, i32, %"class.std::vector" }
%"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_state = type { ptr, ptr, ptr, ptr, %"class.std::vector", %"class.std::vector", %"class.std::vector", 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_hparams = type { i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float }

@.str.143 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [29 x i8], align 1
@__func__._Z15sam_write_masksRK11sam_hparamsiiRK9sam_stateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE = external hidden unnamed_addr constant [16 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: mustprogress uwtable
declare dso_local i32 @stbi_write_png(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z15sam_write_masksRK11sam_hparamsiiRK9sam_stateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(52) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(112) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"class.std::vector.3", align 8
  %32 = alloca %"class.std::allocator.5", align 1
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca float, align 4
  %39 = alloca float, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca float, align 4
  %44 = alloca i32, align 4
  %45 = alloca i32, align 4
  %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
  %53 = alloca i32, align 4
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca float, align 4
  %57 = alloca float, align 4
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca i32, align 4
  %61 = alloca i32, align 4
  %62 = alloca float, align 4
  %63 = alloca float, align 4
  %64 = alloca float, align 4
  %65 = alloca float, align 4
  %66 = alloca float, align 4
  %67 = alloca float, align 4
  %68 = alloca float, align 4
  %69 = alloca i32, align 4
  %70 = alloca i32, align 4
  %71 = alloca %struct.sam_image_u8, align 8
  %72 = alloca i32, align 4
  %73 = alloca i32, align 4
  %74 = alloca i32, align 4
  %75 = alloca i32, align 4
  %76 = alloca ptr, align 8
  %77 = alloca i32, align 4
  %78 = alloca i32, align 4
  %79 = alloca float, align 4
  %80 = alloca float, align 4
  %81 = alloca float, align 4
  %82 = alloca float, align 4
  %83 = alloca float, align 4
  %84 = alloca float, align 4
  %85 = alloca i32, align 4
  %86 = alloca i32, align 4
  %87 = alloca i32, align 4
  %88 = alloca i32, align 4
  %89 = alloca i32, align 4
  %90 = alloca i32, align 4
  %91 = alloca i32, align 4
  %92 = alloca i32, align 4
  %93 = alloca i32, align 4
  %94 = alloca i32, align 4
  %95 = alloca i32, align 4
  %96 = alloca i32, align 4
  %97 = alloca float, align 4
  %98 = alloca float, align 4
  %99 = alloca i32, align 4
  %100 = alloca i32, align 4
  %101 = alloca i32, align 4
  %102 = alloca i32, align 4
  %103 = alloca float, align 4
  %104 = alloca float, align 4
  %105 = alloca float, align 4
  %106 = alloca float, align 4
  %107 = alloca float, align 4
  %108 = alloca float, align 4
  %109 = alloca float, align 4
  %110 = alloca float, align 4
  %111 = alloca %"class.std::__cxx11::basic_string", align 8
  %112 = alloca %"class.std::__cxx11::basic_string", align 8
  %113 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.sam_state, ptr %114, i32 0, i32 1
  %116 = load ptr, ptr %115, align 8, !tbaa !11
  %117 = getelementptr inbounds %struct.ggml_tensor, ptr %116, i32 0, i32 2
  %118 = getelementptr inbounds [4 x i64], ptr %117, i64 0, i64 2
  %119 = load i64, ptr %118, align 8, !tbaa !17
  %120 = icmp eq i64 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %5
  store i1 true, ptr %6, align 1
  br label %762

122:                                              ; preds = %5
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.sam_state, ptr %123, i32 0, i32 1
  %125 = load ptr, ptr %124, align 8, !tbaa !11
  %126 = getelementptr inbounds %struct.ggml_tensor, ptr %125, i32 0, i32 2
  %127 = getelementptr inbounds [4 x i64], ptr %126, i64 0, i64 2
  %128 = load i64, ptr %127, align 8, !tbaa !17
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.sam_state, ptr %129, i32 0, i32 2
  %131 = load ptr, ptr %130, align 8, !tbaa !19
  %132 = getelementptr inbounds %struct.ggml_tensor, ptr %131, i32 0, i32 2
  %133 = getelementptr inbounds [4 x i64], ptr %132, i64 0, i64 0
  %134 = load i64, ptr %133, align 8, !tbaa !17
  %135 = icmp ne i64 %128, %134
  br i1 %135, label %136, label %152

136:                                              ; preds = %122
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.sam_state, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = getelementptr inbounds %struct.ggml_tensor, ptr %139, i32 0, i32 2
  %141 = getelementptr inbounds [4 x i64], ptr %140, i64 0, i64 2
  %142 = load i64, ptr %141, align 8, !tbaa !17
  %143 = trunc i64 %142 to i32
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.sam_state, ptr %144, i32 0, i32 2
  %146 = load ptr, ptr %145, align 8, !tbaa !19
  %147 = getelementptr inbounds %struct.ggml_tensor, ptr %146, i32 0, i32 2
  %148 = getelementptr inbounds [4 x i64], ptr %147, i64 0, i64 0
  %149 = load i64, ptr %148, align 8, !tbaa !17
  %150 = trunc i64 %149 to i32
  %151 = call i32 (ptr, ...) @printf(ptr noundef @.str.143, i32 noundef %143, i32 noundef %150)
  store i1 false, ptr %6, align 1
  br label %762

152:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = call noundef i32 @_ZNK11sam_hparams10n_img_sizeEv(ptr noundef nonnull align 4 dereferenceable(52) %153)
  store i32 %154, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.sam_hparams, ptr %155, i32 0, i32 7
  %157 = load float, ptr %156, align 4, !tbaa !20
  store float %157, ptr %13, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.sam_hparams, ptr %158, i32 0, i32 8
  %160 = load float, ptr %159, align 4, !tbaa !24
  store float %160, ptr %14, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.sam_hparams, ptr %161, i32 0, i32 9
  %163 = load float, ptr %162, align 4, !tbaa !25
  store float %163, ptr %15, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %164 = load float, ptr %13, align 4, !tbaa !23
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.sam_hparams, ptr %165, i32 0, i32 10
  %167 = load float, ptr %166, align 4, !tbaa !26
  %168 = fadd float %164, %167
  store float %168, ptr %16, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %169 = load float, ptr %13, align 4, !tbaa !23
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.sam_hparams, ptr %170, i32 0, i32 10
  %172 = load float, ptr %171, align 4, !tbaa !26
  %173 = fsub float %169, %172
  store float %173, ptr %17, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.sam_state, ptr %174, i32 0, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !11
  %177 = getelementptr inbounds %struct.ggml_tensor, ptr %176, i32 0, i32 2
  %178 = getelementptr inbounds [4 x i64], ptr %177, i64 0, i64 0
  %179 = load i64, ptr %178, align 8, !tbaa !17
  %180 = trunc i64 %179 to i32
  store i32 %180, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %181 = load ptr, ptr %10, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.sam_state, ptr %181, i32 0, i32 1
  %183 = load ptr, ptr %182, align 8, !tbaa !11
  %184 = getelementptr inbounds %struct.ggml_tensor, ptr %183, i32 0, i32 2
  %185 = getelementptr inbounds [4 x i64], ptr %184, i64 0, i64 1
  %186 = load i64, ptr %185, align 8, !tbaa !17
  %187 = trunc i64 %186 to i32
  store i32 %187, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %188 = load ptr, ptr %10, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.sam_state, ptr %188, i32 0, i32 1
  %190 = load ptr, ptr %189, align 8, !tbaa !11
  %191 = getelementptr inbounds %struct.ggml_tensor, ptr %190, i32 0, i32 2
  %192 = getelementptr inbounds [4 x i64], ptr %191, i64 0, i64 2
  %193 = load i64, ptr %192, align 8, !tbaa !17
  %194 = trunc i64 %193 to i32
  store i32 %194, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %195 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %196 = load i32, ptr %195, align 4, !tbaa !9
  %197 = sitofp i32 %196 to float
  %198 = load i32, ptr %12, align 4, !tbaa !9
  %199 = sitofp i32 %198 to float
  %200 = fdiv float %197, %199
  store float %200, ptr %21, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %201 = load i32, ptr %8, align 4, !tbaa !9
  %202 = sitofp i32 %201 to float
  %203 = load float, ptr %21, align 4, !tbaa !23
  %204 = fdiv float %202, %203
  %205 = fadd float %204, 5.000000e-01
  %206 = fptosi float %205 to i32
  store i32 %206, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %207 = load i32, ptr %9, align 4, !tbaa !9
  %208 = sitofp i32 %207 to float
  %209 = load float, ptr %21, align 4, !tbaa !23
  %210 = fdiv float %208, %209
  %211 = fadd float %210, 5.000000e-01
  %212 = fptosi float %211 to i32
  store i32 %212, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %213 = load i32, ptr %18, align 4, !tbaa !9
  %214 = sitofp i32 %213 to float
  %215 = load i32, ptr %12, align 4, !tbaa !9
  %216 = sitofp i32 %215 to float
  %217 = fdiv float %214, %216
  store float %217, ptr %24, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %218 = load i32, ptr %19, align 4, !tbaa !9
  %219 = sitofp i32 %218 to float
  %220 = load i32, ptr %12, align 4, !tbaa !9
  %221 = sitofp i32 %220 to float
  %222 = fdiv float %219, %221
  store float %222, ptr %25, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %223 = load i32, ptr %22, align 4, !tbaa !9
  %224 = sitofp i32 %223 to float
  %225 = load i32, ptr %8, align 4, !tbaa !9
  %226 = sitofp i32 %225 to float
  %227 = fdiv float %224, %226
  store float %227, ptr %26, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %228 = load i32, ptr %23, align 4, !tbaa !9
  %229 = sitofp i32 %228 to float
  %230 = load i32, ptr %9, align 4, !tbaa !9
  %231 = sitofp i32 %230 to float
  %232 = fdiv float %229, %231
  store float %232, ptr %27, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %233 = load ptr, ptr %10, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.sam_state, ptr %233, i32 0, i32 2
  %235 = load ptr, ptr %234, align 8, !tbaa !19
  %236 = getelementptr inbounds %struct.ggml_tensor, ptr %235, i32 0, i32 10
  %237 = load ptr, ptr %236, align 8, !tbaa !27
  store ptr %237, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %238

238:                                              ; preds = %750, %152
  %239 = load i32, ptr %29, align 4, !tbaa !9
  %240 = load i32, ptr %20, align 4, !tbaa !9
  %241 = icmp slt i32 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %238
  store i32 2, ptr %30, align 4
  br label %758

243:                                              ; preds = %238
  %244 = load float, ptr %14, align 4, !tbaa !23
  %245 = fcmp ogt float %244, 0.000000e+00
  br i1 %245, label %246, label %265

246:                                              ; preds = %243
  %247 = load ptr, ptr %28, align 8, !tbaa !5
  %248 = load i32, ptr %29, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds float, ptr %247, i64 %249
  %251 = load float, ptr %250, align 4, !tbaa !23
  %252 = load float, ptr %14, align 4, !tbaa !23
  %253 = fcmp olt float %251, %252
  br i1 %253, label %254, label %265

254:                                              ; preds = %246
  %255 = load i32, ptr %29, align 4, !tbaa !9
  %256 = load ptr, ptr %28, align 8, !tbaa !5
  %257 = load i32, ptr %29, align 4, !tbaa !9
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds float, ptr %256, i64 %258
  %260 = load float, ptr %259, align 4, !tbaa !23
  %261 = fpext float %260 to double
  %262 = load float, ptr %14, align 4, !tbaa !23
  %263 = fpext float %262 to double
  %264 = call i32 (ptr, ...) @printf(ptr noundef @.str.144, i32 noundef %255, double noundef %261, double noundef %263)
  br label %750

265:                                              ; preds = %246, %243
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #7
  %266 = load i32, ptr %12, align 4, !tbaa !9
  %267 = load i32, ptr %12, align 4, !tbaa !9
  %268 = mul nsw i32 %266, %267
  %269 = sext i32 %268 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #7
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %269, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %270 unwind label %288

270:                                              ; preds = %265
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #7
  %271 = load ptr, ptr %10, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.sam_state, ptr %271, i32 0, i32 1
  %273 = load ptr, ptr %272, align 8, !tbaa !11
  %274 = getelementptr inbounds %struct.ggml_tensor, ptr %273, i32 0, i32 10
  %275 = load ptr, ptr %274, align 8, !tbaa !27
  %276 = load i32, ptr %29, align 4, !tbaa !9
  %277 = load i32, ptr %18, align 4, !tbaa !9
  %278 = mul nsw i32 %276, %277
  %279 = load i32, ptr %19, align 4, !tbaa !9
  %280 = mul nsw i32 %278, %279
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds float, ptr %275, i64 %281
  store ptr %282, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  store i32 0, ptr %36, align 4, !tbaa !9
  br label %283

283:                                              ; preds = %449, %270
  %284 = load i32, ptr %36, align 4, !tbaa !9
  %285 = load i32, ptr %12, align 4, !tbaa !9
  %286 = icmp slt i32 %284, %285
  br i1 %286, label %292, label %287

287:                                              ; preds = %283
  store i32 5, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  br label %452

288:                                              ; preds = %265
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %33, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %34, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #7
  br label %757

292:                                              ; preds = %283
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  store i32 0, ptr %37, align 4, !tbaa !9
  br label %293

293:                                              ; preds = %416, %292
  %294 = load i32, ptr %37, align 4, !tbaa !9
  %295 = load i32, ptr %12, align 4, !tbaa !9
  %296 = icmp slt i32 %294, %295
  br i1 %296, label %298, label %297

297:                                              ; preds = %293
  store i32 8, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  br label %448

298:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #7
  %299 = load float, ptr %24, align 4, !tbaa !23
  %300 = load i32, ptr %37, align 4, !tbaa !9
  %301 = sitofp i32 %300 to float
  %302 = fadd float %301, 5.000000e-01
  %303 = call float @llvm.fmuladd.f32(float %299, float %302, float -5.000000e-01)
  store float %303, ptr %39, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  store float 0.000000e+00, ptr %40, align 4, !tbaa !23
  %304 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %40)
          to label %305 unwind label %419

305:                                              ; preds = %298
  %306 = load float, ptr %304, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  store float %306, ptr %38, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  %307 = load float, ptr %25, align 4, !tbaa !23
  %308 = load i32, ptr %36, align 4, !tbaa !9
  %309 = sitofp i32 %308 to float
  %310 = fadd float %309, 5.000000e-01
  %311 = call float @llvm.fmuladd.f32(float %307, float %310, float -5.000000e-01)
  store float %311, ptr %42, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  store float 0.000000e+00, ptr %43, align 4, !tbaa !23
  %312 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %42, ptr noundef nonnull align 4 dereferenceable(4) %43)
          to label %313 unwind label %423

313:                                              ; preds = %305
  %314 = load float, ptr %312, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  store float %314, ptr %41, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %45) #7
  store i32 0, ptr %45, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  %315 = load float, ptr %38, align 4, !tbaa !23
  %316 = fptosi float %315 to i32
  store i32 %316, ptr %46, align 4, !tbaa !9
  %317 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %45, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %318 unwind label %427

318:                                              ; preds = %313
  %319 = load i32, ptr %317, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  store i32 %319, ptr %44, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  store i32 0, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  %320 = load float, ptr %41, align 4, !tbaa !23
  %321 = fptosi float %320 to i32
  store i32 %321, ptr %49, align 4, !tbaa !9
  %322 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %48, ptr noundef nonnull align 4 dereferenceable(4) %49)
          to label %323 unwind label %431

323:                                              ; preds = %318
  %324 = load i32, ptr %322, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  store i32 %324, ptr %47, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #7
  %325 = load i32, ptr %44, align 4, !tbaa !9
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %51, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #7
  %327 = load i32, ptr %18, align 4, !tbaa !9
  %328 = sub nsw i32 %327, 1
  store i32 %328, ptr %52, align 4, !tbaa !9
  %329 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %51, ptr noundef nonnull align 4 dereferenceable(4) %52)
          to label %330 unwind label %435

330:                                              ; preds = %323
  %331 = load i32, ptr %329, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  store i32 %331, ptr %50, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %53) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #7
  %332 = load i32, ptr %47, align 4, !tbaa !9
  %333 = add nsw i32 %332, 1
  store i32 %333, ptr %54, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #7
  %334 = load i32, ptr %19, align 4, !tbaa !9
  %335 = sub nsw i32 %334, 1
  store i32 %335, ptr %55, align 4, !tbaa !9
  %336 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %54, ptr noundef nonnull align 4 dereferenceable(4) %55)
          to label %337 unwind label %439

337:                                              ; preds = %330
  %338 = load i32, ptr %336, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #7
  store i32 %338, ptr %53, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #7
  %339 = load float, ptr %38, align 4, !tbaa !23
  %340 = load i32, ptr %44, align 4, !tbaa !9
  %341 = sitofp i32 %340 to float
  %342 = fsub float %339, %341
  store float %342, ptr %56, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #7
  %343 = load float, ptr %41, align 4, !tbaa !23
  %344 = load i32, ptr %47, align 4, !tbaa !9
  %345 = sitofp i32 %344 to float
  %346 = fsub float %343, %345
  store float %346, ptr %57, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #7
  %347 = load i32, ptr %47, align 4, !tbaa !9
  %348 = load i32, ptr %18, align 4, !tbaa !9
  %349 = mul nsw i32 %347, %348
  %350 = load i32, ptr %44, align 4, !tbaa !9
  %351 = add nsw i32 %349, %350
  store i32 %351, ptr %58, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #7
  %352 = load i32, ptr %47, align 4, !tbaa !9
  %353 = load i32, ptr %18, align 4, !tbaa !9
  %354 = mul nsw i32 %352, %353
  %355 = load i32, ptr %50, align 4, !tbaa !9
  %356 = add nsw i32 %354, %355
  store i32 %356, ptr %59, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #7
  %357 = load i32, ptr %53, align 4, !tbaa !9
  %358 = load i32, ptr %18, align 4, !tbaa !9
  %359 = mul nsw i32 %357, %358
  %360 = load i32, ptr %44, align 4, !tbaa !9
  %361 = add nsw i32 %359, %360
  store i32 %361, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #7
  %362 = load i32, ptr %53, align 4, !tbaa !9
  %363 = load i32, ptr %18, align 4, !tbaa !9
  %364 = mul nsw i32 %362, %363
  %365 = load i32, ptr %50, align 4, !tbaa !9
  %366 = add nsw i32 %364, %365
  store i32 %366, ptr %61, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %62) #7
  %367 = load ptr, ptr %35, align 8, !tbaa !5
  %368 = load i32, ptr %58, align 4, !tbaa !9
  %369 = sext i32 %368 to i64
  %370 = getelementptr inbounds float, ptr %367, i64 %369
  %371 = load float, ptr %370, align 4, !tbaa !23
  store float %371, ptr %62, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %63) #7
  %372 = load ptr, ptr %35, align 8, !tbaa !5
  %373 = load i32, ptr %59, align 4, !tbaa !9
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds float, ptr %372, i64 %374
  %376 = load float, ptr %375, align 4, !tbaa !23
  store float %376, ptr %63, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #7
  %377 = load ptr, ptr %35, align 8, !tbaa !5
  %378 = load i32, ptr %60, align 4, !tbaa !9
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds float, ptr %377, i64 %379
  %381 = load float, ptr %380, align 4, !tbaa !23
  store float %381, ptr %64, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %65) #7
  %382 = load ptr, ptr %35, align 8, !tbaa !5
  %383 = load i32, ptr %61, align 4, !tbaa !9
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds float, ptr %382, i64 %384
  %386 = load float, ptr %385, align 4, !tbaa !23
  store float %386, ptr %65, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %66) #7
  %387 = load float, ptr %56, align 4, !tbaa !23
  %388 = fsub float 1.000000e+00, %387
  %389 = load float, ptr %62, align 4, !tbaa !23
  %390 = load float, ptr %56, align 4, !tbaa !23
  %391 = load float, ptr %63, align 4, !tbaa !23
  %392 = fmul float %390, %391
  %393 = call float @llvm.fmuladd.f32(float %388, float %389, float %392)
  store float %393, ptr %66, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %67) #7
  %394 = load float, ptr %56, align 4, !tbaa !23
  %395 = fsub float 1.000000e+00, %394
  %396 = load float, ptr %64, align 4, !tbaa !23
  %397 = load float, ptr %56, align 4, !tbaa !23
  %398 = load float, ptr %65, align 4, !tbaa !23
  %399 = fmul float %397, %398
  %400 = call float @llvm.fmuladd.f32(float %395, float %396, float %399)
  store float %400, ptr %67, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %68) #7
  %401 = load float, ptr %57, align 4, !tbaa !23
  %402 = fsub float 1.000000e+00, %401
  %403 = load float, ptr %66, align 4, !tbaa !23
  %404 = load float, ptr %57, align 4, !tbaa !23
  %405 = load float, ptr %67, align 4, !tbaa !23
  %406 = fmul float %404, %405
  %407 = call float @llvm.fmuladd.f32(float %402, float %403, float %406)
  store float %407, ptr %68, align 4, !tbaa !23
  %408 = load float, ptr %68, align 4, !tbaa !23
  %409 = load i32, ptr %36, align 4, !tbaa !9
  %410 = load i32, ptr %12, align 4, !tbaa !9
  %411 = mul nsw i32 %409, %410
  %412 = load i32, ptr %37, align 4, !tbaa !9
  %413 = add nsw i32 %411, %412
  %414 = sext i32 %413 to i64
  %415 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %414) #7
  store float %408, ptr %415, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %68) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %67) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %66) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %65) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %62) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  br label %416

416:                                              ; preds = %337
  %417 = load i32, ptr %37, align 4, !tbaa !9
  %418 = add nsw i32 %417, 1
  store i32 %418, ptr %37, align 4, !tbaa !9
  br label %293, !llvm.loop !31

419:                                              ; preds = %298
  %420 = landingpad { ptr, i32 }
          cleanup
  %421 = extractvalue { ptr, i32 } %420, 0
  store ptr %421, ptr %33, align 8
  %422 = extractvalue { ptr, i32 } %420, 1
  store i32 %422, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  br label %447

423:                                              ; preds = %305
  %424 = landingpad { ptr, i32 }
          cleanup
  %425 = extractvalue { ptr, i32 } %424, 0
  store ptr %425, ptr %33, align 8
  %426 = extractvalue { ptr, i32 } %424, 1
  store i32 %426, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  br label %446

427:                                              ; preds = %313
  %428 = landingpad { ptr, i32 }
          cleanup
  %429 = extractvalue { ptr, i32 } %428, 0
  store ptr %429, ptr %33, align 8
  %430 = extractvalue { ptr, i32 } %428, 1
  store i32 %430, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %45) #7
  br label %445

431:                                              ; preds = %318
  %432 = landingpad { ptr, i32 }
          cleanup
  %433 = extractvalue { ptr, i32 } %432, 0
  store ptr %433, ptr %33, align 8
  %434 = extractvalue { ptr, i32 } %432, 1
  store i32 %434, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  br label %444

435:                                              ; preds = %323
  %436 = landingpad { ptr, i32 }
          cleanup
  %437 = extractvalue { ptr, i32 } %436, 0
  store ptr %437, ptr %33, align 8
  %438 = extractvalue { ptr, i32 } %436, 1
  store i32 %438, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #7
  br label %443

439:                                              ; preds = %330
  %440 = landingpad { ptr, i32 }
          cleanup
  %441 = extractvalue { ptr, i32 } %440, 0
  store ptr %441, ptr %33, align 8
  %442 = extractvalue { ptr, i32 } %440, 1
  store i32 %442, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %53) #7
  br label %443

443:                                              ; preds = %439, %435
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #7
  br label %444

444:                                              ; preds = %443, %431
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  br label %445

445:                                              ; preds = %444, %427
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  br label %446

446:                                              ; preds = %445, %423
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  br label %447

447:                                              ; preds = %446, %419
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  br label %756

448:                                              ; preds = %297
  br label %449

449:                                              ; preds = %448
  %450 = load i32, ptr %36, align 4, !tbaa !9
  %451 = add nsw i32 %450, 1
  store i32 %451, ptr %36, align 4, !tbaa !9
  br label %283, !llvm.loop !33

452:                                              ; preds = %287
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %69) #7
  store i32 0, ptr %69, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %70) #7
  store i32 0, ptr %70, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %71) #7
  call void @_ZN12sam_image_u8C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %71) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %72) #7
  %453 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %453, ptr %72, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %73) #7
  store i32 0, ptr %73, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %74) #7
  %454 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %454, ptr %74, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %75) #7
  store i32 0, ptr %75, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %76) #7
  %455 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  store ptr %455, ptr %76, align 8, !tbaa !5
  %456 = load i32, ptr %8, align 4, !tbaa !9
  %457 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 0
  store i32 %456, ptr %457, align 8, !tbaa !34
  %458 = load i32, ptr %9, align 4, !tbaa !9
  %459 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 1
  store i32 %458, ptr %459, align 4, !tbaa !36
  %460 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 2
  %461 = load i32, ptr %8, align 4, !tbaa !9
  %462 = load i32, ptr %9, align 4, !tbaa !9
  %463 = mul nsw i32 %461, %462
  %464 = sext i32 %463 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %460, i64 noundef %464)
          to label %465 unwind label %471

465:                                              ; preds = %452
  call void @llvm.lifetime.start.p0(i64 4, ptr %77) #7
  store i32 0, ptr %77, align 4, !tbaa !9
  br label %466

466:                                              ; preds = %668, %465
  %467 = load i32, ptr %77, align 4, !tbaa !9
  %468 = load i32, ptr %9, align 4, !tbaa !9
  %469 = icmp slt i32 %467, %468
  br i1 %469, label %475, label %470

470:                                              ; preds = %466
  store i32 11, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #7
  br label %671

471:                                              ; preds = %452
  %472 = landingpad { ptr, i32 }
          cleanup
  %473 = extractvalue { ptr, i32 } %472, 0
  store ptr %473, ptr %33, align 8
  %474 = extractvalue { ptr, i32 } %472, 1
  store i32 %474, ptr %34, align 4
  br label %691

475:                                              ; preds = %466
  call void @llvm.lifetime.start.p0(i64 4, ptr %78) #7
  store i32 0, ptr %78, align 4, !tbaa !9
  br label %476

476:                                              ; preds = %658, %475
  %477 = load i32, ptr %78, align 4, !tbaa !9
  %478 = load i32, ptr %8, align 4, !tbaa !9
  %479 = icmp slt i32 %477, %478
  br i1 %479, label %481, label %480

480:                                              ; preds = %476
  store i32 14, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #7
  br label %667

481:                                              ; preds = %476
  call void @llvm.lifetime.start.p0(i64 4, ptr %79) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %80) #7
  %482 = load float, ptr %26, align 4, !tbaa !23
  %483 = load i32, ptr %78, align 4, !tbaa !9
  %484 = sitofp i32 %483 to float
  %485 = fadd float %484, 5.000000e-01
  %486 = call float @llvm.fmuladd.f32(float %482, float %485, float -5.000000e-01)
  store float %486, ptr %80, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %81) #7
  store float 0.000000e+00, ptr %81, align 4, !tbaa !23
  %487 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %80, ptr noundef nonnull align 4 dereferenceable(4) %81)
          to label %488 unwind label %597

488:                                              ; preds = %481
  %489 = load float, ptr %487, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #7
  store float %489, ptr %79, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %82) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %83) #7
  %490 = load float, ptr %27, align 4, !tbaa !23
  %491 = load i32, ptr %77, align 4, !tbaa !9
  %492 = sitofp i32 %491 to float
  %493 = fadd float %492, 5.000000e-01
  %494 = call float @llvm.fmuladd.f32(float %490, float %493, float -5.000000e-01)
  store float %494, ptr %83, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %84) #7
  store float 0.000000e+00, ptr %84, align 4, !tbaa !23
  %495 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %496 unwind label %601

496:                                              ; preds = %488
  %497 = load float, ptr %495, align 4, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #7
  store float %497, ptr %82, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %85) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %86) #7
  store i32 0, ptr %86, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %87) #7
  %498 = load float, ptr %79, align 4, !tbaa !23
  %499 = fptosi float %498 to i32
  store i32 %499, ptr %87, align 4, !tbaa !9
  %500 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %86, ptr noundef nonnull align 4 dereferenceable(4) %87)
          to label %501 unwind label %605

501:                                              ; preds = %496
  %502 = load i32, ptr %500, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #7
  store i32 %502, ptr %85, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %88) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %89) #7
  store i32 0, ptr %89, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %90) #7
  %503 = load float, ptr %82, align 4, !tbaa !23
  %504 = fptosi float %503 to i32
  store i32 %504, ptr %90, align 4, !tbaa !9
  %505 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %89, ptr noundef nonnull align 4 dereferenceable(4) %90)
          to label %506 unwind label %609

506:                                              ; preds = %501
  %507 = load i32, ptr %505, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #7
  store i32 %507, ptr %88, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %91) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %92) #7
  %508 = load i32, ptr %85, align 4, !tbaa !9
  %509 = add nsw i32 %508, 1
  store i32 %509, ptr %92, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %93) #7
  %510 = load i32, ptr %22, align 4, !tbaa !9
  %511 = sub nsw i32 %510, 1
  store i32 %511, ptr %93, align 4, !tbaa !9
  %512 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %92, ptr noundef nonnull align 4 dereferenceable(4) %93)
          to label %513 unwind label %613

513:                                              ; preds = %506
  %514 = load i32, ptr %512, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #7
  store i32 %514, ptr %91, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %94) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %95) #7
  %515 = load i32, ptr %88, align 4, !tbaa !9
  %516 = add nsw i32 %515, 1
  store i32 %516, ptr %95, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %96) #7
  %517 = load i32, ptr %23, align 4, !tbaa !9
  %518 = sub nsw i32 %517, 1
  store i32 %518, ptr %96, align 4, !tbaa !9
  %519 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %95, ptr noundef nonnull align 4 dereferenceable(4) %96)
          to label %520 unwind label %617

520:                                              ; preds = %513
  %521 = load i32, ptr %519, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %96) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %95) #7
  store i32 %521, ptr %94, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %97) #7
  %522 = load float, ptr %79, align 4, !tbaa !23
  %523 = load i32, ptr %85, align 4, !tbaa !9
  %524 = sitofp i32 %523 to float
  %525 = fsub float %522, %524
  store float %525, ptr %97, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %98) #7
  %526 = load float, ptr %82, align 4, !tbaa !23
  %527 = load i32, ptr %88, align 4, !tbaa !9
  %528 = sitofp i32 %527 to float
  %529 = fsub float %526, %528
  store float %529, ptr %98, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %99) #7
  %530 = load i32, ptr %88, align 4, !tbaa !9
  %531 = load i32, ptr %12, align 4, !tbaa !9
  %532 = mul nsw i32 %530, %531
  %533 = load i32, ptr %85, align 4, !tbaa !9
  %534 = add nsw i32 %532, %533
  store i32 %534, ptr %99, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %100) #7
  %535 = load i32, ptr %88, align 4, !tbaa !9
  %536 = load i32, ptr %12, align 4, !tbaa !9
  %537 = mul nsw i32 %535, %536
  %538 = load i32, ptr %91, align 4, !tbaa !9
  %539 = add nsw i32 %537, %538
  store i32 %539, ptr %100, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %101) #7
  %540 = load i32, ptr %94, align 4, !tbaa !9
  %541 = load i32, ptr %12, align 4, !tbaa !9
  %542 = mul nsw i32 %540, %541
  %543 = load i32, ptr %85, align 4, !tbaa !9
  %544 = add nsw i32 %542, %543
  store i32 %544, ptr %101, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %102) #7
  %545 = load i32, ptr %94, align 4, !tbaa !9
  %546 = load i32, ptr %12, align 4, !tbaa !9
  %547 = mul nsw i32 %545, %546
  %548 = load i32, ptr %91, align 4, !tbaa !9
  %549 = add nsw i32 %547, %548
  store i32 %549, ptr %102, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %103) #7
  %550 = load ptr, ptr %76, align 8, !tbaa !5
  %551 = load i32, ptr %99, align 4, !tbaa !9
  %552 = sext i32 %551 to i64
  %553 = getelementptr inbounds float, ptr %550, i64 %552
  %554 = load float, ptr %553, align 4, !tbaa !23
  store float %554, ptr %103, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %104) #7
  %555 = load ptr, ptr %76, align 8, !tbaa !5
  %556 = load i32, ptr %100, align 4, !tbaa !9
  %557 = sext i32 %556 to i64
  %558 = getelementptr inbounds float, ptr %555, i64 %557
  %559 = load float, ptr %558, align 4, !tbaa !23
  store float %559, ptr %104, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %105) #7
  %560 = load ptr, ptr %76, align 8, !tbaa !5
  %561 = load i32, ptr %101, align 4, !tbaa !9
  %562 = sext i32 %561 to i64
  %563 = getelementptr inbounds float, ptr %560, i64 %562
  %564 = load float, ptr %563, align 4, !tbaa !23
  store float %564, ptr %105, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %106) #7
  %565 = load ptr, ptr %76, align 8, !tbaa !5
  %566 = load i32, ptr %102, align 4, !tbaa !9
  %567 = sext i32 %566 to i64
  %568 = getelementptr inbounds float, ptr %565, i64 %567
  %569 = load float, ptr %568, align 4, !tbaa !23
  store float %569, ptr %106, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %107) #7
  %570 = load float, ptr %97, align 4, !tbaa !23
  %571 = fsub float 1.000000e+00, %570
  %572 = load float, ptr %103, align 4, !tbaa !23
  %573 = load float, ptr %97, align 4, !tbaa !23
  %574 = load float, ptr %104, align 4, !tbaa !23
  %575 = fmul float %573, %574
  %576 = call float @llvm.fmuladd.f32(float %571, float %572, float %575)
  store float %576, ptr %107, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %108) #7
  %577 = load float, ptr %97, align 4, !tbaa !23
  %578 = fsub float 1.000000e+00, %577
  %579 = load float, ptr %105, align 4, !tbaa !23
  %580 = load float, ptr %97, align 4, !tbaa !23
  %581 = load float, ptr %106, align 4, !tbaa !23
  %582 = fmul float %580, %581
  %583 = call float @llvm.fmuladd.f32(float %578, float %579, float %582)
  store float %583, ptr %108, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %109) #7
  %584 = load float, ptr %98, align 4, !tbaa !23
  %585 = fsub float 1.000000e+00, %584
  %586 = load float, ptr %107, align 4, !tbaa !23
  %587 = load float, ptr %98, align 4, !tbaa !23
  %588 = load float, ptr %108, align 4, !tbaa !23
  %589 = fmul float %587, %588
  %590 = call float @llvm.fmuladd.f32(float %585, float %586, float %589)
  store float %590, ptr %109, align 4, !tbaa !23
  %591 = load float, ptr %109, align 4, !tbaa !23
  %592 = load float, ptr %16, align 4, !tbaa !23
  %593 = fcmp ogt float %591, %592
  br i1 %593, label %594, label %621

594:                                              ; preds = %520
  %595 = load i32, ptr %69, align 4, !tbaa !9
  %596 = add nsw i32 %595, 1
  store i32 %596, ptr %69, align 4, !tbaa !9
  br label %621

597:                                              ; preds = %481
  %598 = landingpad { ptr, i32 }
          cleanup
  %599 = extractvalue { ptr, i32 } %598, 0
  store ptr %599, ptr %33, align 8
  %600 = extractvalue { ptr, i32 } %598, 1
  store i32 %600, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %81) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %80) #7
  br label %666

601:                                              ; preds = %488
  %602 = landingpad { ptr, i32 }
          cleanup
  %603 = extractvalue { ptr, i32 } %602, 0
  store ptr %603, ptr %33, align 8
  %604 = extractvalue { ptr, i32 } %602, 1
  store i32 %604, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %84) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %83) #7
  br label %665

605:                                              ; preds = %496
  %606 = landingpad { ptr, i32 }
          cleanup
  %607 = extractvalue { ptr, i32 } %606, 0
  store ptr %607, ptr %33, align 8
  %608 = extractvalue { ptr, i32 } %606, 1
  store i32 %608, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %87) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %86) #7
  br label %664

609:                                              ; preds = %501
  %610 = landingpad { ptr, i32 }
          cleanup
  %611 = extractvalue { ptr, i32 } %610, 0
  store ptr %611, ptr %33, align 8
  %612 = extractvalue { ptr, i32 } %610, 1
  store i32 %612, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %90) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %89) #7
  br label %663

613:                                              ; preds = %506
  %614 = landingpad { ptr, i32 }
          cleanup
  %615 = extractvalue { ptr, i32 } %614, 0
  store ptr %615, ptr %33, align 8
  %616 = extractvalue { ptr, i32 } %614, 1
  store i32 %616, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %93) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %92) #7
  br label %662

617:                                              ; preds = %513
  %618 = landingpad { ptr, i32 }
          cleanup
  %619 = extractvalue { ptr, i32 } %618, 0
  store ptr %619, ptr %33, align 8
  %620 = extractvalue { ptr, i32 } %618, 1
  store i32 %620, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %96) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %95) #7
  br label %661

621:                                              ; preds = %594, %520
  %622 = load float, ptr %109, align 4, !tbaa !23
  %623 = load float, ptr %17, align 4, !tbaa !23
  %624 = fcmp ogt float %622, %623
  br i1 %624, label %625, label %628

625:                                              ; preds = %621
  %626 = load i32, ptr %70, align 4, !tbaa !9
  %627 = add nsw i32 %626, 1
  store i32 %627, ptr %70, align 4, !tbaa !9
  br label %628

628:                                              ; preds = %625, %621
  %629 = load float, ptr %109, align 4, !tbaa !23
  %630 = load float, ptr %13, align 4, !tbaa !23
  %631 = fcmp ogt float %629, %630
  br i1 %631, label %632, label %657

632:                                              ; preds = %628
  %633 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %72, ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %634 unwind label %653

634:                                              ; preds = %632
  %635 = load i32, ptr %633, align 4, !tbaa !9
  store i32 %635, ptr %72, align 4, !tbaa !9
  %636 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %73, ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %637 unwind label %653

637:                                              ; preds = %634
  %638 = load i32, ptr %636, align 4, !tbaa !9
  store i32 %638, ptr %73, align 4, !tbaa !9
  %639 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %74, ptr noundef nonnull align 4 dereferenceable(4) %78)
          to label %640 unwind label %653

640:                                              ; preds = %637
  %641 = load i32, ptr %639, align 4, !tbaa !9
  store i32 %641, ptr %74, align 4, !tbaa !9
  %642 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %75, ptr noundef nonnull align 4 dereferenceable(4) %78)
          to label %643 unwind label %653

643:                                              ; preds = %640
  %644 = load i32, ptr %642, align 4, !tbaa !9
  store i32 %644, ptr %75, align 4, !tbaa !9
  %645 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 2
  %646 = load i32, ptr %77, align 4, !tbaa !9
  %647 = load i32, ptr %8, align 4, !tbaa !9
  %648 = mul nsw i32 %646, %647
  %649 = load i32, ptr %78, align 4, !tbaa !9
  %650 = add nsw i32 %648, %649
  %651 = sext i32 %650 to i64
  %652 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %645, i64 noundef %651) #7
  store i8 -1, ptr %652, align 1, !tbaa !37
  br label %657

653:                                              ; preds = %640, %637, %634, %632
  %654 = landingpad { ptr, i32 }
          cleanup
  %655 = extractvalue { ptr, i32 } %654, 0
  store ptr %655, ptr %33, align 8
  %656 = extractvalue { ptr, i32 } %654, 1
  store i32 %656, ptr %34, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %109) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %108) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %107) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %106) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %105) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %104) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %103) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %102) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %100) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %98) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %97) #7
  br label %661

657:                                              ; preds = %643, %628
  call void @llvm.lifetime.end.p0(i64 4, ptr %109) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %108) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %107) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %106) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %105) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %104) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %103) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %102) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %101) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %100) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %99) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %98) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %97) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %94) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %88) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %82) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #7
  br label %658

658:                                              ; preds = %657
  %659 = load i32, ptr %78, align 4, !tbaa !9
  %660 = add nsw i32 %659, 1
  store i32 %660, ptr %78, align 4, !tbaa !9
  br label %476, !llvm.loop !38

661:                                              ; preds = %653, %617
  call void @llvm.lifetime.end.p0(i64 4, ptr %94) #7
  br label %662

662:                                              ; preds = %661, %613
  call void @llvm.lifetime.end.p0(i64 4, ptr %91) #7
  br label %663

663:                                              ; preds = %662, %609
  call void @llvm.lifetime.end.p0(i64 4, ptr %88) #7
  br label %664

664:                                              ; preds = %663, %605
  call void @llvm.lifetime.end.p0(i64 4, ptr %85) #7
  br label %665

665:                                              ; preds = %664, %601
  call void @llvm.lifetime.end.p0(i64 4, ptr %82) #7
  br label %666

666:                                              ; preds = %665, %597
  call void @llvm.lifetime.end.p0(i64 4, ptr %79) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %78) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %77) #7
  br label %691

667:                                              ; preds = %480
  br label %668

668:                                              ; preds = %667
  %669 = load i32, ptr %77, align 4, !tbaa !9
  %670 = add nsw i32 %669, 1
  store i32 %670, ptr %77, align 4, !tbaa !9
  br label %466, !llvm.loop !39

671:                                              ; preds = %470
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %110) #7
  %672 = load i32, ptr %69, align 4, !tbaa !9
  %673 = sitofp i32 %672 to float
  %674 = load i32, ptr %70, align 4, !tbaa !9
  %675 = sitofp i32 %674 to float
  %676 = fdiv float %673, %675
  store float %676, ptr %110, align 4, !tbaa !23
  %677 = load float, ptr %15, align 4, !tbaa !23
  %678 = fcmp ogt float %677, 0.000000e+00
  br i1 %678, label %679, label %696

679:                                              ; preds = %671
  %680 = load float, ptr %110, align 4, !tbaa !23
  %681 = load float, ptr %15, align 4, !tbaa !23
  %682 = fcmp olt float %680, %681
  br i1 %682, label %683, label %696

683:                                              ; preds = %679
  %684 = load i32, ptr %29, align 4, !tbaa !9
  %685 = load float, ptr %110, align 4, !tbaa !23
  %686 = fpext float %685 to double
  %687 = load float, ptr %15, align 4, !tbaa !23
  %688 = fpext float %687 to double
  %689 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.145, i32 noundef %684, double noundef %686, double noundef %688)
          to label %690 unwind label %692

690:                                              ; preds = %683
  store i32 4, ptr %30, align 4
  br label %747

691:                                              ; preds = %666, %471
  call void @llvm.lifetime.end.p0(i64 8, ptr %76) #7
  br label %755

692:                                              ; preds = %696, %683
  %693 = landingpad { ptr, i32 }
          cleanup
  %694 = extractvalue { ptr, i32 } %693, 0
  store ptr %694, ptr %33, align 8
  %695 = extractvalue { ptr, i32 } %693, 1
  store i32 %695, ptr %34, align 4
  br label %754

696:                                              ; preds = %679, %671
  %697 = load i32, ptr %29, align 4, !tbaa !9
  %698 = load ptr, ptr %28, align 8, !tbaa !5
  %699 = load i32, ptr %29, align 4, !tbaa !9
  %700 = sext i32 %699 to i64
  %701 = getelementptr inbounds float, ptr %698, i64 %700
  %702 = load float, ptr %701, align 4, !tbaa !23
  %703 = fpext float %702 to double
  %704 = load float, ptr %110, align 4, !tbaa !23
  %705 = fpext float %704 to double
  %706 = load i32, ptr %74, align 4, !tbaa !9
  %707 = load i32, ptr %75, align 4, !tbaa !9
  %708 = load i32, ptr %72, align 4, !tbaa !9
  %709 = load i32, ptr %73, align 4, !tbaa !9
  %710 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.146, i32 noundef %697, double noundef %703, double noundef %705, i32 noundef %706, i32 noundef %707, i32 noundef %708, i32 noundef %709)
          to label %711 unwind label %692

711:                                              ; preds = %696
  call void @llvm.lifetime.start.p0(i64 32, ptr %111) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %112) #7
  %712 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %113) #7
  %713 = load i32, ptr %29, align 4, !tbaa !9
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %113, i32 noundef %713) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %112, ptr noundef nonnull align 8 dereferenceable(32) %712, ptr noundef nonnull align 8 dereferenceable(32) %113)
          to label %714 unwind label %732

714:                                              ; preds = %711
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %111, ptr noundef nonnull align 8 dereferenceable(32) %112, ptr noundef @.str.147)
          to label %715 unwind label %736

715:                                              ; preds = %714
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %112) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %113) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %113) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %112) #7
  %716 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %111) #7
  %717 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 0
  %718 = load i32, ptr %717, align 8, !tbaa !34
  %719 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 1
  %720 = load i32, ptr %719, align 4, !tbaa !36
  %721 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 2
  %722 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %721) #7
  %723 = getelementptr inbounds %struct.sam_image_u8, ptr %71, i32 0, i32 0
  %724 = load i32, ptr %723, align 8, !tbaa !34
  %725 = invoke i32 @stbi_write_png(ptr noundef %716, i32 noundef %718, i32 noundef %720, i32 noundef 1, ptr noundef %722, i32 noundef %724)
          to label %726 unwind label %741

726:                                              ; preds = %715
  %727 = icmp ne i32 %725, 0
  br i1 %727, label %745, label %728

728:                                              ; preds = %726
  %729 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %111) #7
  %730 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.148, ptr noundef @__func__._Z15sam_write_masksRK11sam_hparamsiiRK9sam_stateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, ptr noundef %729)
          to label %731 unwind label %741

731:                                              ; preds = %728
  store i1 false, ptr %6, align 1
  store i32 1, ptr %30, align 4
  br label %746

732:                                              ; preds = %711
  %733 = landingpad { ptr, i32 }
          cleanup
  %734 = extractvalue { ptr, i32 } %733, 0
  store ptr %734, ptr %33, align 8
  %735 = extractvalue { ptr, i32 } %733, 1
  store i32 %735, ptr %34, align 4
  br label %740

736:                                              ; preds = %714
  %737 = landingpad { ptr, i32 }
          cleanup
  %738 = extractvalue { ptr, i32 } %737, 0
  store ptr %738, ptr %33, align 8
  %739 = extractvalue { ptr, i32 } %737, 1
  store i32 %739, ptr %34, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %112) #7
  br label %740

740:                                              ; preds = %736, %732
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %113) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %113) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %112) #7
  br label %753

741:                                              ; preds = %728, %715
  %742 = landingpad { ptr, i32 }
          cleanup
  %743 = extractvalue { ptr, i32 } %742, 0
  store ptr %743, ptr %33, align 8
  %744 = extractvalue { ptr, i32 } %742, 1
  store i32 %744, ptr %34, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %111) #7
  br label %753

745:                                              ; preds = %726
  store i32 0, ptr %30, align 4
  br label %746

746:                                              ; preds = %745, %731
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %111) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %111) #7
  br label %747

747:                                              ; preds = %746, %690
  call void @llvm.lifetime.end.p0(i64 4, ptr %110) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #7
  call void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32) %71) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %71) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #7
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #7
  %748 = load i32, ptr %30, align 4
  switch i32 %748, label %758 [
    i32 0, label %749
    i32 4, label %750
  ]

749:                                              ; preds = %747
  br label %750

750:                                              ; preds = %749, %747, %254
  %751 = load i32, ptr %29, align 4, !tbaa !9
  %752 = add nsw i32 %751, 1
  store i32 %752, ptr %29, align 4, !tbaa !9
  br label %238, !llvm.loop !40

753:                                              ; preds = %741, %740
  call void @llvm.lifetime.end.p0(i64 32, ptr %111) #7
  br label %754

754:                                              ; preds = %753, %692
  call void @llvm.lifetime.end.p0(i64 4, ptr %110) #7
  br label %755

755:                                              ; preds = %754, %691
  call void @llvm.lifetime.end.p0(i64 4, ptr %75) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %74) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %73) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %72) #7
  call void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32) %71) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %71) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %70) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %69) #7
  br label %756

756:                                              ; preds = %755, %447
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #7
  br label %757

757:                                              ; preds = %756, %288
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, 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
  br label %764

758:                                              ; preds = %747, %242
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  %759 = load i32, ptr %30, align 4
  switch i32 %759, label %761 [
    i32 2, label %760
  ]

760:                                              ; preds = %758
  store i1 true, ptr %6, align 1
  store i32 1, ptr %30, align 4
  br label %761

761:                                              ; preds = %760, %758
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, 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
  br label %762

762:                                              ; preds = %761, %136, %121
  %763 = load i1, ptr %6, align 1
  ret i1 %763

764:                                              ; preds = %757
  %765 = load ptr, ptr %33, align 8
  %766 = load i32, ptr %34, align 4
  %767 = insertvalue { ptr, i32 } poison, ptr %765, 0
  %768 = insertvalue { ptr, i32 } %767, i32 %766, 1
  resume { ptr, i32 } %768
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12sam_image_u8C2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS9sam_state", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32, !13, i64 56, !13, i64 80, !6, i64 104}
!13 = !{!"_ZTSSt6vectorIhSaIhEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!12, !6, i64 16}
!20 = !{!21, !22, i64 28}
!21 = !{!"_ZTS11sam_hparams", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !22, i64 28, !22, i64 32, !22, i64 36, !22, i64 40, !22, i64 44, !22, i64 48}
!22 = !{!"float", !7, i64 0}
!23 = !{!22, !22, i64 0}
!24 = !{!21, !22, i64 32}
!25 = !{!21, !22, i64 36}
!26 = !{!21, !22, i64 40}
!27 = !{!28, !6, i64 248}
!28 = !{!"_ZTS11ggml_tensor", !29, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !30, i64 80, !7, i64 84, !10, i64 148, !7, i64 152, !6, i64 232, !18, i64 240, !6, i64 248, !7, i64 256, !6, i64 320, !7, i64 328}
!29 = !{!"_ZTS9ggml_type", !7, i64 0}
!30 = !{!"_ZTS7ggml_op", !7, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!35, !10, i64 0}
!35 = !{!"_ZTS12sam_image_u8", !10, i64 0, !10, i64 4, !13, i64 8}
!36 = !{!35, !10, i64 4}
!37 = !{!7, !7, i64 0}
!38 = distinct !{!38, !32}
!39 = distinct !{!39, !32}
!40 = distinct !{!40, !32}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::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 }
%"class.std::allocator.5" = type { i8 }
%struct.sam_image_u8 = type { i32, i32, %"class.std::vector" }
%"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 }

@.str.143 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.144 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.145 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.146 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.147 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.148 = external hidden unnamed_addr constant [29 x i8], align 1
@__func__._Z15sam_write_masksRK11sam_hparamsiiRK9sam_stateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE = external hidden unnamed_addr constant [16 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @stbi_write_png(ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z15sam_write_masksRK11sam_hparamsiiRK9sam_stateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 4 dereferenceable(52) %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef nonnull readonly align 8 dereferenceable(112) %3, ptr noundef nonnull align 8 dereferenceable(32) %4) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.3", align 8
  %9 = alloca %"class.std::allocator.5", align 1
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.sam_image_u8, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca float, align 4
  %32 = alloca float, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca %"class.std::__cxx11::basic_string", align 8
  %42 = alloca %"class.std::__cxx11::basic_string", align 8
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %3, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %45, i64 32
  %47 = load i64, ptr %46, align 8, !tbaa !16
  %48 = icmp eq i64 %47, 0
  br i1 %48, label %.critedge, label %49

49:                                               ; preds = %5
  %50 = getelementptr inbounds i8, ptr %3, i64 16
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %53 = load i64, ptr %52, align 8, !tbaa !16
  %.not = icmp eq i64 %47, %53
  br i1 %.not, label %58, label %54

54:                                               ; preds = %49
  %55 = trunc i64 %47 to i32
  %56 = trunc i64 %53 to i32
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.143, i32 noundef %55, i32 noundef %56)
  br label %.critedge

58:                                               ; preds = %49
  %59 = tail call noundef i32 @_ZNK11sam_hparams10n_img_sizeEv(ptr noundef nonnull align 4 dereferenceable(52) %0)
  %60 = getelementptr inbounds i8, ptr %0, i64 28
  %61 = load float, ptr %60, align 4, !tbaa !19
  %62 = getelementptr inbounds i8, ptr %0, i64 32
  %63 = load float, ptr %62, align 4, !tbaa !22
  %64 = getelementptr inbounds i8, ptr %0, i64 36
  %65 = load float, ptr %64, align 4, !tbaa !23
  %66 = getelementptr inbounds i8, ptr %0, i64 40
  %67 = load float, ptr %66, align 4, !tbaa !24
  %68 = fadd float %61, %67
  %69 = fsub float %61, %67
  %70 = load ptr, ptr %44, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %72 = load i64, ptr %71, align 8, !tbaa !16
  %73 = trunc i64 %72 to i32
  %74 = getelementptr inbounds i8, ptr %70, i64 24
  %75 = load i64, ptr %74, align 8, !tbaa !16
  %76 = trunc i64 %75 to i32
  %77 = getelementptr inbounds i8, ptr %70, i64 32
  %78 = load i64, ptr %77, align 8, !tbaa !16
  %79 = trunc i64 %78 to i32
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sitofp i32 %81 to float
  %83 = sitofp i32 %59 to float
  %84 = fdiv float %82, %83
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sitofp i32 %85 to float
  %87 = fdiv float %86, %84
  %88 = fadd float %87, 5.000000e-01
  %89 = fptosi float %88 to i32
  %90 = load i32, ptr %7, align 4, !tbaa !5
  %91 = sitofp i32 %90 to float
  %92 = fdiv float %91, %84
  %93 = fadd float %92, 5.000000e-01
  %94 = fptosi float %93 to i32
  %95 = sitofp i32 %73 to float
  %96 = fdiv float %95, %83
  %97 = sitofp i32 %76 to float
  %98 = fdiv float %97, %83
  %99 = sitofp i32 %89 to float
  %100 = fdiv float %99, %86
  %101 = sitofp i32 %94 to float
  %102 = fdiv float %101, %91
  %103 = load ptr, ptr %50, align 8, !tbaa !18
  %104 = getelementptr inbounds i8, ptr %103, i64 248
  %105 = load ptr, ptr %104, align 8, !tbaa !25
  %.not203.not223 = icmp sgt i32 %79, 0
  br i1 %.not203.not223, label %.lr.ph226, label %.critedge

.lr.ph226:                                        ; preds = %58
  %106 = fcmp ogt float %63, 0.000000e+00
  %107 = mul nsw i32 %59, %59
  %108 = zext nneg i32 %107 to i64
  %109 = mul i64 %75, %72
  %110 = icmp sgt i32 %59, 0
  %111 = add nsw i32 %73, -1
  %112 = add nsw i32 %76, -1
  %113 = getelementptr inbounds i8, ptr %22, i64 4
  %114 = getelementptr inbounds i8, ptr %22, i64 8
  %115 = add nsw i32 %89, -1
  %116 = add nsw i32 %94, -1
  %117 = fcmp ogt float %65, 0.000000e+00
  %118 = fpext float %65 to double
  %119 = fpext float %63 to double
  %120 = zext i32 %59 to i64
  %wide.trip.count236 = and i64 %78, 2147483647
  %121 = insertelement <2 x float> poison, float %68, i64 0
  %122 = insertelement <2 x float> %121, float %69, i64 1
  br label %123

123:                                              ; preds = %.lr.ph226, %344
  %indvars.iv233 = phi i64 [ 0, %.lr.ph226 ], [ %indvars.iv.next234, %344 ]
  br i1 %106, label %124, label %132

124:                                              ; preds = %123
  %125 = getelementptr inbounds float, ptr %105, i64 %indvars.iv233
  %126 = load float, ptr %125, align 4, !tbaa !29
  %127 = fcmp olt float %126, %63
  br i1 %127, label %128, label %132

128:                                              ; preds = %124
  %129 = fpext float %126 to double
  %130 = trunc nuw nsw i64 %indvars.iv233 to i32
  %131 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.144, i32 noundef %130, double noundef %129, double noundef %119)
  br label %344

132:                                              ; preds = %124, %123
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %108, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %133 unwind label %206

133:                                              ; preds = %132
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  %134 = load ptr, ptr %44, align 8, !tbaa !9
  %135 = getelementptr inbounds i8, ptr %134, i64 248
  %136 = load ptr, ptr %135, align 8, !tbaa !25
  %137 = trunc nuw nsw i64 %indvars.iv233 to i32
  %138 = mul i64 %109, %indvars.iv233
  %sext = shl i64 %138, 32
  %139 = ashr exact i64 %sext, 30
  %140 = getelementptr inbounds i8, ptr %136, i64 %139
  br i1 %110, label %.preheader.us, label %._crit_edge210.split.us

.preheader.us:                                    ; preds = %133, %._crit_edge.us
  %indvars.iv228 = phi i64 [ %indvars.iv.next229, %._crit_edge.us ], [ 0, %133 ]
  %141 = trunc nuw nsw i64 %indvars.iv228 to i32
  %142 = uitofp nneg i32 %141 to float
  %143 = fadd float %142, 5.000000e-01
  %144 = call float @llvm.fmuladd.f32(float %98, float %143, float -5.000000e-01)
  %145 = mul nuw nsw i64 %indvars.iv228, %120
  br label %146

146:                                              ; preds = %.preheader.us, %146
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %146 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #7
  %147 = trunc nuw nsw i64 %indvars.iv to i32
  %148 = uitofp nneg i32 %147 to float
  %149 = fadd float %148, 5.000000e-01
  %150 = call float @llvm.fmuladd.f32(float %96, float %149, float -5.000000e-01)
  store float %150, ptr %10, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store float 0.000000e+00, ptr %11, align 4, !tbaa !29
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %152 = load float, ptr %151, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store float %144, ptr %12, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store float 0.000000e+00, ptr %13, align 4, !tbaa !29
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %154 = load float, ptr %153, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  %155 = fptosi float %152 to i32
  store i32 %155, ptr %15, align 4, !tbaa !5
  %156 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %157 = load i32, ptr %156, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #7
  %158 = fptosi float %154 to i32
  store i32 %158, ptr %17, align 4, !tbaa !5
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %160 = load i32, ptr %159, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #7
  %161 = add nsw i32 %157, 1
  store i32 %161, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  store i32 %111, ptr %19, align 4, !tbaa !5
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %163 = load i32, ptr %162, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #7
  %164 = add nsw i32 %160, 1
  store i32 %164, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %21) #7
  store i32 %112, ptr %21, align 4, !tbaa !5
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %166 = load i32, ptr %165, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #7
  %167 = sitofp i32 %157 to float
  %168 = fsub float %152, %167
  %169 = sitofp i32 %160 to float
  %170 = fsub float %154, %169
  %171 = mul nsw i32 %160, %73
  %172 = add nsw i32 %171, %157
  %173 = add nsw i32 %163, %171
  %174 = mul nsw i32 %166, %73
  %175 = add nsw i32 %174, %157
  %176 = add nsw i32 %174, %163
  %177 = sext i32 %172 to i64
  %178 = getelementptr inbounds float, ptr %140, i64 %177
  %179 = load float, ptr %178, align 4, !tbaa !29
  %180 = sext i32 %173 to i64
  %181 = getelementptr inbounds float, ptr %140, i64 %180
  %182 = load float, ptr %181, align 4, !tbaa !29
  %183 = sext i32 %175 to i64
  %184 = getelementptr inbounds float, ptr %140, i64 %183
  %185 = load float, ptr %184, align 4, !tbaa !29
  %186 = sext i32 %176 to i64
  %187 = getelementptr inbounds float, ptr %140, i64 %186
  %188 = load float, ptr %187, align 4, !tbaa !29
  %189 = fsub float 1.000000e+00, %168
  %190 = fmul float %168, %182
  %191 = call float @llvm.fmuladd.f32(float %189, float %179, float %190)
  %192 = fmul float %168, %188
  %193 = call float @llvm.fmuladd.f32(float %189, float %185, float %192)
  %194 = fsub float 1.000000e+00, %170
  %195 = fmul float %170, %193
  %196 = call float @llvm.fmuladd.f32(float %194, float %191, float %195)
  %197 = add nuw nsw i64 %indvars.iv, %145
  %198 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %197) #7
  store float %196, ptr %198, align 4, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %120
  br i1 %exitcond.not, label %._crit_edge.us, label %146, !llvm.loop !30

._crit_edge.us:                                   ; preds = %146
  %indvars.iv.next229 = add nuw nsw i64 %indvars.iv228, 1
  %exitcond232.not = icmp eq i64 %indvars.iv.next229, %120
  br i1 %exitcond232.not, label %._crit_edge210.split.us, label %.preheader.us, !llvm.loop !32

._crit_edge210.split.us:                          ; preds = %._crit_edge.us, %133
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #7
  call void @_ZN12sam_image_u8C2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  %199 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %199, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #7
  %200 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %200, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #7
  store i32 0, ptr %26, align 4, !tbaa !5
  %201 = call noundef ptr @_ZNSt6vectorIfSaIfEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %202 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %202, ptr %22, align 8, !tbaa !33
  %203 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %203, ptr %113, align 4, !tbaa !35
  %204 = mul nsw i32 %203, %202
  %205 = sext i32 %204 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %205)
          to label %208 unwind label %219

206:                                              ; preds = %132
  %207 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  br label %347

208:                                              ; preds = %._crit_edge210.split.us
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #7
  store i32 0, ptr %27, align 4, !tbaa !5
  %209 = load i32, ptr %7, align 4, !tbaa !5
  %210 = icmp sgt i32 %209, 0
  %211 = load i32, ptr %6, align 4
  %212 = icmp sgt i32 %211, 0
  %or.cond241 = select i1 %210, i1 %212, i1 false
  br i1 %or.cond241, label %.lr.ph218.split, label %._crit_edge219

._crit_edge219:                                   ; preds = %._crit_edge, %208
  %213 = phi <2 x i32> [ zeroinitializer, %208 ], [ %229, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #7
  %214 = sitofp <2 x i32> %213 to <2 x float>
  %215 = extractelement <2 x float> %214, i64 0
  %216 = extractelement <2 x float> %214, i64 1
  %217 = fdiv float %215, %216
  %218 = fcmp olt float %217, %65
  %or.cond = select i1 %117, i1 %218, i1 false
  br i1 %or.cond, label %.thread, label %315

219:                                              ; preds = %._crit_edge210.split.us
  %220 = landingpad { ptr, i32 }
          cleanup
  br label %346

.lr.ph218.split:                                  ; preds = %208, %._crit_edge
  %221 = phi i32 [ %226, %._crit_edge ], [ %209, %208 ]
  %222 = phi i32 [ %230, %._crit_edge ], [ 0, %208 ]
  %223 = phi i32 [ %228, %._crit_edge ], [ %211, %208 ]
  %224 = phi <2 x i32> [ %229, %._crit_edge ], [ zeroinitializer, %208 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %28) #7
  store i32 0, ptr %28, align 4, !tbaa !5
  %225 = icmp sgt i32 %223, 0
  br i1 %225, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %308
  %.pre = load i32, ptr %27, align 4, !tbaa !5
  %.pre238 = load i32, ptr %7, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.lr.ph218.split
  %226 = phi i32 [ %221, %.lr.ph218.split ], [ %.pre238, %._crit_edge.loopexit ]
  %227 = phi i32 [ %222, %.lr.ph218.split ], [ %.pre, %._crit_edge.loopexit ]
  %228 = phi i32 [ %223, %.lr.ph218.split ], [ %311, %._crit_edge.loopexit ]
  %229 = phi <2 x i32> [ %224, %.lr.ph218.split ], [ %290, %._crit_edge.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %28) #7
  %230 = add nsw i32 %227, 1
  store i32 %230, ptr %27, align 4, !tbaa !5
  %231 = icmp slt i32 %230, %226
  br i1 %231, label %.lr.ph218.split, label %._crit_edge219, !llvm.loop !36

.lr.ph:                                           ; preds = %.lr.ph218.split, %308
  %storemerge204211 = phi i32 [ %310, %308 ], [ 0, %.lr.ph218.split ]
  %232 = phi <2 x i32> [ %290, %308 ], [ %224, %.lr.ph218.split ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #7
  %233 = sitofp i32 %storemerge204211 to float
  %234 = fadd float %233, 5.000000e-01
  %235 = call float @llvm.fmuladd.f32(float %100, float %234, float -5.000000e-01)
  store float %235, ptr %29, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #7
  store float 0.000000e+00, ptr %30, align 4, !tbaa !29
  %236 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %237 = load float, ptr %236, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #7
  %238 = load i32, ptr %27, align 4, !tbaa !5
  %239 = sitofp i32 %238 to float
  %240 = fadd float %239, 5.000000e-01
  %241 = call float @llvm.fmuladd.f32(float %102, float %240, float -5.000000e-01)
  store float %241, ptr %31, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #7
  store float 0.000000e+00, ptr %32, align 4, !tbaa !29
  %242 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %243 = load float, ptr %242, align 4, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %33) #7
  store i32 0, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #7
  %244 = fptosi float %237 to i32
  store i32 %244, ptr %34, align 4, !tbaa !5
  %245 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %33, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %246 = load i32, ptr %245, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #7
  store i32 0, ptr %35, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %36) #7
  %247 = fptosi float %243 to i32
  store i32 %247, ptr %36, align 4, !tbaa !5
  %248 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %36)
  %249 = load i32, ptr %248, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %37) #7
  %250 = add nsw i32 %246, 1
  store i32 %250, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %38) #7
  store i32 %115, ptr %38, align 4, !tbaa !5
  %251 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %37, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %252 = load i32, ptr %251, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %38) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %37) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %39) #7
  %253 = add nsw i32 %249, 1
  store i32 %253, ptr %39, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %40) #7
  store i32 %116, ptr %40, align 4, !tbaa !5
  %254 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %40)
  %255 = load i32, ptr %254, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %40) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %39) #7
  %256 = sitofp i32 %246 to float
  %257 = fsub float %237, %256
  %258 = sitofp i32 %249 to float
  %259 = fsub float %243, %258
  %260 = mul nsw i32 %249, %59
  %261 = add nsw i32 %260, %246
  %262 = add nsw i32 %252, %260
  %263 = mul nsw i32 %255, %59
  %264 = add nsw i32 %263, %246
  %265 = add nsw i32 %263, %252
  %266 = sext i32 %261 to i64
  %267 = getelementptr inbounds float, ptr %201, i64 %266
  %268 = load float, ptr %267, align 4, !tbaa !29
  %269 = sext i32 %262 to i64
  %270 = getelementptr inbounds float, ptr %201, i64 %269
  %271 = load float, ptr %270, align 4, !tbaa !29
  %272 = sext i32 %264 to i64
  %273 = getelementptr inbounds float, ptr %201, i64 %272
  %274 = load float, ptr %273, align 4, !tbaa !29
  %275 = sext i32 %265 to i64
  %276 = getelementptr inbounds float, ptr %201, i64 %275
  %277 = load float, ptr %276, align 4, !tbaa !29
  %278 = fsub float 1.000000e+00, %257
  %279 = fmul float %257, %271
  %280 = call float @llvm.fmuladd.f32(float %278, float %268, float %279)
  %281 = fmul float %257, %277
  %282 = call float @llvm.fmuladd.f32(float %278, float %274, float %281)
  %283 = fsub float 1.000000e+00, %259
  %284 = fmul float %259, %282
  %285 = call float @llvm.fmuladd.f32(float %283, float %280, float %284)
  %286 = insertelement <2 x float> poison, float %285, i64 0
  %287 = shufflevector <2 x float> %286, <2 x float> poison, <2 x i32> zeroinitializer
  %288 = fcmp ogt <2 x float> %287, %122
  %289 = zext <2 x i1> %288 to <2 x i32>
  %290 = add nsw <2 x i32> %232, %289
  %291 = fcmp ogt float %285, %61
  br i1 %291, label %292, label %308

292:                                              ; preds = %.lr.ph
  %293 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %294 = load i32, ptr %293, align 4, !tbaa !5
  store i32 %294, ptr %23, align 4, !tbaa !5
  %295 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %296 = load i32, ptr %295, align 4, !tbaa !5
  store i32 %296, ptr %24, align 4, !tbaa !5
  %297 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %25, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %298 = load i32, ptr %297, align 4, !tbaa !5
  store i32 %298, ptr %25, align 4, !tbaa !5
  %299 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %300 = load i32, ptr %299, align 4, !tbaa !5
  store i32 %300, ptr %26, align 4, !tbaa !5
  %301 = load i32, ptr %27, align 4, !tbaa !5
  %302 = load i32, ptr %6, align 4, !tbaa !5
  %303 = mul nsw i32 %302, %301
  %304 = load i32, ptr %28, align 4, !tbaa !5
  %305 = add nsw i32 %303, %304
  %306 = sext i32 %305 to i64
  %307 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %306) #7
  store i8 -1, ptr %307, align 1, !tbaa !38
  br label %308

308:                                              ; preds = %292, %.lr.ph
  %309 = load i32, ptr %28, align 4, !tbaa !5
  %310 = add nsw i32 %309, 1
  store i32 %310, ptr %28, align 4, !tbaa !5
  %311 = load i32, ptr %6, align 4, !tbaa !5
  %312 = icmp slt i32 %310, %311
  br i1 %312, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !39

.thread:                                          ; preds = %._crit_edge219
  %313 = fpext float %217 to double
  %314 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.145, i32 noundef %137, double noundef %313, double noundef %118)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #7
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %344

315:                                              ; preds = %._crit_edge219
  %316 = getelementptr inbounds float, ptr %105, i64 %indvars.iv233
  %317 = load float, ptr %316, align 4, !tbaa !29
  %318 = fpext float %317 to double
  %319 = fpext float %217 to double
  %320 = load i32, ptr %25, align 4, !tbaa !5
  %321 = load i32, ptr %26, align 4, !tbaa !5
  %322 = load i32, ptr %23, align 4, !tbaa !5
  %323 = load i32, ptr %24, align 4, !tbaa !5
  %324 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.146, i32 noundef %137, double noundef %318, double noundef %319, i32 noundef %320, i32 noundef %321, i32 noundef %322, i32 noundef %323)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %41) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %42) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %43) #7
  call void @_ZNSt7__cxx119to_stringEi(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %43, i32 noundef %137) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %42, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %43)
          to label %325 unwind label %336

325:                                              ; preds = %315
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %41, ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull @.str.147)
          to label %326 unwind label %338

326:                                              ; preds = %325
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %43) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %42) #7
  %327 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %41) #7
  %328 = load i32, ptr %22, align 8, !tbaa !33
  %329 = load i32, ptr %113, align 4, !tbaa !35
  %330 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %114) #7
  %331 = load i32, ptr %22, align 8, !tbaa !33
  %332 = invoke i32 @stbi_write_png(ptr noundef %327, i32 noundef %328, i32 noundef %329, i32 noundef 1, ptr noundef %330, i32 noundef %331)
          to label %333 unwind label %341

333:                                              ; preds = %326
  %.not202 = icmp eq i32 %332, 0
  br i1 %.not202, label %.thread206, label %343

.thread206:                                       ; preds = %333
  %334 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %41) #7
  %335 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.148, ptr noundef nonnull @__func__._Z15sam_write_masksRK11sam_hparamsiiRK9sam_stateRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE, ptr noundef %334)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %41) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #7
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %.critedge

336:                                              ; preds = %315
  %337 = landingpad { ptr, i32 }
          cleanup
  br label %340

338:                                              ; preds = %325
  %339 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #7
  br label %340

340:                                              ; preds = %338, %336
  %.pn = phi { ptr, i32 } [ %339, %338 ], [ %337, %336 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %43) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %42) #7
  br label %345

341:                                              ; preds = %326
  %342 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #7
  br label %345

343:                                              ; preds = %333
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %41) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #7
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %344

344:                                              ; preds = %343, %.thread, %128
  %indvars.iv.next234 = add nuw nsw i64 %indvars.iv233, 1
  %exitcond237.not = icmp eq i64 %indvars.iv.next234, %wide.trip.count236
  br i1 %exitcond237.not, label %.critedge, label %123, !llvm.loop !40

345:                                              ; preds = %341, %340
  %.pn198 = phi { ptr, i32 } [ %342, %341 ], [ %.pn, %340 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %41) #7
  br label %346

346:                                              ; preds = %345, %219
  %.pn198.pn = phi { ptr, i32 } [ %.pn198, %345 ], [ %220, %219 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  call void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #7
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %347

347:                                              ; preds = %346, %206
  %.pn198.pn.pn = phi { ptr, i32 } [ %.pn198.pn, %346 ], [ %207, %206 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  resume { ptr, i32 } %.pn198.pn.pn

.critedge:                                        ; preds = %344, %58, %.thread206, %5, %54
  %.6 = phi i1 [ false, %54 ], [ true, %5 ], [ false, %.thread206 ], [ true, %58 ], [ true, %344 ]
  ret i1 %.6
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12sam_image_u8C2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN12sam_image_u8D2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTS9sam_state", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !12, i64 56, !12, i64 80, !11, i64 104}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIhSaIhEE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!10, !11, i64 16}
!19 = !{!20, !21, i64 28}
!20 = !{!"_ZTS11sam_hparams", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !21, i64 28, !21, i64 32, !21, i64 36, !21, i64 40, !21, i64 44, !21, i64 48}
!21 = !{!"float", !7, i64 0}
!22 = !{!20, !21, i64 32}
!23 = !{!20, !21, i64 36}
!24 = !{!20, !21, i64 40}
!25 = !{!26, !11, i64 248}
!26 = !{!"_ZTS11ggml_tensor", !27, i64 0, !11, i64 8, !7, i64 16, !7, i64 48, !28, i64 80, !7, i64 84, !6, i64 148, !7, i64 152, !11, i64 232, !17, i64 240, !11, i64 248, !7, i64 256, !11, i64 320, !7, i64 328}
!27 = !{!"_ZTS9ggml_type", !7, i64 0}
!28 = !{!"_ZTS7ggml_op", !7, i64 0}
!29 = !{!21, !21, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = !{!34, !6, i64 0}
!34 = !{!"_ZTS12sam_image_u8", !6, i64 0, !6, i64 4, !12, i64 8}
!35 = !{!34, !6, i64 4}
!36 = distinct !{!36, !31, !37}
!37 = !{!"llvm.loop.unswitch.partial.disable"}
!38 = !{!7, !7, i64 0}
!39 = distinct !{!39, !31}
!40 = distinct !{!40, !31}


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