; LLVM IR from eyangch/competitive-programming :: Codeforces/1726/d.ll (Z6sanityv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::pair" = type { i64, i64 }

@N = external dso_local global i64, align 8
@M = external dso_local global i64, align 8
@E = external dso_local global [200005 x %"struct.std::pair"], align 16
@ans = external dso_local global [200005 x i64], align 16
@altv = external dso_local global [200005 x i8], align 16
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__._Z6sanityv = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6sanityv() #1 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #5
  %8 = load i64, ptr @M, align 8, !tbaa !5
  %9 = getelementptr inbounds i64, ptr @ans, i64 %8
  %10 = call noundef i32 @_ZSt10accumulateIPxiET0_T_S2_S1_(ptr noundef @ans, ptr noundef %9, i32 noundef 0)
  %11 = sext i32 %10 to i64
  store i64 %11, ptr %1, align 8, !tbaa !5
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = load i64, ptr @N, align 8, !tbaa !5
  %14 = sub nsw i64 %13, 1
  %15 = icmp eq i64 %12, %14
  br i1 %15, label %16, label %17

16:                                               ; preds = %0
  br label %19

17:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.2, i32 noundef 28, ptr noundef @__PRETTY_FUNCTION__._Z6sanityv) #6
  unreachable

18:                                               ; No predecessors!
  br label %19

19:                                               ; preds = %18, %16
  %20 = load i64, ptr @N, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr @altv, i64 %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !9
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef @altv, ptr noundef %21, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %22

22:                                               ; preds = %44, %19
  %23 = load i64, ptr %3, align 8, !tbaa !5
  %24 = load i64, ptr @M, align 8, !tbaa !5
  %25 = icmp slt i64 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %47

27:                                               ; preds = %22
  %28 = load i64, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = icmp ne i64 %30, 0
  br i1 %31, label %43, label %32

32:                                               ; preds = %27
  %33 = load i64, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %33
  %35 = getelementptr inbounds %"struct.std::pair", ptr %34, i32 0, i32 1
  %36 = load i64, ptr %35, align 8, !tbaa !11
  %37 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %36
  store i8 1, ptr %37, align 1, !tbaa !13
  %38 = load i64, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %38
  %40 = getelementptr inbounds %"struct.std::pair", ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 16, !tbaa !15
  %42 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %41
  store i8 1, ptr %42, align 1, !tbaa !13
  br label %43

43:                                               ; preds = %32, %27
  br label %44

44:                                               ; preds = %43
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %3, align 8, !tbaa !5
  br label %22, !llvm.loop !16

47:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %48 = load i64, ptr @N, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr @altv, i64 %48
  %50 = call noundef i32 @_ZSt10accumulateIPbiET0_T_S2_S1_(ptr noundef @altv, ptr noundef %49, i32 noundef 0)
  %51 = sext i32 %50 to i64
  store i64 %51, ptr %4, align 8, !tbaa !5
  %52 = load i64, ptr @M, align 8, !tbaa !5
  %53 = load i64, ptr @N, align 8, !tbaa !5
  %54 = icmp sge i64 %52, %53
  br i1 %54, label %55, label %66

55:                                               ; preds = %47
  %56 = load i64, ptr %4, align 8, !tbaa !5
  %57 = load i64, ptr @M, align 8, !tbaa !5
  %58 = load i64, ptr @N, align 8, !tbaa !5
  %59 = sub nsw i64 %57, %58
  %60 = add nsw i64 %59, 1
  %61 = icmp sgt i64 %56, %60
  br i1 %61, label %62, label %63

62:                                               ; preds = %55
  br label %65

63:                                               ; preds = %55
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 36, ptr noundef @__PRETTY_FUNCTION__._Z6sanityv) #6
  unreachable

64:                                               ; No predecessors!
  br label %65

65:                                               ; preds = %64, %62
  br label %66

66:                                               ; preds = %65, %47
  %67 = load i64, ptr @N, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr @altv, i64 %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef @altv, ptr noundef %68, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %91, %66
  %70 = load i64, ptr %6, align 8, !tbaa !5
  %71 = load i64, ptr @M, align 8, !tbaa !5
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %74, label %73

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

74:                                               ; preds = %69
  %75 = load i64, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %75
  %77 = load i64, ptr %76, align 8, !tbaa !5
  %78 = icmp ne i64 %77, 0
  br i1 %78, label %79, label %90

79:                                               ; preds = %74
  %80 = load i64, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %80
  %82 = getelementptr inbounds %"struct.std::pair", ptr %81, i32 0, i32 1
  %83 = load i64, ptr %82, align 8, !tbaa !11
  %84 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %83
  store i8 1, ptr %84, align 1, !tbaa !13
  %85 = load i64, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %85
  %87 = getelementptr inbounds %"struct.std::pair", ptr %86, i32 0, i32 0
  %88 = load i64, ptr %87, align 16, !tbaa !15
  %89 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %88
  store i8 1, ptr %89, align 1, !tbaa !13
  br label %90

90:                                               ; preds = %79, %74
  br label %91

91:                                               ; preds = %90
  %92 = load i64, ptr %6, align 8, !tbaa !5
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %6, align 8, !tbaa !5
  br label %69, !llvm.loop !18

94:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %95 = load i64, ptr @N, align 8, !tbaa !5
  %96 = getelementptr inbounds i8, ptr @altv, i64 %95
  %97 = call noundef i32 @_ZSt10accumulateIPbiET0_T_S2_S1_(ptr noundef @altv, ptr noundef %96, i32 noundef 0)
  %98 = sext i32 %97 to i64
  store i64 %98, ptr %7, align 8, !tbaa !5
  %99 = load i64, ptr %7, align 8, !tbaa !5
  %100 = load i64, ptr @N, align 8, !tbaa !5
  %101 = icmp eq i64 %99, %100
  br i1 %101, label %102, label %103

102:                                              ; preds = %94
  br label %105

103:                                              ; preds = %94
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.2, i32 noundef 45, ptr noundef @__PRETTY_FUNCTION__._Z6sanityv) #6
  unreachable

104:                                              ; No predecessors!
  br label %105

105:                                              ; preds = %104, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  ret void
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!12, !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


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

%"struct.std::pair" = type { i64, i64 }

@N = external dso_local local_unnamed_addr global i64, align 8
@M = external dso_local local_unnamed_addr global i64, align 8
@E = external dso_local local_unnamed_addr global [200005 x %"struct.std::pair"], align 16
@ans = external dso_local global [200005 x i64], align 16
@altv = external dso_local global [200005 x i8], align 16
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [87 x i8], align 1
@__PRETTY_FUNCTION__._Z6sanityv = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6sanityv() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = load i64, ptr @M, align 8, !tbaa !5
  %4 = getelementptr inbounds i64, ptr @ans, i64 %3
  %5 = tail call noundef i32 @_ZSt10accumulateIPxiET0_T_S2_S1_(ptr noundef nonnull @ans, ptr noundef nonnull %4, i32 noundef 0)
  %6 = sext i32 %5 to i64
  %7 = load i64, ptr @N, align 8, !tbaa !5
  %8 = add nsw i64 %7, -1
  %9 = icmp eq i64 %8, %6
  br i1 %9, label %11, label %10

10:                                               ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, i32 noundef 28, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6sanityv) #5
  unreachable

11:                                               ; preds = %0
  %12 = getelementptr inbounds i8, ptr @altv, i64 %7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !9
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef nonnull @altv, ptr noundef nonnull %12, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %13 = load i64, ptr @M, align 8, !tbaa !5
  %14 = icmp sgt i64 %13, 0
  br i1 %14, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %11
  %xtraiter = and i64 %13, 1
  %15 = icmp eq i64 %13, 1
  br i1 %15, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %13, 9223372036854775806
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %49, %.lr.ph.preheader
  %.018.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %50, %49 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %16 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %.018.unr
  %17 = load i64, ptr %16, align 8, !tbaa !5
  %.not17.epil = icmp eq i64 %17, 0
  br i1 %.not17.epil, label %18, label %._crit_edge

18:                                               ; preds = %.lr.ph.epil
  %19 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %.018.unr
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %21
  store i8 1, ptr %22, align 1, !tbaa !13
  %23 = load i64, ptr %19, align 16, !tbaa !15
  %24 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %23
  store i8 1, ptr %24, align 1, !tbaa !13
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %18, %.lr.ph.epil, %11
  %25 = load i64, ptr @N, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr @altv, i64 %25
  %27 = call noundef i32 @_ZSt10accumulateIPbiET0_T_S2_S1_(ptr noundef nonnull @altv, ptr noundef nonnull %26, i32 noundef 0)
  %28 = load i64, ptr @M, align 8, !tbaa !5
  %29 = load i64, ptr @N, align 8, !tbaa !5
  %.not = icmp slt i64 %28, %29
  br i1 %.not, label %57, label %51

.lr.ph:                                           ; preds = %49, %.lr.ph.preheader.new
  %.018 = phi i64 [ 0, %.lr.ph.preheader.new ], [ %50, %49 ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %49 ]
  %30 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %.018
  %31 = load i64, ptr %30, align 16, !tbaa !5
  %.not17 = icmp eq i64 %31, 0
  br i1 %.not17, label %32, label %.lr.ph.1

32:                                               ; preds = %.lr.ph
  %33 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %.018
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  %35 = load i64, ptr %34, align 8, !tbaa !11
  %36 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %35
  store i8 1, ptr %36, align 1, !tbaa !13
  %37 = load i64, ptr %33, align 16, !tbaa !15
  %38 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %37
  store i8 1, ptr %38, align 1, !tbaa !13
  br label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.lr.ph, %32
  %39 = or disjoint i64 %.018, 1
  %40 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %39
  %41 = load i64, ptr %40, align 8, !tbaa !5
  %.not17.1 = icmp eq i64 %41, 0
  br i1 %.not17.1, label %42, label %49

42:                                               ; preds = %.lr.ph.1
  %43 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %39
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %45
  store i8 1, ptr %46, align 1, !tbaa !13
  %47 = load i64, ptr %43, align 16, !tbaa !15
  %48 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %47
  store i8 1, ptr %48, align 1, !tbaa !13
  br label %49

49:                                               ; preds = %42, %.lr.ph.1
  %50 = add nuw nsw i64 %.018, 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 %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !16

51:                                               ; preds = %._crit_edge
  %52 = sext i32 %27 to i64
  %53 = add i64 %28, 1
  %54 = sub i64 %53, %29
  %55 = icmp slt i64 %54, %52
  br i1 %55, label %57, label %56

56:                                               ; preds = %51
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2, i32 noundef 36, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6sanityv) #5
  unreachable

57:                                               ; preds = %51, %._crit_edge
  %58 = getelementptr inbounds i8, ptr @altv, i64 %29
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !9
  call void @_ZSt4fillIPbiEvT_S1_RKT0_(ptr noundef nonnull @altv, ptr noundef nonnull %58, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %59 = load i64, ptr @M, align 8, !tbaa !5
  %60 = icmp sgt i64 %59, 0
  br i1 %60, label %.lr.ph21.preheader, label %._crit_edge22

.lr.ph21.preheader:                               ; preds = %57
  %xtraiter24 = and i64 %59, 1
  %61 = icmp eq i64 %59, 1
  br i1 %61, label %._crit_edge22.loopexit.unr-lcssa, label %.lr.ph21.preheader.new

.lr.ph21.preheader.new:                           ; preds = %.lr.ph21.preheader
  %unroll_iter26 = and i64 %59, 9223372036854775806
  br label %.lr.ph21

._crit_edge22.loopexit.unr-lcssa:                 ; preds = %96, %.lr.ph21.preheader
  %.01319.unr = phi i64 [ 0, %.lr.ph21.preheader ], [ %97, %96 ]
  %lcmp.mod25.not = icmp eq i64 %xtraiter24, 0
  br i1 %lcmp.mod25.not, label %._crit_edge22, label %.lr.ph21.epil

.lr.ph21.epil:                                    ; preds = %._crit_edge22.loopexit.unr-lcssa
  %62 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %.01319.unr
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %.not16.epil = icmp eq i64 %63, 0
  br i1 %.not16.epil, label %._crit_edge22, label %64

64:                                               ; preds = %.lr.ph21.epil
  %65 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %.01319.unr
  %66 = getelementptr inbounds i8, ptr %65, i64 8
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %67
  store i8 1, ptr %68, align 1, !tbaa !13
  %69 = load i64, ptr %65, align 16, !tbaa !15
  %70 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %69
  store i8 1, ptr %70, align 1, !tbaa !13
  br label %._crit_edge22

._crit_edge22:                                    ; preds = %._crit_edge22.loopexit.unr-lcssa, %64, %.lr.ph21.epil, %57
  %71 = load i64, ptr @N, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr @altv, i64 %71
  %73 = call noundef i32 @_ZSt10accumulateIPbiET0_T_S2_S1_(ptr noundef nonnull @altv, ptr noundef nonnull %72, i32 noundef 0)
  %74 = sext i32 %73 to i64
  %75 = load i64, ptr @N, align 8, !tbaa !5
  %76 = icmp eq i64 %75, %74
  br i1 %76, label %99, label %98

.lr.ph21:                                         ; preds = %96, %.lr.ph21.preheader.new
  %.01319 = phi i64 [ 0, %.lr.ph21.preheader.new ], [ %97, %96 ]
  %niter27 = phi i64 [ 0, %.lr.ph21.preheader.new ], [ %niter27.next.1, %96 ]
  %77 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %.01319
  %78 = load i64, ptr %77, align 16, !tbaa !5
  %.not16 = icmp eq i64 %78, 0
  br i1 %.not16, label %.lr.ph21.1, label %79

79:                                               ; preds = %.lr.ph21
  %80 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %.01319
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %82
  store i8 1, ptr %83, align 1, !tbaa !13
  %84 = load i64, ptr %80, align 16, !tbaa !15
  %85 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %84
  store i8 1, ptr %85, align 1, !tbaa !13
  br label %.lr.ph21.1

.lr.ph21.1:                                       ; preds = %.lr.ph21, %79
  %86 = or disjoint i64 %.01319, 1
  %87 = getelementptr inbounds [200005 x i64], ptr @ans, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %.not16.1 = icmp eq i64 %88, 0
  br i1 %.not16.1, label %96, label %89

89:                                               ; preds = %.lr.ph21.1
  %90 = getelementptr inbounds [200005 x %"struct.std::pair"], ptr @E, i64 0, i64 %86
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  %92 = load i64, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %92
  store i8 1, ptr %93, align 1, !tbaa !13
  %94 = load i64, ptr %90, align 16, !tbaa !15
  %95 = getelementptr inbounds [200005 x i8], ptr @altv, i64 0, i64 %94
  store i8 1, ptr %95, align 1, !tbaa !13
  br label %96

96:                                               ; preds = %89, %.lr.ph21.1
  %97 = add nuw nsw i64 %.01319, 2
  %niter27.next.1 = add i64 %niter27, 2
  %niter27.ncmp.1 = icmp eq i64 %niter27.next.1, %unroll_iter26
  br i1 %niter27.ncmp.1, label %._crit_edge22.loopexit.unr-lcssa, label %.lr.ph21, !llvm.loop !18

98:                                               ; preds = %._crit_edge22
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.2, i32 noundef 45, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6sanityv) #5
  unreachable

99:                                               ; preds = %._crit_edge22
  ret void
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind }
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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!12, !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


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