; LLVM IR from Leet-Us-Code/DSA-A-Z-Practice :: Sid's Levels/Level - 2/Arrays/MinimumSwapsAndKTogether.ll (Z7minSwapPiii)

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

14:                                               ; preds = %31, %3
  %15 = load i32, ptr %8, align 4, !tbaa !9
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = icmp slt i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %34

19:                                               ; preds = %14
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds i32, ptr %20, i64 %22
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %27, label %30

27:                                               ; preds = %19
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %7, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %27, %19
  br label %31

31:                                               ; preds = %30
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %8, align 4, !tbaa !9
  br label %14, !llvm.loop !11

34:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 1000000000, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %52, %34
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %55

40:                                               ; preds = %35
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i32, ptr %41, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = icmp sgt i32 %45, %46
  br i1 %47, label %48, label %51

48:                                               ; preds = %40
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %10, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %48, %40
  br label %52

52:                                               ; preds = %51
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %11, align 4, !tbaa !9
  br label %35, !llvm.loop !13

55:                                               ; preds = %39
  %56 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %56, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %57 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %57, ptr %13, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %90, %55
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = load i32, ptr %5, align 4, !tbaa !9
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %62, label %66

62:                                               ; preds = %58
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = load i32, ptr %5, align 4, !tbaa !9
  %65 = icmp slt i32 %63, %64
  br label %66

66:                                               ; preds = %62, %58
  %67 = phi i1 [ false, %58 ], [ %65, %62 ]
  br i1 %67, label %68, label %97

68:                                               ; preds = %66
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = icmp sgt i32 %73, %74
  br i1 %75, label %76, label %79

76:                                               ; preds = %68
  %77 = load i32, ptr %10, align 4, !tbaa !9
  %78 = add nsw i32 %77, -1
  store i32 %78, ptr %10, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %76, %68
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load i32, ptr %13, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %80, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = load i32, ptr %6, align 4, !tbaa !9
  %86 = icmp sgt i32 %84, %85
  br i1 %86, label %87, label %90

87:                                               ; preds = %79
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %10, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %87, %79
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %92 = load i32, ptr %91, align 4, !tbaa !9
  store i32 %92, ptr %9, align 4, !tbaa !9
  %93 = load i32, ptr %12, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %12, align 4, !tbaa !9
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %13, align 4, !tbaa !9
  br label %58, !llvm.loop !14

97:                                               ; preds = %66
  %98 = load i32, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret i32 %98
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint 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 = { 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 = distinct !{!13, !12}
!14 = distinct !{!14, !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 nounwind uwtable
define dso_local noundef i32 @_Z7minSwapPiii(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = icmp sgt i32 %1, 0
  br i1 %6, label %.lr.ph.preheader, label %._crit_edge35.thread

._crit_edge35.thread:                             ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  br label %._crit_edge41

.lr.ph.preheader:                                 ; preds = %3
  %wide.trip.count = zext nneg i32 %1 to i64
  %min.iters.check = icmp ult i32 %1, 8
  br i1 %min.iters.check, label %.lr.ph.preheader88, label %vector.ph

.lr.ph.preheader88:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.02830.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %16, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %2, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %13, %vector.body ]
  %vec.phi63 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ]
  %7 = getelementptr inbounds i32, ptr %0, i64 %index
  %8 = getelementptr inbounds i8, ptr %7, i64 16
  %wide.load = load <4 x i32>, ptr %7, align 4, !tbaa !5
  %wide.load64 = load <4 x i32>, ptr %8, align 4, !tbaa !5
  %9 = icmp sle <4 x i32> %wide.load, %broadcast.splat
  %10 = icmp sle <4 x i32> %wide.load64, %broadcast.splat
  %11 = zext <4 x i1> %9 to <4 x i32>
  %12 = zext <4 x i1> %10 to <4 x i32>
  %13 = add <4 x i32> %vec.phi, %11
  %14 = add <4 x i32> %vec.phi63, %12
  %index.next = add nuw i64 %index, 8
  %15 = icmp eq i64 %index.next, %n.vec
  br i1 %15, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %14, %13
  %16 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader88

._crit_edge:                                      ; preds = %.lr.ph, %middle.block
  %spec.select.lcssa = phi i32 [ %16, %middle.block ], [ %spec.select, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %.not61 = icmp eq i32 %spec.select.lcssa, 0
  br i1 %.not61, label %._crit_edge35, label %.lr.ph34.preheader

.lr.ph34.preheader:                               ; preds = %._crit_edge
  %wide.trip.count47 = zext nneg i32 %spec.select.lcssa to i64
  %min.iters.check67 = icmp ult i32 %spec.select.lcssa, 8
  br i1 %min.iters.check67, label %.lr.ph34.preheader85, label %vector.ph68

.lr.ph34.preheader85:                             ; preds = %middle.block65, %.lr.ph34.preheader
  %indvars.iv44.ph = phi i64 [ 0, %.lr.ph34.preheader ], [ %n.vec70, %middle.block65 ]
  %.ph = phi i32 [ 0, %.lr.ph34.preheader ], [ %26, %middle.block65 ]
  br label %.lr.ph34

vector.ph68:                                      ; preds = %.lr.ph34.preheader
  %n.vec70 = and i64 %wide.trip.count47, 2147483640
  %broadcast.splatinsert78 = insertelement <4 x i32> poison, i32 %2, i64 0
  %broadcast.splat79 = shufflevector <4 x i32> %broadcast.splatinsert78, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body72

vector.body72:                                    ; preds = %vector.body72, %vector.ph68
  %index73 = phi i64 [ 0, %vector.ph68 ], [ %index.next80, %vector.body72 ]
  %vec.phi74 = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %23, %vector.body72 ]
  %vec.phi75 = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %24, %vector.body72 ]
  %17 = getelementptr inbounds i32, ptr %0, i64 %index73
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %wide.load76 = load <4 x i32>, ptr %17, align 4, !tbaa !5
  %wide.load77 = load <4 x i32>, ptr %18, align 4, !tbaa !5
  %19 = icmp sgt <4 x i32> %wide.load76, %broadcast.splat79
  %20 = icmp sgt <4 x i32> %wide.load77, %broadcast.splat79
  %21 = zext <4 x i1> %19 to <4 x i32>
  %22 = zext <4 x i1> %20 to <4 x i32>
  %23 = add <4 x i32> %vec.phi74, %21
  %24 = add <4 x i32> %vec.phi75, %22
  %index.next80 = add nuw i64 %index73, 8
  %25 = icmp eq i64 %index.next80, %n.vec70
  br i1 %25, label %middle.block65, label %vector.body72, !llvm.loop !13

middle.block65:                                   ; preds = %vector.body72
  %bin.rdx81 = add <4 x i32> %24, %23
  %26 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx81)
  %cmp.n82 = icmp eq i64 %n.vec70, %wide.trip.count47
  br i1 %cmp.n82, label %._crit_edge35, label %.lr.ph34.preheader85

.lr.ph:                                           ; preds = %.lr.ph.preheader88, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader88 ]
  %.02830 = phi i32 [ %spec.select, %.lr.ph ], [ %.02830.ph, %.lr.ph.preheader88 ]
  %27 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %.not = icmp sle i32 %28, %2
  %29 = zext i1 %.not to i32
  %spec.select = add nuw nsw i32 %.02830, %29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge35:                                    ; preds = %.lr.ph34, %middle.block65, %._crit_edge
  %.lcssa = phi i32 [ 0, %._crit_edge ], [ %26, %middle.block65 ], [ %spec.select42, %.lr.ph34 ]
  store i32 %.lcssa, ptr %5, align 4, !tbaa !5
  store i32 %.lcssa, ptr %4, align 4, !tbaa !5
  %30 = icmp slt i32 %spec.select.lcssa, %1
  %31 = and i1 %6, %30
  br i1 %31, label %.lr.ph40.preheader, label %._crit_edge41

.lr.ph40.preheader:                               ; preds = %._crit_edge35
  %32 = zext nneg i32 %spec.select.lcssa to i64
  %33 = zext nneg i32 %1 to i64
  br label %.lr.ph40

.lr.ph34:                                         ; preds = %.lr.ph34.preheader85, %.lr.ph34
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %.lr.ph34 ], [ %indvars.iv44.ph, %.lr.ph34.preheader85 ]
  %34 = phi i32 [ %spec.select42, %.lr.ph34 ], [ %.ph, %.lr.ph34.preheader85 ]
  %35 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv44
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, %2
  %38 = zext i1 %37 to i32
  %spec.select42 = add nuw nsw i32 %34, %38
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %exitcond48.not = icmp eq i64 %indvars.iv.next45, %wide.trip.count47
  br i1 %exitcond48.not, label %._crit_edge35, label %.lr.ph34, !llvm.loop !15

.lr.ph40:                                         ; preds = %.lr.ph40.preheader, %52
  %indvars.iv51 = phi i64 [ 0, %.lr.ph40.preheader ], [ %indvars.iv.next52, %52 ]
  %indvars.iv49 = phi i64 [ %32, %.lr.ph40.preheader ], [ %indvars.iv.next50, %52 ]
  %39 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv51
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = icmp sgt i32 %40, %2
  br i1 %41, label %42, label %45

42:                                               ; preds = %.lr.ph40
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = add nsw i32 %43, -1
  store i32 %44, ptr %5, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %42, %.lr.ph40
  %46 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv49
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, %2
  br i1 %48, label %49, label %52

49:                                               ; preds = %45
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %5, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %49, %45
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr %4, align 4, !tbaa !5
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1
  %55 = icmp ult i64 %indvars.iv.next52, %33
  %56 = icmp ult i64 %indvars.iv.next50, %33
  %57 = select i1 %55, i1 %56, i1 false
  br i1 %57, label %.lr.ph40, label %._crit_edge41, !llvm.loop !16

._crit_edge41:                                    ; preds = %52, %._crit_edge35.thread, %._crit_edge35
  %58 = phi i32 [ %.lcssa, %._crit_edge35 ], [ 0, %._crit_edge35.thread ], [ %54, %52 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  ret i32 %58
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3

attributes #0 = { mustprogress 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 = { inlinehint 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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11, !12}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10, !12, !11}
!16 = distinct !{!16, !10}


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