; LLVM IR from rdguez-mariano/fast_imas_IPOL :: libSimuTilts/filter.ll (Z20vertical_convolutionPfS_iiS_ii)

; 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 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20vertical_convolutionPfS_iiS_ii(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6) #4 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  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 ptr %4, ptr %12, align 8, !tbaa !5
  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
  %26 = load i32, ptr %13, align 4, !tbaa !9
  %27 = sdiv i32 %26, 2
  store i32 %27, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %28 = load i32, ptr %11, align 4, !tbaa !9
  %29 = load i32, ptr %13, align 4, !tbaa !9
  %30 = add nsw i32 %28, %29
  store i32 %30, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %31 = load i32, ptr %16, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %32, i64 4)
  %34 = extractvalue { i64, i1 } %33, 1
  %35 = extractvalue { i64, i1 } %33, 0
  %36 = select i1 %34, i64 -1, i64 %35
  %37 = call noalias noundef nonnull ptr @_Znam(i64 noundef %36) #7
  store ptr %37, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %194, %7
  %39 = load i32, ptr %18, align 4, !tbaa !9
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %197

43:                                               ; preds = %38
  %44 = load i32, ptr %14, align 4, !tbaa !9
  %45 = icmp eq i32 %44, 1
  br i1 %45, label %46, label %73

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %69, %46
  %48 = load i32, ptr %20, align 4, !tbaa !9
  %49 = load i32, ptr %15, align 4, !tbaa !9
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 5, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %72

52:                                               ; preds = %47
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load i32, ptr %15, align 4, !tbaa !9
  %55 = load i32, ptr %20, align 4, !tbaa !9
  %56 = sub nsw i32 %54, %55
  %57 = sub nsw i32 %56, 1
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = mul nsw i32 %57, %58
  %60 = load i32, ptr %18, align 4, !tbaa !9
  %61 = add nsw i32 %59, %60
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds float, ptr %53, i64 %62
  %64 = load float, ptr %63, align 4, !tbaa !11
  %65 = load ptr, ptr %17, align 8, !tbaa !5
  %66 = load i32, ptr %20, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds float, ptr %65, i64 %67
  store float %64, ptr %68, align 4, !tbaa !11
  br label %69

69:                                               ; preds = %52
  %70 = load i32, ptr %20, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %20, align 4, !tbaa !9
  br label %47, !llvm.loop !13

72:                                               ; preds = %51
  br label %88

73:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %74

74:                                               ; preds = %84, %73
  %75 = load i32, ptr %21, align 4, !tbaa !9
  %76 = load i32, ptr %15, align 4, !tbaa !9
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 8, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %87

79:                                               ; preds = %74
  %80 = load ptr, ptr %17, align 8, !tbaa !5
  %81 = load i32, ptr %21, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds float, ptr %80, i64 %82
  store float 0.000000e+00, ptr %83, align 4, !tbaa !11
  br label %84

84:                                               ; preds = %79
  %85 = load i32, ptr %21, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %21, align 4, !tbaa !9
  br label %74, !llvm.loop !15

87:                                               ; preds = %78
  br label %88

88:                                               ; preds = %87, %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %110, %88
  %90 = load i32, ptr %22, align 4, !tbaa !9
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = icmp slt i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  store i32 11, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %113

94:                                               ; preds = %89
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load i32, ptr %22, align 4, !tbaa !9
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = mul nsw i32 %96, %97
  %99 = load i32, ptr %18, align 4, !tbaa !9
  %100 = add nsw i32 %98, %99
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds float, ptr %95, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !11
  %104 = load ptr, ptr %17, align 8, !tbaa !5
  %105 = load i32, ptr %15, align 4, !tbaa !9
  %106 = load i32, ptr %22, align 4, !tbaa !9
  %107 = add nsw i32 %105, %106
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds float, ptr %104, i64 %108
  store float %103, ptr %109, align 4, !tbaa !11
  br label %110

110:                                              ; preds = %94
  %111 = load i32, ptr %22, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %22, align 4, !tbaa !9
  br label %89, !llvm.loop !16

113:                                              ; preds = %93
  %114 = load i32, ptr %14, align 4, !tbaa !9
  %115 = icmp eq i32 %114, 1
  br i1 %115, label %116, label %147

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %143, %116
  %118 = load i32, ptr %23, align 4, !tbaa !9
  %119 = load i32, ptr %15, align 4, !tbaa !9
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  store i32 14, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %146

122:                                              ; preds = %117
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = load i32, ptr %11, align 4, !tbaa !9
  %125 = load i32, ptr %23, align 4, !tbaa !9
  %126 = sub nsw i32 %124, %125
  %127 = sub nsw i32 %126, 1
  %128 = load i32, ptr %10, align 4, !tbaa !9
  %129 = mul nsw i32 %127, %128
  %130 = load i32, ptr %18, align 4, !tbaa !9
  %131 = add nsw i32 %129, %130
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds float, ptr %123, i64 %132
  %134 = load float, ptr %133, align 4, !tbaa !11
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = load i32, ptr %15, align 4, !tbaa !9
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = add nsw i32 %136, %137
  %139 = load i32, ptr %23, align 4, !tbaa !9
  %140 = add nsw i32 %138, %139
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds float, ptr %135, i64 %141
  store float %134, ptr %142, align 4, !tbaa !11
  br label %143

143:                                              ; preds = %122
  %144 = load i32, ptr %23, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %23, align 4, !tbaa !9
  br label %117, !llvm.loop !17

146:                                              ; preds = %121
  br label %166

147:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %148

148:                                              ; preds = %162, %147
  %149 = load i32, ptr %24, align 4, !tbaa !9
  %150 = load i32, ptr %15, align 4, !tbaa !9
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  store i32 17, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %165

153:                                              ; preds = %148
  %154 = load ptr, ptr %17, align 8, !tbaa !5
  %155 = load i32, ptr %15, align 4, !tbaa !9
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = add nsw i32 %155, %156
  %158 = load i32, ptr %24, align 4, !tbaa !9
  %159 = add nsw i32 %157, %158
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds float, ptr %154, i64 %160
  store float 0.000000e+00, ptr %161, align 4, !tbaa !11
  br label %162

162:                                              ; preds = %153
  %163 = load i32, ptr %24, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %24, align 4, !tbaa !9
  br label %148, !llvm.loop !18

165:                                              ; preds = %152
  br label %166

166:                                              ; preds = %165, %146
  %167 = load ptr, ptr %17, align 8, !tbaa !5
  %168 = load ptr, ptr %12, align 8, !tbaa !5
  %169 = load i32, ptr %11, align 4, !tbaa !9
  %170 = load i32, ptr %13, align 4, !tbaa !9
  call void @_Z18buffer_convolutionPfS_ii(ptr noundef %167, ptr noundef %168, i32 noundef %169, i32 noundef %170)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %190, %166
  %172 = load i32, ptr %25, align 4, !tbaa !9
  %173 = load i32, ptr %11, align 4, !tbaa !9
  %174 = icmp slt i32 %172, %173
  br i1 %174, label %176, label %175

175:                                              ; preds = %171
  store i32 20, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %193

176:                                              ; preds = %171
  %177 = load ptr, ptr %17, align 8, !tbaa !5
  %178 = load i32, ptr %25, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds float, ptr %177, i64 %179
  %181 = load float, ptr %180, align 4, !tbaa !11
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = load i32, ptr %25, align 4, !tbaa !9
  %184 = load i32, ptr %10, align 4, !tbaa !9
  %185 = mul nsw i32 %183, %184
  %186 = load i32, ptr %18, align 4, !tbaa !9
  %187 = add nsw i32 %185, %186
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds float, ptr %182, i64 %188
  store float %181, ptr %189, align 4, !tbaa !11
  br label %190

190:                                              ; preds = %176
  %191 = load i32, ptr %25, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %25, align 4, !tbaa !9
  br label %171, !llvm.loop !19

193:                                              ; preds = %175
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %18, align 4, !tbaa !9
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %18, align 4, !tbaa !9
  br label %38, !llvm.loop !20

197:                                              ; preds = %42
  %198 = load ptr, ptr %17, align 8, !tbaa !5
  %199 = icmp eq ptr %198, null
  br i1 %199, label %201, label %200

200:                                              ; preds = %197
  call void @_ZdaPv(ptr noundef %198) #8
  br label %201

201:                                              ; preds = %200, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  ret void
}

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

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 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { 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}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z20vertical_convolutionPfS_iiS_ii(ptr nocapture noundef readonly %0, ptr nocapture noundef writeonly %1, i32 noundef %2, i32 noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6) local_unnamed_addr #2 {
  %8 = add nsw i32 %5, %3
  %9 = zext nneg i32 %8 to i64
  %10 = icmp slt i32 %8, 0
  %11 = shl nuw nsw i64 %9, 2
  %12 = select i1 %10, i64 -1, i64 %11
  %13 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %12) #5
  %14 = icmp sgt i32 %2, 0
  br i1 %14, label %.lr.ph98, label %._crit_edge99

.lr.ph98:                                         ; preds = %7
  %15 = sdiv i32 %5, 2
  %16 = icmp eq i32 %6, 1
  %17 = icmp sgt i32 %5, 1
  %18 = icmp sgt i32 %3, 0
  %19 = add nsw i32 %15, %3
  %20 = add nsw i32 %15, -1
  %21 = zext i32 %20 to i64
  %22 = shl nuw nsw i64 %21, 2
  %23 = add nuw nsw i64 %22, 4
  %24 = sext i32 %15 to i64
  %25 = zext nneg i32 %2 to i64
  %26 = sext i32 %19 to i64
  %27 = zext nneg i32 %2 to i64
  %wide.trip.count = zext i32 %15 to i64
  %wide.trip.count107 = zext i32 %3 to i64
  %invariant.gep132 = getelementptr float, ptr %13, i64 %24
  %wide.trip.count112 = zext nneg i32 %15 to i64
  %invariant.gep134 = getelementptr float, ptr %13, i64 %26
  %invariant.gep136 = getelementptr float, ptr %13, i64 %26
  %wide.trip.count122 = zext nneg i32 %3 to i64
  %28 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %wide.trip.count, 1
  %29 = icmp eq i64 %28, 0
  %unroll_iter = and i64 %wide.trip.count, 1073741822
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %min.iters.check157 = icmp ugt i32 %3, 7
  %ident.check154.not = icmp eq i32 %2, 1
  %or.cond = and i1 %min.iters.check157, %ident.check154.not
  %n.vec160 = and i64 %wide.trip.count107, 2147483640
  %cmp.n167 = icmp eq i64 %n.vec160, %wide.trip.count107
  %xtraiter173 = and i64 %wide.trip.count107, 3
  %lcmp.mod174.not = icmp eq i64 %xtraiter173, 0
  %min.iters.check144 = icmp ult i32 %15, 8
  %n.vec147 = and i64 %wide.trip.count, 1073741816
  %cmp.n152 = icmp eq i64 %n.vec147, %wide.trip.count
  %xtraiter175 = and i64 %wide.trip.count, 1
  %30 = icmp eq i64 %28, 0
  %unroll_iter177 = and i64 %wide.trip.count, 1073741822
  %lcmp.mod176.not = icmp eq i64 %xtraiter175, 0
  %min.iters.check = icmp ugt i32 %3, 7
  %ident.check.not = icmp eq i32 %2, 1
  %or.cond168 = and i1 %min.iters.check, %ident.check.not
  %n.vec = and i64 %wide.trip.count107, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count107
  %xtraiter179 = and i64 %wide.trip.count107, 3
  %lcmp.mod180.not = icmp eq i64 %xtraiter179, 0
  br label %31

31:                                               ; preds = %.lr.ph98, %._crit_edge93
  %indvars.iv124 = phi i64 [ 0, %.lr.ph98 ], [ %indvars.iv.next125, %._crit_edge93 ]
  br i1 %16, label %.preheader77, label %.preheader79

.preheader79:                                     ; preds = %31
  br i1 %17, label %.lr.ph.preheader, label %.loopexit78

.lr.ph.preheader:                                 ; preds = %.preheader79
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %13, i8 0, i64 %23, i1 false), !tbaa !5
  br label %.loopexit78

.preheader77:                                     ; preds = %31
  br i1 %17, label %.lr.ph83.preheader, label %.loopexit78

.lr.ph83.preheader:                               ; preds = %.preheader77
  %invariant.gep = getelementptr float, ptr %0, i64 %indvars.iv124
  br i1 %29, label %.loopexit78.loopexit.unr-lcssa, label %.lr.ph83

.lr.ph83:                                         ; preds = %.lr.ph83.preheader, %.lr.ph83
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph83 ], [ 0, %.lr.ph83.preheader ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph83 ], [ 0, %.lr.ph83.preheader ]
  %32 = xor i64 %indvars.iv, -1
  %33 = add nsw i64 %24, %32
  %34 = mul nsw i64 %33, %25
  %gep = getelementptr float, ptr %invariant.gep, i64 %34
  %35 = load float, ptr %gep, align 4, !tbaa !5
  %36 = getelementptr inbounds float, ptr %13, i64 %indvars.iv
  store float %35, ptr %36, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %37 = xor i64 %indvars.iv, -2
  %38 = add nsw i64 %37, %24
  %39 = mul nsw i64 %38, %25
  %gep.1 = getelementptr float, ptr %invariant.gep, i64 %39
  %40 = load float, ptr %gep.1, align 4, !tbaa !5
  %41 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.next
  store float %40, ptr %41, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit78.loopexit.unr-lcssa, label %.lr.ph83, !llvm.loop !9

.loopexit78.loopexit.unr-lcssa:                   ; preds = %.lr.ph83, %.lr.ph83.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph83.preheader ], [ %indvars.iv.next.1, %.lr.ph83 ]
  br i1 %lcmp.mod.not, label %.loopexit78, label %.lr.ph83.epil

.lr.ph83.epil:                                    ; preds = %.loopexit78.loopexit.unr-lcssa
  %42 = xor i64 %indvars.iv.unr, -1
  %43 = add nsw i64 %24, %42
  %44 = mul nsw i64 %43, %25
  %gep.epil = getelementptr float, ptr %invariant.gep, i64 %44
  %45 = load float, ptr %gep.epil, align 4, !tbaa !5
  %46 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.unr
  store float %45, ptr %46, align 4, !tbaa !5
  br label %.loopexit78

.loopexit78:                                      ; preds = %.lr.ph83.epil, %.loopexit78.loopexit.unr-lcssa, %.lr.ph.preheader, %.preheader79, %.preheader77
  br i1 %18, label %.lr.ph85.preheader, label %._crit_edge

.lr.ph85.preheader:                               ; preds = %.loopexit78
  %invariant.gep130 = getelementptr inbounds float, ptr %0, i64 %indvars.iv124
  br i1 %or.cond, label %vector.body162, label %.lr.ph85.preheader172

.lr.ph85.preheader172:                            ; preds = %middle.block155, %.lr.ph85.preheader
  %indvars.iv104.ph = phi i64 [ 0, %.lr.ph85.preheader ], [ %n.vec160, %middle.block155 ]
  br i1 %lcmp.mod174.not, label %.lr.ph85.prol.loopexit, label %.lr.ph85.prol

.lr.ph85.prol:                                    ; preds = %.lr.ph85.preheader172, %.lr.ph85.prol
  %indvars.iv104.prol = phi i64 [ %indvars.iv.next105.prol, %.lr.ph85.prol ], [ %indvars.iv104.ph, %.lr.ph85.preheader172 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph85.prol ], [ 0, %.lr.ph85.preheader172 ]
  %47 = mul nuw nsw i64 %indvars.iv104.prol, %25
  %gep131.prol = getelementptr inbounds float, ptr %invariant.gep130, i64 %47
  %48 = load float, ptr %gep131.prol, align 4, !tbaa !5
  %gep133.prol = getelementptr float, ptr %invariant.gep132, i64 %indvars.iv104.prol
  store float %48, ptr %gep133.prol, align 4, !tbaa !5
  %indvars.iv.next105.prol = add nuw nsw i64 %indvars.iv104.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter173
  br i1 %prol.iter.cmp.not, label %.lr.ph85.prol.loopexit, label %.lr.ph85.prol, !llvm.loop !11

.lr.ph85.prol.loopexit:                           ; preds = %.lr.ph85.prol, %.lr.ph85.preheader172
  %indvars.iv104.unr = phi i64 [ %indvars.iv104.ph, %.lr.ph85.preheader172 ], [ %indvars.iv.next105.prol, %.lr.ph85.prol ]
  %49 = sub nsw i64 %indvars.iv104.ph, %wide.trip.count107
  %50 = icmp ugt i64 %49, -4
  br i1 %50, label %._crit_edge, label %.lr.ph85

vector.body162:                                   ; preds = %.lr.ph85.preheader, %vector.body162
  %index163 = phi i64 [ %index.next166, %vector.body162 ], [ 0, %.lr.ph85.preheader ]
  %51 = getelementptr inbounds float, ptr %invariant.gep130, i64 %index163
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %wide.load164 = load <4 x float>, ptr %51, align 4, !tbaa !5
  %wide.load165 = load <4 x float>, ptr %52, align 4, !tbaa !5
  %53 = getelementptr float, ptr %invariant.gep132, i64 %index163
  %54 = getelementptr i8, ptr %53, i64 16
  store <4 x float> %wide.load164, ptr %53, align 4, !tbaa !5
  store <4 x float> %wide.load165, ptr %54, align 4, !tbaa !5
  %index.next166 = add nuw i64 %index163, 8
  %55 = icmp eq i64 %index.next166, %n.vec160
  br i1 %55, label %middle.block155, label %vector.body162, !llvm.loop !13

middle.block155:                                  ; preds = %vector.body162
  br i1 %cmp.n167, label %._crit_edge, label %.lr.ph85.preheader172

._crit_edge:                                      ; preds = %.lr.ph85.prol.loopexit, %.lr.ph85, %middle.block155, %.loopexit78
  br i1 %16, label %.preheader, label %.preheader75

.preheader75:                                     ; preds = %._crit_edge
  br i1 %17, label %.lr.ph87.preheader, label %.loopexit

.lr.ph87.preheader:                               ; preds = %.preheader75
  br i1 %min.iters.check144, label %.lr.ph87.preheader170, label %vector.body149

.lr.ph87.preheader170:                            ; preds = %middle.block142, %.lr.ph87.preheader
  %indvars.iv109.ph = phi i64 [ 0, %.lr.ph87.preheader ], [ %n.vec147, %middle.block142 ]
  br label %.lr.ph87

vector.body149:                                   ; preds = %.lr.ph87.preheader, %vector.body149
  %index150 = phi i64 [ %index.next151, %vector.body149 ], [ 0, %.lr.ph87.preheader ]
  %56 = getelementptr float, ptr %invariant.gep134, i64 %index150
  %57 = getelementptr i8, ptr %56, i64 16
  store <4 x float> zeroinitializer, ptr %56, align 4, !tbaa !5
  store <4 x float> zeroinitializer, ptr %57, align 4, !tbaa !5
  %index.next151 = add nuw i64 %index150, 8
  %58 = icmp eq i64 %index.next151, %n.vec147
  br i1 %58, label %middle.block142, label %vector.body149, !llvm.loop !16

middle.block142:                                  ; preds = %vector.body149
  br i1 %cmp.n152, label %.loopexit, label %.lr.ph87.preheader170

.preheader:                                       ; preds = %._crit_edge
  br i1 %17, label %.lr.ph89.preheader, label %.loopexit

.lr.ph89.preheader:                               ; preds = %.preheader
  %59 = getelementptr float, ptr %0, i64 %indvars.iv124
  br i1 %30, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph89

.lr.ph85:                                         ; preds = %.lr.ph85.prol.loopexit, %.lr.ph85
  %indvars.iv104 = phi i64 [ %indvars.iv.next105.3, %.lr.ph85 ], [ %indvars.iv104.unr, %.lr.ph85.prol.loopexit ]
  %60 = mul nuw nsw i64 %indvars.iv104, %25
  %gep131 = getelementptr inbounds float, ptr %invariant.gep130, i64 %60
  %61 = load float, ptr %gep131, align 4, !tbaa !5
  %gep133 = getelementptr float, ptr %invariant.gep132, i64 %indvars.iv104
  store float %61, ptr %gep133, align 4, !tbaa !5
  %indvars.iv.next105 = add nuw nsw i64 %indvars.iv104, 1
  %62 = mul nuw nsw i64 %indvars.iv.next105, %25
  %gep131.1 = getelementptr inbounds float, ptr %invariant.gep130, i64 %62
  %63 = load float, ptr %gep131.1, align 4, !tbaa !5
  %gep133.1 = getelementptr float, ptr %invariant.gep132, i64 %indvars.iv.next105
  store float %63, ptr %gep133.1, align 4, !tbaa !5
  %indvars.iv.next105.1 = add nuw nsw i64 %indvars.iv104, 2
  %64 = mul nuw nsw i64 %indvars.iv.next105.1, %25
  %gep131.2 = getelementptr inbounds float, ptr %invariant.gep130, i64 %64
  %65 = load float, ptr %gep131.2, align 4, !tbaa !5
  %gep133.2 = getelementptr float, ptr %invariant.gep132, i64 %indvars.iv.next105.1
  store float %65, ptr %gep133.2, align 4, !tbaa !5
  %indvars.iv.next105.2 = add nuw nsw i64 %indvars.iv104, 3
  %66 = mul nuw nsw i64 %indvars.iv.next105.2, %25
  %gep131.3 = getelementptr inbounds float, ptr %invariant.gep130, i64 %66
  %67 = load float, ptr %gep131.3, align 4, !tbaa !5
  %gep133.3 = getelementptr float, ptr %invariant.gep132, i64 %indvars.iv.next105.2
  store float %67, ptr %gep133.3, align 4, !tbaa !5
  %indvars.iv.next105.3 = add nuw nsw i64 %indvars.iv104, 4
  %exitcond108.not.3 = icmp eq i64 %indvars.iv.next105.3, %wide.trip.count107
  br i1 %exitcond108.not.3, label %._crit_edge, label %.lr.ph85, !llvm.loop !17

.lr.ph89:                                         ; preds = %.lr.ph89.preheader, %.lr.ph89
  %indvars.iv114 = phi i64 [ %indvars.iv.next115.1, %.lr.ph89 ], [ 0, %.lr.ph89.preheader ]
  %niter178 = phi i64 [ %niter178.next.1, %.lr.ph89 ], [ 0, %.lr.ph89.preheader ]
  %68 = trunc i64 %indvars.iv114 to i32
  %69 = xor i32 %68, -1
  %70 = add i32 %69, %3
  %71 = mul nsw i32 %70, %2
  %72 = sext i32 %71 to i64
  %73 = getelementptr float, ptr %59, i64 %72
  %74 = load float, ptr %73, align 4, !tbaa !5
  %gep137 = getelementptr float, ptr %invariant.gep136, i64 %indvars.iv114
  store float %74, ptr %gep137, align 4, !tbaa !5
  %indvars.iv.next115 = or disjoint i64 %indvars.iv114, 1
  %75 = trunc i64 %indvars.iv.next115 to i32
  %76 = xor i32 %75, -1
  %77 = add i32 %76, %3
  %78 = mul nsw i32 %77, %2
  %79 = sext i32 %78 to i64
  %80 = getelementptr float, ptr %59, i64 %79
  %81 = load float, ptr %80, align 4, !tbaa !5
  %gep137.1 = getelementptr float, ptr %invariant.gep136, i64 %indvars.iv.next115
  store float %81, ptr %gep137.1, align 4, !tbaa !5
  %indvars.iv.next115.1 = add nuw nsw i64 %indvars.iv114, 2
  %niter178.next.1 = add i64 %niter178, 2
  %niter178.ncmp.1 = icmp eq i64 %niter178.next.1, %unroll_iter177
  br i1 %niter178.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph89, !llvm.loop !18

.lr.ph87:                                         ; preds = %.lr.ph87.preheader170, %.lr.ph87
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %.lr.ph87 ], [ %indvars.iv109.ph, %.lr.ph87.preheader170 ]
  %gep135 = getelementptr float, ptr %invariant.gep134, i64 %indvars.iv109
  store float 0.000000e+00, ptr %gep135, align 4, !tbaa !5
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %exitcond113.not = icmp eq i64 %indvars.iv.next110, %wide.trip.count112
  br i1 %exitcond113.not, label %.loopexit, label %.lr.ph87, !llvm.loop !19

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph89, %.lr.ph89.preheader
  %indvars.iv114.unr = phi i64 [ 0, %.lr.ph89.preheader ], [ %indvars.iv.next115.1, %.lr.ph89 ]
  br i1 %lcmp.mod176.not, label %.loopexit, label %.lr.ph89.epil

.lr.ph89.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa
  %82 = trunc i64 %indvars.iv114.unr to i32
  %83 = xor i32 %82, -1
  %84 = add i32 %83, %3
  %85 = mul nsw i32 %84, %2
  %86 = sext i32 %85 to i64
  %87 = getelementptr float, ptr %59, i64 %86
  %88 = load float, ptr %87, align 4, !tbaa !5
  %gep137.epil = getelementptr float, ptr %invariant.gep136, i64 %indvars.iv114.unr
  store float %88, ptr %gep137.epil, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph87, %.lr.ph89.epil, %.loopexit.loopexit.unr-lcssa, %middle.block142, %.preheader75, %.preheader
  tail call void @_Z18buffer_convolutionPfS_ii(ptr noundef nonnull %13, ptr noundef %4, i32 noundef %3, i32 noundef %5)
  br i1 %18, label %.lr.ph92.preheader, label %._crit_edge93

.lr.ph92.preheader:                               ; preds = %.loopexit
  %invariant.gep138 = getelementptr inbounds float, ptr %1, i64 %indvars.iv124
  br i1 %or.cond168, label %vector.body, label %.lr.ph92.preheader169

.lr.ph92.preheader169:                            ; preds = %middle.block, %.lr.ph92.preheader
  %indvars.iv119.ph = phi i64 [ 0, %.lr.ph92.preheader ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod180.not, label %.lr.ph92.prol.loopexit, label %.lr.ph92.prol

.lr.ph92.prol:                                    ; preds = %.lr.ph92.preheader169, %.lr.ph92.prol
  %indvars.iv119.prol = phi i64 [ %indvars.iv.next120.prol, %.lr.ph92.prol ], [ %indvars.iv119.ph, %.lr.ph92.preheader169 ]
  %prol.iter181 = phi i64 [ %prol.iter181.next, %.lr.ph92.prol ], [ 0, %.lr.ph92.preheader169 ]
  %89 = getelementptr inbounds float, ptr %13, i64 %indvars.iv119.prol
  %90 = load float, ptr %89, align 4, !tbaa !5
  %91 = mul nuw nsw i64 %indvars.iv119.prol, %27
  %gep139.prol = getelementptr inbounds float, ptr %invariant.gep138, i64 %91
  store float %90, ptr %gep139.prol, align 4, !tbaa !5
  %indvars.iv.next120.prol = add nuw nsw i64 %indvars.iv119.prol, 1
  %prol.iter181.next = add i64 %prol.iter181, 1
  %prol.iter181.cmp.not = icmp eq i64 %prol.iter181.next, %xtraiter179
  br i1 %prol.iter181.cmp.not, label %.lr.ph92.prol.loopexit, label %.lr.ph92.prol, !llvm.loop !20

.lr.ph92.prol.loopexit:                           ; preds = %.lr.ph92.prol, %.lr.ph92.preheader169
  %indvars.iv119.unr = phi i64 [ %indvars.iv119.ph, %.lr.ph92.preheader169 ], [ %indvars.iv.next120.prol, %.lr.ph92.prol ]
  %92 = sub nsw i64 %indvars.iv119.ph, %wide.trip.count107
  %93 = icmp ugt i64 %92, -4
  br i1 %93, label %._crit_edge93, label %.lr.ph92

vector.body:                                      ; preds = %.lr.ph92.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph92.preheader ]
  %94 = getelementptr inbounds float, ptr %13, i64 %index
  %95 = getelementptr inbounds i8, ptr %94, i64 16
  %wide.load = load <4 x float>, ptr %94, align 4, !tbaa !5
  %wide.load141 = load <4 x float>, ptr %95, align 4, !tbaa !5
  %96 = getelementptr inbounds float, ptr %invariant.gep138, i64 %index
  %97 = getelementptr inbounds i8, ptr %96, i64 16
  store <4 x float> %wide.load, ptr %96, align 4, !tbaa !5
  store <4 x float> %wide.load141, ptr %97, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %98 = icmp eq i64 %index.next, %n.vec
  br i1 %98, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge93, label %.lr.ph92.preheader169

._crit_edge93:                                    ; preds = %.lr.ph92.prol.loopexit, %.lr.ph92, %middle.block, %.loopexit
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %exitcond128.not = icmp eq i64 %indvars.iv.next125, %27
  br i1 %exitcond128.not, label %._crit_edge99, label %31, !llvm.loop !22

.lr.ph92:                                         ; preds = %.lr.ph92.prol.loopexit, %.lr.ph92
  %indvars.iv119 = phi i64 [ %indvars.iv.next120.3, %.lr.ph92 ], [ %indvars.iv119.unr, %.lr.ph92.prol.loopexit ]
  %99 = getelementptr inbounds float, ptr %13, i64 %indvars.iv119
  %100 = load float, ptr %99, align 4, !tbaa !5
  %101 = mul nuw nsw i64 %indvars.iv119, %27
  %gep139 = getelementptr inbounds float, ptr %invariant.gep138, i64 %101
  store float %100, ptr %gep139, align 4, !tbaa !5
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %102 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.next120
  %103 = load float, ptr %102, align 4, !tbaa !5
  %104 = mul nuw nsw i64 %indvars.iv.next120, %27
  %gep139.1 = getelementptr inbounds float, ptr %invariant.gep138, i64 %104
  store float %103, ptr %gep139.1, align 4, !tbaa !5
  %indvars.iv.next120.1 = add nuw nsw i64 %indvars.iv119, 2
  %105 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.next120.1
  %106 = load float, ptr %105, align 4, !tbaa !5
  %107 = mul nuw nsw i64 %indvars.iv.next120.1, %27
  %gep139.2 = getelementptr inbounds float, ptr %invariant.gep138, i64 %107
  store float %106, ptr %gep139.2, align 4, !tbaa !5
  %indvars.iv.next120.2 = add nuw nsw i64 %indvars.iv119, 3
  %108 = getelementptr inbounds float, ptr %13, i64 %indvars.iv.next120.2
  %109 = load float, ptr %108, align 4, !tbaa !5
  %110 = mul nuw nsw i64 %indvars.iv.next120.2, %27
  %gep139.3 = getelementptr inbounds float, ptr %invariant.gep138, i64 %110
  store float %109, ptr %gep139.3, align 4, !tbaa !5
  %indvars.iv.next120.3 = add nuw nsw i64 %indvars.iv119, 4
  %exitcond123.not.3 = icmp eq i64 %indvars.iv.next120.3, %wide.trip.count122
  br i1 %exitcond123.not.3, label %._crit_edge93, label %.lr.ph92, !llvm.loop !23

._crit_edge99:                                    ; preds = %._crit_edge93, %7
  tail call void @_ZdaPv(ptr noundef nonnull %13) #6
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { 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 #1 = { 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 #2 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { builtin allocsize(0) }
attributes #6 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10, !14, !15}
!17 = distinct !{!17, !10, !14}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !15, !14}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !10, !14, !15}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10, !14}


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