; LLVM IR from tangjz/acm-icpc :: codeforces/complete/1552F.ll (Z5solvev)

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

@_ZZ5solvevE1L = external hidden global [200009 x i32], align 16
@_ZZ5solvevE1R = external hidden global [200009 x i32], align 16
@_ZZ5solvevE1s = external hidden global [200009 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE2dp = external hidden global [200009 x i32], align 16
@_ZZ5solvevE3sum = external hidden global [200009 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %1)
  store i32 0, ptr @_ZZ5solvevE3sum, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %7

7:                                                ; preds = %110, %0
  %8 = load i32, ptr %2, align 4, !tbaa !5
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = icmp sle i32 %8, %9
  br i1 %10, label %12, label %11

11:                                               ; preds = %7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %113

12:                                               ; preds = %7
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds i32, ptr @_ZZ5solvevE1R, i64 %14
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i32, ptr @_ZZ5solvevE1L, i64 %17
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds i32, ptr @_ZZ5solvevE1s, i64 %20
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %15, ptr noundef %18, ptr noundef %21)
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1R, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1L, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sub nsw i32 %26, %30
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %33
  store i32 %31, ptr %34, align 4, !tbaa !5
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = icmp sgt i32 %35, 1
  br i1 %36, label %37, label %95

37:                                               ; preds = %12
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1L, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sub nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1R, i64 0, i64 %44
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp slt i32 %41, %46
  br i1 %47, label %48, label %95

48:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds i32, ptr @_ZZ5solvevE1R, i64 %50
  %52 = getelementptr inbounds i32, ptr %51, i64 1
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1L, i64 0, i64 %54
  %56 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef getelementptr inbounds (i32, ptr @_ZZ5solvevE1R, i64 1), ptr noundef %52, ptr noundef nonnull align 4 dereferenceable(4) %55)
  %57 = ptrtoint ptr %56 to i64
  %58 = sub i64 %57, ptrtoint (ptr @_ZZ5solvevE1R to i64)
  %59 = sdiv exact i64 %58, 4
  %60 = trunc i64 %59 to i32
  store i32 %60, ptr %3, align 4, !tbaa !5
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = add nsw i32 %64, %69
  %71 = load i32, ptr %3, align 4, !tbaa !5
  %72 = sub nsw i32 %71, 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = sub nsw i32 %70, %75
  %77 = srem i32 %76, 998244353
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %79
  store i32 %77, ptr %80, align 4, !tbaa !5
  %81 = load i32, ptr %2, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = icmp slt i32 %84, 0
  br i1 %85, label %86, label %93

86:                                               ; preds = %48
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %90, 998244353
  store i32 %91, ptr %89, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  br label %93

93:                                               ; preds = %86, %48
  %94 = phi i1 [ false, %48 ], [ %92, %86 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %95

95:                                               ; preds = %93, %37, %12
  %96 = load i32, ptr %2, align 4, !tbaa !5
  %97 = sub nsw i32 %96, 1
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = load i32, ptr %2, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = add nsw i32 %100, %104
  %106 = srem i32 %105, 998244353
  %107 = load i32, ptr %2, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %108
  store i32 %106, ptr %109, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %95
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %2, align 4, !tbaa !5
  br label %7, !llvm.loop !9

113:                                              ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %114 = load i32, ptr %1, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1R, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = add nsw i32 %117, 1
  %119 = srem i32 %118, 998244353
  store i32 %119, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %141, %113
  %121 = load i32, ptr %5, align 4, !tbaa !5
  %122 = load i32, ptr %1, align 4, !tbaa !5
  %123 = icmp sle i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %144

125:                                              ; preds = %120
  %126 = load i32, ptr %5, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  %130 = icmp eq i32 %129, 1
  br i1 %130, label %131, label %140

131:                                              ; preds = %125
  %132 = load i32, ptr %5, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = load i32, ptr %4, align 4, !tbaa !5
  %137 = add nsw i32 %136, %135
  store i32 %137, ptr %4, align 4, !tbaa !5
  %138 = load i32, ptr %4, align 4, !tbaa !5
  %139 = srem i32 %138, 998244353
  store i32 %139, ptr %4, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %131, %125
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %5, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %5, align 4, !tbaa !5
  br label %120, !llvm.loop !11

144:                                              ; preds = %124
  %145 = load i32, ptr %4, align 4, !tbaa !5
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %145)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

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

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

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

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

declare i32 @printf(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


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

@_ZZ5solvevE1L = external hidden global [200009 x i32], align 16
@_ZZ5solvevE1R = external hidden global [200009 x i32], align 16
@_ZZ5solvevE1s = external hidden global [200009 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ5solvevE2dp = external hidden local_unnamed_addr global [200009 x i32], align 16
@_ZZ5solvevE3sum = external hidden local_unnamed_addr global [200009 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  store i32 0, ptr @_ZZ5solvevE3sum, align 16, !tbaa !5
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %.not34 = icmp slt i32 %3, 1
  br i1 %.not34, label %._crit_edge.thread, label %9

._crit_edge.thread:                               ; preds = %0
  %4 = sext i32 %3 to i64
  %5 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1R, i64 0, i64 %4
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = add nsw i32 %6, 1
  %8 = srem i32 %7, 998244353
  br label %._crit_edge41

9:                                                ; preds = %0
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE1R, i64 4), ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE1L, i64 4), ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE1s, i64 4))
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1R, i64 4), align 4, !tbaa !5
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE1L, i64 4), align 4, !tbaa !5
  %13 = sub nsw i32 %11, %12
  store i32 %13, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE2dp, i64 4), align 4, !tbaa !5
  %14 = load i32, ptr @_ZZ5solvevE3sum, align 16, !tbaa !5
  %15 = add nsw i32 %13, %14
  %16 = srem i32 %15, 998244353
  store i32 %16, ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3sum, i64 4), align 4, !tbaa !5
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %.not.not.peel = icmp sgt i32 %17, 1
  br i1 %.not.not.peel, label %.lr.ph.peel.next, label %._crit_edge

._crit_edge:                                      ; preds = %54, %9
  %.lcssa = phi i32 [ %17, %9 ], [ %60, %54 ]
  %18 = sext i32 %.lcssa to i64
  %19 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1R, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  %22 = srem i32 %21, 998244353
  %.not3336 = icmp slt i32 %.lcssa, 1
  br i1 %.not3336, label %._crit_edge41, label %.lr.ph40.preheader

.lr.ph40.preheader:                               ; preds = %._crit_edge
  %23 = zext nneg i32 %.lcssa to i64
  %xtraiter = and i64 %23, 1
  %24 = icmp eq i32 %.lcssa, 1
  br i1 %24, label %._crit_edge41.loopexit.unr-lcssa, label %.lr.ph40.preheader.new

.lr.ph40.preheader.new:                           ; preds = %.lr.ph40.preheader
  %unroll_iter = and i64 %23, 2147483646
  br label %.lr.ph40

.lr.ph.peel.next:                                 ; preds = %9, %54
  %indvars.iv = phi i64 [ %indvars.iv.next, %54 ], [ 2, %9 ]
  %25 = getelementptr inbounds i32, ptr @_ZZ5solvevE1R, i64 %indvars.iv
  %26 = getelementptr inbounds i32, ptr @_ZZ5solvevE1L, i64 %indvars.iv
  %27 = getelementptr inbounds i32, ptr @_ZZ5solvevE1s, i64 %indvars.iv
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27)
  %29 = load i32, ptr %25, align 4, !tbaa !5
  %30 = load i32, ptr %26, align 4, !tbaa !5
  %31 = sub nsw i32 %29, %30
  %32 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %indvars.iv
  store i32 %31, ptr %32, align 4, !tbaa !5
  %33 = add nsw i64 %indvars.iv, -1
  %34 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1R, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = icmp slt i32 %30, %35
  br i1 %36, label %37, label %._crit_edge50

._crit_edge50:                                    ; preds = %.lr.ph.peel.next
  %.phi.trans.insert = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %33
  %.pre51 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %54

37:                                               ; preds = %.lr.ph.peel.next
  %38 = getelementptr inbounds i8, ptr %25, i64 4
  %39 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull getelementptr inbounds (i8, ptr @_ZZ5solvevE1R, i64 4), ptr noundef nonnull %38, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %40 = ptrtoint ptr %39 to i64
  %41 = sub i64 %40, ptrtoint (ptr @_ZZ5solvevE1R to i64)
  %42 = load i32, ptr %32, align 4, !tbaa !5
  %43 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %33
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, %42
  %46 = shl i64 %41, 30
  %sext = add i64 %46, -4294967296
  %47 = ashr i64 %sext, 32
  %48 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sub i32 %45, %49
  %51 = srem i32 %50, 998244353
  %52 = icmp slt i32 %51, 0
  %53 = add nsw i32 %51, 998244353
  %spec.select = select i1 %52, i32 %53, i32 %51
  store i32 %spec.select, ptr %32, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %._crit_edge50, %37
  %55 = phi i32 [ %44, %37 ], [ %.pre51, %._crit_edge50 ]
  %56 = phi i32 [ %spec.select, %37 ], [ %31, %._crit_edge50 ]
  %57 = add nsw i32 %56, %55
  %58 = srem i32 %57, 998244353
  %59 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE3sum, i64 0, i64 %indvars.iv
  store i32 %58, ptr %59, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %60 = load i32, ptr %1, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %.not.not = icmp slt i64 %indvars.iv, %61
  br i1 %.not.not, label %.lr.ph.peel.next, label %._crit_edge, !llvm.loop !9

._crit_edge41.loopexit.unr-lcssa:                 ; preds = %87, %.lr.ph40.preheader
  %.1.lcssa.ph = phi i32 [ poison, %.lr.ph40.preheader ], [ %.1.1, %87 ]
  %indvars.iv46.unr = phi i64 [ 1, %.lr.ph40.preheader ], [ %indvars.iv.next47.1, %87 ]
  %.02937.unr = phi i32 [ %22, %.lr.ph40.preheader ], [ %.1.1, %87 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge41, label %.lr.ph40.epil

.lr.ph40.epil:                                    ; preds = %._crit_edge41.loopexit.unr-lcssa
  %62 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %indvars.iv46.unr
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %65, label %._crit_edge41

65:                                               ; preds = %.lr.ph40.epil
  %66 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %indvars.iv46.unr
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %67, %.02937.unr
  %69 = srem i32 %68, 998244353
  br label %._crit_edge41

._crit_edge41:                                    ; preds = %._crit_edge41.loopexit.unr-lcssa, %65, %.lr.ph40.epil, %._crit_edge.thread, %._crit_edge
  %.029.lcssa = phi i32 [ %22, %._crit_edge ], [ %8, %._crit_edge.thread ], [ %.1.lcssa.ph, %._crit_edge41.loopexit.unr-lcssa ], [ %69, %65 ], [ %.02937.unr, %.lr.ph40.epil ]
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.029.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void

.lr.ph40:                                         ; preds = %87, %.lr.ph40.preheader.new
  %indvars.iv46 = phi i64 [ 1, %.lr.ph40.preheader.new ], [ %indvars.iv.next47.1, %87 ]
  %.02937 = phi i32 [ %22, %.lr.ph40.preheader.new ], [ %.1.1, %87 ]
  %niter = phi i64 [ 0, %.lr.ph40.preheader.new ], [ %niter.next.1, %87 ]
  %71 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %indvars.iv46
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp eq i32 %72, 1
  br i1 %73, label %74, label %.lr.ph40.1

74:                                               ; preds = %.lr.ph40
  %75 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %indvars.iv46
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = add nsw i32 %76, %.02937
  %78 = srem i32 %77, 998244353
  br label %.lr.ph40.1

.lr.ph40.1:                                       ; preds = %.lr.ph40, %74
  %.1 = phi i32 [ %78, %74 ], [ %.02937, %.lr.ph40 ]
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %79 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE1s, i64 0, i64 %indvars.iv.next47
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = icmp eq i32 %80, 1
  br i1 %81, label %82, label %87

82:                                               ; preds = %.lr.ph40.1
  %83 = getelementptr inbounds [200009 x i32], ptr @_ZZ5solvevE2dp, i64 0, i64 %indvars.iv.next47
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = add nsw i32 %84, %.1
  %86 = srem i32 %85, 998244353
  br label %87

87:                                               ; preds = %82, %.lr.ph40.1
  %.1.1 = phi i32 [ %86, %82 ], [ %.1, %.lr.ph40.1 ]
  %indvars.iv.next47.1 = add nuw nsw i64 %indvars.iv46, 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_edge41.loopexit.unr-lcssa, label %.lr.ph40, !llvm.loop !12
}

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}
!12 = distinct !{!12, !10}


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