; LLVM IR from codeIIEST/Algorithms :: Competitive Coding/Tree/Binary Indexed Tree (SPOJ_invcnt)

; 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 nounwind uwtable
declare dso_local noundef i64 @_Z3sumx(i64 noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6updatexxx(i64 noundef, i64 noundef, i64 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z19binary_indexed_treePxx(ptr noundef, i64 noundef) #0

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

16:                                               ; preds = %90, %0
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = add nsw i64 %17, -1
  store i64 %18, ptr %2, align 8, !tbaa !5
  %19 = icmp ne i64 %17, 0
  br i1 %19, label %20, label %94

20:                                               ; preds = %16
  store i64 0, ptr %6, align 8, !tbaa !5
  %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) %3)
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %35, %20
  %23 = load i64, ptr %4, align 8, !tbaa !5
  %24 = load i64, ptr %3, align 8, !tbaa !5
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %26, label %38

26:                                               ; preds = %22
  %27 = load i64, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds [100002 x i64], ptr %13, i64 0, i64 %27
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds [100002 x i64], ptr %13, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = load i64, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds [100002 x i64], ptr %14, i64 0, i64 %33
  store i64 %32, ptr %34, align 8, !tbaa !5
  br label %35

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

38:                                               ; preds = %22
  %39 = getelementptr inbounds [100002 x i64], ptr %14, i64 0, i64 0
  %40 = getelementptr inbounds [100002 x i64], ptr %14, i64 0, i64 0
  %41 = load i64, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds i64, ptr %40, i64 %41
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef %39, ptr noundef %42)
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %64, %38
  %44 = load i64, ptr %4, align 8, !tbaa !5
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = icmp slt i64 %44, %45
  br i1 %46, label %47, label %67

47:                                               ; preds = %43
  %48 = getelementptr inbounds [100002 x i64], ptr %14, i64 0, i64 0
  %49 = getelementptr inbounds [100002 x i64], ptr %14, i64 0, i64 0
  %50 = load i64, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds i64, ptr %49, i64 %50
  %52 = load i64, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds [100002 x i64], ptr %13, i64 0, i64 %52
  %54 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef %48, ptr noundef %51, ptr noundef nonnull align 8 dereferenceable(8) %53)
  %55 = getelementptr inbounds [100002 x i64], ptr %14, i64 0, i64 0
  %56 = ptrtoint ptr %54 to i64
  %57 = ptrtoint ptr %55 to i64
  %58 = sub i64 %56, %57
  %59 = sdiv exact i64 %58, 8
  store i64 %59, ptr %7, align 8, !tbaa !5
  %60 = load i64, ptr %7, align 8, !tbaa !5
  %61 = add nsw i64 %60, 1
  %62 = load i64, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds [100002 x i64], ptr %13, i64 0, i64 %62
  store i64 %61, ptr %63, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %47
  %65 = load i64, ptr %4, align 8, !tbaa !5
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %4, align 8, !tbaa !5
  br label %43, !llvm.loop !11

67:                                               ; preds = %43
  %68 = getelementptr inbounds [100002 x i64], ptr %13, i64 0, i64 0
  %69 = load i64, ptr %3, align 8, !tbaa !5
  call void @_Z19binary_indexed_treePxx(ptr noundef %68, i64 noundef %69)
  %70 = load i64, ptr %3, align 8, !tbaa !5
  %71 = sub nsw i64 %70, 1
  store i64 %71, ptr %4, align 8, !tbaa !5
  br label %72

72:                                               ; preds = %87, %67
  %73 = load i64, ptr %4, align 8, !tbaa !5
  %74 = icmp sgt i64 %73, -1
  br i1 %74, label %75, label %90

75:                                               ; preds = %72
  %76 = load i64, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds [100002 x i64], ptr %13, i64 0, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = sub nsw i64 %78, 1
  %80 = call noundef i64 @_Z3sumx(i64 noundef %79)
  %81 = load i64, ptr %6, align 8, !tbaa !5
  %82 = add nsw i64 %81, %80
  store i64 %82, ptr %6, align 8, !tbaa !5
  %83 = load i64, ptr %3, align 8, !tbaa !5
  %84 = load i64, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds [100002 x i64], ptr %13, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !5
  call void @_Z6updatexxx(i64 noundef %83, i64 noundef %86, i64 noundef 1)
  br label %87

87:                                               ; preds = %75
  %88 = load i64, ptr %4, align 8, !tbaa !5
  %89 = add nsw i64 %88, -1
  store i64 %89, ptr %4, align 8, !tbaa !5
  br label %72, !llvm.loop !12

90:                                               ; preds = %72
  %91 = load i64, ptr %6, align 8, !tbaa !5
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %91)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %16, !llvm.loop !13

94:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 800016, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 800016, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, 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)) #3 align 2

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

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

; 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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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" }
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}


; 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 nounwind uwtable
declare dso_local noundef i64 @_Z3sumx(i64 noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6updatexxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z19binary_indexed_treePxx(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [100002 x i64], align 16
  %4 = alloca [100002 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 800016, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 800016, ptr nonnull %4) #5
  %5 = 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)
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = add nsw i64 %6, -1
  store i64 %7, ptr %1, align 8, !tbaa !5
  %.not33 = icmp eq i64 %6, 0
  br i1 %.not33, label %._crit_edge36, label %.lr.ph35

.lr.ph35:                                         ; preds = %0
  %8 = ptrtoint ptr %4 to i64
  br label %9

9:                                                ; preds = %.lr.ph35, %._crit_edge31
  %10 = 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)
  %11 = load i64, ptr %2, align 8, !tbaa !5
  %12 = icmp sgt i64 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

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

._crit_edge:                                      ; preds = %.lr.ph, %9
  %.lcssa = phi i64 [ %11, %9 ], [ %18, %.lr.ph ]
  %20 = getelementptr inbounds i64, ptr %4, i64 %.lcssa
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull %4, ptr noundef nonnull %20)
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.lr.ph24, label %._crit_edge25

.lr.ph24:                                         ; preds = %._crit_edge, %.lr.ph24
  %23 = phi i64 [ %32, %.lr.ph24 ], [ %21, %._crit_edge ]
  %.122 = phi i64 [ %31, %.lr.ph24 ], [ 0, %._crit_edge ]
  %24 = getelementptr inbounds i64, ptr %4, i64 %23
  %25 = getelementptr inbounds [100002 x i64], ptr %3, i64 0, i64 %.122
  %26 = call noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef nonnull %4, ptr noundef nonnull %24, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %27 = ptrtoint ptr %26 to i64
  %28 = sub i64 %27, %8
  %29 = ashr exact i64 %28, 3
  %30 = add nsw i64 %29, 1
  store i64 %30, ptr %25, align 8, !tbaa !5
  %31 = add nuw nsw i64 %.122, 1
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = icmp slt i64 %31, %32
  br i1 %33, label %.lr.ph24, label %._crit_edge25, !llvm.loop !11

._crit_edge25:                                    ; preds = %.lr.ph24, %._crit_edge
  %.lcssa20 = phi i64 [ %21, %._crit_edge ], [ %32, %.lr.ph24 ]
  call void @_Z19binary_indexed_treePxx(ptr noundef nonnull %3, i64 noundef %.lcssa20)
  %34 = load i64, ptr %2, align 8, !tbaa !5
  %35 = icmp sgt i64 %34, 0
  br i1 %35, label %.lr.ph30, label %._crit_edge31

.lr.ph30:                                         ; preds = %._crit_edge25, %.lr.ph30
  %.2.in28 = phi i64 [ %.2, %.lr.ph30 ], [ %34, %._crit_edge25 ]
  %.01627 = phi i64 [ %40, %.lr.ph30 ], [ 0, %._crit_edge25 ]
  %.2 = add nsw i64 %.2.in28, -1
  %36 = getelementptr inbounds [100002 x i64], ptr %3, i64 0, i64 %.2
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = add nsw i64 %37, -1
  %39 = call noundef i64 @_Z3sumx(i64 noundef %38)
  %40 = add nsw i64 %39, %.01627
  %41 = load i64, ptr %2, align 8, !tbaa !5
  %42 = load i64, ptr %36, align 8, !tbaa !5
  call void @_Z6updatexxx(i64 noundef %41, i64 noundef %42, i64 noundef 1)
  %43 = icmp ugt i64 %.2.in28, 1
  br i1 %43, label %.lr.ph30, label %._crit_edge31, !llvm.loop !12

._crit_edge31:                                    ; preds = %.lr.ph30, %._crit_edge25
  %.016.lcssa = phi i64 [ 0, %._crit_edge25 ], [ %40, %.lr.ph30 ]
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.016.lcssa)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = add nsw i64 %46, -1
  store i64 %47, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %46, 0
  br i1 %.not, label %._crit_edge36, label %9, !llvm.loop !13

._crit_edge36:                                    ; preds = %._crit_edge31, %0
  call void @llvm.lifetime.end.p0(i64 800016, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 800016, 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 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 dso_local noundef ptr @_ZSt11lower_boundIPxxET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) 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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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" }
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}


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