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

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

@hash_array_mod = external dso_local global [200002 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z22modified_binary_searchPxxxx(ptr noundef, i64 noundef, i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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
  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
  %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) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = call noundef ptr @_Z19binary_indexed_treex(i64 noundef %15)
  store ptr %16, ptr %13, align 8, !tbaa !9
  br label %17

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

21:                                               ; preds = %17
  %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) %3)
  %23 = load i64, ptr %3, align 8, !tbaa !5
  %24 = icmp eq i64 %23, 1
  br i1 %24, label %25, label %28

25:                                               ; preds = %21
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %17, !llvm.loop !11

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

29:                                               ; preds = %37, %28
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = load i64, ptr %3, align 8, !tbaa !5
  %32 = add nsw i64 %31, 1
  %33 = icmp slt i64 %30, %32
  br i1 %33, label %34, label %40

34:                                               ; preds = %29
  %35 = load i64, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds [200002 x i64], ptr @hash_array_mod, i64 0, i64 %35
  store i64 0, ptr %36, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %34
  %38 = load i64, ptr %4, align 8, !tbaa !5
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %4, align 8, !tbaa !5
  br label %29, !llvm.loop !13

40:                                               ; preds = %29
  %41 = load ptr, ptr %13, align 8, !tbaa !9
  %42 = load i64, ptr %3, align 8, !tbaa !5
  call void @_Z5renewPxx(ptr noundef %41, i64 noundef %42)
  %43 = getelementptr inbounds [200002 x i64], ptr %12, i64 0, i64 2
  store i64 1, ptr %43, align 16, !tbaa !5
  %44 = load i64, ptr %3, align 8, !tbaa !5
  %45 = sub nsw i64 %44, 1
  store i64 %45, ptr %11, align 8, !tbaa !5
  store i64 2, ptr %7, align 8, !tbaa !5
  store i64 2, ptr %8, align 8, !tbaa !5
  store i64 2, ptr %10, align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds ([200002 x i64], ptr @hash_array_mod, i64 0, i64 2), align 16, !tbaa !5
  %46 = load ptr, ptr %13, align 8, !tbaa !9
  %47 = load i64, ptr %3, align 8, !tbaa !5
  call void @_Z6updatePxxxx(ptr noundef %46, i64 noundef %47, i64 noundef 1, i64 noundef -1)
  br label %48

48:                                               ; preds = %51, %40
  %49 = load i64, ptr %11, align 8, !tbaa !5
  %50 = icmp ne i64 %49, 0
  br i1 %50, label %51, label %82

51:                                               ; preds = %48
  %52 = load ptr, ptr %13, align 8, !tbaa !9
  %53 = load i64, ptr %7, align 8, !tbaa !5
  %54 = sub nsw i64 %53, 1
  %55 = call noundef i64 @_Z3sumPxx(ptr noundef %52, i64 noundef %54)
  %56 = load i64, ptr %10, align 8, !tbaa !5
  %57 = add nsw i64 %55, %56
  %58 = load i64, ptr %11, align 8, !tbaa !5
  %59 = srem i64 %57, %58
  %60 = add nsw i64 %59, 1
  store i64 %60, ptr %8, align 8, !tbaa !5
  %61 = load ptr, ptr %13, align 8, !tbaa !9
  %62 = load i64, ptr %8, align 8, !tbaa !5
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %64 = sub nsw i64 %63, 1
  %65 = call noundef i64 @_Z22modified_binary_searchPxxxx(ptr noundef %61, i64 noundef %62, i64 noundef 0, i64 noundef %64)
  store i64 %65, ptr %9, align 8, !tbaa !5
  %66 = load i64, ptr %9, align 8, !tbaa !5
  %67 = add nsw i64 %66, 1
  store i64 %67, ptr %9, align 8, !tbaa !5
  %68 = load i64, ptr %10, align 8, !tbaa !5
  %69 = load i64, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds [200002 x i64], ptr %12, i64 0, i64 %69
  store i64 %68, ptr %70, align 8, !tbaa !5
  %71 = load i64, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds [200002 x i64], ptr @hash_array_mod, i64 0, i64 %71
  store i64 1, ptr %72, align 8, !tbaa !5
  %73 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %73, ptr %7, align 8, !tbaa !5
  %74 = load i64, ptr %10, align 8, !tbaa !5
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %10, align 8, !tbaa !5
  %76 = load i64, ptr %11, align 8, !tbaa !5
  %77 = add nsw i64 %76, -1
  store i64 %77, ptr %11, align 8, !tbaa !5
  %78 = load ptr, ptr %13, align 8, !tbaa !9
  %79 = load i64, ptr %3, align 8, !tbaa !5
  %80 = load i64, ptr %9, align 8, !tbaa !5
  %81 = sub nsw i64 %80, 1
  call void @_Z6updatePxxxx(ptr noundef %78, i64 noundef %79, i64 noundef %81, i64 noundef -1)
  br label %48, !llvm.loop !14

82:                                               ; preds = %48
  store i64 1, ptr %4, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %94, %82
  %84 = load i64, ptr %4, align 8, !tbaa !5
  %85 = load i64, ptr %3, align 8, !tbaa !5
  %86 = add nsw i64 %85, 1
  %87 = icmp slt i64 %84, %86
  br i1 %87, label %88, label %97

88:                                               ; preds = %83
  %89 = load i64, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds [200002 x i64], ptr %12, i64 0, i64 %89
  %91 = load i64, ptr %90, 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 @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @.str.1)
  br label %94

94:                                               ; preds = %88
  %95 = load i64, ptr %4, align 8, !tbaa !5
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %4, align 8, !tbaa !5
  br label %83, !llvm.loop !15

97:                                               ; preds = %83
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %17, !llvm.loop !11

99:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  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)) #2 align 2

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

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

; 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

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 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 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 #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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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" }

@hash_array_mod = external dso_local local_unnamed_addr global [200002 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; 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 nounwind uwtable
declare dso_local void @_Z5renewPxx(ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z22modified_binary_searchPxxxx(ptr noundef, i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

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

.lr.ph45:                                         ; preds = %0
  %8 = getelementptr inbounds i8, ptr %3, i64 16
  br label %9

9:                                                ; preds = %.lr.ph45, %.backedge
  %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 eq i64 %11, 1
  br i1 %12, label %15, label %.preheader29

.preheader29:                                     ; preds = %9
  %.not2630 = icmp slt i64 %11, 0
  br i1 %.not2630, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader29
  %13 = shl i64 %11, 3
  %14 = add i64 %13, 8
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @hash_array_mod, i8 0, i64 %14, i1 false), !tbaa !5
  br label %._crit_edge

15:                                               ; preds = %9
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  br label %.backedge

.backedge:                                        ; preds = %.lr.ph41, %.preheader, %15
  %.sink = phi ptr [ %16, %15 ], [ @_ZSt4cout, %.preheader ], [ @_ZSt4cout, %.lr.ph41 ]
  %17 = 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_)
  %18 = load i64, ptr %1, align 8, !tbaa !5
  %19 = add nsw i64 %18, -1
  store i64 %19, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %18, 0
  br i1 %.not, label %._crit_edge46, label %9, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph.preheader, %.preheader29
  call void @_Z5renewPxx(ptr noundef %5, i64 noundef %11)
  store i64 1, ptr %8, align 16, !tbaa !5
  %20 = load i64, ptr %2, align 8, !tbaa !5
  store i64 1, ptr getelementptr inbounds (i8, ptr @hash_array_mod, i64 16), align 16, !tbaa !5
  call void @_Z6updatePxxxx(ptr noundef %5, i64 noundef %20, i64 noundef 1, i64 noundef -1)
  %.02332 = add nsw i64 %20, -1
  %.not2733 = icmp eq i64 %.02332, 0
  br i1 %.not2733, label %.preheader, label %.lr.ph38

.preheader:                                       ; preds = %.lr.ph38, %._crit_edge
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %.not2839 = icmp slt i64 %21, 1
  br i1 %.not2839, label %.backedge, label %.lr.ph41

.lr.ph38:                                         ; preds = %._crit_edge, %.lr.ph38
  %.02336 = phi i64 [ %.023, %.lr.ph38 ], [ %.02332, %._crit_edge ]
  %.02435 = phi i64 [ %32, %.lr.ph38 ], [ 2, %._crit_edge ]
  %.02534 = phi i64 [ %28, %.lr.ph38 ], [ 1, %._crit_edge ]
  %22 = call noundef i64 @_Z3sumPxx(ptr noundef %5, i64 noundef %.02534)
  %23 = add nsw i64 %22, %.02435
  %24 = srem i64 %23, %.02336
  %25 = add nsw i64 %24, 1
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = add nsw i64 %26, -1
  %28 = call noundef i64 @_Z22modified_binary_searchPxxxx(ptr noundef %5, i64 noundef %25, i64 noundef 0, i64 noundef %27)
  %29 = add nsw i64 %28, 1
  %30 = getelementptr inbounds [200002 x i64], ptr %3, i64 0, i64 %29
  store i64 %.02435, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds [200002 x i64], ptr @hash_array_mod, i64 0, i64 %29
  store i64 1, ptr %31, align 8, !tbaa !5
  %32 = add nuw nsw i64 %.02435, 1
  %33 = load i64, ptr %2, align 8, !tbaa !5
  call void @_Z6updatePxxxx(ptr noundef %5, i64 noundef %33, i64 noundef %28, i64 noundef -1)
  %.023 = add nsw i64 %.02336, -1
  %.not27 = icmp eq i64 %.023, 0
  br i1 %.not27, label %.preheader, label %.lr.ph38, !llvm.loop !11

.lr.ph41:                                         ; preds = %.preheader, %.lr.ph41
  %.140 = phi i64 [ %38, %.lr.ph41 ], [ 1, %.preheader ]
  %34 = getelementptr inbounds [200002 x i64], ptr %3, i64 0, i64 %.140
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.1)
  %38 = add nuw nsw i64 %.140, 1
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %.not28.not = icmp slt i64 %.140, %39
  br i1 %.not28.not, label %.lr.ph41, label %.backedge, !llvm.loop !12

._crit_edge46:                                    ; preds = %.backedge, %0
  call void @llvm.lifetime.end.p0(i64 1600016, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  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 #2 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 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 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"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: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass