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

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

; Function Attrs: nounwind uwtable
define dso_local void @arm_fir_sparse_q7(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, 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 i16, align 2
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i8, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %28, i32 0, i32 2
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  store ptr %30, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %31, i32 0, i32 3
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  store ptr %33, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %34, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %35, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %36, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %37, i32 0, i32 5
  %39 = load ptr, ptr %38, align 8, !tbaa !15
  store ptr %39, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %40, i32 0, i32 4
  %42 = load i16, ptr %41, align 8, !tbaa !16
  %43 = zext i16 %42 to i32
  %44 = load i32, ptr %12, align 4, !tbaa !9
  %45 = add i32 %43, %44
  store i32 %45, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %21) #3
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %46, i32 0, i32 0
  %48 = load i16, ptr %47, align 8, !tbaa !17
  store i16 %48, ptr %21, align 2, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %49, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #3
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i32 1
  store ptr %51, ptr %14, align 8, !tbaa !5
  %52 = load i8, ptr %50, align 1, !tbaa !19
  store i8 %52, ptr %27, align 1, !tbaa !19
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = load i32, ptr %20, align 4, !tbaa !9
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %12, align 4, !tbaa !9
  call void @arm_circularWrite_q7(ptr noundef %53, i32 noundef %54, ptr noundef %56, i32 noundef 1, ptr noundef %57, i32 noundef 1, i32 noundef %58)
  %59 = load i16, ptr %21, align 2, !tbaa !18
  %60 = zext i16 %59 to i32
  store i32 %60, ptr %23, align 4, !tbaa !9
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %61, i32 0, i32 1
  %63 = load i16, ptr %62, align 2, !tbaa !20
  %64 = zext i16 %63 to i32
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = sub i32 %64, %65
  %67 = load ptr, ptr %19, align 8, !tbaa !5
  %68 = getelementptr inbounds i32, ptr %67, i32 1
  store ptr %68, ptr %19, align 8, !tbaa !5
  %69 = load i32, ptr %67, align 4, !tbaa !9
  %70 = sub nsw i32 %66, %69
  store i32 %70, ptr %22, align 4, !tbaa !9
  %71 = load i32, ptr %22, align 4, !tbaa !9
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %73, label %77

73:                                               ; preds = %6
  %74 = load i32, ptr %20, align 4, !tbaa !9
  %75 = load i32, ptr %22, align 4, !tbaa !9
  %76 = add nsw i32 %75, %74
  store i32 %76, ptr %22, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %73, %6
  %78 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %78, ptr %16, align 8, !tbaa !5
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = load i32, ptr %20, align 4, !tbaa !9
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = load ptr, ptr %17, align 8, !tbaa !5
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = load i32, ptr %12, align 4, !tbaa !9
  call void @arm_circularRead_q7(ptr noundef %79, i32 noundef %80, ptr noundef %22, i32 noundef 1, ptr noundef %81, ptr noundef %82, i32 noundef %83, i32 noundef 1, i32 noundef %84)
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %85, ptr %15, align 8, !tbaa !5
  %86 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %86, ptr %11, align 8, !tbaa !5
  %87 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %87, ptr %24, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %91, %77
  %89 = load i32, ptr %24, align 4, !tbaa !9
  %90 = icmp ugt i32 %89, 0
  br i1 %90, label %91, label %103

91:                                               ; preds = %88
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i32 1
  store ptr %93, ptr %15, align 8, !tbaa !5
  %94 = load i8, ptr %92, align 1, !tbaa !19
  %95 = sext i8 %94 to i32
  %96 = load i8, ptr %27, align 1, !tbaa !19
  %97 = sext i8 %96 to i32
  %98 = mul nsw i32 %95, %97
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds i32, ptr %99, i32 1
  store ptr %100, ptr %11, align 8, !tbaa !5
  store i32 %98, ptr %99, align 4, !tbaa !9
  %101 = load i32, ptr %24, align 4, !tbaa !9
  %102 = add i32 %101, -1
  store i32 %102, ptr %24, align 4, !tbaa !9
  br label %88, !llvm.loop !21

103:                                              ; preds = %88
  %104 = load ptr, ptr %14, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i32 1
  store ptr %105, ptr %14, align 8, !tbaa !5
  %106 = load i8, ptr %104, align 1, !tbaa !19
  store i8 %106, ptr %27, align 1, !tbaa !19
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %107, i32 0, i32 1
  %109 = load i16, ptr %108, align 2, !tbaa !20
  %110 = zext i16 %109 to i32
  %111 = load i32, ptr %12, align 4, !tbaa !9
  %112 = sub i32 %110, %111
  %113 = load ptr, ptr %19, align 8, !tbaa !5
  %114 = getelementptr inbounds i32, ptr %113, i32 1
  store ptr %114, ptr %19, align 8, !tbaa !5
  %115 = load i32, ptr %113, align 4, !tbaa !9
  %116 = sub nsw i32 %112, %115
  store i32 %116, ptr %22, align 4, !tbaa !9
  %117 = load i32, ptr %22, align 4, !tbaa !9
  %118 = icmp slt i32 %117, 0
  br i1 %118, label %119, label %123

119:                                              ; preds = %103
  %120 = load i32, ptr %20, align 4, !tbaa !9
  %121 = load i32, ptr %22, align 4, !tbaa !9
  %122 = add nsw i32 %121, %120
  store i32 %122, ptr %22, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %119, %103
  %124 = load i16, ptr %21, align 2, !tbaa !18
  %125 = zext i16 %124 to i32
  %126 = sub i32 %125, 2
  store i32 %126, ptr %23, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %180, %123
  %128 = load i32, ptr %23, align 4, !tbaa !9
  %129 = icmp ugt i32 %128, 0
  br i1 %129, label %130, label %183

130:                                              ; preds = %127
  %131 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %131, ptr %16, align 8, !tbaa !5
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  %133 = load i32, ptr %20, align 4, !tbaa !9
  %134 = load ptr, ptr %17, align 8, !tbaa !5
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = load i32, ptr %12, align 4, !tbaa !9
  call void @arm_circularRead_q7(ptr noundef %132, i32 noundef %133, ptr noundef %22, i32 noundef 1, ptr noundef %134, ptr noundef %135, i32 noundef %136, i32 noundef 1, i32 noundef %137)
  %138 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %138, ptr %15, align 8, !tbaa !5
  %139 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %139, ptr %11, align 8, !tbaa !5
  %140 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %140, ptr %24, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %144, %130
  %142 = load i32, ptr %24, align 4, !tbaa !9
  %143 = icmp ugt i32 %142, 0
  br i1 %143, label %144, label %160

144:                                              ; preds = %141
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = load ptr, ptr %15, align 8, !tbaa !5
  %148 = getelementptr inbounds i8, ptr %147, i32 1
  store ptr %148, ptr %15, align 8, !tbaa !5
  %149 = load i8, ptr %147, align 1, !tbaa !19
  %150 = sext i8 %149 to i32
  %151 = load i8, ptr %27, align 1, !tbaa !19
  %152 = sext i8 %151 to i32
  %153 = mul nsw i32 %150, %152
  %154 = add nsw i32 %146, %153
  store i32 %154, ptr %26, align 4, !tbaa !9
  %155 = load i32, ptr %26, align 4, !tbaa !9
  %156 = load ptr, ptr %11, align 8, !tbaa !5
  %157 = getelementptr inbounds i32, ptr %156, i32 1
  store ptr %157, ptr %11, align 8, !tbaa !5
  store i32 %155, ptr %156, align 4, !tbaa !9
  %158 = load i32, ptr %24, align 4, !tbaa !9
  %159 = add i32 %158, -1
  store i32 %159, ptr %24, align 4, !tbaa !9
  br label %141, !llvm.loop !23

160:                                              ; preds = %141
  %161 = load ptr, ptr %14, align 8, !tbaa !5
  %162 = getelementptr inbounds i8, ptr %161, i32 1
  store ptr %162, ptr %14, align 8, !tbaa !5
  %163 = load i8, ptr %161, align 1, !tbaa !19
  store i8 %163, ptr %27, align 1, !tbaa !19
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.arm_fir_sparse_instance_q7, ptr %164, i32 0, i32 1
  %166 = load i16, ptr %165, align 2, !tbaa !20
  %167 = zext i16 %166 to i32
  %168 = load i32, ptr %12, align 4, !tbaa !9
  %169 = sub i32 %167, %168
  %170 = load ptr, ptr %19, align 8, !tbaa !5
  %171 = getelementptr inbounds i32, ptr %170, i32 1
  store ptr %171, ptr %19, align 8, !tbaa !5
  %172 = load i32, ptr %170, align 4, !tbaa !9
  %173 = sub nsw i32 %169, %172
  store i32 %173, ptr %22, align 4, !tbaa !9
  %174 = load i32, ptr %22, align 4, !tbaa !9
  %175 = icmp slt i32 %174, 0
  br i1 %175, label %176, label %180

176:                                              ; preds = %160
  %177 = load i32, ptr %20, align 4, !tbaa !9
  %178 = load i32, ptr %22, align 4, !tbaa !9
  %179 = add nsw i32 %178, %177
  store i32 %179, ptr %22, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %176, %160
  %181 = load i32, ptr %23, align 4, !tbaa !9
  %182 = add i32 %181, -1
  store i32 %182, ptr %23, align 4, !tbaa !9
  br label %127, !llvm.loop !24

183:                                              ; preds = %127
  %184 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %184, ptr %16, align 8, !tbaa !5
  %185 = load ptr, ptr %16, align 8, !tbaa !5
  %186 = load i32, ptr %20, align 4, !tbaa !9
  %187 = load ptr, ptr %17, align 8, !tbaa !5
  %188 = load ptr, ptr %17, align 8, !tbaa !5
  %189 = load i32, ptr %12, align 4, !tbaa !9
  %190 = load i32, ptr %12, align 4, !tbaa !9
  call void @arm_circularRead_q7(ptr noundef %185, i32 noundef %186, ptr noundef %22, i32 noundef 1, ptr noundef %187, ptr noundef %188, i32 noundef %189, i32 noundef 1, i32 noundef %190)
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %191, ptr %15, align 8, !tbaa !5
  %192 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %192, ptr %11, align 8, !tbaa !5
  %193 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %193, ptr %24, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %197, %183
  %195 = load i32, ptr %24, align 4, !tbaa !9
  %196 = icmp ugt i32 %195, 0
  br i1 %196, label %197, label %213

197:                                              ; preds = %194
  %198 = load ptr, ptr %11, align 8, !tbaa !5
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = load ptr, ptr %15, align 8, !tbaa !5
  %201 = getelementptr inbounds i8, ptr %200, i32 1
  store ptr %201, ptr %15, align 8, !tbaa !5
  %202 = load i8, ptr %200, align 1, !tbaa !19
  %203 = sext i8 %202 to i32
  %204 = load i8, ptr %27, align 1, !tbaa !19
  %205 = sext i8 %204 to i32
  %206 = mul nsw i32 %203, %205
  %207 = add nsw i32 %199, %206
  store i32 %207, ptr %26, align 4, !tbaa !9
  %208 = load i32, ptr %26, align 4, !tbaa !9
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = getelementptr inbounds i32, ptr %209, i32 1
  store ptr %210, ptr %11, align 8, !tbaa !5
  store i32 %208, ptr %209, align 4, !tbaa !9
  %211 = load i32, ptr %24, align 4, !tbaa !9
  %212 = add i32 %211, -1
  store i32 %212, ptr %24, align 4, !tbaa !9
  br label %194, !llvm.loop !25

213:                                              ; preds = %194
  %214 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %214, ptr %24, align 4, !tbaa !9
  br label %215

215:                                              ; preds = %218, %213
  %216 = load i32, ptr %24, align 4, !tbaa !9
  %217 = icmp ugt i32 %216, 0
  br i1 %217, label %218, label %229

218:                                              ; preds = %215
  %219 = load ptr, ptr %25, align 8, !tbaa !5
  %220 = getelementptr inbounds i32, ptr %219, i32 1
  store ptr %220, ptr %25, align 8, !tbaa !5
  %221 = load i32, ptr %219, align 4, !tbaa !9
  %222 = ashr i32 %221, 7
  %223 = call i32 @__SSAT(i32 noundef %222, i32 noundef 8)
  %224 = trunc i32 %223 to i8
  %225 = load ptr, ptr %18, align 8, !tbaa !5
  %226 = getelementptr inbounds i8, ptr %225, i32 1
  store ptr %226, ptr %18, align 8, !tbaa !5
  store i8 %224, ptr %225, align 1, !tbaa !19
  %227 = load i32, ptr %24, align 4, !tbaa !9
  %228 = add i32 %227, -1
  store i32 %228, ptr %24, align 4, !tbaa !9
  br label %215, !llvm.loop !26

229:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 2, 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 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #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 void @arm_circularWrite_q7(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @arm_circularRead_q7(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @__SSAT(i32 noundef, i32 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, !13, i64 2, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !6, i64 16}
!15 = !{!12, !6, i64 32}
!16 = !{!12, !13, i64 24}
!17 = !{!12, !13, i64 0}
!18 = !{!13, !13, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!12, !13, i64 2}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !22}


; 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_fir_sparse_q7(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2, ptr noundef %3, ptr nocapture noundef %4, i32 noundef %5) local_unnamed_addr #0 {
  %7 = alloca i32, align 4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = load ptr, ptr %12, align 8, !tbaa !12
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load i16, ptr %14, align 8, !tbaa !13
  %16 = zext i16 %15 to i32
  %17 = add i32 %16, %5
  %18 = load i16, ptr %0, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %19 = getelementptr inbounds i8, ptr %11, i64 1
  %20 = load i8, ptr %11, align 1, !tbaa !15
  %21 = getelementptr inbounds i8, ptr %0, i64 2
  tail call void @arm_circularWrite_q7(ptr noundef %9, i32 noundef %17, ptr noundef nonnull %21, i32 noundef 1, ptr noundef %1, i32 noundef 1, i32 noundef %5)
  %22 = load i16, ptr %21, align 2, !tbaa !16
  %23 = zext i16 %22 to i32
  %24 = getelementptr inbounds i8, ptr %13, i64 4
  %25 = load i32, ptr %13, align 4, !tbaa !17
  %26 = add i32 %25, %5
  %27 = sub i32 %23, %26
  %28 = icmp slt i32 %27, 0
  %29 = select i1 %28, i32 %17, i32 0
  %spec.select = add nsw i32 %29, %27
  store i32 %spec.select, ptr %7, align 4, !tbaa !17
  call void @arm_circularRead_q7(ptr noundef %9, i32 noundef %17, ptr noundef nonnull %7, i32 noundef 1, ptr noundef %3, ptr noundef %3, i32 noundef %5, i32 noundef 1, i32 noundef %5)
  %.not116 = icmp eq i32 %5, 0
  br i1 %.not116, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6
  %30 = sext i8 %20 to i32
  %31 = zext i32 %5 to i64
  %min.iters.check = icmp ult i32 %5, 16
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph
  %32 = add i32 %5, -1
  %33 = zext i32 %32 to i64
  %34 = shl nuw nsw i64 %33, 2
  %35 = getelementptr i8, ptr %4, i64 %34
  %scevgep = getelementptr i8, ptr %35, i64 4
  %36 = zext i32 %5 to i64
  %scevgep153 = getelementptr i8, ptr %3, i64 %36
  %bound0 = icmp ugt ptr %scevgep153, %4
  %bound1 = icmp ugt ptr %scevgep, %3
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %31, 4294967288
  %.cast = trunc nuw i64 %n.vec to i32
  %ind.end = sub i32 %5, %.cast
  %37 = shl nuw nsw i64 %n.vec, 2
  %ind.end154 = getelementptr i8, ptr %4, i64 %37
  %ind.end156 = getelementptr i8, ptr %3, i64 %n.vec
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %30, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  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 %4, i64 %offset.idx
  %next.gep159 = getelementptr i8, ptr %3, i64 %index
  %38 = getelementptr i8, ptr %next.gep159, i64 4
  %wide.load = load <4 x i8>, ptr %next.gep159, align 1, !tbaa !15, !alias.scope !19
  %wide.load161 = load <4 x i8>, ptr %38, align 1, !tbaa !15, !alias.scope !19
  %39 = sext <4 x i8> %wide.load to <4 x i32>
  %40 = sext <4 x i8> %wide.load161 to <4 x i32>
  %41 = mul nsw <4 x i32> %broadcast.splat, %39
  %42 = mul nsw <4 x i32> %broadcast.splat, %40
  %43 = getelementptr i8, ptr %next.gep, i64 16
  store <4 x i32> %41, ptr %next.gep, align 4, !tbaa !17, !alias.scope !22, !noalias !19
  store <4 x i32> %42, ptr %43, align 4, !tbaa !17, !alias.scope !22, !noalias !19
  %index.next = add nuw i64 %index, 8
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !24

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %31
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph
  %.088119.ph = phi i32 [ %5, %vector.memcheck ], [ %5, %.lr.ph ], [ %ind.end, %middle.block ]
  %.090118.ph = phi ptr [ %4, %vector.memcheck ], [ %4, %.lr.ph ], [ %ind.end154, %middle.block ]
  %.096117.ph = phi ptr [ %3, %vector.memcheck ], [ %3, %.lr.ph ], [ %ind.end156, %middle.block ]
  %45 = add i32 %.088119.ph, -1
  %xtraiter = and i32 %.088119.ph, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %.088119.prol = phi i32 [ %51, %scalar.ph.prol ], [ %.088119.ph, %scalar.ph.preheader ]
  %.090118.prol = phi ptr [ %50, %scalar.ph.prol ], [ %.090118.ph, %scalar.ph.preheader ]
  %.096117.prol = phi ptr [ %46, %scalar.ph.prol ], [ %.096117.ph, %scalar.ph.preheader ]
  %prol.iter = phi i32 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %46 = getelementptr inbounds i8, ptr %.096117.prol, i64 1
  %47 = load i8, ptr %.096117.prol, align 1, !tbaa !15
  %48 = sext i8 %47 to i32
  %49 = mul nsw i32 %48, %30
  %50 = getelementptr inbounds i8, ptr %.090118.prol, i64 4
  store i32 %49, ptr %.090118.prol, align 4, !tbaa !17
  %51 = add i32 %.088119.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 %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !28

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.088119.unr = phi i32 [ %.088119.ph, %scalar.ph.preheader ], [ %51, %scalar.ph.prol ]
  %.090118.unr = phi ptr [ %.090118.ph, %scalar.ph.preheader ], [ %50, %scalar.ph.prol ]
  %.096117.unr = phi ptr [ %.096117.ph, %scalar.ph.preheader ], [ %46, %scalar.ph.prol ]
  %52 = icmp ult i32 %45, 3
  br i1 %52, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.088119 = phi i32 [ %73, %scalar.ph ], [ %.088119.unr, %scalar.ph.prol.loopexit ]
  %.090118 = phi ptr [ %72, %scalar.ph ], [ %.090118.unr, %scalar.ph.prol.loopexit ]
  %.096117 = phi ptr [ %68, %scalar.ph ], [ %.096117.unr, %scalar.ph.prol.loopexit ]
  %53 = getelementptr inbounds i8, ptr %.096117, i64 1
  %54 = load i8, ptr %.096117, align 1, !tbaa !15
  %55 = sext i8 %54 to i32
  %56 = mul nsw i32 %55, %30
  %57 = getelementptr inbounds i8, ptr %.090118, i64 4
  store i32 %56, ptr %.090118, align 4, !tbaa !17
  %58 = getelementptr inbounds i8, ptr %.096117, i64 2
  %59 = load i8, ptr %53, align 1, !tbaa !15
  %60 = sext i8 %59 to i32
  %61 = mul nsw i32 %60, %30
  %62 = getelementptr inbounds i8, ptr %.090118, i64 8
  store i32 %61, ptr %57, align 4, !tbaa !17
  %63 = getelementptr inbounds i8, ptr %.096117, i64 3
  %64 = load i8, ptr %58, align 1, !tbaa !15
  %65 = sext i8 %64 to i32
  %66 = mul nsw i32 %65, %30
  %67 = getelementptr inbounds i8, ptr %.090118, i64 12
  store i32 %66, ptr %62, align 4, !tbaa !17
  %68 = getelementptr inbounds i8, ptr %.096117, i64 4
  %69 = load i8, ptr %63, align 1, !tbaa !15
  %70 = sext i8 %69 to i32
  %71 = mul nsw i32 %70, %30
  %72 = getelementptr inbounds i8, ptr %.090118, i64 16
  store i32 %71, ptr %67, align 4, !tbaa !17
  %73 = add i32 %.088119, -4
  %.not.3 = icmp eq i32 %73, 0
  br i1 %.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !30

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %6
  %74 = load i8, ptr %19, align 1, !tbaa !15
  %75 = load i16, ptr %21, align 2, !tbaa !16
  %76 = zext i16 %75 to i32
  %77 = load i32, ptr %24, align 4, !tbaa !17
  %78 = add i32 %77, %5
  %79 = sub i32 %76, %78
  %80 = icmp slt i32 %79, 0
  %81 = select i1 %80, i32 %17, i32 0
  %spec.select108 = add nsw i32 %81, %79
  store i32 %spec.select108, ptr %7, align 4, !tbaa !17
  %82 = zext i16 %18 to i32
  %83 = add nsw i32 %82, -2
  %.not103127 = icmp eq i32 %83, 0
  br i1 %.not103127, label %._crit_edge134, label %.lr.ph133

.lr.ph133:                                        ; preds = %._crit_edge
  %84 = getelementptr inbounds i8, ptr %13, i64 8
  %85 = getelementptr inbounds i8, ptr %11, i64 2
  br i1 %.not116, label %.lr.ph133.split.us, label %.lr.ph125.preheader

.lr.ph125.preheader:                              ; preds = %.lr.ph133
  %86 = add i32 %5, -1
  %87 = zext i32 %86 to i64
  %88 = shl nuw nsw i64 %87, 2
  %89 = getelementptr i8, ptr %4, i64 %88
  %scevgep163 = getelementptr i8, ptr %89, i64 4
  %90 = getelementptr i8, ptr %3, i64 %87
  %scevgep164 = getelementptr i8, ptr %90, i64 1
  %91 = zext i32 %5 to i64
  %min.iters.check170 = icmp ult i32 %5, 8
  %bound0165 = icmp ugt ptr %scevgep164, %4
  %bound1166 = icmp ugt ptr %scevgep163, %3
  %found.conflict167 = and i1 %bound0165, %bound1166
  %n.vec173 = and i64 %91, 4294967288
  %.cast174 = trunc nuw i64 %n.vec173 to i32
  %ind.end175 = sub i32 %5, %.cast174
  %92 = shl nuw nsw i64 %n.vec173, 2
  %ind.end177 = getelementptr i8, ptr %4, i64 %92
  %ind.end179 = getelementptr i8, ptr %3, i64 %n.vec173
  %cmp.n195 = icmp eq i64 %n.vec173, %91
  br label %.lr.ph125

