; LLVM IR from cvxgrp/scs :: src/cones.ll (scs_proj_dual_cone)

; 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.SCS_CONE_WORK = type { ptr, ptr, i32, i32, ptr, i32, double }

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nounwind uwtable
declare dso_local void @scale_box_cone(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @_scs_proj_dual_cone(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %12 = load ptr, ptr %6, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %12, i32 0, i32 0
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %14, ptr %11, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %15, i32 0, i32 3
  %17 = load i32, ptr %16, align 4, !tbaa !13
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %25, label %19

19:                                               ; preds = %4
  %20 = load ptr, ptr %11, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  call void @scale_box_cone(ptr noundef %20, ptr noundef %21, ptr noundef %22)
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %23, i32 0, i32 3
  store i32 1, ptr %24, align 4, !tbaa !13
  br label %25

25:                                               ; preds = %19, %4
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %26, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !14
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %30, i32 0, i32 5
  %32 = load i32, ptr %31, align 8, !tbaa !15
  %33 = sext i32 %32 to i64
  %34 = mul i64 %33, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %29, i64 %34, i1 false)
  store i32 0, ptr %10, align 4, !tbaa !16
  br label %35

35:                                               ; preds = %60, %25
  %36 = load i32, ptr %10, align 4, !tbaa !16
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %37, i32 0, i32 5
  %39 = load i32, ptr %38, align 8, !tbaa !15
  %40 = icmp slt i32 %36, %39
  br i1 %40, label %41, label %63

41:                                               ; preds = %35
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %51

44:                                               ; preds = %41
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load i32, ptr %10, align 4, !tbaa !16
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr %45, i64 %47
  %49 = load double, ptr %48, align 8, !tbaa !17
  %50 = fneg double %49
  br label %52

51:                                               ; preds = %41
  br label %52

52:                                               ; preds = %51, %44
  %53 = phi double [ %50, %44 ], [ -1.000000e+00, %51 ]
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load i32, ptr %10, align 4, !tbaa !16
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds double, ptr %54, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !17
  %59 = fmul double %58, %53
  store double %59, ptr %57, align 8, !tbaa !17
  br label %60

60:                                               ; preds = %52
  %61 = load i32, ptr %10, align 4, !tbaa !16
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %10, align 4, !tbaa !16
  br label %35, !llvm.loop !18

63:                                               ; preds = %35
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  %69 = zext i1 %68 to i64
  %70 = select i1 %68, i32 1, i32 0
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = call i32 @proj_cone(ptr noundef %64, ptr noundef %65, ptr noundef %66, i32 noundef %70, ptr noundef %71)
  store i32 %72, ptr %9, align 4, !tbaa !16
  store i32 0, ptr %10, align 4, !tbaa !16
  br label %73

73:                                               ; preds = %121, %63
  %74 = load i32, ptr %10, align 4, !tbaa !16
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %75, i32 0, i32 5
  %77 = load i32, ptr %76, align 8, !tbaa !15
  %78 = icmp slt i32 %74, %77
  br i1 %78, label %79, label %124

79:                                               ; preds = %73
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %106

82:                                               ; preds = %79
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = load i32, ptr %10, align 4, !tbaa !16
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds double, ptr %83, i64 %85
  %87 = load double, ptr %86, align 8, !tbaa !17
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = load i32, ptr %10, align 4, !tbaa !16
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !17
  %93 = fdiv double %87, %92
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %94, i32 0, i32 4
  %96 = load ptr, ptr %95, align 8, !tbaa !14
  %97 = load i32, ptr %10, align 4, !tbaa !16
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds double, ptr %96, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !17
  %101 = fadd double %93, %100
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = load i32, ptr %10, align 4, !tbaa !16
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds double, ptr %102, i64 %104
  store double %101, ptr %105, align 8, !tbaa !17
  br label %120

106:                                              ; preds = %79
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.SCS_CONE_WORK, ptr %107, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !14
  %110 = load i32, ptr %10, align 4, !tbaa !16
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  %113 = load double, ptr %112, align 8, !tbaa !17
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = load i32, ptr %10, align 4, !tbaa !16
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds double, ptr %114, i64 %116
  %118 = load double, ptr %117, align 8, !tbaa !17
  %119 = fadd double %118, %113
  store double %119, ptr %117, align 8, !tbaa !17
  br label %120

120:                                              ; preds = %106, %82
  br label %121

121:                                              ; preds = %120
  %122 = load i32, ptr %10, align 4, !tbaa !16
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %10, align 4, !tbaa !16
  br label %73, !llvm.loop !20

124:                                              ; preds = %73
  %125 = load i32, ptr %9, align 4, !tbaa !16
  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
  ret i32 %125
}

; Function Attrs: nounwind uwtable
declare hidden i32 @proj_cone(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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


; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: nounwind uwtable
declare dso_local void @scale_box_cone(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @_scs_proj_dual_cone(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 20
  %7 = load i32, ptr %6, align 4, !tbaa !12
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %8, label %9

8:                                                ; preds = %4
  tail call void @scale_box_cone(ptr noundef %5, ptr noundef nonnull %1, ptr noundef %2)
  store i32 1, ptr %6, align 4, !tbaa !12
  br label %9

9:                                                ; preds = %8, %4
  %10 = getelementptr inbounds i8, ptr %1, i64 24
  %11 = load ptr, ptr %10, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %1, i64 32
  %13 = load i32, ptr %12, align 8, !tbaa !14
  %14 = sext i32 %13 to i64
  %15 = shl nsw i64 %14, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %0, i64 %15, i1 false)
  %16 = load i32, ptr %12, align 8, !tbaa !14
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %9
  %.not42 = icmp eq ptr %3, null
  %wide.trip.count54 = zext nneg i32 %16 to i64
  br i1 %.not42, label %.lr.ph.split.us.preheader, label %.lr.ph.split.preheader

.lr.ph.split.preheader:                           ; preds = %.lr.ph
  %min.iters.check = icmp ult i32 %16, 6
  br i1 %min.iters.check, label %.lr.ph.split.preheader136, label %vector.memcheck

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

.lr.ph.split.prol:                                ; preds = %.lr.ph.split.preheader136
  %18 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.ph
  %19 = load double, ptr %18, align 8, !tbaa !15
  %20 = fneg double %19
  %21 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.ph
  %22 = load double, ptr %21, align 8, !tbaa !15
  %23 = fmul double %22, %20
  store double %23, ptr %21, align 8, !tbaa !15
  %indvars.iv.next.prol = or disjoint i64 %indvars.iv.ph, 1
  br label %.lr.ph.split.prol.loopexit

.lr.ph.split.prol.loopexit:                       ; preds = %.lr.ph.split.prol, %.lr.ph.split.preheader136
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.split.preheader136 ], [ %indvars.iv.next.prol, %.lr.ph.split.prol ]
  %24 = add nsw i64 %wide.trip.count54, -1
  %25 = icmp eq i64 %indvars.iv.ph, %24
  br i1 %25, label %._crit_edge, label %.lr.ph.split

vector.memcheck:                                  ; preds = %.lr.ph.split.preheader
  %26 = shl nuw nsw i64 %wide.trip.count54, 3
  %scevgep = getelementptr i8, ptr %0, i64 %26
  %scevgep70 = getelementptr i8, ptr %3, i64 %26
  %bound0 = icmp ugt ptr %scevgep70, %0
  %bound1 = icmp ugt ptr %scevgep, %3
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %.lr.ph.split.preheader136, label %vector.ph

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

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %27 = getelementptr inbounds double, ptr %3, i64 %index
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %wide.load = load <2 x double>, ptr %27, align 8, !tbaa !15, !alias.scope !16
  %wide.load71 = load <2 x double>, ptr %28, align 8, !tbaa !15, !alias.scope !16
  %29 = fneg <2 x double> %wide.load
  %30 = fneg <2 x double> %wide.load71
  %31 = getelementptr inbounds double, ptr %0, i64 %index
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %wide.load72 = load <2 x double>, ptr %31, align 8, !tbaa !15, !alias.scope !19, !noalias !16
  %wide.load73 = load <2 x double>, ptr %32, align 8, !tbaa !15, !alias.scope !19, !noalias !16
  %33 = fmul <2 x double> %wide.load72, %29
  %34 = fmul <2 x double> %wide.load73, %30
  store <2 x double> %33, ptr %31, align 8, !tbaa !15, !alias.scope !19, !noalias !16
  store <2 x double> %34, ptr %32, align 8, !tbaa !15, !alias.scope !19, !noalias !16
  %index.next = add nuw i64 %index, 4
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count54
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.split.preheader136

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %min.iters.check76 = icmp ult i32 %16, 4
  br i1 %min.iters.check76, label %.lr.ph.split.us.preheader135, label %vector.ph77

vector.ph77:                                      ; preds = %.lr.ph.split.us.preheader
  %n.vec79 = and i64 %wide.trip.count54, 2147483644
  br label %vector.body81

vector.body81:                                    ; preds = %vector.body81, %vector.ph77
  %index82 = phi i64 [ 0, %vector.ph77 ], [ %index.next85, %vector.body81 ]
  %36 = getelementptr inbounds double, ptr %0, i64 %index82
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %wide.load83 = load <2 x double>, ptr %36, align 8, !tbaa !15
  %wide.load84 = load <2 x double>, ptr %37, align 8, !tbaa !15
  %38 = fneg <2 x double> %wide.load83
  %39 = fneg <2 x double> %wide.load84
  store <2 x double> %38, ptr %36, align 8, !tbaa !15
  store <2 x double> %39, ptr %37, align 8, !tbaa !15
  %index.next85 = add nuw i64 %index82, 4
  %40 = icmp eq i64 %index.next85, %n.vec79
  br i1 %40, label %middle.block74, label %vector.body81, !llvm.loop !25

middle.block74:                                   ; preds = %vector.body81
  %cmp.n86 = icmp eq i64 %n.vec79, %wide.trip.count54
  br i1 %cmp.n86, label %._crit_edge, label %.lr.ph.split.us.preheader135

.lr.ph.split.us.preheader135:                     ; preds = %middle.block74, %.lr.ph.split.us.preheader
  %indvars.iv51.ph = phi i64 [ 0, %.lr.ph.split.us.preheader ], [ %n.vec79, %middle.block74 ]
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader135, %.lr.ph.split.us
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph.split.us ], [ %indvars.iv51.ph, %.lr.ph.split.us.preheader135 ]
  %41 = getelementptr inbounds double, ptr %0, i64 %indvars.iv51
  %42 = load double, ptr %41, align 8, !tbaa !15
  %43 = fneg double %42
  store double %43, ptr %41, align 8, !tbaa !15
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %exitcond55.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count54
  br i1 %exitcond55.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !26

