; LLVM IR from eyangch/competitive-programming :: Codeforces/1156 (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" }

@N = external dso_local global i64, align 8
@par = external dso_local global [2 x [200000 x i64]], align 16
@sz = external dso_local global [2 x [200000 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z4findxx(i64 noundef, i64 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2unxxx(i64 noundef, i64 noundef, i64 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %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 zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %16 = 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 %17

17:                                               ; preds = %38, %0
  %18 = load i64, ptr %2, align 8, !tbaa !8
  %19 = icmp slt i64 %18, 2
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %17
  %22 = load i64, ptr %2, align 8, !tbaa !8
  %23 = getelementptr inbounds [2 x [200000 x i64]], ptr @sz, i64 0, i64 %22
  %24 = getelementptr inbounds [200000 x i64], ptr %23, i64 0, i64 0
  %25 = load i64, ptr %2, align 8, !tbaa !8
  %26 = getelementptr inbounds [2 x [200000 x i64]], ptr @sz, i64 0, i64 %25
  %27 = getelementptr inbounds [200000 x i64], ptr %26, i64 0, i64 0
  %28 = load i64, ptr @N, align 8, !tbaa !8
  %29 = getelementptr inbounds i64, ptr %27, i64 %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef %24, ptr noundef %29, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %30 = load i64, ptr %2, align 8, !tbaa !8
  %31 = getelementptr inbounds [2 x [200000 x i64]], ptr @par, i64 0, i64 %30
  %32 = getelementptr inbounds [200000 x i64], ptr %31, i64 0, i64 0
  %33 = load i64, ptr %2, align 8, !tbaa !8
  %34 = getelementptr inbounds [2 x [200000 x i64]], ptr @par, i64 0, i64 %33
  %35 = getelementptr inbounds [200000 x i64], ptr %34, i64 0, i64 0
  %36 = load i64, ptr @N, align 8, !tbaa !8
  %37 = getelementptr inbounds i64, ptr %35, i64 %36
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef %32, ptr noundef %37, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %38

38:                                               ; preds = %21
  %39 = load i64, ptr %2, align 8, !tbaa !8
  %40 = add nsw i64 %39, 1
  store i64 %40, ptr %2, align 8, !tbaa !8
  br label %17, !llvm.loop !13

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

42:                                               ; preds = %57, %41
  %43 = load i64, ptr %4, align 8, !tbaa !8
  %44 = load i64, ptr @N, align 8, !tbaa !8
  %45 = sub nsw i64 %44, 1
  %46 = icmp slt i64 %43, %45
  br i1 %46, label %48, label %47

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

48:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %50 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %52 = load i64, ptr %5, align 8, !tbaa !8
  %53 = sub nsw i64 %52, 1
  %54 = load i64, ptr %6, align 8, !tbaa !8
  %55 = sub nsw i64 %54, 1
  %56 = load i64, ptr %7, align 8, !tbaa !8
  call void @_Z2unxxx(i64 noundef %53, i64 noundef %55, i64 noundef %56)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %57

57:                                               ; preds = %48
  %58 = load i64, ptr %4, align 8, !tbaa !8
  %59 = add nsw i64 %58, 1
  store i64 %59, ptr %4, align 8, !tbaa !8
  br label %42, !llvm.loop !15

60:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %61

61:                                               ; preds = %91, %60
  %62 = load i64, ptr %9, align 8, !tbaa !8
  %63 = load i64, ptr @N, align 8, !tbaa !8
  %64 = icmp slt i64 %62, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %94

66:                                               ; preds = %61
  %67 = load i64, ptr %9, align 8, !tbaa !8
  %68 = call noundef i64 @_Z4findxx(i64 noundef %67, i64 noundef 0)
  %69 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !8
  %71 = load i64, ptr %9, align 8, !tbaa !8
  %72 = call noundef i64 @_Z4findxx(i64 noundef %71, i64 noundef 1)
  %73 = getelementptr inbounds [200000 x i64], ptr getelementptr inbounds ([2 x [200000 x i64]], ptr @sz, i64 0, i64 1), i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !8
  %75 = add nsw i64 %70, %74
  %76 = sub nsw i64 %75, 2
  %77 = load i64, ptr %9, align 8, !tbaa !8
  %78 = call noundef i64 @_Z4findxx(i64 noundef %77, i64 noundef 0)
  %79 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = sub nsw i64 %80, 1
  %82 = load i64, ptr %9, align 8, !tbaa !8
  %83 = call noundef i64 @_Z4findxx(i64 noundef %82, i64 noundef 1)
  %84 = getelementptr inbounds [200000 x i64], ptr getelementptr inbounds ([2 x [200000 x i64]], ptr @sz, i64 0, i64 1), i64 0, i64 %83
  %85 = load i64, ptr %84, align 8, !tbaa !8
  %86 = sub nsw i64 %85, 1
  %87 = mul nsw i64 %81, %86
  %88 = add nsw i64 %76, %87
  %89 = load i64, ptr %8, align 8, !tbaa !8
  %90 = add nsw i64 %89, %88
  store i64 %90, ptr %8, align 8, !tbaa !8
  br label %91

91:                                               ; preds = %66
  %92 = load i64, ptr %9, align 8, !tbaa !8
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %9, align 8, !tbaa !8
  br label %61, !llvm.loop !16

94:                                               ; preds = %65
  %95 = load i64, ptr %8, align 8, !tbaa !8
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %95)
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %96, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %98 = load i32, ptr %1, align 4
  ret i32 %98
}

; 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 zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #3

; 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)) #0 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) #2

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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 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 #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 = { "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 = !{!12, !12, i64 0}
!12 = !{!"int", !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" }

@N = external dso_local global i64, align 8
@par = external dso_local global [2 x [200000 x i64]], align 16
@sz = external dso_local global [2 x [200000 x i64]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z4findxx(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2unxxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
.preheader20:
  %0 = alloca i32, align 4
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = 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)
  %11 = load i64, ptr @N, align 8, !tbaa !8
  %12 = getelementptr inbounds i64, ptr @sz, i64 %11
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #6
  store i32 1, ptr %0, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull @sz, ptr noundef nonnull %12, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %13 = load i64, ptr @N, align 8, !tbaa !8
  %14 = getelementptr inbounds i64, ptr @par, i64 %13
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef nonnull @par, ptr noundef nonnull %14, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #6
  %15 = load i64, ptr @N, align 8, !tbaa !8
  %16 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @sz, i64 1600000), i64 %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #6
  store i32 1, ptr %0, align 4, !tbaa !11
  call void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @sz, i64 1600000), ptr noundef nonnull %16, ptr noundef nonnull align 4 dereferenceable(4) %0)
  %17 = load i64, ptr @N, align 8, !tbaa !8
  %18 = getelementptr inbounds i64, ptr getelementptr inbounds (i8, ptr @par, i64 1600000), i64 %17
  call void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @par, i64 1600000), ptr noundef nonnull %18, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #6
  %19 = load i64, ptr @N, align 8, !tbaa !8
  %20 = icmp sgt i64 %19, 1
  br i1 %20, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %.lr.ph, %.preheader20
  %21 = phi i64 [ %19, %.preheader20 ], [ %32, %.lr.ph ]
  %22 = icmp sgt i64 %21, 0
  br i1 %22, label %.lr.ph25, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader20, %.lr.ph
  %.01822 = phi i64 [ %31, %.lr.ph ], [ 0, %.preheader20 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %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) %1)
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %26 = load i64, ptr %1, align 8, !tbaa !8
  %27 = add nsw i64 %26, -1
  %28 = load i64, ptr %2, align 8, !tbaa !8
  %29 = add nsw i64 %28, -1
  %30 = load i64, ptr %3, align 8, !tbaa !8
  call void @_Z2unxxx(i64 noundef %27, i64 noundef %29, i64 noundef %30)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %31 = add nuw nsw i64 %.01822, 1
  %32 = load i64, ptr @N, align 8, !tbaa !8
  %33 = add nsw i64 %32, -1
  %34 = icmp slt i64 %31, %33
  br i1 %34, label %.lr.ph, label %.preheader, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph25, %.preheader
  %.017.lcssa = phi i64 [ 0, %.preheader ], [ %55, %.lr.ph25 ]
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.017.lcssa)
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %35, i8 noundef signext 10)
  ret i32 0

.lr.ph25:                                         ; preds = %.preheader, %.lr.ph25
  %.024 = phi i64 [ %56, %.lr.ph25 ], [ 0, %.preheader ]
  %.01723 = phi i64 [ %55, %.lr.ph25 ], [ 0, %.preheader ]
  %37 = call noundef i64 @_Z4findxx(i64 noundef %.024, i64 noundef 0)
  %38 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %37
  %39 = load i64, ptr %38, align 8, !tbaa !8
  %40 = call noundef i64 @_Z4findxx(i64 noundef %.024, i64 noundef 1)
  %41 = getelementptr inbounds [200000 x i64], ptr getelementptr inbounds (i8, ptr @sz, i64 1600000), i64 0, i64 %40
  %42 = load i64, ptr %41, align 8, !tbaa !8
  %43 = call noundef i64 @_Z4findxx(i64 noundef %.024, i64 noundef 0)
  %44 = getelementptr inbounds [200000 x i64], ptr @sz, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !8
  %46 = add nsw i64 %45, -1
  %47 = call noundef i64 @_Z4findxx(i64 noundef %.024, i64 noundef 1)
  %48 = getelementptr inbounds [200000 x i64], ptr getelementptr inbounds (i8, ptr @sz, i64 1600000), i64 0, i64 %47
  %49 = load i64, ptr %48, align 8, !tbaa !8
  %50 = add nsw i64 %49, -1
  %51 = mul nsw i64 %50, %46
  %52 = add i64 %.01723, -2
  %53 = add i64 %52, %39
  %54 = add i64 %53, %42
  %55 = add i64 %54, %51
  %56 = add nuw nsw i64 %.024, 1
  %57 = load i64, ptr @N, align 8, !tbaa !8
  %58 = icmp slt i64 %56, %57
  br i1 %58, label %.lr.ph25, label %._crit_edge, !llvm.loop !15
}

; 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 zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #3

; 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 #0 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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPxiEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt4iotaIPxiEvT_S1_T0_(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; 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 noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) 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 #0 align 2

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 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 #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 = { "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 = !{!12, !12, i64 0}
!12 = !{!"int", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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