; LLVM IR from eyangch/competitive-programming :: Codeforces/1427 (c)

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

@R = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@t = external dso_local global [100001 x i32], align 16
@x = external dso_local global [100001 x i32], align 16
@y = external dso_local global [100001 x i32], align 16
@mx = external dso_local global [100001 x i32], align 16
@dp = external dso_local global [100001 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca double, align 8
  %3 = alloca i32, align 4
  %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
  store i32 0, ptr %1, align 4
  %9 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @R)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %17 = load i32, ptr @N, align 4, !tbaa !8
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds i32, ptr @dp, i64 %18
  %20 = getelementptr inbounds i32, ptr %19, i64 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  store double -1.000000e+09, ptr %2, align 8, !tbaa !11
  call void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef @dp, ptr noundef %20, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  store i32 0, ptr @t, align 16, !tbaa !8
  store i32 1, ptr @x, align 16, !tbaa !8
  store i32 1, ptr @y, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1, ptr %3, align 4, !tbaa !8
  br label %21

21:                                               ; preds = %39, %0
  %22 = load i32, ptr %3, align 4, !tbaa !8
  %23 = load i32, ptr @N, align 4, !tbaa !8
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %42

26:                                               ; preds = %21
  %27 = load i32, ptr %3, align 4, !tbaa !8
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %28
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = load i32, ptr %3, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %35 = load i32, ptr %3, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 4 dereferenceable(4) %37)
  br label %39

39:                                               ; preds = %26
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !8
  br label %21, !llvm.loop !13

42:                                               ; preds = %25
  store i32 0, ptr @dp, align 16, !tbaa !8
  %43 = load i32, ptr @dp, align 16, !tbaa !8
  store i32 %43, ptr @mx, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %44

44:                                               ; preds = %145, %42
  %45 = load i32, ptr %4, align 4, !tbaa !8
  %46 = load i32, ptr @N, align 4, !tbaa !8
  %47 = icmp sle i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %148

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %50 = load i32, ptr %4, align 4, !tbaa !8
  %51 = sub nsw i32 %50, 1
  store i32 %51, ptr %6, align 4, !tbaa !8
  br label %52

52:                                               ; preds = %128, %49
  %53 = load i32, ptr %6, align 4, !tbaa !8
  %54 = icmp sge i32 %53, 0
  br i1 %54, label %56, label %55

55:                                               ; preds = %52
  store i32 8, ptr %5, align 4
  br label %131

56:                                               ; preds = %52
  %57 = load i32, ptr %6, align 4, !tbaa !8
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !8
  %61 = add nsw i32 %60, 1000
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !8
  %66 = icmp sle i32 %61, %65
  br i1 %66, label %67, label %81

67:                                               ; preds = %56
  %68 = load i32, ptr %4, align 4, !tbaa !8
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %71 = load i32, ptr %6, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !8
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %7, align 4, !tbaa !8
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %77 = load i32, ptr %76, align 4, !tbaa !8
  %78 = load i32, ptr %4, align 4, !tbaa !8
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %79
  store i32 %77, ptr %80, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  store i32 8, ptr %5, align 4
  br label %131

81:                                               ; preds = %56
  %82 = load i32, ptr %4, align 4, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !8
  %86 = load i32, ptr %6, align 4, !tbaa !8
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !8
  %90 = sub nsw i32 %85, %89
  %91 = call i32 @llvm.abs.i32(i32 %90, i1 true)
  %92 = load i32, ptr %4, align 4, !tbaa !8
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !8
  %96 = load i32, ptr %6, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !8
  %100 = sub nsw i32 %95, %99
  %101 = call i32 @llvm.abs.i32(i32 %100, i1 true)
  %102 = add nsw i32 %91, %101
  %103 = load i32, ptr %4, align 4, !tbaa !8
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %104
  %106 = load i32, ptr %105, align 4, !tbaa !8
  %107 = load i32, ptr %6, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %111 = sub nsw i32 %106, %110
  %112 = icmp sle i32 %102, %111
  br i1 %112, label %113, label %127

113:                                              ; preds = %81
  %114 = load i32, ptr %4, align 4, !tbaa !8
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %117 = load i32, ptr %6, align 4, !tbaa !8
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !8
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %8, align 4, !tbaa !8
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %116, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %123 = load i32, ptr %122, align 4, !tbaa !8
  %124 = load i32, ptr %4, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %125
  store i32 %123, ptr %126, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %127

127:                                              ; preds = %113, %81
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %6, align 4, !tbaa !8
  %130 = add nsw i32 %129, -1
  store i32 %130, ptr %6, align 4, !tbaa !8
  br label %52, !llvm.loop !15

131:                                              ; preds = %67, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %132

132:                                              ; preds = %131
  %133 = load i32, ptr %4, align 4, !tbaa !8
  %134 = sub nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %135
  %137 = load i32, ptr %4, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %138
  %140 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %136, ptr noundef nonnull align 4 dereferenceable(4) %139)
  %141 = load i32, ptr %140, align 4, !tbaa !8
  %142 = load i32, ptr %4, align 4, !tbaa !8
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %143
  store i32 %141, ptr %144, align 4, !tbaa !8
  br label %145

145:                                              ; preds = %132
  %146 = load i32, ptr %4, align 4, !tbaa !8
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %4, align 4, !tbaa !8
  br label %44, !llvm.loop !16

148:                                              ; preds = %48
  %149 = load i32, ptr @N, align 4, !tbaa !8
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !8
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %152)
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %153, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

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