.lr.ph.split:                                     ; preds = %.lr.ph.split.prol.loopexit, %.lr.ph.split
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph.split ], [ %indvars.iv.unr, %.lr.ph.split.prol.loopexit ]
  %44 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  %45 = load double, ptr %44, align 8, !tbaa !15
  %46 = fneg double %45
  %47 = getelementptr inbounds double, ptr %0, i64 %indvars.iv
  %48 = load double, ptr %47, align 8, !tbaa !15
  %49 = fmul double %48, %46
  store double %49, ptr %47, align 8, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %50 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next
  %51 = load double, ptr %50, align 8, !tbaa !15
  %52 = fneg double %51
  %53 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next
  %54 = load double, ptr %53, align 8, !tbaa !15
  %55 = fmul double %54, %52
  store double %55, ptr %53, align 8, !tbaa !15
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %wide.trip.count54
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph.split, !llvm.loop !27

._crit_edge:                                      ; preds = %.lr.ph.split.prol.loopexit, %.lr.ph.split, %.lr.ph.split.us, %middle.block, %middle.block74, %9
  %.not40 = icmp ne ptr %2, null
  %56 = zext i1 %.not40 to i32
  %57 = tail call i32 @proj_cone(ptr noundef %0, ptr noundef %5, ptr noundef nonnull %1, i32 noundef %56, ptr noundef %3)
  %58 = load i32, ptr %12, align 8, !tbaa !14
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %.lr.ph46, label %._crit_edge47

.lr.ph46:                                         ; preds = %._crit_edge
  %.not41 = icmp eq ptr %3, null
  %60 = load ptr, ptr %10, align 8, !tbaa !13
  %wide.trip.count64 = zext nneg i32 %58 to i64
  br i1 %.not41, label %.lr.ph46.split.us.preheader, label %.lr.ph46.split.preheader

.lr.ph46.split.preheader:                         ; preds = %.lr.ph46
  %min.iters.check99 = icmp eq i32 %58, 1
  br i1 %min.iters.check99, label %.lr.ph46.split.preheader133, label %vector.memcheck87

.lr.ph46.split.preheader133:                      ; preds = %middle.block97, %vector.memcheck87, %.lr.ph46.split.preheader
  %indvars.iv56.ph = phi i64 [ 0, %vector.memcheck87 ], [ 0, %.lr.ph46.split.preheader ], [ %n.vec102, %middle.block97 ]
  %xtraiter138 = and i64 %wide.trip.count64, 1
  %lcmp.mod139.not = icmp eq i64 %xtraiter138, 0
  br i1 %lcmp.mod139.not, label %.lr.ph46.split.prol.loopexit, label %.lr.ph46.split.prol

.lr.ph46.split.prol:                              ; preds = %.lr.ph46.split.preheader133
  %61 = getelementptr inbounds double, ptr %0, i64 %indvars.iv56.ph
  %62 = load double, ptr %61, align 8, !tbaa !15
  %63 = getelementptr inbounds double, ptr %3, i64 %indvars.iv56.ph
  %64 = load double, ptr %63, align 8, !tbaa !15
  %65 = fdiv double %62, %64
  %66 = getelementptr inbounds double, ptr %60, i64 %indvars.iv56.ph
  %67 = load double, ptr %66, align 8, !tbaa !15
  %68 = fadd double %65, %67
  store double %68, ptr %61, align 8, !tbaa !15
  %indvars.iv.next57.prol = or disjoint i64 %indvars.iv56.ph, 1
  br label %.lr.ph46.split.prol.loopexit

.lr.ph46.split.prol.loopexit:                     ; preds = %.lr.ph46.split.prol, %.lr.ph46.split.preheader133
  %indvars.iv56.unr = phi i64 [ %indvars.iv56.ph, %.lr.ph46.split.preheader133 ], [ %indvars.iv.next57.prol, %.lr.ph46.split.prol ]
  %69 = add nsw i64 %wide.trip.count64, -1
  %70 = icmp eq i64 %indvars.iv56.ph, %69
  br i1 %70, label %._crit_edge47, label %.lr.ph46.split

vector.memcheck87:                                ; preds = %.lr.ph46.split.preheader
  %71 = shl nuw nsw i64 %wide.trip.count64, 3
  %scevgep88 = getelementptr i8, ptr %0, i64 %71
  %scevgep89 = getelementptr i8, ptr %3, i64 %71
  %scevgep90 = getelementptr i8, ptr %60, i64 %71
  %bound091 = icmp ugt ptr %scevgep89, %0
  %bound192 = icmp ugt ptr %scevgep88, %3
  %found.conflict93 = and i1 %bound091, %bound192
  %bound094 = icmp ugt ptr %scevgep90, %0
  %bound195 = icmp ult ptr %60, %scevgep88
  %found.conflict96 = and i1 %bound094, %bound195
  %conflict.rdx = or i1 %found.conflict93, %found.conflict96
  br i1 %conflict.rdx, label %.lr.ph46.split.preheader133, label %vector.ph100

vector.ph100:                                     ; preds = %vector.memcheck87
  %n.vec102 = and i64 %wide.trip.count64, 2147483646
  br label %vector.body104

vector.body104:                                   ; preds = %vector.body104, %vector.ph100
  %index105 = phi i64 [ 0, %vector.ph100 ], [ %index.next109, %vector.body104 ]
  %72 = getelementptr inbounds double, ptr %0, i64 %index105
  %wide.load106 = load <2 x double>, ptr %72, align 8, !tbaa !15, !alias.scope !28, !noalias !31
  %73 = getelementptr inbounds double, ptr %3, i64 %index105
  %wide.load107 = load <2 x double>, ptr %73, align 8, !tbaa !15, !alias.scope !34
  %74 = fdiv <2 x double> %wide.load106, %wide.load107
  %75 = getelementptr inbounds double, ptr %60, i64 %index105
  %wide.load108 = load <2 x double>, ptr %75, align 8, !tbaa !15, !alias.scope !35
  %76 = fadd <2 x double> %74, %wide.load108
  store <2 x double> %76, ptr %72, align 8, !tbaa !15, !alias.scope !28, !noalias !31
  %index.next109 = add nuw i64 %index105, 2
  %77 = icmp eq i64 %index.next109, %n.vec102
  br i1 %77, label %middle.block97, label %vector.body104, !llvm.loop !36

middle.block97:                                   ; preds = %vector.body104
  %cmp.n110 = icmp eq i64 %n.vec102, %wide.trip.count64
  br i1 %cmp.n110, label %._crit_edge47, label %.lr.ph46.split.preheader133

.lr.ph46.split.us.preheader:                      ; preds = %.lr.ph46
  %min.iters.check119 = icmp ult i32 %58, 6
  br i1 %min.iters.check119, label %.lr.ph46.split.us.preheader132, label %vector.memcheck111

vector.memcheck111:                               ; preds = %.lr.ph46.split.us.preheader
  %78 = shl nuw nsw i64 %wide.trip.count64, 3
  %scevgep112 = getelementptr i8, ptr %0, i64 %78
  %scevgep113 = getelementptr i8, ptr %60, i64 %78
  %bound0114 = icmp ugt ptr %scevgep113, %0
  %bound1115 = icmp ult ptr %60, %scevgep112
  %found.conflict116 = and i1 %bound0114, %bound1115
  br i1 %found.conflict116, label %.lr.ph46.split.us.preheader132, label %vector.ph120

vector.ph120:                                     ; preds = %vector.memcheck111
  %n.vec122 = and i64 %wide.trip.count64, 2147483644
  br label %vector.body124

vector.body124:                                   ; preds = %vector.body124, %vector.ph120
  %index125 = phi i64 [ 0, %vector.ph120 ], [ %index.next130, %vector.body124 ]
  %79 = getelementptr inbounds double, ptr %60, i64 %index125
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %wide.load126 = load <2 x double>, ptr %79, align 8, !tbaa !15, !alias.scope !37
  %wide.load127 = load <2 x double>, ptr %80, align 8, !tbaa !15, !alias.scope !37
  %81 = getelementptr inbounds double, ptr %0, i64 %index125
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  %wide.load128 = load <2 x double>, ptr %81, align 8, !tbaa !15, !alias.scope !40, !noalias !37
  %wide.load129 = load <2 x double>, ptr %82, align 8, !tbaa !15, !alias.scope !40, !noalias !37
  %83 = fadd <2 x double> %wide.load126, %wide.load128
  %84 = fadd <2 x double> %wide.load127, %wide.load129
  store <2 x double> %83, ptr %81, align 8, !tbaa !15, !alias.scope !40, !noalias !37
  store <2 x double> %84, ptr %82, align 8, !tbaa !15, !alias.scope !40, !noalias !37
  %index.next130 = add nuw i64 %index125, 4
  %85 = icmp eq i64 %index.next130, %n.vec122
  br i1 %85, label %middle.block117, label %vector.body124, !llvm.loop !42

middle.block117:                                  ; preds = %vector.body124
  %cmp.n131 = icmp eq i64 %n.vec122, %wide.trip.count64
  br i1 %cmp.n131, label %._crit_edge47, label %.lr.ph46.split.us.preheader132

.lr.ph46.split.us.preheader132:                   ; preds = %middle.block117, %vector.memcheck111, %.lr.ph46.split.us.preheader
  %indvars.iv61.ph = phi i64 [ 0, %vector.memcheck111 ], [ 0, %.lr.ph46.split.us.preheader ], [ %n.vec122, %middle.block117 ]
  %xtraiter140 = and i64 %wide.trip.count64, 3
  %lcmp.mod141.not = icmp eq i64 %xtraiter140, 0
  br i1 %lcmp.mod141.not, label %.lr.ph46.split.us.prol.loopexit, label %.lr.ph46.split.us.prol

.lr.ph46.split.us.prol:                           ; preds = %.lr.ph46.split.us.preheader132, %.lr.ph46.split.us.prol
  %indvars.iv61.prol = phi i64 [ %indvars.iv.next62.prol, %.lr.ph46.split.us.prol ], [ %indvars.iv61.ph, %.lr.ph46.split.us.preheader132 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph46.split.us.prol ], [ 0, %.lr.ph46.split.us.preheader132 ]
  %86 = getelementptr inbounds double, ptr %60, i64 %indvars.iv61.prol
  %87 = load double, ptr %86, align 8, !tbaa !15
  %88 = getelementptr inbounds double, ptr %0, i64 %indvars.iv61.prol
  %89 = load double, ptr %88, align 8, !tbaa !15
  %90 = fadd double %87, %89
  store double %90, ptr %88, align 8, !tbaa !15
  %indvars.iv.next62.prol = add nuw nsw i64 %indvars.iv61.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter140
  br i1 %prol.iter.cmp.not, label %.lr.ph46.split.us.prol.loopexit, label %.lr.ph46.split.us.prol, !llvm.loop !43

.lr.ph46.split.us.prol.loopexit:                  ; preds = %.lr.ph46.split.us.prol, %.lr.ph46.split.us.preheader132
  %indvars.iv61.unr = phi i64 [ %indvars.iv61.ph, %.lr.ph46.split.us.preheader132 ], [ %indvars.iv.next62.prol, %.lr.ph46.split.us.prol ]
  %91 = sub nsw i64 %indvars.iv61.ph, %wide.trip.count64
  %92 = icmp ugt i64 %91, -4
  br i1 %92, label %._crit_edge47, label %.lr.ph46.split.us

.lr.ph46.split.us:                                ; preds = %.lr.ph46.split.us.prol.loopexit, %.lr.ph46.split.us
  %indvars.iv61 = phi i64 [ %indvars.iv.next62.3, %.lr.ph46.split.us ], [ %indvars.iv61.unr, %.lr.ph46.split.us.prol.loopexit ]
  %93 = getelementptr inbounds double, ptr %60, i64 %indvars.iv61
  %94 = load double, ptr %93, align 8, !tbaa !15
  %95 = getelementptr inbounds double, ptr %0, i64 %indvars.iv61
  %96 = load double, ptr %95, align 8, !tbaa !15
  %97 = fadd double %94, %96
  store double %97, ptr %95, align 8, !tbaa !15
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %98 = getelementptr inbounds double, ptr %60, i64 %indvars.iv.next62
  %99 = load double, ptr %98, align 8, !tbaa !15
  %100 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next62
  %101 = load double, ptr %100, align 8, !tbaa !15
  %102 = fadd double %99, %101
  store double %102, ptr %100, align 8, !tbaa !15
  %indvars.iv.next62.1 = add nuw nsw i64 %indvars.iv61, 2
  %103 = getelementptr inbounds double, ptr %60, i64 %indvars.iv.next62.1
  %104 = load double, ptr %103, align 8, !tbaa !15
  %105 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next62.1
  %106 = load double, ptr %105, align 8, !tbaa !15
  %107 = fadd double %104, %106
  store double %107, ptr %105, align 8, !tbaa !15
  %indvars.iv.next62.2 = add nuw nsw i64 %indvars.iv61, 3
  %108 = getelementptr inbounds double, ptr %60, i64 %indvars.iv.next62.2
  %109 = load double, ptr %108, align 8, !tbaa !15
  %110 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next62.2
  %111 = load double, ptr %110, align 8, !tbaa !15
  %112 = fadd double %109, %111
  store double %112, ptr %110, align 8, !tbaa !15
  %indvars.iv.next62.3 = add nuw nsw i64 %indvars.iv61, 4
  %exitcond65.not.3 = icmp eq i64 %indvars.iv.next62.3, %wide.trip.count64
  br i1 %exitcond65.not.3, label %._crit_edge47, label %.lr.ph46.split.us, !llvm.loop !45

.lr.ph46.split:                                   ; preds = %.lr.ph46.split.prol.loopexit, %.lr.ph46.split
  %indvars.iv56 = phi i64 [ %indvars.iv.next57.1, %.lr.ph46.split ], [ %indvars.iv56.unr, %.lr.ph46.split.prol.loopexit ]
  %113 = getelementptr inbounds double, ptr %0, i64 %indvars.iv56
  %114 = load double, ptr %113, align 8, !tbaa !15
  %115 = getelementptr inbounds double, ptr %3, i64 %indvars.iv56
  %116 = load double, ptr %115, align 8, !tbaa !15
  %117 = fdiv double %114, %116
  %118 = getelementptr inbounds double, ptr %60, i64 %indvars.iv56
  %119 = load double, ptr %118, align 8, !tbaa !15
  %120 = fadd double %117, %119
  store double %120, ptr %113, align 8, !tbaa !15
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %121 = getelementptr inbounds double, ptr %0, i64 %indvars.iv.next57
  %122 = load double, ptr %121, align 8, !tbaa !15
  %123 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next57
  %124 = load double, ptr %123, align 8, !tbaa !15
  %125 = fdiv double %122, %124
  %126 = getelementptr inbounds double, ptr %60, i64 %indvars.iv.next57
  %127 = load double, ptr %126, align 8, !tbaa !15
  %128 = fadd double %125, %127
  store double %128, ptr %121, align 8, !tbaa !15
  %indvars.iv.next57.1 = add nuw nsw i64 %indvars.iv56, 2
  %exitcond60.not.1 = icmp eq i64 %indvars.iv.next57.1, %wide.trip.count64
  br i1 %exitcond60.not.1, label %._crit_edge47, label %.lr.ph46.split, !llvm.loop !46

._crit_edge47:                                    ; preds = %.lr.ph46.split.prol.loopexit, %.lr.ph46.split, %.lr.ph46.split.us.prol.loopexit, %.lr.ph46.split.us, %middle.block97, %middle.block117, %._crit_edge
  ret i32 %57
}

; Function Attrs: nounwind uwtable
declare hidden i32 @proj_cone(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree 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" }

!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, !7, i64 0}
!6 = !{!"SCS_CONE_WORK", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !10, i64 32, !11, i64 40}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!6, !10, i64 20}
!13 = !{!6, !7, i64 24}
!14 = !{!6, !10, i64 32}
!15 = !{!11, !11, i64 0}
!16 = !{!17}
!17 = distinct !{!17, !18}
!18 = distinct !{!18, !"LVerDomain"}
!19 = !{!20}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !22, !23, !24}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!"llvm.loop.isvectorized", i32 1}
!24 = !{!"llvm.loop.unroll.runtime.disable"}
!25 = distinct !{!25, !22, !23, !24}
!26 = distinct !{!26, !22, !24, !23}
!27 = distinct !{!27, !22, !23}
!28 = !{!29}
!29 = distinct !{!29, !30}
!30 = distinct !{!30, !"LVerDomain"}
!31 = !{!32, !33}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}
!34 = !{!32}
!35 = !{!33}
!36 = distinct !{!36, !22, !23, !24}
!37 = !{!38}
!38 = distinct !{!38, !39}
!39 = distinct !{!39, !"LVerDomain"}
!40 = !{!41}
!41 = distinct !{!41, !39}
!42 = distinct !{!42, !22, !23, !24}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.unroll.disable"}
!45 = distinct !{!45, !22, !23}
!46 = distinct !{!46, !22, !23}


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