; LLVM IR from ShahjalalShohag/code-library :: Math/q Binomial.ll (Z4precv)

; 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.modint = type { i32 }

@pw = external dso_local global [262144 x %struct.modint], align 16
@q_fac = external dso_local global [262144 x %struct.modint], align 16
@q_inv_fac = external dso_local global [262144 x %struct.modint], align 16
@q = external dso_local global i32, align 4

; 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 @_Z4precv() #1 {
  %1 = alloca %struct.modint, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.modint, align 4
  %4 = alloca %struct.modint, align 4
  %5 = alloca %struct.modint, align 4
  %6 = alloca %struct.modint, align 4
  %7 = alloca %struct.modint, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.modint, align 4
  %10 = alloca %struct.modint, align 4
  %11 = alloca %struct.modint, align 4
  %12 = alloca %struct.modint, align 4
  %13 = alloca %struct.modint, align 4
  %14 = alloca %struct.modint, align 4
  %15 = alloca %struct.modint, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %struct.modint, align 4
  %19 = alloca %struct.modint, align 4
  %20 = alloca %struct.modint, align 4
  %21 = alloca %struct.modint, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef 1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @pw, ptr align 4 %1, i64 4, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !6
  br label %22

22:                                               ; preds = %39, %0
  %23 = load i32, ptr %2, align 4, !tbaa !6
  %24 = icmp slt i32 %23, 262144
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %42

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %27 = load i32, ptr %2, align 4, !tbaa !6
  %28 = sub nsw i32 %27, 1
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %29
  %31 = load i32, ptr @q, align 4, !tbaa !6
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %31)
  %32 = getelementptr inbounds %struct.modint, ptr %4, i32 0, i32 0
  %33 = load i32, ptr %32, align 4
  %34 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %30, i32 %33)
  %35 = getelementptr inbounds %struct.modint, ptr %3, i32 0, i32 0
  store i32 %34, ptr %35, align 4
  %36 = load i32, ptr %2, align 4, !tbaa !6
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %37
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %3, i64 4, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %39

39:                                               ; preds = %26
  %40 = load i32, ptr %2, align 4, !tbaa !6
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %2, align 4, !tbaa !6
  br label %22, !llvm.loop !10

42:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @q_fac, ptr align 4 %5, i64 4, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %43 = load i32, ptr @q, align 4, !tbaa !6
  %44 = sub nsw i32 %43, 1
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef %44)
  %45 = call i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  %46 = getelementptr inbounds %struct.modint, ptr %6, i32 0, i32 0
  store i32 %45, ptr %46, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !6
  br label %47

47:                                               ; preds = %74, %42
  %48 = load i32, ptr %8, align 4, !tbaa !6
  %49 = icmp slt i32 %48, 262144
  br i1 %49, label %51, label %50

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

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %52 = load i32, ptr %8, align 4, !tbaa !6
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %53
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef 1)
  %55 = getelementptr inbounds %struct.modint, ptr %11, i32 0, i32 0
  %56 = load i32, ptr %55, align 4
  %57 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %54, i32 %56)
  %58 = getelementptr inbounds %struct.modint, ptr %10, i32 0, i32 0
  store i32 %57, ptr %58, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %6, i64 4, i1 false), !tbaa.struct !5
  %59 = getelementptr inbounds %struct.modint, ptr %12, i32 0, i32 0
  %60 = load i32, ptr %59, align 4
  %61 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 %60)
  %62 = getelementptr inbounds %struct.modint, ptr %9, i32 0, i32 0
  store i32 %61, ptr %62, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %63 = load i32, ptr %8, align 4, !tbaa !6
  %64 = sub nsw i32 %63, 1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [262144 x %struct.modint], ptr @q_fac, i64 0, i64 %65
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %9, i64 4, i1 false), !tbaa.struct !5
  %67 = getelementptr inbounds %struct.modint, ptr %14, i32 0, i32 0
  %68 = load i32, ptr %67, align 4
  %69 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %66, i32 %68)
  %70 = getelementptr inbounds %struct.modint, ptr %13, i32 0, i32 0
  store i32 %69, ptr %70, align 4
  %71 = load i32, ptr %8, align 4, !tbaa !6
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [262144 x %struct.modint], ptr @q_fac, i64 0, i64 %72
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %73, ptr align 4 %13, i64 4, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %74

74:                                               ; preds = %51
  %75 = load i32, ptr %8, align 4, !tbaa !6
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %8, align 4, !tbaa !6
  br label %47, !llvm.loop !12

77:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %78 = call i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds ([262144 x %struct.modint], ptr @q_fac, i64 0, i64 262143))
  %79 = getelementptr inbounds %struct.modint, ptr %15, i32 0, i32 0
  store i32 %78, ptr %79, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 getelementptr inbounds ([262144 x %struct.modint], ptr @q_inv_fac, i64 0, i64 262143), ptr align 4 %15, i64 4, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 262142, ptr %16, align 4, !tbaa !6
  br label %80

80:                                               ; preds = %108, %77
  %81 = load i32, ptr %16, align 4, !tbaa !6
  %82 = icmp sge i32 %81, 0
  br i1 %82, label %84, label %83

83:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %111

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %85 = load i32, ptr %16, align 4, !tbaa !6
  %86 = add nsw i32 %85, 1
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [262144 x %struct.modint], ptr @q_inv_fac, i64 0, i64 %87
  %89 = load i32, ptr %16, align 4, !tbaa !6
  %90 = add nsw i32 %89, 1
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %91
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef 1)
  %93 = getelementptr inbounds %struct.modint, ptr %20, i32 0, i32 0
  %94 = load i32, ptr %93, align 4
  %95 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %92, i32 %94)
  %96 = getelementptr inbounds %struct.modint, ptr %19, i32 0, i32 0
  store i32 %95, ptr %96, align 4
  %97 = getelementptr inbounds %struct.modint, ptr %19, i32 0, i32 0
  %98 = load i32, ptr %97, align 4
  %99 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %88, i32 %98)
  %100 = getelementptr inbounds %struct.modint, ptr %18, i32 0, i32 0
  store i32 %99, ptr %100, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %6, i64 4, i1 false), !tbaa.struct !5
  %101 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  %102 = load i32, ptr %101, align 4
  %103 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 %102)
  %104 = getelementptr inbounds %struct.modint, ptr %17, i32 0, i32 0
  store i32 %103, ptr %104, align 4
  %105 = load i32, ptr %16, align 4, !tbaa !6
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [262144 x %struct.modint], ptr @q_inv_fac, i64 0, i64 %106
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %107, ptr align 4 %17, i64 4, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %108

108:                                              ; preds = %84
  %109 = load i32, ptr %16, align 4, !tbaa !6
  %110 = add nsw i32 %109, -1
  store i32 %110, ptr %16, align 4, !tbaa !6
  br label %80, !llvm.loop !13

111:                                              ; preds = %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #4 align 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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 }

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


; 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.modint = type { i32 }

@pw = external dso_local global [262144 x %struct.modint], align 16
@q_fac = external dso_local global [262144 x %struct.modint], align 16
@q_inv_fac = external dso_local global [262144 x %struct.modint], align 16
@q = external dso_local local_unnamed_addr global i32, align 4

; 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 @_Z4precv() local_unnamed_addr #1 {
  %1 = alloca %struct.modint, align 4
  %2 = alloca %struct.modint, align 4
  %3 = alloca %struct.modint, align 4
  %4 = alloca %struct.modint, align 4
  %5 = alloca %struct.modint, align 4
  %6 = alloca %struct.modint, align 4
  %7 = alloca %struct.modint, align 4
  %8 = alloca %struct.modint, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %1, i32 noundef 1)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  store i32 %9, ptr @pw, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  br label %15

10:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef 1)
  %11 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %11, ptr @q_fac, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %12 = load i32, ptr @q, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef %13)
  %14 = call i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %24

15:                                               ; preds = %0, %15
  %indvars.iv = phi i64 [ 1, %0 ], [ %indvars.iv.next, %15 ]
  %16 = add nsw i64 %indvars.iv, -1
  %17 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %16
  %18 = load i32, ptr @q, align 4, !tbaa !5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %2, i32 noundef %18)
  %19 = load i32, ptr %2, align 4
  %20 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 %19)
  %21 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %indvars.iv
  store i32 %20, ptr %21, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 262144
  br i1 %exitcond.not, label %10, label %15, !llvm.loop !9

22:                                               ; preds = %24
  %23 = call i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @q_fac, i64 1048572))
  store i32 %23, ptr getelementptr inbounds (i8, ptr @q_inv_fac, i64 1048572), align 4, !tbaa !5
  br label %34

24:                                               ; preds = %10, %24
  %indvars.iv30 = phi i64 [ 1, %10 ], [ %indvars.iv.next31, %24 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %25 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %indvars.iv30
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef 1)
  %26 = load i32, ptr %6, align 4
  %27 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %25, i32 %26)
  store i32 %27, ptr %5, align 4
  %28 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 %14)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %29 = add nsw i64 %indvars.iv30, -1
  %30 = getelementptr inbounds [262144 x %struct.modint], ptr @q_fac, i64 0, i64 %29
  %31 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %30, i32 %28)
  %32 = getelementptr inbounds [262144 x %struct.modint], ptr @q_fac, i64 0, i64 %indvars.iv30
  store i32 %31, ptr %32, align 4, !tbaa !5
  %indvars.iv.next31 = add nuw nsw i64 %indvars.iv30, 1
  %exitcond33.not = icmp eq i64 %indvars.iv.next31, 262144
  br i1 %exitcond33.not, label %22, label %24, !llvm.loop !11

33:                                               ; preds = %34
  ret void

34:                                               ; preds = %22, %34
  %indvars.iv34 = phi i64 [ 262142, %22 ], [ %indvars.iv.next35, %34 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  %35 = add nuw nsw i64 %indvars.iv34, 1
  %36 = getelementptr inbounds [262144 x %struct.modint], ptr @q_inv_fac, i64 0, i64 %35
  %37 = getelementptr inbounds [262144 x %struct.modint], ptr @pw, i64 0, i64 %35
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef 1)
  %38 = load i32, ptr %8, align 4
  %39 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %37, i32 %38)
  %40 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %36, i32 %39)
  store i32 %40, ptr %7, align 4
  %41 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %14)
  %42 = getelementptr inbounds [262144 x %struct.modint], ptr @q_inv_fac, i64 0, i64 %indvars.iv34
  store i32 %41, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  %indvars.iv.next35 = add nsw i64 %indvars.iv34, -1
  %.not = icmp eq i64 %indvars.iv34, 0
  br i1 %.not, label %33, label %34, !llvm.loop !12
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #3 align 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 = { 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 = { 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}
!12 = distinct !{!12, !10}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass