; LLVM IR from stan-dev/math :: lib/sundials_6.1.1/src/nvector/manyvector (nvector_manyvector)

; 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._generic_N_Vector = type { ptr, ptr, ptr }
%struct._N_VectorContent_ManyVector = type { i64, i64, ptr, i32 }

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

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

22:                                               ; preds = %4
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %123

23:                                               ; preds = %4
  store ptr null, ptr %14, align 8, !tbaa !9
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = mul i64 %25, 8
  %27 = call noalias ptr @malloc(i64 noundef %26) #6
  store ptr %27, ptr %14, align 8, !tbaa !9
  %28 = load ptr, ptr %14, align 8, !tbaa !9
  %29 = icmp ne ptr %28, null
  br i1 %29, label %31, label %30

30:                                               ; preds = %23
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %123

31:                                               ; preds = %23
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %41, %31
  %33 = load i32, ptr %10, align 4, !tbaa !5
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %36, label %44

36:                                               ; preds = %32
  %37 = load ptr, ptr %9, align 8, !tbaa !9
  %38 = load i32, ptr %10, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %37, i64 %39
  store double 0.000000e+00, ptr %40, align 8, !tbaa !11
  br label %41

41:                                               ; preds = %36
  %42 = load i32, ptr %10, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %10, align 4, !tbaa !5
  br label %32, !llvm.loop !13

44:                                               ; preds = %32
  store i64 0, ptr %12, align 8, !tbaa !15
  br label %45

45:                                               ; preds = %117, %44
  %46 = load i64, ptr %12, align 8, !tbaa !15
  %47 = load ptr, ptr %7, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct._generic_N_Vector, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !17
  %50 = getelementptr inbounds %struct._N_VectorContent_ManyVector, ptr %49, i32 0, i32 0
  %51 = load i64, ptr %50, align 8, !tbaa !19
  %52 = icmp slt i64 %46, %51
  br i1 %52, label %53, label %120

53:                                               ; preds = %45
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %75, %53
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = load i32, ptr %6, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %58, label %78

58:                                               ; preds = %54
  %59 = load ptr, ptr %8, align 8, !tbaa !9
  %60 = load i32, ptr %10, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds ptr, ptr %59, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct._generic_N_Vector, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = getelementptr inbounds %struct._N_VectorContent_ManyVector, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  %68 = load i64, ptr %12, align 8, !tbaa !15
  %69 = getelementptr inbounds ptr, ptr %67, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = load ptr, ptr %13, align 8, !tbaa !9
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds ptr, ptr %71, i64 %73
  store ptr %70, ptr %74, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %58
  %76 = load i32, ptr %10, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %10, align 4, !tbaa !5
  br label %54, !llvm.loop !22

78:                                               ; preds = %54
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = load ptr, ptr %7, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct._generic_N_Vector, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds %struct._N_VectorContent_ManyVector, ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !21
  %85 = load i64, ptr %12, align 8, !tbaa !15
  %86 = getelementptr inbounds ptr, ptr %84, i64 %85
  %87 = load ptr, ptr %86, align 8, !tbaa !9
  %88 = load ptr, ptr %13, align 8, !tbaa !9
  %89 = load ptr, ptr %14, align 8, !tbaa !9
  %90 = call i32 @N_VDotProdMultiLocal(i32 noundef %79, ptr noundef %87, ptr noundef %88, ptr noundef %89)
  store i32 %90, ptr %11, align 4, !tbaa !5
  %91 = load i32, ptr %11, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %96

93:                                               ; preds = %78
  %94 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %94) #5
  %95 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %95) #5
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %123

96:                                               ; preds = %78
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %97

97:                                               ; preds = %113, %96
  %98 = load i32, ptr %10, align 4, !tbaa !5
  %99 = load i32, ptr %6, align 4, !tbaa !5
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %101, label %116

101:                                              ; preds = %97
  %102 = load ptr, ptr %14, align 8, !tbaa !9
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !11
  %107 = load ptr, ptr %9, align 8, !tbaa !9
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !11
  %112 = fadd double %111, %106
  store double %112, ptr %110, align 8, !tbaa !11
  br label %113

113:                                              ; preds = %101
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %10, align 4, !tbaa !5
  br label %97, !llvm.loop !23

116:                                              ; preds = %97
  br label %117

117:                                              ; preds = %116
  %118 = load i64, ptr %12, align 8, !tbaa !15
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %12, align 8, !tbaa !15
  br label %45, !llvm.loop !24

120:                                              ; preds = %45
  %121 = load ptr, ptr %13, align 8, !tbaa !9
  call void @free(ptr noundef %121) #5
  %122 = load ptr, ptr %14, align 8, !tbaa !9
  call void @free(ptr noundef %122) #5
  store i32 0, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %123

