; LLVM IR from softmin/ReHLine-SVM :: liblinear/linear.ll (ZN14l2r_l2_svr_fun4gradEPdS0_)

; 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"

%class.l2r_erm_fun = type <{ %class.function, ptr, ptr, ptr, ptr, double, i32, [4 x i8] }>
%class.function = type { ptr }
%struct.problem = type { i32, i32, ptr, ptr, double }
%class.l2r_l2_svc_fun = type <{ %class.l2r_erm_fun.base, [4 x i8], ptr, i32, [4 x i8] }>
%class.l2r_erm_fun.base = type <{ %class.function, ptr, ptr, ptr, ptr, double, i32 }>
%class.l2r_l2_svr_fun = type { %class.l2r_l2_svc_fun.base, double }
%class.l2r_l2_svc_fun.base = type <{ %class.l2r_erm_fun.base, [4 x i8], ptr, i32 }>

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

; Function Attrs: 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: mustprogress uwtable
declare dso_local void @_ZN14l2r_l2_svc_fun6subXTvEPdS0_(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef, ptr noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14l2r_l2_svr_fun4gradEPdS0_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %13 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 2
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = getelementptr inbounds %struct.problem, ptr %14, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  store ptr %16, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %17 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 2
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.problem, ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 8, !tbaa !16
  store i32 %20, ptr %9, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %21 = load ptr, ptr %12, align 8, !tbaa !18
  %22 = getelementptr inbounds ptr, ptr %21, i64 3
  %23 = load ptr, ptr %22, align 8
  %24 = call noundef i32 %23(ptr noundef nonnull align 8 dereferenceable(52) %12)
  store i32 %24, ptr %10, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %25 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 3
  store i32 0, ptr %25, align 8, !tbaa !20
  store i32 0, ptr %7, align 4, !tbaa !17
  br label %26

26:                                               ; preds = %111, %3
  %27 = load i32, ptr %7, align 4, !tbaa !17
  %28 = load i32, ptr %9, align 4, !tbaa !17
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %30, label %114

30:                                               ; preds = %26
  %31 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 3
  %32 = load ptr, ptr %31, align 8, !tbaa !22
  %33 = load i32, ptr %7, align 4, !tbaa !17
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds double, ptr %32, i64 %34
  %36 = load double, ptr %35, align 8, !tbaa !23
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = load i32, ptr %7, align 4, !tbaa !17
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds double, ptr %37, i64 %39
  %41 = load double, ptr %40, align 8, !tbaa !23
  %42 = fsub double %36, %41
  store double %42, ptr %11, align 8, !tbaa !23
  %43 = load double, ptr %11, align 8, !tbaa !23
  %44 = getelementptr inbounds %class.l2r_l2_svr_fun, ptr %12, i32 0, i32 1
  %45 = load double, ptr %44, align 8, !tbaa !24
  %46 = fneg double %45
  %47 = fcmp olt double %43, %46
  br i1 %47, label %48, label %76

48:                                               ; preds = %30
  %49 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 1
  %50 = load ptr, ptr %49, align 8, !tbaa !26
  %51 = load i32, ptr %7, align 4, !tbaa !17
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !23
  %55 = load double, ptr %11, align 8, !tbaa !23
  %56 = getelementptr inbounds %class.l2r_l2_svr_fun, ptr %12, i32 0, i32 1
  %57 = load double, ptr %56, align 8, !tbaa !24
  %58 = fadd double %55, %57
  %59 = fmul double %54, %58
  %60 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !27
  %62 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 3
  %63 = load i32, ptr %62, align 8, !tbaa !20
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds double, ptr %61, i64 %64
  store double %59, ptr %65, align 8, !tbaa !23
  %66 = load i32, ptr %7, align 4, !tbaa !17
  %67 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !28
  %69 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 3
  %70 = load i32, ptr %69, align 8, !tbaa !20
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %68, i64 %71
  store i32 %66, ptr %72, align 4, !tbaa !17
  %73 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 3
  %74 = load i32, ptr %73, align 8, !tbaa !20
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %73, align 8, !tbaa !20
  br label %110

76:                                               ; preds = %30
  %77 = load double, ptr %11, align 8, !tbaa !23
  %78 = getelementptr inbounds %class.l2r_l2_svr_fun, ptr %12, i32 0, i32 1
  %79 = load double, ptr %78, align 8, !tbaa !24
  %80 = fcmp ogt double %77, %79
  br i1 %80, label %81, label %109

81:                                               ; preds = %76
  %82 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !26
  %84 = load i32, ptr %7, align 4, !tbaa !17
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !23
  %88 = load double, ptr %11, align 8, !tbaa !23
  %89 = getelementptr inbounds %class.l2r_l2_svr_fun, ptr %12, i32 0, i32 1
  %90 = load double, ptr %89, align 8, !tbaa !24
  %91 = fsub double %88, %90
  %92 = fmul double %87, %91
  %93 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 4
  %94 = load ptr, ptr %93, align 8, !tbaa !27
  %95 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 3
  %96 = load i32, ptr %95, align 8, !tbaa !20
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds double, ptr %94, i64 %97
  store double %92, ptr %98, align 8, !tbaa !23
  %99 = load i32, ptr %7, align 4, !tbaa !17
  %100 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !28
  %102 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 3
  %103 = load i32, ptr %102, align 8, !tbaa !20
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %101, i64 %104
  store i32 %99, ptr %105, align 4, !tbaa !17
  %106 = getelementptr inbounds %class.l2r_l2_svc_fun, ptr %12, i32 0, i32 3
  %107 = load i32, ptr %106, align 8, !tbaa !20
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %106, align 8, !tbaa !20
  br label %109

109:                                              ; preds = %81, %76
  br label %110

110:                                              ; preds = %109, %48
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %7, align 4, !tbaa !17
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %7, align 4, !tbaa !17
  br label %26, !llvm.loop !29

114:                                              ; preds = %26
  %115 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 4
  %116 = load ptr, ptr %115, align 8, !tbaa !27
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN14l2r_l2_svc_fun6subXTvEPdS0_(ptr noundef nonnull align 8 dereferenceable(68) %12, ptr noundef %116, ptr noundef %117)
  store i32 0, ptr %7, align 4, !tbaa !17
  br label %118

118:                                              ; preds = %138, %114
  %119 = load i32, ptr %7, align 4, !tbaa !17
  %120 = load i32, ptr %10, align 4, !tbaa !17
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %122, label %141

122:                                              ; preds = %118
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = load i32, ptr %7, align 4, !tbaa !17
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds double, ptr %123, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !23
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load i32, ptr %7, align 4, !tbaa !17
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds double, ptr %128, i64 %130
  %132 = load double, ptr %131, align 8, !tbaa !23
  %133 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %132, double %127)
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = load i32, ptr %7, align 4, !tbaa !17
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds double, ptr %134, i64 %136
  store double %133, ptr %137, align 8, !tbaa !23
  br label %138

138:                                              ; preds = %122
  %139 = load i32, ptr %7, align 4, !tbaa !17
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %7, align 4, !tbaa !17
  br label %118, !llvm.loop !31

141:                                              ; preds = %118
  %142 = getelementptr inbounds %class.l2r_erm_fun, ptr %12, i32 0, i32 6
  %143 = load i32, ptr %142, align 8, !tbaa !32
  %144 = icmp eq i32 %143, 0
  br i1 %144, label %145, label %159

145:                                              ; preds = %141
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load i32, ptr %10, align 4, !tbaa !17
  %148 = sub nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds double, ptr %146, i64 %149
  %151 = load double, ptr %150, align 8, !tbaa !23
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = load i32, ptr %10, align 4, !tbaa !17
  %154 = sub nsw i32 %153, 1
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds double, ptr %152, i64 %155
  %157 = load double, ptr %156, align 8, !tbaa !23
  %158 = fsub double %157, %151
  store double %158, ptr %156, align 8, !tbaa !23
  br label %159

159:                                              ; preds = %145, %141
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"_ZTS11l2r_erm_fun", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !13, i64 48}
!11 = !{!"_ZTS8function"}
!12 = !{!"double", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"_ZTS7problem", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 16, !12, i64 24}
!16 = !{!15, !13, i64 0}
!17 = !{!13, !13, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !8, i64 0}
!20 = !{!21, !13, i64 64}
!21 = !{!"_ZTS14l2r_l2_svc_fun", !10, i64 0, !6, i64 56, !13, i64 64}
!22 = !{!10, !6, i64 24}
!23 = !{!12, !12, i64 0}
!24 = !{!25, !12, i64 72}
!25 = !{!"_ZTS14l2r_l2_svr_fun", !21, i64 0, !12, i64 72}
!26 = !{!10, !6, i64 8}
!27 = !{!10, !6, i64 32}
!28 = !{!21, !6, i64 56}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!10, !13, i64 48}


