; LLVM IR from CLASS-SZ/class_sz :: class-sz/tools (r8lib)

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @r8vec_polarize(i32 noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca double, align 8
  %12 = alloca i32, align 4
  %13 = alloca double, align 8
  %14 = 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
  store ptr %4, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store double 0.000000e+00, ptr %13, align 8, !tbaa !11
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %28, %5
  %16 = load i32, ptr %12, align 4, !tbaa !5
  %17 = load i32, ptr %6, align 4, !tbaa !5
  %18 = icmp slt i32 %16, %17
  br i1 %18, label %19, label %31

19:                                               ; preds = %15
  %20 = load double, ptr %13, align 8, !tbaa !11
  %21 = load ptr, ptr %8, align 8, !tbaa !9
  %22 = load i32, ptr %12, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds double, ptr %21, i64 %23
  %25 = load double, ptr %24, align 8, !tbaa !11
  %26 = call double @pow(double noundef %25, double noundef 2.000000e+00) #4
  %27 = fadd double %20, %26
  store double %27, ptr %13, align 8, !tbaa !11
  br label %28

28:                                               ; preds = %19
  %29 = load i32, ptr %12, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %12, align 4, !tbaa !5
  br label %15, !llvm.loop !13

31:                                               ; preds = %15
  %32 = load double, ptr %13, align 8, !tbaa !11
  %33 = call double @sqrt(double noundef %32) #4
  store double %33, ptr %13, align 8, !tbaa !11
  %34 = load double, ptr %13, align 8, !tbaa !11
  %35 = fcmp oeq double %34, 0.000000e+00
  br i1 %35, label %36, label %68

36:                                               ; preds = %31
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %51, %36
  %38 = load i32, ptr %12, align 4, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %41, label %54

41:                                               ; preds = %37
  %42 = load ptr, ptr %7, align 8, !tbaa !9
  %43 = load i32, ptr %12, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds double, ptr %42, i64 %44
  %46 = load double, ptr %45, align 8, !tbaa !11
  %47 = load ptr, ptr %9, align 8, !tbaa !9
  %48 = load i32, ptr %12, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds double, ptr %47, i64 %49
  store double %46, ptr %50, align 8, !tbaa !11
  br label %51

51:                                               ; preds = %41
  %52 = load i32, ptr %12, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %12, align 4, !tbaa !5
  br label %37, !llvm.loop !15

54:                                               ; preds = %37
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %64, %54
  %56 = load i32, ptr %12, align 4, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %67

59:                                               ; preds = %55
  %60 = load ptr, ptr %10, align 8, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds double, ptr %60, i64 %62
  store double 0.000000e+00, ptr %63, align 8, !tbaa !11
  br label %64

64:                                               ; preds = %59
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %12, align 4, !tbaa !5
  br label %55, !llvm.loop !16

67:                                               ; preds = %55
  store i32 1, ptr %14, align 4
  br label %139

68:                                               ; preds = %31
  store double 0.000000e+00, ptr %11, align 8, !tbaa !11
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %86, %68
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %73, label %89

73:                                               ; preds = %69
  %74 = load double, ptr %11, align 8, !tbaa !11
  %75 = load ptr, ptr %7, align 8, !tbaa !9
  %76 = load i32, ptr %12, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds double, ptr %75, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !11
  %80 = load ptr, ptr %8, align 8, !tbaa !9
  %81 = load i32, ptr %12, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds double, ptr %80, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = call double @llvm.fmuladd.f64(double %79, double %84, double %74)
  store double %85, ptr %11, align 8, !tbaa !11
  br label %86

86:                                               ; preds = %73
  %87 = load i32, ptr %12, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %12, align 4, !tbaa !5
  br label %69, !llvm.loop !17

89:                                               ; preds = %69
  %90 = load double, ptr %11, align 8, !tbaa !11
  %91 = load double, ptr %13, align 8, !tbaa !11
  %92 = fdiv double %90, %91
  store double %92, ptr %11, align 8, !tbaa !11
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %93

93:                                               ; preds = %111, %89
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %97, label %114

97:                                               ; preds = %93
  %98 = load double, ptr %11, align 8, !tbaa !11
  %99 = load ptr, ptr %8, align 8, !tbaa !9
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !11
  %104 = fmul double %98, %103
  %105 = load double, ptr %13, align 8, !tbaa !11
  %106 = fdiv double %104, %105
  %107 = load ptr, ptr %10, align 8, !tbaa !9
  %108 = load i32, ptr %12, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  store double %106, ptr %110, align 8, !tbaa !11
  br label %111

111:                                              ; preds = %97
  %112 = load i32, ptr %12, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %12, align 4, !tbaa !5
  br label %93, !llvm.loop !18

114:                                              ; preds = %93
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %135, %114
  %116 = load i32, ptr %12, align 4, !tbaa !5
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %119, label %138

119:                                              ; preds = %115
  %120 = load ptr, ptr %7, align 8, !tbaa !9
  %121 = load i32, ptr %12, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds double, ptr %120, i64 %122
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = load ptr, ptr %10, align 8, !tbaa !9
  %126 = load i32, ptr %12, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds double, ptr %125, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !11
  %130 = fsub double %124, %129
  %131 = load ptr, ptr %9, align 8, !tbaa !9
  %132 = load i32, ptr %12, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds double, ptr %131, i64 %133
  store double %130, ptr %134, align 8, !tbaa !11
  br label %135

135:                                              ; preds = %119
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %12, align 4, !tbaa !5
  br label %115, !llvm.loop !19

138:                                              ; preds = %115
  store i32 1, ptr %14, align 4
  br label %139

139:                                              ; preds = %138, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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 = { 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/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}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind memory(write, argmem: readwrite) uwtable
define dso_local void @r8vec_polarize(i32 noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef %4) local_unnamed_addr #2 {
  %6 = ptrtoint ptr %1 to i64
  %7 = ptrtoint ptr %3 to i64
  %8 = ptrtoint ptr %4 to i64
  %9 = ptrtoint ptr %1 to i64
  %10 = ptrtoint ptr %3 to i64
  %11 = ptrtoint ptr %2 to i64
  %12 = ptrtoint ptr %4 to i64
  %13 = icmp sgt i32 %0, 0
  br i1 %13, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %5
  %wide.trip.count = zext nneg i32 %0 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %14 = icmp ult i32 %0, 4
  br i1 %14, label %._crit_edge.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %.056 = phi double [ 0.000000e+00, %.lr.ph.preheader.new ], [ %26, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %15 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  %16 = load double, ptr %15, align 8, !tbaa !5
  %square = fmul double %16, %16
  %17 = fadd double %.056, %square
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %18 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next
  %19 = load double, ptr %18, align 8, !tbaa !5
  %square.1 = fmul double %19, %19
  %20 = fadd double %17, %square.1
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %21 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.1
  %22 = load double, ptr %21, align 8, !tbaa !5
  %square.2 = fmul double %22, %22
  %23 = fadd double %20, %square.2
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %24 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.2
  %25 = load double, ptr %24, align 8, !tbaa !5
  %square.3 = fmul double %25, %25
  %26 = fadd double %23, %square.3
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %.lr.ph, !llvm.loop !9

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa140.ph = phi double [ poison, %.lr.ph.preheader ], [ %26, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.056.unr = phi double [ 0.000000e+00, %.lr.ph.preheader ], [ %26, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %.056.epil = phi double [ %29, %.lr.ph.epil ], [ %.056.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.unr-lcssa ]
  %27 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.epil
  %28 = load double, ptr %27, align 8, !tbaa !5
  %square.epil = fmul double %28, %28
  %29 = fadd double %.056.epil, %square.epil
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.unr-lcssa
  %.lcssa140 = phi double [ %.lcssa140.ph, %._crit_edge.unr-lcssa ], [ %29, %.lr.ph.epil ]
  %30 = tail call double @sqrt(double noundef %.lcssa140) #4
  %31 = fcmp oeq double %30, 0.000000e+00
  br i1 %31, label %.preheader51, label %.preheader54

.preheader54:                                     ; preds = %._crit_edge
  br i1 %13, label %.lr.ph59.preheader, label %.loopexit

.lr.ph59.preheader:                               ; preds = %.preheader54
  %xtraiter142 = and i64 %wide.trip.count, 3
  %32 = icmp ult i32 %0, 4
  br i1 %32, label %._crit_edge60.unr-lcssa, label %.lr.ph59.preheader.new

.lr.ph59.preheader.new:                           ; preds = %.lr.ph59.preheader
  %unroll_iter146 = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph59

.preheader51:                                     ; preds = %._crit_edge
  br i1 %13, label %.lr.ph68.preheader, label %.loopexit

.lr.ph68.preheader:                               ; preds = %.preheader51
  %wide.trip.count92 = zext nneg i32 %0 to i64
  %min.iters.check125 = icmp ult i32 %0, 6
  %33 = sub i64 %7, %6
  %diff.check122 = icmp ult i64 %33, 32
  %or.cond = or i1 %min.iters.check125, %diff.check122
  br i1 %or.cond, label %.lr.ph68.preheader137, label %vector.ph126

.lr.ph68.preheader137:                            ; preds = %middle.block123, %.lr.ph68.preheader
  %indvars.iv89.ph = phi i64 [ 0, %.lr.ph68.preheader ], [ %n.vec128, %middle.block123 ]
  %xtraiter153 = and i64 %wide.trip.count, 3
  %lcmp.mod154.not = icmp eq i64 %xtraiter153, 0
  br i1 %lcmp.mod154.not, label %.lr.ph68.prol.loopexit, label %.lr.ph68.prol

.lr.ph68.prol:                                    ; preds = %.lr.ph68.preheader137, %.lr.ph68.prol
  %indvars.iv89.prol = phi i64 [ %indvars.iv.next90.prol, %.lr.ph68.prol ], [ %indvars.iv89.ph, %.lr.ph68.preheader137 ]
  %prol.iter155 = phi i64 [ %prol.iter155.next, %.lr.ph68.prol ], [ 0, %.lr.ph68.preheader137 ]
  %34 = getelementptr inbounds double, ptr %1, i64 %indvars.iv89.prol
  %35 = load double, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds double, ptr %3, i64 %indvars.iv89.prol
  store double %35, ptr %36, align 8, !tbaa !5
  %indvars.iv.next90.prol = add nuw nsw i64 %indvars.iv89.prol, 1
  %prol.iter155.next = add i64 %prol.iter155, 1
  %prol.iter155.cmp.not = icmp eq i64 %prol.iter155.next, %xtraiter153
  br i1 %prol.iter155.cmp.not, label %.lr.ph68.prol.loopexit, label %.lr.ph68.prol, !llvm.loop !13

.lr.ph68.prol.loopexit:                           ; preds = %.lr.ph68.prol, %.lr.ph68.preheader137
  %indvars.iv89.unr = phi i64 [ %indvars.iv89.ph, %.lr.ph68.preheader137 ], [ %indvars.iv.next90.prol, %.lr.ph68.prol ]
  %37 = sub nsw i64 %indvars.iv89.ph, %wide.trip.count
  %38 = icmp ugt i64 %37, -4
  br i1 %38, label %.preheader, label %.lr.ph68

vector.ph126:                                     ; preds = %.lr.ph68.preheader
  %n.vec128 = and i64 %wide.trip.count, 2147483644
  br label %vector.body130

vector.body130:                                   ; preds = %vector.body130, %vector.ph126
  %index131 = phi i64 [ 0, %vector.ph126 ], [ %index.next134, %vector.body130 ]
  %39 = getelementptr inbounds double, ptr %1, i64 %index131
  %40 = getelementptr inbounds i8, ptr %39, i64 16
  %wide.load132 = load <2 x double>, ptr %39, align 8, !tbaa !5
  %wide.load133 = load <2 x double>, ptr %40, align 8, !tbaa !5
  %41 = getelementptr inbounds double, ptr %3, i64 %index131
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  store <2 x double> %wide.load132, ptr %41, align 8, !tbaa !5
  store <2 x double> %wide.load133, ptr %42, align 8, !tbaa !5
  %index.next134 = add nuw i64 %index131, 4
  %43 = icmp eq i64 %index.next134, %n.vec128
  br i1 %43, label %middle.block123, label %vector.body130, !llvm.loop !14

middle.block123:                                  ; preds = %vector.body130
  %cmp.n135 = icmp eq i64 %n.vec128, %wide.trip.count
  br i1 %cmp.n135, label %.preheader, label %.lr.ph68.preheader137

.preheader:                                       ; preds = %.lr.ph68.prol.loopexit, %.lr.ph68, %middle.block123
  br i1 %13, label %.lr.ph70.preheader, label %.loopexit

.lr.ph70.preheader:                               ; preds = %.preheader
  %44 = zext nneg i32 %0 to i64
  %45 = shl nuw nsw i64 %44, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %4, i8 0, i64 %45, i1 false), !tbaa !5
  br label %.loopexit

.lr.ph68:                                         ; preds = %.lr.ph68.prol.loopexit, %.lr.ph68
  %indvars.iv89 = phi i64 [ %indvars.iv.next90.3, %.lr.ph68 ], [ %indvars.iv89.unr, %.lr.ph68.prol.loopexit ]
  %46 = getelementptr inbounds double, ptr %1, i64 %indvars.iv89
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds double, ptr %3, i64 %indvars.iv89
  store double %47, ptr %48, align 8, !tbaa !5
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %49 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next90
  %50 = load double, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next90
  store double %50, ptr %51, align 8, !tbaa !5
  %indvars.iv.next90.1 = add nuw nsw i64 %indvars.iv89, 2
  %52 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next90.1
  %53 = load double, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next90.1
  store double %53, ptr %54, align 8, !tbaa !5
  %indvars.iv.next90.2 = add nuw nsw i64 %indvars.iv89, 3
  %55 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next90.2
  %56 = load double, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next90.2
  store double %56, ptr %57, align 8, !tbaa !5
  %indvars.iv.next90.3 = add nuw nsw i64 %indvars.iv89, 4
  %exitcond93.not.3 = icmp eq i64 %indvars.iv.next90.3, %wide.trip.count92
  br i1 %exitcond93.not.3, label %.preheader, label %.lr.ph68, !llvm.loop !17

.lr.ph59:                                         ; preds = %.lr.ph59, %.lr.ph59.preheader.new
  %indvars.iv74 = phi i64 [ 0, %.lr.ph59.preheader.new ], [ %indvars.iv.next75.3, %.lr.ph59 ]
  %.04857 = phi double [ 0.000000e+00, %.lr.ph59.preheader.new ], [ %77, %.lr.ph59 ]
  %niter147 = phi i64 [ 0, %.lr.ph59.preheader.new ], [ %niter147.next.3, %.lr.ph59 ]
  %58 = getelementptr inbounds double, ptr %1, i64 %indvars.iv74
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = getelementptr inbounds double, ptr %2, i64 %indvars.iv74
  %61 = load double, ptr %60, align 8, !tbaa !5
  %62 = tail call double @llvm.fmuladd.f64(double %59, double %61, double %.04857)
  %indvars.iv.next75 = or disjoint i64 %indvars.iv74, 1
  %63 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next75
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next75
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = tail call double @llvm.fmuladd.f64(double %64, double %66, double %62)
  %indvars.iv.next75.1 = or disjoint i64 %indvars.iv74, 2
  %68 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next75.1
  %69 = load double, ptr %68, align 8, !tbaa !5
  %70 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next75.1
  %71 = load double, ptr %70, align 8, !tbaa !5
  %72 = tail call double @llvm.fmuladd.f64(double %69, double %71, double %67)
  %indvars.iv.next75.2 = or disjoint i64 %indvars.iv74, 3
  %73 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next75.2
  %74 = load double, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next75.2
  %76 = load double, ptr %75, align 8, !tbaa !5
  %77 = tail call double @llvm.fmuladd.f64(double %74, double %76, double %72)
  %indvars.iv.next75.3 = add nuw nsw i64 %indvars.iv74, 4
  %niter147.next.3 = add i64 %niter147, 4
  %niter147.ncmp.3 = icmp eq i64 %niter147.next.3, %unroll_iter146
  br i1 %niter147.ncmp.3, label %._crit_edge60.unr-lcssa, label %.lr.ph59, !llvm.loop !18

._crit_edge60.unr-lcssa:                          ; preds = %.lr.ph59, %.lr.ph59.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph59.preheader ], [ %77, %.lr.ph59 ]
  %indvars.iv74.unr = phi i64 [ 0, %.lr.ph59.preheader ], [ %indvars.iv.next75.3, %.lr.ph59 ]
  %.04857.unr = phi double [ 0.000000e+00, %.lr.ph59.preheader ], [ %77, %.lr.ph59 ]
  %lcmp.mod144.not = icmp eq i64 %xtraiter142, 0
  br i1 %lcmp.mod144.not, label %._crit_edge60, label %.lr.ph59.epil

.lr.ph59.epil:                                    ; preds = %._crit_edge60.unr-lcssa, %.lr.ph59.epil
  %indvars.iv74.epil = phi i64 [ %indvars.iv.next75.epil, %.lr.ph59.epil ], [ %indvars.iv74.unr, %._crit_edge60.unr-lcssa ]
  %.04857.epil = phi double [ %82, %.lr.ph59.epil ], [ %.04857.unr, %._crit_edge60.unr-lcssa ]
  %epil.iter143 = phi i64 [ %epil.iter143.next, %.lr.ph59.epil ], [ 0, %._crit_edge60.unr-lcssa ]
  %78 = getelementptr inbounds double, ptr %1, i64 %indvars.iv74.epil
  %79 = load double, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds double, ptr %2, i64 %indvars.iv74.epil
  %81 = load double, ptr %80, align 8, !tbaa !5
  %82 = tail call double @llvm.fmuladd.f64(double %79, double %81, double %.04857.epil)
  %indvars.iv.next75.epil = add nuw nsw i64 %indvars.iv74.epil, 1
  %epil.iter143.next = add i64 %epil.iter143, 1
  %epil.iter143.cmp.not = icmp eq i64 %epil.iter143.next, %xtraiter142
  br i1 %epil.iter143.cmp.not, label %._crit_edge60, label %.lr.ph59.epil, !llvm.loop !19

._crit_edge60:                                    ; preds = %.lr.ph59.epil, %._crit_edge60.unr-lcssa
  %.lcssa = phi double [ %.lcssa.ph, %._crit_edge60.unr-lcssa ], [ %82, %.lr.ph59.epil ]
  %83 = fdiv double %.lcssa, %30
  br i1 %13, label %.lr.ph64.preheader, label %.loopexit

.lr.ph64.preheader:                               ; preds = %._crit_edge60
  %wide.trip.count82 = zext nneg i32 %0 to i64
  %min.iters.check = icmp eq i32 %0, 1
  %84 = sub i64 %12, %11
  %diff.check = icmp ult i64 %84, 16
  %or.cond136 = or i1 %min.iters.check, %diff.check
  br i1 %or.cond136, label %.lr.ph64.preheader139, label %vector.ph

.lr.ph64.preheader139:                            ; preds = %middle.block, %.lr.ph64.preheader
  %indvars.iv79.ph = phi i64 [ 0, %.lr.ph64.preheader ], [ %n.vec, %middle.block ]
  %85 = sub nsw i64 %wide.trip.count, %indvars.iv79.ph
  %xtraiter148 = and i64 %85, 3
  %lcmp.mod149.not = icmp eq i64 %xtraiter148, 0
  br i1 %lcmp.mod149.not, label %.lr.ph64.prol.loopexit, label %.lr.ph64.prol

.lr.ph64.prol:                                    ; preds = %.lr.ph64.preheader139, %.lr.ph64.prol
  %indvars.iv79.prol = phi i64 [ %indvars.iv.next80.prol, %.lr.ph64.prol ], [ %indvars.iv79.ph, %.lr.ph64.preheader139 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph64.prol ], [ 0, %.lr.ph64.preheader139 ]
  %86 = getelementptr inbounds double, ptr %2, i64 %indvars.iv79.prol
  %87 = load double, ptr %86, align 8, !tbaa !5
  %88 = fmul double %83, %87
  %89 = fdiv double %88, %30
  %90 = getelementptr inbounds double, ptr %4, i64 %indvars.iv79.prol
  store double %89, ptr %90, align 8, !tbaa !5
  %indvars.iv.next80.prol = add nuw nsw i64 %indvars.iv79.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter148
  br i1 %prol.iter.cmp.not, label %.lr.ph64.prol.loopexit, label %.lr.ph64.prol, !llvm.loop !20

.lr.ph64.prol.loopexit:                           ; preds = %.lr.ph64.prol, %.lr.ph64.preheader139
  %indvars.iv79.unr = phi i64 [ %indvars.iv79.ph, %.lr.ph64.preheader139 ], [ %indvars.iv.next80.prol, %.lr.ph64.prol ]
  %91 = sub nsw i64 %indvars.iv79.ph, %wide.trip.count
  %92 = icmp ugt i64 %91, -4
  br i1 %92, label %.preheader52, label %.lr.ph64

vector.ph:                                        ; preds = %.lr.ph64.preheader
  %n.vec = and i64 %wide.trip.count, 2147483646
  %broadcast.splatinsert = insertelement <2 x double> poison, double %83, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert101 = insertelement <2 x double> poison, double %30, i64 0
  %broadcast.splat102 = shufflevector <2 x double> %broadcast.splatinsert101, <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 ]
  %93 = getelementptr inbounds double, ptr %2, i64 %index
  %wide.load = load <2 x double>, ptr %93, align 8, !tbaa !5
  %94 = fmul <2 x double> %broadcast.splat, %wide.load
  %95 = fdiv <2 x double> %94, %broadcast.splat102
  %96 = getelementptr inbounds double, ptr %4, i64 %index
  store <2 x double> %95, ptr %96, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 2
  %97 = icmp eq i64 %index.next, %n.vec
  br i1 %97, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader52, label %.lr.ph64.preheader139

.preheader52:                                     ; preds = %.lr.ph64.prol.loopexit, %.lr.ph64, %middle.block
  br i1 %13, label %.lr.ph66.preheader, label %.loopexit

.lr.ph66.preheader:                               ; preds = %.preheader52
  %wide.trip.count87 = zext nneg i32 %0 to i64
  %min.iters.check108 = icmp ult i32 %0, 8
  br i1 %min.iters.check108, label %.lr.ph66.preheader138, label %vector.memcheck103

.lr.ph66.preheader138:                            ; preds = %middle.block106, %vector.memcheck103, %.lr.ph66.preheader
  %indvars.iv84.ph = phi i64 [ 0, %vector.memcheck103 ], [ 0, %.lr.ph66.preheader ], [ %n.vec111, %middle.block106 ]
  %xtraiter150 = and i64 %wide.trip.count, 3
  %lcmp.mod151.not = icmp eq i64 %xtraiter150, 0
  br i1 %lcmp.mod151.not, label %.lr.ph66.prol.loopexit, label %.lr.ph66.prol

.lr.ph66.prol:                                    ; preds = %.lr.ph66.preheader138, %.lr.ph66.prol
  %indvars.iv84.prol = phi i64 [ %indvars.iv.next85.prol, %.lr.ph66.prol ], [ %indvars.iv84.ph, %.lr.ph66.preheader138 ]
  %prol.iter152 = phi i64 [ %prol.iter152.next, %.lr.ph66.prol ], [ 0, %.lr.ph66.preheader138 ]
  %98 = getelementptr inbounds double, ptr %1, i64 %indvars.iv84.prol
  %99 = load double, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds double, ptr %4, i64 %indvars.iv84.prol
  %101 = load double, ptr %100, align 8, !tbaa !5
  %102 = fsub double %99, %101
  %103 = getelementptr inbounds double, ptr %3, i64 %indvars.iv84.prol
  store double %102, ptr %103, align 8, !tbaa !5
  %indvars.iv.next85.prol = add nuw nsw i64 %indvars.iv84.prol, 1
  %prol.iter152.next = add i64 %prol.iter152, 1
  %prol.iter152.cmp.not = icmp eq i64 %prol.iter152.next, %xtraiter150
  br i1 %prol.iter152.cmp.not, label %.lr.ph66.prol.loopexit, label %.lr.ph66.prol, !llvm.loop !22

.lr.ph66.prol.loopexit:                           ; preds = %.lr.ph66.prol, %.lr.ph66.preheader138
  %indvars.iv84.unr = phi i64 [ %indvars.iv84.ph, %.lr.ph66.preheader138 ], [ %indvars.iv.next85.prol, %.lr.ph66.prol ]
  %104 = sub nsw i64 %indvars.iv84.ph, %wide.trip.count
  %105 = icmp ugt i64 %104, -4
  br i1 %105, label %.loopexit, label %.lr.ph66

vector.memcheck103:                               ; preds = %.lr.ph66.preheader
  %106 = sub i64 %10, %9
  %diff.check104 = icmp ult i64 %106, 32
  %107 = sub i64 %10, %8
  %diff.check105 = icmp ult i64 %107, 32
  %conflict.rdx = or i1 %diff.check104, %diff.check105
  br i1 %conflict.rdx, label %.lr.ph66.preheader138, label %vector.ph109

vector.ph109:                                     ; preds = %vector.memcheck103
  %n.vec111 = and i64 %wide.trip.count, 2147483644
  br label %vector.body113

vector.body113:                                   ; preds = %vector.body113, %vector.ph109
  %index114 = phi i64 [ 0, %vector.ph109 ], [ %index.next119, %vector.body113 ]
  %108 = getelementptr inbounds double, ptr %1, i64 %index114
  %109 = getelementptr inbounds i8, ptr %108, i64 16
  %wide.load115 = load <2 x double>, ptr %108, align 8, !tbaa !5
  %wide.load116 = load <2 x double>, ptr %109, align 8, !tbaa !5
  %110 = getelementptr inbounds double, ptr %4, i64 %index114
  %111 = getelementptr inbounds i8, ptr %110, i64 16
  %wide.load117 = load <2 x double>, ptr %110, align 8, !tbaa !5
  %wide.load118 = load <2 x double>, ptr %111, align 8, !tbaa !5
  %112 = fsub <2 x double> %wide.load115, %wide.load117
  %113 = fsub <2 x double> %wide.load116, %wide.load118
  %114 = getelementptr inbounds double, ptr %3, i64 %index114
  %115 = getelementptr inbounds i8, ptr %114, i64 16
  store <2 x double> %112, ptr %114, align 8, !tbaa !5
  store <2 x double> %113, ptr %115, align 8, !tbaa !5
  %index.next119 = add nuw i64 %index114, 4
  %116 = icmp eq i64 %index.next119, %n.vec111
  br i1 %116, label %middle.block106, label %vector.body113, !llvm.loop !23

middle.block106:                                  ; preds = %vector.body113
  %cmp.n120 = icmp eq i64 %n.vec111, %wide.trip.count
  br i1 %cmp.n120, label %.loopexit, label %.lr.ph66.preheader138

.lr.ph64:                                         ; preds = %.lr.ph64.prol.loopexit, %.lr.ph64
  %indvars.iv79 = phi i64 [ %indvars.iv.next80.3, %.lr.ph64 ], [ %indvars.iv79.unr, %.lr.ph64.prol.loopexit ]
  %117 = getelementptr inbounds double, ptr %2, i64 %indvars.iv79
  %118 = load double, ptr %117, align 8, !tbaa !5
  %119 = fmul double %83, %118
  %120 = fdiv double %119, %30
  %121 = getelementptr inbounds double, ptr %4, i64 %indvars.iv79
  store double %120, ptr %121, align 8, !tbaa !5
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %122 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next80
  %123 = load double, ptr %122, align 8, !tbaa !5
  %124 = fmul double %83, %123
  %125 = fdiv double %124, %30
  %126 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next80
  store double %125, ptr %126, align 8, !tbaa !5
  %indvars.iv.next80.1 = add nuw nsw i64 %indvars.iv79, 2
  %127 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next80.1
  %128 = load double, ptr %127, align 8, !tbaa !5
  %129 = fmul double %83, %128
  %130 = fdiv double %129, %30
  %131 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next80.1
  store double %130, ptr %131, align 8, !tbaa !5
  %indvars.iv.next80.2 = add nuw nsw i64 %indvars.iv79, 3
  %132 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next80.2
  %133 = load double, ptr %132, align 8, !tbaa !5
  %134 = fmul double %83, %133
  %135 = fdiv double %134, %30
  %136 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next80.2
  store double %135, ptr %136, align 8, !tbaa !5
  %indvars.iv.next80.3 = add nuw nsw i64 %indvars.iv79, 4
  %exitcond83.not.3 = icmp eq i64 %indvars.iv.next80.3, %wide.trip.count82
  br i1 %exitcond83.not.3, label %.preheader52, label %.lr.ph64, !llvm.loop !24

.lr.ph66:                                         ; preds = %.lr.ph66.prol.loopexit, %.lr.ph66
  %indvars.iv84 = phi i64 [ %indvars.iv.next85.3, %.lr.ph66 ], [ %indvars.iv84.unr, %.lr.ph66.prol.loopexit ]
  %137 = getelementptr inbounds double, ptr %1, i64 %indvars.iv84
  %138 = load double, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds double, ptr %4, i64 %indvars.iv84
  %140 = load double, ptr %139, align 8, !tbaa !5
  %141 = fsub double %138, %140
  %142 = getelementptr inbounds double, ptr %3, i64 %indvars.iv84
  store double %141, ptr %142, align 8, !tbaa !5
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %143 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next85
  %144 = load double, ptr %143, align 8, !tbaa !5
  %145 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next85
  %146 = load double, ptr %145, align 8, !tbaa !5
  %147 = fsub double %144, %146
  %148 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next85
  store double %147, ptr %148, align 8, !tbaa !5
  %indvars.iv.next85.1 = add nuw nsw i64 %indvars.iv84, 2
  %149 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next85.1
  %150 = load double, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next85.1
  %152 = load double, ptr %151, align 8, !tbaa !5
  %153 = fsub double %150, %152
  %154 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next85.1
  store double %153, ptr %154, align 8, !tbaa !5
  %indvars.iv.next85.2 = add nuw nsw i64 %indvars.iv84, 3
  %155 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next85.2
  %156 = load double, ptr %155, align 8, !tbaa !5
  %157 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next85.2
  %158 = load double, ptr %157, align 8, !tbaa !5
  %159 = fsub double %156, %158
  %160 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next85.2
  store double %159, ptr %160, align 8, !tbaa !5
  %indvars.iv.next85.3 = add nuw nsw i64 %indvars.iv84, 4
  %exitcond88.not.3 = icmp eq i64 %indvars.iv.next85.3, %wide.trip.count87
  br i1 %exitcond88.not.3, label %.loopexit, label %.lr.ph66, !llvm.loop !25

.loopexit:                                        ; preds = %.lr.ph66.prol.loopexit, %.lr.ph66, %middle.block106, %5, %.preheader54, %._crit_edge60, %.preheader51, %.lr.ph70.preheader, %.preheader52, %.preheader
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nofree nounwind memory(write, argmem: readwrite) 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !10, !15, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !10, !15}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !10, !15, !16}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !10, !15, !16}
!24 = distinct !{!24, !10, !15}
!25 = distinct !{!25, !10, !15}


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