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

; 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: mustprogress uwtable
define dso_local void @_Z8seg_initii(i32 noundef %0, i32 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", 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 %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = call noundef i32 @_Z7seg_idxii(i32 noundef %21, i32 noundef %22)
  store i32 %23, ptr %5, align 4, !tbaa !5
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = icmp eq i32 %24, %25
  br i1 %26, label %27, label %45

27:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  %28 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i64 %28, ptr %6, align 4
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = 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 %30
  %32 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(8) %6) #6
  %33 = load i32, ptr %5, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = 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 %34
  %36 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(8) %32)
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = 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 %38
  %40 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(8) %36)
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %42
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 4 dereferenceable(8) %40)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %127

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

127:                                              ; preds = %45, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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: readwrite) }
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 uwtable
define dso_local void @_Z8seg_initii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca %"struct.std::pair", align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  %10 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %1)
  %11 = icmp eq i32 %0, %1
  br i1 %11, label %common.ret, label %22

common.ret:                                       ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %12 = call i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %12, ptr %4, align 8
  %13 = sext i32 %10 to i64
  %14 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 4800072), i64 0, i64 %13
  %15 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %4) #5
  %16 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 3200048), i64 0, i64 %13
  %17 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %15)
  %18 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 1600024), i64 0, i64 %13
  %19 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %17)
  %20 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %13
  %21 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSERKS0_(ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %common.ret34

common.ret34:                                     ; preds = %22, %common.ret
  ret void

22:                                               ; preds = %2
  %23 = add nsw i32 %0, %1
  %24 = ashr i32 %23, 1
  tail call void @_Z8seg_initii(i32 noundef %0, i32 noundef %24)
  %25 = add nsw i32 %24, 1
  tail call void @_Z8seg_initii(i32 noundef %25, i32 noundef %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %26 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %24)
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %27
  %.sroa.07.0.copyload = load i64, ptr %28, align 8
  %29 = tail call noundef i32 @_Z7seg_idxii(i32 noundef %25, i32 noundef %1)
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %30
  %.sroa.06.0.copyload = load i64, ptr %31, align 8
  %32 = tail call i64 @_Z9seg_mergePxSt4pairIiiES1_(ptr noundef nonnull @a, i64 %.sroa.07.0.copyload, i64 %.sroa.06.0.copyload)
  store i64 %32, ptr %6, align 8
  %33 = sext i32 %10 to i64
  %34 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr @seg, i64 0, i64 %33
  %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) %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
  %36 = call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %24)
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 1600024), i64 0, i64 %37
  %.sroa.05.0.copyload = load i64, ptr %38, align 8
  %39 = call noundef i32 @_Z7seg_idxii(i32 noundef %25, i32 noundef %1)
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 1600024), i64 0, i64 %40
  %.sroa.04.0.copyload = load i64, ptr %41, align 8
  %42 = 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 %42, ptr %7, align 8
  %43 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 1600024), i64 0, i64 %33
  %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) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %45 = call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %24)
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 3200048), i64 0, i64 %46
  %.sroa.03.0.copyload = load i64, ptr %47, align 8
  %48 = call noundef i32 @_Z7seg_idxii(i32 noundef %25, i32 noundef %1)
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 3200048), i64 0, i64 %49
  %.sroa.02.0.copyload = load i64, ptr %50, align 8
  %51 = 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 %51, ptr %8, align 8
  %52 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 3200048), i64 0, i64 %33
  %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) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %54 = call noundef i32 @_Z7seg_idxii(i32 noundef %0, i32 noundef %24)
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 4800072), i64 0, i64 %55
  %.sroa.01.0.copyload = load i64, ptr %56, align 8
  %57 = call noundef i32 @_Z7seg_idxii(i32 noundef %25, i32 noundef %1)
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 4800072), i64 0, i64 %58
  %.sroa.0.0.copyload = load i64, ptr %59, align 8
  %60 = 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 %60, ptr %9, align 8
  %61 = getelementptr inbounds [200003 x %"struct.std::pair"], ptr getelementptr inbounds (i8, ptr @seg, i64 4800072), i64 0, i64 %33
  %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) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %common.ret34
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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