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

; 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 @_Z3sumPxx(ptr noundef, 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 @_Z6updatePxxxx(ptr noundef, i64 noundef, i64 noundef, i64 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z19binary_indexed_treex(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 [200002 x i64], align 16
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  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 1600016, ptr %12) #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 = %106, %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 %107

20:                                               ; preds = %16
  %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)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %23

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

27:                                               ; preds = %23
  %28 = load i64, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds [200002 x i64], ptr %12, i64 0, i64 %28
  store i64 0, ptr %29, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %27
  %31 = load i64, ptr %4, align 8, !tbaa !5
  %32 = add nsw i64 %31, 1
  store i64 %32, ptr %4, align 8, !tbaa !5
  br label %23, !llvm.loop !9

33:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %34 = load i64, ptr %3, align 8, !tbaa !5
  %35 = call noundef ptr @_Z19binary_indexed_treex(i64 noundef %34)
  store ptr %35, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %36 = load i64, ptr %3, align 8, !tbaa !5
  %37 = call noundef ptr @_Z19binary_indexed_treex(i64 noundef %36)
  store ptr %37, ptr %14, align 8, !tbaa !11
  br label %38

38:                                               ; preds = %105, %33
  %39 = load i64, ptr %6, align 8, !tbaa !5
  %40 = add nsw i64 %39, -1
  store i64 %40, ptr %6, align 8, !tbaa !5
  %41 = icmp ne i64 %39, 0
  br i1 %41, label %42, label %106

42:                                               ; preds = %38
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %46 = load i64, ptr %9, align 8, !tbaa !5
  %47 = add nsw i64 %46, -1
  store i64 %47, ptr %9, align 8, !tbaa !5
  %48 = load i64, ptr %10, align 8, !tbaa !5
  %49 = add nsw i64 %48, -1
  store i64 %49, ptr %10, align 8, !tbaa !5
  %50 = load i64, ptr %7, align 8, !tbaa !5
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %52, label %79

52:                                               ; preds = %42
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %54 = load ptr, ptr %13, align 8, !tbaa !11
  %55 = load i64, ptr %3, align 8, !tbaa !5
  %56 = load i64, ptr %9, align 8, !tbaa !5
  %57 = load i64, ptr %11, align 8, !tbaa !5
  call void @_Z6updatePxxxx(ptr noundef %54, i64 noundef %55, i64 noundef %56, i64 noundef %57)
  %58 = load ptr, ptr %13, align 8, !tbaa !11
  %59 = load i64, ptr %3, align 8, !tbaa !5
  %60 = load i64, ptr %10, align 8, !tbaa !5
  %61 = add nsw i64 %60, 1
  %62 = load i64, ptr %11, align 8, !tbaa !5
  %63 = sub nsw i64 0, %62
  call void @_Z6updatePxxxx(ptr noundef %58, i64 noundef %59, i64 noundef %61, i64 noundef %63)
  %64 = load ptr, ptr %14, align 8, !tbaa !11
  %65 = load i64, ptr %3, align 8, !tbaa !5
  %66 = load i64, ptr %9, align 8, !tbaa !5
  %67 = load i64, ptr %11, align 8, !tbaa !5
  %68 = load i64, ptr %9, align 8, !tbaa !5
  %69 = sub nsw i64 %68, 1
  %70 = mul nsw i64 %67, %69
  call void @_Z6updatePxxxx(ptr noundef %64, i64 noundef %65, i64 noundef %66, i64 noundef %70)
  %71 = load ptr, ptr %14, align 8, !tbaa !11
  %72 = load i64, ptr %3, align 8, !tbaa !5
  %73 = load i64, ptr %10, align 8, !tbaa !5
  %74 = add nsw i64 %73, 1
  %75 = load i64, ptr %11, align 8, !tbaa !5
  %76 = sub nsw i64 0, %75
  %77 = load i64, ptr %10, align 8, !tbaa !5
  %78 = mul nsw i64 %76, %77
  call void @_Z6updatePxxxx(ptr noundef %71, i64 noundef %72, i64 noundef %74, i64 noundef %78)
  br label %105

79:                                               ; preds = %42
  %80 = load ptr, ptr %13, align 8, !tbaa !11
  %81 = load i64, ptr %10, align 8, !tbaa !5
  %82 = call noundef i64 @_Z3sumPxx(ptr noundef %80, i64 noundef %81)
  %83 = load i64, ptr %10, align 8, !tbaa !5
  %84 = mul nsw i64 %82, %83
  %85 = load ptr, ptr %14, align 8, !tbaa !11
  %86 = load i64, ptr %10, align 8, !tbaa !5
  %87 = call noundef i64 @_Z3sumPxx(ptr noundef %85, i64 noundef %86)
  %88 = sub nsw i64 %84, %87
  %89 = load ptr, ptr %13, align 8, !tbaa !11
  %90 = load i64, ptr %9, align 8, !tbaa !5
  %91 = sub nsw i64 %90, 1
  %92 = call noundef i64 @_Z3sumPxx(ptr noundef %89, i64 noundef %91)
  %93 = load i64, ptr %9, align 8, !tbaa !5
  %94 = sub nsw i64 %93, 1
  %95 = mul nsw i64 %92, %94
  %96 = sub nsw i64 %88, %95
  %97 = load ptr, ptr %14, align 8, !tbaa !11
  %98 = load i64, ptr %9, align 8, !tbaa !5
  %99 = sub nsw i64 %98, 1
  %100 = call noundef i64 @_Z3sumPxx(ptr noundef %97, i64 noundef %99)
  %101 = add nsw i64 %96, %100
  store i64 %101, ptr %8, align 8, !tbaa !5
  %102 = load i64, ptr %8, align 8, !tbaa !5
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %102)
  %104 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %103, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %105

105:                                              ; preds = %79, %52
  br label %38, !llvm.loop !13

106:                                              ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %16, !llvm.loop !14

107:                                              ; preds = %16
  call void @llvm.lifetime.end.p0(i64 1600016, 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: 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 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!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 nounwind uwtable
declare dso_local noundef i64 @_Z3sumPxx(ptr noundef, 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 @_Z6updatePxxxx(ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_Z19binary_indexed_treex(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 i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %8 = 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)
  %9 = load i64, ptr %1, align 8, !tbaa !5
  %10 = add nsw i64 %9, -1
  store i64 %10, ptr %1, align 8, !tbaa !5
  %.not16 = icmp eq i64 %9, 0
  br i1 %.not16, label %._crit_edge, label %.lr.ph17

.loopexit:                                        ; preds = %68, %.lr.ph17
  %11 = load i64, ptr %1, align 8, !tbaa !5
  %12 = add nsw i64 %11, -1
  store i64 %12, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %11, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph17, !llvm.loop !9

.lr.ph17:                                         ; preds = %0, %.loopexit
  %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) %2)
  %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) %3)
  %15 = load i64, ptr %2, align 8, !tbaa !5
  %16 = call noundef ptr @_Z19binary_indexed_treex(i64 noundef %15)
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = call noundef ptr @_Z19binary_indexed_treex(i64 noundef %17)
  %19 = load i64, ptr %3, align 8, !tbaa !5
  %20 = add nsw i64 %19, -1
  store i64 %20, ptr %3, align 8, !tbaa !5
  %.not1215 = icmp eq i64 %19, 0
  br i1 %.not1215, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph17, %68
  %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) %4)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %24 = load i64, ptr %5, align 8, !tbaa !5
  %25 = add nsw i64 %24, -1
  store i64 %25, ptr %5, align 8, !tbaa !5
  %26 = load i64, ptr %6, align 8, !tbaa !5
  %27 = add nsw i64 %26, -1
  store i64 %27, ptr %6, align 8, !tbaa !5
  %28 = load i64, ptr %4, align 8, !tbaa !5
  %29 = icmp eq i64 %28, 0
  br i1 %29, label %30, label %51

30:                                               ; preds = %.lr.ph
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = load i64, ptr %5, align 8, !tbaa !5
  %34 = load i64, ptr %7, align 8, !tbaa !5
  call void @_Z6updatePxxxx(ptr noundef %16, i64 noundef %32, i64 noundef %33, i64 noundef %34)
  %35 = load i64, ptr %2, align 8, !tbaa !5
  %36 = load i64, ptr %6, align 8, !tbaa !5
  %37 = add nsw i64 %36, 1
  %38 = load i64, ptr %7, align 8, !tbaa !5
  %39 = sub nsw i64 0, %38
  call void @_Z6updatePxxxx(ptr noundef %16, i64 noundef %35, i64 noundef %37, i64 noundef %39)
  %40 = load i64, ptr %2, align 8, !tbaa !5
  %41 = load i64, ptr %5, align 8, !tbaa !5
  %42 = load i64, ptr %7, align 8, !tbaa !5
  %43 = add nsw i64 %41, -1
  %44 = mul nsw i64 %42, %43
  call void @_Z6updatePxxxx(ptr noundef %18, i64 noundef %40, i64 noundef %41, i64 noundef %44)
  %45 = load i64, ptr %2, align 8, !tbaa !5
  %46 = load i64, ptr %6, align 8, !tbaa !5
  %47 = add nsw i64 %46, 1
  %48 = load i64, ptr %7, align 8, !tbaa !5
  %49 = mul i64 %46, %48
  %50 = sub i64 0, %49
  call void @_Z6updatePxxxx(ptr noundef %18, i64 noundef %45, i64 noundef %47, i64 noundef %50)
  br label %68

51:                                               ; preds = %.lr.ph
  %52 = call noundef i64 @_Z3sumPxx(ptr noundef %16, i64 noundef %27)
  %53 = load i64, ptr %6, align 8, !tbaa !5
  %54 = mul nsw i64 %53, %52
  %55 = call noundef i64 @_Z3sumPxx(ptr noundef %18, i64 noundef %53)
  %56 = load i64, ptr %5, align 8, !tbaa !5
  %57 = add nsw i64 %56, -1
  %58 = call noundef i64 @_Z3sumPxx(ptr noundef %16, i64 noundef %57)
  %59 = load i64, ptr %5, align 8, !tbaa !5
  %60 = add nsw i64 %59, -1
  %61 = mul nsw i64 %60, %58
  %62 = call noundef i64 @_Z3sumPxx(ptr noundef %18, i64 noundef %60)
  %63 = add i64 %54, %62
  %64 = add i64 %55, %61
  %65 = sub i64 %63, %64
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %65)
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %68

68:                                               ; preds = %51, %30
  %69 = load i64, ptr %3, align 8, !tbaa !5
  %70 = add nsw i64 %69, -1
  store i64 %70, ptr %3, align 8, !tbaa !5
  %.not12 = icmp eq i64 %69, 0
  br i1 %.not12, label %.loopexit, label %.lr.ph, !llvm.loop !11

._crit_edge:                                      ; preds = %.loopexit, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, 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: 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}


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