; LLVM IR from lzyrapx/Competitive-Programming :: HDUOJ (2103)

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

@.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 [10 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 [35 x i32], align 16
  %8 = alloca [35 x i64], align 16
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 140, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 280, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %16 = getelementptr inbounds [35 x i64], ptr %8, i64 0, i64 0
  store i64 0, ptr %16, align 16, !tbaa !5
  %17 = getelementptr inbounds [35 x i64], ptr %8, i64 0, i64 1
  store i64 10000, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 2, ptr %10, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %32, %0
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = icmp sle i32 %19, 30
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %18
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = sub nsw i32 %23, 1
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [35 x i64], ptr %8, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !5
  %28 = mul nsw i64 2, %27
  %29 = load i32, ptr %10, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [35 x i64], ptr %8, i64 0, i64 %30
  store i64 %28, ptr %31, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %22
  %33 = load i32, ptr %10, align 4, !tbaa !9
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %10, align 4, !tbaa !9
  br label %18, !llvm.loop !11

35:                                               ; preds = %21
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2)
  br label %37

37:                                               ; preds = %120, %35
  %38 = load i32, ptr %2, align 4, !tbaa !9
  %39 = add nsw i32 %38, -1
  store i32 %39, ptr %2, align 4, !tbaa !9
  %40 = icmp ne i32 %38, 0
  br i1 %40, label %41, label %121

41:                                               ; preds = %37
  store i64 0, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !9
  %42 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %53, %41
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = load i32, ptr %3, align 4, !tbaa !9
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %56

48:                                               ; preds = %43
  %49 = load i32, ptr %11, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [35 x i32], ptr %7, i64 0, i64 %50
  %52 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %51)
  br label %53

53:                                               ; preds = %48
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %11, align 4, !tbaa !9
  br label %43, !llvm.loop !13

56:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %57

57:                                               ; preds = %89, %56
  %58 = load i32, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %4, align 4, !tbaa !9
  %60 = icmp sle i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 10, ptr %13, align 4
  br label %92

62:                                               ; preds = %57
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [35 x i32], ptr %7, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = icmp eq i32 %66, 1
  br i1 %67, label %68, label %88

68:                                               ; preds = %62
  %69 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %69, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %84, %68
  %71 = load i32, ptr %14, align 4, !tbaa !9
  %72 = load i32, ptr %3, align 4, !tbaa !9
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = sub nsw i32 %72, %73
  %75 = icmp sle i32 %71, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %70
  store i32 13, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %87

77:                                               ; preds = %70
  %78 = load i32, ptr %14, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [35 x i64], ptr %8, i64 0, i64 %79
  %81 = load i64, ptr %80, align 8, !tbaa !5
  %82 = load i64, ptr %9, align 8, !tbaa !5
  %83 = add nsw i64 %82, %81
  store i64 %83, ptr %9, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %77
  %85 = load i32, ptr %14, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %14, align 4, !tbaa !9
  br label %70, !llvm.loop !14

87:                                               ; preds = %76
  store i32 1, ptr %6, align 4, !tbaa !9
  store i32 10, ptr %13, align 4
  br label %92

88:                                               ; preds = %62
  br label %89

89:                                               ; preds = %88
  %90 = load i32, ptr %12, align 4, !tbaa !9
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %12, align 4, !tbaa !9
  br label %57, !llvm.loop !15

92:                                               ; preds = %87, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = icmp eq i32 %94, 1
  br i1 %95, label %96, label %99

96:                                               ; preds = %93
  %97 = load i64, ptr %9, align 8, !tbaa !5
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %97)
  br label %120

99:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %114, %99
  %101 = load i32, ptr %15, align 4, !tbaa !9
  %102 = load i32, ptr %3, align 4, !tbaa !9
  %103 = load i32, ptr %4, align 4, !tbaa !9
  %104 = sub nsw i32 %102, %103
  %105 = icmp sle i32 %101, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %100
  store i32 16, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  br label %117

107:                                              ; preds = %100
  %108 = load i32, ptr %15, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [35 x i64], ptr %8, i64 0, i64 %109
  %111 = load i64, ptr %110, align 8, !tbaa !5
  %112 = load i64, ptr %9, align 8, !tbaa !5
  %113 = add nsw i64 %112, %111
  store i64 %113, ptr %9, align 8, !tbaa !5
  br label %114

114:                                              ; preds = %107
  %115 = load i32, ptr %15, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %15, align 4, !tbaa !9
  br label %100, !llvm.loop !16

117:                                              ; preds = %106
  %118 = load i64, ptr %9, align 8, !tbaa !5
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %118)
  br label %120

120:                                              ; preds = %117, %96
  br label %37, !llvm.loop !17

121:                                              ; preds = %37
  store i32 0, ptr %1, align 4
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 280, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 140, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  %122 = load i32, ptr %1, align 4
  ret i32 %122
}

; 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

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

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

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

@.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 [10 x i8], align 1

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca [35 x i32], align 16
  %5 = alloca [35 x i64], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 140, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 280, ptr nonnull %5) #4
  store i64 0, ptr %5, align 16, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 10000, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 20000, ptr %7, align 16, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 40000, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %5, i64 32
  store i64 80000, ptr %9, align 16, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %5, i64 40
  store i64 160000, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %5, i64 48
  store i64 320000, ptr %11, align 16, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %5, i64 56
  store i64 640000, ptr %12, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %5, i64 64
  store i64 1280000, ptr %13, align 16, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %5, i64 72
  store i64 2560000, ptr %14, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %5, i64 80
  store i64 5120000, ptr %15, align 16, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %5, i64 88
  store i64 10240000, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %5, i64 96
  store i64 20480000, ptr %17, align 16, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %5, i64 104
  store i64 40960000, ptr %18, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %5, i64 112
  store i64 81920000, ptr %19, align 16, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %5, i64 120
  store i64 163840000, ptr %20, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %5, i64 128
  store i64 327680000, ptr %21, align 16, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %5, i64 136
  store i64 655360000, ptr %22, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %5, i64 144
  store i64 1310720000, ptr %23, align 16, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %5, i64 152
  store i64 2621440000, ptr %24, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %5, i64 160
  store i64 5242880000, ptr %25, align 16, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %5, i64 168
  store i64 10485760000, ptr %26, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %5, i64 176
  store i64 20971520000, ptr %27, align 16, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %5, i64 184
  store i64 41943040000, ptr %28, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %5, i64 192
  store i64 83886080000, ptr %29, align 16, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %5, i64 200
  store i64 167772160000, ptr %30, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %5, i64 208
  store i64 335544320000, ptr %31, align 16, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %5, i64 216
  store i64 671088640000, ptr %32, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %5, i64 224
  store i64 1342177280000, ptr %33, align 16, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %5, i64 232
  store i64 2684354560000, ptr %34, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %5, i64 240
  store i64 5368709120000, ptr %35, align 16, !tbaa !5
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %37 = load i32, ptr %1, align 4, !tbaa !9
  %38 = add nsw i32 %37, -1
  store i32 %38, ptr %1, align 4, !tbaa !9
  %.not61 = icmp eq i32 %37, 0
  br i1 %.not61, label %._crit_edge64, label %.lr.ph63.preheader

.lr.ph63.preheader:                               ; preds = %0
  %39 = getelementptr inbounds i8, ptr %4, i64 4
  br label %.lr.ph63

.lr.ph63:                                         ; preds = %.lr.ph63.preheader, %._crit_edge
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %3, ptr noundef nonnull %2)
  %41 = load i32, ptr %2, align 4, !tbaa !9
  %.not3043 = icmp slt i32 %41, 1
  br i1 %.not3043, label %.preheader35, label %.lr.ph

.preheader35:                                     ; preds = %.lr.ph, %.lr.ph63
  %.lcssa = phi i32 [ %41, %.lr.ph63 ], [ %49, %.lr.ph ]
  %42 = load i32, ptr %3, align 4, !tbaa !9
  %.not31.not45 = icmp slt i32 %42, 1
  br i1 %.not31.not45, label %.preheader, label %.lr.ph48.preheader

.lr.ph48.preheader:                               ; preds = %.preheader35
  %43 = zext nneg i32 %42 to i64
  %44 = add nuw i32 %42, 1
  %wide.trip.count = zext i32 %44 to i64
  %45 = load i32, ptr %39, align 4, !tbaa !9
  %46 = icmp eq i32 %45, 1
  br i1 %46, label %.preheader34, label %.lr.ph107

.lr.ph:                                           ; preds = %.lr.ph63, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph63 ]
  %47 = getelementptr inbounds [35 x i32], ptr %4, i64 0, i64 %indvars.iv
  %48 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %47)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %49 = load i32, ptr %2, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %.not30.not = icmp slt i64 %indvars.iv, %50
  br i1 %.not30.not, label %.lr.ph, label %.preheader35, !llvm.loop !11

.lr.ph48:                                         ; preds = %.lr.ph107
  %indvars.iv.next79 = add i32 %indvars.iv78105, -1
  %51 = getelementptr inbounds [35 x i32], ptr %4, i64 0, i64 %indvars.iv.next74
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %.preheader34.loopexit, label %.lr.ph107, !llvm.loop !13

.preheader34.loopexit:                            ; preds = %.lr.ph48
  %.not31.not.le = icmp uge i64 %indvars.iv73106, %43
  br label %.preheader34

.preheader34:                                     ; preds = %.preheader34.loopexit, %.lr.ph48.preheader
  %indvars.iv78.lcssa = phi i32 [ %.lcssa, %.lr.ph48.preheader ], [ %indvars.iv.next79, %.preheader34.loopexit ]
  %indvars.iv73.lcssa = phi i64 [ 1, %.lr.ph48.preheader ], [ %indvars.iv.next74, %.preheader34.loopexit ]
  %.not31.not47.lcssa = phi i1 [ false, %.lr.ph48.preheader ], [ %.not31.not.le, %.preheader34.loopexit ]
  %54 = trunc nuw nsw i64 %indvars.iv73.lcssa to i32
  %.not3251 = icmp slt i32 %.lcssa, %54
  br i1 %.not3251, label %.loopexit, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %.preheader34
  %wide.trip.count81 = zext i32 %indvars.iv78.lcssa to i64
  %min.iters.check114 = icmp ult i32 %indvars.iv78.lcssa, 4
  br i1 %min.iters.check114, label %.lr.ph54.preheader130, label %vector.ph115

vector.ph115:                                     ; preds = %.lr.ph54.preheader
  %n.vec117 = and i64 %wide.trip.count81, 4294967292
  br label %vector.body119

vector.body119:                                   ; preds = %vector.body119, %vector.ph115
  %index120 = phi i64 [ 0, %vector.ph115 ], [ %index.next125, %vector.body119 ]
  %vec.phi121 = phi <2 x i64> [ zeroinitializer, %vector.ph115 ], [ %57, %vector.body119 ]
  %vec.phi122 = phi <2 x i64> [ zeroinitializer, %vector.ph115 ], [ %58, %vector.body119 ]
  %55 = getelementptr inbounds [35 x i64], ptr %5, i64 0, i64 %index120
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load123 = load <2 x i64>, ptr %55, align 16, !tbaa !5
  %wide.load124 = load <2 x i64>, ptr %56, align 16, !tbaa !5
  %57 = add <2 x i64> %wide.load123, %vec.phi121
  %58 = add <2 x i64> %wide.load124, %vec.phi122
  %index.next125 = add nuw i64 %index120, 4
  %59 = icmp eq i64 %index.next125, %n.vec117
  br i1 %59, label %middle.block112, label %vector.body119, !llvm.loop !14

middle.block112:                                  ; preds = %vector.body119
  %bin.rdx126 = add <2 x i64> %58, %57
  %60 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx126)
  %cmp.n127 = icmp eq i64 %n.vec117, %wide.trip.count81
  br i1 %cmp.n127, label %.loopexit, label %.lr.ph54.preheader130

.lr.ph54.preheader130:                            ; preds = %middle.block112, %.lr.ph54.preheader
  %indvars.iv75.ph = phi i64 [ 0, %.lr.ph54.preheader ], [ %n.vec117, %middle.block112 ]
  %.02852.ph = phi i64 [ 0, %.lr.ph54.preheader ], [ %60, %middle.block112 ]
  br label %.lr.ph54

.lr.ph54:                                         ; preds = %.lr.ph54.preheader130, %.lr.ph54
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %.lr.ph54 ], [ %indvars.iv75.ph, %.lr.ph54.preheader130 ]
  %.02852 = phi i64 [ %63, %.lr.ph54 ], [ %.02852.ph, %.lr.ph54.preheader130 ]
  %61 = getelementptr inbounds [35 x i64], ptr %5, i64 0, i64 %indvars.iv75
  %62 = load i64, ptr %61, align 8, !tbaa !5
  %63 = add nsw i64 %62, %.02852
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count81
  br i1 %exitcond82.not, label %.loopexit, label %.lr.ph54, !llvm.loop !17

.lr.ph107:                                        ; preds = %.lr.ph48.preheader, %.lr.ph48
  %indvars.iv73106 = phi i64 [ %indvars.iv.next74, %.lr.ph48 ], [ 1, %.lr.ph48.preheader ]
  %indvars.iv78105 = phi i32 [ %indvars.iv.next79, %.lr.ph48 ], [ %.lcssa, %.lr.ph48.preheader ]
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73106, 1
  %exitcond = icmp eq i64 %indvars.iv.next74, %wide.trip.count
  br i1 %exitcond, label %.loopexit.loopexit131, label %.lr.ph48, !llvm.loop !13

.loopexit.loopexit131:                            ; preds = %.lr.ph107
  %.not31.not.le150 = icmp uge i64 %indvars.iv73106, %43
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph54, %.loopexit.loopexit131, %middle.block112, %.preheader34
  %.not31.not38 = phi i1 [ %.not31.not47.lcssa, %.preheader34 ], [ %.not31.not47.lcssa, %middle.block112 ], [ %.not31.not.le150, %.loopexit.loopexit131 ], [ %.not31.not47.lcssa, %.lr.ph54 ]
  %.1 = phi i64 [ 0, %.preheader34 ], [ %60, %middle.block112 ], [ 0, %.loopexit.loopexit131 ], [ %63, %.lr.ph54 ]
  br i1 %.not31.not38, label %.preheader, label %._crit_edge

.preheader:                                       ; preds = %.preheader35, %.loopexit
  %.190 = phi i64 [ %.1, %.loopexit ], [ 0, %.preheader35 ]
  %.not3356 = icmp slt i32 %.lcssa, %42
  br i1 %.not3356, label %._crit_edge, label %.lr.ph59.preheader

.lr.ph59.preheader:                               ; preds = %.preheader
  %64 = add i32 %.lcssa, 1
  %65 = sub i32 %64, %42
  %wide.trip.count86 = zext i32 %65 to i64
  %min.iters.check = icmp ult i32 %65, 4
  br i1 %min.iters.check, label %.lr.ph59.preheader129, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph59.preheader
  %n.vec = and i64 %wide.trip.count86, 4294967292
  %66 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %.190, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %66, %vector.ph ], [ %69, %vector.body ]
  %vec.phi110 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %70, %vector.body ]
  %67 = getelementptr inbounds [35 x i64], ptr %5, i64 0, i64 %index
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  %wide.load = load <2 x i64>, ptr %67, align 16, !tbaa !5
  %wide.load111 = load <2 x i64>, ptr %68, align 16, !tbaa !5
  %69 = add <2 x i64> %wide.load, %vec.phi
  %70 = add <2 x i64> %wide.load111, %vec.phi110
  %index.next = add nuw i64 %index, 4
  %71 = icmp eq i64 %index.next, %n.vec
  br i1 %71, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %70, %69
  %72 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count86
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph59.preheader129

.lr.ph59.preheader129:                            ; preds = %middle.block, %.lr.ph59.preheader
  %indvars.iv83.ph = phi i64 [ 0, %.lr.ph59.preheader ], [ %n.vec, %middle.block ]
  %.257.ph = phi i64 [ %.190, %.lr.ph59.preheader ], [ %72, %middle.block ]
  br label %.lr.ph59

.lr.ph59:                                         ; preds = %.lr.ph59.preheader129, %.lr.ph59
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %.lr.ph59 ], [ %indvars.iv83.ph, %.lr.ph59.preheader129 ]
  %.257 = phi i64 [ %75, %.lr.ph59 ], [ %.257.ph, %.lr.ph59.preheader129 ]
  %73 = getelementptr inbounds [35 x i64], ptr %5, i64 0, i64 %indvars.iv83
  %74 = load i64, ptr %73, align 8, !tbaa !5
  %75 = add nsw i64 %74, %.257
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %._crit_edge, label %.lr.ph59, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph59, %middle.block, %.preheader, %.loopexit
  %.2.lcssa.sink = phi i64 [ %.1, %.loopexit ], [ %.190, %.preheader ], [ %72, %middle.block ], [ %75, %.lr.ph59 ]
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.2.lcssa.sink)
  %77 = load i32, ptr %1, align 4, !tbaa !9
  %78 = add nsw i32 %77, -1
  store i32 %78, ptr %1, align 4, !tbaa !9
  %.not = icmp eq i32 %77, 0
  br i1 %.not, label %._crit_edge64, label %.lr.ph63, !llvm.loop !20

._crit_edge64:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 280, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 140, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #3

attributes #0 = { mustprogress nofree 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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, !16}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !12, !16, !15}
!18 = distinct !{!18, !12, !15, !16}
!19 = distinct !{!19, !12, !16, !15}
!20 = distinct !{!20, !12}


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