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

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

%struct.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_image_f32 = type { i32, i32, %"class.std::vector.3" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@stderr = external global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32 = external hidden unnamed_addr constant [21 x i8], align 1
@__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.m3 = external hidden unnamed_addr constant [3 x float], align 4
@__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.s3 = external hidden unnamed_addr constant [3 x float], align 4

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [3 x float], align 4
  %13 = alloca [3 x 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 float, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %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 i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %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 float, align 4
  %45 = alloca i8, align 1
  %46 = alloca float, align 4
  %47 = alloca float, align 4
  %48 = alloca float, align 4
  %49 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.sam_image_u8, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !9
  store i32 %52, ptr %5, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.sam_image_u8, ptr %53, i32 0, i32 1
  %55 = load i32, ptr %54, align 4, !tbaa !17
  store i32 %55, ptr %6, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 1024, ptr %7, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1024, ptr %8, align 4, !tbaa !16
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.sam_image_f32, ptr %56, i32 0, i32 0
  store i32 1024, ptr %57, align 8, !tbaa !18
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.sam_image_f32, ptr %58, i32 0, i32 1
  store i32 1024, ptr %59, align 4, !tbaa !24
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.sam_image_f32, ptr %60, i32 0, i32 2
  call void @_ZNSt6vectorIfSaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef 3145728)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %63 = load i32, ptr %62, align 4, !tbaa !16
  %64 = sitofp i32 %63 to float
  %65 = fdiv float %64, 1.024000e+03
  store float %65, ptr %9, align 4, !tbaa !25
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = load float, ptr %9, align 4, !tbaa !25
  %68 = fpext float %67 to double
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.16, ptr noundef @__func__._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32, double noundef %68) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %70 = load i32, ptr %5, align 4, !tbaa !16
  %71 = sitofp i32 %70 to float
  %72 = load float, ptr %9, align 4, !tbaa !25
  %73 = fdiv float %71, %72
  %74 = fadd float %73, 5.000000e-01
  %75 = fptosi float %74 to i32
  store i32 %75, ptr %10, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %76 = load i32, ptr %6, align 4, !tbaa !16
  %77 = sitofp i32 %76 to float
  %78 = load float, ptr %9, align 4, !tbaa !25
  %79 = fdiv float %77, %78
  %80 = fadd float %79, 5.000000e-01
  %81 = fptosi float %80 to i32
  store i32 %81, ptr %11, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 @__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.m3, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 @__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.s3, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !16
  br label %82

82:                                               ; preds = %259, %2
  %83 = load i32, ptr %14, align 4, !tbaa !16
  %84 = load i32, ptr %11, align 4, !tbaa !16
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %262

87:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !16
  br label %88

88:                                               ; preds = %255, %87
  %89 = load i32, ptr %16, align 4, !tbaa !16
  %90 = load i32, ptr %10, align 4, !tbaa !16
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %258

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !16
  br label %94

94:                                               ; preds = %251, %93
  %95 = load i32, ptr %17, align 4, !tbaa !16
  %96 = icmp slt i32 %95, 3
  br i1 %96, label %98, label %97

97:                                               ; preds = %94
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %254

98:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %99 = load i32, ptr %16, align 4, !tbaa !16
  %100 = sitofp i32 %99 to float
  %101 = fadd float %100, 5.000000e-01
  %102 = load float, ptr %9, align 4, !tbaa !25
  %103 = call float @llvm.fmuladd.f32(float %101, float %102, float -5.000000e-01)
  store float %103, ptr %18, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %104 = load i32, ptr %14, align 4, !tbaa !16
  %105 = sitofp i32 %104 to float
  %106 = fadd float %105, 5.000000e-01
  %107 = load float, ptr %9, align 4, !tbaa !25
  %108 = call float @llvm.fmuladd.f32(float %106, float %107, float -5.000000e-01)
  store float %108, ptr %19, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %109 = load float, ptr %18, align 4, !tbaa !25
  %110 = call noundef float @_ZSt5floorf(float noundef %109)
  %111 = fptosi float %110 to i32
  store i32 %111, ptr %22, align 4, !tbaa !16
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %113 = load i32, ptr %112, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  store i32 %113, ptr %20, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %114 = load float, ptr %19, align 4, !tbaa !25
  %115 = call noundef float @_ZSt5floorf(float noundef %114)
  %116 = fptosi float %115 to i32
  store i32 %116, ptr %25, align 4, !tbaa !16
  %117 = 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) %25)
  %118 = load i32, ptr %117, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  store i32 %118, ptr %23, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %119 = load i32, ptr %20, align 4, !tbaa !16
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %27, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %121 = load i32, ptr %5, align 4, !tbaa !16
  %122 = sub nsw i32 %121, 1
  store i32 %122, ptr %28, align 4, !tbaa !16
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %28)
  %124 = load i32, ptr %123, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  store i32 %124, ptr %26, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  %125 = load i32, ptr %23, align 4, !tbaa !16
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %30, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  %127 = load i32, ptr %6, align 4, !tbaa !16
  %128 = sub nsw i32 %127, 1
  store i32 %128, ptr %31, align 4, !tbaa !16
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %130 = load i32, ptr %129, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  store i32 %130, ptr %29, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %131 = load float, ptr %18, align 4, !tbaa !25
  %132 = load i32, ptr %20, align 4, !tbaa !16
  %133 = sitofp i32 %132 to float
  %134 = fsub float %131, %133
  store float %134, ptr %32, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %135 = load float, ptr %19, align 4, !tbaa !25
  %136 = load i32, ptr %23, align 4, !tbaa !16
  %137 = sitofp i32 %136 to float
  %138 = fsub float %135, %137
  store float %138, ptr %33, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  %139 = load i32, ptr %23, align 4, !tbaa !16
  %140 = load i32, ptr %5, align 4, !tbaa !16
  %141 = mul nsw i32 %139, %140
  %142 = load i32, ptr %20, align 4, !tbaa !16
  %143 = add nsw i32 %141, %142
  %144 = mul nsw i32 3, %143
  %145 = load i32, ptr %17, align 4, !tbaa !16
  %146 = add nsw i32 %144, %145
  store i32 %146, ptr %34, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  %147 = load i32, ptr %23, align 4, !tbaa !16
  %148 = load i32, ptr %5, align 4, !tbaa !16
  %149 = mul nsw i32 %147, %148
  %150 = load i32, ptr %26, align 4, !tbaa !16
  %151 = add nsw i32 %149, %150
  %152 = mul nsw i32 3, %151
  %153 = load i32, ptr %17, align 4, !tbaa !16
  %154 = add nsw i32 %152, %153
  store i32 %154, ptr %35, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #7
  %155 = load i32, ptr %29, align 4, !tbaa !16
  %156 = load i32, ptr %5, align 4, !tbaa !16
  %157 = mul nsw i32 %155, %156
  %158 = load i32, ptr %20, align 4, !tbaa !16
  %159 = add nsw i32 %157, %158
  %160 = mul nsw i32 3, %159
  %161 = load i32, ptr %17, align 4, !tbaa !16
  %162 = add nsw i32 %160, %161
  store i32 %162, ptr %36, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #7
  %163 = load i32, ptr %29, align 4, !tbaa !16
  %164 = load i32, ptr %5, align 4, !tbaa !16
  %165 = mul nsw i32 %163, %164
  %166 = load i32, ptr %26, align 4, !tbaa !16
  %167 = add nsw i32 %165, %166
  %168 = mul nsw i32 3, %167
  %169 = load i32, ptr %17, align 4, !tbaa !16
  %170 = add nsw i32 %168, %169
  store i32 %170, ptr %37, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #7
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.sam_image_u8, ptr %171, i32 0, i32 2
  %173 = load i32, ptr %34, align 4, !tbaa !16
  %174 = sext i32 %173 to i64
  %175 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %172, i64 noundef %174) #7
  %176 = load i8, ptr %175, align 1, !tbaa !27
  %177 = uitofp i8 %176 to float
  store float %177, ptr %38, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #7
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.sam_image_u8, ptr %178, i32 0, i32 2
  %180 = load i32, ptr %35, align 4, !tbaa !16
  %181 = sext i32 %180 to i64
  %182 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %179, i64 noundef %181) #7
  %183 = load i8, ptr %182, align 1, !tbaa !27
  %184 = uitofp i8 %183 to float
  store float %184, ptr %39, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.sam_image_u8, ptr %185, i32 0, i32 2
  %187 = load i32, ptr %36, align 4, !tbaa !16
  %188 = sext i32 %187 to i64
  %189 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %186, i64 noundef %188) #7
  %190 = load i8, ptr %189, align 1, !tbaa !27
  %191 = uitofp i8 %190 to float
  store float %191, ptr %40, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.sam_image_u8, ptr %192, i32 0, i32 2
  %194 = load i32, ptr %37, align 4, !tbaa !16
  %195 = sext i32 %194 to i64
  %196 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %193, i64 noundef %195) #7
  %197 = load i8, ptr %196, align 1, !tbaa !27
  %198 = uitofp i8 %197 to float
  store float %198, ptr %41, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #7
  %199 = load float, ptr %38, align 4, !tbaa !25
  %200 = load float, ptr %32, align 4, !tbaa !25
  %201 = fsub float 1.000000e+00, %200
  %202 = load float, ptr %39, align 4, !tbaa !25
  %203 = load float, ptr %32, align 4, !tbaa !25
  %204 = fmul float %202, %203
  %205 = call float @llvm.fmuladd.f32(float %199, float %201, float %204)
  store float %205, ptr %42, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  %206 = load float, ptr %40, align 4, !tbaa !25
  %207 = load float, ptr %32, align 4, !tbaa !25
  %208 = fsub float 1.000000e+00, %207
  %209 = load float, ptr %41, align 4, !tbaa !25
  %210 = load float, ptr %32, align 4, !tbaa !25
  %211 = fmul float %209, %210
  %212 = call float @llvm.fmuladd.f32(float %206, float %208, float %211)
  store float %212, ptr %43, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  %213 = load float, ptr %42, align 4, !tbaa !25
  %214 = load float, ptr %33, align 4, !tbaa !25
  %215 = fsub float 1.000000e+00, %214
  %216 = load float, ptr %43, align 4, !tbaa !25
  %217 = load float, ptr %33, align 4, !tbaa !25
  %218 = fmul float %216, %217
  %219 = call float @llvm.fmuladd.f32(float %213, float %215, float %218)
  store float %219, ptr %44, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #7
  %220 = load float, ptr %44, align 4, !tbaa !25
  %221 = call noundef float @_ZSt5roundf(float noundef %220)
  store float %221, ptr %46, align 4, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #7
  store float 0.000000e+00, ptr %47, align 4, !tbaa !25
  %222 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #7
  store float 2.550000e+02, ptr %48, align 4, !tbaa !25
  %223 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %222, ptr noundef nonnull align 4 dereferenceable(4) %48)
  %224 = load float, ptr %223, align 4, !tbaa !25
  %225 = fptoui float %224 to i8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #7
  store i8 %225, ptr %45, align 1, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #7
  %226 = load i32, ptr %14, align 4, !tbaa !16
  %227 = load i32, ptr %10, align 4, !tbaa !16
  %228 = mul nsw i32 %226, %227
  %229 = load i32, ptr %16, align 4, !tbaa !16
  %230 = add nsw i32 %228, %229
  %231 = mul nsw i32 3, %230
  %232 = load i32, ptr %17, align 4, !tbaa !16
  %233 = add nsw i32 %231, %232
  store i32 %233, ptr %49, align 4, !tbaa !16
  %234 = load i8, ptr %45, align 1, !tbaa !27
  %235 = uitofp i8 %234 to float
  %236 = load i32, ptr %17, align 4, !tbaa !16
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [3 x float], ptr %12, i64 0, i64 %237
  %239 = load float, ptr %238, align 4, !tbaa !25
  %240 = fsub float %235, %239
  %241 = load i32, ptr %17, align 4, !tbaa !16
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [3 x float], ptr %13, i64 0, i64 %242
  %244 = load float, ptr %243, align 4, !tbaa !25
  %245 = fdiv float %240, %244
  %246 = load ptr, ptr %4, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.sam_image_f32, ptr %246, i32 0, i32 2
  %248 = load i32, ptr %49, align 4, !tbaa !16
  %249 = sext i32 %248 to i64
  %250 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %247, i64 noundef %249) #7
  store float %245, ptr %250, align 4, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %45) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #7
  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 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #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
  br label %251

