; LLVM IR from sovrasov/ags_nlp_solver :: solver/src/evolvent.ll (Z3xydPdiS_i)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: 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
define dso_local void @_Z3xydPdiS_i(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca [10 x i32], align 16
  %13 = alloca [10 x i32], align 16
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca [11 x i32], align 16
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 44, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %22 = load i32, ptr %8, align 4, !tbaa !9
  %23 = sub nsw i32 %22, 1
  store i32 %23, ptr %9, align 4, !tbaa !9
  store i32 1, ptr %10, align 4, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %34, %4
  %25 = load i32, ptr %18, align 4, !tbaa !9
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %37

28:                                               ; preds = %24
  %29 = load i32, ptr %10, align 4, !tbaa !9
  %30 = mul nsw i32 %29, 2
  store i32 %30, ptr %10, align 4, !tbaa !9
  %31 = load i32, ptr %18, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [11 x i32], ptr %17, i64 0, i64 %32
  store i32 1, ptr %33, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %18, align 4, !tbaa !9
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %18, align 4, !tbaa !9
  br label %24, !llvm.loop !11

37:                                               ; preds = %24
  store double 5.000000e-01, ptr %16, align 8, !tbaa !13
  store double 1.000000e+00, ptr %15, align 8, !tbaa !13
  store double 0.000000e+00, ptr %14, align 8, !tbaa !13
  store i32 0, ptr %20, align 4, !tbaa !9
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %156, %37
  %39 = load i32, ptr %19, align 4, !tbaa !9
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = icmp slt i32 %39, %40
  br i1 %41, label %42, label %159

42:                                               ; preds = %38
  %43 = load double, ptr %16, align 8, !tbaa !13
  %44 = fmul double %43, 5.000000e-01
  store double %44, ptr %16, align 8, !tbaa !13
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %83, %42
  %46 = load i32, ptr %18, align 4, !tbaa !9
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %49, label %86

49:                                               ; preds = %45
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load i32, ptr %18, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds double, ptr %50, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !13
  %55 = fcmp olt double %54, 0.000000e+00
  %56 = zext i1 %55 to i64
  %57 = select i1 %55, i32 -1, i32 1
  %58 = load i32, ptr %18, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 %59
  store i32 %57, ptr %60, align 4, !tbaa !9
  %61 = load double, ptr %16, align 8, !tbaa !13
  %62 = load i32, ptr %18, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = sitofp i32 %65 to double
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = load i32, ptr %18, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds double, ptr %67, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !13
  %72 = fneg double %61
  %73 = call double @llvm.fmuladd.f64(double %72, double %66, double %71)
  store double %73, ptr %70, align 8, !tbaa !13
  %74 = load i32, ptr %18, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [11 x i32], ptr %17, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = load i32, ptr %18, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = mul nsw i32 %81, %77
  store i32 %82, ptr %80, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %49
  %84 = load i32, ptr %18, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %18, align 4, !tbaa !9
  br label %45, !llvm.loop !15

86:                                               ; preds = %45
  %87 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %88 = load i32, ptr %87, align 16, !tbaa !9
  store i32 %88, ptr %18, align 4, !tbaa !9
  %89 = load i32, ptr %20, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %93 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  store i32 %92, ptr %93, align 16, !tbaa !9
  %94 = load i32, ptr %18, align 4, !tbaa !9
  %95 = load i32, ptr %20, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 %96
  store i32 %94, ptr %97, align 4, !tbaa !9
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = load i32, ptr %10, align 4, !tbaa !9
  %100 = getelementptr inbounds [10 x i32], ptr %12, i64 0, i64 0
  %101 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  call void @_Z5numbrPiiiRiS_S_(ptr noundef %21, i32 noundef %98, i32 noundef %99, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef %100, ptr noundef %101)
  %102 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  %103 = load i32, ptr %102, align 16, !tbaa !9
  store i32 %103, ptr %18, align 4, !tbaa !9
  %104 = load i32, ptr %20, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 0
  store i32 %107, ptr %108, align 16, !tbaa !9
  %109 = load i32, ptr %18, align 4, !tbaa !9
  %110 = load i32, ptr %20, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 %111
  store i32 %109, ptr %112, align 4, !tbaa !9
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %131, %86
  %114 = load i32, ptr %18, align 4, !tbaa !9
  %115 = load i32, ptr %8, align 4, !tbaa !9
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %117, label %134

117:                                              ; preds = %113
  %118 = load i32, ptr %18, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [11 x i32], ptr %17, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = sub nsw i32 0, %121
  %123 = load i32, ptr %18, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [10 x i32], ptr %13, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !9
  %127 = mul nsw i32 %122, %126
  %128 = load i32, ptr %18, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [11 x i32], ptr %17, i64 0, i64 %129
  store i32 %127, ptr %130, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %117
  %132 = load i32, ptr %18, align 4, !tbaa !9
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %18, align 4, !tbaa !9
  br label %113, !llvm.loop !16

134:                                              ; preds = %113
  %135 = load i32, ptr %11, align 4, !tbaa !9
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %137, label %139

137:                                              ; preds = %134
  %138 = load i32, ptr %20, align 4, !tbaa !9
  store i32 %138, ptr %11, align 4, !tbaa !9
  br label %145

139:                                              ; preds = %134
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = load i32, ptr %20, align 4, !tbaa !9
  %142 = icmp eq i32 %140, %141
  br i1 %142, label %143, label %144

143:                                              ; preds = %139
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %143, %139
  br label %145

145:                                              ; preds = %144, %137
  %146 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %146, ptr %20, align 4, !tbaa !9
  %147 = load double, ptr %15, align 8, !tbaa !13
  %148 = load i32, ptr %10, align 4, !tbaa !9
  %149 = sitofp i32 %148 to double
  %150 = fdiv double %147, %149
  store double %150, ptr %15, align 8, !tbaa !13
  %151 = load double, ptr %15, align 8, !tbaa !13
  %152 = load i32, ptr %21, align 4, !tbaa !9
  %153 = sitofp i32 %152 to double
  %154 = load double, ptr %14, align 8, !tbaa !13
  %155 = call double @llvm.fmuladd.f64(double %151, double %153, double %154)
  store double %155, ptr %14, align 8, !tbaa !13
  br label %156

156:                                              ; preds = %145
  %157 = load i32, ptr %19, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %19, align 4, !tbaa !9
  br label %38, !llvm.loop !17

159:                                              ; preds = %38
  %160 = load double, ptr %14, align 8, !tbaa !13
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  store double %160, ptr %161, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 44, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z5numbrPiiiRiS_S_(ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef) #3

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 = { 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 #4 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z3xydPdiS_i(ptr nocapture noundef writeonly %0, i32 noundef %1, ptr nocapture noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca i32, align 4
  %6 = alloca [10 x i32], align 16
  %7 = alloca [10 x i32], align 16
  %8 = alloca [11 x i32], align 16
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %10 = add nsw i32 %3, -1
  %11 = icmp sgt i32 %3, 0
  br i1 %11, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext nneg i32 %3 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %12 = icmp ult i32 %3, 4
  br i1 %12, label %.preheader.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa99.ph = phi i32 [ poison, %.lr.ph.preheader ], [ %17, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %.04851.unr = phi i32 [ 1, %.lr.ph.preheader ], [ %17, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %.preheader.loopexit.unr-lcssa ]
  %.04851.epil = phi i32 [ %13, %.lr.ph.epil ], [ %.04851.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %13 = shl nsw i32 %.04851.epil, 1
  %14 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %indvars.iv.epil
  store i32 1, ptr %14, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.lr.ph.epil, !llvm.loop !9

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph.epil, %4
  %.048.lcssa = phi i32 [ 1, %4 ], [ %.lcssa99.ph, %.preheader.loopexit.unr-lcssa ], [ %13, %.lr.ph.epil ]
  %15 = icmp sgt i32 %1, 0
  br i1 %15, label %.lr.ph64, label %._crit_edge65

.lr.ph64:                                         ; preds = %.preheader
  %16 = uitofp nneg i32 %.048.lcssa to double
  %wide.trip.count72 = zext i32 %3 to i64
  %wide.trip.count77 = zext nneg i32 %3 to i64
  %min.iters.check87 = icmp eq i32 %3, 1
  %n.vec90 = and i64 %wide.trip.count72, 2147483646
  %cmp.n97 = icmp eq i64 %n.vec90, %wide.trip.count72
  %min.iters.check = icmp ult i32 %3, 8
  %n.vec = and i64 %wide.trip.count72, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count72
  br label %22

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %.04851 = phi i32 [ 1, %.lr.ph.preheader.new ], [ %17, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %17 = shl i32 %.04851, 4
  %18 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %indvars.iv
  store i32 1, ptr %18, align 16, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %19 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %indvars.iv.next
  store i32 1, ptr %19, align 4, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %20 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %indvars.iv.next.1
  store i32 1, ptr %20, align 8, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %21 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %indvars.iv.next.2
  store i32 1, ptr %21, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !11

22:                                               ; preds = %.lr.ph64, %72
  %.063 = phi i32 [ 0, %.lr.ph64 ], [ %73, %72 ]
  %.04362 = phi i32 [ 0, %.lr.ph64 ], [ %78, %72 ]
  %.04561 = phi double [ 5.000000e-01, %.lr.ph64 ], [ %23, %72 ]
  %.04660 = phi double [ 1.000000e+00, %.lr.ph64 ], [ %74, %72 ]
  %.04759 = phi double [ 0.000000e+00, %.lr.ph64 ], [ %77, %72 ]
  %23 = fmul double %.04561, 5.000000e-01
  br i1 %11, label %.lr.ph54, label %._crit_edge

.lr.ph54:                                         ; preds = %22
  %24 = fneg double %23
  br i1 %min.iters.check87, label %scalar.ph86.preheader, label %vector.ph88

vector.ph88:                                      ; preds = %.lr.ph54
  %broadcast.splatinsert = insertelement <2 x double> poison, double %24, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body92

vector.body92:                                    ; preds = %vector.body92, %vector.ph88
  %index93 = phi i64 [ 0, %vector.ph88 ], [ %index.next96, %vector.body92 ]
  %25 = getelementptr inbounds double, ptr %2, i64 %index93
  %wide.load94 = load <2 x double>, ptr %25, align 8, !tbaa !13
  %26 = fcmp olt <2 x double> %wide.load94, zeroinitializer
  %27 = select <2 x i1> %26, <2 x i32> <i32 -1, i32 -1>, <2 x i32> <i32 1, i32 1>
  %28 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 %index93
  %29 = sitofp <2 x i32> %27 to <2 x double>
  %30 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %29, <2 x double> %wide.load94)
  store <2 x double> %30, ptr %25, align 8, !tbaa !13
  %31 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %index93
  %wide.load95 = load <2 x i32>, ptr %31, align 8, !tbaa !5
  %32 = mul nsw <2 x i32> %wide.load95, %27
  store <2 x i32> %32, ptr %28, align 8, !tbaa !5
  %index.next96 = add nuw i64 %index93, 2
  %33 = icmp eq i64 %index.next96, %n.vec90
  br i1 %33, label %middle.block85, label %vector.body92, !llvm.loop !15

middle.block85:                                   ; preds = %vector.body92
  br i1 %cmp.n97, label %._crit_edge, label %scalar.ph86.preheader

scalar.ph86.preheader:                            ; preds = %middle.block85, %.lr.ph54
  %indvars.iv69.ph = phi i64 [ 0, %.lr.ph54 ], [ %n.vec90, %middle.block85 ]
  br label %scalar.ph86

scalar.ph86:                                      ; preds = %scalar.ph86.preheader, %scalar.ph86
  %indvars.iv69 = phi i64 [ %indvars.iv.next70, %scalar.ph86 ], [ %indvars.iv69.ph, %scalar.ph86.preheader ]
  %34 = getelementptr inbounds double, ptr %2, i64 %indvars.iv69
  %35 = load double, ptr %34, align 8, !tbaa !13
  %36 = fcmp olt double %35, 0.000000e+00
  %37 = select i1 %36, i32 -1, i32 1
  %38 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 %indvars.iv69
  %39 = sitofp i32 %37 to double
  %40 = call double @llvm.fmuladd.f64(double %24, double %39, double %35)
  store double %40, ptr %34, align 8, !tbaa !13
  %41 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %indvars.iv69
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = mul nsw i32 %42, %37
  store i32 %43, ptr %38, align 4, !tbaa !5
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count72
  br i1 %exitcond73.not, label %._crit_edge, label %scalar.ph86, !llvm.loop !18

._crit_edge:                                      ; preds = %scalar.ph86, %middle.block85, %22
  %44 = load i32, ptr %6, align 16, !tbaa !5
  %45 = sext i32 %.063 to i64
  %46 = getelementptr inbounds [10 x i32], ptr %6, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %47, ptr %6, align 16, !tbaa !5
  store i32 %44, ptr %46, align 4, !tbaa !5
  call void @_Z5numbrPiiiRiS_S_(ptr noundef nonnull %9, i32 noundef %10, i32 noundef %.048.lcssa, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %48 = load i32, ptr %7, align 16, !tbaa !5
  %49 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 %45
  %50 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %50, ptr %7, align 16, !tbaa !5
  store i32 %48, ptr %49, align 4, !tbaa !5
  br i1 %11, label %.lr.ph57.preheader, label %._crit_edge58

.lr.ph57.preheader:                               ; preds = %._crit_edge
  br i1 %min.iters.check, label %.lr.ph57.preheader98, label %vector.body

vector.body:                                      ; preds = %.lr.ph57.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph57.preheader ]
  %51 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %index
  %52 = getelementptr inbounds i8, ptr %51, i64 16
  %wide.load = load <4 x i32>, ptr %51, align 16, !tbaa !5
  %wide.load82 = load <4 x i32>, ptr %52, align 16, !tbaa !5
  %53 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 %index
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %wide.load83 = load <4 x i32>, ptr %53, align 16, !tbaa !5
  %wide.load84 = load <4 x i32>, ptr %54, align 16, !tbaa !5
  %55 = mul <4 x i32> %wide.load, %wide.load83
  %56 = mul <4 x i32> %wide.load82, %wide.load84
  %57 = sub <4 x i32> zeroinitializer, %55
  %58 = sub <4 x i32> zeroinitializer, %56
  store <4 x i32> %57, ptr %51, align 16, !tbaa !5
  store <4 x i32> %58, ptr %52, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %59 = icmp eq i64 %index.next, %n.vec
  br i1 %59, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge58, label %.lr.ph57.preheader98

.lr.ph57.preheader98:                             ; preds = %middle.block, %.lr.ph57.preheader
  %indvars.iv74.ph = phi i64 [ 0, %.lr.ph57.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph57

.lr.ph57:                                         ; preds = %.lr.ph57.preheader98, %.lr.ph57
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.lr.ph57 ], [ %indvars.iv74.ph, %.lr.ph57.preheader98 ]
  %60 = getelementptr inbounds [11 x i32], ptr %8, i64 0, i64 %indvars.iv74
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = getelementptr inbounds [10 x i32], ptr %7, i64 0, i64 %indvars.iv74
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = mul i32 %61, %63
  %65 = sub i32 0, %64
  store i32 %65, ptr %60, align 4, !tbaa !5
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %exitcond78.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count77
  br i1 %exitcond78.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !20

._crit_edge58:                                    ; preds = %.lr.ph57, %middle.block, %._crit_edge
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %._crit_edge58
  store i32 %.063, ptr %5, align 4, !tbaa !5
  br label %72

69:                                               ; preds = %._crit_edge58
  %70 = icmp eq i32 %66, %.063
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %69, %71, %68
  %73 = phi i32 [ %66, %69 ], [ 0, %71 ], [ %.063, %68 ]
  %74 = fdiv double %.04660, %16
  %75 = load i32, ptr %9, align 4, !tbaa !5
  %76 = sitofp i32 %75 to double
  %77 = call double @llvm.fmuladd.f64(double %74, double %76, double %.04759)
  %78 = add nuw nsw i32 %.04362, 1
  %exitcond79.not = icmp eq i32 %78, %1
  br i1 %exitcond79.not, label %._crit_edge65, label %22, !llvm.loop !21

._crit_edge65:                                    ; preds = %72, %.preheader
  %.047.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %77, %72 ]
  store double %.047.lcssa, ptr %0, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z5numbrPiiiRiS_S_(ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = distinct !{!15, !12, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !12, !17, !16}
!19 = distinct !{!19, !12, !16, !17}
!20 = distinct !{!20, !12, !17, !16}
!21 = distinct !{!21, !12}


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