; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/8VC Finals Div 1 2016/Problem B (B)

; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@s = external dso_local global i64, align 8
@x = external dso_local global i64, align 8
@cnt = external dso_local global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @s)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) @x)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %23, %0
  %10 = load i32, ptr %3, align 4, !tbaa !5
  %11 = icmp slt i32 %10, 60
  br i1 %11, label %13, label %12

12:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %26

13:                                               ; preds = %9
  %14 = load i64, ptr @x, align 8, !tbaa !9
  %15 = load i32, ptr %3, align 4, !tbaa !5
  %16 = zext i32 %15 to i64
  %17 = shl i64 1, %16
  %18 = and i64 %14, %17
  %19 = icmp sgt i64 %18, 0
  br i1 %19, label %20, label %22

20:                                               ; preds = %13
  %21 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %21, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %20, %13
  br label %23

23:                                               ; preds = %22
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %3, align 4, !tbaa !5
  br label %9, !llvm.loop !11

26:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %48, %26
  %28 = load i32, ptr %4, align 4, !tbaa !5
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = load i64, ptr @x, align 8, !tbaa !9
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = zext i32 %34 to i64
  %36 = shl i64 1, %35
  %37 = and i64 %33, %36
  %38 = icmp sgt i64 %37, 0
  br i1 %38, label %39, label %47

39:                                               ; preds = %32
  %40 = load i64, ptr @cnt, align 8, !tbaa !9
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr @cnt, align 8, !tbaa !9
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = zext i32 %42 to i64
  %44 = shl i64 1, %43
  %45 = load i64, ptr @s, align 8, !tbaa !9
  %46 = sub nsw i64 %45, %44
  store i64 %46, ptr @s, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %39, %32
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %4, align 4, !tbaa !5
  br label %27, !llvm.loop !13

51:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  store i8 1, ptr %5, align 1, !tbaa !14
  %52 = load i64, ptr @s, align 8, !tbaa !9
  %53 = srem i64 %52, 2
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %51
  store i8 0, ptr %5, align 1, !tbaa !14
  br label %56

56:                                               ; preds = %55, %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %79, %56
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = load i32, ptr %2, align 4, !tbaa !5
  %60 = icmp sle i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %82

62:                                               ; preds = %57
  %63 = load i64, ptr @x, align 8, !tbaa !9
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  %66 = shl i64 1, %65
  %67 = and i64 %63, %66
  %68 = icmp sgt i64 %67, 0
  br i1 %68, label %69, label %78

69:                                               ; preds = %62
  %70 = load i64, ptr @s, align 8, !tbaa !9
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  %73 = zext i32 %72 to i64
  %74 = shl i64 1, %73
  %75 = and i64 %70, %74
  %76 = icmp sgt i64 %75, 0
  br i1 %76, label %77, label %78

77:                                               ; preds = %69
  store i8 0, ptr %5, align 1, !tbaa !14
  br label %78

78:                                               ; preds = %77, %69, %62
  br label %79

79:                                               ; preds = %78
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %6, align 4, !tbaa !5
  br label %57, !llvm.loop !16

82:                                               ; preds = %61
  %83 = load i8, ptr %5, align 1, !tbaa !14, !range !17, !noundef !18
  %84 = trunc i8 %83 to i1
  br i1 %84, label %85, label %100

85:                                               ; preds = %82
  %86 = load i64, ptr @s, align 8, !tbaa !9
  %87 = icmp sgt i64 %86, 0
  br i1 %87, label %88, label %93

88:                                               ; preds = %85
  %89 = load i64, ptr @cnt, align 8, !tbaa !9
  %90 = shl i64 1, %89
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %90)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %99

93:                                               ; preds = %85
  %94 = load i64, ptr @cnt, align 8, !tbaa !9
  %95 = shl i64 1, %94
  %96 = sub nsw i64 %95, 2
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %96)
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %99

99:                                               ; preds = %93, %88
  br label %103

100:                                              ; preds = %82
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %103