251:                                              ; preds = %98
  %252 = load i32, ptr %17, align 4, !tbaa !16
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %17, align 4, !tbaa !16
  br label %94, !llvm.loop !28

254:                                              ; preds = %97
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %16, align 4, !tbaa !16
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %16, align 4, !tbaa !16
  br label %88, !llvm.loop !30

258:                                              ; preds = %92
  br label %259

259:                                              ; preds = %258
  %260 = load i32, ptr %14, align 4, !tbaa !16
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %14, align 4, !tbaa !16
  br label %82, !llvm.loop !31

262:                                              ; preds = %86
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  ret i1 true
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #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)) #2

; 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 float @_ZSt5floorf(float noundef) #2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) #6

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #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, !11, i64 0}
!10 = !{!"_ZTS12sam_image_u8", !11, i64 0, !11, i64 4, !12, i64 8}
!11 = !{!"int", !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", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!11, !11, i64 0}
!17 = !{!10, !11, i64 4}
!18 = !{!19, !11, i64 0}
!19 = !{!"_ZTS13sam_image_f32", !11, i64 0, !11, i64 4, !20, i64 8}
!20 = !{!"_ZTSSt6vectorIfSaIfEE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!19, !11, i64 4}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = distinct !{!31, !29}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [16 x i8], align 1
@__func__._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32 = external hidden unnamed_addr constant [21 x i8], align 1
@__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.m3 = external hidden unnamed_addr constant [3 x float], align 4
@__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.s3 = external hidden unnamed_addr constant [3 x float], align 4

; 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: 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 #1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #3 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %16 = load i32, ptr %0, align 8, !tbaa !5
  store i32 %16, ptr %3, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %17 = getelementptr inbounds i8, ptr %0, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !16
  store i32 %18, ptr %4, align 4, !tbaa !15
  store i32 1024, ptr %1, align 8, !tbaa !17
  %19 = getelementptr inbounds i8, ptr %1, i64 4
  store i32 1024, ptr %19, align 4, !tbaa !23
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  tail call void @_ZNSt6vectorIfSaIfEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 3145728)
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %22 = load i32, ptr %21, align 4, !tbaa !15
  %23 = sitofp i32 %22 to float
  %24 = fmul float %23, 0x3F50000000000000
  %25 = load ptr, ptr @stderr, align 8, !tbaa !24
  %26 = fpext float %24 to double
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.16, ptr noundef nonnull @__func__._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32, double noundef %26) #7
  %28 = load i32, ptr %3, align 4, !tbaa !15
  %29 = sitofp i32 %28 to float
  %30 = fdiv float %29, %24
  %31 = fadd float %30, 5.000000e-01
  %32 = fptosi float %31 to i32
  %33 = load i32, ptr %4, align 4, !tbaa !15
  %34 = sitofp i32 %33 to float
  %35 = fdiv float %34, %24
  %36 = fadd float %35, 5.000000e-01
  %37 = fptosi float %36 to i32
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.preheader72.lr.ph, label %._crit_edge76

.preheader72.lr.ph:                               ; preds = %2
  %39 = icmp sgt i32 %32, 0
  %40 = getelementptr inbounds i8, ptr %0, i64 8
  br i1 %39, label %.preheader72.us.preheader, label %._crit_edge76

.preheader72.us.preheader:                        ; preds = %.preheader72.lr.ph
  %41 = zext nneg i32 %32 to i64
  %wide.trip.count86 = zext nneg i32 %37 to i64
  br label %.preheader72.us

.preheader72.us:                                  ; preds = %.preheader72.us.preheader, %._crit_edge.us
  %indvars.iv83 = phi i64 [ 0, %.preheader72.us.preheader ], [ %indvars.iv.next84, %._crit_edge.us ]
  %42 = trunc nuw nsw i64 %indvars.iv83 to i32
  %43 = uitofp nneg i32 %42 to float
  %44 = fadd float %43, 5.000000e-01
  %45 = call float @llvm.fmuladd.f32(float %44, float %24, float -5.000000e-01)
  %46 = mul nuw nsw i64 %indvars.iv83, %41
  br label %.preheader.us

47:                                               ; preds = %48
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next80, %41
  br i1 %exitcond82.not, label %._crit_edge.us, label %.preheader.us, !llvm.loop !25

48:                                               ; preds = %.preheader.us, %48
  %indvars.iv = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next, %48 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %49 = call noundef float @_ZSt5floorf(float noundef %128)
  %50 = fptosi float %49 to i32
  store i32 %50, ptr %6, align 4, !tbaa !15
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %52 = load i32, ptr %51, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %53 = call noundef float @_ZSt5floorf(float noundef %45)
  %54 = fptosi float %53 to i32
  store i32 %54, ptr %8, align 4, !tbaa !15
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %56 = load i32, ptr %55, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %57 = add nsw i32 %52, 1
  store i32 %57, ptr %9, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %58 = load i32, ptr %3, align 4, !tbaa !15
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %10, align 4, !tbaa !15
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %61 = load i32, ptr %60, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  %62 = add nsw i32 %56, 1
  store i32 %62, ptr %11, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %63 = load i32, ptr %4, align 4, !tbaa !15
  %64 = add nsw i32 %63, -1
  store i32 %64, ptr %12, align 4, !tbaa !15
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %66 = load i32, ptr %65, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %67 = sitofp i32 %52 to float
  %68 = fsub float %128, %67
  %69 = sitofp i32 %56 to float
  %70 = fsub float %45, %69
  %71 = load i32, ptr %3, align 4, !tbaa !15
  %72 = mul nsw i32 %71, %56
  %73 = add nsw i32 %72, %52
  %74 = mul nsw i32 %73, 3
  %75 = trunc nuw nsw i64 %indvars.iv to i32
  %76 = add nsw i32 %74, %75
  %77 = add nsw i32 %72, %61
  %78 = mul nsw i32 %77, 3
  %79 = add nsw i32 %78, %75
  %80 = mul nsw i32 %71, %66
  %81 = add nsw i32 %80, %52
  %82 = mul nsw i32 %81, 3
  %83 = add nsw i32 %82, %75
  %84 = add nsw i32 %80, %61
  %85 = mul nsw i32 %84, 3
  %86 = add nsw i32 %85, %75
  %87 = sext i32 %76 to i64
  %88 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %87) #6
  %89 = load i8, ptr %88, align 1, !tbaa !27
  %90 = uitofp i8 %89 to float
  %91 = sext i32 %79 to i64
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %91) #6
  %93 = load i8, ptr %92, align 1, !tbaa !27
  %94 = uitofp i8 %93 to float
  %95 = sext i32 %83 to i64
  %96 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %95) #6
  %97 = load i8, ptr %96, align 1, !tbaa !27
  %98 = uitofp i8 %97 to float
  %99 = sext i32 %86 to i64
  %100 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %99) #6
  %101 = load i8, ptr %100, align 1, !tbaa !27
  %102 = uitofp i8 %101 to float
  %103 = fsub float 1.000000e+00, %68
  %104 = fmul float %68, %94
  %105 = call float @llvm.fmuladd.f32(float %90, float %103, float %104)
  %106 = fmul float %68, %102
  %107 = call float @llvm.fmuladd.f32(float %98, float %103, float %106)
  %108 = fsub float 1.000000e+00, %70
  %109 = fmul float %70, %107
  %110 = call float @llvm.fmuladd.f32(float %105, float %108, float %109)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  %111 = call noundef float @_ZSt5roundf(float noundef %110)
  store float %111, ptr %13, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  store float 0.000000e+00, ptr %14, align 4, !tbaa !28
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  store float 2.550000e+02, ptr %15, align 4, !tbaa !28
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %112, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %114 = load float, ptr %113, align 4, !tbaa !28
  %115 = fptoui float %114 to i8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  %116 = add nuw nsw i64 %indvars.iv, %130
  %117 = uitofp i8 %115 to float
  %118 = getelementptr inbounds [3 x float], ptr @__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.m3, i64 0, i64 %indvars.iv
  %119 = load float, ptr %118, align 4, !tbaa !28
  %120 = fsub float %117, %119
  %121 = getelementptr inbounds [3 x float], ptr @__const._Z20sam_image_preprocessRK12sam_image_u8R13sam_image_f32.s3, i64 0, i64 %indvars.iv
  %122 = load float, ptr %121, align 4, !tbaa !28
  %123 = fdiv float %120, %122
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %116) #6
  store float %123, ptr %124, align 4, !tbaa !28
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 3
  br i1 %exitcond.not, label %47, label %48, !llvm.loop !30

.preheader.us:                                    ; preds = %.preheader72.us, %47
  %indvars.iv79 = phi i64 [ 0, %.preheader72.us ], [ %indvars.iv.next80, %47 ]
  %125 = trunc nuw nsw i64 %indvars.iv79 to i32
  %126 = uitofp nneg i32 %125 to float
  %127 = fadd float %126, 5.000000e-01
  %128 = call float @llvm.fmuladd.f32(float %127, float %24, float -5.000000e-01)
  %129 = add nuw nsw i64 %indvars.iv79, %46
  %130 = mul nuw nsw i64 %129, 3
  br label %48

._crit_edge.us:                                   ; preds = %47
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %._crit_edge76, label %.preheader72.us, !llvm.loop !31

._crit_edge76:                                    ; preds = %._crit_edge.us, %.preheader72.lr.ph, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i1 true
}

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

; Function Attrs: 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 #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5floorf(float noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) local_unnamed_addr #5

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS12sam_image_u8", !7, i64 0, !7, i64 4, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIhSaIhEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!6, !7, i64 4}
!17 = !{!18, !7, i64 0}
!18 = !{!"_ZTS13sam_image_f32", !7, i64 0, !7, i64 4, !19, i64 8}
!19 = !{!"_ZTSSt6vectorIfSaIfEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!23 = !{!18, !7, i64 4}
!24 = !{!14, !14, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!8, !8, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !8, i64 0}
!30 = distinct !{!30, !26}
!31 = distinct !{!31, !26}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass