; LLVM IR from eyangch/competitive-programming :: Codeforces/1538 (c)

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

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@L = external dso_local global i64, align 8
@R = external dso_local global i64, align 8
@a = external dso_local global [200000 x i64], align 16
@_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 i64, align 8
  store i32 0, ptr %1, align 4
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @T)
  br label %14

14:                                               ; preds = %104, %0
  %15 = load i64, ptr @T, align 8, !tbaa !8
  %16 = add nsw i64 %15, -1
  store i64 %16, ptr @T, align 8, !tbaa !8
  %17 = icmp ne i64 %15, 0
  br i1 %17, label %18, label %109

18:                                               ; preds = %14
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) @L)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) @R)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %22

22:                                               ; preds = %31, %18
  %23 = load i64, ptr %2, align 8, !tbaa !8
  %24 = load i64, ptr @N, align 8, !tbaa !8
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %34

27:                                               ; preds = %22
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %28
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %29)
  br label %31

31:                                               ; preds = %27
  %32 = load i64, ptr %2, align 8, !tbaa !8
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %2, align 8, !tbaa !8
  br label %22, !llvm.loop !11

34:                                               ; preds = %26
  %35 = load i64, ptr @N, align 8, !tbaa !8
  %36 = getelementptr inbounds i64, ptr @a, i64 %35
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef @a, ptr noundef %36)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %37 = load i64, ptr @N, align 8, !tbaa !8
  %38 = sub nsw i64 %37, 1
  store i64 %38, ptr %3, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %39 = load i64, ptr @N, align 8, !tbaa !8
  %40 = sub nsw i64 %39, 1
  store i64 %40, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !8
  br label %41

41:                                               ; preds = %101, %34
  %42 = load i64, ptr %6, align 8, !tbaa !8
  %43 = load i64, ptr @N, align 8, !tbaa !8
  %44 = icmp slt i64 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %104

46:                                               ; preds = %41
  br label %47

47:                                               ; preds = %62, %46
  %48 = load i64, ptr %3, align 8, !tbaa !8
  %49 = icmp sge i64 %48, 0
  br i1 %49, label %50, label %60

50:                                               ; preds = %47
  %51 = load i64, ptr %6, align 8, !tbaa !8
  %52 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !8
  %54 = load i64, ptr %3, align 8, !tbaa !8
  %55 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !8
  %57 = add nsw i64 %53, %56
  %58 = load i64, ptr @L, align 8, !tbaa !8
  %59 = icmp sge i64 %57, %58
  br label %60

60:                                               ; preds = %50, %47
  %61 = phi i1 [ false, %47 ], [ %59, %50 ]
  br i1 %61, label %62, label %65

62:                                               ; preds = %60
  %63 = load i64, ptr %3, align 8, !tbaa !8
  %64 = add nsw i64 %63, -1
  store i64 %64, ptr %3, align 8, !tbaa !8
  br label %47, !llvm.loop !13

65:                                               ; preds = %60
  br label %66

66:                                               ; preds = %81, %65
  %67 = load i64, ptr %4, align 8, !tbaa !8
  %68 = icmp sge i64 %67, 0
  br i1 %68, label %69, label %79

69:                                               ; preds = %66
  %70 = load i64, ptr %6, align 8, !tbaa !8
  %71 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !8
  %73 = load i64, ptr %4, align 8, !tbaa !8
  %74 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !8
  %76 = add nsw i64 %72, %75
  %77 = load i64, ptr @R, align 8, !tbaa !8
  %78 = icmp sgt i64 %76, %77
  br label %79

79:                                               ; preds = %69, %66
  %80 = phi i1 [ false, %66 ], [ %78, %69 ]
  br i1 %80, label %81, label %84

81:                                               ; preds = %79
  %82 = load i64, ptr %4, align 8, !tbaa !8
  %83 = add nsw i64 %82, -1
  store i64 %83, ptr %4, align 8, !tbaa !8
  br label %66, !llvm.loop !14

84:                                               ; preds = %79
  %85 = load i64, ptr %4, align 8, !tbaa !8
  %86 = load i64, ptr %3, align 8, !tbaa !8
  %87 = sub nsw i64 %85, %86
  %88 = load i64, ptr %6, align 8, !tbaa !8
  %89 = load i64, ptr %3, align 8, !tbaa !8
  %90 = icmp sgt i64 %88, %89
  br i1 %90, label %91, label %95

91:                                               ; preds = %84
  %92 = load i64, ptr %6, align 8, !tbaa !8
  %93 = load i64, ptr %4, align 8, !tbaa !8
  %94 = icmp sle i64 %92, %93
  br label %95

95:                                               ; preds = %91, %84
  %96 = phi i1 [ false, %84 ], [ %94, %91 ]
  %97 = zext i1 %96 to i64
  %98 = sub nsw i64 %87, %97
  %99 = load i64, ptr %5, align 8, !tbaa !8
  %100 = add nsw i64 %99, %98
  store i64 %100, ptr %5, align 8, !tbaa !8
  br label %101

101:                                              ; preds = %95
  %102 = load i64, ptr %6, align 8, !tbaa !8
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %6, align 8, !tbaa !8
  br label %41, !llvm.loop !15

104:                                              ; preds = %45
  %105 = load i64, ptr %5, align 8, !tbaa !8
  %106 = sdiv i64 %105, 2
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %106)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %107, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %14, !llvm.loop !16

109:                                              ; preds = %14
  %110 = load i32, ptr %1, align 4
  ret i32 %110
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!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" }

@T = external dso_local global i64, align 8
@N = external dso_local global i64, align 8
@L = external dso_local global i64, align 8
@R = external dso_local global i64, align 8
@a = external dso_local global [200000 x i64], align 16
@_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 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %2 = getelementptr i8, ptr %1, i64 -24
  %3 = load i64, ptr %2, align 8
  %4 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %3
  %5 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %4, ptr noundef null)
  %6 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = 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) @T)
  %8 = load i64, ptr @T, align 8, !tbaa !8
  %9 = add nsw i64 %8, -1
  store i64 %9, ptr @T, align 8, !tbaa !8
  %.not48 = icmp eq i64 %8, 0
  br i1 %.not48, label %._crit_edge51, label %.lr.ph50

.lr.ph50:                                         ; preds = %0, %._crit_edge46
  %10 = 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) @N)
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) @L)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) @R)
  %13 = load i64, ptr @N, align 8, !tbaa !8
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph50
  %.lcssa = phi i64 [ %13, %.lr.ph50 ], [ %24, %.lr.ph ]
  %15 = getelementptr inbounds i64, ptr @a, i64 %.lcssa
  tail call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull @a, ptr noundef nonnull %15)
  %16 = load i64, ptr @N, align 8, !tbaa !8
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.preheader.lr.ph, label %._crit_edge46

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %18 = add nsw i64 %16, -1
  %19 = load i64, ptr @L, align 8
  %20 = load i64, ptr @R, align 8
  br label %.preheader

.lr.ph:                                           ; preds = %.lr.ph50, %.lr.ph
  %.02831 = phi i64 [ %23, %.lr.ph ], [ 0, %.lr.ph50 ]
  %21 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.02831
  %22 = 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) %21)
  %23 = add nuw nsw i64 %.02831, 1
  %24 = load i64, ptr @N, align 8, !tbaa !8
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.lr.ph, %.critedge2
  %.045 = phi i64 [ 0, %.preheader.lr.ph ], [ %58, %.critedge2 ]
  %.02444 = phi i64 [ 0, %.preheader.lr.ph ], [ %57, %.critedge2 ]
  %.02543 = phi i64 [ %18, %.preheader.lr.ph ], [ %.1.lcssa, %.critedge2 ]
  %.02642 = phi i64 [ %18, %.preheader.lr.ph ], [ %.127.lcssa, %.critedge2 ]
  %26 = icmp sgt i64 %.02642, -1
  br i1 %26, label %.lr.ph33, label %.critedge

.lr.ph33:                                         ; preds = %.preheader
  %27 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.045
  %28 = load i64, ptr %27, align 8, !tbaa !8
  br label %34

._crit_edge46:                                    ; preds = %.critedge2, %._crit_edge
  %.024.lcssa = phi i64 [ 0, %._crit_edge ], [ %57, %.critedge2 ]
  %29 = sdiv i64 %.024.lcssa, 2
  %30 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %29)
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %30, i8 noundef signext 10)
  %32 = load i64, ptr @T, align 8, !tbaa !8
  %33 = add nsw i64 %32, -1
  store i64 %33, ptr @T, align 8, !tbaa !8
  %.not = icmp eq i64 %32, 0
  br i1 %.not, label %._crit_edge51, label %.lr.ph50, !llvm.loop !13

34:                                               ; preds = %.lr.ph33, %38
  %.12732 = phi i64 [ %.02642, %.lr.ph33 ], [ %39, %38 ]
  %35 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.12732
  %36 = load i64, ptr %35, align 8, !tbaa !8
  %37 = add nsw i64 %36, %28
  %.not30 = icmp slt i64 %37, %19
  br i1 %.not30, label %.critedge, label %38

38:                                               ; preds = %34
  %39 = add nsw i64 %.12732, -1
  %40 = icmp sgt i64 %.12732, 0
  br i1 %40, label %34, label %.critedge, !llvm.loop !14

.critedge:                                        ; preds = %34, %38, %.preheader
  %.127.lcssa = phi i64 [ %.02642, %.preheader ], [ -1, %38 ], [ %.12732, %34 ]
  %41 = icmp sgt i64 %.02543, -1
  br i1 %41, label %.lr.ph38, label %.critedge2

.lr.ph38:                                         ; preds = %.critedge
  %42 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.045
  %43 = load i64, ptr %42, align 8, !tbaa !8
  br label %44

44:                                               ; preds = %.lr.ph38, %49
  %.137 = phi i64 [ %.02543, %.lr.ph38 ], [ %50, %49 ]
  %45 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.137
  %46 = load i64, ptr %45, align 8, !tbaa !8
  %47 = add nsw i64 %46, %43
  %48 = icmp sgt i64 %47, %20
  br i1 %48, label %49, label %.critedge2

49:                                               ; preds = %44
  %50 = add nsw i64 %.137, -1
  %51 = icmp sgt i64 %.137, 0
  br i1 %51, label %44, label %.critedge2, !llvm.loop !15

.critedge2:                                       ; preds = %44, %49, %.critedge
  %.1.lcssa = phi i64 [ %.02543, %.critedge ], [ -1, %49 ], [ %.137, %44 ]
  %52 = icmp sgt i64 %.045, %.127.lcssa
  %53 = icmp sle i64 %.045, %.1.lcssa
  %54 = and i1 %52, %53
  %.neg = sext i1 %54 to i64
  %55 = sub i64 %.02444, %.127.lcssa
  %56 = add i64 %55, %.1.lcssa
  %57 = add i64 %56, %.neg
  %58 = add nuw nsw i64 %.045, 1
  %exitcond.not = icmp eq i64 %58, %16
  br i1 %exitcond.not, label %._crit_edge46, label %.preheader, !llvm.loop !16

._crit_edge51:                                    ; preds = %._crit_edge46, %0
  ret i32 0
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

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

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 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 = { 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" }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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