103:                                              ; preds = %100, %99
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #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 = { 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 #2 = { mustprogress norecurse 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 willreturn memory(argmem: readwrite) }
attributes #4 = { "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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !12}
!17 = !{i8 0, i8 2}
!18 = !{}


; 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_ostream" = type { ptr, %"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_istream" = type { ptr, i64, %"class.std::basic_ios" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@s = external dso_local global i64, align 8
@x = external dso_local global i64, align 8
@cnt = external dso_local local_unnamed_addr global i64, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @s)
  %2 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) @x)
  %3 = load i64, ptr @x, align 8, !tbaa !5
  br label %7

.preheader:                                       ; preds = %7
  %.not26 = icmp slt i32 %spec.select.4, 0
  %.pre = load i64, ptr @s, align 8, !tbaa !5
  br i1 %.not26, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %.preheader
  %4 = trunc i64 %.pre to i1
  br i1 %4, label %86, label %76

.lr.ph:                                           ; preds = %.preheader
  %cnt.promoted = load i64, ptr @cnt, align 8, !tbaa !5
  %5 = add nuw i32 %spec.select.4, 1
  %wide.trip.count = zext i32 %5 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %6 = icmp eq i32 %spec.select.4, 0
  br i1 %6, label %._crit_edge.unr-lcssa, label %.lr.ph.new

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

7:                                                ; preds = %7, %0
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next.4, %7 ]
  %.01824 = phi i32 [ 0, %0 ], [ %spec.select.4, %7 ]
  %8 = shl nuw nsw i64 1, %indvars.iv
  %9 = and i64 %3, %8
  %.not23 = icmp eq i64 %9, 0
  %10 = trunc nuw nsw i64 %indvars.iv to i32
  %spec.select = select i1 %.not23, i32 %.01824, i32 %10
  %11 = shl nuw nsw i64 2, %indvars.iv
  %12 = and i64 %3, %11
  %.not23.1 = icmp eq i64 %12, 0
  %13 = trunc i64 %indvars.iv to i32
  %14 = add i32 %13, 1
  %spec.select.1 = select i1 %.not23.1, i32 %spec.select, i32 %14
  %15 = shl nuw nsw i64 4, %indvars.iv
  %16 = and i64 %3, %15
  %.not23.2 = icmp eq i64 %16, 0
  %17 = trunc i64 %indvars.iv to i32
  %18 = add i32 %17, 2
  %spec.select.2 = select i1 %.not23.2, i32 %spec.select.1, i32 %18
  %19 = shl nuw nsw i64 8, %indvars.iv
  %20 = and i64 %3, %19
  %.not23.3 = icmp eq i64 %20, 0
  %21 = trunc i64 %indvars.iv to i32
  %22 = add i32 %21, 3
  %spec.select.3 = select i1 %.not23.3, i32 %spec.select.2, i32 %22
  %23 = shl nuw nsw i64 16, %indvars.iv
  %24 = and i64 %3, %23
  %.not23.4 = icmp eq i64 %24, 0
  %25 = trunc i64 %indvars.iv to i32
  %26 = add i32 %25, 4
  %spec.select.4 = select i1 %.not23.4, i32 %spec.select.3, i32 %26
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
  %exitcond.not.4 = icmp eq i64 %indvars.iv.next.4, 60
  br i1 %exitcond.not.4, label %.preheader, label %7, !llvm.loop !9

._crit_edge.unr-lcssa:                            ; preds = %52, %.lr.ph
  %.lcssa.ph = phi i64 [ poison, %.lr.ph ], [ %53, %52 ]
  %indvars.iv35.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next36.1, %52 ]
  %.unr = phi i64 [ %cnt.promoted, %.lr.ph ], [ %54, %52 ]
  %.unr46 = phi i64 [ %.pre, %.lr.ph ], [ %53, %52 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa
  %27 = shl nuw i64 1, %indvars.iv35.unr
  %28 = and i64 %3, %27
  %29 = icmp sgt i64 %28, 0
  br i1 %29, label %30, label %._crit_edge

30:                                               ; preds = %.epil.preheader
  %31 = add nsw i64 %.unr, 1
  store i64 %31, ptr @cnt, align 8, !tbaa !5
  %32 = sub nsw i64 %.unr46, %27
  store i64 %32, ptr @s, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.epil.preheader, %30, %._crit_edge.unr-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.unr46, %.epil.preheader ], [ %32, %30 ]
  %33 = trunc i64 %.lcssa to i1
  %spec.store.select = xor i1 %33, true
  br i1 %.not26, label %._crit_edge33, label %.lr.ph32

.lr.ph32:                                         ; preds = %._crit_edge
  %xtraiter49 = and i64 %wide.trip.count, 1
  %34 = icmp eq i32 %spec.select.4, 0
  br i1 %34, label %._crit_edge33.loopexit.unr-lcssa, label %.lr.ph32.new

.lr.ph32.new:                                     ; preds = %.lr.ph32
  %unroll_iter52 = and i64 %wide.trip.count, 4294967294
  br label %62

35:                                               ; preds = %52, %.lr.ph.new
  %indvars.iv35 = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next36.1, %52 ]
  %36 = phi i64 [ %cnt.promoted, %.lr.ph.new ], [ %54, %52 ]
  %37 = phi i64 [ %.pre, %.lr.ph.new ], [ %53, %52 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %52 ]
  %38 = shl nuw i64 1, %indvars.iv35
  %39 = and i64 %3, %38
  %.not = icmp eq i64 %39, 0
  br i1 %.not, label %43, label %40

40:                                               ; preds = %35
  %41 = add nsw i64 %36, 1
  store i64 %41, ptr @cnt, align 8, !tbaa !5
  %42 = sub nsw i64 %37, %38
  store i64 %42, ptr @s, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %35, %40
  %44 = phi i64 [ %37, %35 ], [ %42, %40 ]
  %45 = phi i64 [ %36, %35 ], [ %41, %40 ]
  %46 = shl nuw i64 2, %indvars.iv35
  %47 = and i64 %3, %46
  %48 = icmp sgt i64 %47, 0
  br i1 %48, label %49, label %52

49:                                               ; preds = %43
  %50 = add nsw i64 %45, 1
  store i64 %50, ptr @cnt, align 8, !tbaa !5
  %51 = sub nsw i64 %44, %46
  store i64 %51, ptr @s, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %49, %43
  %53 = phi i64 [ %44, %43 ], [ %51, %49 ]
  %54 = phi i64 [ %45, %43 ], [ %50, %49 ]
  %indvars.iv.next36.1 = add nuw nsw i64 %indvars.iv35, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %35, !llvm.loop !11

._crit_edge33.loopexit.unr-lcssa:                 ; preds = %._crit_edge43.1, %.lr.ph32
  %.1.lcssa.ph = phi i1 [ poison, %.lr.ph32 ], [ %.1.1, %._crit_edge43.1 ]
  %indvars.iv39.unr = phi i64 [ 0, %.lr.ph32 ], [ %indvars.iv.next40.pre-phi.1, %._crit_edge43.1 ]
  %.01529.unr = phi i1 [ %spec.store.select, %.lr.ph32 ], [ %.1.1, %._crit_edge43.1 ]
  %lcmp.mod50.not = icmp eq i64 %xtraiter49, 0
  br i1 %lcmp.mod50.not, label %._crit_edge33, label %.epil.preheader48

.epil.preheader48:                                ; preds = %._crit_edge33.loopexit.unr-lcssa
  %55 = shl nuw i64 1, %indvars.iv39.unr
  %56 = and i64 %3, %55
  %57 = icmp sgt i64 %56, 0
  br i1 %57, label %58, label %._crit_edge33

58:                                               ; preds = %.epil.preheader48
  %59 = shl nuw i64 2, %indvars.iv39.unr
  %60 = and i64 %59, %.lcssa
  %61 = icmp slt i64 %60, 1
  %spec.select22.epil = select i1 %61, i1 %.01529.unr, i1 false
  br label %._crit_edge33

._crit_edge33:                                    ; preds = %._crit_edge33.loopexit.unr-lcssa, %58, %.epil.preheader48, %._crit_edge
  %.015.lcssa = phi i1 [ %spec.store.select, %._crit_edge ], [ %.1.lcssa.ph, %._crit_edge33.loopexit.unr-lcssa ], [ %spec.select22.epil, %58 ], [ %.01529.unr, %.epil.preheader48 ]
  br i1 %.015.lcssa, label %76, label %86

62:                                               ; preds = %._crit_edge43.1, %.lr.ph32.new
  %indvars.iv39 = phi i64 [ 0, %.lr.ph32.new ], [ %indvars.iv.next40.pre-phi.1, %._crit_edge43.1 ]
  %.01529 = phi i1 [ %spec.store.select, %.lr.ph32.new ], [ %.1.1, %._crit_edge43.1 ]
  %niter53 = phi i64 [ 0, %.lr.ph32.new ], [ %niter53.next.1, %._crit_edge43.1 ]
  %63 = shl nuw i64 1, %indvars.iv39
  %64 = and i64 %3, %63
  %.not54 = icmp eq i64 %64, 0
  br i1 %.not54, label %._crit_edge43, label %65

65:                                               ; preds = %62
  %66 = shl nuw i64 2, %indvars.iv39
  %67 = and i64 %66, %.lcssa
  %68 = icmp slt i64 %67, 1
  %spec.select22 = select i1 %68, i1 %.01529, i1 false
  br label %._crit_edge43

._crit_edge43:                                    ; preds = %62, %65
  %.1 = phi i1 [ %spec.select22, %65 ], [ %.01529, %62 ]
  %69 = shl nuw i64 2, %indvars.iv39
  %70 = and i64 %3, %69
  %71 = icmp sgt i64 %70, 0
  br i1 %71, label %72, label %._crit_edge43.1

72:                                               ; preds = %._crit_edge43
  %73 = shl nuw i64 4, %indvars.iv39
  %74 = and i64 %73, %.lcssa
  %75 = icmp eq i64 %74, 0
  %spec.select22.1 = select i1 %75, i1 %.1, i1 false
  br label %._crit_edge43.1

._crit_edge43.1:                                  ; preds = %72, %._crit_edge43
  %.1.1 = phi i1 [ %spec.select22.1, %72 ], [ %.1, %._crit_edge43 ]
  %indvars.iv.next40.pre-phi.1 = add nuw nsw i64 %indvars.iv39, 2
  %niter53.next.1 = add i64 %niter53, 2
  %niter53.ncmp.1 = icmp eq i64 %niter53.next.1, %unroll_iter52
  br i1 %niter53.ncmp.1, label %._crit_edge33.loopexit.unr-lcssa, label %62, !llvm.loop !12

76:                                               ; preds = %._crit_edge.thread, %._crit_edge33
  %77 = phi i64 [ %.pre, %._crit_edge.thread ], [ %.lcssa, %._crit_edge33 ]
  %78 = icmp sgt i64 %77, 0
  %79 = load i64, ptr @cnt, align 8, !tbaa !5
  %80 = shl nuw i64 1, %79
  br i1 %78, label %81, label %83

81:                                               ; preds = %76
  %82 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %80)
  br label %88

83:                                               ; preds = %76
  %84 = add nsw i64 %80, -2
  %85 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %84)
  br label %88

86:                                               ; preds = %._crit_edge.thread, %._crit_edge33
  %87 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
  br label %88

88:                                               ; preds = %81, %83, %86
  %.sink = phi ptr [ %82, %81 ], [ %85, %83 ], [ %87, %86 ]
  %89 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3

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 = { 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 #2 = { mustprogress norecurse 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 = { "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, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass