; LLVM IR from lzyrapx/Competitive-Programming :: ACdream (1114（莫比乌斯反演）)

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

@mu = external dso_local global [222232 x i32], align 16
@a = external dso_local global [222232 x i32], align 16
@n = external dso_local global i32, align 4
@ans = external dso_local global i64, align 8
@num = external dso_local global [222232 x i64], align 16
@Count = external dso_local global [222232 x i64], 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6Mobiusi(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 i32, align 4
  store i32 0, ptr %1, align 4
  call void @_Z6Mobiusi(i32 noundef 222222)
  br label %9

9:                                                ; preds = %111, %0
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  %11 = xor i32 %10, -1
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %114

13:                                               ; preds = %9
  store i64 0, ptr @ans, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 -2147483647, ptr %2, align 4, !tbaa !9
  call void @llvm.memset.p0.i64(ptr align 16 @Count, i8 0, i64 1777856, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @num, i8 0, i64 1777856, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %29, %13
  %15 = load i32, ptr %3, align 4, !tbaa !9
  %16 = load i32, ptr @n, align 4, !tbaa !9
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %32

19:                                               ; preds = %14
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %22)
  %24 = load i32, ptr %3, align 4, !tbaa !9
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %25
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %26)
  %28 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %28, ptr %2, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %19
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %3, align 4, !tbaa !9
  br label %14, !llvm.loop !11

32:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %47, %32
  %34 = load i32, ptr %4, align 4, !tbaa !9
  %35 = load i32, ptr @n, align 4, !tbaa !9
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %50

38:                                               ; preds = %33
  %39 = load i32, ptr %4, align 4, !tbaa !9
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %43
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = add nsw i64 %45, 1
  store i64 %46, ptr %44, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %38
  %48 = load i32, ptr %4, align 4, !tbaa !9
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %4, align 4, !tbaa !9
  br label %33, !llvm.loop !13

50:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %51

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

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

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %57 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %57, ptr %7, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %73, %56
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = load i32, ptr %2, align 4, !tbaa !9
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 13, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %77

63:                                               ; preds = %58
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = add nsw i64 %71, %67
  store i64 %72, ptr %70, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %63
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = add nsw i32 %75, %74
  store i32 %76, ptr %7, align 4, !tbaa !9
  br label %58, !llvm.loop !14

77:                                               ; preds = %62
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %5, align 4, !tbaa !9
  br label %51, !llvm.loop !15

81:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %108, %81
  %83 = load i32, ptr %8, align 4, !tbaa !9
  %84 = load i32, ptr %2, align 4, !tbaa !9
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %87, label %86

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

87:                                               ; preds = %82
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [222232 x i32], ptr @mu, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = mul nsw i64 %92, 1
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !5
  %98 = mul nsw i64 %93, %97
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !5
  %103 = sub nsw i64 %102, 1
  %104 = mul nsw i64 %98, %103
  %105 = ashr i64 %104, 1
  %106 = load i64, ptr @ans, align 8, !tbaa !5
  %107 = add nsw i64 %106, %105
  store i64 %107, ptr @ans, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %87
  %109 = load i32, ptr %8, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %8, align 4, !tbaa !9
  br label %82, !llvm.loop !16

111:                                              ; preds = %86
  %112 = load i64, ptr @ans, align 8, !tbaa !5
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %112)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %9, !llvm.loop !17

114:                                              ; preds = %9
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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


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

@mu = external dso_local local_unnamed_addr global [222232 x i32], align 16
@a = external dso_local global [222232 x i32], align 16
@n = external dso_local global i32, align 4
@ans = external dso_local local_unnamed_addr global i64, align 8
@num = external dso_local local_unnamed_addr global [222232 x i64], align 16
@Count = external dso_local local_unnamed_addr global [222232 x i64], 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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z6Mobiusi(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 norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  tail call void @_Z6Mobiusi(i32 noundef 222222)
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %.not47 = icmp eq i32 %2, -1
  br i1 %.not47, label %._crit_edge50, label %.lr.ph49

.lr.ph49:                                         ; preds = %0, %79
  store i64 0, ptr @ans, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 -2147483647, ptr %1, align 4, !tbaa !9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1777856) @Count, i8 0, i64 1777856, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1777856) @num, i8 0, i64 1777856, i1 false)
  %3 = load i32, ptr @n, align 4, !tbaa !9
  %.not2433 = icmp slt i32 %3, 1
  br i1 %.not2433, label %.preheader29.thread, label %.lr.ph

.preheader31:                                     ; preds = %.lr.ph
  %.not2535 = icmp slt i32 %10, 1
  br i1 %.not2535, label %.preheader30, label %.lr.ph37.preheader

.lr.ph37.preheader:                               ; preds = %.preheader31
  %4 = zext nneg i32 %10 to i64
  %xtraiter = and i64 %4, 3
  %5 = icmp ult i32 %10, 4
  br i1 %5, label %.preheader30.loopexit.unr-lcssa, label %.lr.ph37.preheader.new

.lr.ph37.preheader.new:                           ; preds = %.lr.ph37.preheader
  %unroll_iter = and i64 %4, 2147483644
  br label %.lr.ph37

.lr.ph:                                           ; preds = %.lr.ph49, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph49 ]
  %6 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %indvars.iv
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %8 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %9 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %9, ptr %1, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %10 = load i32, ptr @n, align 4, !tbaa !9
  %11 = sext i32 %10 to i64
  %.not24.not = icmp slt i64 %indvars.iv, %11
  br i1 %.not24.not, label %.lr.ph, label %.preheader31, !llvm.loop !11

.preheader30.loopexit.unr-lcssa:                  ; preds = %.lr.ph37, %.lr.ph37.preheader
  %indvars.iv55.unr = phi i64 [ 1, %.lr.ph37.preheader ], [ %indvars.iv.next56.3, %.lr.ph37 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader30, label %.lr.ph37.epil

.lr.ph37.epil:                                    ; preds = %.preheader30.loopexit.unr-lcssa, %.lr.ph37.epil
  %indvars.iv55.epil = phi i64 [ %indvars.iv.next56.epil, %.lr.ph37.epil ], [ %indvars.iv55.unr, %.preheader30.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph37.epil ], [ 0, %.preheader30.loopexit.unr-lcssa ]
  %12 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %indvars.iv55.epil
  %13 = load i32, ptr %12, align 4, !tbaa !9
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %14
  %16 = load i64, ptr %15, align 8, !tbaa !5
  %17 = add nsw i64 %16, 1
  store i64 %17, ptr %15, align 8, !tbaa !5
  %indvars.iv.next56.epil = add nuw nsw i64 %indvars.iv55.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader30, label %.lr.ph37.epil, !llvm.loop !13

.preheader30:                                     ; preds = %.preheader30.loopexit.unr-lcssa, %.lr.ph37.epil, %.preheader31
  %.not2640 = icmp slt i32 %9, 1
  br i1 %.not2640, label %.preheader29.thread, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader30
  %18 = zext nneg i32 %9 to i64
  %19 = zext nneg i32 %9 to i64
  %20 = add nsw i64 %19, -1
  %xtraiter86 = and i64 %18, 1
  %21 = icmp eq i64 %20, 0
  br i1 %21, label %.preheader29.unr-lcssa, label %.preheader.preheader.new

.preheader.preheader.new:                         ; preds = %.preheader.preheader
  %unroll_iter89 = and i64 %18, 2147483646
  br label %.preheader

.lr.ph37:                                         ; preds = %.lr.ph37, %.lr.ph37.preheader.new
  %indvars.iv55 = phi i64 [ 1, %.lr.ph37.preheader.new ], [ %indvars.iv.next56.3, %.lr.ph37 ]
  %niter = phi i64 [ 0, %.lr.ph37.preheader.new ], [ %niter.next.3, %.lr.ph37 ]
  %22 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %indvars.iv55
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %24
  %26 = load i64, ptr %25, align 8, !tbaa !5
  %27 = add nsw i64 %26, 1
  store i64 %27, ptr %25, align 8, !tbaa !5
  %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1
  %28 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %indvars.iv.next56
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %31, align 8, !tbaa !5
  %indvars.iv.next56.1 = add nuw nsw i64 %indvars.iv55, 2
  %34 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %indvars.iv.next56.1
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = add nsw i64 %38, 1
  store i64 %39, ptr %37, align 8, !tbaa !5
  %indvars.iv.next56.2 = add nuw nsw i64 %indvars.iv55, 3
  %40 = getelementptr inbounds [222232 x i32], ptr @a, i64 0, i64 %indvars.iv.next56.2
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = add nsw i64 %44, 1
  store i64 %45, ptr %43, align 8, !tbaa !5
  %indvars.iv.next56.3 = add nuw nsw i64 %indvars.iv55, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader30.loopexit.unr-lcssa, label %.lr.ph37, !llvm.loop !15

.preheader29.thread:                              ; preds = %.preheader30, %.lr.ph49
  %ans.promoted76 = load i64, ptr @ans, align 8, !tbaa !5
  br label %79

.preheader29.unr-lcssa:                           ; preds = %62, %.preheader.preheader
  %indvars.iv58.unr = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next59.1, %62 ]
  %lcmp.mod88.not = icmp eq i64 %xtraiter86, 0
  br i1 %lcmp.mod88.not, label %.preheader29, label %.preheader.epil

.preheader.epil:                                  ; preds = %.preheader29.unr-lcssa
  %46 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %indvars.iv58.unr
  %.promoted.epil = load i64, ptr %46, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %47, %.preheader.epil
  %indvars.iv60.epil = phi i64 [ %indvars.iv58.unr, %.preheader.epil ], [ %indvars.iv.next61.epil, %47 ]
  %48 = phi i64 [ %.promoted.epil, %.preheader.epil ], [ %51, %47 ]
  %49 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %indvars.iv60.epil
  %50 = load i64, ptr %49, align 8, !tbaa !5
  %51 = add nsw i64 %48, %50
  %indvars.iv.next61.epil = add nuw nsw i64 %indvars.iv60.epil, %indvars.iv58.unr
  %52 = trunc nuw i64 %indvars.iv.next61.epil to i32
  %.not28.epil = icmp slt i32 %9, %52
  br i1 %.not28.epil, label %.preheader29.epilog-lcssa, label %47, !llvm.loop !16

.preheader29.epilog-lcssa:                        ; preds = %47
  store i64 %51, ptr %46, align 8, !tbaa !5
  br label %.preheader29

.preheader29:                                     ; preds = %.preheader29.unr-lcssa, %.preheader29.epilog-lcssa
  %ans.promoted = load i64, ptr @ans, align 8, !tbaa !5
  br i1 %.not2640, label %79, label %.lr.ph45.preheader

.lr.ph45.preheader:                               ; preds = %.preheader29
  %xtraiter91 = and i64 %18, 1
  %53 = icmp eq i64 %20, 0
  br i1 %53, label %._crit_edge.unr-lcssa, label %.lr.ph45.preheader.new

.lr.ph45.preheader.new:                           ; preds = %.lr.ph45.preheader
  %unroll_iter95 = and i64 %18, 2147483646
  br label %.lr.ph45

.preheader:                                       ; preds = %62, %.preheader.preheader.new
  %indvars.iv58 = phi i64 [ 1, %.preheader.preheader.new ], [ %indvars.iv.next59.1, %62 ]
  %niter90 = phi i64 [ 0, %.preheader.preheader.new ], [ %niter90.next.1, %62 ]
  %54 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %indvars.iv58
  %.promoted = load i64, ptr %54, align 8, !tbaa !5
  br label %63

.preheader.1:                                     ; preds = %63
  store i64 %67, ptr %54, align 8, !tbaa !5
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %55 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %indvars.iv.next59
  %.promoted.1 = load i64, ptr %55, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %56, %.preheader.1
  %indvars.iv60.1 = phi i64 [ %indvars.iv.next59, %.preheader.1 ], [ %indvars.iv.next61.1, %56 ]
  %57 = phi i64 [ %.promoted.1, %.preheader.1 ], [ %60, %56 ]
  %58 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %indvars.iv60.1
  %59 = load i64, ptr %58, align 8, !tbaa !5
  %60 = add nsw i64 %57, %59
  %indvars.iv.next61.1 = add nuw nsw i64 %indvars.iv60.1, %indvars.iv.next59
  %61 = trunc nuw i64 %indvars.iv.next61.1 to i32
  %.not28.1 = icmp slt i32 %9, %61
  br i1 %.not28.1, label %62, label %56, !llvm.loop !16

62:                                               ; preds = %56
  store i64 %60, ptr %55, align 8, !tbaa !5
  %indvars.iv.next59.1 = add nuw nsw i64 %indvars.iv58, 2
  %niter90.next.1 = add nuw i64 %niter90, 2
  %niter90.ncmp.1 = icmp eq i64 %niter90.next.1, %unroll_iter89
  br i1 %niter90.ncmp.1, label %.preheader29.unr-lcssa, label %.preheader, !llvm.loop !17

63:                                               ; preds = %.preheader, %63
  %indvars.iv60 = phi i64 [ %indvars.iv58, %.preheader ], [ %indvars.iv.next61, %63 ]
  %64 = phi i64 [ %.promoted, %.preheader ], [ %67, %63 ]
  %65 = getelementptr inbounds [222232 x i64], ptr @num, i64 0, i64 %indvars.iv60
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = add nsw i64 %64, %66
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, %indvars.iv58
  %68 = trunc nuw i64 %indvars.iv.next61 to i32
  %.not28 = icmp slt i32 %9, %68
  br i1 %.not28, label %.preheader.1, label %63, !llvm.loop !16

._crit_edge.unr-lcssa:                            ; preds = %.lr.ph45, %.lr.ph45.preheader
  %.lcssa85.ph = phi i64 [ poison, %.lr.ph45.preheader ], [ %103, %.lr.ph45 ]
  %indvars.iv66.unr = phi i64 [ 1, %.lr.ph45.preheader ], [ %indvars.iv.next67.1, %.lr.ph45 ]
  %.unr = phi i64 [ %ans.promoted, %.lr.ph45.preheader ], [ %103, %.lr.ph45 ]
  %lcmp.mod93.not = icmp eq i64 %xtraiter91, 0
  br i1 %lcmp.mod93.not, label %._crit_edge, label %.lr.ph45.epil

.lr.ph45.epil:                                    ; preds = %._crit_edge.unr-lcssa
  %69 = getelementptr inbounds [222232 x i32], ptr @mu, i64 0, i64 %indvars.iv66.unr
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %indvars.iv66.unr
  %73 = load i64, ptr %72, align 8, !tbaa !5
  %74 = mul nsw i64 %73, %71
  %75 = add nsw i64 %73, -1
  %76 = mul nsw i64 %74, %75
  %77 = ashr i64 %76, 1
  %78 = add nsw i64 %77, %.unr
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.unr-lcssa, %.lr.ph45.epil
  %.lcssa85 = phi i64 [ %.lcssa85.ph, %._crit_edge.unr-lcssa ], [ %78, %.lr.ph45.epil ]
  store i64 %.lcssa85, ptr @ans, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %.preheader29.thread, %._crit_edge, %.preheader29
  %80 = phi i64 [ %.lcssa85, %._crit_edge ], [ %ans.promoted, %.preheader29 ], [ %ans.promoted76, %.preheader29.thread ]
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %80)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %82 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %.not = icmp eq i32 %82, -1
  br i1 %.not, label %._crit_edge50, label %.lr.ph49, !llvm.loop !18

.lr.ph45:                                         ; preds = %.lr.ph45, %.lr.ph45.preheader.new
  %indvars.iv66 = phi i64 [ 1, %.lr.ph45.preheader.new ], [ %indvars.iv.next67.1, %.lr.ph45 ]
  %83 = phi i64 [ %ans.promoted, %.lr.ph45.preheader.new ], [ %103, %.lr.ph45 ]
  %niter96 = phi i64 [ 0, %.lr.ph45.preheader.new ], [ %niter96.next.1, %.lr.ph45 ]
  %84 = getelementptr inbounds [222232 x i32], ptr @mu, i64 0, i64 %indvars.iv66
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %indvars.iv66
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %89 = mul nsw i64 %88, %86
  %90 = add nsw i64 %88, -1
  %91 = mul nsw i64 %89, %90
  %92 = ashr i64 %91, 1
  %93 = add nsw i64 %92, %83
  %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1
  %94 = getelementptr inbounds [222232 x i32], ptr @mu, i64 0, i64 %indvars.iv.next67
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [222232 x i64], ptr @Count, i64 0, i64 %indvars.iv.next67
  %98 = load i64, ptr %97, align 8, !tbaa !5
  %99 = mul nsw i64 %98, %96
  %100 = add nsw i64 %98, -1
  %101 = mul nsw i64 %99, %100
  %102 = ashr i64 %101, 1
  %103 = add nsw i64 %102, %93
  %indvars.iv.next67.1 = add nuw nsw i64 %indvars.iv66, 2
  %niter96.next.1 = add i64 %niter96, 2
  %niter96.ncmp.1 = icmp eq i64 %niter96.next.1, %unroll_iter95
  br i1 %niter96.ncmp.1, label %._crit_edge.unr-lcssa, label %.lr.ph45, !llvm.loop !19

._crit_edge50:                                    ; preds = %79, %0
  ret i32 0
}

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

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

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

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

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 norecurse 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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


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