.lr.ph133.split.us:                               ; preds = %.lr.ph133, %.lr.ph133.split.us
  %.089130.us = phi i32 [ %102, %.lr.ph133.split.us ], [ %83, %.lr.ph133 ]
  %.093129.us = phi ptr [ %93, %.lr.ph133.split.us ], [ %85, %.lr.ph133 ]
  %.094128.us = phi ptr [ %97, %.lr.ph133.split.us ], [ %84, %.lr.ph133 ]
  call void @arm_circularRead_q7(ptr noundef %9, i32 noundef %17, ptr noundef nonnull %7, i32 noundef 1, ptr noundef %3, ptr noundef %3, i32 noundef 0, i32 noundef 1, i32 noundef 0)
  %93 = getelementptr inbounds i8, ptr %.093129.us, i64 1
  %94 = load i8, ptr %.093129.us, align 1, !tbaa !15
  %95 = load i16, ptr %21, align 2, !tbaa !16
  %96 = zext i16 %95 to i32
  %97 = getelementptr inbounds i8, ptr %.094128.us, i64 4
  %98 = load i32, ptr %.094128.us, align 4, !tbaa !17
  %99 = sub i32 %96, %98
  %100 = icmp slt i32 %99, 0
  %101 = select i1 %100, i32 %17, i32 0
  %spec.select109.us = add nsw i32 %101, %99
  store i32 %spec.select109.us, ptr %7, align 4, !tbaa !17
  %102 = add i32 %.089130.us, -1
  %.not103.us = icmp eq i32 %102, 0
  br i1 %.not103.us, label %._crit_edge134, label %.lr.ph133.split.us, !llvm.loop !31

.lr.ph125:                                        ; preds = %.lr.ph125.preheader, %._crit_edge126
  %.0131 = phi i8 [ %153, %._crit_edge126 ], [ %74, %.lr.ph125.preheader ]
  %.089130 = phi i32 [ %162, %._crit_edge126 ], [ %83, %.lr.ph125.preheader ]
  %.093129 = phi ptr [ %152, %._crit_edge126 ], [ %85, %.lr.ph125.preheader ]
  %.094128 = phi ptr [ %156, %._crit_edge126 ], [ %84, %.lr.ph125.preheader ]
  call void @arm_circularRead_q7(ptr noundef %9, i32 noundef %17, ptr noundef nonnull %7, i32 noundef 1, ptr noundef %3, ptr noundef %3, i32 noundef %5, i32 noundef 1, i32 noundef %5)
  %103 = sext i8 %.0131 to i32
  %brmerge = select i1 %min.iters.check170, i1 true, i1 %found.conflict167
  br i1 %brmerge, label %scalar.ph169.preheader, label %vector.ph171

vector.ph171:                                     ; preds = %.lr.ph125
  %broadcast.splatinsert192 = insertelement <4 x i32> poison, i32 %103, i64 0
  %broadcast.splat193 = shufflevector <4 x i32> %broadcast.splatinsert192, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body181

vector.body181:                                   ; preds = %vector.body181, %vector.ph171
  %index182 = phi i64 [ 0, %vector.ph171 ], [ %index.next194, %vector.body181 ]
  %offset.idx183 = shl i64 %index182, 2
  %next.gep184 = getelementptr i8, ptr %4, i64 %offset.idx183
  %next.gep186 = getelementptr i8, ptr %3, i64 %index182
  %104 = getelementptr i8, ptr %next.gep184, i64 16
  %wide.load188 = load <4 x i32>, ptr %next.gep184, align 4, !tbaa !17, !alias.scope !32, !noalias !35
  %wide.load189 = load <4 x i32>, ptr %104, align 4, !tbaa !17, !alias.scope !32, !noalias !35
  %105 = getelementptr i8, ptr %next.gep186, i64 4
  %wide.load190 = load <4 x i8>, ptr %next.gep186, align 1, !tbaa !15, !alias.scope !35
  %wide.load191 = load <4 x i8>, ptr %105, align 1, !tbaa !15, !alias.scope !35
  %106 = sext <4 x i8> %wide.load190 to <4 x i32>
  %107 = sext <4 x i8> %wide.load191 to <4 x i32>
  %108 = mul nsw <4 x i32> %broadcast.splat193, %106
  %109 = mul nsw <4 x i32> %broadcast.splat193, %107
  %110 = add nsw <4 x i32> %108, %wide.load188
  %111 = add nsw <4 x i32> %109, %wide.load189
  store <4 x i32> %110, ptr %next.gep184, align 4, !tbaa !17, !alias.scope !32, !noalias !35
  store <4 x i32> %111, ptr %104, align 4, !tbaa !17, !alias.scope !32, !noalias !35
  %index.next194 = add nuw i64 %index182, 8
  %112 = icmp eq i64 %index.next194, %n.vec173
  br i1 %112, label %middle.block168, label %vector.body181, !llvm.loop !37

middle.block168:                                  ; preds = %vector.body181
  br i1 %cmp.n195, label %._crit_edge126, label %scalar.ph169.preheader

scalar.ph169.preheader:                           ; preds = %.lr.ph125, %middle.block168
  %.1123.ph = phi i32 [ %5, %.lr.ph125 ], [ %ind.end175, %middle.block168 ]
  %.191122.ph = phi ptr [ %4, %.lr.ph125 ], [ %ind.end177, %middle.block168 ]
  %.197121.ph = phi ptr [ %3, %.lr.ph125 ], [ %ind.end179, %middle.block168 ]
  %113 = add i32 %.1123.ph, -1
  %xtraiter232 = and i32 %.1123.ph, 3
  %lcmp.mod233.not = icmp eq i32 %xtraiter232, 0
  br i1 %lcmp.mod233.not, label %scalar.ph169.prol.loopexit, label %scalar.ph169.prol

scalar.ph169.prol:                                ; preds = %scalar.ph169.preheader, %scalar.ph169.prol
  %.1123.prol = phi i32 [ %121, %scalar.ph169.prol ], [ %.1123.ph, %scalar.ph169.preheader ]
  %.191122.prol = phi ptr [ %120, %scalar.ph169.prol ], [ %.191122.ph, %scalar.ph169.preheader ]
  %.197121.prol = phi ptr [ %115, %scalar.ph169.prol ], [ %.197121.ph, %scalar.ph169.preheader ]
  %prol.iter234 = phi i32 [ %prol.iter234.next, %scalar.ph169.prol ], [ 0, %scalar.ph169.preheader ]
  %114 = load i32, ptr %.191122.prol, align 4, !tbaa !17
  %115 = getelementptr inbounds i8, ptr %.197121.prol, i64 1
  %116 = load i8, ptr %.197121.prol, align 1, !tbaa !15
  %117 = sext i8 %116 to i32
  %118 = mul nsw i32 %117, %103
  %119 = add nsw i32 %118, %114
  %120 = getelementptr inbounds i8, ptr %.191122.prol, i64 4
  store i32 %119, ptr %.191122.prol, align 4, !tbaa !17
  %121 = add i32 %.1123.prol, -1
  %prol.iter234.next = add i32 %prol.iter234, 1
  %prol.iter234.cmp.not = icmp eq i32 %prol.iter234.next, %xtraiter232
  br i1 %prol.iter234.cmp.not, label %scalar.ph169.prol.loopexit, label %scalar.ph169.prol, !llvm.loop !38

scalar.ph169.prol.loopexit:                       ; preds = %scalar.ph169.prol, %scalar.ph169.preheader
  %.1123.unr = phi i32 [ %.1123.ph, %scalar.ph169.preheader ], [ %121, %scalar.ph169.prol ]
  %.191122.unr = phi ptr [ %.191122.ph, %scalar.ph169.preheader ], [ %120, %scalar.ph169.prol ]
  %.197121.unr = phi ptr [ %.197121.ph, %scalar.ph169.preheader ], [ %115, %scalar.ph169.prol ]
  %122 = icmp ult i32 %113, 3
  br i1 %122, label %._crit_edge126, label %scalar.ph169

scalar.ph169:                                     ; preds = %scalar.ph169.prol.loopexit, %scalar.ph169
  %.1123 = phi i32 [ %151, %scalar.ph169 ], [ %.1123.unr, %scalar.ph169.prol.loopexit ]
  %.191122 = phi ptr [ %150, %scalar.ph169 ], [ %.191122.unr, %scalar.ph169.prol.loopexit ]
  %.197121 = phi ptr [ %145, %scalar.ph169 ], [ %.197121.unr, %scalar.ph169.prol.loopexit ]
  %123 = load i32, ptr %.191122, align 4, !tbaa !17
  %124 = getelementptr inbounds i8, ptr %.197121, i64 1
  %125 = load i8, ptr %.197121, align 1, !tbaa !15
  %126 = sext i8 %125 to i32
  %127 = mul nsw i32 %126, %103
  %128 = add nsw i32 %127, %123
  %129 = getelementptr inbounds i8, ptr %.191122, i64 4
  store i32 %128, ptr %.191122, align 4, !tbaa !17
  %130 = load i32, ptr %129, align 4, !tbaa !17
  %131 = getelementptr inbounds i8, ptr %.197121, i64 2
  %132 = load i8, ptr %124, align 1, !tbaa !15
  %133 = sext i8 %132 to i32
  %134 = mul nsw i32 %133, %103
  %135 = add nsw i32 %134, %130
  %136 = getelementptr inbounds i8, ptr %.191122, i64 8
  store i32 %135, ptr %129, align 4, !tbaa !17
  %137 = load i32, ptr %136, align 4, !tbaa !17
  %138 = getelementptr inbounds i8, ptr %.197121, i64 3
  %139 = load i8, ptr %131, align 1, !tbaa !15
  %140 = sext i8 %139 to i32
  %141 = mul nsw i32 %140, %103
  %142 = add nsw i32 %141, %137
  %143 = getelementptr inbounds i8, ptr %.191122, i64 12
  store i32 %142, ptr %136, align 4, !tbaa !17
  %144 = load i32, ptr %143, align 4, !tbaa !17
  %145 = getelementptr inbounds i8, ptr %.197121, i64 4
  %146 = load i8, ptr %138, align 1, !tbaa !15
  %147 = sext i8 %146 to i32
  %148 = mul nsw i32 %147, %103
  %149 = add nsw i32 %148, %144
  %150 = getelementptr inbounds i8, ptr %.191122, i64 16
  store i32 %149, ptr %143, align 4, !tbaa !17
  %151 = add i32 %.1123, -4
  %.not106.3 = icmp eq i32 %151, 0
  br i1 %.not106.3, label %._crit_edge126, label %scalar.ph169, !llvm.loop !39

._crit_edge126:                                   ; preds = %scalar.ph169.prol.loopexit, %scalar.ph169, %middle.block168
  %152 = getelementptr inbounds i8, ptr %.093129, i64 1
  %153 = load i8, ptr %.093129, align 1, !tbaa !15
  %154 = load i16, ptr %21, align 2, !tbaa !16
  %155 = zext i16 %154 to i32
  %156 = getelementptr inbounds i8, ptr %.094128, i64 4
  %157 = load i32, ptr %.094128, align 4, !tbaa !17
  %158 = add i32 %157, %5
  %159 = sub i32 %155, %158
  %160 = icmp slt i32 %159, 0
  %161 = select i1 %160, i32 %17, i32 0
  %spec.select109 = add nsw i32 %161, %159
  store i32 %spec.select109, ptr %7, align 4, !tbaa !17
  %162 = add i32 %.089130, -1
  %.not103 = icmp eq i32 %162, 0
  br i1 %.not103, label %._crit_edge134, label %.lr.ph125, !llvm.loop !31

._crit_edge134:                                   ; preds = %._crit_edge126, %.lr.ph133.split.us, %._crit_edge
  %.0.lcssa = phi i8 [ %74, %._crit_edge ], [ %94, %.lr.ph133.split.us ], [ %153, %._crit_edge126 ]
  call void @arm_circularRead_q7(ptr noundef %9, i32 noundef %17, ptr noundef nonnull %7, i32 noundef 1, ptr noundef %3, ptr noundef %3, i32 noundef %5, i32 noundef 1, i32 noundef %5)
  br i1 %.not116, label %._crit_edge146, label %.lr.ph140

.lr.ph140:                                        ; preds = %._crit_edge134
  %163 = sext i8 %.0.lcssa to i32
  %164 = zext i32 %5 to i64
  %min.iters.check204 = icmp ult i32 %5, 12
  br i1 %min.iters.check204, label %scalar.ph203.preheader, label %vector.memcheck196

