; LLVM IR from eyangch/competitive-programming :: Codeforces/1372 (d)

; 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" }
%"class.std::initializer_list" = type { ptr, i64 }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::initializer_list", align 8
  %7 = alloca [3 x i64], align 8
  store i32 0, ptr %1, align 4
  %8 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %9 = getelementptr i8, ptr %8, i64 -24
  %10 = load i64, ptr %9, align 8
  %11 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %10
  %12 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %11, ptr noundef null)
  %13 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %15

15:                                               ; preds = %24, %0
  %16 = load i64, ptr %2, align 8, !tbaa !8
  %17 = load i64, ptr @N, align 8, !tbaa !8
  %18 = icmp slt i64 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %27

20:                                               ; preds = %15
  %21 = load i64, ptr %2, align 8, !tbaa !8
  %22 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %21
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %22)
  br label %24

24:                                               ; preds = %20
  %25 = load i64, ptr %2, align 8, !tbaa !8
  %26 = add nsw i64 %25, 1
  store i64 %26, ptr %2, align 8, !tbaa !8
  br label %15, !llvm.loop !11

27:                                               ; preds = %19
  %28 = load i64, ptr @a, align 16, !tbaa !8
  store i64 %28, ptr @p1, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 1, ptr %3, align 8, !tbaa !8
  br label %29

29:                                               ; preds = %64, %27
  %30 = load i64, ptr %3, align 8, !tbaa !8
  %31 = load i64, ptr @N, align 8, !tbaa !8
  %32 = icmp slt i64 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %67

34:                                               ; preds = %29
  %35 = load i64, ptr %3, align 8, !tbaa !8
  %36 = sub nsw i64 %35, 1
  %37 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !8
  %39 = load i64, ptr %3, align 8, !tbaa !8
  %40 = srem i64 %39, 2
  %41 = icmp ne i64 %40, 0
  %42 = xor i1 %41, true
  %43 = zext i1 %42 to i64
  %44 = load i64, ptr %3, align 8, !tbaa !8
  %45 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !8
  %47 = mul nsw i64 %43, %46
  %48 = add nsw i64 %38, %47
  %49 = load i64, ptr %3, align 8, !tbaa !8
  %50 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %49
  store i64 %48, ptr %50, align 8, !tbaa !8
  %51 = load i64, ptr %3, align 8, !tbaa !8
  %52 = sub nsw i64 %51, 1
  %53 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %52
  %54 = load i64, ptr %53, align 8, !tbaa !8
  %55 = load i64, ptr %3, align 8, !tbaa !8
  %56 = srem i64 %55, 2
  %57 = load i64, ptr %3, align 8, !tbaa !8
  %58 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !8
  %60 = mul nsw i64 %56, %59
  %61 = add nsw i64 %54, %60
  %62 = load i64, ptr %3, align 8, !tbaa !8
  %63 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %62
  store i64 %61, ptr %63, align 8, !tbaa !8
  br label %64

64:                                               ; preds = %34
  %65 = load i64, ptr %3, align 8, !tbaa !8
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %3, align 8, !tbaa !8
  br label %29, !llvm.loop !13

67:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !8
  br label %68

68:                                               ; preds = %108, %67
  %69 = load i64, ptr %5, align 8, !tbaa !8
  %70 = load i64, ptr @N, align 8, !tbaa !8
  %71 = icmp slt i64 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %111

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %74 = load i64, ptr %4, align 8, !tbaa !8
  store i64 %74, ptr %7, align 8, !tbaa !8
  %75 = getelementptr inbounds i64, ptr %7, i64 1
  %76 = load i64, ptr %5, align 8, !tbaa !8
  %77 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !8
  %79 = load i64, ptr @N, align 8, !tbaa !8
  %80 = sub nsw i64 %79, 1
  %81 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !8
  %83 = add nsw i64 %78, %82
  %84 = load i64, ptr %5, align 8, !tbaa !8
  %85 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = sub nsw i64 %83, %86
  store i64 %87, ptr %75, align 8, !tbaa !8
  %88 = getelementptr inbounds i64, ptr %7, i64 2
  %89 = load i64, ptr %5, align 8, !tbaa !8
  %90 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !8
  %92 = load i64, ptr @N, align 8, !tbaa !8
  %93 = sub nsw i64 %92, 1
  %94 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !8
  %96 = add nsw i64 %91, %95
  %97 = load i64, ptr %5, align 8, !tbaa !8
  %98 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %97
  %99 = load i64, ptr %98, align 8, !tbaa !8
  %100 = sub nsw i64 %96, %99
  store i64 %100, ptr %88, align 8, !tbaa !8
  %101 = getelementptr inbounds %"class.std::initializer_list", ptr %6, i32 0, i32 0
  store ptr %7, ptr %101, align 8, !tbaa !14
  %102 = getelementptr inbounds %"class.std::initializer_list", ptr %6, i32 0, i32 1
  store i64 3, ptr %102, align 8, !tbaa !18
  %103 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8
  %105 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  %106 = load i64, ptr %105, align 8
  %107 = call noundef i64 @_ZSt3maxIxET_St16initializer_listIS0_E(ptr %104, i64 %106)
  store i64 %107, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %108

108:                                              ; preds = %73
  %109 = load i64, ptr %5, align 8, !tbaa !8
  %110 = add nsw i64 %109, 1
  store i64 %110, ptr %5, align 8, !tbaa !8
  br label %68, !llvm.loop !19

111:                                              ; preds = %72
  %112 = load i64, ptr %4, align 8, !tbaa !8
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %112)
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %115 = load i32, ptr %1, align 4
  ret i32 %115
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; 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 uwtable
declare dso_local noundef i64 @_ZSt3maxIxET_St16initializer_listIS0_E(ptr, i64) #5

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

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 = { 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 = { "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 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 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !16, i64 0}
!15 = !{!"_ZTSSt16initializer_listIxE", !16, i64 0, !17, i64 8}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{!"long", !10, i64 0}
!18 = !{!15, !17, i64 8}
!19 = distinct !{!19, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [3 x i64], align 8
  %2 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %3 = getelementptr i8, ptr %2, i64 -24
  %4 = load i64, ptr %3, align 8
  %5 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %4
  %6 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %5, ptr noundef null)
  %7 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %8 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %9 = load i64, ptr @N, align 8, !tbaa !8
  %10 = icmp sgt i64 %9, 0
  br i1 %10, label %.lr.ph, label %.preheader.thread

.preheader.thread:                                ; preds = %0
  %11 = load i64, ptr @a, align 16, !tbaa !8
  store i64 %11, ptr @p1, align 16, !tbaa !8
  br label %._crit_edge33

._crit_edge:                                      ; preds = %.lr.ph
  %12 = load i64, ptr @a, align 16, !tbaa !8
  store i64 %12, ptr @p1, align 16, !tbaa !8
  %13 = icmp sgt i64 %19, 1
  br i1 %13, label %.lr.ph29.preheader, label %.preheader

.lr.ph29.preheader:                               ; preds = %._crit_edge
  %.pre = load i64, ptr @p2, align 16, !tbaa !8
  %14 = add nsw i64 %19, -1
  %xtraiter = and i64 %14, 1
  %15 = icmp eq i64 %19, 2
  br i1 %15, label %.preheader.loopexit.unr-lcssa, label %.lr.ph29.preheader.new

.lr.ph29.preheader.new:                           ; preds = %.lr.ph29.preheader
  %unroll_iter = and i64 %14, -2
  br label %.lr.ph29

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.026 = phi i64 [ %18, %.lr.ph ], [ 0, %0 ]
  %16 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.026
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %18 = add nuw nsw i64 %.026, 1
  %19 = load i64, ptr @N, align 8, !tbaa !8
  %20 = icmp slt i64 %18, %19
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph29, %.lr.ph29.preheader
  %.unr = phi i64 [ %.pre, %.lr.ph29.preheader ], [ %39, %.lr.ph29 ]
  %.unr40 = phi i64 [ %12, %.lr.ph29.preheader ], [ %44, %.lr.ph29 ]
  %.02227.unr = phi i64 [ 1, %.lr.ph29.preheader ], [ %47, %.lr.ph29 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph29.epil

.lr.ph29.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa
  %21 = and i64 %.02227.unr, 1
  %22 = xor i64 %21, 1
  %23 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.02227.unr
  %24 = load i64, ptr %23, align 8, !tbaa !8
  %25 = mul nuw nsw i64 %24, %22
  %26 = add nsw i64 %25, %.unr40
  %27 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %.02227.unr
  store i64 %26, ptr %27, align 8, !tbaa !8
  %28 = mul nuw nsw i64 %24, %21
  %29 = add nsw i64 %.unr, %28
  %30 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %.02227.unr
  store i64 %29, ptr %30, align 8, !tbaa !8
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph29.epil, %.preheader.loopexit.unr-lcssa, %._crit_edge
  %31 = icmp sgt i64 %19, 0
  br i1 %31, label %.lr.ph32, label %._crit_edge33

.lr.ph32:                                         ; preds = %.preheader
  %32 = getelementptr inbounds i8, ptr %1, i64 8
  %33 = getelementptr inbounds i8, ptr %1, i64 16
  br label %50

.lr.ph29:                                         ; preds = %.lr.ph29, %.lr.ph29.preheader.new
  %34 = phi i64 [ %.pre, %.lr.ph29.preheader.new ], [ %39, %.lr.ph29 ]
  %35 = phi i64 [ %12, %.lr.ph29.preheader.new ], [ %44, %.lr.ph29 ]
  %.02227 = phi i64 [ 1, %.lr.ph29.preheader.new ], [ %47, %.lr.ph29 ]
  %niter = phi i64 [ 0, %.lr.ph29.preheader.new ], [ %niter.next.1, %.lr.ph29 ]
  %36 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %.02227
  %37 = load i64, ptr %36, align 8, !tbaa !8
  %38 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %.02227
  store i64 %35, ptr %38, align 8, !tbaa !8
  %39 = add nsw i64 %34, %37
  %40 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %.02227
  store i64 %39, ptr %40, align 8, !tbaa !8
  %41 = add nuw nsw i64 %.02227, 1
  %42 = getelementptr inbounds [200000 x i64], ptr @a, i64 0, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !8
  %44 = add nsw i64 %43, %35
  %45 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %41
  store i64 %44, ptr %45, align 8, !tbaa !8
  %46 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %41
  store i64 %39, ptr %46, align 8, !tbaa !8
  %47 = add nuw nsw i64 %.02227, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.loopexit.unr-lcssa, label %.lr.ph29, !llvm.loop !13

._crit_edge33:                                    ; preds = %50, %.preheader.thread, %.preheader
  %.024.lcssa = phi i64 [ 0, %.preheader ], [ 0, %.preheader.thread ], [ %65, %50 ]
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.024.lcssa)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull @.str)
  ret i32 0

50:                                               ; preds = %.lr.ph32, %50
  %51 = phi i64 [ %19, %.lr.ph32 ], [ %67, %50 ]
  %.02331 = phi i64 [ 0, %.lr.ph32 ], [ %66, %50 ]
  %.02430 = phi i64 [ 0, %.lr.ph32 ], [ %65, %50 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #6
  store i64 %.02430, ptr %1, align 8, !tbaa !8
  %52 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %.02331
  %53 = load i64, ptr %52, align 8, !tbaa !8
  %54 = add nsw i64 %51, -1
  %55 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %54
  %56 = load i64, ptr %55, align 8, !tbaa !8
  %57 = add nsw i64 %56, %53
  %58 = getelementptr inbounds [200000 x i64], ptr @p2, i64 0, i64 %.02331
  %59 = load i64, ptr %58, align 8, !tbaa !8
  %60 = sub i64 %57, %59
  store i64 %60, ptr %32, align 8, !tbaa !8
  %61 = getelementptr inbounds [200000 x i64], ptr @p1, i64 0, i64 %54
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = sub i64 %59, %53
  %64 = add i64 %63, %62
  store i64 %64, ptr %33, align 8, !tbaa !8
  %65 = call noundef i64 @_ZSt3maxIxET_St16initializer_listIS0_E(ptr nonnull %1, i64 3)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #6
  %66 = add nuw nsw i64 %.02331, 1
  %67 = load i64, ptr @N, align 8, !tbaa !8
  %68 = icmp slt i64 %66, %67
  br i1 %68, label %50, label %._crit_edge33, !llvm.loop !14
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; 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 uwtable
declare dso_local noundef i64 @_ZSt3maxIxET_St16initializer_listIS0_E(ptr, i64) local_unnamed_addr #5

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

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

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 = { 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 = { "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 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 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


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