; LLVM IR from sympiler/nasoq :: src/common/SparseUtils.ll (ZN5nasoq7add_vecEiPddS0_)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5nasoq7add_vecEiPddS0_(i32 noundef %0, ptr noundef %1, double noundef %2, ptr noundef %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca i32, align 4
  %14 = alloca double, align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !9
  %15 = load double, ptr %7, align 8, !tbaa !11
  %16 = fcmp oeq double %15, 0.000000e+00
  br i1 %16, label %17, label %18

17:                                               ; preds = %4
  br label %86

18:                                               ; preds = %4
  %19 = load double, ptr %7, align 8, !tbaa !11
  %20 = fcmp oeq double %19, 1.000000e+00
  br i1 %20, label %21, label %41

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %37, %21
  %23 = load i32, ptr %9, align 4, !tbaa !5
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %40

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %28 = load ptr, ptr %8, align 8, !tbaa !9
  %29 = load double, ptr %28, align 8, !tbaa !11
  %30 = load ptr, ptr %6, align 8, !tbaa !9
  %31 = getelementptr inbounds double, ptr %30, i32 1
  store ptr %31, ptr %6, align 8, !tbaa !9
  %32 = load double, ptr %30, align 8, !tbaa !11
  %33 = fadd double %29, %32
  store double %33, ptr %10, align 8, !tbaa !11
  %34 = load double, ptr %10, align 8, !tbaa !11
  %35 = load ptr, ptr %8, align 8, !tbaa !9
  %36 = getelementptr inbounds double, ptr %35, i32 1
  store ptr %36, ptr %8, align 8, !tbaa !9
  store double %34, ptr %35, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %37

37:                                               ; preds = %27
  %38 = load i32, ptr %9, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %9, align 4, !tbaa !5
  br label %22, !llvm.loop !13

40:                                               ; preds = %26
  br label %86

41:                                               ; preds = %18
  %42 = load double, ptr %7, align 8, !tbaa !11
  %43 = fcmp oeq double %42, -1.000000e+00
  br i1 %43, label %44, label %64

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %60, %44
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %63

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %51 = load ptr, ptr %8, align 8, !tbaa !9
  %52 = load double, ptr %51, align 8, !tbaa !11
  %53 = load ptr, ptr %6, align 8, !tbaa !9
  %54 = getelementptr inbounds double, ptr %53, i32 1
  store ptr %54, ptr %6, align 8, !tbaa !9
  %55 = load double, ptr %53, align 8, !tbaa !11
  %56 = fsub double %52, %55
  store double %56, ptr %12, align 8, !tbaa !11
  %57 = load double, ptr %12, align 8, !tbaa !11
  %58 = load ptr, ptr %8, align 8, !tbaa !9
  %59 = getelementptr inbounds double, ptr %58, i32 1
  store ptr %59, ptr %8, align 8, !tbaa !9
  store double %57, ptr %58, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %60

60:                                               ; preds = %50
  %61 = load i32, ptr %11, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %11, align 4, !tbaa !5
  br label %45, !llvm.loop !15

63:                                               ; preds = %49
  br label %85

64:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %81, %64
  %66 = load i32, ptr %13, align 4, !tbaa !5
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = icmp slt i32 %66, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %84

70:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %71 = load ptr, ptr %8, align 8, !tbaa !9
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = load double, ptr %7, align 8, !tbaa !11
  %74 = load ptr, ptr %6, align 8, !tbaa !9
  %75 = getelementptr inbounds double, ptr %74, i32 1
  store ptr %75, ptr %6, align 8, !tbaa !9
  %76 = load double, ptr %74, align 8, !tbaa !11
  %77 = call double @llvm.fmuladd.f64(double %73, double %76, double %72)
  store double %77, ptr %14, align 8, !tbaa !11
  %78 = load double, ptr %14, align 8, !tbaa !11
  %79 = load ptr, ptr %8, align 8, !tbaa !9
  %80 = getelementptr inbounds double, ptr %79, i32 1
  store ptr %80, ptr %8, align 8, !tbaa !9
  store double %78, ptr %79, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %81

81:                                               ; preds = %70
  %82 = load i32, ptr %13, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %13, align 4, !tbaa !5
  br label %65, !llvm.loop !16

84:                                               ; preds = %69
  br label %85

85:                                               ; preds = %84, %63
  br label %86

86:                                               ; preds = %85, %40, %17
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple 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 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @_ZN5nasoq7add_vecEiPddS0_(i32 noundef %0, ptr nocapture noundef readonly %1, double noundef %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = fcmp oeq double %2, 0.000000e+00
  br i1 %5, label %.loopexit, label %6

6:                                                ; preds = %4
  %7 = fcmp oeq double %2, 1.000000e+00
  br i1 %7, label %.preheader, label %51

.preheader:                                       ; preds = %6
  %8 = icmp sgt i32 %0, 0
  br i1 %8, label %.lr.ph45.preheader, label %.loopexit

.lr.ph45.preheader:                               ; preds = %.preheader
  %9 = zext nneg i32 %0 to i64
  %min.iters.check106 = icmp ult i32 %0, 10
  br i1 %min.iters.check106, label %.lr.ph45.preheader130, label %vector.memcheck98

vector.memcheck98:                                ; preds = %.lr.ph45.preheader
  %10 = add nsw i32 %0, -1
  %11 = zext i32 %10 to i64
  %12 = shl nuw nsw i64 %11, 3
  %13 = add nuw nsw i64 %12, 8
  %scevgep99 = getelementptr i8, ptr %3, i64 %13
  %scevgep100 = getelementptr i8, ptr %1, i64 %13
  %bound0101 = icmp ugt ptr %scevgep100, %3
  %bound1102 = icmp ugt ptr %scevgep99, %1
  %found.conflict103 = and i1 %bound0101, %bound1102
  br i1 %found.conflict103, label %.lr.ph45.preheader130, label %vector.ph107

vector.ph107:                                     ; preds = %vector.memcheck98
  %n.vec109 = and i64 %9, 2147483644
  %14 = shl nuw nsw i64 %n.vec109, 3
  %ind.end110 = getelementptr i8, ptr %1, i64 %14
  %15 = shl nuw nsw i64 %n.vec109, 3
  %ind.end112 = getelementptr i8, ptr %3, i64 %15
  %ind.end114 = trunc nuw nsw i64 %n.vec109 to i32
  br label %vector.body116

vector.body116:                                   ; preds = %vector.body116, %vector.ph107
  %index117 = phi i64 [ 0, %vector.ph107 ], [ %index.next128, %vector.body116 ]
  %offset.idx118 = shl i64 %index117, 3
  %next.gep119 = getelementptr i8, ptr %1, i64 %offset.idx118
  %offset.idx121 = shl i64 %index117, 3
  %next.gep122 = getelementptr i8, ptr %3, i64 %offset.idx121
  %16 = getelementptr i8, ptr %next.gep122, i64 16
  %wide.load124 = load <2 x double>, ptr %next.gep122, align 8, !tbaa !5, !alias.scope !9, !noalias !12
  %wide.load125 = load <2 x double>, ptr %16, align 8, !tbaa !5, !alias.scope !9, !noalias !12
  %17 = getelementptr i8, ptr %next.gep119, i64 16
  %wide.load126 = load <2 x double>, ptr %next.gep119, align 8, !tbaa !5, !alias.scope !12
  %wide.load127 = load <2 x double>, ptr %17, align 8, !tbaa !5, !alias.scope !12
  %18 = fadd <2 x double> %wide.load124, %wide.load126
  %19 = fadd <2 x double> %wide.load125, %wide.load127
  store <2 x double> %18, ptr %next.gep122, align 8, !tbaa !5, !alias.scope !9, !noalias !12
  store <2 x double> %19, ptr %16, align 8, !tbaa !5, !alias.scope !9, !noalias !12
  %index.next128 = add nuw i64 %index117, 4
  %20 = icmp eq i64 %index.next128, %n.vec109
  br i1 %20, label %middle.block104, label %vector.body116, !llvm.loop !14

middle.block104:                                  ; preds = %vector.body116
  %cmp.n129 = icmp eq i64 %n.vec109, %9
  br i1 %cmp.n129, label %.loopexit, label %.lr.ph45.preheader130

.lr.ph45.preheader130:                            ; preds = %middle.block104, %vector.memcheck98, %.lr.ph45.preheader
  %.044.ph = phi ptr [ %1, %vector.memcheck98 ], [ %1, %.lr.ph45.preheader ], [ %ind.end110, %middle.block104 ]
  %.02543.ph = phi ptr [ %3, %vector.memcheck98 ], [ %3, %.lr.ph45.preheader ], [ %ind.end112, %middle.block104 ]
  %.02942.ph = phi i32 [ 0, %vector.memcheck98 ], [ 0, %.lr.ph45.preheader ], [ %ind.end114, %middle.block104 ]
  %21 = sub i32 %0, %.02942.ph
  %xtraiter138 = and i32 %21, 3
  %lcmp.mod139.not = icmp eq i32 %xtraiter138, 0
  br i1 %lcmp.mod139.not, label %.lr.ph45.prol.loopexit, label %.lr.ph45.prol

.lr.ph45.prol:                                    ; preds = %.lr.ph45.preheader130, %.lr.ph45.prol
  %.044.prol = phi ptr [ %23, %.lr.ph45.prol ], [ %.044.ph, %.lr.ph45.preheader130 ]
  %.02543.prol = phi ptr [ %26, %.lr.ph45.prol ], [ %.02543.ph, %.lr.ph45.preheader130 ]
  %.02942.prol = phi i32 [ %27, %.lr.ph45.prol ], [ %.02942.ph, %.lr.ph45.preheader130 ]
  %prol.iter140 = phi i32 [ %prol.iter140.next, %.lr.ph45.prol ], [ 0, %.lr.ph45.preheader130 ]
  %22 = load double, ptr %.02543.prol, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %.044.prol, i64 8
  %24 = load double, ptr %.044.prol, align 8, !tbaa !5
  %25 = fadd double %22, %24
  %26 = getelementptr inbounds i8, ptr %.02543.prol, i64 8
  store double %25, ptr %.02543.prol, align 8, !tbaa !5
  %27 = add nuw nsw i32 %.02942.prol, 1
  %prol.iter140.next = add i32 %prol.iter140, 1
  %prol.iter140.cmp.not = icmp eq i32 %prol.iter140.next, %xtraiter138
  br i1 %prol.iter140.cmp.not, label %.lr.ph45.prol.loopexit, label %.lr.ph45.prol, !llvm.loop !18

.lr.ph45.prol.loopexit:                           ; preds = %.lr.ph45.prol, %.lr.ph45.preheader130
  %.044.unr = phi ptr [ %.044.ph, %.lr.ph45.preheader130 ], [ %23, %.lr.ph45.prol ]
  %.02543.unr = phi ptr [ %.02543.ph, %.lr.ph45.preheader130 ], [ %26, %.lr.ph45.prol ]
  %.02942.unr = phi i32 [ %.02942.ph, %.lr.ph45.preheader130 ], [ %27, %.lr.ph45.prol ]
  %28 = sub i32 %.02942.ph, %0
  %29 = icmp ugt i32 %28, -4
  br i1 %29, label %.loopexit, label %.lr.ph45

.lr.ph45:                                         ; preds = %.lr.ph45.prol.loopexit, %.lr.ph45
  %.044 = phi ptr [ %46, %.lr.ph45 ], [ %.044.unr, %.lr.ph45.prol.loopexit ]
  %.02543 = phi ptr [ %49, %.lr.ph45 ], [ %.02543.unr, %.lr.ph45.prol.loopexit ]
  %.02942 = phi i32 [ %50, %.lr.ph45 ], [ %.02942.unr, %.lr.ph45.prol.loopexit ]
  %30 = load double, ptr %.02543, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %.044, i64 8
  %32 = load double, ptr %.044, align 8, !tbaa !5
  %33 = fadd double %30, %32
  %34 = getelementptr inbounds i8, ptr %.02543, i64 8
  store double %33, ptr %.02543, align 8, !tbaa !5
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %.044, i64 16
  %37 = load double, ptr %31, align 8, !tbaa !5
  %38 = fadd double %35, %37
  %39 = getelementptr inbounds i8, ptr %.02543, i64 16
  store double %38, ptr %34, align 8, !tbaa !5
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %.044, i64 24
  %42 = load double, ptr %36, align 8, !tbaa !5
  %43 = fadd double %40, %42
  %44 = getelementptr inbounds i8, ptr %.02543, i64 24
  store double %43, ptr %39, align 8, !tbaa !5
  %45 = load double, ptr %44, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %.044, i64 32
  %47 = load double, ptr %41, align 8, !tbaa !5
  %48 = fadd double %45, %47
  %49 = getelementptr inbounds i8, ptr %.02543, i64 32
  store double %48, ptr %44, align 8, !tbaa !5
  %50 = add nuw nsw i32 %.02942, 4
  %exitcond49.not.3 = icmp eq i32 %50, %0
  br i1 %exitcond49.not.3, label %.loopexit, label %.lr.ph45, !llvm.loop !20

51:                                               ; preds = %6
  %52 = fcmp oeq double %2, -1.000000e+00
  %53 = icmp sgt i32 %0, 0
  br i1 %52, label %.preheader31, label %.preheader33

.preheader33:                                     ; preds = %51
  br i1 %53, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %.preheader33
  %54 = zext nneg i32 %0 to i64
  %min.iters.check = icmp ult i32 %0, 8
  br i1 %min.iters.check, label %.lr.ph.preheader133, label %vector.memcheck

.lr.ph.preheader133:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %.237.ph = phi ptr [ %1, %vector.memcheck ], [ %1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.02436.ph = phi i32 [ 0, %vector.memcheck ], [ 0, %.lr.ph.preheader ], [ %ind.end55, %middle.block ]
  %.22735.ph = phi ptr [ %3, %vector.memcheck ], [ %3, %.lr.ph.preheader ], [ %ind.end57, %middle.block ]
  %55 = sub i32 %0, %.02436.ph
  %xtraiter = and i32 %55, 3
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader133, %.lr.ph.prol
  %.237.prol = phi ptr [ %57, %.lr.ph.prol ], [ %.237.ph, %.lr.ph.preheader133 ]
  %.02436.prol = phi i32 [ %61, %.lr.ph.prol ], [ %.02436.ph, %.lr.ph.preheader133 ]
  %.22735.prol = phi ptr [ %60, %.lr.ph.prol ], [ %.22735.ph, %.lr.ph.preheader133 ]
  %prol.iter = phi i32 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader133 ]
  %56 = load double, ptr %.22735.prol, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %.237.prol, i64 8
  %58 = load double, ptr %.237.prol, align 8, !tbaa !5
  %59 = tail call double @llvm.fmuladd.f64(double %2, double %58, double %56)
  %60 = getelementptr inbounds i8, ptr %.22735.prol, i64 8
  store double %59, ptr %.22735.prol, align 8, !tbaa !5
  %61 = add nuw nsw i32 %.02436.prol, 1
  %prol.iter.next = add i32 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !21

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader133
  %.237.unr = phi ptr [ %.237.ph, %.lr.ph.preheader133 ], [ %57, %.lr.ph.prol ]
  %.02436.unr = phi i32 [ %.02436.ph, %.lr.ph.preheader133 ], [ %61, %.lr.ph.prol ]
  %.22735.unr = phi ptr [ %.22735.ph, %.lr.ph.preheader133 ], [ %60, %.lr.ph.prol ]
  %62 = sub i32 %.02436.ph, %0
  %63 = icmp ugt i32 %62, -4
  br i1 %63, label %.loopexit, label %.lr.ph

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %64 = add nsw i32 %0, -1
  %65 = zext i32 %64 to i64
  %66 = shl nuw nsw i64 %65, 3
  %67 = add nuw nsw i64 %66, 8
  %scevgep = getelementptr i8, ptr %3, i64 %67
  %scevgep54 = getelementptr i8, ptr %1, i64 %67
  %bound0 = icmp ugt ptr %scevgep54, %3
  %bound1 = icmp ugt ptr %scevgep, %1
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.preheader133, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %54, 2147483644
  %68 = shl nuw nsw i64 %n.vec, 3
  %ind.end = getelementptr i8, ptr %1, i64 %68
  %ind.end55 = trunc nuw nsw i64 %n.vec to i32
  %69 = shl nuw nsw i64 %n.vec, 3
  %ind.end57 = getelementptr i8, ptr %3, i64 %69
  %broadcast.splatinsert = insertelement <2 x double> poison, double %2, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 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, 3
  %next.gep = getelementptr i8, ptr %1, i64 %offset.idx
  %offset.idx60 = shl i64 %index, 3
  %next.gep61 = getelementptr i8, ptr %3, i64 %offset.idx60
  %70 = getelementptr i8, ptr %next.gep61, i64 16
  %wide.load = load <2 x double>, ptr %next.gep61, align 8, !tbaa !5, !alias.scope !22, !noalias !25
  %wide.load63 = load <2 x double>, ptr %70, align 8, !tbaa !5, !alias.scope !22, !noalias !25
  %71 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load64 = load <2 x double>, ptr %next.gep, align 8, !tbaa !5, !alias.scope !25
  %wide.load65 = load <2 x double>, ptr %71, align 8, !tbaa !5, !alias.scope !25
  %72 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load64, <2 x double> %wide.load)
  %73 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load65, <2 x double> %wide.load63)
  store <2 x double> %72, ptr %next.gep61, align 8, !tbaa !5, !alias.scope !22, !noalias !25
  store <2 x double> %73, ptr %70, align 8, !tbaa !5, !alias.scope !22, !noalias !25
  %index.next = add nuw i64 %index, 4
  %74 = icmp eq i64 %index.next, %n.vec
  br i1 %74, label %middle.block, label %vector.body, !llvm.loop !27

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %54
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.preheader133

.preheader31:                                     ; preds = %51
  br i1 %53, label %.lr.ph41.preheader, label %.loopexit

.lr.ph41.preheader:                               ; preds = %.preheader31
  %75 = zext nneg i32 %0 to i64
  %min.iters.check74 = icmp ult i32 %0, 10
  br i1 %min.iters.check74, label %.lr.ph41.preheader131, label %vector.memcheck66

vector.memcheck66:                                ; preds = %.lr.ph41.preheader
  %76 = add nsw i32 %0, -1
  %77 = zext i32 %76 to i64
  %78 = shl nuw nsw i64 %77, 3
  %79 = add nuw nsw i64 %78, 8
  %scevgep67 = getelementptr i8, ptr %3, i64 %79
  %scevgep68 = getelementptr i8, ptr %1, i64 %79
  %bound069 = icmp ugt ptr %scevgep68, %3
  %bound170 = icmp ugt ptr %scevgep67, %1
  %found.conflict71 = and i1 %bound069, %bound170
  br i1 %found.conflict71, label %.lr.ph41.preheader131, label %vector.ph75

vector.ph75:                                      ; preds = %vector.memcheck66
  %n.vec77 = and i64 %75, 2147483644
  %80 = shl nuw nsw i64 %n.vec77, 3
  %ind.end78 = getelementptr i8, ptr %1, i64 %80
  %81 = shl nuw nsw i64 %n.vec77, 3
  %ind.end80 = getelementptr i8, ptr %3, i64 %81
  %ind.end82 = trunc nuw nsw i64 %n.vec77 to i32
  br label %vector.body84

vector.body84:                                    ; preds = %vector.body84, %vector.ph75
  %index85 = phi i64 [ 0, %vector.ph75 ], [ %index.next96, %vector.body84 ]
  %offset.idx86 = shl i64 %index85, 3
  %next.gep87 = getelementptr i8, ptr %1, i64 %offset.idx86
  %offset.idx89 = shl i64 %index85, 3
  %next.gep90 = getelementptr i8, ptr %3, i64 %offset.idx89
  %82 = getelementptr i8, ptr %next.gep90, i64 16
  %wide.load92 = load <2 x double>, ptr %next.gep90, align 8, !tbaa !5, !alias.scope !28, !noalias !31
  %wide.load93 = load <2 x double>, ptr %82, align 8, !tbaa !5, !alias.scope !28, !noalias !31
  %83 = getelementptr i8, ptr %next.gep87, i64 16
  %wide.load94 = load <2 x double>, ptr %next.gep87, align 8, !tbaa !5, !alias.scope !31
  %wide.load95 = load <2 x double>, ptr %83, align 8, !tbaa !5, !alias.scope !31
  %84 = fsub <2 x double> %wide.load92, %wide.load94
  %85 = fsub <2 x double> %wide.load93, %wide.load95
  store <2 x double> %84, ptr %next.gep90, align 8, !tbaa !5, !alias.scope !28, !noalias !31
  store <2 x double> %85, ptr %82, align 8, !tbaa !5, !alias.scope !28, !noalias !31
  %index.next96 = add nuw i64 %index85, 4
  %86 = icmp eq i64 %index.next96, %n.vec77
  br i1 %86, label %middle.block72, label %vector.body84, !llvm.loop !33

middle.block72:                                   ; preds = %vector.body84
  %cmp.n97 = icmp eq i64 %n.vec77, %75
  br i1 %cmp.n97, label %.loopexit, label %.lr.ph41.preheader131

.lr.ph41.preheader131:                            ; preds = %middle.block72, %vector.memcheck66, %.lr.ph41.preheader
  %.140.ph = phi ptr [ %1, %vector.memcheck66 ], [ %1, %.lr.ph41.preheader ], [ %ind.end78, %middle.block72 ]
  %.12639.ph = phi ptr [ %3, %vector.memcheck66 ], [ %3, %.lr.ph41.preheader ], [ %ind.end80, %middle.block72 ]
  %.02838.ph = phi i32 [ 0, %vector.memcheck66 ], [ 0, %.lr.ph41.preheader ], [ %ind.end82, %middle.block72 ]
  %87 = sub i32 %0, %.02838.ph
  %xtraiter135 = and i32 %87, 3
  %lcmp.mod136.not = icmp eq i32 %xtraiter135, 0
  br i1 %lcmp.mod136.not, label %.lr.ph41.prol.loopexit, label %.lr.ph41.prol

.lr.ph41.prol:                                    ; preds = %.lr.ph41.preheader131, %.lr.ph41.prol
  %.140.prol = phi ptr [ %89, %.lr.ph41.prol ], [ %.140.ph, %.lr.ph41.preheader131 ]
  %.12639.prol = phi ptr [ %92, %.lr.ph41.prol ], [ %.12639.ph, %.lr.ph41.preheader131 ]
  %.02838.prol = phi i32 [ %93, %.lr.ph41.prol ], [ %.02838.ph, %.lr.ph41.preheader131 ]
  %prol.iter137 = phi i32 [ %prol.iter137.next, %.lr.ph41.prol ], [ 0, %.lr.ph41.preheader131 ]
  %88 = load double, ptr %.12639.prol, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %.140.prol, i64 8
  %90 = load double, ptr %.140.prol, align 8, !tbaa !5
  %91 = fsub double %88, %90
  %92 = getelementptr inbounds i8, ptr %.12639.prol, i64 8
  store double %91, ptr %.12639.prol, align 8, !tbaa !5
  %93 = add nuw nsw i32 %.02838.prol, 1
  %prol.iter137.next = add i32 %prol.iter137, 1
  %prol.iter137.cmp.not = icmp eq i32 %prol.iter137.next, %xtraiter135
  br i1 %prol.iter137.cmp.not, label %.lr.ph41.prol.loopexit, label %.lr.ph41.prol, !llvm.loop !34

.lr.ph41.prol.loopexit:                           ; preds = %.lr.ph41.prol, %.lr.ph41.preheader131
  %.140.unr = phi ptr [ %.140.ph, %.lr.ph41.preheader131 ], [ %89, %.lr.ph41.prol ]
  %.12639.unr = phi ptr [ %.12639.ph, %.lr.ph41.preheader131 ], [ %92, %.lr.ph41.prol ]
  %.02838.unr = phi i32 [ %.02838.ph, %.lr.ph41.preheader131 ], [ %93, %.lr.ph41.prol ]
  %94 = sub i32 %.02838.ph, %0
  %95 = icmp ugt i32 %94, -4
  br i1 %95, label %.loopexit, label %.lr.ph41

.lr.ph41:                                         ; preds = %.lr.ph41.prol.loopexit, %.lr.ph41
  %.140 = phi ptr [ %112, %.lr.ph41 ], [ %.140.unr, %.lr.ph41.prol.loopexit ]
  %.12639 = phi ptr [ %115, %.lr.ph41 ], [ %.12639.unr, %.lr.ph41.prol.loopexit ]
  %.02838 = phi i32 [ %116, %.lr.ph41 ], [ %.02838.unr, %.lr.ph41.prol.loopexit ]
  %96 = load double, ptr %.12639, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %.140, i64 8
  %98 = load double, ptr %.140, align 8, !tbaa !5
  %99 = fsub double %96, %98
  %100 = getelementptr inbounds i8, ptr %.12639, i64 8
  store double %99, ptr %.12639, align 8, !tbaa !5
  %101 = load double, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %.140, i64 16
  %103 = load double, ptr %97, align 8, !tbaa !5
  %104 = fsub double %101, %103
  %105 = getelementptr inbounds i8, ptr %.12639, i64 16
  store double %104, ptr %100, align 8, !tbaa !5
  %106 = load double, ptr %105, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %.140, i64 24
  %108 = load double, ptr %102, align 8, !tbaa !5
  %109 = fsub double %106, %108
  %110 = getelementptr inbounds i8, ptr %.12639, i64 24
  store double %109, ptr %105, align 8, !tbaa !5
  %111 = load double, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %.140, i64 32
  %113 = load double, ptr %107, align 8, !tbaa !5
  %114 = fsub double %111, %113
  %115 = getelementptr inbounds i8, ptr %.12639, i64 32
  store double %114, ptr %110, align 8, !tbaa !5
  %116 = add nuw nsw i32 %.02838, 4
  %exitcond48.not.3 = icmp eq i32 %116, %0
  br i1 %exitcond48.not.3, label %.loopexit, label %.lr.ph41, !llvm.loop !35

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.237 = phi ptr [ %133, %.lr.ph ], [ %.237.unr, %.lr.ph.prol.loopexit ]
  %.02436 = phi i32 [ %137, %.lr.ph ], [ %.02436.unr, %.lr.ph.prol.loopexit ]
  %.22735 = phi ptr [ %136, %.lr.ph ], [ %.22735.unr, %.lr.ph.prol.loopexit ]
  %117 = load double, ptr %.22735, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %.237, i64 8
  %119 = load double, ptr %.237, align 8, !tbaa !5
  %120 = tail call double @llvm.fmuladd.f64(double %2, double %119, double %117)
  %121 = getelementptr inbounds i8, ptr %.22735, i64 8
  store double %120, ptr %.22735, align 8, !tbaa !5
  %122 = load double, ptr %121, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %.237, i64 16
  %124 = load double, ptr %118, align 8, !tbaa !5
  %125 = tail call double @llvm.fmuladd.f64(double %2, double %124, double %122)
  %126 = getelementptr inbounds i8, ptr %.22735, i64 16
  store double %125, ptr %121, align 8, !tbaa !5
  %127 = load double, ptr %126, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %.237, i64 24
  %129 = load double, ptr %123, align 8, !tbaa !5
  %130 = tail call double @llvm.fmuladd.f64(double %2, double %129, double %127)
  %131 = getelementptr inbounds i8, ptr %.22735, i64 24
  store double %130, ptr %126, align 8, !tbaa !5
  %132 = load double, ptr %131, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %.237, i64 32
  %134 = load double, ptr %128, align 8, !tbaa !5
  %135 = tail call double @llvm.fmuladd.f64(double %2, double %134, double %132)
  %136 = getelementptr inbounds i8, ptr %.22735, i64 32
  store double %135, ptr %131, align 8, !tbaa !5
  %137 = add nuw nsw i32 %.02436, 4
  %exitcond.not.3 = icmp eq i32 %137, %0
  br i1 %exitcond.not.3, label %.loopexit, label %.lr.ph, !llvm.loop !36

.loopexit:                                        ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %.lr.ph41.prol.loopexit, %.lr.ph41, %.lr.ph45.prol.loopexit, %.lr.ph45, %middle.block, %middle.block72, %middle.block104, %.preheader33, %.preheader31, %.preheader, %4
  ret void
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #2

attributes #0 = { mustprogress nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) 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 speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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++ TBAA"}
!9 = !{!10}
!10 = distinct !{!10, !11}
!11 = distinct !{!11, !"LVerDomain"}
!12 = !{!13}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.unroll.disable"}
!20 = distinct !{!20, !15, !16}
!21 = distinct !{!21, !19}
!22 = !{!23}
!23 = distinct !{!23, !24}
!24 = distinct !{!24, !"LVerDomain"}
!25 = !{!26}
!26 = distinct !{!26, !24}
!27 = distinct !{!27, !15, !16, !17}
!28 = !{!29}
!29 = distinct !{!29, !30}
!30 = distinct !{!30, !"LVerDomain"}
!31 = !{!32}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !15, !16, !17}
!34 = distinct !{!34, !19}
!35 = distinct !{!35, !15, !16}
!36 = distinct !{!36, !15, !16}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass