; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/305 Division 2/Problem E (E)

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

@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@a = external dso_local global [200100 x i32], align 16
@lp = external dso_local global [500500 x i32], align 16
@in = external dso_local global [200100 x i32], align 16
@bitcount = external dso_local global [64 x i32], align 16
@lsb = external dso_local global [64 x i32], align 16
@x = external dso_local global i32, align 4
@ans = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6updateii(i32 noundef, 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
  store i32 0, ptr %1, align 4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @q)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %9

9:                                                ; preds = %19, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %14, label %13

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

14:                                               ; preds = %9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %16
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %17)
  br label %19

19:                                               ; preds = %14
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !9

22:                                               ; preds = %13
  call void @llvm.memset.p0.i64(ptr align 16 @lp, i8 -1, i64 2002000, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 2, ptr %3, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %50, %22
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = icmp sle i32 %24, 500000
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %53

27:                                               ; preds = %23
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [500500 x i32], ptr @lp, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = icmp eq i32 %31, -1
  br i1 %32, label %33, label %49

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %34 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %34, ptr %5, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %44, %33
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = icmp sle i32 %36, 500000
  br i1 %37, label %39, label %38

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

39:                                               ; preds = %35
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [500500 x i32], ptr @lp, i64 0, i64 %42
  store i32 %40, ptr %43, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %39
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = add nsw i32 %46, %45
  store i32 %47, ptr %5, align 4, !tbaa !5
  br label %35, !llvm.loop !11

48:                                               ; preds = %38
  br label %49

49:                                               ; preds = %48, %27
  br label %50

50:                                               ; preds = %49
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %3, align 4, !tbaa !5
  br label %23, !llvm.loop !12

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

54:                                               ; preds = %84, %53
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = icmp slt i32 %55, 64
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %87

58:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %59

59:                                               ; preds = %80, %58
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = icmp slt i32 %60, 6
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %83

63:                                               ; preds = %59
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = load i32, ptr %7, align 4, !tbaa !5
  %66 = shl i32 1, %65
  %67 = and i32 %64, %66
  %68 = icmp sgt i32 %67, 0
  br i1 %68, label %69, label %79

69:                                               ; preds = %63
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [64 x i32], ptr @bitcount, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %72, align 4, !tbaa !5
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [64 x i32], ptr @lsb, i64 0, i64 %77
  store i32 %75, ptr %78, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %69, %63
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %7, align 4, !tbaa !5
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %7, align 4, !tbaa !5
  br label %59, !llvm.loop !13

83:                                               ; preds = %62
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %6, align 4, !tbaa !5
  br label %54, !llvm.loop !14

87:                                               ; preds = %57
  br label %88

88:                                               ; preds = %116, %87
  %89 = load i32, ptr @q, align 4, !tbaa !5
  %90 = add nsw i32 %89, -1
  store i32 %90, ptr @q, align 4, !tbaa !5
  %91 = icmp ne i32 %89, 0
  br i1 %91, label %92, label %119

92:                                               ; preds = %88
  %93 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @x)
  %94 = load i32, ptr @x, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [200100 x i32], ptr @in, i64 0, i64 %95
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = xor i32 %97, 1
  store i32 %98, ptr %96, align 4, !tbaa !5
  %99 = load i32, ptr @x, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [200100 x i32], ptr @in, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %110

104:                                              ; preds = %92
  %105 = load i32, ptr @x, align 4, !tbaa !5
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  call void @_Z6updateii(i32 noundef %109, i32 noundef 1)
  br label %116

110:                                              ; preds = %92
  %111 = load i32, ptr @x, align 4, !tbaa !5
  %112 = sub nsw i32 %111, 1
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  call void @_Z6updateii(i32 noundef %115, i32 noundef -1)
  br label %116

116:                                              ; preds = %110, %104
  %117 = load i64, ptr @ans, align 8, !tbaa !15
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %117)
  br label %88, !llvm.loop !17

119:                                              ; preds = %88
  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

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 = { 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}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !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"

@n = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@a = external dso_local global [200100 x i32], align 16
@lp = external dso_local local_unnamed_addr global [500500 x i32], align 16
@in = external dso_local local_unnamed_addr global [200100 x i32], align 16
@bitcount = external dso_local local_unnamed_addr global [64 x i32], align 16
@lsb = external dso_local local_unnamed_addr global [64 x i32], align 16
@x = external dso_local global i32, align 4
@ans = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6updateii(i32 noundef, 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, ptr noundef nonnull @q)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2002000) @lp, i8 -1, i64 2002000, i1 false)
  br label %9

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

9:                                                ; preds = %.loopexit.1, %._crit_edge
  %indvars.iv41 = phi i64 [ 2, %._crit_edge ], [ %indvars.iv.next42.1, %.loopexit.1 ]
  %10 = getelementptr inbounds [500500 x i32], ptr @lp, i64 0, i64 %indvars.iv41
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %12 = icmp eq i32 %11, -1
  br i1 %12, label %.lr.ph32.preheader, label %.loopexit

.lr.ph32.preheader:                               ; preds = %9
  %13 = trunc nuw nsw i64 %indvars.iv41 to i32
  br label %.lr.ph32

.lr.ph32:                                         ; preds = %.lr.ph32.preheader, %.lr.ph32
  %indvars.iv43 = phi i64 [ %indvars.iv41, %.lr.ph32.preheader ], [ %indvars.iv.next44, %.lr.ph32 ]
  %14 = getelementptr inbounds [500500 x i32], ptr @lp, i64 0, i64 %indvars.iv43
  store i32 %13, ptr %14, align 8, !tbaa !5
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, %indvars.iv41
  %15 = icmp ult i64 %indvars.iv.next44, 500001
  br i1 %15, label %.lr.ph32, label %.loopexit, !llvm.loop !11

.loopexit:                                        ; preds = %.lr.ph32, %9
  %indvars.iv.next42 = or disjoint i64 %indvars.iv41, 1
  %exitcond.not = icmp eq i64 %indvars.iv41, 500000
  br i1 %exitcond.not, label %.preheader27, label %16, !llvm.loop !12

16:                                               ; preds = %.loopexit
  %17 = getelementptr inbounds [500500 x i32], ptr @lp, i64 0, i64 %indvars.iv.next42
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = icmp eq i32 %18, -1
  br i1 %19, label %.lr.ph32.preheader.1, label %.loopexit.1

.lr.ph32.preheader.1:                             ; preds = %16
  %20 = trunc nuw nsw i64 %indvars.iv.next42 to i32
  br label %.lr.ph32.1

.lr.ph32.1:                                       ; preds = %.lr.ph32.1, %.lr.ph32.preheader.1
  %indvars.iv43.1 = phi i64 [ %indvars.iv.next42, %.lr.ph32.preheader.1 ], [ %indvars.iv.next44.1, %.lr.ph32.1 ]
  %21 = getelementptr inbounds [500500 x i32], ptr @lp, i64 0, i64 %indvars.iv43.1
  store i32 %20, ptr %21, align 4, !tbaa !5
  %indvars.iv.next44.1 = add nuw nsw i64 %indvars.iv43.1, %indvars.iv.next42
  %22 = icmp ult i64 %indvars.iv.next44.1, 500001
  br i1 %22, label %.lr.ph32.1, label %.loopexit.1, !llvm.loop !11

.loopexit.1:                                      ; preds = %.lr.ph32.1, %16
  %indvars.iv.next42.1 = add nuw nsw i64 %indvars.iv41, 2
  br label %9

.preheader27:                                     ; preds = %.loopexit, %57
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %57 ], [ 0, %.loopexit ]
  %23 = getelementptr inbounds [64 x i32], ptr @bitcount, i64 0, i64 %indvars.iv48
  %24 = getelementptr inbounds [64 x i32], ptr @lsb, i64 0, i64 %indvars.iv48
  %25 = trunc nuw nsw i64 %indvars.iv48 to i32
  %26 = and i32 %25, 1
  %.not26 = icmp eq i32 %26, 0
  br i1 %.not26, label %32, label %29

.preheader:                                       ; preds = %57
  %27 = load i32, ptr @q, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr @q, align 4, !tbaa !5
  %.not37 = icmp eq i32 %27, 0
  br i1 %.not37, label %._crit_edge39, label %.lr.ph38

29:                                               ; preds = %.preheader27
  %30 = load i32, ptr %23, align 4, !tbaa !5
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %23, align 4, !tbaa !5
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %.preheader27, %29
  %33 = and i32 %25, 2
  %.not26.1 = icmp eq i32 %33, 0
  br i1 %.not26.1, label %37, label %34

34:                                               ; preds = %32
  %35 = load i32, ptr %23, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %23, align 4, !tbaa !5
  store i32 1, ptr %24, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %34, %32
  %38 = and i32 %25, 4
  %.not26.2 = icmp eq i32 %38, 0
  br i1 %.not26.2, label %42, label %39

39:                                               ; preds = %37
  %40 = load i32, ptr %23, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %23, align 4, !tbaa !5
  store i32 2, ptr %24, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %39, %37
  %43 = and i32 %25, 8
  %.not26.3 = icmp eq i32 %43, 0
  br i1 %.not26.3, label %47, label %44

44:                                               ; preds = %42
  %45 = load i32, ptr %23, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %23, align 4, !tbaa !5
  store i32 3, ptr %24, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %44, %42
  %48 = and i32 %25, 16
  %.not26.4 = icmp eq i32 %48, 0
  br i1 %.not26.4, label %52, label %49

49:                                               ; preds = %47
  %50 = load i32, ptr %23, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %23, align 4, !tbaa !5
  store i32 4, ptr %24, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %49, %47
  %53 = and i32 %25, 32
  %.not26.5 = icmp eq i32 %53, 0
  br i1 %.not26.5, label %57, label %54

54:                                               ; preds = %52
  %55 = load i32, ptr %23, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %23, align 4, !tbaa !5
  store i32 5, ptr %24, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %54, %52
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %exitcond51.not = icmp eq i64 %indvars.iv.next49, 64
  br i1 %exitcond51.not, label %.preheader, label %.preheader27, !llvm.loop !13

.lr.ph38:                                         ; preds = %.preheader, %.lr.ph38
  %58 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @x)
  %59 = load i32, ptr @x, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [200100 x i32], ptr @in, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = xor i32 %62, 1
  store i32 %63, ptr %61, align 4, !tbaa !5
  %.not25 = icmp eq i32 %62, 1
  %64 = add nsw i32 %59, -1
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [200100 x i32], ptr @a, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %. = select i1 %.not25, i32 -1, i32 1
  tail call void @_Z6updateii(i32 noundef %67, i32 noundef %.)
  %68 = load i64, ptr @ans, align 8, !tbaa !14
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %68)
  %70 = load i32, ptr @q, align 4, !tbaa !5
  %71 = add nsw i32 %70, -1
  store i32 %71, ptr @q, align 4, !tbaa !5
  %.not = icmp eq i32 %70, 0
  br i1 %.not, label %._crit_edge39, label %.lr.ph38, !llvm.loop !16

._crit_edge39:                                    ; preds = %.lr.ph38, %.preheader
  ret i32 0
}

; 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 = !{!15, !15, i64 0}
!15 = !{!"long long", !7, i64 0}
!16 = distinct !{!16, !10}


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