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

; 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_lr_fun = type { %class.l2r_erm_fun.base, ptr }
%class.l2r_erm_fun.base = type <{ %class.function, ptr, ptr, ptr, ptr, double, 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: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN15sparse_operator3dotEPKdPK12feature_node(ptr noundef, ptr noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15sparse_operator4axpyEdPK12feature_nodePd(double noundef, ptr noundef, ptr noundef) #1 align 2

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

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

30:                                               ; preds = %26
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load i32, ptr %7, align 4, !tbaa !16
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds double, ptr %31, i64 %33
  store double 0.000000e+00, ptr %34, align 8, !tbaa !20
  br label %35

35:                                               ; preds = %30
  %36 = load i32, ptr %7, align 4, !tbaa !16
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %7, align 4, !tbaa !16
  br label %26, !llvm.loop !21

38:                                               ; preds = %26
  store i32 0, ptr %7, align 4, !tbaa !16
  br label %39

39:                                               ; preds = %70, %38
  %40 = load i32, ptr %7, align 4, !tbaa !16
  %41 = load i32, ptr %8, align 4, !tbaa !16
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %43, label %73

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load i32, ptr %7, align 4, !tbaa !16
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds ptr, ptr %44, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  store ptr %48, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = call noundef double @_ZN15sparse_operator3dotEPKdPK12feature_node(ptr noundef %49, ptr noundef %50)
  store double %51, ptr %12, align 8, !tbaa !20
  %52 = getelementptr inbounds %class.l2r_erm_fun, ptr %13, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !23
  %54 = load i32, ptr %7, align 4, !tbaa !16
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds double, ptr %53, i64 %55
  %57 = load double, ptr %56, align 8, !tbaa !20
  %58 = getelementptr inbounds %class.l2r_lr_fun, ptr %13, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  %60 = load i32, ptr %7, align 4, !tbaa !16
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds double, ptr %59, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !20
  %64 = fmul double %57, %63
  %65 = load double, ptr %12, align 8, !tbaa !20
  %66 = fmul double %64, %65
  store double %66, ptr %12, align 8, !tbaa !20
  %67 = load double, ptr %12, align 8, !tbaa !20
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN15sparse_operator4axpyEdPK12feature_nodePd(double noundef %67, ptr noundef %68, ptr noundef %69)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %70

70:                                               ; preds = %43
  %71 = load i32, ptr %7, align 4, !tbaa !16
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %7, align 4, !tbaa !16
  br label %39, !llvm.loop !26

73:                                               ; preds = %39
  store i32 0, ptr %7, align 4, !tbaa !16
  br label %74

74:                                               ; preds = %94, %73
  %75 = load i32, ptr %7, align 4, !tbaa !16
  %76 = load i32, ptr %9, align 4, !tbaa !16
  %77 = icmp slt i32 %75, %76
  br i1 %77, label %78, label %97

78:                                               ; preds = %74
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = load i32, ptr %7, align 4, !tbaa !16
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds double, ptr %79, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !20
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = load i32, ptr %7, align 4, !tbaa !16
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds double, ptr %84, i64 %86
  %88 = load double, ptr %87, align 8, !tbaa !20
  %89 = fadd double %83, %88
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = load i32, ptr %7, align 4, !tbaa !16
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds double, ptr %90, i64 %92
  store double %89, ptr %93, align 8, !tbaa !20
  br label %94

94:                                               ; preds = %78
  %95 = load i32, ptr %7, align 4, !tbaa !16
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %7, align 4, !tbaa !16
  br label %74, !llvm.loop !27

97:                                               ; preds = %74
  %98 = getelementptr inbounds %class.l2r_erm_fun, ptr %13, i32 0, i32 6
  %99 = load i32, ptr %98, align 8, !tbaa !28
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %115

101:                                              ; preds = %97
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !16
  %104 = sub nsw i32 %103, 1
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds double, ptr %102, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !20
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = load i32, ptr %9, align 4, !tbaa !16
  %110 = sub nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %108, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !20
  %114 = fsub double %113, %107
  store double %114, ptr %112, align 8, !tbaa !20
  br label %115

115:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, 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 = { 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 = { 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, !13, i64 0}
!15 = !{!"_ZTS7problem", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 16, !12, i64 24}
!16 = !{!13, !13, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!15, !6, i64 16}
!20 = !{!12, !12, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!10, !6, i64 8}
!24 = !{!25, !6, i64 56}
!25 = !{!"_ZTS10l2r_lr_fun", !10, i64 0, !6, i64 56}
!26 = distinct !{!26, !22}
!27 = distinct !{!27, !22}
!28 = !{!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 nounwind uwtable
declare dso_local noundef double @_ZN15sparse_operator3dotEPKdPK12feature_node(ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15sparse_operator4axpyEdPK12feature_nodePd(double noundef, ptr noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10l2r_lr_fun2HvEPdS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %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 = load i32, ptr %5, align 8, !tbaa !13
  %7 = load ptr, ptr %0, align 8, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %7, i64 24
  %9 = load ptr, ptr %8, align 8
  %10 = tail call noundef i32 %9(ptr noundef nonnull align 8 dereferenceable(52) %0)
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  %14 = icmp sgt i32 %10, 0
  br i1 %14, label %.lr.ph.preheader, label %.preheader32

.lr.ph.preheader:                                 ; preds = %3
  %15 = zext nneg i32 %10 to i64
  %16 = shl nuw nsw i64 %15, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %2, i8 0, i64 %16, i1 false), !tbaa !18
  br label %.preheader32

.preheader32:                                     ; preds = %.lr.ph.preheader, %3
  %17 = icmp sgt i32 %6, 0
  br i1 %17, label %.lr.ph35, label %.preheader

.lr.ph35:                                         ; preds = %.preheader32
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  %wide.trip.count = zext nneg i32 %6 to i64
  br label %35

.preheader:                                       ; preds = %35, %.preheader32
  br i1 %14, label %.lr.ph37.preheader, label %._crit_edge

.lr.ph37.preheader:                               ; preds = %.preheader
  %wide.trip.count43 = zext nneg i32 %10 to i64
  %min.iters.check = icmp ult i32 %10, 6
  br i1 %min.iters.check, label %.lr.ph37.preheader49, label %vector.memcheck

.lr.ph37.preheader49:                             ; preds = %middle.block, %vector.memcheck, %.lr.ph37.preheader
  %indvars.iv40.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph37.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count43, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph37.prol.loopexit, label %.lr.ph37.prol

.lr.ph37.prol:                                    ; preds = %.lr.ph37.preheader49, %.lr.ph37.prol
  %indvars.iv40.prol = phi i64 [ %indvars.iv.next41.prol, %.lr.ph37.prol ], [ %indvars.iv40.ph, %.lr.ph37.preheader49 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph37.prol ], [ 0, %.lr.ph37.preheader49 ]
  %20 = getelementptr inbounds double, ptr %1, i64 %indvars.iv40.prol
  %21 = load double, ptr %20, align 8, !tbaa !18
  %22 = getelementptr inbounds double, ptr %2, i64 %indvars.iv40.prol
  %23 = load double, ptr %22, align 8, !tbaa !18
  %24 = fadd double %21, %23
  store double %24, ptr %22, align 8, !tbaa !18
  %indvars.iv.next41.prol = add nuw nsw i64 %indvars.iv40.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.ph37.prol.loopexit, label %.lr.ph37.prol, !llvm.loop !19

.lr.ph37.prol.loopexit:                           ; preds = %.lr.ph37.prol, %.lr.ph37.preheader49
  %indvars.iv40.unr = phi i64 [ %indvars.iv40.ph, %.lr.ph37.preheader49 ], [ %indvars.iv.next41.prol, %.lr.ph37.prol ]
  %25 = sub nsw i64 %indvars.iv40.ph, %wide.trip.count43
  %26 = icmp ugt i64 %25, -4
  br i1 %26, label %._crit_edge, label %.lr.ph37

vector.memcheck:                                  ; preds = %.lr.ph37.preheader
  %27 = shl nuw nsw i64 %wide.trip.count43, 3
  %scevgep = getelementptr i8, ptr %2, i64 %27
  %scevgep45 = getelementptr i8, ptr %1, i64 %27
  %bound0 = icmp ugt ptr %scevgep45, %2
  %bound1 = icmp ugt ptr %scevgep, %1
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph37.preheader49, label %vector.ph

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

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %28 = getelementptr inbounds double, ptr %1, i64 %index
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load = load <2 x double>, ptr %28, align 8, !tbaa !18, !alias.scope !21
  %wide.load46 = load <2 x double>, ptr %29, align 8, !tbaa !18, !alias.scope !21
  %30 = getelementptr inbounds double, ptr %2, i64 %index
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load47 = load <2 x double>, ptr %30, align 8, !tbaa !18, !alias.scope !24, !noalias !21
  %wide.load48 = load <2 x double>, ptr %31, align 8, !tbaa !18, !alias.scope !24, !noalias !21
  %32 = fadd <2 x double> %wide.load, %wide.load47
  %33 = fadd <2 x double> %wide.load46, %wide.load48
  store <2 x double> %32, ptr %30, align 8, !tbaa !18, !alias.scope !24, !noalias !21
  store <2 x double> %33, ptr %31, align 8, !tbaa !18, !alias.scope !24, !noalias !21
  %index.next = add nuw i64 %index, 4
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count43
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph37.preheader49

35:                                               ; preds = %.lr.ph35, %35
  %indvars.iv = phi i64 [ 0, %.lr.ph35 ], [ %indvars.iv.next, %35 ]
  %36 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv
  %37 = load ptr, ptr %36, align 8, !tbaa !30
  %38 = tail call noundef double @_ZN15sparse_operator3dotEPKdPK12feature_node(ptr noundef %1, ptr noundef %37)
  %39 = load ptr, ptr %18, align 8, !tbaa !31
  %40 = getelementptr inbounds double, ptr %39, i64 %indvars.iv
  %41 = load double, ptr %40, align 8, !tbaa !18
  %42 = load ptr, ptr %19, align 8, !tbaa !32
  %43 = getelementptr inbounds double, ptr %42, i64 %indvars.iv
  %44 = load double, ptr %43, align 8, !tbaa !18
  %45 = fmul double %41, %44
  %46 = fmul double %38, %45
  tail call void @_ZN15sparse_operator4axpyEdPK12feature_nodePd(double noundef %46, ptr noundef %37, ptr noundef %2)
  %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 %.preheader, label %35, !llvm.loop !34

.lr.ph37:                                         ; preds = %.lr.ph37.prol.loopexit, %.lr.ph37
  %indvars.iv40 = phi i64 [ %indvars.iv.next41.3, %.lr.ph37 ], [ %indvars.iv40.unr, %.lr.ph37.prol.loopexit ]
  %47 = getelementptr inbounds double, ptr %1, i64 %indvars.iv40
  %48 = load double, ptr %47, align 8, !tbaa !18
  %49 = getelementptr inbounds double, ptr %2, i64 %indvars.iv40
  %50 = load double, ptr %49, align 8, !tbaa !18
  %51 = fadd double %48, %50
  store double %51, ptr %49, align 8, !tbaa !18
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %52 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next41
  %53 = load double, ptr %52, align 8, !tbaa !18
  %54 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next41
  %55 = load double, ptr %54, align 8, !tbaa !18
  %56 = fadd double %53, %55
  store double %56, ptr %54, align 8, !tbaa !18
  %indvars.iv.next41.1 = add nuw nsw i64 %indvars.iv40, 2
  %57 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next41.1
  %58 = load double, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next41.1
  %60 = load double, ptr %59, align 8, !tbaa !18
  %61 = fadd double %58, %60
  store double %61, ptr %59, align 8, !tbaa !18
  %indvars.iv.next41.2 = add nuw nsw i64 %indvars.iv40, 3
  %62 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next41.2
  %63 = load double, ptr %62, align 8, !tbaa !18
  %64 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next41.2
  %65 = load double, ptr %64, align 8, !tbaa !18
  %66 = fadd double %63, %65
  store double %66, ptr %64, align 8, !tbaa !18
  %indvars.iv.next41.3 = add nuw nsw i64 %indvars.iv40, 4
  %exitcond44.not.3 = icmp eq i64 %indvars.iv.next41.3, %wide.trip.count43
  br i1 %exitcond44.not.3, label %._crit_edge, label %.lr.ph37, !llvm.loop !35

._crit_edge:                                      ; preds = %.lr.ph37.prol.loopexit, %.lr.ph37, %middle.block, %.preheader
  %67 = getelementptr inbounds i8, ptr %0, i64 48
  %68 = load i32, ptr %67, align 8, !tbaa !36
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %78

70:                                               ; preds = %._crit_edge
  %71 = add nsw i32 %10, -1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds double, ptr %1, i64 %72
  %74 = load double, ptr %73, align 8, !tbaa !18
  %75 = getelementptr inbounds double, ptr %2, i64 %72
  %76 = load double, ptr %75, align 8, !tbaa !18
  %77 = fsub double %76, %74
  store double %77, ptr %75, align 8, !tbaa !18
  br label %78

78:                                               ; preds = %70, %._crit_edge
  ret void
}

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

attributes #0 = { 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 #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 nounwind willreturn memory(argmem: write) }

!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, !12, i64 0}
!14 = !{!"_ZTS7problem", !12, i64 0, !12, i64 4, !8, i64 8, !8, i64 16, !11, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !10, i64 0}
!17 = !{!14, !8, i64 16}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.unroll.disable"}
!21 = !{!22}
!22 = distinct !{!22, !23}
!23 = distinct !{!23, !"LVerDomain"}
!24 = !{!25}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !27, !28, !29}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!"llvm.loop.isvectorized", i32 1}
!29 = !{!"llvm.loop.unroll.runtime.disable"}
!30 = !{!8, !8, i64 0}
!31 = !{!6, !8, i64 8}
!32 = !{!33, !8, i64 56}
!33 = !{!"_ZTS10l2r_lr_fun", !6, i64 0, !8, i64 56}
!34 = distinct !{!34, !27}
!35 = distinct !{!35, !27, !28}
!36 = !{!6, !12, i64 48}


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