; LLVM IR from simbody/simbody :: SimTKmath/Integrators/src/CPodes/sundials/src/sundials (sundials_dense)

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

19:                                               ; preds = %33, %7
  %20 = load i32, ptr %17, align 4, !tbaa !9
  %21 = load i32, ptr %10, align 4, !tbaa !9
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %23, label %36

23:                                               ; preds = %19
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  %25 = load i32, ptr %17, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds double, ptr %24, i64 %26
  %28 = load double, ptr %27, align 8, !tbaa !11
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  %30 = load i32, ptr %17, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds double, ptr %29, i64 %31
  store double %28, ptr %32, align 8, !tbaa !11
  br label %33

33:                                               ; preds = %23
  %34 = load i32, ptr %17, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %17, align 4, !tbaa !9
  br label %19, !llvm.loop !13

36:                                               ; preds = %19
  %37 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %37, ptr %17, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %47, %36
  %39 = load i32, ptr %17, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %50

42:                                               ; preds = %38
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  %44 = load i32, ptr %17, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds double, ptr %43, i64 %45
  store double 0.000000e+00, ptr %46, align 8, !tbaa !11
  br label %47

47:                                               ; preds = %42
  %48 = load i32, ptr %17, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %17, align 4, !tbaa !9
  br label %38, !llvm.loop !15

50:                                               ; preds = %38
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = sub nsw i32 %51, 1
  store i32 %52, ptr %18, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %138, %50
  %54 = load i32, ptr %18, align 4, !tbaa !9
  %55 = icmp sge i32 %54, 0
  br i1 %55, label %56, label %141

56:                                               ; preds = %53
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %18, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds ptr, ptr %57, i64 %59
  %61 = load ptr, ptr %60, align 8, !tbaa !5
  store ptr %61, ptr %15, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %62, i64 0
  store double 1.000000e+00, ptr %63, align 8, !tbaa !11
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = load i32, ptr %18, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !11
  store double %68, ptr %16, align 8, !tbaa !11
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %101, %56
  %70 = load i32, ptr %17, align 4, !tbaa !9
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = load i32, ptr %18, align 4, !tbaa !9
  %73 = sub nsw i32 %71, %72
  %74 = icmp slt i32 %70, %73
  br i1 %74, label %75, label %104

75:                                               ; preds = %69
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = load i32, ptr %17, align 4, !tbaa !9
  %78 = load i32, ptr %18, align 4, !tbaa !9
  %79 = add nsw i32 %77, %78
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds double, ptr %76, i64 %80
  %82 = load double, ptr %81, align 8, !tbaa !11
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = load i32, ptr %17, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  store double %82, ptr %86, align 8, !tbaa !11
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = load i32, ptr %17, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds double, ptr %87, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !11
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = load i32, ptr %17, align 4, !tbaa !9
  %94 = load i32, ptr %18, align 4, !tbaa !9
  %95 = add nsw i32 %93, %94
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds double, ptr %92, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !11
  %99 = load double, ptr %16, align 8, !tbaa !11
  %100 = call double @llvm.fmuladd.f64(double %91, double %98, double %99)
  store double %100, ptr %16, align 8, !tbaa !11
  br label %101

101:                                              ; preds = %75
  %102 = load i32, ptr %17, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %17, align 4, !tbaa !9
  br label %69, !llvm.loop !16

104:                                              ; preds = %69
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = load i32, ptr %18, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !11
  %110 = load double, ptr %16, align 8, !tbaa !11
  %111 = fmul double %110, %109
  store double %111, ptr %16, align 8, !tbaa !11
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %112

112:                                              ; preds = %134, %104
  %113 = load i32, ptr %17, align 4, !tbaa !9
  %114 = load i32, ptr %9, align 4, !tbaa !9
  %115 = load i32, ptr %18, align 4, !tbaa !9
  %116 = sub nsw i32 %114, %115
  %117 = icmp slt i32 %113, %116
  br i1 %117, label %118, label %137

118:                                              ; preds = %112
  %119 = load double, ptr %16, align 8, !tbaa !11
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = load i32, ptr %17, align 4, !tbaa !9
  %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 %13, align 8, !tbaa !5
  %126 = load i32, ptr %17, align 4, !tbaa !9
  %127 = load i32, ptr %18, align 4, !tbaa !9
  %128 = add nsw i32 %126, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds double, ptr %125, i64 %129
  %131 = load double, ptr %130, align 8, !tbaa !11
  %132 = fneg double %119
  %133 = call double @llvm.fmuladd.f64(double %132, double %124, double %131)
  store double %133, ptr %130, align 8, !tbaa !11
  br label %134

134:                                              ; preds = %118
  %135 = load i32, ptr %17, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %17, align 4, !tbaa !9
  br label %112, !llvm.loop !17

137:                                              ; preds = %112
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %18, align 4, !tbaa !9
  %140 = add nsw i32 %139, -1
  store i32 %140, ptr %18, align 4, !tbaa !9
  br label %53, !llvm.loop !18

141:                                              ; preds = %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  ret i32 0
}

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !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}


; 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: nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local noundef i32 @denseORMQR(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4, ptr nocapture noundef %5, ptr nocapture noundef %6) local_unnamed_addr #0 {
  %8 = icmp sgt i32 %2, 0
  br i1 %8, label %.lr.ph.preheader, label %.preheader53

.lr.ph.preheader:                                 ; preds = %7
  %9 = ptrtoint ptr %5 to i64
  %10 = ptrtoint ptr %4 to i64
  %wide.trip.count = zext nneg i32 %2 to i64
  %min.iters.check = icmp ult i32 %2, 6
  %11 = sub i64 %9, %10
  %diff.check = icmp ult i64 %11, 32
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %.lr.ph.preheader106, label %vector.ph

.lr.ph.preheader106:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader106, %.lr.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.lr.ph.prol ], [ %indvars.iv.ph, %.lr.ph.preheader106 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader106 ]
  %12 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.prol
  %13 = load double, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.prol
  store double %13, ptr %14, align 8, !tbaa !5
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !9

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader106
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader106 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %15 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %16 = icmp ugt i64 %15, -4
  br i1 %16, label %.preheader53, label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %17 = getelementptr inbounds double, ptr %4, i64 %index
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %wide.load = load <2 x double>, ptr %17, align 8, !tbaa !5
  %wide.load86 = load <2 x double>, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %5, i64 %index
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  store <2 x double> %wide.load, ptr %19, align 8, !tbaa !5
  store <2 x double> %wide.load86, ptr %20, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !11

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

.preheader53:                                     ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %7
  %22 = icmp slt i32 %2, %1
  br i1 %22, label %.lr.ph56.preheader, label %.preheader

.lr.ph56.preheader:                               ; preds = %.preheader53
  %23 = sext i32 %2 to i64
  %24 = shl nsw i64 %23, 3
  %scevgep = getelementptr i8, ptr %5, i64 %24
  %25 = xor i32 %2, -1
  %26 = add i32 %25, %1
  %27 = zext i32 %26 to i64
  %28 = shl nuw nsw i64 %27, 3
  %29 = add nuw nsw i64 %28, 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %29, i1 false), !tbaa !5
  br label %.preheader

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.lr.ph ], [ %indvars.iv.unr, %.lr.ph.prol.loopexit ]
  %30 = getelementptr inbounds double, ptr %4, i64 %indvars.iv
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = getelementptr inbounds double, ptr %5, i64 %indvars.iv
  store double %31, ptr %32, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %33 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.next
  store double %34, ptr %35, align 8, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %36 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next.1
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.next.1
  store double %37, ptr %38, align 8, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %39 = getelementptr inbounds double, ptr %4, i64 %indvars.iv.next.2
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.next.2
  store double %40, ptr %41, align 8, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %.preheader53, label %.lr.ph, !llvm.loop !15

.preheader:                                       ; preds = %.lr.ph56.preheader, %.preheader53
  br i1 %8, label %.lr.ph66.preheader, label %._crit_edge67

.lr.ph66.preheader:                               ; preds = %.preheader
  %42 = add i32 %1, 1
  %43 = sub i32 %42, %2
  %44 = zext nneg i32 %2 to i64
  %45 = sext i32 %1 to i64
  %46 = shl nuw nsw i64 %44, 3
  %47 = add nsw i64 %46, -8
  br label %.lr.ph66

.loopexit:                                        ; preds = %scalar.ph92.prol.loopexit, %scalar.ph92, %middle.block91, %._crit_edge
  %48 = icmp sgt i64 %indvars.iv83, 1
  %indvars.iv.next80 = add i32 %indvars.iv79, 1
  %indvar.next = add i64 %indvar, 1
  br i1 %48, label %.lr.ph66, label %._crit_edge67, !llvm.loop !16

.lr.ph66:                                         ; preds = %.lr.ph66.preheader, %.loopexit
  %indvar = phi i64 [ 0, %.lr.ph66.preheader ], [ %indvar.next, %.loopexit ]
  %indvars.iv83 = phi i64 [ %44, %.lr.ph66.preheader ], [ %indvars.iv.next84, %.loopexit ]
  %indvars.iv79 = phi i32 [ %43, %.lr.ph66.preheader ], [ %indvars.iv.next80, %.loopexit ]
  %49 = zext i32 %indvars.iv79 to i64
  %50 = zext i32 %indvars.iv79 to i64
  %51 = shl i64 %indvar, 3
  %52 = sub i64 %47, %51
  %scevgep88 = getelementptr i8, ptr %5, i64 %52
  %53 = zext i32 %indvars.iv79 to i64
  %54 = shl nuw nsw i64 %53, 3
  %scevgep89 = getelementptr i8, ptr %scevgep88, i64 %54
  %scevgep90 = getelementptr i8, ptr %6, i64 %54
  %indvars.iv.next84 = add nsw i64 %indvars.iv83, -1
  %55 = getelementptr inbounds ptr, ptr %0, i64 %indvars.iv.next84
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  store double 1.000000e+00, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds double, ptr %5, i64 %indvars.iv.next84
  %58 = load double, ptr %57, align 8, !tbaa !5
  %59 = sub nsw i64 %45, %indvars.iv.next84
  %60 = icmp sgt i64 %59, 1
  br i1 %60, label %.lr.ph59, label %._crit_edge

.lr.ph59:                                         ; preds = %.lr.ph66, %.lr.ph59
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.lr.ph59 ], [ 1, %.lr.ph66 ]
  %.04957 = phi double [ %67, %.lr.ph59 ], [ %58, %.lr.ph66 ]
  %61 = add nsw i64 %indvars.iv73, %indvars.iv.next84
  %62 = getelementptr inbounds double, ptr %56, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !5
  %64 = getelementptr inbounds double, ptr %6, i64 %indvars.iv73
  store double %63, ptr %64, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %5, i64 %61
  %66 = load double, ptr %65, align 8, !tbaa !5
  %67 = tail call double @llvm.fmuladd.f64(double %63, double %66, double %.04957)
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %68 = icmp slt i64 %indvars.iv.next74, %59
  br i1 %68, label %.lr.ph59, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph59, %.lr.ph66
  %.049.lcssa = phi double [ %58, %.lr.ph66 ], [ %67, %.lr.ph59 ]
  %69 = icmp sgt i64 %59, 0
  br i1 %69, label %.lr.ph63, label %.loopexit

.lr.ph63:                                         ; preds = %._crit_edge
  %70 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next84
  %71 = load double, ptr %70, align 8, !tbaa !5
  %72 = fneg double %.049.lcssa
  %73 = fmul double %71, %72
  %wide.trip.count81 = zext i32 %indvars.iv79 to i64
  %invariant.gep = getelementptr double, ptr %5, i64 %indvars.iv.next84
  %min.iters.check93 = icmp ult i32 %indvars.iv79, 4
  br i1 %min.iters.check93, label %scalar.ph92.preheader, label %vector.memcheck87

vector.memcheck87:                                ; preds = %.lr.ph63
  %bound0 = icmp ult ptr %scevgep88, %scevgep90
  %bound1 = icmp ugt ptr %scevgep89, %6
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph92.preheader, label %vector.ph94

vector.ph94:                                      ; preds = %vector.memcheck87
  %n.vec96 = and i64 %50, 4294967292
  %broadcast.splatinsert = insertelement <2 x double> poison, double %73, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body98

vector.body98:                                    ; preds = %vector.body98, %vector.ph94
  %index99 = phi i64 [ 0, %vector.ph94 ], [ %index.next104, %vector.body98 ]
  %74 = getelementptr inbounds double, ptr %6, i64 %index99
  %75 = getelementptr inbounds i8, ptr %74, i64 16
  %wide.load100 = load <2 x double>, ptr %74, align 8, !tbaa !5, !alias.scope !20
  %wide.load101 = load <2 x double>, ptr %75, align 8, !tbaa !5, !alias.scope !20
  %76 = getelementptr double, ptr %invariant.gep, i64 %index99
  %77 = getelementptr i8, ptr %76, i64 16
  %wide.load102 = load <2 x double>, ptr %76, align 8, !tbaa !5, !alias.scope !23, !noalias !20
  %wide.load103 = load <2 x double>, ptr %77, align 8, !tbaa !5, !alias.scope !23, !noalias !20
  %78 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load100, <2 x double> %wide.load102)
  %79 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load101, <2 x double> %wide.load103)
  store <2 x double> %78, ptr %76, align 8, !tbaa !5, !alias.scope !23, !noalias !20
  store <2 x double> %79, ptr %77, align 8, !tbaa !5, !alias.scope !23, !noalias !20
  %index.next104 = add nuw i64 %index99, 4
  %80 = icmp eq i64 %index.next104, %n.vec96
  br i1 %80, label %middle.block91, label %vector.body98, !llvm.loop !25

middle.block91:                                   ; preds = %vector.body98
  %cmp.n105 = icmp eq i64 %n.vec96, %50
  br i1 %cmp.n105, label %.loopexit, label %scalar.ph92.preheader

scalar.ph92.preheader:                            ; preds = %middle.block91, %vector.memcheck87, %.lr.ph63
  %indvars.iv76.ph = phi i64 [ 0, %vector.memcheck87 ], [ 0, %.lr.ph63 ], [ %n.vec96, %middle.block91 ]
  %xtraiter107 = and i64 %49, 1
  %lcmp.mod108.not = icmp eq i64 %xtraiter107, 0
  br i1 %lcmp.mod108.not, label %scalar.ph92.prol.loopexit, label %scalar.ph92.prol

scalar.ph92.prol:                                 ; preds = %scalar.ph92.preheader
  %81 = getelementptr inbounds double, ptr %6, i64 %indvars.iv76.ph
  %82 = load double, ptr %81, align 8, !tbaa !5
  %gep.prol = getelementptr double, ptr %invariant.gep, i64 %indvars.iv76.ph
  %83 = load double, ptr %gep.prol, align 8, !tbaa !5
  %84 = tail call double @llvm.fmuladd.f64(double %73, double %82, double %83)
  store double %84, ptr %gep.prol, align 8, !tbaa !5
  %indvars.iv.next77.prol = or disjoint i64 %indvars.iv76.ph, 1
  br label %scalar.ph92.prol.loopexit

scalar.ph92.prol.loopexit:                        ; preds = %scalar.ph92.prol, %scalar.ph92.preheader
  %indvars.iv76.unr = phi i64 [ %indvars.iv76.ph, %scalar.ph92.preheader ], [ %indvars.iv.next77.prol, %scalar.ph92.prol ]
  %85 = add nsw i64 %49, -1
  %86 = icmp eq i64 %indvars.iv76.ph, %85
  br i1 %86, label %.loopexit, label %scalar.ph92

scalar.ph92:                                      ; preds = %scalar.ph92.prol.loopexit, %scalar.ph92
  %indvars.iv76 = phi i64 [ %indvars.iv.next77.1, %scalar.ph92 ], [ %indvars.iv76.unr, %scalar.ph92.prol.loopexit ]
  %87 = getelementptr inbounds double, ptr %6, i64 %indvars.iv76
  %88 = load double, ptr %87, align 8, !tbaa !5
  %gep = getelementptr double, ptr %invariant.gep, i64 %indvars.iv76
  %89 = load double, ptr %gep, align 8, !tbaa !5
  %90 = tail call double @llvm.fmuladd.f64(double %73, double %88, double %89)
  store double %90, ptr %gep, align 8, !tbaa !5
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %91 = getelementptr inbounds double, ptr %6, i64 %indvars.iv.next77
  %92 = load double, ptr %91, align 8, !tbaa !5
  %gep.1 = getelementptr double, ptr %invariant.gep, i64 %indvars.iv.next77
  %93 = load double, ptr %gep.1, align 8, !tbaa !5
  %94 = tail call double @llvm.fmuladd.f64(double %73, double %92, double %93)
  store double %94, ptr %gep.1, align 8, !tbaa !5
  %indvars.iv.next77.1 = add nuw nsw i64 %indvars.iv76, 2
  %exitcond82.not.1 = icmp eq i64 %indvars.iv.next77.1, %wide.trip.count81
  br i1 %exitcond82.not.1, label %.loopexit, label %scalar.ph92, !llvm.loop !26

._crit_edge67:                                    ; preds = %.loopexit, %.preheader
  ret i32 0
}

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

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

; 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>) #3

attributes #0 = { nofree norecurse nosync nounwind memory(read, argmem: 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 nounwind willreturn memory(argmem: write) }
attributes #3 = { 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/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !12, !13}
!16 = distinct !{!16, !12}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = distinct !{!19, !12}
!20 = !{!21}
!21 = distinct !{!21, !22}
!22 = distinct !{!22, !"LVerDomain"}
!23 = !{!24}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !12, !13, !14}
!26 = distinct !{!26, !12, !13}


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