; LLVM IR from DionysiosB/CodeForces :: 0200-0299 (276C-LittleGirlAndMaximumSum)

; 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 [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 0, ptr %3, align 8, !tbaa !5
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = add nsw i64 %14, 1
  %16 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %15, i64 8)
  %17 = extractvalue { i64, i1 } %16, 1
  %18 = extractvalue { i64, i1 } %16, 0
  %19 = select i1 %17, i64 -1, i64 %18
  %20 = call noalias noundef nonnull ptr @_Znam(i64 noundef %19) #7
  store ptr %20, ptr %4, align 8, !tbaa !9
  %21 = load ptr, ptr %4, align 8, !tbaa !9
  %22 = getelementptr inbounds i64, ptr %21, i64 0
  store i64 0, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = add nsw i64 %23, 1
  %25 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %24, i64 8)
  %26 = extractvalue { i64, i1 } %25, 1
  %27 = extractvalue { i64, i1 } %25, 0
  %28 = select i1 %26, i64 -1, i64 %27
  %29 = call noalias noundef nonnull ptr @_Znam(i64 noundef %28) #7
  store ptr %29, ptr %5, align 8, !tbaa !9
  %30 = load ptr, ptr %5, align 8, !tbaa !9
  %31 = getelementptr inbounds i64, ptr %30, i64 0
  store i64 0, ptr %31, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 1, ptr %6, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %45, %0
  %33 = load i64, ptr %6, align 8, !tbaa !5
  %34 = load i64, ptr %2, align 8, !tbaa !5
  %35 = icmp sle i64 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %48

37:                                               ; preds = %32
  %38 = load ptr, ptr %4, align 8, !tbaa !9
  %39 = load i64, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds i64, ptr %38, i64 %39
  %41 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %40)
  %42 = load ptr, ptr %5, align 8, !tbaa !9
  %43 = load i64, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds i64, ptr %42, i64 %43
  store i64 0, ptr %44, align 8, !tbaa !11
  br label %45

45:                                               ; preds = %37
  %46 = load i64, ptr %6, align 8, !tbaa !5
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %6, align 8, !tbaa !5
  br label %32, !llvm.loop !13

48:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 0, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %72, %48
  %50 = load i64, ptr %9, align 8, !tbaa !5
  %51 = load i64, ptr %3, align 8, !tbaa !5
  %52 = icmp slt i64 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %75

54:                                               ; preds = %49
  %55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %7, ptr noundef %8)
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = load i64, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds i64, ptr %56, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !11
  %60 = add nsw i64 %59, 1
  store i64 %60, ptr %58, align 8, !tbaa !11
  %61 = load i64, ptr %8, align 8, !tbaa !5
  %62 = load i64, ptr %2, align 8, !tbaa !5
  %63 = icmp slt i64 %61, %62
  br i1 %63, label %64, label %71

64:                                               ; preds = %54
  %65 = load ptr, ptr %5, align 8, !tbaa !9
  %66 = load i64, ptr %8, align 8, !tbaa !5
  %67 = add nsw i64 %66, 1
  %68 = getelementptr inbounds i64, ptr %65, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !11
  %70 = add nsw i64 %69, -1
  store i64 %70, ptr %68, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %64, %54
  br label %72

72:                                               ; preds = %71
  %73 = load i64, ptr %9, align 8, !tbaa !5
  %74 = add nsw i64 %73, 1
  store i64 %74, ptr %9, align 8, !tbaa !5
  br label %49, !llvm.loop !15

75:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 2, ptr %10, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %92, %75
  %77 = load i64, ptr %10, align 8, !tbaa !5
  %78 = load i64, ptr %2, align 8, !tbaa !5
  %79 = icmp sle i64 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %95

81:                                               ; preds = %76
  %82 = load ptr, ptr %5, align 8, !tbaa !9
  %83 = load i64, ptr %10, align 8, !tbaa !5
  %84 = sub nsw i64 %83, 1
  %85 = getelementptr inbounds i64, ptr %82, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = load ptr, ptr %5, align 8, !tbaa !9
  %88 = load i64, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds i64, ptr %87, i64 %88
  %90 = load i64, ptr %89, align 8, !tbaa !11
  %91 = add nsw i64 %90, %86
  store i64 %91, ptr %89, align 8, !tbaa !11
  br label %92

92:                                               ; preds = %81
  %93 = load i64, ptr %10, align 8, !tbaa !5
  %94 = add nsw i64 %93, 1
  store i64 %94, ptr %10, align 8, !tbaa !5
  br label %76, !llvm.loop !16

95:                                               ; preds = %80
  %96 = load ptr, ptr %4, align 8, !tbaa !9
  %97 = load ptr, ptr %4, align 8, !tbaa !9
  %98 = load i64, ptr %2, align 8, !tbaa !5
  %99 = getelementptr inbounds i64, ptr %97, i64 %98
  %100 = getelementptr inbounds i64, ptr %99, i64 1
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef %96, ptr noundef %100)
  %101 = load ptr, ptr %5, align 8, !tbaa !9
  %102 = load ptr, ptr %5, align 8, !tbaa !9
  %103 = load i64, ptr %2, align 8, !tbaa !5
  %104 = getelementptr inbounds i64, ptr %102, i64 %103
  %105 = getelementptr inbounds i64, ptr %104, i64 1
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef %101, ptr noundef %105)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 1, ptr %12, align 8, !tbaa !5
  br label %106

106:                                              ; preds = %123, %95
  %107 = load i64, ptr %12, align 8, !tbaa !5
  %108 = load i64, ptr %2, align 8, !tbaa !5
  %109 = icmp sle i64 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %126

111:                                              ; preds = %106
  %112 = load ptr, ptr %5, align 8, !tbaa !9
  %113 = load i64, ptr %12, align 8, !tbaa !5
  %114 = getelementptr inbounds i64, ptr %112, i64 %113
  %115 = load i64, ptr %114, align 8, !tbaa !11
  %116 = load ptr, ptr %4, align 8, !tbaa !9
  %117 = load i64, ptr %12, align 8, !tbaa !5
  %118 = getelementptr inbounds i64, ptr %116, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !11
  %120 = mul nsw i64 %115, %119
  %121 = load i64, ptr %11, align 8, !tbaa !11
  %122 = add nsw i64 %121, %120
  store i64 %122, ptr %11, align 8, !tbaa !11
  br label %123

123:                                              ; preds = %111
  %124 = load i64, ptr %12, align 8, !tbaa !5
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %12, align 8, !tbaa !5
  br label %106, !llvm.loop !17

126:                                              ; preds = %110
  %127 = load i64, ptr %11, align 8, !tbaa !11
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %127)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  ret i32 0
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) #5

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

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


; 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 [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  store i64 0, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  store i64 0, ptr %2, align 8, !tbaa !5
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = add nsw i64 %6, 1
  %8 = icmp ugt i64 %7, 2305843009213693951
  %9 = shl i64 %7, 3
  %10 = select i1 %8, i64 -1, i64 %9
  %11 = call noalias noundef nonnull ptr @_Znam(i64 noundef %10) #7
  store i64 0, ptr %11, align 8, !tbaa !9
  %12 = call noalias noundef nonnull ptr @_Znam(i64 noundef %10) #7
  store i64 0, ptr %12, align 8, !tbaa !9
  %.not37 = icmp slt i64 %6, 1
  br i1 %.not37, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %13 = phi i64 [ %6, %0 ], [ %20, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store i64 0, ptr %4, align 8, !tbaa !5
  %invariant.gep = getelementptr i8, ptr %12, i64 8
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph41, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.03238 = phi i64 [ %19, %.lr.ph ], [ 1, %0 ]
  %16 = getelementptr inbounds i64, ptr %11, i64 %.03238
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %16)
  %18 = getelementptr inbounds i64, ptr %12, i64 %.03238
  store i64 0, ptr %18, align 8, !tbaa !9
  %19 = add nuw nsw i64 %.03238, 1
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.03238, %20
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %36, %._crit_edge
  %21 = phi i64 [ %13, %._crit_edge ], [ %31, %36 ]
  %.not3542 = icmp slt i64 %21, 2
  br i1 %.not3542, label %._crit_edge45, label %.lr.ph44.preheader

.lr.ph44.preheader:                               ; preds = %.preheader
  %load_initial = load i64, ptr %invariant.gep, align 8
  %22 = add nsw i64 %21, -1
  %23 = add nsw i64 %21, -2
  %xtraiter = and i64 %22, 3
  %24 = icmp ult i64 %23, 3
  br i1 %24, label %._crit_edge45.loopexit.unr-lcssa, label %.lr.ph44.preheader.new

.lr.ph44.preheader.new:                           ; preds = %.lr.ph44.preheader
  %unroll_iter = and i64 %22, -4
  %invariant.gep73 = getelementptr i8, ptr %12, i64 16
  %invariant.gep75 = getelementptr i8, ptr %12, i64 24
  br label %.lr.ph44

.lr.ph41:                                         ; preds = %._crit_edge, %36
  %.03139 = phi i64 [ %37, %36 ], [ 0, %._crit_edge ]
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %26 = load i64, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds i64, ptr %12, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = add nsw i64 %28, 1
  store i64 %29, ptr %27, align 8, !tbaa !9
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = load i64, ptr %1, align 8, !tbaa !5
  %32 = icmp slt i64 %30, %31
  br i1 %32, label %33, label %36

33:                                               ; preds = %.lr.ph41
  %gep = getelementptr i64, ptr %invariant.gep, i64 %30
  %34 = load i64, ptr %gep, align 8, !tbaa !9
  %35 = add nsw i64 %34, -1
  store i64 %35, ptr %gep, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %.lr.ph41, %33
  %37 = add nuw nsw i64 %.03139, 1
  %38 = load i64, ptr %2, align 8, !tbaa !5
  %39 = icmp slt i64 %37, %38
  br i1 %39, label %.lr.ph41, label %.preheader, !llvm.loop !13

._crit_edge45.loopexit.unr-lcssa:                 ; preds = %.lr.ph44, %.lr.ph44.preheader
  %store_forwarded.unr = phi i64 [ %load_initial, %.lr.ph44.preheader ], [ %70, %.lr.ph44 ]
  %.03043.unr = phi i64 [ 2, %.lr.ph44.preheader ], [ %71, %.lr.ph44 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge45, label %.lr.ph44.epil

.lr.ph44.epil:                                    ; preds = %._crit_edge45.loopexit.unr-lcssa, %.lr.ph44.epil
  %store_forwarded.epil = phi i64 [ %42, %.lr.ph44.epil ], [ %store_forwarded.unr, %._crit_edge45.loopexit.unr-lcssa ]
  %.03043.epil = phi i64 [ %43, %.lr.ph44.epil ], [ %.03043.unr, %._crit_edge45.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph44.epil ], [ 0, %._crit_edge45.loopexit.unr-lcssa ]
  %40 = getelementptr i64, ptr %12, i64 %.03043.epil
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = add nsw i64 %41, %store_forwarded.epil
  store i64 %42, ptr %40, align 8, !tbaa !9
  %43 = add nuw i64 %.03043.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 %._crit_edge45, label %.lr.ph44.epil, !llvm.loop !14

._crit_edge45:                                    ; preds = %._crit_edge45.loopexit.unr-lcssa, %.lr.ph44.epil, %.preheader
  %44 = getelementptr inbounds i64, ptr %11, i64 %21
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull %11, ptr noundef nonnull %45)
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = getelementptr inbounds i64, ptr %12, i64 %46
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull %12, ptr noundef nonnull %48)
  %49 = load i64, ptr %1, align 8, !tbaa !5
  %.not3646 = icmp slt i64 %49, 1
  br i1 %.not3646, label %._crit_edge51, label %.lr.ph50.preheader

.lr.ph50.preheader:                               ; preds = %._crit_edge45
  %min.iters.check = icmp ult i64 %49, 4
  br i1 %min.iters.check, label %.lr.ph50.preheader62, label %vector.ph

.lr.ph50.preheader62:                             ; preds = %middle.block, %.lr.ph50.preheader
  %.048.ph = phi i64 [ 1, %.lr.ph50.preheader ], [ %ind.end, %middle.block ]
  %.02947.ph = phi i64 [ 0, %.lr.ph50.preheader ], [ %59, %middle.block ]
  br label %.lr.ph50

vector.ph:                                        ; preds = %.lr.ph50.preheader
  %n.vec = and i64 %49, 9223372036854775804
  %ind.end = or disjoint i64 %n.vec, 1
  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> [ zeroinitializer, %vector.ph ], [ %56, %vector.body ]
  %vec.phi58 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %57, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %50 = getelementptr inbounds i64, ptr %12, i64 %offset.idx
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %wide.load = load <2 x i64>, ptr %50, align 8, !tbaa !9
  %wide.load59 = load <2 x i64>, ptr %51, align 8, !tbaa !9
  %52 = getelementptr inbounds i64, ptr %11, i64 %offset.idx
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  %wide.load60 = load <2 x i64>, ptr %52, align 8, !tbaa !9
  %wide.load61 = load <2 x i64>, ptr %53, align 8, !tbaa !9
  %54 = mul nsw <2 x i64> %wide.load60, %wide.load
  %55 = mul nsw <2 x i64> %wide.load61, %wide.load59
  %56 = add <2 x i64> %54, %vec.phi
  %57 = add <2 x i64> %55, %vec.phi58
  %index.next = add nuw i64 %index, 4
  %58 = icmp eq i64 %index.next, %n.vec
  br i1 %58, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %57, %56
  %59 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %49, %n.vec
  br i1 %cmp.n, label %._crit_edge51, label %.lr.ph50.preheader62

.lr.ph44:                                         ; preds = %.lr.ph44, %.lr.ph44.preheader.new
  %store_forwarded = phi i64 [ %load_initial, %.lr.ph44.preheader.new ], [ %70, %.lr.ph44 ]
  %.03043 = phi i64 [ 2, %.lr.ph44.preheader.new ], [ %71, %.lr.ph44 ]
  %niter = phi i64 [ 0, %.lr.ph44.preheader.new ], [ %niter.next.3, %.lr.ph44 ]
  %60 = getelementptr i64, ptr %12, i64 %.03043
  %61 = load i64, ptr %60, align 8, !tbaa !9
  %62 = add nsw i64 %61, %store_forwarded
  store i64 %62, ptr %60, align 8, !tbaa !9
  %63 = or disjoint i64 %.03043, 1
  %64 = getelementptr i64, ptr %12, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !9
  %66 = add nsw i64 %65, %62
  store i64 %66, ptr %64, align 8, !tbaa !9
  %gep74 = getelementptr i64, ptr %invariant.gep73, i64 %.03043
  %67 = load i64, ptr %gep74, align 8, !tbaa !9
  %68 = add nsw i64 %67, %66
  store i64 %68, ptr %gep74, align 8, !tbaa !9
  %gep76 = getelementptr i64, ptr %invariant.gep75, i64 %.03043
  %69 = load i64, ptr %gep76, align 8, !tbaa !9
  %70 = add nsw i64 %69, %68
  store i64 %70, ptr %gep76, align 8, !tbaa !9
  %71 = add nuw i64 %.03043, 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 %._crit_edge45.loopexit.unr-lcssa, label %.lr.ph44, !llvm.loop !19

._crit_edge51:                                    ; preds = %.lr.ph50, %middle.block, %._crit_edge45
  %.029.lcssa = phi i64 [ 0, %._crit_edge45 ], [ %59, %middle.block ], [ %78, %.lr.ph50 ]
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %.029.lcssa)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  ret i32 0

.lr.ph50:                                         ; preds = %.lr.ph50.preheader62, %.lr.ph50
  %.048 = phi i64 [ %79, %.lr.ph50 ], [ %.048.ph, %.lr.ph50.preheader62 ]
  %.02947 = phi i64 [ %78, %.lr.ph50 ], [ %.02947.ph, %.lr.ph50.preheader62 ]
  %73 = getelementptr inbounds i64, ptr %12, i64 %.048
  %74 = load i64, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds i64, ptr %11, i64 %.048
  %76 = load i64, ptr %75, align 8, !tbaa !9
  %77 = mul nsw i64 %76, %74
  %78 = add nsw i64 %77, %.02947
  %79 = add nuw i64 %.048, 1
  %exitcond53.not = icmp eq i64 %.048, %49
  br i1 %exitcond53.not, label %._crit_edge51, label %.lr.ph50, !llvm.loop !20
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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 = { 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !12, !17, !18}
!17 = !{!"llvm.loop.isvectorized", i32 1}
!18 = !{!"llvm.loop.unroll.runtime.disable"}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12, !18, !17}


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