; LLVM IR from FedericaPaoli1/stm32-speech-recognition-and-traduction :: Drivers/CMSIS/DSP/Source/FilteringFunctions (arm_iir_lattice_q31)

; 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.arm_iir_lattice_instance_q31 = type { i16, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @arm_iir_lattice_q31(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.arm_iir_lattice_instance_q31, ptr %23, i32 0, i32 1
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  store ptr %25, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.arm_iir_lattice_instance_q31, ptr %26, i32 0, i32 0
  %28 = load i16, ptr %27, align 8, !tbaa !14
  %29 = zext i16 %28 to i32
  store i32 %29, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %30 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %30, ptr %21, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %98, %4
  %32 = load i32, ptr %21, align 4, !tbaa !9
  %33 = icmp ugt i32 %32, 0
  br i1 %33, label %34, label %120

34:                                               ; preds = %31
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds i32, ptr %35, i32 1
  store ptr %36, ptr %6, align 8, !tbaa !5
  %37 = load i32, ptr %35, align 4, !tbaa !9
  store i32 %37, ptr %11, align 4, !tbaa !9
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.arm_iir_lattice_instance_q31, ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !15
  %41 = getelementptr inbounds i32, ptr %40, i64 0
  store ptr %41, ptr %19, align 8, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.arm_iir_lattice_instance_q31, ptr %42, i32 0, i32 2
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = getelementptr inbounds i32, ptr %44, i64 0
  store ptr %45, ptr %18, align 8, !tbaa !5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %46, ptr %16, align 8, !tbaa !5
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %47, ptr %17, align 8, !tbaa !5
  store i64 0, ptr %15, align 8, !tbaa !17
  %48 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %48, ptr %22, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %52, %34
  %50 = load i32, ptr %22, align 4, !tbaa !9
  %51 = icmp ugt i32 %50, 0
  br i1 %51, label %52, label %98

52:                                               ; preds = %49
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = getelementptr inbounds i32, ptr %53, i32 1
  store ptr %54, ptr %16, align 8, !tbaa !5
  %55 = load i32, ptr %53, align 4, !tbaa !9
  store i32 %55, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = load ptr, ptr %18, align 8, !tbaa !5
  %61 = load i32, ptr %60, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = mul nsw i64 %59, %62
  %64 = ashr i64 %63, 31
  %65 = trunc i64 %64 to i32
  %66 = sext i32 %65 to i64
  %67 = sub nsw i64 %57, %66
  %68 = call i32 @clip_q63_to_q31(i64 noundef %67)
  store i32 %68, ptr %12, align 4, !tbaa !9
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = load ptr, ptr %18, align 8, !tbaa !5
  %74 = getelementptr inbounds i32, ptr %73, i32 1
  store ptr %74, ptr %18, align 8, !tbaa !5
  %75 = load i32, ptr %73, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = mul nsw i64 %72, %76
  %78 = ashr i64 %77, 31
  %79 = trunc i64 %78 to i32
  %80 = sext i32 %79 to i64
  %81 = add nsw i64 %70, %80
  %82 = call i32 @clip_q63_to_q31(i64 noundef %81)
  store i32 %82, ptr %14, align 4, !tbaa !9
  %83 = load i32, ptr %14, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  %86 = getelementptr inbounds i32, ptr %85, i32 1
  store ptr %86, ptr %19, align 8, !tbaa !5
  %87 = load i32, ptr %85, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = mul nsw i64 %84, %88
  %90 = load i64, ptr %15, align 8, !tbaa !17
  %91 = add nsw i64 %90, %89
  store i64 %91, ptr %15, align 8, !tbaa !17
  %92 = load i32, ptr %14, align 4, !tbaa !9
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = getelementptr inbounds i32, ptr %93, i32 1
  store ptr %94, ptr %17, align 8, !tbaa !5
  store i32 %92, ptr %93, align 4, !tbaa !9
  %95 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %95, ptr %11, align 4, !tbaa !9
  %96 = load i32, ptr %22, align 4, !tbaa !9
  %97 = add i32 %96, -1
  store i32 %97, ptr %22, align 4, !tbaa !9
  br label %49, !llvm.loop !19

98:                                               ; preds = %49
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = getelementptr inbounds i32, ptr %101, i32 1
  store ptr %102, ptr %19, align 8, !tbaa !5
  %103 = load i32, ptr %101, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = mul nsw i64 %100, %104
  %106 = load i64, ptr %15, align 8, !tbaa !17
  %107 = add nsw i64 %106, %105
  store i64 %107, ptr %15, align 8, !tbaa !17
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = getelementptr inbounds i32, ptr %109, i32 1
  store ptr %110, ptr %17, align 8, !tbaa !5
  store i32 %108, ptr %109, align 4, !tbaa !9
  %111 = load i64, ptr %15, align 8, !tbaa !17
  %112 = ashr i64 %111, 31
  %113 = trunc i64 %112 to i32
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = getelementptr inbounds i32, ptr %114, i32 1
  store ptr %115, ptr %7, align 8, !tbaa !5
  store i32 %113, ptr %114, align 4, !tbaa !9
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds i32, ptr %116, i64 1
  store ptr %117, ptr %9, align 8, !tbaa !5
  %118 = load i32, ptr %21, align 4, !tbaa !9
  %119 = add i32 %118, -1
  store i32 %119, ptr %21, align 4, !tbaa !9
  br label %31, !llvm.loop !21

120:                                              ; preds = %31
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.arm_iir_lattice_instance_q31, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds i32, ptr %123, i64 0
  store ptr %124, ptr %10, align 8, !tbaa !5
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.arm_iir_lattice_instance_q31, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !11
  %128 = load i32, ptr %8, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds i32, ptr %127, i64 %129
  store ptr %130, ptr %9, align 8, !tbaa !5
  %131 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %131, ptr %22, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %135, %120
  %133 = load i32, ptr %22, align 4, !tbaa !9
  %134 = icmp ugt i32 %133, 0
  br i1 %134, label %135, label %143

135:                                              ; preds = %132
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds i32, ptr %136, i32 1
  store ptr %137, ptr %9, align 8, !tbaa !5
  %138 = load i32, ptr %136, align 4, !tbaa !9
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = getelementptr inbounds i32, ptr %139, i32 1
  store ptr %140, ptr %10, align 8, !tbaa !5
  store i32 %138, ptr %139, align 4, !tbaa !9
  %141 = load i32, ptr %22, align 4, !tbaa !9
  %142 = add i32 %141, -1
  store i32 %142, ptr %22, align 4, !tbaa !9
  br label %132, !llvm.loop !22

143:                                              ; preds = %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, 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: alwaysinline nounwind uwtable
declare hidden i32 @clip_q63_to_q31(i64 noundef) #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 = { alwaysinline 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 }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = !{!12, !6, i64 24}
!16 = !{!12, !6, i64 16}
!17 = !{!18, !18, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


; 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: nounwind uwtable
define dso_local void @arm_iir_lattice_q31(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = ptrtoint ptr %2 to i64
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load i16, ptr %0, align 8, !tbaa !5
  %8 = zext i16 %7 to i32
  %.not68 = icmp eq i32 %3, 0
  %.pre88 = load ptr, ptr %6, align 8, !tbaa !11
  %.pre8897 = ptrtoint ptr %.pre88 to i64
  br i1 %.not68, label %._crit_edge76, label %.lr.ph75

.lr.ph75:                                         ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %.not5657 = icmp eq i16 %7, 0
  br i1 %.not5657, label %.lr.ph75.split.us.preheader, label %.lr.ph

.lr.ph75.split.us.preheader:                      ; preds = %.lr.ph75
  %11 = zext i32 %3 to i64
  %min.iters.check = icmp ult i32 %3, 8
  %12 = sub i64 %5, %.pre8897
  %diff.check = icmp ult i64 %12, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %.lr.ph75.split.us.preheader131, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph75.split.us.preheader
  %n.vec = and i64 %11, 4294967288
  %.cast = trunc nuw i64 %n.vec to i32
  %ind.end = sub i32 %3, %.cast
  %13 = shl nuw nsw i64 %n.vec, 2
  %ind.end98 = getelementptr i8, ptr %2, i64 %13
  %14 = shl nuw nsw i64 %n.vec, 2
  %ind.end100 = getelementptr i8, ptr %.pre88, i64 %14
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = shl i64 %index, 2
  %next.gep = getelementptr i8, ptr %2, i64 %offset.idx
  %offset.idx103 = shl i64 %index, 2
  %next.gep104 = getelementptr i8, ptr %.pre88, i64 %offset.idx103
  %15 = getelementptr i8, ptr %next.gep104, i64 16
  store <4 x i32> zeroinitializer, ptr %next.gep104, align 4, !tbaa !12
  store <4 x i32> zeroinitializer, ptr %15, align 4, !tbaa !12
  %16 = getelementptr i8, ptr %next.gep, i64 16
  store <4 x i32> zeroinitializer, ptr %next.gep, align 4, !tbaa !12
  store <4 x i32> zeroinitializer, ptr %16, align 4, !tbaa !12
  %index.next = add nuw i64 %index, 8
  %17 = icmp eq i64 %index.next, %n.vec
  br i1 %17, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %11
  br i1 %cmp.n, label %._crit_edge76, label %.lr.ph75.split.us.preheader131

.lr.ph75.split.us.preheader131:                   ; preds = %middle.block, %.lr.ph75.split.us.preheader
  %.04173.us.ph = phi i32 [ %3, %.lr.ph75.split.us.preheader ], [ %ind.end, %middle.block ]
  %.04871.us.ph = phi ptr [ %2, %.lr.ph75.split.us.preheader ], [ %ind.end98, %middle.block ]
  %.05369.us.ph = phi ptr [ %.pre88, %.lr.ph75.split.us.preheader ], [ %ind.end100, %middle.block ]
  %18 = add i32 %.04173.us.ph, -1
  %xtraiter = and i32 %.04173.us.ph, 7
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph75.split.us.prol.loopexit, label %.lr.ph75.split.us.prol

.lr.ph75.split.us.prol:                           ; preds = %.lr.ph75.split.us.preheader131, %.lr.ph75.split.us.prol
  %.04173.us.prol = phi i32 [ %21, %.lr.ph75.split.us.prol ], [ %.04173.us.ph, %.lr.ph75.split.us.preheader131 ]
  %.04871.us.prol = phi ptr [ %19, %.lr.ph75.split.us.prol ], [ %.04871.us.ph, %.lr.ph75.split.us.preheader131 ]
  %.05369.us.prol = phi ptr [ %20, %.lr.ph75.split.us.prol ], [ %.05369.us.ph, %.lr.ph75.split.us.preheader131 ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph75.split.us.prol ], [ 0, %.lr.ph75.split.us.preheader131 ]
  store i32 0, ptr %.05369.us.prol, align 4, !tbaa !12
  %19 = getelementptr inbounds i8, ptr %.04871.us.prol, i64 4
  store i32 0, ptr %.04871.us.prol, align 4, !tbaa !12
  %20 = getelementptr inbounds i8, ptr %.05369.us.prol, i64 4
  %21 = add i32 %.04173.us.prol, -1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph75.split.us.prol.loopexit, label %.lr.ph75.split.us.prol, !llvm.loop !18

.lr.ph75.split.us.prol.loopexit:                  ; preds = %.lr.ph75.split.us.prol, %.lr.ph75.split.us.preheader131
  %.04173.us.unr = phi i32 [ %.04173.us.ph, %.lr.ph75.split.us.preheader131 ], [ %21, %.lr.ph75.split.us.prol ]
  %.04871.us.unr = phi ptr [ %.04871.us.ph, %.lr.ph75.split.us.preheader131 ], [ %19, %.lr.ph75.split.us.prol ]
  %.05369.us.unr = phi ptr [ %.05369.us.ph, %.lr.ph75.split.us.preheader131 ], [ %20, %.lr.ph75.split.us.prol ]
  %22 = icmp ult i32 %18, 7
  br i1 %22, label %._crit_edge76, label %.lr.ph75.split.us

.lr.ph75.split.us:                                ; preds = %.lr.ph75.split.us.prol.loopexit, %.lr.ph75.split.us
  %.04173.us = phi i32 [ %39, %.lr.ph75.split.us ], [ %.04173.us.unr, %.lr.ph75.split.us.prol.loopexit ]
  %.04871.us = phi ptr [ %37, %.lr.ph75.split.us ], [ %.04871.us.unr, %.lr.ph75.split.us.prol.loopexit ]
  %.05369.us = phi ptr [ %38, %.lr.ph75.split.us ], [ %.05369.us.unr, %.lr.ph75.split.us.prol.loopexit ]
  store i32 0, ptr %.05369.us, align 4, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %.04871.us, i64 4
  store i32 0, ptr %.04871.us, align 4, !tbaa !12
  %24 = getelementptr inbounds i8, ptr %.05369.us, i64 4
  store i32 0, ptr %24, align 4, !tbaa !12
  %25 = getelementptr inbounds i8, ptr %.04871.us, i64 8
  store i32 0, ptr %23, align 4, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %.05369.us, i64 8
  store i32 0, ptr %26, align 4, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %.04871.us, i64 12
  store i32 0, ptr %25, align 4, !tbaa !12
  %28 = getelementptr inbounds i8, ptr %.05369.us, i64 12
  store i32 0, ptr %28, align 4, !tbaa !12
  %29 = getelementptr inbounds i8, ptr %.04871.us, i64 16
  store i32 0, ptr %27, align 4, !tbaa !12
  %30 = getelementptr inbounds i8, ptr %.05369.us, i64 16
  store i32 0, ptr %30, align 4, !tbaa !12
  %31 = getelementptr inbounds i8, ptr %.04871.us, i64 20
  store i32 0, ptr %29, align 4, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %.05369.us, i64 20
  store i32 0, ptr %32, align 4, !tbaa !12
  %33 = getelementptr inbounds i8, ptr %.04871.us, i64 24
  store i32 0, ptr %31, align 4, !tbaa !12
  %34 = getelementptr inbounds i8, ptr %.05369.us, i64 24
  store i32 0, ptr %34, align 4, !tbaa !12
  %35 = getelementptr inbounds i8, ptr %.04871.us, i64 28
  store i32 0, ptr %33, align 4, !tbaa !12
  %36 = getelementptr inbounds i8, ptr %.05369.us, i64 28
  store i32 0, ptr %36, align 4, !tbaa !12
  %37 = getelementptr inbounds i8, ptr %.04871.us, i64 32
  store i32 0, ptr %35, align 4, !tbaa !12
  %38 = getelementptr inbounds i8, ptr %.05369.us, i64 32
  %39 = add i32 %.04173.us, -8
  %.not.us.7 = icmp eq i32 %39, 0
  br i1 %.not.us.7, label %._crit_edge76, label %.lr.ph75.split.us, !llvm.loop !20

.lr.ph:                                           ; preds = %.lr.ph75, %._crit_edge
  %.04173 = phi i32 [ %80, %._crit_edge ], [ %3, %.lr.ph75 ]
  %.04272 = phi ptr [ %71, %._crit_edge ], [ %1, %.lr.ph75 ]
  %.04871 = phi ptr [ %78, %._crit_edge ], [ %2, %.lr.ph75 ]
  %.05369 = phi ptr [ %79, %._crit_edge ], [ %.pre88, %.lr.ph75 ]
  %40 = load i32, ptr %.04272, align 4, !tbaa !12
  %41 = load ptr, ptr %9, align 8, !tbaa !21
  %42 = load ptr, ptr %10, align 8, !tbaa !22
  br label %43

43:                                               ; preds = %.lr.ph, %43
  %.064 = phi i32 [ %8, %.lr.ph ], [ %70, %43 ]
  %.04363 = phi ptr [ %41, %.lr.ph ], [ %65, %43 ]
  %.04462 = phi ptr [ %42, %.lr.ph ], [ %56, %43 ]
  %.04561 = phi ptr [ %.05369, %.lr.ph ], [ %44, %43 ]
  %.04759 = phi i64 [ 0, %.lr.ph ], [ %69, %43 ]
  %.05158 = phi i32 [ %40, %.lr.ph ], [ %54, %43 ]
  %44 = getelementptr i8, ptr %.04561, i64 4
  %45 = load i32, ptr %.04561, align 4, !tbaa !12
  %46 = sext i32 %.05158 to i64
  %47 = sext i32 %45 to i64
  %48 = load i32, ptr %.04462, align 4, !tbaa !12
  %49 = sext i32 %48 to i64
  %50 = shl nsw i64 %47, 1
  %51 = mul i64 %50, %49
  %52 = ashr i64 %51, 32
  %53 = sub nsw i64 %46, %52
  %54 = tail call i32 @clip_q63_to_q31(i64 noundef %53)
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i8, ptr %.04462, i64 4
  %57 = load i32, ptr %.04462, align 4, !tbaa !12
  %58 = sext i32 %57 to i64
  %59 = shl nsw i64 %55, 1
  %60 = mul i64 %59, %58
  %61 = ashr i64 %60, 32
  %62 = add nsw i64 %61, %47
  %63 = tail call i32 @clip_q63_to_q31(i64 noundef %62)
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %.04363, i64 4
  %66 = load i32, ptr %.04363, align 4, !tbaa !12
  %67 = sext i32 %66 to i64
  %68 = mul nsw i64 %67, %64
  %69 = add nsw i64 %68, %.04759
  store i32 %63, ptr %.04561, align 4, !tbaa !12
  %70 = add nsw i32 %.064, -1
  %.not56 = icmp eq i32 %70, 0
  br i1 %.not56, label %._crit_edge, label %43, !llvm.loop !23

._crit_edge:                                      ; preds = %43
  %71 = getelementptr inbounds i8, ptr %.04272, i64 4
  %72 = load i32, ptr %65, align 4, !tbaa !12
  %73 = sext i32 %72 to i64
  %74 = mul nsw i64 %73, %55
  %75 = add nsw i64 %74, %69
  store i32 %54, ptr %44, align 4, !tbaa !12
  %76 = lshr i64 %75, 31
  %77 = trunc i64 %76 to i32
  %78 = getelementptr inbounds i8, ptr %.04871, i64 4
  store i32 %77, ptr %.04871, align 4, !tbaa !12
  %79 = getelementptr inbounds i8, ptr %.05369, i64 4
  %80 = add i32 %.04173, -1
  %.not = icmp eq i32 %80, 0
  br i1 %.not, label %._crit_edge76.loopexit84, label %.lr.ph, !llvm.loop !24

._crit_edge76.loopexit84:                         ; preds = %._crit_edge
  %.pre = load ptr, ptr %6, align 8, !tbaa !11
  br label %._crit_edge76

._crit_edge76:                                    ; preds = %.lr.ph75.split.us.prol.loopexit, %.lr.ph75.split.us, %middle.block, %._crit_edge76.loopexit84, %4
  %81 = phi ptr [ %.pre, %._crit_edge76.loopexit84 ], [ %.pre88, %4 ], [ %.pre88, %middle.block ], [ %.pre88, %.lr.ph75.split.us ], [ %.pre88, %.lr.ph75.split.us.prol.loopexit ]
  %.not5577 = icmp eq i16 %7, 0
  br i1 %.not5577, label %._crit_edge83, label %.lr.ph82.preheader

.lr.ph82.preheader:                               ; preds = %._crit_edge76
  %82 = zext i32 %3 to i64
  %83 = getelementptr i32, ptr %81, i64 %82
  %84 = zext i16 %7 to i64
  %min.iters.check108 = icmp ult i16 %7, 8
  br i1 %min.iters.check108, label %.lr.ph82.preheader130, label %vector.ph109

vector.ph109:                                     ; preds = %.lr.ph82.preheader
  %n.vec111 = and i64 %84, 65528
  %.cast112 = trunc nuw nsw i64 %n.vec111 to i32
  %ind.end113 = sub nsw i32 %8, %.cast112
  %85 = shl nuw nsw i64 %n.vec111, 2
  %ind.end115 = getelementptr i8, ptr %81, i64 %85
  %86 = shl nuw nsw i64 %n.vec111, 2
  %ind.end117 = getelementptr i8, ptr %83, i64 %86
  br label %vector.body119

vector.body119:                                   ; preds = %vector.body119, %vector.ph109
  %index120 = phi i64 [ 0, %vector.ph109 ], [ %index.next128, %vector.body119 ]
  %offset.idx121 = shl i64 %index120, 2
  %next.gep122 = getelementptr i8, ptr %81, i64 %offset.idx121
  %offset.idx124 = shl i64 %index120, 2
  %next.gep125 = getelementptr i8, ptr %83, i64 %offset.idx124
  %87 = getelementptr i8, ptr %next.gep125, i64 16
  %wide.load = load <4 x i32>, ptr %next.gep125, align 4, !tbaa !12
  %wide.load127 = load <4 x i32>, ptr %87, align 4, !tbaa !12
  %88 = getelementptr i8, ptr %next.gep122, i64 16
  store <4 x i32> %wide.load, ptr %next.gep122, align 4, !tbaa !12
  store <4 x i32> %wide.load127, ptr %88, align 4, !tbaa !12
  %index.next128 = add nuw i64 %index120, 8
  %89 = icmp eq i64 %index.next128, %n.vec111
  br i1 %89, label %middle.block106, label %vector.body119, !llvm.loop !25

middle.block106:                                  ; preds = %vector.body119
  %cmp.n129 = icmp eq i64 %n.vec111, %84
  br i1 %cmp.n129, label %._crit_edge83, label %.lr.ph82.preheader130

.lr.ph82.preheader130:                            ; preds = %middle.block106, %.lr.ph82.preheader
  %.180.ph = phi i32 [ %8, %.lr.ph82.preheader ], [ %ind.end113, %middle.block106 ]
  %.05279.ph = phi ptr [ %81, %.lr.ph82.preheader ], [ %ind.end115, %middle.block106 ]
  %.15478.ph = phi ptr [ %83, %.lr.ph82.preheader ], [ %ind.end117, %middle.block106 ]
  br label %.lr.ph82

.lr.ph82:                                         ; preds = %.lr.ph82.preheader130, %.lr.ph82
  %.180 = phi i32 [ %93, %.lr.ph82 ], [ %.180.ph, %.lr.ph82.preheader130 ]
  %.05279 = phi ptr [ %92, %.lr.ph82 ], [ %.05279.ph, %.lr.ph82.preheader130 ]
  %.15478 = phi ptr [ %90, %.lr.ph82 ], [ %.15478.ph, %.lr.ph82.preheader130 ]
  %90 = getelementptr inbounds i8, ptr %.15478, i64 4
  %91 = load i32, ptr %.15478, align 4, !tbaa !12
  %92 = getelementptr inbounds i8, ptr %.05279, i64 4
  store i32 %91, ptr %.05279, align 4, !tbaa !12
  %93 = add nsw i32 %.180, -1
  %.not55 = icmp eq i32 %93, 0
  br i1 %.not55, label %._crit_edge83, label %.lr.ph82, !llvm.loop !26

._crit_edge83:                                    ; preds = %.lr.ph82, %middle.block106, %._crit_edge76
  ret void
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @clip_q63_to_q31(i64 noundef) local_unnamed_addr #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 = { alwaysinline 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" }

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


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