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

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

@n = external dso_local global i32, align 4
@fa = external dso_local global [1200001 x i32], align 16
@tot = external dso_local global i32, align 4
@pre = external dso_local global [1200001 x i32], align 16
@cnt = external dso_local global [1200001 x i32], align 16
@e = external dso_local global [1200001 x %struct.Edge], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

13:                                               ; preds = %23, %0
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = load i32, ptr @n, align 4, !tbaa !5
  %16 = icmp sle i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %26

18:                                               ; preds = %13
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds i32, ptr @fa, i64 %20
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %21)
  br label %23

23:                                               ; preds = %18
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !5
  br label %13, !llvm.loop !9

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %148, %26
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = icmp sle i32 %28, 10
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %151

31:                                               ; preds = %27
  store i32 0, ptr @tot, align 4, !tbaa !5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = mul i64 %33, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @pre, i64 1), i8 0, i64 %34, i1 false)
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = mul i64 %36, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @cnt, i64 1), i8 0, i64 %37, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 2, ptr %5, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %64, %31
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = load i32, ptr @n, align 4, !tbaa !5
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %67

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %47, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %48 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %48, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %49 = getelementptr inbounds %struct.Edge, ptr %8, i32 0, i32 0
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [1200001 x i32], ptr @pre, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !5
  store i32 %53, ptr %49, align 4, !tbaa !11
  %54 = getelementptr inbounds %struct.Edge, ptr %8, i32 0, i32 1
  %55 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %55, ptr %54, align 4, !tbaa !13
  %56 = load i32, ptr @tot, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr @tot, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1200001 x %struct.Edge], ptr @e, i64 0, i64 %58
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr align 4 %8, i64 8, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %60 = load i32, ptr @tot, align 4, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [1200001 x i32], ptr @pre, i64 0, i64 %62
  store i32 %60, ptr %63, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %64

64:                                               ; preds = %43
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %5, align 4, !tbaa !5
  br label %38, !llvm.loop !15

67:                                               ; preds = %42
  %68 = call noundef i32 @_Z3dfsi(i32 noundef 1)
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %69)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %118, %67
  %72 = load i32, ptr %9, align 4, !tbaa !5
  %73 = load i32, ptr @n, align 4, !tbaa !5
  %74 = icmp sle i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %121

76:                                               ; preds = %71
  %77 = load i32, ptr @n, align 4, !tbaa !5
  %78 = load i32, ptr %9, align 4, !tbaa !5
  %79 = srem i32 %77, %78
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %82

81:                                               ; preds = %76
  br label %118

82:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = add nsw i32 %83, %84
  store i32 %85, ptr %10, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %101, %82
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = load i32, ptr @n, align 4, !tbaa !5
  %89 = icmp sle i32 %87, %88
  br i1 %89, label %91, label %90

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

91:                                               ; preds = %86
  %92 = load i32, ptr %10, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1200001 x i32], ptr @cnt, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [1200001 x i32], ptr @cnt, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = add nsw i32 %99, %95
  store i32 %100, ptr %98, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %91
  %102 = load i32, ptr %9, align 4, !tbaa !5
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = add nsw i32 %103, %102
  store i32 %104, ptr %10, align 4, !tbaa !5
  br label %86, !llvm.loop !16

105:                                              ; preds = %90
  %106 = load i32, ptr %9, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [1200001 x i32], ptr @cnt, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = load i32, ptr %9, align 4, !tbaa !5
  %112 = sdiv i32 %110, %111
  %113 = icmp sge i32 %109, %112
  br i1 %113, label %114, label %117

114:                                              ; preds = %105
  %115 = load i32, ptr %9, align 4, !tbaa !5
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %115)
  br label %117

117:                                              ; preds = %114, %105
  br label %118

118:                                              ; preds = %117, %81
  %119 = load i32, ptr %9, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %9, align 4, !tbaa !5
  br label %71, !llvm.loop !17

121:                                              ; preds = %75
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = icmp slt i32 %122, 10
  br i1 %123, label %124, label %147

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 2, ptr %11, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %143, %124
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = load i32, ptr @n, align 4, !tbaa !5
  %128 = icmp sle i32 %126, %127
  br i1 %128, label %130, label %129

129:                                              ; preds = %125
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %146

130:                                              ; preds = %125
  %131 = load i32, ptr %11, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = add nsw i32 %134, 19940105
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = sub nsw i32 %136, 1
  %138 = srem i32 %135, %137
  %139 = add nsw i32 %138, 1
  %140 = load i32, ptr %11, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %141
  store i32 %139, ptr %142, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %130
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = add nsw i32 %144, 1
  store i32 %145, ptr %11, align 4, !tbaa !5
  br label %125, !llvm.loop !18

146:                                              ; preds = %129
  br label %147

147:                                              ; preds = %146, %121
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %3, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %3, align 4, !tbaa !5
  br label %27, !llvm.loop !19

151:                                              ; preds = %30
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; 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) #5

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

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 = { 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 #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4}
!13 = !{!12, !6, i64 4}
!14 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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"

%struct.Edge = type { i32, i32 }

@n = external dso_local global i32, align 4
@fa = external dso_local global [1200001 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@pre = external dso_local local_unnamed_addr global [1200001 x i32], align 16
@cnt = external dso_local local_unnamed_addr global [1200001 x i32], align 16
@e = external dso_local local_unnamed_addr global [1200001 x %struct.Edge], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %.not47 = icmp slt i32 %2, 2
  br i1 %.not47, label %.preheader46.preheader, label %.lr.ph

.preheader46.preheader:                           ; preds = %.lr.ph, %0
  %.ph = phi i32 [ %2, %0 ], [ %5, %.lr.ph ]
  br label %.preheader46

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 2, %0 ]
  %3 = getelementptr inbounds i32, ptr @fa, i64 %indvars.iv
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = sext i32 %5 to i64
  %.not.not = icmp slt i64 %indvars.iv, %6
  br i1 %.not.not, label %.lr.ph, label %.preheader46.preheader, !llvm.loop !9

7:                                                ; preds = %.loopexit
  ret i32 0

.preheader46:                                     ; preds = %.preheader46.preheader, %.loopexit
  %8 = phi i32 [ %83, %.loopexit ], [ %.ph, %.preheader46.preheader ]
  %.03566 = phi i32 [ %84, %.loopexit ], [ 1, %.preheader46.preheader ]
  store i32 0, ptr @tot, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = shl nsw i64 %9, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @pre, i64 4), i8 0, i64 %10, i1 false)
  tail call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @cnt, i64 4), i8 0, i64 %10, i1 false)
  %.not3949 = icmp slt i32 %8, 2
  br i1 %.not3949, label %21, label %.lr.ph51.preheader

.lr.ph51.preheader:                               ; preds = %.preheader46
  %11 = add nsw i32 %8, -1
  %wide.trip.count = zext nneg i32 %11 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %12 = icmp eq i32 %11, 1
  br i1 %12, label %._crit_edge.unr-lcssa, label %.lr.ph51.preheader.new

.lr.ph51.preheader.new:                           ; preds = %.lr.ph51.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph51

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph51, %.lr.ph51.preheader
  %indvars.iv72.unr = phi i64 [ 0, %.lr.ph51.preheader ], [ %indvars.iv.next73.1, %.lr.ph51 ]
  %indvars.iv70.unr = phi i64 [ 2, %.lr.ph51.preheader ], [ %indvars.iv.next71.1, %.lr.ph51 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph51.epil

.lr.ph51.epil:                                    ; preds = %._crit_edge.unr-lcssa
  %13 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %indvars.iv70.unr
  %14 = load i32, ptr %13, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [1200001 x i32], ptr @pre, i64 0, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %indvars.iv.next73.epil = add nuw nsw i64 %indvars.iv72.unr, 1
  %18 = getelementptr inbounds [1200001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv.next73.epil
  store i32 %17, ptr %18, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx.epil = getelementptr inbounds i8, ptr %18, i64 4
  %19 = trunc nuw nsw i64 %indvars.iv70.unr to i32
  store i32 %19, ptr %.sroa.4.0..sroa_idx.epil, align 4, !tbaa !5
  %20 = trunc nuw nsw i64 %indvars.iv.next73.epil to i32
  store i32 %20, ptr %16, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph51.epil
  store i32 %11, ptr @tot, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %._crit_edge, %.preheader46
  %22 = tail call noundef i32 @_Z3dfsi(i32 noundef 1)
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.03566)
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %.not4058 = icmp slt i32 %24, 1
  br i1 %.not4058, label %.loopexit, label %.lr.ph61

.lr.ph51:                                         ; preds = %.lr.ph51, %.lr.ph51.preheader.new
  %indvars.iv72 = phi i64 [ 0, %.lr.ph51.preheader.new ], [ %indvars.iv.next73.1, %.lr.ph51 ]
  %indvars.iv70 = phi i64 [ 2, %.lr.ph51.preheader.new ], [ %indvars.iv.next71.1, %.lr.ph51 ]
  %niter = phi i64 [ 0, %.lr.ph51.preheader.new ], [ %niter.next.1, %.lr.ph51 ]
  %25 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %indvars.iv70
  %26 = load i32, ptr %25, align 8, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [1200001 x i32], ptr @pre, i64 0, i64 %27
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %indvars.iv.next73 = or disjoint i64 %indvars.iv72, 1
  %30 = getelementptr inbounds [1200001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv.next73
  store i32 %29, ptr %30, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %30, i64 4
  %31 = trunc nuw nsw i64 %indvars.iv70 to i32
  store i32 %31, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %32 = trunc nuw nsw i64 %indvars.iv.next73 to i32
  store i32 %32, ptr %28, align 4, !tbaa !5
  %indvars.iv.next71 = or disjoint i64 %indvars.iv70, 1
  %33 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %indvars.iv.next71
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1200001 x i32], ptr @pre, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %indvars.iv.next73.1 = add nuw nsw i64 %indvars.iv72, 2
  %38 = getelementptr inbounds [1200001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv.next73.1
  store i32 %37, ptr %38, align 16, !tbaa !5
  %.sroa.4.0..sroa_idx.1 = getelementptr inbounds i8, ptr %38, i64 4
  %39 = trunc nuw nsw i64 %indvars.iv.next71 to i32
  store i32 %39, ptr %.sroa.4.0..sroa_idx.1, align 4, !tbaa !5
  %40 = trunc nuw nsw i64 %indvars.iv.next73.1 to i32
  store i32 %40, ptr %36, align 4, !tbaa !5
  %indvars.iv.next71.1 = add nuw nsw i64 %indvars.iv70, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.lr.ph51, !llvm.loop !11

._crit_edge62:                                    ; preds = %59
  %.not41 = icmp eq i32 %.03566, 10
  %.not4263 = icmp slt i32 %60, 2
  %or.cond = or i1 %.not41, %.not4263
  br i1 %or.cond, label %.loopexit, label %.lr.ph65.preheader

.lr.ph65.preheader:                               ; preds = %._crit_edge62
  %41 = add nuw i32 %60, 1
  %wide.trip.count88 = zext i32 %41 to i64
  %xtraiter101 = and i64 %wide.trip.count88, 1
  %42 = icmp eq i32 %41, 3
  br i1 %42, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph65.preheader.new

.lr.ph65.preheader.new:                           ; preds = %.lr.ph65.preheader
  %43 = and i64 %wide.trip.count88, 4294967294
  %44 = add nsw i64 %43, -4
  br label %.lr.ph65

.lr.ph61:                                         ; preds = %21, %59
  %45 = phi i32 [ %60, %59 ], [ %24, %21 ]
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %59 ], [ 1, %21 ]
  %indvars.iv77 = phi i64 [ %indvars.iv.next78, %59 ], [ 2, %21 ]
  %46 = trunc nuw nsw i64 %indvars.iv79 to i32
  %47 = srem i32 %45, %46
  %48 = sdiv i32 %45, %46
  %.not43 = icmp eq i32 %47, 0
  br i1 %.not43, label %49, label %59

49:                                               ; preds = %.lr.ph61
  %indvars.iv79.tr = trunc i64 %indvars.iv79 to i32
  %50 = shl i32 %indvars.iv79.tr, 1
  %.not4453 = icmp sgt i32 %50, %45
  %.phi.trans.insert = getelementptr inbounds [1200001 x i32], ptr @cnt, i64 0, i64 %indvars.iv79
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br i1 %.not4453, label %._crit_edge57, label %.lr.ph56

._crit_edge57:                                    ; preds = %.lr.ph56, %49
  %51 = phi i32 [ %.pre, %49 ], [ %55, %.lr.ph56 ]
  %.not45 = icmp slt i32 %51, %48
  br i1 %.not45, label %59, label %57

.lr.ph56:                                         ; preds = %49, %.lr.ph56
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.lr.ph56 ], [ %indvars.iv77, %49 ]
  %52 = phi i32 [ %55, %.lr.ph56 ], [ %.pre, %49 ]
  %53 = getelementptr inbounds [1200001 x i32], ptr @cnt, i64 0, i64 %indvars.iv81
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %52, %54
  store i32 %55, ptr %.phi.trans.insert, align 4, !tbaa !5
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, %indvars.iv79
  %56 = trunc nuw i64 %indvars.iv.next82 to i32
  %.not44 = icmp slt i32 %45, %56
  br i1 %.not44, label %._crit_edge57, label %.lr.ph56, !llvm.loop !12

57:                                               ; preds = %._crit_edge57
  %58 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %46)
  %.pre91 = load i32, ptr @n, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %._crit_edge57, %57, %.lr.ph61
  %60 = phi i32 [ %45, %._crit_edge57 ], [ %.pre91, %57 ], [ %45, %.lr.ph61 ]
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %61 = sext i32 %60 to i64
  %.not40.not = icmp slt i64 %indvars.iv79, %61
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 2
  br i1 %.not40.not, label %.lr.ph61, label %._crit_edge62, !llvm.loop !13

.lr.ph65:                                         ; preds = %.lr.ph65, %.lr.ph65.preheader.new
  %indvars.iv85 = phi i64 [ 2, %.lr.ph65.preheader.new ], [ %indvars.iv.next86.1, %.lr.ph65 ]
  %niter104 = phi i64 [ 0, %.lr.ph65.preheader.new ], [ %niter104.next.1, %.lr.ph65 ]
  %62 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %indvars.iv85
  %63 = load i32, ptr %62, align 8, !tbaa !5
  %64 = add nsw i32 %63, 19940105
  %65 = trunc i64 %indvars.iv85 to i32
  %66 = add i32 %65, -1
  %67 = srem i32 %64, %66
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %62, align 8, !tbaa !5
  %indvars.iv.next86 = or disjoint i64 %indvars.iv85, 1
  %69 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %indvars.iv.next86
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %70, 19940105
  %72 = trunc i64 %indvars.iv.next86 to i32
  %73 = add nsw i32 %72, -1
  %74 = srem i32 %71, %73
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %69, align 4, !tbaa !5
  %indvars.iv.next86.1 = add nuw nsw i64 %indvars.iv85, 2
  %niter104.next.1 = add i64 %niter104, 2
  %niter104.ncmp.1 = icmp eq i64 %niter104, %44
  br i1 %niter104.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph65, !llvm.loop !14

.loopexit.loopexit.unr-lcssa:                     ; preds = %.lr.ph65, %.lr.ph65.preheader
  %indvars.iv85.unr = phi i64 [ 2, %.lr.ph65.preheader ], [ %indvars.iv.next86.1, %.lr.ph65 ]
  %lcmp.mod102.not = icmp eq i64 %xtraiter101, 0
  br i1 %lcmp.mod102.not, label %.loopexit, label %.lr.ph65.epil

.lr.ph65.epil:                                    ; preds = %.loopexit.loopexit.unr-lcssa
  %76 = getelementptr inbounds [1200001 x i32], ptr @fa, i64 0, i64 %indvars.iv85.unr
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %77, 19940105
  %79 = trunc i64 %indvars.iv85.unr to i32
  %80 = add i32 %79, -1
  %81 = srem i32 %78, %80
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %76, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph65.epil, %.loopexit.loopexit.unr-lcssa, %21, %._crit_edge62
  %83 = phi i32 [ %60, %._crit_edge62 ], [ %24, %21 ], [ %60, %.loopexit.loopexit.unr-lcssa ], [ %60, %.lr.ph65.epil ]
  %84 = add nuw nsw i32 %.03566, 1
  %exitcond90.not = icmp eq i32 %84, 11
  br i1 %exitcond90.not, label %7, label %.preheader46, !llvm.loop !15
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

; 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 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }

!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}
!15 = distinct !{!15, !10}


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