; LLVM IR from wiktorowski211/deeds-registration :: deeds/libs/deedsBCV0.ll (Z9distancesPfS_iiiii)

; 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: 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 nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9boxfilterPfS_S_iiii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7imshiftPfS_iiiiii(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9distancesPfS_iiiii(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) #5 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca [6 x i32], align 16
  %21 = alloca [6 x i32], align 16
  %22 = alloca [6 x i32], align 16
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  store i32 %6, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %25 = load i32, ptr %10, align 4, !tbaa !9
  %26 = load i32, ptr %11, align 4, !tbaa !9
  %27 = mul nsw i32 %25, %26
  %28 = load i32, ptr %12, align 4, !tbaa !9
  %29 = mul nsw i32 %27, %28
  store i32 %29, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %30 = load i32, ptr %15, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %31, i64 4)
  %33 = extractvalue { i64, i1 } %32, 1
  %34 = extractvalue { i64, i1 } %32, 0
  %35 = select i1 %33, i64 -1, i64 %34
  %36 = call noalias noundef nonnull ptr @_Znam(i64 noundef %35) #7
  store ptr %36, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 6, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %37 = load i32, ptr %15, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %38, i64 4)
  %40 = extractvalue { i64, i1 } %39, 1
  %41 = extractvalue { i64, i1 } %39, 0
  %42 = select i1 %40, i64 -1, i64 %41
  %43 = call noalias noundef nonnull ptr @_Znam(i64 noundef %42) #7
  store ptr %43, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %44 = load i32, ptr %15, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %45, i64 4)
  %47 = extractvalue { i64, i1 } %46, 1
  %48 = extractvalue { i64, i1 } %46, 0
  %49 = select i1 %47, i64 -1, i64 %48
  %50 = call noalias noundef nonnull ptr @_Znam(i64 noundef %49) #7
  store ptr %50, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #6
  %51 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %51, ptr %20, align 4, !tbaa !9
  %52 = getelementptr inbounds i32, ptr %20, i64 1
  %53 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %53, ptr %52, align 4, !tbaa !9
  %54 = getelementptr inbounds i32, ptr %20, i64 2
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = sub nsw i32 0, %55
  store i32 %56, ptr %54, align 4, !tbaa !9
  %57 = getelementptr inbounds i32, ptr %20, i64 3
  store i32 0, ptr %57, align 4, !tbaa !9
  %58 = getelementptr inbounds i32, ptr %20, i64 4
  %59 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %59, ptr %58, align 4, !tbaa !9
  %60 = getelementptr inbounds i32, ptr %20, i64 5
  store i32 0, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  %61 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %61, ptr %21, align 4, !tbaa !9
  %62 = getelementptr inbounds i32, ptr %21, i64 1
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = sub nsw i32 0, %63
  store i32 %64, ptr %62, align 4, !tbaa !9
  %65 = getelementptr inbounds i32, ptr %21, i64 2
  store i32 0, ptr %65, align 4, !tbaa !9
  %66 = getelementptr inbounds i32, ptr %21, i64 3
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = sub nsw i32 0, %67
  store i32 %68, ptr %66, align 4, !tbaa !9
  %69 = getelementptr inbounds i32, ptr %21, i64 4
  store i32 0, ptr %69, align 4, !tbaa !9
  %70 = getelementptr inbounds i32, ptr %21, i64 5
  %71 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %71, ptr %70, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  %72 = getelementptr inbounds i32, ptr %22, i64 1
  store i32 0, ptr %72, align 4, !tbaa !9
  %73 = getelementptr inbounds i32, ptr %22, i64 2
  %74 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %74, ptr %73, align 4, !tbaa !9
  %75 = getelementptr inbounds i32, ptr %22, i64 3
  %76 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %76, ptr %75, align 4, !tbaa !9
  %77 = getelementptr inbounds i32, ptr %22, i64 4
  %78 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %78, ptr %77, align 4, !tbaa !9
  %79 = getelementptr inbounds i32, ptr %22, i64 5
  %80 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %80, ptr %79, align 4, !tbaa !9
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = load i32, ptr %14, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [6 x i32], ptr %20, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = load i32, ptr %14, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [6 x i32], ptr %21, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !9
  %91 = load i32, ptr %14, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [6 x i32], ptr %22, i64 0, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = load i32, ptr %11, align 4, !tbaa !9
  %97 = load i32, ptr %12, align 4, !tbaa !9
  call void @_Z7imshiftPfS_iiiiii(ptr noundef %81, ptr noundef %82, i32 noundef %86, i32 noundef %90, i32 noundef %94, i32 noundef %95, i32 noundef %96, i32 noundef %97)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %131, %7
  %99 = load i32, ptr %23, align 4, !tbaa !9
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %134

103:                                              ; preds = %98
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = load i32, ptr %23, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds float, ptr %104, i64 %106
  %108 = load float, ptr %107, align 4, !tbaa !11
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = load i32, ptr %23, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds float, ptr %109, i64 %111
  %113 = load float, ptr %112, align 4, !tbaa !11
  %114 = fsub float %108, %113
  %115 = load ptr, ptr %16, align 8, !tbaa !5
  %116 = load i32, ptr %23, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds float, ptr %115, i64 %117
  %119 = load float, ptr %118, align 4, !tbaa !11
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = load i32, ptr %23, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds float, ptr %120, i64 %122
  %124 = load float, ptr %123, align 4, !tbaa !11
  %125 = fsub float %119, %124
  %126 = fmul float %114, %125
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = load i32, ptr %23, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds float, ptr %127, i64 %129
  store float %126, ptr %130, align 4, !tbaa !11
  br label %131

131:                                              ; preds = %103
  %132 = load i32, ptr %23, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %23, align 4, !tbaa !9
  br label %98, !llvm.loop !13

134:                                              ; preds = %102
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  %137 = load ptr, ptr %19, align 8, !tbaa !5
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = load i32, ptr %12, align 4, !tbaa !9
  call void @_Z9boxfilterPfS_S_iiii(ptr noundef %135, ptr noundef %136, ptr noundef %137, i32 noundef %138, i32 noundef %139, i32 noundef %140, i32 noundef %141)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %142

142:                                              ; preds = %161, %134
  %143 = load i32, ptr %24, align 4, !tbaa !9
  %144 = load i32, ptr %15, align 4, !tbaa !9
  %145 = icmp slt i32 %143, %144
  br i1 %145, label %147, label %146

146:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %164

147:                                              ; preds = %142
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = load i32, ptr %24, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds float, ptr %148, i64 %150
  %152 = load float, ptr %151, align 4, !tbaa !11
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = load i32, ptr %24, align 4, !tbaa !9
  %155 = load i32, ptr %14, align 4, !tbaa !9
  %156 = load i32, ptr %15, align 4, !tbaa !9
  %157 = mul nsw i32 %155, %156
  %158 = add nsw i32 %154, %157
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds float, ptr %153, i64 %159
  store float %152, ptr %160, align 4, !tbaa !11
  br label %161

161:                                              ; preds = %147
  %162 = load i32, ptr %24, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %24, align 4, !tbaa !9
  br label %142, !llvm.loop !15

164:                                              ; preds = %146
  %165 = load ptr, ptr %18, align 8, !tbaa !5
  %166 = icmp eq ptr %165, null
  br i1 %166, label %168, label %167

167:                                              ; preds = %164
  call void @_ZdlPvm(ptr noundef %165, i64 noundef 4) #8
  br label %168

168:                                              ; preds = %167, %164
  %169 = load ptr, ptr %19, align 8, !tbaa !5
  %170 = icmp eq ptr %169, null
  br i1 %170, label %172, label %171

171:                                              ; preds = %168
  call void @_ZdlPvm(ptr noundef %169, i64 noundef 4) #8
  br label %172

172:                                              ; preds = %171, %168
  %173 = load ptr, ptr %16, align 8, !tbaa !5
  %174 = icmp eq ptr %173, null
  br i1 %174, label %176, label %175

175:                                              ; preds = %172
  call void @_ZdlPvm(ptr noundef %173, i64 noundef 4) #8
  br label %176

176:                                              ; preds = %175, %172
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  ret void
}

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


; 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: 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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z9boxfilterPfS_S_iiii(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7imshiftPfS_iiiiii(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9distancesPfS_iiiii(ptr noundef %0, ptr nocapture noundef writeonly %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #4 {
  %8 = alloca [6 x i32], align 16
  %9 = alloca [6 x i32], align 16
  %10 = alloca [6 x i32], align 16
  %11 = mul nsw i32 %3, %2
  %12 = mul nsw i32 %11, %4
  %13 = zext i32 %12 to i64
  %14 = icmp slt i32 %12, 0
  %15 = shl nuw nsw i64 %13, 2
  %16 = select i1 %14, i64 -1, i64 %15
  %17 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %16) #6
  %18 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %16) #6
  %19 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  store i32 %5, ptr %8, align 16, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %5, ptr %20, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %8, i64 8
  %22 = sub nsw i32 0, %5
  store i32 %22, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %8, i64 12
  store i32 0, ptr %23, align 4, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %8, i64 16
  store i32 %5, ptr %24, align 16, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %8, i64 20
  store i32 0, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  store i32 %5, ptr %9, align 16, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %9, i64 4
  store i32 %22, ptr %26, align 4, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 0, ptr %27, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %9, i64 12
  store i32 %22, ptr %28, align 4, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %9, i64 16
  store i32 0, ptr %29, align 16, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %9, i64 20
  store i32 %5, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  store i32 0, ptr %10, align 16, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %10, i64 4
  store i32 0, ptr %31, align 4, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %10, i64 8
  %33 = insertelement <4 x i32> poison, i32 %5, i64 0
  %34 = shufflevector <4 x i32> %33, <4 x i32> poison, <4 x i32> zeroinitializer
  store <4 x i32> %34, ptr %32, align 8, !tbaa !5
  %35 = sext i32 %6 to i64
  %36 = getelementptr inbounds [6 x i32], ptr %8, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = getelementptr inbounds [6 x i32], ptr %9, i64 0, i64 %35
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = getelementptr inbounds [6 x i32], ptr %10, i64 0, i64 %35
  %41 = load i32, ptr %40, align 4, !tbaa !5
  tail call void @_Z7imshiftPfS_iiiiii(ptr noundef %0, ptr noundef nonnull %17, i32 noundef %37, i32 noundef %39, i32 noundef %41, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  %42 = icmp sgt i32 %12, 0
  br i1 %42, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %7
  %min.iters.check = icmp ult i32 %12, 8
  br i1 %min.iters.check, label %.lr.ph.preheader71, label %vector.ph

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

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %13, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %43 = getelementptr inbounds float, ptr %17, i64 %index
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %wide.load = load <4 x float>, ptr %43, align 4, !tbaa !9
  %wide.load68 = load <4 x float>, ptr %44, align 4, !tbaa !9
  %45 = getelementptr inbounds float, ptr %0, i64 %index
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  %wide.load69 = load <4 x float>, ptr %45, align 4, !tbaa !9
  %wide.load70 = load <4 x float>, ptr %46, align 4, !tbaa !9
  %47 = fsub <4 x float> %wide.load, %wide.load69
  %48 = fsub <4 x float> %wide.load68, %wide.load70
  %49 = fmul <4 x float> %47, %47
  %50 = fmul <4 x float> %48, %48
  store <4 x float> %49, ptr %43, align 4, !tbaa !9
  store <4 x float> %50, ptr %44, align 4, !tbaa !9
  %index.next = add nuw i64 %index, 8
  %51 = icmp eq i64 %index.next, %n.vec
  br i1 %51, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %13
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader71

._crit_edge.thread:                               ; preds = %7
  tail call void @_Z9boxfilterPfS_S_iiii(ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, i32 noundef %5, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  br label %._crit_edge63

._crit_edge:                                      ; preds = %.lr.ph, %middle.block
  tail call void @_Z9boxfilterPfS_S_iiii(ptr noundef nonnull %17, ptr noundef nonnull %18, ptr noundef nonnull %19, i32 noundef %5, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  br i1 %42, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %._crit_edge
  %52 = mul nsw i32 %12, %6
  %53 = sext i32 %52 to i64
  %54 = shl nsw i64 %53, 2
  %scevgep = getelementptr i8, ptr %1, i64 %54
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %scevgep, ptr nonnull align 4 %17, i64 %15, i1 false), !tbaa !9
  br label %._crit_edge63

.lr.ph:                                           ; preds = %.lr.ph.preheader71, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader71 ]
  %55 = getelementptr inbounds float, ptr %17, i64 %indvars.iv
  %56 = load float, ptr %55, align 4, !tbaa !9
  %57 = getelementptr inbounds float, ptr %0, i64 %indvars.iv
  %58 = load float, ptr %57, align 4, !tbaa !9
  %59 = fsub float %56, %58
  %60 = fmul float %59, %59
  store float %60, ptr %55, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %13
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !15

._crit_edge63:                                    ; preds = %._crit_edge.thread, %.lr.ph62, %._crit_edge
  tail call void @_ZdlPvm(ptr noundef nonnull %18, i64 noundef 4) #8
  tail call void @_ZdlPvm(ptr noundef nonnull %19, i64 noundef 4) #8
  tail call void @_ZdlPvm(ptr noundef nonnull %17, i64 noundef 4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin 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 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 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 nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin 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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !14, !13}


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