; LLVM IR from manishbisht/Competitive-Programming :: Codechef/KGP16MOS (Coal Mafia and Toll Tax)

; 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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

12:                                               ; preds = %92, %0
  %13 = load i64, ptr %3, align 8, !tbaa !5
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = icmp slt i64 %13, %14
  br i1 %15, label %16, label %95

16:                                               ; preds = %12
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %26, %16
  %19 = load i64, ptr %4, align 8, !tbaa !5
  %20 = load i64, ptr %5, align 8, !tbaa !5
  %21 = icmp slt i64 %19, %20
  br i1 %21, label %22, label %29

22:                                               ; preds = %18
  %23 = load i64, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds [50 x i64], ptr %8, i64 0, i64 %23
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %24)
  br label %26

26:                                               ; preds = %22
  %27 = load i64, ptr %4, align 8, !tbaa !5
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %4, align 8, !tbaa !5
  br label %18, !llvm.loop !9

29:                                               ; preds = %18
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %39, %29
  %31 = load i64, ptr %4, align 8, !tbaa !5
  %32 = load i64, ptr %5, align 8, !tbaa !5
  %33 = sub nsw i64 %32, 1
  %34 = icmp slt i64 %31, %33
  br i1 %34, label %35, label %42

35:                                               ; preds = %30
  %36 = load i64, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds [50 x i64], ptr %6, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %37)
  br label %39

39:                                               ; preds = %35
  %40 = load i64, ptr %4, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %4, align 8, !tbaa !5
  br label %30, !llvm.loop !11

42:                                               ; preds = %30
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %52, %42
  %44 = load i64, ptr %4, align 8, !tbaa !5
  %45 = load i64, ptr %5, align 8, !tbaa !5
  %46 = sub nsw i64 %45, 1
  %47 = icmp slt i64 %44, %46
  br i1 %47, label %48, label %55

48:                                               ; preds = %43
  %49 = load i64, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds [500 x i64], ptr %7, i64 0, i64 %49
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %50)
  br label %52

52:                                               ; preds = %48
  %53 = load i64, ptr %4, align 8, !tbaa !5
  %54 = add nsw i64 %53, 1
  store i64 %54, ptr %4, align 8, !tbaa !5
  br label %43, !llvm.loop !12

55:                                               ; preds = %43
  %56 = getelementptr inbounds [50 x i64], ptr %8, i64 0, i64 0
  %57 = load i64, ptr %56, align 16, !tbaa !5
  store i64 %57, ptr %9, align 8, !tbaa !5
  %58 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %58, ptr %10, align 8, !tbaa !5
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %85, %55
  %60 = load i64, ptr %4, align 8, !tbaa !5
  %61 = load i64, ptr %5, align 8, !tbaa !5
  %62 = sub nsw i64 %61, 1
  %63 = icmp slt i64 %60, %62
  br i1 %63, label %64, label %88

64:                                               ; preds = %59
  %65 = load i64, ptr %10, align 8, !tbaa !5
  %66 = load i64, ptr %4, align 8, !tbaa !5
  %67 = add nsw i64 %66, 1
  %68 = getelementptr inbounds [50 x i64], ptr %8, i64 0, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = add nsw i64 %65, %69
  %71 = load i64, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds [50 x i64], ptr %6, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = load i64, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds [500 x i64], ptr %7, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = mul nsw i64 %73, %76
  %78 = sub nsw i64 %70, %77
  store i64 %78, ptr %10, align 8, !tbaa !5
  %79 = load i64, ptr %10, align 8, !tbaa !5
  %80 = load i64, ptr %9, align 8, !tbaa !5
  %81 = icmp sgt i64 %79, %80
  br i1 %81, label %82, label %84

82:                                               ; preds = %64
  %83 = load i64, ptr %10, align 8, !tbaa !5
  store i64 %83, ptr %9, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %82, %64
  br label %85

85:                                               ; preds = %84
  %86 = load i64, ptr %4, align 8, !tbaa !5
  %87 = add nsw i64 %86, 1
  store i64 %87, ptr %4, align 8, !tbaa !5
  br label %59, !llvm.loop !13

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

92:                                               ; preds = %88
  %93 = load i64, ptr %3, align 8, !tbaa !5
  %94 = add nsw i64 %93, 1
  store i64 %94, ptr %3, align 8, !tbaa !5
  br label %12, !llvm.loop !14

95:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4000, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  ret i32 0
}

; 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 @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #3

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 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}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


; 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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [50 x i64], align 16
  %4 = alloca [500 x i64], align 16
  %5 = alloca [50 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %5) #5
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %7 = load i64, ptr %1, align 8, !tbaa !5
  %8 = icmp sgt i64 %7, 0
  br i1 %8, label %.lr.ph42, label %._crit_edge43

.lr.ph42:                                         ; preds = %0, %._crit_edge38
  %.02540 = phi i64 [ %67, %._crit_edge38 ], [ 0, %0 ]
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %10 = load i64, ptr %2, align 8, !tbaa !5
  %11 = icmp sgt i64 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge.thread

.preheader27:                                     ; preds = %.lr.ph
  %12 = icmp sgt i64 %17, 1
  br i1 %12, label %.lr.ph30, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.lr.ph42, %.preheader27
  %13 = load i64, ptr %5, align 16, !tbaa !5
  br label %._crit_edge38

.lr.ph:                                           ; preds = %.lr.ph42, %.lr.ph
  %.02328 = phi i64 [ %16, %.lr.ph ], [ 0, %.lr.ph42 ]
  %14 = getelementptr inbounds [50 x i64], ptr %5, i64 0, i64 %.02328
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %16 = add nuw nsw i64 %.02328, 1
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = icmp slt i64 %16, %17
  br i1 %18, label %.lr.ph, label %.preheader27, !llvm.loop !9

.preheader:                                       ; preds = %.lr.ph30
  %19 = icmp sgt i64 %23, 1
  br i1 %19, label %.lr.ph32, label %._crit_edge

.lr.ph30:                                         ; preds = %.preheader27, %.lr.ph30
  %.12429 = phi i64 [ %22, %.lr.ph30 ], [ 0, %.preheader27 ]
  %20 = getelementptr inbounds [50 x i64], ptr %3, i64 0, i64 %.12429
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %22 = add nuw nsw i64 %.12429, 1
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = add nsw i64 %23, -1
  %25 = icmp slt i64 %22, %24
  br i1 %25, label %.lr.ph30, label %.preheader, !llvm.loop !11

.lr.ph32:                                         ; preds = %.preheader, %.lr.ph32
  %.231 = phi i64 [ %28, %.lr.ph32 ], [ 0, %.preheader ]
  %26 = getelementptr inbounds [500 x i64], ptr %4, i64 0, i64 %.231
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %28 = add nuw nsw i64 %.231, 1
  %29 = load i64, ptr %2, align 8, !tbaa !5
  %30 = add nsw i64 %29, -1
  %31 = icmp slt i64 %28, %30
  br i1 %31, label %.lr.ph32, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph32, %.preheader
  %.lcssa = phi i64 [ %24, %.preheader ], [ %30, %.lr.ph32 ]
  %32 = load i64, ptr %5, align 16, !tbaa !5
  %33 = icmp sgt i64 %.lcssa, 0
  br i1 %33, label %.lr.ph37.preheader, label %._crit_edge38

.lr.ph37.preheader:                               ; preds = %._crit_edge
  %xtraiter = and i64 %.lcssa, 1
  %34 = icmp eq i64 %.lcssa, 1
  br i1 %34, label %._crit_edge38.loopexit.unr-lcssa, label %.lr.ph37.preheader.new

.lr.ph37.preheader.new:                           ; preds = %.lr.ph37.preheader
  %unroll_iter = and i64 %.lcssa, 9223372036854775806
  br label %.lr.ph37

.lr.ph37:                                         ; preds = %.lr.ph37, %.lr.ph37.preheader.new
  %.035 = phi i64 [ %32, %.lr.ph37.preheader.new ], [ %54, %.lr.ph37 ]
  %.02234 = phi i64 [ %32, %.lr.ph37.preheader.new ], [ %spec.select.1, %.lr.ph37 ]
  %.333 = phi i64 [ 0, %.lr.ph37.preheader.new ], [ %45, %.lr.ph37 ]
  %niter = phi i64 [ 0, %.lr.ph37.preheader.new ], [ %niter.next.1, %.lr.ph37 ]
  %35 = or disjoint i64 %.333, 1
  %36 = getelementptr inbounds [50 x i64], ptr %5, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = add nsw i64 %37, %.035
  %39 = getelementptr inbounds [50 x i64], ptr %3, i64 0, i64 %.333
  %40 = load i64, ptr %39, align 16, !tbaa !5
  %41 = getelementptr inbounds [500 x i64], ptr %4, i64 0, i64 %.333
  %42 = load i64, ptr %41, align 16, !tbaa !5
  %43 = mul nsw i64 %42, %40
  %44 = sub i64 %38, %43
  %spec.select = call i64 @llvm.smax.i64(i64 %44, i64 %.02234)
  %45 = add nuw nsw i64 %.333, 2
  %46 = getelementptr inbounds [50 x i64], ptr %5, i64 0, i64 %45
  %47 = load i64, ptr %46, align 16, !tbaa !5
  %48 = add nsw i64 %47, %44
  %49 = getelementptr inbounds [50 x i64], ptr %3, i64 0, i64 %35
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = getelementptr inbounds [500 x i64], ptr %4, i64 0, i64 %35
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = mul nsw i64 %52, %50
  %54 = sub i64 %48, %53
  %spec.select.1 = call i64 @llvm.smax.i64(i64 %54, i64 %spec.select)
  %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_edge38.loopexit.unr-lcssa, label %.lr.ph37, !llvm.loop !13

._crit_edge38.loopexit.unr-lcssa:                 ; preds = %.lr.ph37, %.lr.ph37.preheader
  %spec.select.lcssa.ph = phi i64 [ poison, %.lr.ph37.preheader ], [ %spec.select.1, %.lr.ph37 ]
  %.035.unr = phi i64 [ %32, %.lr.ph37.preheader ], [ %54, %.lr.ph37 ]
  %.02234.unr = phi i64 [ %32, %.lr.ph37.preheader ], [ %spec.select.1, %.lr.ph37 ]
  %.333.unr = phi i64 [ 0, %.lr.ph37.preheader ], [ %45, %.lr.ph37 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge38, label %.lr.ph37.epil

.lr.ph37.epil:                                    ; preds = %._crit_edge38.loopexit.unr-lcssa
  %55 = add nuw nsw i64 %.333.unr, 1
  %56 = getelementptr inbounds [50 x i64], ptr %5, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = add nsw i64 %57, %.035.unr
  %59 = getelementptr inbounds [50 x i64], ptr %3, i64 0, i64 %.333.unr
  %60 = load i64, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds [500 x i64], ptr %4, i64 0, i64 %.333.unr
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = mul nsw i64 %62, %60
  %64 = sub i64 %58, %63
  %spec.select.epil = call i64 @llvm.smax.i64(i64 %64, i64 %.02234.unr)
  br label %._crit_edge38

._crit_edge38:                                    ; preds = %.lr.ph37.epil, %._crit_edge38.loopexit.unr-lcssa, %._crit_edge.thread, %._crit_edge
  %.022.lcssa = phi i64 [ %32, %._crit_edge ], [ %13, %._crit_edge.thread ], [ %spec.select.lcssa.ph, %._crit_edge38.loopexit.unr-lcssa ], [ %spec.select.epil, %.lr.ph37.epil ]
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.022.lcssa)
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %67 = add nuw nsw i64 %.02540, 1
  %68 = load i64, ptr %1, align 8, !tbaa !5
  %69 = icmp slt i64 %67, %68
  br i1 %69, label %.lr.ph42, label %._crit_edge43, !llvm.loop !14

._crit_edge43:                                    ; preds = %._crit_edge38, %0
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %3) #5
  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 i32 0
}

; 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 @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 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 #2 align 2

; 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 #2 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)) #3

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 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}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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