vector.memcheck196:                               ; preds = %.lr.ph140
  %165 = add i32 %5, -1
  %166 = zext i32 %165 to i64
  %167 = shl nuw nsw i64 %166, 2
  %168 = getelementptr i8, ptr %4, i64 %167
  %scevgep197 = getelementptr i8, ptr %168, i64 4
  %169 = zext i32 %5 to i64
  %scevgep198 = getelementptr i8, ptr %3, i64 %169
  %bound0199 = icmp ugt ptr %scevgep198, %4
  %bound1200 = icmp ugt ptr %scevgep197, %3
  %found.conflict201 = and i1 %bound0199, %bound1200
  br i1 %found.conflict201, label %scalar.ph203.preheader, label %vector.ph205

vector.ph205:                                     ; preds = %vector.memcheck196
  %n.vec207 = and i64 %164, 4294967288
  %.cast208 = trunc nuw i64 %n.vec207 to i32
  %ind.end209 = sub i32 %5, %.cast208
  %170 = shl nuw nsw i64 %n.vec207, 2
  %ind.end211 = getelementptr i8, ptr %4, i64 %170
  %ind.end213 = getelementptr i8, ptr %3, i64 %n.vec207
  %broadcast.splatinsert226 = insertelement <4 x i32> poison, i32 %163, i64 0
  %broadcast.splat227 = shufflevector <4 x i32> %broadcast.splatinsert226, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body215

vector.body215:                                   ; preds = %vector.body215, %vector.ph205
  %index216 = phi i64 [ 0, %vector.ph205 ], [ %index.next228, %vector.body215 ]
  %offset.idx217 = shl i64 %index216, 2
  %next.gep218 = getelementptr i8, ptr %4, i64 %offset.idx217
  %next.gep220 = getelementptr i8, ptr %3, i64 %index216
  %171 = getelementptr i8, ptr %next.gep218, i64 16
  %wide.load222 = load <4 x i32>, ptr %next.gep218, align 4, !tbaa !17, !alias.scope !40, !noalias !43
  %wide.load223 = load <4 x i32>, ptr %171, align 4, !tbaa !17, !alias.scope !40, !noalias !43
  %172 = getelementptr i8, ptr %next.gep220, i64 4
  %wide.load224 = load <4 x i8>, ptr %next.gep220, align 1, !tbaa !15, !alias.scope !43
  %wide.load225 = load <4 x i8>, ptr %172, align 1, !tbaa !15, !alias.scope !43
  %173 = sext <4 x i8> %wide.load224 to <4 x i32>
  %174 = sext <4 x i8> %wide.load225 to <4 x i32>
  %175 = mul nsw <4 x i32> %broadcast.splat227, %173
  %176 = mul nsw <4 x i32> %broadcast.splat227, %174
  %177 = add nsw <4 x i32> %175, %wide.load222
  %178 = add nsw <4 x i32> %176, %wide.load223
  store <4 x i32> %177, ptr %next.gep218, align 4, !tbaa !17, !alias.scope !40, !noalias !43
  store <4 x i32> %178, ptr %171, align 4, !tbaa !17, !alias.scope !40, !noalias !43
  %index.next228 = add nuw i64 %index216, 8
  %179 = icmp eq i64 %index.next228, %n.vec207
  br i1 %179, label %middle.block202, label %vector.body215, !llvm.loop !45

middle.block202:                                  ; preds = %vector.body215
  %cmp.n229 = icmp eq i64 %n.vec207, %164
  br i1 %cmp.n229, label %.lr.ph145.preheader, label %scalar.ph203.preheader

scalar.ph203.preheader:                           ; preds = %middle.block202, %vector.memcheck196, %.lr.ph140
  %.2138.ph = phi i32 [ %5, %vector.memcheck196 ], [ %5, %.lr.ph140 ], [ %ind.end209, %middle.block202 ]
  %.292137.ph = phi ptr [ %4, %vector.memcheck196 ], [ %4, %.lr.ph140 ], [ %ind.end211, %middle.block202 ]
  %.298136.ph = phi ptr [ %3, %vector.memcheck196 ], [ %3, %.lr.ph140 ], [ %ind.end213, %middle.block202 ]
  %180 = add i32 %.2138.ph, -1
  %xtraiter235 = and i32 %.2138.ph, 3
  %lcmp.mod236.not = icmp eq i32 %xtraiter235, 0
  br i1 %lcmp.mod236.not, label %scalar.ph203.prol.loopexit, label %scalar.ph203.prol

scalar.ph203.prol:                                ; preds = %scalar.ph203.preheader, %scalar.ph203.prol
  %.2138.prol = phi i32 [ %188, %scalar.ph203.prol ], [ %.2138.ph, %scalar.ph203.preheader ]
  %.292137.prol = phi ptr [ %187, %scalar.ph203.prol ], [ %.292137.ph, %scalar.ph203.preheader ]
  %.298136.prol = phi ptr [ %182, %scalar.ph203.prol ], [ %.298136.ph, %scalar.ph203.preheader ]
  %prol.iter237 = phi i32 [ %prol.iter237.next, %scalar.ph203.prol ], [ 0, %scalar.ph203.preheader ]
  %181 = load i32, ptr %.292137.prol, align 4, !tbaa !17
  %182 = getelementptr inbounds i8, ptr %.298136.prol, i64 1
  %183 = load i8, ptr %.298136.prol, align 1, !tbaa !15
  %184 = sext i8 %183 to i32
  %185 = mul nsw i32 %184, %163
  %186 = add nsw i32 %185, %181
  %187 = getelementptr inbounds i8, ptr %.292137.prol, i64 4
  store i32 %186, ptr %.292137.prol, align 4, !tbaa !17
  %188 = add i32 %.2138.prol, -1
  %prol.iter237.next = add i32 %prol.iter237, 1
  %prol.iter237.cmp.not = icmp eq i32 %prol.iter237.next, %xtraiter235
  br i1 %prol.iter237.cmp.not, label %scalar.ph203.prol.loopexit, label %scalar.ph203.prol, !llvm.loop !46

scalar.ph203.prol.loopexit:                       ; preds = %scalar.ph203.prol, %scalar.ph203.preheader
  %.2138.unr = phi i32 [ %.2138.ph, %scalar.ph203.preheader ], [ %188, %scalar.ph203.prol ]
  %.292137.unr = phi ptr [ %.292137.ph, %scalar.ph203.preheader ], [ %187, %scalar.ph203.prol ]
  %.298136.unr = phi ptr [ %.298136.ph, %scalar.ph203.preheader ], [ %182, %scalar.ph203.prol ]
  %189 = icmp ult i32 %180, 3
  br i1 %189, label %.lr.ph145.preheader, label %scalar.ph203

scalar.ph203:                                     ; preds = %scalar.ph203.prol.loopexit, %scalar.ph203
  %.2138 = phi i32 [ %218, %scalar.ph203 ], [ %.2138.unr, %scalar.ph203.prol.loopexit ]
  %.292137 = phi ptr [ %217, %scalar.ph203 ], [ %.292137.unr, %scalar.ph203.prol.loopexit ]
  %.298136 = phi ptr [ %212, %scalar.ph203 ], [ %.298136.unr, %scalar.ph203.prol.loopexit ]
  %190 = load i32, ptr %.292137, align 4, !tbaa !17
  %191 = getelementptr inbounds i8, ptr %.298136, i64 1
  %192 = load i8, ptr %.298136, align 1, !tbaa !15
  %193 = sext i8 %192 to i32
  %194 = mul nsw i32 %193, %163
  %195 = add nsw i32 %194, %190
  %196 = getelementptr inbounds i8, ptr %.292137, i64 4
  store i32 %195, ptr %.292137, align 4, !tbaa !17
  %197 = load i32, ptr %196, align 4, !tbaa !17
  %198 = getelementptr inbounds i8, ptr %.298136, i64 2
  %199 = load i8, ptr %191, align 1, !tbaa !15
  %200 = sext i8 %199 to i32
  %201 = mul nsw i32 %200, %163
  %202 = add nsw i32 %201, %197
  %203 = getelementptr inbounds i8, ptr %.292137, i64 8
  store i32 %202, ptr %196, align 4, !tbaa !17
  %204 = load i32, ptr %203, align 4, !tbaa !17
  %205 = getelementptr inbounds i8, ptr %.298136, i64 3
  %206 = load i8, ptr %198, align 1, !tbaa !15
  %207 = sext i8 %206 to i32
  %208 = mul nsw i32 %207, %163
  %209 = add nsw i32 %208, %204
  %210 = getelementptr inbounds i8, ptr %.292137, i64 12
  store i32 %209, ptr %203, align 4, !tbaa !17
  %211 = load i32, ptr %210, align 4, !tbaa !17
  %212 = getelementptr inbounds i8, ptr %.298136, i64 4
  %213 = load i8, ptr %205, align 1, !tbaa !15
  %214 = sext i8 %213 to i32
  %215 = mul nsw i32 %214, %163
  %216 = add nsw i32 %215, %211
  %217 = getelementptr inbounds i8, ptr %.292137, i64 16
  store i32 %216, ptr %210, align 4, !tbaa !17
  %218 = add i32 %.2138, -4
  %.not104.3 = icmp eq i32 %218, 0
  br i1 %.not104.3, label %.lr.ph145.preheader, label %scalar.ph203, !llvm.loop !47

.lr.ph145.preheader:                              ; preds = %scalar.ph203.prol.loopexit, %scalar.ph203, %middle.block202
  br label %.lr.ph145

.lr.ph145:                                        ; preds = %.lr.ph145.preheader, %.lr.ph145
  %.087144 = phi ptr [ %219, %.lr.ph145 ], [ %4, %.lr.ph145.preheader ]
  %.3143 = phi i32 [ %225, %.lr.ph145 ], [ %5, %.lr.ph145.preheader ]
  %.095142 = phi ptr [ %224, %.lr.ph145 ], [ %2, %.lr.ph145.preheader ]
  %219 = getelementptr inbounds i8, ptr %.087144, i64 4
  %220 = load i32, ptr %.087144, align 4, !tbaa !17
  %221 = ashr i32 %220, 7
  %222 = call i32 @__SSAT(i32 noundef %221, i32 noundef 8)
  %223 = trunc i32 %222 to i8
  %224 = getelementptr inbounds i8, ptr %.095142, i64 1
  store i8 %223, ptr %.095142, align 1, !tbaa !15
  %225 = add i32 %.3143, -1
  %.not105 = icmp eq i32 %225, 0
  br i1 %.not105, label %._crit_edge146, label %.lr.ph145, !llvm.loop !48

._crit_edge146:                                   ; preds = %.lr.ph145, %._crit_edge134
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  ret void
}

; Function Attrs: mustprogress 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 void @arm_circularWrite_q7(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @arm_circularRead_q7(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @__SSAT(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 = { mustprogress 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, !10, i64 8}
!6 = !{!"", !7, i64 0, !7, i64 2, !10, i64 8, !10, i64 16, !7, i64 24, !10, i64 32}
!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 16}
!12 = !{!6, !10, i64 32}
!13 = !{!6, !7, i64 24}
!14 = !{!6, !7, i64 0}
!15 = !{!8, !8, i64 0}
!16 = !{!6, !7, i64 2}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!20}
!20 = distinct !{!20, !21}
!21 = distinct !{!21, !"LVerDomain"}
!22 = !{!23}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !25, !26, !27}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!"llvm.loop.isvectorized", i32 1}
!27 = !{!"llvm.loop.unroll.runtime.disable"}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.unroll.disable"}
!30 = distinct !{!30, !25, !26}
!31 = distinct !{!31, !25}
!32 = !{!33}
!33 = distinct !{!33, !34}
!34 = distinct !{!34, !"LVerDomain"}
!35 = !{!36}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !25, !26, !27}
!38 = distinct !{!38, !29}
!39 = distinct !{!39, !25, !26}
!40 = !{!41}
!41 = distinct !{!41, !42}
!42 = distinct !{!42, !"LVerDomain"}
!43 = !{!44}
!44 = distinct !{!44, !42}
!45 = distinct !{!45, !25, !26, !27}
!46 = distinct !{!46, !29}
!47 = distinct !{!47, !25, !26}
!48 = distinct !{!48, !25}


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