; 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 uwtable
declare dso_local void @_ZN14l2r_l2_svc_fun6subXTvEPdS0_(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14l2r_l2_svr_fun4gradEPdS0_(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr nocapture noundef readonly %1, ptr noundef %2) unnamed_addr #1 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !13
  %8 = load i32, ptr %5, align 8, !tbaa !15
  %9 = load ptr, ptr %0, align 8, !tbaa !16
  %10 = getelementptr inbounds i8, ptr %9, i64 24
  %11 = load ptr, ptr %10, align 8
  %12 = tail call noundef i32 %11(ptr noundef nonnull align 8 dereferenceable(52) %0)
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 0, ptr %13, align 8, !tbaa !18
  %14 = icmp sgt i32 %8, 0
  br i1 %14, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %3
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 32
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !20
  br label %._crit_edge

.lr.ph:                                           ; preds = %3
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !21
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load ptr, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  %21 = load ptr, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr %0, i64 56
  %23 = load ptr, ptr %22, align 8
  %wide.trip.count = zext nneg i32 %8 to i64
  br label %24

24:                                               ; preds = %.lr.ph, %52
  %25 = phi i32 [ 0, %.lr.ph ], [ %53, %52 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %52 ]
  %26 = getelementptr inbounds double, ptr %16, i64 %indvars.iv
  %27 = load double, ptr %26, align 8, !tbaa !22
  %28 = getelementptr inbounds double, ptr %7, i64 %indvars.iv
  %29 = load double, ptr %28, align 8, !tbaa !22
  %30 = fsub double %27, %29
  %31 = load double, ptr %17, align 8, !tbaa !23
  %32 = fneg double %31
  %33 = fcmp olt double %30, %32
  br i1 %33, label %34, label %39

34:                                               ; preds = %24
  %35 = getelementptr inbounds double, ptr %19, i64 %indvars.iv
  %36 = load double, ptr %35, align 8, !tbaa !22
  %37 = fadd double %30, %31
  %38 = fmul double %37, %36
  br label %.sink.split

39:                                               ; preds = %24
  %40 = fcmp ogt double %30, %31
  br i1 %40, label %41, label %52

41:                                               ; preds = %39
  %42 = getelementptr inbounds double, ptr %19, i64 %indvars.iv
  %43 = load double, ptr %42, align 8, !tbaa !22
  %44 = fsub double %30, %31
  %45 = fmul double %44, %43
  br label %.sink.split

.sink.split:                                      ; preds = %41, %34
  %.sink45 = phi double [ %38, %34 ], [ %45, %41 ]
  %46 = sext i32 %25 to i64
  %47 = getelementptr inbounds double, ptr %21, i64 %46
  store double %.sink45, ptr %47, align 8, !tbaa !22
  %48 = getelementptr inbounds i32, ptr %23, i64 %46
  %49 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %49, ptr %48, align 4, !tbaa !25
  %50 = load i32, ptr %13, align 8, !tbaa !18
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %13, align 8, !tbaa !18
  br label %52

52:                                               ; preds = %.sink.split, %39
  %53 = phi i32 [ %25, %39 ], [ %51, %.sink.split ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %24, !llvm.loop !26

._crit_edge:                                      ; preds = %52, %.._crit_edge_crit_edge
  %54 = phi ptr [ %.pre, %.._crit_edge_crit_edge ], [ %21, %52 ]
  tail call void @_ZN14l2r_l2_svc_fun6subXTvEPdS0_(ptr noundef nonnull align 8 dereferenceable(68) %0, ptr noundef %54, ptr noundef %2)
  %55 = icmp sgt i32 %12, 0
  br i1 %55, label %.lr.ph35.preheader, label %._crit_edge36

.lr.ph35.preheader:                               ; preds = %._crit_edge
  %wide.trip.count41 = zext nneg i32 %12 to i64
  %min.iters.check = icmp ult i32 %12, 6
  br i1 %min.iters.check, label %.lr.ph35.preheader52, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph35.preheader
  %56 = shl nuw nsw i64 %wide.trip.count41, 3
  %scevgep = getelementptr i8, ptr %2, i64 %56
  %scevgep48 = getelementptr i8, ptr %1, i64 %56
  %bound0 = icmp ugt ptr %scevgep48, %2
  %bound1 = icmp ugt ptr %scevgep, %1
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph35.preheader52, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count41, 2147483644
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %57 = getelementptr inbounds double, ptr %1, i64 %index
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  %wide.load = load <2 x double>, ptr %57, align 8, !tbaa !22, !alias.scope !28
  %wide.load49 = load <2 x double>, ptr %58, align 8, !tbaa !22, !alias.scope !28
  %59 = getelementptr inbounds double, ptr %2, i64 %index
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %wide.load50 = load <2 x double>, ptr %59, align 8, !tbaa !22, !alias.scope !31, !noalias !28
  %wide.load51 = load <2 x double>, ptr %60, align 8, !tbaa !22, !alias.scope !31, !noalias !28
  %61 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load50, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %wide.load)
  %62 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load51, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> %wide.load49)
  store <2 x double> %61, ptr %59, align 8, !tbaa !22, !alias.scope !31, !noalias !28
  store <2 x double> %62, ptr %60, align 8, !tbaa !22, !alias.scope !31, !noalias !28
  %index.next = add nuw i64 %index, 4
  %63 = icmp eq i64 %index.next, %n.vec
  br i1 %63, label %middle.block, label %vector.body, !llvm.loop !33

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

.lr.ph35.preheader52:                             ; preds = %middle.block, %vector.memcheck, %.lr.ph35.preheader
  %indvars.iv38.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph35.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count41, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph35.prol.loopexit, label %.lr.ph35.prol

.lr.ph35.prol:                                    ; preds = %.lr.ph35.preheader52
  %64 = getelementptr inbounds double, ptr %1, i64 %indvars.iv38.ph
  %65 = load double, ptr %64, align 8, !tbaa !22
  %66 = getelementptr inbounds double, ptr %2, i64 %indvars.iv38.ph
  %67 = load double, ptr %66, align 8, !tbaa !22
  %68 = tail call double @llvm.fmuladd.f64(double %67, double 2.000000e+00, double %65)
  store double %68, ptr %66, align 8, !tbaa !22
  %indvars.iv.next39.prol = or disjoint i64 %indvars.iv38.ph, 1
  br label %.lr.ph35.prol.loopexit

.lr.ph35.prol.loopexit:                           ; preds = %.lr.ph35.prol, %.lr.ph35.preheader52
  %indvars.iv38.unr = phi i64 [ %indvars.iv38.ph, %.lr.ph35.preheader52 ], [ %indvars.iv.next39.prol, %.lr.ph35.prol ]
  %69 = add nsw i64 %wide.trip.count41, -1
  %70 = icmp eq i64 %indvars.iv38.ph, %69
  br i1 %70, label %._crit_edge36, label %.lr.ph35

.lr.ph35:                                         ; preds = %.lr.ph35.prol.loopexit, %.lr.ph35
  %indvars.iv38 = phi i64 [ %indvars.iv.next39.1, %.lr.ph35 ], [ %indvars.iv38.unr, %.lr.ph35.prol.loopexit ]
  %71 = getelementptr inbounds double, ptr %1, i64 %indvars.iv38
  %72 = load double, ptr %71, align 8, !tbaa !22
  %73 = getelementptr inbounds double, ptr %2, i64 %indvars.iv38
  %74 = load double, ptr %73, align 8, !tbaa !22
  %75 = tail call double @llvm.fmuladd.f64(double %74, double 2.000000e+00, double %72)
  store double %75, ptr %73, align 8, !tbaa !22
  %indvars.iv.next39 = add nuw nsw i64 %indvars.iv38, 1
  %76 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next39
  %77 = load double, ptr %76, align 8, !tbaa !22
  %78 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next39
  %79 = load double, ptr %78, align 8, !tbaa !22
  %80 = tail call double @llvm.fmuladd.f64(double %79, double 2.000000e+00, double %77)
  store double %80, ptr %78, align 8, !tbaa !22
  %indvars.iv.next39.1 = add nuw nsw i64 %indvars.iv38, 2
  %exitcond42.not.1 = icmp eq i64 %indvars.iv.next39.1, %wide.trip.count41
  br i1 %exitcond42.not.1, label %._crit_edge36, label %.lr.ph35, !llvm.loop !36

._crit_edge36:                                    ; preds = %.lr.ph35.prol.loopexit, %.lr.ph35, %middle.block, %._crit_edge
  %81 = getelementptr inbounds i8, ptr %0, i64 48
  %82 = load i32, ptr %81, align 8, !tbaa !37
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %84, label %92

84:                                               ; preds = %._crit_edge36
  %85 = add nsw i32 %12, -1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %1, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !22
  %89 = getelementptr inbounds double, ptr %2, i64 %86
  %90 = load double, ptr %89, align 8, !tbaa !22
  %91 = fsub double %90, %88
  store double %91, ptr %89, align 8, !tbaa !22
  br label %92

92:                                               ; preds = %84, %._crit_edge36
  ret void
}

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !8, i64 16}
!6 = !{!"_ZTS11l2r_erm_fun", !7, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !8, i64 32, !11, i64 40, !12, i64 48}
!7 = !{!"_ZTS8function"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!14, !8, i64 8}
!14 = !{!"_ZTS7problem", !12, i64 0, !12, i64 4, !8, i64 8, !8, i64 16, !11, i64 24}
!15 = !{!14, !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !10, i64 0}
!18 = !{!19, !12, i64 64}
!19 = !{!"_ZTS14l2r_l2_svc_fun", !6, i64 0, !8, i64 56, !12, i64 64}
!20 = !{!6, !8, i64 32}
!21 = !{!6, !8, i64 24}
!22 = !{!11, !11, i64 0}
!23 = !{!24, !11, i64 72}
!24 = !{!"_ZTS14l2r_l2_svr_fun", !19, i64 0, !11, i64 72}
!25 = !{!12, !12, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29}
!29 = distinct !{!29, !30}
!30 = distinct !{!30, !"LVerDomain"}
!31 = !{!32}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !27, !34, !35}
!34 = !{!"llvm.loop.isvectorized", i32 1}
!35 = !{!"llvm.loop.unroll.runtime.disable"}
!36 = distinct !{!36, !27, !34}
!37 = !{!6, !12, i64 48}


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