; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101955E.ll (Z7seg_updiii)

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

%"struct.std::pair" = type { i32, i32 }

@a = external dso_local global [4 x [100001 x i64]], align 16
@seg = external dso_local global [4 x [200003 x %"struct.std::pair"]], align 16

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7seg_idxii(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef, i64, i64) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7seg_updiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) #5 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca %"struct.std::pair", align 4
  %13 = alloca %"struct.std::pair", align 4
  %14 = alloca %"struct.std::pair", align 4
  %15 = alloca %"struct.std::pair", align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca %"struct.std::pair", align 4
  %20 = alloca %"struct.std::pair", align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = load i32, ptr %5, align 4, !tbaa !5
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %24, label %117

24:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = add nsw i32 %25, %26
  %28 = ashr i32 %27, 1
  store i32 %28, ptr %7, align 4, !tbaa !5
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %32, label %36

32:                                               ; preds = %24
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = load i32, ptr %7, align 4, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !5
  call void @_Z7seg_updiii(i32 noundef %33, i32 noundef %34, i32 noundef %35)
  br label %41

36:                                               ; preds = %24
  %37 = load i32, ptr %7, align 4, !tbaa !5
  %38 = add nsw i32 %37, 1
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = load i32, ptr %6, align 4, !tbaa !5
  call void @_Z7seg_updiii(i32 noundef %38, i32 noundef %39, i32 noundef %40)
  br label %41

41:                                               ; preds = %36, %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = call noundef i32 @_Z7seg_idxii(i32 noundef %42, i32 noundef %43)
  store i32 %44, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = call noundef i32 @_Z7seg_idxii(i32 noundef %45, i32 noundef %46)
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %48
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %49, i64 8, i1 false)
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = call noundef i32 @_Z7seg_idxii(i32 noundef %51, i32 noundef %52)
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %54
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 8 %55, i64 8, i1 false)
  %56 = load i64, ptr %10, align 4
  %57 = load i64, ptr %11, align 4
  %58 = call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef @a, i64 %56, i64 %57)
  store i64 %58, ptr %9, align 4
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %60
  %62 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %61, ptr noundef nonnull align 4 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = call noundef i32 @_Z7seg_idxii(i32 noundef %63, i32 noundef %64)
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 1), i64 0, i64 %66
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %67, i64 8, i1 false)
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = call noundef i32 @_Z7seg_idxii(i32 noundef %69, i32 noundef %70)
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 1), i64 0, i64 %72
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %73, i64 8, i1 false)
  %74 = load i64, ptr %13, align 4
  %75 = load i64, ptr %14, align 4
  %76 = call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef getelementptr inbounds ([4 x [100001 x i64]], ptr @a, i64 0, i64 1), i64 %74, i64 %75)
  store i64 %76, ptr %12, align 4
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 1), i64 0, i64 %78
  %80 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %79, ptr noundef nonnull align 4 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %81 = load i32, ptr %4, align 4, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = call noundef i32 @_Z7seg_idxii(i32 noundef %81, i32 noundef %82)
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 2), i64 0, i64 %84
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %85, i64 8, i1 false)
  %86 = load i32, ptr %7, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = call noundef i32 @_Z7seg_idxii(i32 noundef %87, i32 noundef %88)
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 2), i64 0, i64 %90
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 8 %91, i64 8, i1 false)
  %92 = load i64, ptr %16, align 4
  %93 = load i64, ptr %17, align 4
  %94 = call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef getelementptr inbounds ([4 x [100001 x i64]], ptr @a, i64 0, i64 2), i64 %92, i64 %93)
  store i64 %94, ptr %15, align 4
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 2), i64 0, i64 %96
  %98 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %97, ptr noundef nonnull align 4 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = load i32, ptr %7, align 4, !tbaa !5
  %101 = call noundef i32 @_Z7seg_idxii(i32 noundef %99, i32 noundef %100)
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 3), i64 0, i64 %102
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %103, i64 8, i1 false)
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = add nsw i32 %104, 1
  %106 = load i32, ptr %5, align 4, !tbaa !5
  %107 = call noundef i32 @_Z7seg_idxii(i32 noundef %105, i32 noundef %106)
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 3), i64 0, i64 %108
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %109, i64 8, i1 false)
  %110 = load i64, ptr %19, align 4
  %111 = load i64, ptr %20, align 4
  %112 = call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef getelementptr inbounds ([4 x [100001 x i64]], ptr @a, i64 0, i64 3), i64 %110, i64 %111)
  store i64 %112, ptr %18, align 4
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds ([4 x [200003 x %"struct.std::pair"]], ptr @seg, i64 0, i64 3), i64 0, i64 %114
  %116 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %115, ptr noundef nonnull align 4 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %117

117:                                              ; preds = %41, %3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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

%"struct.std::pair" = type { i32, i32 }

@a = external dso_local global [4 x [100001 x i64]], align 16
@seg = external dso_local global [4 x [200003 x %"struct.std::pair"]], align 16

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7seg_idxii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef, i64, i64) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7seg_updiii(i32 noundef %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #4 {
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = icmp slt i32 %0, %1
  br i1 %8, label %9, label %54

9:                                                ; preds = %3
  %10 = add nsw i32 %1, %0
  %11 = ashr i32 %10, 1
  %.not = icmp slt i32 %11, %2
  br i1 %.not, label %13, label %12

12:                                               ; preds = %9
  tail call void @_Z7seg_updiii(i32 noundef %0, i32 noundef %11, i32 noundef %2)
  %.pre = add nsw i32 %11, 1
  br label %15

13:                                               ; preds = %9
  %14 = add nsw i32 %11, 1
  tail call void @_Z7seg_updiii(i32 noundef %14, i32 noundef %1, i32 noundef %2)
  br label %15

15:                                               ; preds = %13, %12
  %.pre-phi = phi i32 [ %14, %13 ], [ %.pre, %12 ]
  %16 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %17 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %11)
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %18
  %.sroa.07.0.copyload = load i64, ptr %19, align 8
  %20 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %.pre-phi, i32 noundef %1)
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %21
  %.sroa.06.0.copyload = load i64, ptr %22, align 8
  %23 = tail call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef nonnull @a, i64 %.sroa.07.0.copyload, i64 %.sroa.06.0.copyload)
  store i64 %23, ptr %4, align 8
  %24 = sext i32 %16 to i64
  %25 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %24
  %26 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %27 = call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %11)
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 1600024), i64 0, i64 %28
  %.sroa.05.0.copyload = load i64, ptr %29, align 8
  %30 = call noundef i32 @_Z7seg_idxii(i32 noundef %.pre-phi, i32 noundef %1)
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 1600024), i64 0, i64 %31
  %.sroa.04.0.copyload = load i64, ptr %32, align 8
  %33 = call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @a, i64 800008), i64 %.sroa.05.0.copyload, i64 %.sroa.04.0.copyload)
  store i64 %33, ptr %5, align 8
  %34 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 1600024), i64 0, i64 %24
  %35 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %36 = call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %11)
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 3200048), i64 0, i64 %37
  %.sroa.03.0.copyload = load i64, ptr %38, align 8
  %39 = call noundef i32 @_Z7seg_idxii(i32 noundef %.pre-phi, i32 noundef %1)
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 3200048), i64 0, i64 %40
  %.sroa.02.0.copyload = load i64, ptr %41, align 8
  %42 = call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @a, i64 1600016), i64 %.sroa.03.0.copyload, i64 %.sroa.02.0.copyload)
  store i64 %42, ptr %6, align 8
  %43 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 3200048), i64 0, i64 %24
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %45 = call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %11)
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 4800072), i64 0, i64 %46
  %.sroa.01.0.copyload = load i64, ptr %47, align 8
  %48 = call noundef i32 @_Z7seg_idxii(i32 noundef %.pre-phi, i32 noundef %1)
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 4800072), i64 0, i64 %49
  %.sroa.0.0.copyload = load i64, ptr %50, align 8
  %51 = call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef nonnull getelementptr inbounds (i8, ptr @a, i64 2400024), i64 %.sroa.01.0.copyload, i64 %.sroa.0.0.copyload)
  store i64 %51, ptr %7, align 8
  %52 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 4800072), i64 0, i64 %24
  %53 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %52, ptr noundef nonnull align 4 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %54

54:                                               ; preds = %15, %3
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint 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 = { 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 #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,TailCallElimPass