; LLVM IR from tangjz/acm-icpc :: loj (6703)

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

@inv = external dso_local global [131073 x i32], align 16
@_ZZ4mainE1f = external hidden global [131073 x i32], align 16
@_ZZ4mainE1g = external hidden global [131073 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7initNTTi(i32 noundef) #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1, ptr %3, align 4, !tbaa !5
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %37, %0
  %12 = load i32, ptr %4, align 4, !tbaa !5
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %40

16:                                               ; preds = %11
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds i32, ptr @_ZZ4mainE1g, i64 %18
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %19)
  %21 = load i32, ptr %4, align 4, !tbaa !5
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1g, i64 0, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = add nsw i32 %25, %21
  store i32 %26, ptr %24, align 4, !tbaa !5
  %27 = icmp sge i32 %26, 998244353
  br i1 %27, label %28, label %35

28:                                               ; preds = %16
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1g, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = sub nsw i32 %32, 998244353
  store i32 %33, ptr %31, align 4, !tbaa !5
  %34 = icmp ne i32 %33, 0
  br label %35

35:                                               ; preds = %28, %16
  %36 = phi i1 [ false, %16 ], [ %34, %28 ]
  br label %37

37:                                               ; preds = %35
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !5
  br label %11, !llvm.loop !9

40:                                               ; preds = %15
  br label %41

41:                                               ; preds = %46, %40
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %45, label %49

45:                                               ; preds = %41
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = shl i32 %47, 1
  store i32 %48, ptr %3, align 4, !tbaa !5
  br label %41, !llvm.loop !11

49:                                               ; preds = %41
  %50 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z7initNTTi(i32 noundef %50)
  store i32 0, ptr @_ZZ4mainE1f, align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds ([131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %75, %49
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = icmp sle i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %78

56:                                               ; preds = %51
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sub nsw i32 %57, 1
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [131073 x i32], ptr @inv, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sub nsw i32 998244353, %66
  %68 = sext i32 %67 to i64
  %69 = mul nsw i64 %62, %68
  %70 = srem i64 %69, 998244353
  %71 = trunc i64 %70 to i32
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %73
  store i32 %71, ptr %74, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %56
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %5, align 4, !tbaa !5
  br label %51, !llvm.loop !12

78:                                               ; preds = %55
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  call void @_Z7polyExpiPiS_(i32 noundef %80, ptr noundef @_ZZ4mainE1f, ptr noundef @_ZZ4mainE1f)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 2, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %107, %78
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %110

86:                                               ; preds = %81
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = load i32, ptr %6, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = mul nsw i64 %88, %90
  %92 = srem i64 %91, 998244353
  %93 = trunc i64 %92 to i32
  store i32 %93, ptr %7, align 4, !tbaa !5
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = load i32, ptr %7, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = mul nsw i64 %98, %100
  %102 = srem i64 %101, 998244353
  %103 = trunc i64 %102 to i32
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %105
  store i32 %103, ptr %106, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %86
  %108 = load i32, ptr %6, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %6, align 4, !tbaa !5
  br label %81, !llvm.loop !13

110:                                              ; preds = %85
  %111 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z5solveiiPi(i32 noundef 1, i32 noundef %111, ptr noundef @_ZZ4mainE1g)
  store i32 1, ptr @_ZZ4mainE1g, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 998244352, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %136, %110
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = load i32, ptr %2, align 4, !tbaa !5
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %139

117:                                              ; preds = %112
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = load i32, ptr %2, align 4, !tbaa !5
  %126 = load i32, ptr %9, align 4, !tbaa !5
  %127 = sub nsw i32 %125, %126
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1g, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = mul nsw i64 %124, %131
  %133 = add nsw i64 %119, %132
  %134 = srem i64 %133, 998244353
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %8, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %117
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %9, align 4, !tbaa !5
  br label %112, !llvm.loop !14

139:                                              ; preds = %116
  %140 = load i32, ptr %8, align 4, !tbaa !5
  %141 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %140)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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

declare i32 @printf(ptr noundef, ...) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { "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 }

!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}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

@inv = external dso_local local_unnamed_addr global [131073 x i32], align 16
@_ZZ4mainE1f = external hidden global [131073 x i32], align 16
@_ZZ4mainE1g = external hidden global [131073 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7initNTTi(i32 noundef) local_unnamed_addr #0

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

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  %2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %.not41 = icmp slt i32 %3, 1
  br i1 %.not41, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %0
  %.lcssa40 = phi i32 [ %3, %0 ], [ %11, %.lr.ph ]
  br label %13

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %4 = getelementptr inbounds i32, ptr @_ZZ4mainE1g, i64 %indvars.iv
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %6 = load i32, ptr %4, align 4, !tbaa !5
  %7 = trunc nuw nsw i64 %indvars.iv to i32
  %8 = add nsw i32 %6, %7
  %9 = icmp sgt i32 %8, 998244352
  %10 = add nsw i32 %8, -998244353
  %spec.select = select i1 %9, i32 %10, i32 %8
  store i32 %spec.select, ptr %4, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %.not.not = icmp slt i64 %indvars.iv, %12
  br i1 %.not.not, label %.lr.ph, label %.preheader, !llvm.loop !9

13:                                               ; preds = %13, %.preheader
  %.033 = phi i32 [ %14, %13 ], [ 1, %.preheader ]
  %.not37 = icmp sgt i32 %.033, %.lcssa40
  %14 = shl i32 %.033, 1
  br i1 %.not37, label %15, label %13, !llvm.loop !11

15:                                               ; preds = %13
  call void @_Z7initNTTi(i32 noundef %.033)
  store i32 0, ptr @_ZZ4mainE1f, align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ4mainE1f, i64 4), align 4, !tbaa !5
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %.not3843 = icmp slt i32 %16, 2
  %.pre = add i32 %16, 1
  br i1 %.not3843, label %._crit_edge, label %.lr.ph45.preheader

.lr.ph45.preheader:                               ; preds = %15
  %wide.trip.count = zext i32 %.pre to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %17 = icmp eq i32 %.pre, 3
  br i1 %17, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph45.preheader.new

.lr.ph45.preheader.new:                           ; preds = %.lr.ph45.preheader
  %18 = and i64 %wide.trip.count, 4294967294
  %19 = add nsw i64 %18, -4
  br label %.lr.ph45

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph45, %.lr.ph45.preheader
  %.unr = phi i64 [ 1, %.lr.ph45.preheader ], [ %43, %.lr.ph45 ]
  %indvars.iv61.unr = phi i64 [ 2, %.lr.ph45.preheader ], [ %indvars.iv.next62.1, %.lr.ph45 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph45.epil

.lr.ph45.epil:                                    ; preds = %._crit_edge.loopexit.unr-lcssa
  %20 = getelementptr inbounds [131073 x i32], ptr @inv, i64 0, i64 %indvars.iv61.unr
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = sub nsw i32 998244353, %21
  %23 = sext i32 %22 to i64
  %24 = mul nsw i64 %.unr, %23
  %25 = srem i64 %24, 998244353
  %26 = trunc nsw i64 %25 to i32
  %27 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %indvars.iv61.unr
  store i32 %26, ptr %27, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph45.epil, %._crit_edge.loopexit.unr-lcssa, %15
  call void @_Z7polyExpiPiS_(i32 noundef %.pre, ptr noundef nonnull @_ZZ4mainE1f, ptr noundef nonnull @_ZZ4mainE1f)
  %28 = icmp sgt i32 %.033, 2
  br i1 %28, label %.lr.ph50.preheader, label %._crit_edge51

.lr.ph50.preheader:                               ; preds = %._crit_edge
  %wide.trip.count67 = zext nneg i32 %.033 to i64
  br label %.lr.ph50

.lr.ph45:                                         ; preds = %.lr.ph45, %.lr.ph45.preheader.new
  %29 = phi i64 [ 1, %.lr.ph45.preheader.new ], [ %43, %.lr.ph45 ]
  %indvars.iv61 = phi i64 [ 2, %.lr.ph45.preheader.new ], [ %indvars.iv.next62.1, %.lr.ph45 ]
  %niter = phi i64 [ 0, %.lr.ph45.preheader.new ], [ %niter.next.1, %.lr.ph45 ]
  %30 = getelementptr inbounds [131073 x i32], ptr @inv, i64 0, i64 %indvars.iv61
  %31 = load i32, ptr %30, align 8, !tbaa !5
  %32 = sub nsw i32 998244353, %31
  %33 = sext i32 %32 to i64
  %34 = mul nsw i64 %29, %33
  %35 = srem i64 %34, 998244353
  %36 = trunc nsw i64 %35 to i32
  %37 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %indvars.iv61
  store i32 %36, ptr %37, align 8, !tbaa !5
  %indvars.iv.next62 = or disjoint i64 %indvars.iv61, 1
  %38 = getelementptr inbounds [131073 x i32], ptr @inv, i64 0, i64 %indvars.iv.next62
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sub nsw i32 998244353, %39
  %41 = sext i32 %40 to i64
  %42 = mul nsw i64 %35, %41
  %43 = srem i64 %42, 998244353
  %44 = trunc nsw i64 %43 to i32
  %45 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %indvars.iv.next62
  store i32 %44, ptr %45, align 4, !tbaa !5
  %indvars.iv.next62.1 = add nuw nsw i64 %indvars.iv61, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter, %19
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph45, !llvm.loop !12

._crit_edge51:                                    ; preds = %.lr.ph50, %._crit_edge
  %46 = load i32, ptr %1, align 4, !tbaa !5
  call void @_Z5solveiiPi(i32 noundef 1, i32 noundef %46, ptr noundef nonnull @_ZZ4mainE1g)
  store i32 1, ptr @_ZZ4mainE1g, align 16, !tbaa !5
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %.not3952 = icmp slt i32 %47, 0
  br i1 %.not3952, label %._crit_edge57, label %.lr.ph56.preheader

.lr.ph56.preheader:                               ; preds = %._crit_edge51
  %48 = zext nneg i32 %47 to i64
  %49 = add nuw i32 %47, 1
  %wide.trip.count72 = zext i32 %49 to i64
  %xtraiter77 = and i64 %wide.trip.count72, 1
  %50 = icmp eq i32 %47, 0
  br i1 %50, label %._crit_edge57.loopexit.unr-lcssa, label %.lr.ph56.preheader.new

.lr.ph56.preheader.new:                           ; preds = %.lr.ph56.preheader
  %unroll_iter80 = and i64 %wide.trip.count72, 4294967294
  br label %.lr.ph56

.lr.ph50:                                         ; preds = %.lr.ph50.preheader, %.lr.ph50
  %indvars.iv64 = phi i64 [ 2, %.lr.ph50.preheader ], [ %indvars.iv.next65, %.lr.ph50 ]
  %.02948 = phi i64 [ 1, %.lr.ph50.preheader ], [ %52, %.lr.ph50 ]
  %51 = mul nsw i64 %.02948, %indvars.iv64
  %52 = srem i64 %51, 998244353
  %53 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %indvars.iv64
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = mul nsw i64 %52, %55
  %57 = srem i64 %56, 998244353
  %58 = trunc nsw i64 %57 to i32
  store i32 %58, ptr %53, align 4, !tbaa !5
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %exitcond68.not = icmp eq i64 %indvars.iv.next65, %wide.trip.count67
  br i1 %exitcond68.not, label %._crit_edge51, label %.lr.ph50, !llvm.loop !13

._crit_edge57.loopexit.unr-lcssa:                 ; preds = %.lr.ph56, %.lr.ph56.preheader
  %.lcssa.ph = phi i64 [ poison, %.lr.ph56.preheader ], [ %90, %.lr.ph56 ]
  %indvars.iv69.unr = phi i64 [ 0, %.lr.ph56.preheader ], [ %indvars.iv.next70.1, %.lr.ph56 ]
  %.02853.unr = phi i64 [ 998244352, %.lr.ph56.preheader ], [ %90, %.lr.ph56 ]
  %lcmp.mod78.not = icmp eq i64 %xtraiter77, 0
  br i1 %lcmp.mod78.not, label %._crit_edge57.loopexit, label %.lr.ph56.epil

.lr.ph56.epil:                                    ; preds = %._crit_edge57.loopexit.unr-lcssa
  %59 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %indvars.iv69.unr
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = sub nsw i64 %48, %indvars.iv69.unr
  %63 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1g, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = mul nsw i64 %65, %61
  %67 = add nsw i64 %66, %.02853.unr
  %68 = srem i64 %67, 998244353
  br label %._crit_edge57.loopexit

._crit_edge57.loopexit:                           ; preds = %._crit_edge57.loopexit.unr-lcssa, %.lr.ph56.epil
  %.lcssa = phi i64 [ %.lcssa.ph, %._crit_edge57.loopexit.unr-lcssa ], [ %68, %.lr.ph56.epil ]
  %69 = trunc nsw i64 %.lcssa to i32
  br label %._crit_edge57

._crit_edge57:                                    ; preds = %._crit_edge57.loopexit, %._crit_edge51
  %.028.lcssa = phi i32 [ 998244352, %._crit_edge51 ], [ %69, %._crit_edge57.loopexit ]
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.028.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

.lr.ph56:                                         ; preds = %.lr.ph56, %.lr.ph56.preheader.new
  %indvars.iv69 = phi i64 [ 0, %.lr.ph56.preheader.new ], [ %indvars.iv.next70.1, %.lr.ph56 ]
  %.02853 = phi i64 [ 998244352, %.lr.ph56.preheader.new ], [ %90, %.lr.ph56 ]
  %niter81 = phi i64 [ 0, %.lr.ph56.preheader.new ], [ %niter81.next.1, %.lr.ph56 ]
  %71 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %indvars.iv69
  %72 = load i32, ptr %71, align 8, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = sub nsw i64 %48, %indvars.iv69
  %75 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1g, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = mul nsw i64 %77, %73
  %79 = add nsw i64 %78, %.02853
  %80 = srem i64 %79, 998244353
  %indvars.iv.next70 = or disjoint i64 %indvars.iv69, 1
  %81 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1f, i64 0, i64 %indvars.iv.next70
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = sub nsw i64 %48, %indvars.iv.next70
  %85 = getelementptr inbounds [131073 x i32], ptr @_ZZ4mainE1g, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = mul nsw i64 %87, %83
  %89 = add nsw i64 %88, %80
  %90 = srem i64 %89, 998244353
  %indvars.iv.next70.1 = add nuw nsw i64 %indvars.iv69, 2
  %niter81.next.1 = add i64 %niter81, 2
  %niter81.ncmp.1 = icmp eq i64 %niter81.next.1, %unroll_iter80
  br i1 %niter81.ncmp.1, label %._crit_edge57.loopexit.unr-lcssa, label %.lr.ph56, !llvm.loop !14
}

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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 #5 = { 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}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}


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