; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #806 (Div. 4)/G.ll (Z5solvev)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::initializer_list" = type { ptr, i64 }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::initializer_list", align 8
  %16 = alloca [3 x i64], align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %19 = load i64, ptr %1, align 8, !tbaa !5
  %20 = call ptr @llvm.stacksave.p0()
  store ptr %20, ptr %3, align 8
  %21 = alloca i64, i64 %19, align 16
  store i64 %19, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr %21, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  store ptr %22, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = mul nuw i64 8, %19
  %25 = udiv i64 %24, 8
  %26 = getelementptr inbounds i64, ptr %23, i64 %25
  store ptr %26, ptr %7, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %36, %0
  %28 = load ptr, ptr %6, align 8, !tbaa !9
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = icmp ne ptr %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %39

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %33 = load ptr, ptr %6, align 8, !tbaa !9
  store ptr %33, ptr %8, align 8, !tbaa !9
  %34 = load ptr, ptr %8, align 8, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %34)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %36

36:                                               ; preds = %32
  %37 = load ptr, ptr %6, align 8, !tbaa !9
  %38 = getelementptr inbounds i64, ptr %37, i32 1
  store ptr %38, ptr %6, align 8, !tbaa !9
  br label %27

39:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %40

40:                                               ; preds = %95, %39
  %41 = load i64, ptr %11, align 8, !tbaa !5
  %42 = load i64, ptr %1, align 8, !tbaa !5
  %43 = icmp slt i64 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 4, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %98

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %46 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %46, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %47 = load i64, ptr %11, align 8, !tbaa !5
  %48 = add nsw i64 %47, 1
  store i64 %48, ptr %14, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %72, %45
  %50 = load i64, ptr %14, align 8, !tbaa !5
  %51 = load i64, ptr %11, align 8, !tbaa !5
  %52 = add nsw i64 %51, 32
  %53 = icmp slt i64 %50, %52
  br i1 %53, label %54, label %58

54:                                               ; preds = %49
  %55 = load i64, ptr %14, align 8, !tbaa !5
  %56 = load i64, ptr %1, align 8, !tbaa !5
  %57 = icmp sle i64 %55, %56
  br label %58

58:                                               ; preds = %54, %49
  %59 = phi i1 [ false, %49 ], [ %57, %54 ]
  br i1 %59, label %61, label %60

60:                                               ; preds = %58
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %75

61:                                               ; preds = %58
  %62 = load i64, ptr %14, align 8, !tbaa !5
  %63 = sub nsw i64 %62, 1
  %64 = getelementptr inbounds i64, ptr %21, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %66 = load i64, ptr %14, align 8, !tbaa !5
  %67 = load i64, ptr %11, align 8, !tbaa !5
  %68 = sub nsw i64 %66, %67
  %69 = ashr i64 %65, %68
  %70 = load i64, ptr %13, align 8, !tbaa !5
  %71 = add nsw i64 %70, %69
  store i64 %71, ptr %13, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %61
  %73 = load i64, ptr %14, align 8, !tbaa !5
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %14, align 8, !tbaa !5
  br label %49, !llvm.loop !11

75:                                               ; preds = %60
  %76 = load i64, ptr %11, align 8, !tbaa !5
  %77 = getelementptr inbounds i64, ptr %21, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = load i64, ptr %2, align 8, !tbaa !5
  %80 = sub nsw i64 %78, %79
  %81 = load i64, ptr %9, align 8, !tbaa !5
  %82 = add nsw i64 %81, %80
  store i64 %82, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  %83 = load i64, ptr %10, align 8, !tbaa !5
  store i64 %83, ptr %16, align 8, !tbaa !5
  %84 = getelementptr inbounds i64, ptr %16, i64 1
  %85 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %85, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds i64, ptr %16, i64 2
  %87 = load i64, ptr %13, align 8, !tbaa !5
  store i64 %87, ptr %86, align 8, !tbaa !5
  %88 = getelementptr inbounds %"class.std::initializer_list", ptr %15, i32 0, i32 0
  store ptr %16, ptr %88, align 8, !tbaa !13
  %89 = getelementptr inbounds %"class.std::initializer_list", ptr %15, i32 0, i32 1
  store i64 3, ptr %89, align 8, !tbaa !15
  %90 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8
  %92 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %93 = load i64, ptr %92, align 8
  %94 = call noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr %91, i64 %93)
  store i64 %94, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %95

95:                                               ; preds = %75
  %96 = load i64, ptr %11, align 8, !tbaa !5
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %11, align 8, !tbaa !5
  br label %40, !llvm.loop !16

98:                                               ; preds = %44
  %99 = load i64, ptr %10, align 8, !tbaa !5
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %99)
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %102 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %102)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr, i64) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { inlinehint 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 #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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSSt16initializer_listIlE", !10, i64 0, !6, i64 8}
!15 = !{!14, !6, i64 8}
!16 = distinct !{!16, !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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [3 x i64], align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = call ptr @llvm.stacksave.p0()
  %8 = alloca i64, i64 %6, align 16
  %9 = getelementptr inbounds i64, ptr %8, i64 %6
  %.not30 = icmp eq i64 %6, 0
  br i1 %.not30, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %0
  %10 = load i64, ptr %1, align 8
  %11 = icmp sgt i64 %10, 0
  br i1 %11, label %.lr.ph38, label %._crit_edge39

.lr.ph38:                                         ; preds = %.preheader
  %invariant.gep = getelementptr i8, ptr %8, i64 -8
  %12 = getelementptr inbounds i8, ptr %3, i64 8
  %13 = getelementptr inbounds i8, ptr %3, i64 16
  br label %18

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.031 = phi ptr [ %15, %.lr.ph ], [ %8, %0 ]
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %.031)
  %15 = getelementptr inbounds i8, ptr %.031, i64 8
  %.not = icmp eq ptr %15, %9
  br i1 %.not, label %.preheader, label %.lr.ph

._crit_edge39:                                    ; preds = %._crit_edge, %.preheader
  %.029.lcssa = phi i64 [ 0, %.preheader ], [ %42, %._crit_edge ]
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.029.lcssa)
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @.str)
  call void @llvm.stackrestore.p0(ptr %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

18:                                               ; preds = %.lr.ph38, %._crit_edge
  %19 = phi i64 [ %10, %.lr.ph38 ], [ %43, %._crit_edge ]
  %.02537 = phi i64 [ 0, %.lr.ph38 ], [ %41, %._crit_edge ]
  %.02836 = phi i64 [ 0, %.lr.ph38 ], [ %20, %._crit_edge ]
  %.02935 = phi i64 [ 0, %.lr.ph38 ], [ %42, %._crit_edge ]
  %20 = add nuw nsw i64 %.02836, 1
  %21 = add nuw nsw i64 %.02836, 32
  %.not41.not = icmp slt i64 %.02836, %19
  br i1 %.not41.not, label %.lr.ph34.preheader, label %._crit_edge

.lr.ph34.preheader:                               ; preds = %18
  %22 = xor i64 %.02836, -1
  %23 = add i64 %19, %22
  %umin = call i64 @llvm.umin.i64(i64 %23, i64 30)
  %24 = add nuw nsw i64 %umin, 1
  %min.iters.check = icmp ult i64 %23, 3
  br i1 %min.iters.check, label %.lr.ph34.preheader48, label %vector.ph

.lr.ph34.preheader48:                             ; preds = %middle.block, %.lr.ph34.preheader
  %.02633.ph = phi i64 [ %20, %.lr.ph34.preheader ], [ %ind.end, %middle.block ]
  %.02732.ph = phi i64 [ %.02537, %.lr.ph34.preheader ], [ %36, %middle.block ]
  br label %.lr.ph34

vector.ph:                                        ; preds = %.lr.ph34.preheader
  %n.vec = and i64 %24, 60
  %ind.end = add nuw i64 %20, %n.vec
  %.splatinsert = insertelement <2 x i64> poison, i64 %20, i64 0
  %.splat = shufflevector <2 x i64> %.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %induction = add nuw <2 x i64> %.splat, <i64 0, i64 1>
  %25 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %.02537, i64 0
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %.02836, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %26 = getelementptr i64, ptr %8, i64 %.02836
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %25, %vector.ph ], [ %33, %vector.body ]
  %vec.phi46 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %34, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %27 = getelementptr i64, ptr %26, i64 %index
  %28 = getelementptr i8, ptr %27, i64 16
  %wide.load = load <2 x i64>, ptr %27, align 8, !tbaa !5
  %wide.load47 = load <2 x i64>, ptr %28, align 8, !tbaa !5
  %29 = sub nuw nsw <2 x i64> %vec.ind, %broadcast.splat
  %30 = sub nuw nsw <2 x i64> %step.add, %broadcast.splat
  %31 = ashr <2 x i64> %wide.load, %29
  %32 = ashr <2 x i64> %wide.load47, %30
  %33 = add <2 x i64> %31, %vec.phi
  %34 = add <2 x i64> %32, %vec.phi46
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %34, %33
  %36 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %24, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph34.preheader48

._crit_edge:                                      ; preds = %.lr.ph34, %middle.block, %18
  %.027.lcssa = phi i64 [ %.02537, %18 ], [ %36, %middle.block ], [ %48, %.lr.ph34 ]
  %37 = getelementptr inbounds i64, ptr %8, i64 %.02836
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %40 = sub nsw i64 %38, %39
  %41 = add nsw i64 %40, %.02537
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  store i64 %.02935, ptr %3, align 8, !tbaa !5
  store i64 %41, ptr %12, align 8, !tbaa !5
  store i64 %.027.lcssa, ptr %13, align 8, !tbaa !5
  %42 = call noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr nonnull %3, i64 3)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  %43 = load i64, ptr %1, align 8
  %44 = icmp slt i64 %20, %43
  br i1 %44, label %18, label %._crit_edge39, !llvm.loop !13

.lr.ph34:                                         ; preds = %.lr.ph34.preheader48, %.lr.ph34
  %.02633 = phi i64 [ %49, %.lr.ph34 ], [ %.02633.ph, %.lr.ph34.preheader48 ]
  %.02732 = phi i64 [ %48, %.lr.ph34 ], [ %.02732.ph, %.lr.ph34.preheader48 ]
  %gep = getelementptr i64, ptr %invariant.gep, i64 %.02633
  %45 = load i64, ptr %gep, align 8, !tbaa !5
  %46 = sub nuw nsw i64 %.02633, %.02836
  %47 = ashr i64 %45, %46
  %48 = add nsw i64 %47, %.02732
  %49 = add nuw nsw i64 %.02633, 1
  %50 = icmp ult i64 %49, %21
  %51 = icmp slt i64 %.02633, %19
  %52 = and i1 %50, %51
  br i1 %52, label %.lr.ph34, label %._crit_edge, !llvm.loop !14
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt3maxIlET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #4

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { inlinehint 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!"long", !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}
!14 = distinct !{!14, !10, !12, !11}


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