; LLVM IR from tangjz/acm-icpc :: lydsy (4833)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@mod = external dso_local global i32, align 4
@f = external dso_local global [1000001 x i32], align 16
@inv = external dso_local global [1000001 x i32], align 16
@ans = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #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
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %10

10:                                               ; preds = %145, %0
  %11 = load i32, ptr @t, align 4, !tbaa !5
  %12 = add nsw i32 %11, -1
  store i32 %12, ptr @t, align 4, !tbaa !5
  %13 = icmp ne i32 %11, 0
  br i1 %13, label %14, label %148

14:                                               ; preds = %10
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @mod)
  store i32 1, ptr getelementptr inbounds ([1000001 x i32], ptr @inv, i64 0, i64 1), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds ([1000001 x i32], ptr @f, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %64, %14
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sub nsw i32 %22, 2
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [1000001 x i32], ptr @f, 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 [1000001 x i32], ptr @f, i64 0, i64 %28
  store i32 %26, ptr %29, align 4, !tbaa !5
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sub nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 noundef %34)
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %36
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %37, i32 noundef %42)
  %43 = load i32, ptr @mod, align 4, !tbaa !5
  %44 = load i32, ptr @mod, align 4, !tbaa !5
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sdiv i32 %44, %45
  %47 = sext i32 %46 to i64
  %48 = load i32, ptr @mod, align 4, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = srem i32 %48, %49
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1000001 x i32], ptr @inv, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = mul nsw i64 %47, %54
  %56 = load i32, ptr @mod, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = srem i64 %55, %57
  %59 = trunc i64 %58 to i32
  %60 = sub nsw i32 %43, %59
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1000001 x i32], ptr @inv, i64 0, i64 %62
  store i32 %60, ptr %63, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %21
  %65 = load i32, ptr %2, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !9

67:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 2, ptr %3, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %108, %67
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = load i32, ptr @n, align 4, !tbaa !5
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %111

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = add nsw i32 %74, %75
  store i32 %76, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %77 = load i32, ptr %3, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = call noundef i32 @_Z7mod_invi(i32 noundef %80)
  store i32 %81, ptr %6, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %103, %73
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %107

87:                                               ; preds = %82
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = mul nsw i64 %92, %94
  %96 = load i32, ptr @mod, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = srem i64 %95, %97
  %99 = trunc i64 %98 to i32
  %100 = load i32, ptr %5, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %101
  store i32 %99, ptr %102, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %87
  %104 = load i32, ptr %3, align 4, !tbaa !5
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = add nsw i32 %105, %104
  store i32 %106, ptr %5, align 4, !tbaa !5
  br label %82, !llvm.loop !11

107:                                              ; preds = %86
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %3, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %3, align 4, !tbaa !5
  br label %68, !llvm.loop !12

111:                                              ; preds = %72
  store i32 1, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %112

112:                                              ; preds = %142, %111
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = icmp sle i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %145

117:                                              ; preds = %112
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = mul nsw i64 %119, %124
  %126 = load i32, ptr @mod, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = srem i64 %125, %127
  %129 = trunc i64 %128 to i32
  store i32 %129, ptr %8, align 4, !tbaa !5
  %130 = load i32, ptr @ans, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = load i32, ptr %8, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = mul nsw i64 %133, %135
  %137 = add nsw i64 %131, %136
  %138 = load i32, ptr @mod, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = srem i64 %137, %139
  %141 = trunc i64 %140 to i32
  store i32 %141, ptr @ans, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %117
  %143 = load i32, ptr %7, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %7, align 4, !tbaa !5
  br label %112, !llvm.loop !13

145:                                              ; preds = %116
  %146 = load i32, ptr @ans, align 4, !tbaa !5
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %146)
  br label %10, !llvm.loop !14

148:                                              ; preds = %10
  ret i32 0
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7mod_invi(i32 noundef) #4

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

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@mod = external dso_local global i32, align 4
@f = external dso_local global [1000001 x i32], align 16
@inv = external dso_local local_unnamed_addr global [1000001 x i32], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %2 = load i32, ptr @t, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @t, align 4, !tbaa !5
  %.not52 = icmp eq i32 %2, 0
  br i1 %.not52, label %._crit_edge55, label %.lr.ph54

.lr.ph54:                                         ; preds = %0, %52
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @mod)
  store i32 1, ptr getelementptr inbounds (i8, ptr @inv, i64 4), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @f, i64 4), align 4, !tbaa !5
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not3136 = icmp slt i32 %5, 2
  br i1 %.not3136, label %.sink.split, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph
  %.not3241 = icmp slt i32 %29, 2
  br i1 %.not3241, label %.sink.split, label %.lr.ph43

.lr.ph:                                           ; preds = %.lr.ph54, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 2, %.lr.ph54 ]
  %6 = add nsw i64 %indvars.iv, -2
  %7 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %6
  %8 = load i32, ptr %7, align 4, !tbaa !5
  %9 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %indvars.iv
  store i32 %8, ptr %9, align 4, !tbaa !5
  %10 = add nsw i64 %indvars.iv, -1
  %11 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  tail call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef %12)
  %13 = load i32, ptr %11, align 4, !tbaa !5
  tail call void @_Z7mod_incRii(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef %13)
  %14 = load i32, ptr @mod, align 4, !tbaa !5
  %15 = trunc nuw nsw i64 %indvars.iv to i32
  %16 = sdiv i32 %14, %15
  %17 = sext i32 %16 to i64
  %18 = srem i32 %14, %15
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [1000001 x i32], ptr @inv, i64 0, i64 %19
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %23 = mul nsw i64 %22, %17
  %24 = sext i32 %14 to i64
  %25 = srem i64 %23, %24
  %26 = trunc nsw i64 %25 to i32
  %27 = sub nsw i32 %14, %26
  %28 = getelementptr inbounds [1000001 x i32], ptr @inv, i64 0, i64 %indvars.iv
  store i32 %27, ptr %28, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %.not31.not = icmp slt i64 %indvars.iv, %30
  br i1 %.not31.not, label %.lr.ph, label %.preheader, !llvm.loop !9

._crit_edge44:                                    ; preds = %._crit_edge
  store i32 1, ptr @ans, align 4, !tbaa !5
  %.not3345 = icmp slt i32 %37, 2
  br i1 %.not3345, label %52, label %.lr.ph49

.lr.ph49:                                         ; preds = %._crit_edge44
  %31 = load i32, ptr @mod, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = add nuw nsw i32 %37, 1
  %wide.trip.count = zext nneg i32 %33 to i64
  br label %57

.lr.ph43:                                         ; preds = %.preheader, %._crit_edge
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %._crit_edge ], [ 2, %.preheader ]
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %._crit_edge ], [ 4, %.preheader ]
  %34 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %indvars.iv61
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = tail call noundef i32 @_Z7mod_invi(i32 noundef %35)
  %37 = load i32, ptr @n, align 4, !tbaa !5
  %indvars.iv61.tr = trunc i64 %indvars.iv61 to i32
  %38 = shl i32 %indvars.iv61.tr, 1
  %.not3538 = icmp sgt i32 %38, %37
  br i1 %.not3538, label %._crit_edge, label %.lr.ph40

.lr.ph40:                                         ; preds = %.lr.ph43
  %39 = sext i32 %36 to i64
  %40 = load i32, ptr @mod, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  br label %43

._crit_edge:                                      ; preds = %43, %.lr.ph43
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %42 = sext i32 %37 to i64
  %.not32.not = icmp slt i64 %indvars.iv61, %42
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 2
  br i1 %.not32.not, label %.lr.ph43, label %._crit_edge44, !llvm.loop !11

43:                                               ; preds = %.lr.ph40, %43
  %indvars.iv63 = phi i64 [ %indvars.iv59, %.lr.ph40 ], [ %indvars.iv.next64, %43 ]
  %44 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %indvars.iv63
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = mul nsw i64 %46, %39
  %48 = srem i64 %47, %41
  %49 = trunc nsw i64 %48 to i32
  store i32 %49, ptr %44, align 4, !tbaa !5
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, %indvars.iv61
  %50 = trunc nuw i64 %indvars.iv.next64 to i32
  %.not35 = icmp slt i32 %37, %50
  br i1 %.not35, label %._crit_edge, label %43, !llvm.loop !12

._crit_edge50:                                    ; preds = %57
  %51 = trunc nsw i64 %67 to i32
  br label %.sink.split

.sink.split:                                      ; preds = %.lr.ph54, %.preheader, %._crit_edge50
  %.sink = phi i32 [ %51, %._crit_edge50 ], [ 1, %.preheader ], [ 1, %.lr.ph54 ]
  store i32 %.sink, ptr @ans, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %.sink.split, %._crit_edge44
  %53 = phi i32 [ 1, %._crit_edge44 ], [ %.sink, %.sink.split ]
  %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %53)
  %55 = load i32, ptr @t, align 4, !tbaa !5
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %55, 0
  br i1 %.not, label %._crit_edge55, label %.lr.ph54, !llvm.loop !13

57:                                               ; preds = %.lr.ph49, %57
  %indvars.iv67 = phi i64 [ 2, %.lr.ph49 ], [ %indvars.iv.next68, %57 ]
  %.047 = phi i64 [ 1, %.lr.ph49 ], [ %63, %57 ]
  %58 = phi i64 [ 1, %.lr.ph49 ], [ %67, %57 ]
  %59 = getelementptr inbounds [1000001 x i32], ptr @f, i64 0, i64 %indvars.iv67
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = mul nsw i64 %.047, %61
  %63 = srem i64 %62, %32
  %sext = shl i64 %58, 32
  %64 = ashr exact i64 %sext, 32
  %65 = mul nsw i64 %63, %indvars.iv67
  %66 = add nsw i64 %65, %64
  %67 = srem i64 %66, %32
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next68, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge50, label %57, !llvm.loop !14

._crit_edge55:                                    ; preds = %52, %0
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7mod_invi(i32 noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { 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 #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 = { 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" }

!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: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass