; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (5721)

; 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.point = type { i64, i64 }
%"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" }
%struct.node = type { i64, i32, i32 }

@p = external dso_local global [100010 x %struct.point], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3cmpRK5pointS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_Z5solveii(i32 noundef, i32 noundef) #1

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.node, align 8
  %8 = alloca i64, align 8
  %9 = alloca %struct.point, align 8
  %10 = alloca %struct.node, align 8
  %11 = alloca %struct.node, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  br label %13

13:                                               ; preds = %41, %0
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr %2, align 4, !tbaa !5
  %16 = icmp ne i32 %14, 0
  br i1 %16, label %17, label %104

17:                                               ; preds = %13
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %38, %17
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %41

24:                                               ; preds = %19
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %4, ptr noundef %5)
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = load i32, ptr %6, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.point, ptr %30, i32 0, i32 0
  store i64 %27, ptr %31, align 16, !tbaa !9
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %35
  %37 = getelementptr inbounds %struct.point, ptr %36, i32 0, i32 1
  store i64 %33, ptr %37, align 8, !tbaa !12
  br label %38

38:                                               ; preds = %24
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %6, align 4, !tbaa !5
  br label %19, !llvm.loop !13

41:                                               ; preds = %23
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds %struct.point, ptr @p, i64 %43
  %45 = getelementptr inbounds %struct.point, ptr %44, i64 1
  call void @_ZSt4sortIP5pointPFiRKS0_S3_EEvT_S6_T0_(ptr noundef getelementptr inbounds (%struct.point, ptr @p, i64 1), ptr noundef %45, ptr noundef @_Z3cmpRK5pointS1_)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  %46 = load i32, ptr %3, align 4, !tbaa !5
  %47 = call { i64, i64 } @_Z5solveii(i32 noundef 1, i32 noundef %46)
  %48 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %49 = extractvalue { i64, i64 } %47, 0
  store i64 %49, ptr %48, align 8
  %50 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %51 = extractvalue { i64, i64 } %47, 1
  store i64 %51, ptr %50, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %52 = getelementptr inbounds %struct.node, ptr %7, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !15
  %54 = load i32, ptr %3, align 4, !tbaa !5
  %55 = sub nsw i32 %54, 2
  %56 = sext i32 %55 to i64
  %57 = mul nsw i64 %53, %56
  store i64 %57, ptr %8, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %58 = getelementptr inbounds %struct.node, ptr %7, i32 0, i32 1
  %59 = load i32, ptr %58, align 8, !tbaa !18
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %60
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 16 %61, i64 16, i1 false), !tbaa.struct !19
  %62 = getelementptr inbounds %struct.node, ptr %7, i32 0, i32 1
  %63 = load i32, ptr %62, align 8, !tbaa !18
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %64
  %66 = getelementptr inbounds %struct.point, ptr %65, i32 0, i32 0
  store i64 1000000000, ptr %66, align 16, !tbaa !9
  %67 = getelementptr inbounds %struct.node, ptr %7, i32 0, i32 1
  %68 = load i32, ptr %67, align 8, !tbaa !18
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %69
  %71 = getelementptr inbounds %struct.point, ptr %70, i32 0, i32 1
  store i64 1000000000, ptr %71, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = call { i64, i64 } @_Z5solveii(i32 noundef 1, i32 noundef %72)
  %74 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %75 = extractvalue { i64, i64 } %73, 0
  store i64 %75, ptr %74, align 8
  %76 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %77 = extractvalue { i64, i64 } %73, 1
  store i64 %77, ptr %76, align 8
  %78 = getelementptr inbounds %struct.node, ptr %10, i32 0, i32 0
  %79 = load i64, ptr %78, align 8, !tbaa !15
  %80 = load i64, ptr %8, align 8, !tbaa !17
  %81 = add nsw i64 %80, %79
  store i64 %81, ptr %8, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  %82 = getelementptr inbounds %struct.node, ptr %7, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !18
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %84
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %85, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !19
  %86 = getelementptr inbounds %struct.node, ptr %7, i32 0, i32 2
  %87 = load i32, ptr %86, align 4, !tbaa !20
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %88
  %90 = getelementptr inbounds %struct.point, ptr %89, i32 0, i32 0
  store i64 1000000000, ptr %90, align 16, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = call { i64, i64 } @_Z5solveii(i32 noundef 1, i32 noundef %91)
  %93 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 0
  %94 = extractvalue { i64, i64 } %92, 0
  store i64 %94, ptr %93, align 8
  %95 = getelementptr inbounds { i64, i64 }, ptr %11, i32 0, i32 1
  %96 = extractvalue { i64, i64 } %92, 1
  store i64 %96, ptr %95, align 8
  %97 = getelementptr inbounds %struct.node, ptr %11, i32 0, i32 0
  %98 = load i64, ptr %97, align 8, !tbaa !15
  %99 = load i64, ptr %8, align 8, !tbaa !17
  %100 = add nsw i64 %99, %98
  store i64 %100, ptr %8, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  %101 = load i64, ptr %8, align 8, !tbaa !17
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %101)
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %13, !llvm.loop !21

104:                                              ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #5

declare i32 @__isoc99_scanf(ptr noundef, ...) #5

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #1 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) #1 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)) #6

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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "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 = { 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 #7 = { 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"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS5point", !11, i64 0, !11, i64 8}
!11 = !{!"long long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !11, i64 0}
!16 = !{!"_ZTS4node", !11, i64 0, !6, i64 8, !6, i64 12}
!17 = !{!11, !11, i64 0}
!18 = !{!16, !6, i64 8}
!19 = !{i64 0, i64 8, !17, i64 8, i64 8, !17}
!20 = !{!16, !6, i64 12}
!21 = distinct !{!21, !14}


; 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.point = type { i64, i64 }
%"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" }

@p = external dso_local global [100010 x %struct.point], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3cmpRK5pointS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_Z5solveii(i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress 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) #3

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.point, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = add nsw i32 %7, -1
  store i32 %8, ptr %1, align 4, !tbaa !5
  %.not22 = icmp eq i32 %7, 0
  br i1 %.not22, label %._crit_edge25, label %.lr.ph24

.lr.ph24:                                         ; preds = %0, %._crit_edge
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %.not1820 = icmp slt i32 %10, 1
  br i1 %.not1820, label %.lr.ph24.._crit_edge_crit_edge, label %.lr.ph

.lr.ph24.._crit_edge_crit_edge:                   ; preds = %.lr.ph24
  %.pre = sext i32 %10 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph24.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.lr.ph24.._crit_edge_crit_edge ], [ %43, %.lr.ph ]
  %gep = getelementptr %struct.point, ptr getelementptr inbounds (i8, ptr @p, i64 16), i64 %.pre-phi
  call void @_ZSt4sortIP5pointPFiRKS0_S3_EEvT_S6_T0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 16), ptr noundef nonnull %gep, ptr noundef nonnull @_Z3cmpRK5pointS1_)
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = call { i64, i64 } @_Z5solveii(i32 noundef 1, i32 noundef %11)
  %13 = extractvalue { i64, i64 } %12, 0
  %14 = extractvalue { i64, i64 } %12, 1
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = add nsw i32 %15, -2
  %17 = sext i32 %16 to i64
  %18 = mul nsw i64 %13, %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5)
  %sext = shl i64 %14, 32
  %19 = ashr exact i64 %sext, 32
  %20 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %19
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %20, i64 16, i1 false), !tbaa.struct !9
  store i64 1000000000, ptr %20, align 16, !tbaa !12
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  store i64 1000000000, ptr %21, align 8, !tbaa !14
  %22 = call { i64, i64 } @_Z5solveii(i32 noundef 1, i32 noundef %15)
  %23 = extractvalue { i64, i64 } %22, 0
  %24 = add nsw i64 %23, %18
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %5, i64 16, i1 false), !tbaa.struct !9
  %25 = ashr i64 %14, 32
  %26 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %25
  store i64 1000000000, ptr %26, align 16, !tbaa !12
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = call { i64, i64 } @_Z5solveii(i32 noundef 1, i32 noundef %27)
  %29 = extractvalue { i64, i64 } %28, 0
  %30 = add nsw i64 %24, %29
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %30)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %33, 0
  br i1 %.not, label %._crit_edge25, label %.lr.ph24, !llvm.loop !15

.lr.ph:                                           ; preds = %.lr.ph24, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph24 ]
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100010 x %struct.point], ptr @p, i64 0, i64 %indvars.iv
  store i64 %37, ptr %38, align 16, !tbaa !12
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i8, ptr %38, i64 8
  store i64 %40, ptr %41, align 8, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %.not18.not = icmp slt i64 %indvars.iv, %43
  br i1 %.not18.not, label %.lr.ph, label %._crit_edge, !llvm.loop !17

._crit_edge25:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP5pointPFiRKS0_S3_EEvT_S6_T0_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #7

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

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 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "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 = { nofree nounwind "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 #7 = { 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 #8 = { 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"}
!9 = !{i64 0, i64 8, !10, i64 8, i64 8, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_ZTS5point", !11, i64 0, !11, i64 8}
!14 = !{!13, !11, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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