123:                                              ; preds = %120, %93, %30, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %124 = load i32, ptr %5, align 4
  ret i32 %124
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(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: nounwind
declare void @free(ptr noundef) #3

declare i32 @N_VDotProdMultiLocal(i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind 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 = { 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 = { "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 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"_generic_N_Vector", !10, i64 0, !10, i64 8, !10, i64 16}
!19 = !{!20, !16, i64 0}
!20 = !{!"_N_VectorContent_ManyVector", !16, i64 0, !16, i64 8, !10, i64 16, !6, i64 24}
!21 = !{!20, !10, i64 16}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !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: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @N_VDotProdMultiLocal_ManyVector(i32 noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = sext i32 %0 to i64
  %6 = shl nsw i64 %5, 3
  %7 = tail call noalias ptr @malloc(i64 noundef %6) #5
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %76, label %8

8:                                                ; preds = %4
  %9 = tail call noalias ptr @malloc(i64 noundef %6) #5
  %.not42 = icmp eq ptr %9, null
  br i1 %.not42, label %76, label %.preheader46

.preheader46:                                     ; preds = %8
  %10 = icmp sgt i32 %0, 0
  br i1 %10, label %.preheader45, label %.preheader45.thread

.preheader45:                                     ; preds = %.preheader46
  %11 = zext nneg i32 %0 to i64
  %12 = shl nuw nsw i64 %11, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %3, i8 0, i64 %12, i1 false), !tbaa !5
  %13 = load ptr, ptr %1, align 8, !tbaa !9
  %14 = load i64, ptr %13, align 8, !tbaa !12
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.preheader44.us.preheader, label %.sink.split

.preheader45.thread:                              ; preds = %.preheader46
  %16 = load ptr, ptr %1, align 8, !tbaa !9
  %17 = load i64, ptr %16, align 8, !tbaa !12
  %18 = icmp sgt i64 %17, 0
  br i1 %18, label %.preheader44, label %.sink.split

.preheader44.us.preheader:                        ; preds = %.preheader45
  %wide.trip.count = zext nneg i32 %0 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %19 = icmp eq i32 %0, 1
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %min.iters.check = icmp ult i32 %0, 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader44.us

.preheader44.us:                                  ; preds = %.preheader44.us.preheader, %._crit_edge52.us
  %20 = phi ptr [ %22, %._crit_edge52.us ], [ %13, %.preheader44.us.preheader ]
  %.053.us = phi i64 [ %21, %._crit_edge52.us ], [ 0, %.preheader44.us.preheader ]
  br i1 %19, label %._crit_edge.us.unr-lcssa, label %.preheader44.us.new

._crit_edge52.us:                                 ; preds = %.lr.ph51.us, %middle.block
  %21 = add nuw nsw i64 %.053.us, 1
  %22 = load ptr, ptr %1, align 8, !tbaa !9
  %23 = load i64, ptr %22, align 8, !tbaa !12
  %24 = icmp slt i64 %21, %23
  br i1 %24, label %.preheader44.us, label %.sink.split, !llvm.loop !16

.lr.ph51.us:                                      ; preds = %.lr.ph51.us.preheader78, %.lr.ph51.us
  %indvars.iv66 = phi i64 [ %indvars.iv.next67, %.lr.ph51.us ], [ %indvars.iv66.ph, %.lr.ph51.us.preheader78 ]
  %25 = getelementptr inbounds double, ptr %9, i64 %indvars.iv66
  %26 = load double, ptr %25, align 8, !tbaa !5
  %27 = getelementptr inbounds double, ptr %3, i64 %indvars.iv66
  %28 = load double, ptr %27, align 8, !tbaa !5
  %29 = fadd double %26, %28
  store double %29, ptr %27, align 8, !tbaa !5
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %exitcond70.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count
  br i1 %exitcond70.not, label %._crit_edge52.us, label %.lr.ph51.us, !llvm.loop !18

.preheader44.us.new:                              ; preds = %.preheader44.us, %.preheader44.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.preheader44.us.new ], [ 0, %.preheader44.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader44.us.new ], [ 0, %.preheader44.us ]
  %30 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv
  %31 = load ptr, ptr %30, align 8, !tbaa !21
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  %35 = getelementptr inbounds ptr, ptr %34, i64 %.053.us
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv
  store ptr %36, ptr %37, align 8, !tbaa !21
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %38 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.next
  %39 = load ptr, ptr %38, align 8, !tbaa !21
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !22
  %43 = getelementptr inbounds ptr, ptr %42, i64 %.053.us
  %44 = load ptr, ptr %43, align 8, !tbaa !21
  %45 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv.next
  store ptr %44, ptr %45, align 8, !tbaa !21
  %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 %._crit_edge.us.unr-lcssa, label %.preheader44.us.new, !llvm.loop !23

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader44.us.new, %.preheader44.us
  %indvars.iv.unr = phi i64 [ 0, %.preheader44.us ], [ %indvars.iv.next.1, %.preheader44.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %46 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv.unr
  %47 = load ptr, ptr %46, align 8, !tbaa !21
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !22
  %51 = getelementptr inbounds ptr, ptr %50, i64 %.053.us
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = getelementptr inbounds ptr, ptr %7, i64 %indvars.iv.unr
  store ptr %52, ptr %53, align 8, !tbaa !21
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %54 = getelementptr inbounds i8, ptr %20, i64 16
  %55 = load ptr, ptr %54, align 8, !tbaa !22
  %56 = getelementptr inbounds ptr, ptr %55, i64 %.053.us
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = tail call i32 @N_VDotProdMultiLocal(i32 noundef %0, ptr noundef %57, ptr noundef nonnull %7, ptr noundef nonnull %9) #6
  %.not43.us = icmp eq i32 %58, 0
  br i1 %.not43.us, label %.lr.ph51.us.preheader, label %.sink.split

.lr.ph51.us.preheader:                            ; preds = %._crit_edge.us
  br i1 %min.iters.check, label %.lr.ph51.us.preheader78, label %vector.body

.lr.ph51.us.preheader78:                          ; preds = %middle.block, %.lr.ph51.us.preheader
  %indvars.iv66.ph = phi i64 [ 0, %.lr.ph51.us.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph51.us

vector.body:                                      ; preds = %.lr.ph51.us.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph51.us.preheader ]
  %59 = getelementptr inbounds double, ptr %9, i64 %index
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %wide.load = load <2 x double>, ptr %59, align 8, !tbaa !5
  %wide.load75 = load <2 x double>, ptr %60, align 8, !tbaa !5
  %61 = getelementptr inbounds double, ptr %3, i64 %index
  %62 = getelementptr inbounds i8, ptr %61, i64 16
  %wide.load76 = load <2 x double>, ptr %61, align 8, !tbaa !5
  %wide.load77 = load <2 x double>, ptr %62, align 8, !tbaa !5
  %63 = fadd <2 x double> %wide.load, %wide.load76
  %64 = fadd <2 x double> %wide.load75, %wide.load77
  store <2 x double> %63, ptr %61, align 8, !tbaa !5
  store <2 x double> %64, ptr %62, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %65 = icmp eq i64 %index.next, %n.vec
  br i1 %65, label %middle.block, label %vector.body, !llvm.loop !24

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge52.us, label %.lr.ph51.us.preheader78

.preheader44:                                     ; preds = %.preheader45.thread, %.preheader
  %66 = phi ptr [ %73, %.preheader ], [ %16, %.preheader45.thread ]
  %.053 = phi i64 [ %72, %.preheader ], [ 0, %.preheader45.thread ]
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %68 = load ptr, ptr %67, align 8, !tbaa !22
  %69 = getelementptr inbounds ptr, ptr %68, i64 %.053
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  %71 = tail call i32 @N_VDotProdMultiLocal(i32 noundef %0, ptr noundef %70, ptr noundef nonnull %7, ptr noundef nonnull %9) #6
  %.not43 = icmp eq i32 %71, 0
  br i1 %.not43, label %.preheader, label %.sink.split

.preheader:                                       ; preds = %.preheader44
  %72 = add nuw nsw i64 %.053, 1
  %73 = load ptr, ptr %1, align 8, !tbaa !9
  %74 = load i64, ptr %73, align 8, !tbaa !12
  %75 = icmp slt i64 %72, %74
  br i1 %75, label %.preheader44, label %.sink.split, !llvm.loop !16

.sink.split:                                      ; preds = %.preheader, %.preheader44, %._crit_edge52.us, %._crit_edge.us, %.preheader45, %.preheader45.thread
  %.037.ph = phi i32 [ 0, %.preheader45.thread ], [ 0, %.preheader45 ], [ -1, %._crit_edge.us ], [ 0, %._crit_edge52.us ], [ -1, %.preheader44 ], [ 0, %.preheader ]
  tail call void @free(ptr noundef %7) #6
  tail call void @free(ptr noundef %9) #6
  br label %76

76:                                               ; preds = %.sink.split, %8, %4
  %.037 = phi i32 [ -1, %4 ], [ -1, %8 ], [ %.037.ph, %.sink.split ]
  ret i32 %.037
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

declare i32 @N_VDotProdMultiLocal(i32 noundef, ptr noundef, ptr noundef, ptr 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 = { 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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "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 = { nounwind allocsize(0) }
attributes #6 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_generic_N_Vector", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"_N_VectorContent_ManyVector", !14, i64 0, !14, i64 8, !11, i64 16, !15, i64 24}
!14 = !{!"long", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17, !19, !20}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!11, !11, i64 0}
!22 = !{!13, !11, i64 16}
!23 = distinct !{!23, !17}
!24 = distinct !{!24, !17, !20, !19}


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