attributes #0 = { 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 #1 = { "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !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"

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

@R = external dso_local global i32, align 4
@N = external dso_local global i32, align 4
@t = external dso_local global [100001 x i32], align 16
@x = external dso_local global [100001 x i32], align 16
@y = external dso_local global [100001 x i32], align 16
@mx = external dso_local global [100001 x i32], align 16
@dp = external dso_local global [100001 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca double, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @R)
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %12 = load i32, ptr @N, align 4, !tbaa !8
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds i32, ptr @dp, i64 %13
  %15 = getelementptr inbounds i8, ptr %14, i64 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store double -1.000000e+09, ptr %1, align 8, !tbaa !11
  call void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef nonnull @dp, ptr noundef nonnull %15, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  store i32 0, ptr @t, align 16, !tbaa !8
  store i32 1, ptr @x, align 16, !tbaa !8
  store i32 1, ptr @y, align 16, !tbaa !8
  %16 = load i32, ptr @N, align 4, !tbaa !8
  %.not36 = icmp slt i32 %16, 1
  br i1 %.not36, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  store i32 0, ptr @dp, align 16, !tbaa !8
  store i32 0, ptr @mx, align 16, !tbaa !8
  br label %._crit_edge.._crit_edge43_crit_edge

._crit_edge:                                      ; preds = %.lr.ph
  store i32 0, ptr @dp, align 16, !tbaa !8
  store i32 0, ptr @mx, align 16, !tbaa !8
  %.not3139 = icmp slt i32 %24, 1
  br i1 %.not3139, label %._crit_edge.._crit_edge43_crit_edge, label %.lr.ph42

._crit_edge.._crit_edge43_crit_edge:              ; preds = %._crit_edge.thread, %._crit_edge
  %17 = phi i32 [ %16, %._crit_edge.thread ], [ %24, %._crit_edge ]
  %.pre = sext i32 %17 to i64
  br label %._crit_edge43

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %18 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %indvars.iv
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %20 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %indvars.iv
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %22 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %indvars.iv
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %24 = load i32, ptr @N, align 4, !tbaa !8
  %25 = sext i32 %24 to i64
  %.not.not = icmp slt i64 %indvars.iv, %25
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge43:                                    ; preds = %.loopexit, %._crit_edge.._crit_edge43_crit_edge
  %.pre-phi = phi i64 [ %.pre, %._crit_edge.._crit_edge43_crit_edge ], [ %75, %.loopexit ]
  %26 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %.pre-phi
  %27 = load i32, ptr %26, align 4, !tbaa !8
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %27)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph42:                                         ; preds = %._crit_edge, %.loopexit
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %.loopexit ], [ 1, %._crit_edge ]
  %30 = add nsw i64 %indvars.iv47, -1
  %31 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %indvars.iv47
  %32 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %indvars.iv47
  %33 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %indvars.iv47
  %34 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %indvars.iv47
  %35 = trunc nuw nsw i64 %30 to i32
  br label %36

36:                                               ; preds = %.lr.ph42, %67
  %.038 = phi i32 [ %35, %.lr.ph42 ], [ %68, %67 ]
  %37 = zext nneg i32 %.038 to i64
  %38 = getelementptr inbounds [100001 x i32], ptr @t, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !8
  %40 = add nsw i32 %39, 1000
  %41 = load i32, ptr %31, align 4, !tbaa !8
  %.not32 = icmp sgt i32 %40, %41
  br i1 %.not32, label %48, label %42

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %43 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %37
  %44 = load i32, ptr %43, align 4, !tbaa !8
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %2, align 4, !tbaa !8
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %47 = load i32, ptr %46, align 4, !tbaa !8
  store i32 %47, ptr %34, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  br label %.loopexit

48:                                               ; preds = %36
  %49 = load i32, ptr %32, align 4, !tbaa !8
  %50 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %37
  %51 = load i32, ptr %50, align 4, !tbaa !8
  %52 = sub nsw i32 %49, %51
  %53 = call i32 @llvm.abs.i32(i32 %52, i1 true)
  %54 = load i32, ptr %33, align 4, !tbaa !8
  %55 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %37
  %56 = load i32, ptr %55, align 4, !tbaa !8
  %57 = sub nsw i32 %54, %56
  %58 = call i32 @llvm.abs.i32(i32 %57, i1 true)
  %59 = add nuw nsw i32 %58, %53
  %60 = sub nsw i32 %41, %39
  %.not33 = icmp sgt i32 %59, %60
  br i1 %.not33, label %67, label %61

61:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %62 = getelementptr inbounds [100001 x i32], ptr @dp, i64 0, i64 %37
  %63 = load i32, ptr %62, align 4, !tbaa !8
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %3, align 4, !tbaa !8
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %34, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %66 = load i32, ptr %65, align 4, !tbaa !8
  store i32 %66, ptr %34, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  br label %67

67:                                               ; preds = %48, %61
  %68 = add nsw i32 %.038, -1
  %69 = icmp sgt i32 %.038, 0
  br i1 %69, label %36, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %67, %42
  %70 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %30
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = getelementptr inbounds [100001 x i32], ptr @mx, i64 0, i64 %indvars.iv47
  store i32 %72, ptr %73, align 4, !tbaa !8
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %74 = load i32, ptr @N, align 4, !tbaa !8
  %75 = sext i32 %74 to i64
  %.not31.not = icmp slt i64 %indvars.iv47, %75
  br i1 %.not31.not, label %.lr.ph42, label %._crit_edge43, !llvm.loop !16
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPidEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #6

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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