; LLVM IR from zchrissirhcz/pixel :: legacy (rgb2gray)

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

; Function Attrs: nounwind uwtable
define dso_local void @pixel_rgb2gray_naive(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %17 = load i64, ptr %6, align 8, !tbaa !9
  %18 = load i64, ptr %7, align 8, !tbaa !9
  %19 = mul i64 %17, %18
  store i64 %19, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %20 = load i64, ptr %9, align 8, !tbaa !9
  %21 = mul i64 %20, 3
  store i64 %21, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %22

22:                                               ; preds = %59, %4
  %23 = load i64, ptr %12, align 8, !tbaa !9
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %26, label %64

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = load i64, ptr %11, align 8, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %27, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !11
  %31 = uitofp i8 %30 to float
  store float %31, ptr %13, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load i64, ptr %11, align 8, !tbaa !9
  %34 = add i64 %33, 1
  %35 = getelementptr inbounds i8, ptr %32, i64 %34
  %36 = load i8, ptr %35, align 1, !tbaa !11
  %37 = uitofp i8 %36 to float
  store float %37, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i64, ptr %11, align 8, !tbaa !9
  %40 = add i64 %39, 2
  %41 = getelementptr inbounds i8, ptr %38, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !11
  %43 = uitofp i8 %42 to float
  store float %43, ptr %15, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #3
  %44 = load float, ptr %13, align 4, !tbaa !12
  %45 = fpext float %44 to double
  %46 = load float, ptr %14, align 4, !tbaa !12
  %47 = fpext float %46 to double
  %48 = fmul double 5.870000e-01, %47
  %49 = call double @llvm.fmuladd.f64(double 2.990000e-01, double %45, double %48)
  %50 = load float, ptr %15, align 4, !tbaa !12
  %51 = fpext float %50 to double
  %52 = call double @llvm.fmuladd.f64(double 1.140000e-01, double %51, double %49)
  %53 = fptrunc double %52 to float
  store float %53, ptr %16, align 4, !tbaa !12
  %54 = load float, ptr %16, align 4, !tbaa !12
  %55 = fptoui float %54 to i8
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load i64, ptr %12, align 8, !tbaa !9
  %58 = getelementptr inbounds i8, ptr %56, i64 %57
  store i8 %55, ptr %58, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %59

59:                                               ; preds = %26
  %60 = load i64, ptr %12, align 8, !tbaa !9
  %61 = add i64 %60, 1
  store i64 %61, ptr %12, align 8, !tbaa !9
  %62 = load i64, ptr %11, align 8, !tbaa !9
  %63 = add i64 %62, 3
  store i64 %63, ptr %11, align 8, !tbaa !9
  br label %22, !llvm.loop !14

64:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local void @pixel_rgb2gray_naive(ptr nocapture noundef readonly %0, i64 noundef %1, i64 noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = mul i64 %2, %1
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %._crit_edge, label %iter.check

iter.check:                                       ; preds = %4
  %min.iters.check = icmp ult i64 %5, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %scevgep = getelementptr i8, ptr %3, i64 %5
  %6 = mul i64 %2, %1
  %7 = mul i64 %6, 3
  %scevgep21 = getelementptr i8, ptr %0, i64 %7
  %bound0 = icmp ugt ptr %scevgep21, %3
  %bound1 = icmp ugt ptr %scevgep, %0
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check22 = icmp ult i64 %5, 16
  br i1 %min.iters.check22, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %5, -16
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = mul i64 %index, 3
  %8 = or disjoint i64 %offset.idx, 3
  %9 = or disjoint i64 %offset.idx, 6
  %10 = or disjoint i64 %offset.idx, 9
  %11 = or disjoint i64 %offset.idx, 12
  %12 = or disjoint i64 %offset.idx, 15
  %13 = getelementptr inbounds i8, ptr %0, i64 %offset.idx
  %14 = getelementptr inbounds i8, ptr %0, i64 %8
  %15 = getelementptr inbounds i8, ptr %0, i64 %9
  %16 = getelementptr inbounds i8, ptr %0, i64 %10
  %17 = getelementptr inbounds i8, ptr %0, i64 %11
  %18 = getelementptr inbounds i8, ptr %0, i64 %12
  %19 = getelementptr i8, ptr %0, i64 %offset.idx
  %20 = getelementptr i8, ptr %19, i64 18
  %21 = getelementptr i8, ptr %0, i64 %offset.idx
  %22 = getelementptr i8, ptr %21, i64 21
  %23 = getelementptr i8, ptr %0, i64 %offset.idx
  %24 = getelementptr i8, ptr %23, i64 24
  %25 = getelementptr i8, ptr %0, i64 %offset.idx
  %26 = getelementptr i8, ptr %25, i64 27
  %27 = getelementptr i8, ptr %0, i64 %offset.idx
  %28 = getelementptr i8, ptr %27, i64 30
  %29 = getelementptr i8, ptr %0, i64 %offset.idx
  %30 = getelementptr i8, ptr %29, i64 33
  %31 = getelementptr i8, ptr %0, i64 %offset.idx
  %32 = getelementptr i8, ptr %31, i64 36
  %33 = getelementptr i8, ptr %0, i64 %offset.idx
  %34 = getelementptr i8, ptr %33, i64 39
  %35 = getelementptr i8, ptr %0, i64 %offset.idx
  %36 = getelementptr i8, ptr %35, i64 42
  %37 = getelementptr i8, ptr %0, i64 %offset.idx
  %38 = getelementptr i8, ptr %37, i64 45
  %39 = load i8, ptr %13, align 1, !tbaa !5, !alias.scope !8
  %40 = load i8, ptr %14, align 1, !tbaa !5, !alias.scope !8
  %41 = load i8, ptr %15, align 1, !tbaa !5, !alias.scope !8
  %42 = load i8, ptr %16, align 1, !tbaa !5, !alias.scope !8
  %43 = load i8, ptr %17, align 1, !tbaa !5, !alias.scope !8
  %44 = load i8, ptr %18, align 1, !tbaa !5, !alias.scope !8
  %45 = load i8, ptr %20, align 1, !tbaa !5, !alias.scope !8
  %46 = load i8, ptr %22, align 1, !tbaa !5, !alias.scope !8
  %47 = load i8, ptr %24, align 1, !tbaa !5, !alias.scope !8
  %48 = load i8, ptr %26, align 1, !tbaa !5, !alias.scope !8
  %49 = load i8, ptr %28, align 1, !tbaa !5, !alias.scope !8
  %50 = load i8, ptr %30, align 1, !tbaa !5, !alias.scope !8
  %51 = load i8, ptr %32, align 1, !tbaa !5, !alias.scope !8
  %52 = load i8, ptr %34, align 1, !tbaa !5, !alias.scope !8
  %53 = load i8, ptr %36, align 1, !tbaa !5, !alias.scope !8
  %54 = load i8, ptr %38, align 1, !tbaa !5, !alias.scope !8
  %55 = insertelement <16 x i8> poison, i8 %39, i64 0
  %56 = insertelement <16 x i8> %55, i8 %40, i64 1
  %57 = insertelement <16 x i8> %56, i8 %41, i64 2
  %58 = insertelement <16 x i8> %57, i8 %42, i64 3
  %59 = insertelement <16 x i8> %58, i8 %43, i64 4
  %60 = insertelement <16 x i8> %59, i8 %44, i64 5
  %61 = insertelement <16 x i8> %60, i8 %45, i64 6
  %62 = insertelement <16 x i8> %61, i8 %46, i64 7
  %63 = insertelement <16 x i8> %62, i8 %47, i64 8
  %64 = insertelement <16 x i8> %63, i8 %48, i64 9
  %65 = insertelement <16 x i8> %64, i8 %49, i64 10
  %66 = insertelement <16 x i8> %65, i8 %50, i64 11
  %67 = insertelement <16 x i8> %66, i8 %51, i64 12
  %68 = insertelement <16 x i8> %67, i8 %52, i64 13
  %69 = insertelement <16 x i8> %68, i8 %53, i64 14
  %70 = insertelement <16 x i8> %69, i8 %54, i64 15
  %71 = getelementptr i8, ptr %13, i64 1
  %72 = getelementptr i8, ptr %14, i64 1
  %73 = getelementptr i8, ptr %15, i64 1
  %74 = getelementptr i8, ptr %16, i64 1
  %75 = getelementptr i8, ptr %17, i64 1
  %76 = getelementptr i8, ptr %18, i64 1
  %77 = getelementptr i8, ptr %19, i64 19
  %78 = getelementptr i8, ptr %21, i64 22
  %79 = getelementptr i8, ptr %23, i64 25
  %80 = getelementptr i8, ptr %25, i64 28
  %81 = getelementptr i8, ptr %27, i64 31
  %82 = getelementptr i8, ptr %29, i64 34
  %83 = getelementptr i8, ptr %31, i64 37
  %84 = getelementptr i8, ptr %33, i64 40
  %85 = getelementptr i8, ptr %35, i64 43
  %86 = getelementptr i8, ptr %37, i64 46
  %87 = load i8, ptr %71, align 1, !tbaa !5, !alias.scope !8
  %88 = load i8, ptr %72, align 1, !tbaa !5, !alias.scope !8
  %89 = load i8, ptr %73, align 1, !tbaa !5, !alias.scope !8
  %90 = load i8, ptr %74, align 1, !tbaa !5, !alias.scope !8
  %91 = load i8, ptr %75, align 1, !tbaa !5, !alias.scope !8
  %92 = load i8, ptr %76, align 1, !tbaa !5, !alias.scope !8
  %93 = load i8, ptr %77, align 1, !tbaa !5, !alias.scope !8
  %94 = load i8, ptr %78, align 1, !tbaa !5, !alias.scope !8
  %95 = load i8, ptr %79, align 1, !tbaa !5, !alias.scope !8
  %96 = load i8, ptr %80, align 1, !tbaa !5, !alias.scope !8
  %97 = load i8, ptr %81, align 1, !tbaa !5, !alias.scope !8
  %98 = load i8, ptr %82, align 1, !tbaa !5, !alias.scope !8
  %99 = load i8, ptr %83, align 1, !tbaa !5, !alias.scope !8
  %100 = load i8, ptr %84, align 1, !tbaa !5, !alias.scope !8
  %101 = load i8, ptr %85, align 1, !tbaa !5, !alias.scope !8
  %102 = load i8, ptr %86, align 1, !tbaa !5, !alias.scope !8
  %103 = insertelement <16 x i8> poison, i8 %87, i64 0
  %104 = insertelement <16 x i8> %103, i8 %88, i64 1
  %105 = insertelement <16 x i8> %104, i8 %89, i64 2
  %106 = insertelement <16 x i8> %105, i8 %90, i64 3
  %107 = insertelement <16 x i8> %106, i8 %91, i64 4
  %108 = insertelement <16 x i8> %107, i8 %92, i64 5
  %109 = insertelement <16 x i8> %108, i8 %93, i64 6
  %110 = insertelement <16 x i8> %109, i8 %94, i64 7
  %111 = insertelement <16 x i8> %110, i8 %95, i64 8
  %112 = insertelement <16 x i8> %111, i8 %96, i64 9
  %113 = insertelement <16 x i8> %112, i8 %97, i64 10
  %114 = insertelement <16 x i8> %113, i8 %98, i64 11
  %115 = insertelement <16 x i8> %114, i8 %99, i64 12
  %116 = insertelement <16 x i8> %115, i8 %100, i64 13
  %117 = insertelement <16 x i8> %116, i8 %101, i64 14
  %118 = insertelement <16 x i8> %117, i8 %102, i64 15
  %119 = getelementptr i8, ptr %13, i64 2
  %120 = getelementptr i8, ptr %14, i64 2
  %121 = getelementptr i8, ptr %15, i64 2
  %122 = getelementptr i8, ptr %16, i64 2
  %123 = getelementptr i8, ptr %17, i64 2
  %124 = getelementptr i8, ptr %18, i64 2
  %125 = getelementptr i8, ptr %19, i64 20
  %126 = getelementptr i8, ptr %21, i64 23
  %127 = getelementptr i8, ptr %23, i64 26
  %128 = getelementptr i8, ptr %25, i64 29
  %129 = getelementptr i8, ptr %27, i64 32
  %130 = getelementptr i8, ptr %29, i64 35
  %131 = getelementptr i8, ptr %31, i64 38
  %132 = getelementptr i8, ptr %33, i64 41
  %133 = getelementptr i8, ptr %35, i64 44
  %134 = getelementptr i8, ptr %37, i64 47
  %135 = load i8, ptr %119, align 1, !tbaa !5, !alias.scope !8
  %136 = load i8, ptr %120, align 1, !tbaa !5, !alias.scope !8
  %137 = load i8, ptr %121, align 1, !tbaa !5, !alias.scope !8
  %138 = load i8, ptr %122, align 1, !tbaa !5, !alias.scope !8
  %139 = load i8, ptr %123, align 1, !tbaa !5, !alias.scope !8
  %140 = load i8, ptr %124, align 1, !tbaa !5, !alias.scope !8
  %141 = load i8, ptr %125, align 1, !tbaa !5, !alias.scope !8
  %142 = load i8, ptr %126, align 1, !tbaa !5, !alias.scope !8
  %143 = load i8, ptr %127, align 1, !tbaa !5, !alias.scope !8
  %144 = load i8, ptr %128, align 1, !tbaa !5, !alias.scope !8
  %145 = load i8, ptr %129, align 1, !tbaa !5, !alias.scope !8
  %146 = load i8, ptr %130, align 1, !tbaa !5, !alias.scope !8
  %147 = load i8, ptr %131, align 1, !tbaa !5, !alias.scope !8
  %148 = load i8, ptr %132, align 1, !tbaa !5, !alias.scope !8
  %149 = load i8, ptr %133, align 1, !tbaa !5, !alias.scope !8
  %150 = load i8, ptr %134, align 1, !tbaa !5, !alias.scope !8
  %151 = insertelement <16 x i8> poison, i8 %135, i64 0
  %152 = insertelement <16 x i8> %151, i8 %136, i64 1
  %153 = insertelement <16 x i8> %152, i8 %137, i64 2
  %154 = insertelement <16 x i8> %153, i8 %138, i64 3
  %155 = insertelement <16 x i8> %154, i8 %139, i64 4
  %156 = insertelement <16 x i8> %155, i8 %140, i64 5
  %157 = insertelement <16 x i8> %156, i8 %141, i64 6
  %158 = insertelement <16 x i8> %157, i8 %142, i64 7
  %159 = insertelement <16 x i8> %158, i8 %143, i64 8
  %160 = insertelement <16 x i8> %159, i8 %144, i64 9
  %161 = insertelement <16 x i8> %160, i8 %145, i64 10
  %162 = insertelement <16 x i8> %161, i8 %146, i64 11
  %163 = insertelement <16 x i8> %162, i8 %147, i64 12
  %164 = insertelement <16 x i8> %163, i8 %148, i64 13
  %165 = insertelement <16 x i8> %164, i8 %149, i64 14
  %166 = insertelement <16 x i8> %165, i8 %150, i64 15
  %167 = uitofp <16 x i8> %70 to <16 x double>
  %168 = uitofp <16 x i8> %118 to <16 x double>
  %169 = fmul <16 x double> %168, <double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01>
  %170 = tail call <16 x double> @llvm.fmuladd.v16f64(<16 x double> %167, <16 x double> <double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01>, <16 x double> %169)
  %171 = uitofp <16 x i8> %166 to <16 x double>
  %172 = tail call <16 x double> @llvm.fmuladd.v16f64(<16 x double> %171, <16 x double> <double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01>, <16 x double> %170)
  %173 = fptrunc <16 x double> %172 to <16 x float>
  %174 = fptoui <16 x float> %173 to <16 x i8>
  %175 = getelementptr inbounds i8, ptr %3, i64 %index
  store <16 x i8> %174, ptr %175, align 1, !tbaa !5, !alias.scope !11, !noalias !8
  %index.next = add nuw i64 %index, 16
  %176 = icmp eq i64 %index.next, %n.vec
  br i1 %176, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %5, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end25 = mul i64 %n.vec, 3
  %n.vec.remaining = and i64 %5, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %.lr.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec24 = and i64 %5, -8
  %ind.end = mul i64 %n.vec24, 3
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index27 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next29, %vec.epilog.vector.body ]
  %offset.idx28 = mul i64 %index27, 3
  %177 = or disjoint i64 %offset.idx28, 3
  %178 = or disjoint i64 %offset.idx28, 6
  %179 = getelementptr inbounds i8, ptr %0, i64 %offset.idx28
  %180 = getelementptr inbounds i8, ptr %0, i64 %177
  %181 = getelementptr inbounds i8, ptr %0, i64 %178
  %182 = getelementptr i8, ptr %0, i64 %offset.idx28
  %183 = getelementptr i8, ptr %182, i64 9
  %184 = getelementptr i8, ptr %0, i64 %offset.idx28
  %185 = getelementptr i8, ptr %184, i64 12
  %186 = getelementptr i8, ptr %0, i64 %offset.idx28
  %187 = getelementptr i8, ptr %186, i64 15
  %188 = getelementptr i8, ptr %0, i64 %offset.idx28
  %189 = getelementptr i8, ptr %188, i64 18
  %190 = getelementptr i8, ptr %0, i64 %offset.idx28
  %191 = getelementptr i8, ptr %190, i64 21
  %192 = load i8, ptr %179, align 1, !tbaa !5, !alias.scope !17
  %193 = load i8, ptr %180, align 1, !tbaa !5, !alias.scope !17
  %194 = load i8, ptr %181, align 1, !tbaa !5, !alias.scope !17
  %195 = load i8, ptr %183, align 1, !tbaa !5, !alias.scope !17
  %196 = load i8, ptr %185, align 1, !tbaa !5, !alias.scope !17
  %197 = load i8, ptr %187, align 1, !tbaa !5, !alias.scope !17
  %198 = load i8, ptr %189, align 1, !tbaa !5, !alias.scope !17
  %199 = load i8, ptr %191, align 1, !tbaa !5, !alias.scope !17
  %200 = insertelement <8 x i8> poison, i8 %192, i64 0
  %201 = insertelement <8 x i8> %200, i8 %193, i64 1
  %202 = insertelement <8 x i8> %201, i8 %194, i64 2
  %203 = insertelement <8 x i8> %202, i8 %195, i64 3
  %204 = insertelement <8 x i8> %203, i8 %196, i64 4
  %205 = insertelement <8 x i8> %204, i8 %197, i64 5
  %206 = insertelement <8 x i8> %205, i8 %198, i64 6
  %207 = insertelement <8 x i8> %206, i8 %199, i64 7
  %208 = getelementptr i8, ptr %179, i64 1
  %209 = getelementptr i8, ptr %180, i64 1
  %210 = getelementptr i8, ptr %181, i64 1
  %211 = getelementptr i8, ptr %182, i64 10
  %212 = getelementptr i8, ptr %184, i64 13
  %213 = getelementptr i8, ptr %186, i64 16
  %214 = getelementptr i8, ptr %188, i64 19
  %215 = getelementptr i8, ptr %190, i64 22
  %216 = load i8, ptr %208, align 1, !tbaa !5, !alias.scope !17
  %217 = load i8, ptr %209, align 1, !tbaa !5, !alias.scope !17
  %218 = load i8, ptr %210, align 1, !tbaa !5, !alias.scope !17
  %219 = load i8, ptr %211, align 1, !tbaa !5, !alias.scope !17
  %220 = load i8, ptr %212, align 1, !tbaa !5, !alias.scope !17
  %221 = load i8, ptr %213, align 1, !tbaa !5, !alias.scope !17
  %222 = load i8, ptr %214, align 1, !tbaa !5, !alias.scope !17
  %223 = load i8, ptr %215, align 1, !tbaa !5, !alias.scope !17
  %224 = insertelement <8 x i8> poison, i8 %216, i64 0
  %225 = insertelement <8 x i8> %224, i8 %217, i64 1
  %226 = insertelement <8 x i8> %225, i8 %218, i64 2
  %227 = insertelement <8 x i8> %226, i8 %219, i64 3
  %228 = insertelement <8 x i8> %227, i8 %220, i64 4
  %229 = insertelement <8 x i8> %228, i8 %221, i64 5
  %230 = insertelement <8 x i8> %229, i8 %222, i64 6
  %231 = insertelement <8 x i8> %230, i8 %223, i64 7
  %232 = getelementptr i8, ptr %179, i64 2
  %233 = getelementptr i8, ptr %180, i64 2
  %234 = getelementptr i8, ptr %181, i64 2
  %235 = getelementptr i8, ptr %182, i64 11
  %236 = getelementptr i8, ptr %184, i64 14
  %237 = getelementptr i8, ptr %186, i64 17
  %238 = getelementptr i8, ptr %188, i64 20
  %239 = getelementptr i8, ptr %190, i64 23
  %240 = load i8, ptr %232, align 1, !tbaa !5, !alias.scope !17
  %241 = load i8, ptr %233, align 1, !tbaa !5, !alias.scope !17
  %242 = load i8, ptr %234, align 1, !tbaa !5, !alias.scope !17
  %243 = load i8, ptr %235, align 1, !tbaa !5, !alias.scope !17
  %244 = load i8, ptr %236, align 1, !tbaa !5, !alias.scope !17
  %245 = load i8, ptr %237, align 1, !tbaa !5, !alias.scope !17
  %246 = load i8, ptr %238, align 1, !tbaa !5, !alias.scope !17
  %247 = load i8, ptr %239, align 1, !tbaa !5, !alias.scope !17
  %248 = insertelement <8 x i8> poison, i8 %240, i64 0
  %249 = insertelement <8 x i8> %248, i8 %241, i64 1
  %250 = insertelement <8 x i8> %249, i8 %242, i64 2
  %251 = insertelement <8 x i8> %250, i8 %243, i64 3
  %252 = insertelement <8 x i8> %251, i8 %244, i64 4
  %253 = insertelement <8 x i8> %252, i8 %245, i64 5
  %254 = insertelement <8 x i8> %253, i8 %246, i64 6
  %255 = insertelement <8 x i8> %254, i8 %247, i64 7
  %256 = uitofp <8 x i8> %207 to <8 x double>
  %257 = uitofp <8 x i8> %231 to <8 x double>
  %258 = fmul <8 x double> %257, <double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01, double 5.870000e-01>
  %259 = tail call <8 x double> @llvm.fmuladd.v8f64(<8 x double> %256, <8 x double> <double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01, double 2.990000e-01>, <8 x double> %258)
  %260 = uitofp <8 x i8> %255 to <8 x double>
  %261 = tail call <8 x double> @llvm.fmuladd.v8f64(<8 x double> %260, <8 x double> <double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01, double 1.140000e-01>, <8 x double> %259)
  %262 = fptrunc <8 x double> %261 to <8 x float>
  %263 = fptoui <8 x float> %262 to <8 x i8>
  %264 = getelementptr inbounds i8, ptr %3, i64 %index27
  store <8 x i8> %263, ptr %264, align 1, !tbaa !5, !alias.scope !20, !noalias !17
  %index.next29 = add nuw i64 %index27, 8
  %265 = icmp eq i64 %index.next29, %n.vec24
  br i1 %265, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !22

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n30 = icmp eq i64 %5, %n.vec24
  br i1 %cmp.n30, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %vector.memcheck, %iter.check, %vec.epilog.iter.check
  %.020.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %ind.end25, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  %.01819.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec24, %vec.epilog.middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.020 = phi i64 [ %282, %.lr.ph ], [ %.020.ph, %.lr.ph.preheader ]
  %.01819 = phi i64 [ %281, %.lr.ph ], [ %.01819.ph, %.lr.ph.preheader ]
  %266 = getelementptr inbounds i8, ptr %0, i64 %.020
  %267 = load i8, ptr %266, align 1, !tbaa !5
  %268 = getelementptr i8, ptr %266, i64 1
  %269 = load i8, ptr %268, align 1, !tbaa !5
  %270 = getelementptr i8, ptr %266, i64 2
  %271 = load i8, ptr %270, align 1, !tbaa !5
  %272 = uitofp i8 %267 to double
  %273 = uitofp i8 %269 to double
  %274 = fmul double %273, 5.870000e-01
  %275 = tail call double @llvm.fmuladd.f64(double %272, double 2.990000e-01, double %274)
  %276 = uitofp i8 %271 to double
  %277 = tail call double @llvm.fmuladd.f64(double %276, double 1.140000e-01, double %275)
  %278 = fptrunc double %277 to float
  %279 = fptoui float %278 to i8
  %280 = getelementptr inbounds i8, ptr %3, i64 %.01819
  store i8 %279, ptr %280, align 1, !tbaa !5
  %281 = add nuw i64 %.01819, 1
  %282 = add i64 %.020, 3
  %exitcond.not = icmp eq i64 %281, %5
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %vec.epilog.middle.block, %4
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <16 x double> @llvm.fmuladd.v16f64(<16 x double>, <16 x double>, <16 x double>) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <8 x double> @llvm.fmuladd.v8f64(<8 x double>, <8 x double>, <8 x double>) #2

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

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9}
!9 = distinct !{!9, !10}
!10 = distinct !{!10, !"LVerDomain"}
!11 = !{!12}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = !{!18}
!18 = distinct !{!18, !19}
!19 = distinct !{!19, !"LVerDomain"}
!20 = !{!21}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !14, !15, !16}
!23 = distinct !{!23, !14, !15}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass