; LLVM IR from KhawajaAbaid/machine-learning-in-c :: nn (accumulate_grad_)

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

%struct.mlp = type { ptr, i64 }
%struct.layer = type { ptr, ptr, i64, i64 }

; 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: nounwind uwtable
define dso_local void @accumulate_grad_(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %9

9:                                                ; preds = %103, %2
  %10 = load i64, ptr %5, align 8, !tbaa !9
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.mlp, ptr %11, i32 0, i32 1
  %13 = load i64, ptr %12, align 8, !tbaa !11
  %14 = icmp ult i64 %10, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %9
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  br label %106

16:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %99, %16
  %18 = load i64, ptr %7, align 8, !tbaa !9
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.mlp, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !13
  %22 = load i64, ptr %5, align 8, !tbaa !9
  %23 = getelementptr inbounds ptr, ptr %21, i64 %22
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.layer, ptr %24, i32 0, i32 3
  %26 = load i64, ptr %25, align 8, !tbaa !14
  %27 = icmp ult i64 %18, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %17
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  br label %102

29:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %30

30:                                               ; preds = %72, %29
  %31 = load i64, ptr %8, align 8, !tbaa !9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.mlp, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = load i64, ptr %5, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %34, i64 %35
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.layer, ptr %37, i32 0, i32 2
  %39 = load i64, ptr %38, align 8, !tbaa !16
  %40 = icmp ult i64 %31, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %30
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  br label %75

42:                                               ; preds = %30
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.mlp, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = load i64, ptr %5, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %45, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.layer, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  %51 = load i64, ptr %7, align 8, !tbaa !9
  %52 = getelementptr inbounds ptr, ptr %50, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = load i64, ptr %8, align 8, !tbaa !9
  %55 = getelementptr inbounds double, ptr %53, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !18
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.mlp, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !13
  %60 = load i64, ptr %5, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %59, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.layer, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !17
  %65 = load i64, ptr %7, align 8, !tbaa !9
  %66 = getelementptr inbounds ptr, ptr %64, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = load i64, ptr %8, align 8, !tbaa !9
  %69 = getelementptr inbounds double, ptr %67, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !18
  %71 = fadd double %70, %56
  store double %71, ptr %69, align 8, !tbaa !18
  br label %72

72:                                               ; preds = %42
  %73 = load i64, ptr %8, align 8, !tbaa !9
  %74 = add i64 %73, 1
  store i64 %74, ptr %8, align 8, !tbaa !9
  br label %30, !llvm.loop !20

75:                                               ; preds = %41
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.mlp, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !13
  %79 = load i64, ptr %5, align 8, !tbaa !9
  %80 = getelementptr inbounds ptr, ptr %78, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.layer, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !22
  %84 = load i64, ptr %7, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %83, i64 %84
  %86 = load double, ptr %85, align 8, !tbaa !18
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.mlp, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load i64, ptr %5, align 8, !tbaa !9
  %91 = getelementptr inbounds ptr, ptr %89, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.layer, ptr %92, i32 0, i32 1
  %94 = load ptr, ptr %93, align 8, !tbaa !22
  %95 = load i64, ptr %7, align 8, !tbaa !9
  %96 = getelementptr inbounds double, ptr %94, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !18
  %98 = fadd double %97, %86
  store double %98, ptr %96, align 8, !tbaa !18
  br label %99

99:                                               ; preds = %75
  %100 = load i64, ptr %7, align 8, !tbaa !9
  %101 = add i64 %100, 1
  store i64 %101, ptr %7, align 8, !tbaa !9
  br label %17, !llvm.loop !23

102:                                              ; preds = %28
  br label %103

103:                                              ; preds = %102
  %104 = load i64, ptr %5, align 8, !tbaa !9
  %105 = add i64 %104, 1
  store i64 %105, ptr %5, align 8, !tbaa !9
  br label %9, !llvm.loop !24

106:                                              ; preds = %15
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"", !6, i64 0, !10, i64 8}
!13 = !{!12, !6, i64 0}
!14 = !{!15, !10, i64 24}
!15 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 24}
!16 = !{!15, !10, i64 16}
!17 = !{!15, !6, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!15, !6, i64 8}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}


; 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(readwrite, inaccessiblemem: none) uwtable
define dso_local void @accumulate_grad_(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %4, 0
  br i1 %.not, label %._crit_edge, label %.preheader26.lr.ph

.preheader26.lr.ph:                               ; preds = %2
  %5 = load ptr, ptr %0, align 8, !tbaa !11
  br label %.preheader26

.preheader26:                                     ; preds = %.preheader26.lr.ph, %._crit_edge29
  %.02530 = phi i64 [ 0, %.preheader26.lr.ph ], [ %111, %._crit_edge29 ]
  %6 = getelementptr inbounds ptr, ptr %5, i64 %.02530
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %7, i64 24
  %9 = load i64, ptr %8, align 8, !tbaa !13
  %.not32 = icmp eq i64 %9, 0
  br i1 %.not32, label %._crit_edge29, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader26
  %10 = getelementptr inbounds i8, ptr %7, i64 16
  %11 = load i64, ptr %10, align 8, !tbaa !15
  %.not33 = icmp eq i64 %11, 0
  %12 = load ptr, ptr %1, align 8, !tbaa !11
  %13 = getelementptr inbounds ptr, ptr %12, i64 %.02530
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %7, i64 8
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  br i1 %.not33, label %.preheader.preheader, label %.preheader.lr.ph.split.us

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %min.iters.check = icmp ult i64 %9, 4
  br i1 %min.iters.check, label %.preheader.preheader65, label %vector.memcheck

.preheader.preheader65:                           ; preds = %middle.block, %vector.memcheck, %.preheader.preheader
  %.02428.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.preheader.preheader ], [ %n.vec, %middle.block ]
  %xtraiter67 = and i64 %9, 3
  %lcmp.mod68.not = icmp eq i64 %xtraiter67, 0
  br i1 %lcmp.mod68.not, label %.preheader.prol.loopexit, label %.preheader.prol

.preheader.prol:                                  ; preds = %.preheader.preheader65, %.preheader.prol
  %.02428.prol = phi i64 [ %24, %.preheader.prol ], [ %.02428.ph, %.preheader.preheader65 ]
  %prol.iter69 = phi i64 [ %prol.iter69.next, %.preheader.prol ], [ 0, %.preheader.preheader65 ]
  %19 = getelementptr inbounds double, ptr %16, i64 %.02428.prol
  %20 = load double, ptr %19, align 8, !tbaa !17
  %21 = getelementptr inbounds double, ptr %18, i64 %.02428.prol
  %22 = load double, ptr %21, align 8, !tbaa !17
  %23 = fadd double %20, %22
  store double %23, ptr %21, align 8, !tbaa !17
  %24 = add nuw i64 %.02428.prol, 1
  %prol.iter69.next = add i64 %prol.iter69, 1
  %prol.iter69.cmp.not = icmp eq i64 %prol.iter69.next, %xtraiter67
  br i1 %prol.iter69.cmp.not, label %.preheader.prol.loopexit, label %.preheader.prol, !llvm.loop !19

.preheader.prol.loopexit:                         ; preds = %.preheader.prol, %.preheader.preheader65
  %.02428.unr = phi i64 [ %.02428.ph, %.preheader.preheader65 ], [ %24, %.preheader.prol ]
  %25 = sub i64 %.02428.ph, %9
  %26 = icmp ugt i64 %25, -4
  br i1 %26, label %._crit_edge29, label %.preheader

vector.memcheck:                                  ; preds = %.preheader.preheader
  %27 = shl i64 %9, 3
  %scevgep = getelementptr i8, ptr %18, i64 %27
  %scevgep40 = getelementptr i8, ptr %16, i64 %27
  %bound0 = icmp ult ptr %18, %scevgep40
  %bound1 = icmp ult ptr %16, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.preheader.preheader65, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %9, -4
  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 %16, i64 %index
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load = load <2 x double>, ptr %28, align 8, !tbaa !17, !alias.scope !21
  %wide.load41 = load <2 x double>, ptr %29, align 8, !tbaa !17, !alias.scope !21
  %30 = getelementptr inbounds double, ptr %18, i64 %index
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load42 = load <2 x double>, ptr %30, align 8, !tbaa !17, !alias.scope !24, !noalias !21
  %wide.load43 = load <2 x double>, ptr %31, align 8, !tbaa !17, !alias.scope !24, !noalias !21
  %32 = fadd <2 x double> %wide.load, %wide.load42
  %33 = fadd <2 x double> %wide.load41, %wide.load43
  store <2 x double> %32, ptr %30, align 8, !tbaa !17, !alias.scope !24, !noalias !21
  store <2 x double> %33, ptr %31, align 8, !tbaa !17, !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 %9, %n.vec
  br i1 %cmp.n, label %._crit_edge29, label %.preheader.preheader65

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  %35 = load ptr, ptr %14, align 8, !tbaa !30
  %36 = load ptr, ptr %7, align 8, !tbaa !30
  %37 = shl i64 %11, 3
  %min.iters.check52 = icmp ult i64 %11, 4
  %n.vec55 = and i64 %11, -4
  %cmp.n64 = icmp eq i64 %11, %n.vec55
  %xtraiter = and i64 %11, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph.split.us
  %.02428.us = phi i64 [ 0, %.preheader.lr.ph.split.us ], [ %86, %._crit_edge.us ]
  %38 = getelementptr inbounds ptr, ptr %35, i64 %.02428.us
  %39 = load ptr, ptr %38, align 8, !tbaa !12
  %40 = getelementptr inbounds ptr, ptr %36, i64 %.02428.us
  %41 = load ptr, ptr %40, align 8, !tbaa !12
  br i1 %min.iters.check52, label %scalar.ph51.preheader, label %vector.memcheck44

vector.memcheck44:                                ; preds = %.preheader.us
  %scevgep45 = getelementptr i8, ptr %41, i64 %37
  %scevgep46 = getelementptr i8, ptr %39, i64 %37
  %bound047 = icmp ult ptr %41, %scevgep46
  %bound148 = icmp ult ptr %39, %scevgep45
  %found.conflict49 = and i1 %bound047, %bound148
  br i1 %found.conflict49, label %scalar.ph51.preheader, label %vector.body57

vector.body57:                                    ; preds = %vector.memcheck44, %vector.body57
  %index58 = phi i64 [ %index.next63, %vector.body57 ], [ 0, %vector.memcheck44 ]
  %42 = getelementptr inbounds double, ptr %39, i64 %index58
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %wide.load59 = load <2 x double>, ptr %42, align 8, !tbaa !17, !alias.scope !31
  %wide.load60 = load <2 x double>, ptr %43, align 8, !tbaa !17, !alias.scope !31
  %44 = getelementptr inbounds double, ptr %41, i64 %index58
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load61 = load <2 x double>, ptr %44, align 8, !tbaa !17, !alias.scope !34, !noalias !31
  %wide.load62 = load <2 x double>, ptr %45, align 8, !tbaa !17, !alias.scope !34, !noalias !31
  %46 = fadd <2 x double> %wide.load59, %wide.load61
  %47 = fadd <2 x double> %wide.load60, %wide.load62
  store <2 x double> %46, ptr %44, align 8, !tbaa !17, !alias.scope !34, !noalias !31
  store <2 x double> %47, ptr %45, align 8, !tbaa !17, !alias.scope !34, !noalias !31
  %index.next63 = add nuw i64 %index58, 4
  %48 = icmp eq i64 %index.next63, %n.vec55
  br i1 %48, label %middle.block50, label %vector.body57, !llvm.loop !36

middle.block50:                                   ; preds = %vector.body57
  br i1 %cmp.n64, label %._crit_edge.us, label %scalar.ph51.preheader

scalar.ph51.preheader:                            ; preds = %middle.block50, %vector.memcheck44, %.preheader.us
  %.027.us.ph = phi i64 [ 0, %vector.memcheck44 ], [ 0, %.preheader.us ], [ %n.vec55, %middle.block50 ]
  br i1 %lcmp.mod.not, label %scalar.ph51.prol.loopexit, label %scalar.ph51.prol

scalar.ph51.prol:                                 ; preds = %scalar.ph51.preheader, %scalar.ph51.prol
  %.027.us.prol = phi i64 [ %54, %scalar.ph51.prol ], [ %.027.us.ph, %scalar.ph51.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph51.prol ], [ 0, %scalar.ph51.preheader ]
  %49 = getelementptr inbounds double, ptr %39, i64 %.027.us.prol
  %50 = load double, ptr %49, align 8, !tbaa !17
  %51 = getelementptr inbounds double, ptr %41, i64 %.027.us.prol
  %52 = load double, ptr %51, align 8, !tbaa !17
  %53 = fadd double %50, %52
  store double %53, ptr %51, align 8, !tbaa !17
  %54 = add nuw i64 %.027.us.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 %scalar.ph51.prol.loopexit, label %scalar.ph51.prol, !llvm.loop !37

scalar.ph51.prol.loopexit:                        ; preds = %scalar.ph51.prol, %scalar.ph51.preheader
  %.027.us.unr = phi i64 [ %.027.us.ph, %scalar.ph51.preheader ], [ %54, %scalar.ph51.prol ]
  %55 = sub i64 %.027.us.ph, %11
  %56 = icmp ugt i64 %55, -4
  br i1 %56, label %._crit_edge.us, label %scalar.ph51

scalar.ph51:                                      ; preds = %scalar.ph51.prol.loopexit, %scalar.ph51
  %.027.us = phi i64 [ %80, %scalar.ph51 ], [ %.027.us.unr, %scalar.ph51.prol.loopexit ]
  %57 = getelementptr inbounds double, ptr %39, i64 %.027.us
  %58 = load double, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds double, ptr %41, i64 %.027.us
  %60 = load double, ptr %59, align 8, !tbaa !17
  %61 = fadd double %58, %60
  store double %61, ptr %59, align 8, !tbaa !17
  %62 = add nuw i64 %.027.us, 1
  %63 = getelementptr inbounds double, ptr %39, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !17
  %65 = getelementptr inbounds double, ptr %41, i64 %62
  %66 = load double, ptr %65, align 8, !tbaa !17
  %67 = fadd double %64, %66
  store double %67, ptr %65, align 8, !tbaa !17
  %68 = add nuw i64 %.027.us, 2
  %69 = getelementptr inbounds double, ptr %39, i64 %68
  %70 = load double, ptr %69, align 8, !tbaa !17
  %71 = getelementptr inbounds double, ptr %41, i64 %68
  %72 = load double, ptr %71, align 8, !tbaa !17
  %73 = fadd double %70, %72
  store double %73, ptr %71, align 8, !tbaa !17
  %74 = add nuw i64 %.027.us, 3
  %75 = getelementptr inbounds double, ptr %39, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !17
  %77 = getelementptr inbounds double, ptr %41, i64 %74
  %78 = load double, ptr %77, align 8, !tbaa !17
  %79 = fadd double %76, %78
  store double %79, ptr %77, align 8, !tbaa !17
  %80 = add nuw i64 %.027.us, 4
  %exitcond.not.3 = icmp eq i64 %80, %11
  br i1 %exitcond.not.3, label %._crit_edge.us, label %scalar.ph51, !llvm.loop !38

._crit_edge.us:                                   ; preds = %scalar.ph51.prol.loopexit, %scalar.ph51, %middle.block50
  %81 = getelementptr inbounds double, ptr %16, i64 %.02428.us
  %82 = load double, ptr %81, align 8, !tbaa !17
  %83 = getelementptr inbounds double, ptr %18, i64 %.02428.us
  %84 = load double, ptr %83, align 8, !tbaa !17
  %85 = fadd double %82, %84
  store double %85, ptr %83, align 8, !tbaa !17
  %86 = add nuw i64 %.02428.us, 1
  %exitcond35.not = icmp eq i64 %86, %9
  br i1 %exitcond35.not, label %._crit_edge29, label %.preheader.us, !llvm.loop !39

._crit_edge:                                      ; preds = %._crit_edge29, %2
  ret void

.preheader:                                       ; preds = %.preheader.prol.loopexit, %.preheader
  %.02428 = phi i64 [ %110, %.preheader ], [ %.02428.unr, %.preheader.prol.loopexit ]
  %87 = getelementptr inbounds double, ptr %16, i64 %.02428
  %88 = load double, ptr %87, align 8, !tbaa !17
  %89 = getelementptr inbounds double, ptr %18, i64 %.02428
  %90 = load double, ptr %89, align 8, !tbaa !17
  %91 = fadd double %88, %90
  store double %91, ptr %89, align 8, !tbaa !17
  %92 = add nuw i64 %.02428, 1
  %93 = getelementptr inbounds double, ptr %16, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !17
  %95 = getelementptr inbounds double, ptr %18, i64 %92
  %96 = load double, ptr %95, align 8, !tbaa !17
  %97 = fadd double %94, %96
  store double %97, ptr %95, align 8, !tbaa !17
  %98 = add nuw i64 %.02428, 2
  %99 = getelementptr inbounds double, ptr %16, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !17
  %101 = getelementptr inbounds double, ptr %18, i64 %98
  %102 = load double, ptr %101, align 8, !tbaa !17
  %103 = fadd double %100, %102
  store double %103, ptr %101, align 8, !tbaa !17
  %104 = add nuw i64 %.02428, 3
  %105 = getelementptr inbounds double, ptr %16, i64 %104
  %106 = load double, ptr %105, align 8, !tbaa !17
  %107 = getelementptr inbounds double, ptr %18, i64 %104
  %108 = load double, ptr %107, align 8, !tbaa !17
  %109 = fadd double %106, %108
  store double %109, ptr %107, align 8, !tbaa !17
  %110 = add nuw i64 %.02428, 4
  %exitcond36.not.3 = icmp eq i64 %110, %9
  br i1 %exitcond36.not.3, label %._crit_edge29, label %.preheader, !llvm.loop !40

._crit_edge29:                                    ; preds = %._crit_edge.us, %.preheader.prol.loopexit, %.preheader, %middle.block, %.preheader26
  %111 = add nuw i64 %.02530, 1
  %exitcond37.not = icmp eq i64 %111, %4
  br i1 %exitcond37.not, label %._crit_edge, label %.preheader26, !llvm.loop !41
}

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

!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, !10, i64 8}
!6 = !{!"", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !10, i64 24}
!14 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24}
!15 = !{!14, !10, i64 16}
!16 = !{!14, !7, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !8, 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 = !{!14, !7, i64 0}
!31 = !{!32}
!32 = distinct !{!32, !33}
!33 = distinct !{!33, !"LVerDomain"}
!34 = !{!35}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !27, !28, !29}
!37 = distinct !{!37, !20}
!38 = distinct !{!38, !27, !28}
!39 = distinct !{!39, !27}
!40 = distinct !{!40, !27, !28}
!41 = distinct !{!41, !27}


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