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

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@grid = external dso_local global [101 x [101 x i32]], align 16
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@sum = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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
  store i32 0, ptr %1, align 4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  br label %8

8:                                                ; preds = %44, %0
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr @n, align 4, !tbaa !5
  %11 = icmp ne i32 %9, 0
  br i1 %11, label %12, label %45

12:                                               ; preds = %8
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @a, ptr noundef @b)
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @c, ptr noundef @d)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  %15 = load i32, ptr @a, align 4, !tbaa !5
  store i32 %15, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %41, %12
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @c, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %44

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  %22 = load i32, ptr @b, align 4, !tbaa !5
  store i32 %22, ptr %4, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %37, %21
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load i32, ptr @d, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %30
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [101 x i32], ptr %31, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %34, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %28
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !5
  br label %23, !llvm.loop !9

40:                                               ; preds = %27
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !11

44:                                               ; preds = %20
  br label %8, !llvm.loop !12

45:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %69, %45
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = icmp sle i32 %47, 100
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %72

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

51:                                               ; preds = %65, %50
  %52 = load i32, ptr %6, align 4, !tbaa !5
  %53 = icmp sle i32 %52, 100
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %51
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %57
  %59 = load i32, ptr %6, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [101 x i32], ptr %58, i64 0, i64 %60
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = load i32, ptr @sum, align 4, !tbaa !5
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr @sum, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %55
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %6, align 4, !tbaa !5
  br label %51, !llvm.loop !13

68:                                               ; preds = %54
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %5, align 4, !tbaa !5
  br label %46, !llvm.loop !14

72:                                               ; preds = %49
  %73 = load i32, ptr @sum, align 4, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %73)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

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


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@grid = external dso_local local_unnamed_addr global [101 x [101 x i32]], align 16
@a = external dso_local global i32, align 4
@b = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@sum = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @n, align 4, !tbaa !5
  %.not24 = icmp eq i32 %2, 0
  br i1 %.not24, label %.preheader17, label %.lr.ph26

.loopexit:                                        ; preds = %._crit_edge, %.lr.ph23, %.lr.ph26
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @n, align 4, !tbaa !5
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %.preheader17, label %.lr.ph26, !llvm.loop !9

.preheader17:                                     ; preds = %.loopexit, %0
  %sum.promoted28 = load i32, ptr @sum, align 4, !tbaa !5
  br label %vector.ph50

.lr.ph26:                                         ; preds = %0, %.loopexit
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @a, ptr noundef nonnull @b)
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @c, ptr noundef nonnull @d)
  %8 = load i32, ptr @a, align 4, !tbaa !5
  %9 = load i32, ptr @c, align 4, !tbaa !5
  %.not1520 = icmp sgt i32 %8, %9
  br i1 %.not1520, label %.loopexit, label %.lr.ph23

.lr.ph23:                                         ; preds = %.lr.ph26
  %10 = load i32, ptr @b, align 4, !tbaa !5
  %11 = load i32, ptr @d, align 4, !tbaa !5
  %.not1618 = icmp sgt i32 %10, %11
  br i1 %.not1618, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.lr.ph23
  %12 = sext i32 %10 to i64
  %13 = add i32 %11, 1
  %14 = sext i32 %8 to i64
  %15 = add i32 %9, 1
  %16 = sub i32 %11, %10
  %17 = zext i32 %16 to i64
  %18 = add nuw nsw i64 %17, 1
  %min.iters.check = icmp ult i32 %16, 7
  %n.vec = and i64 %18, 8589934584
  %ind.end = add nsw i64 %n.vec, %12
  %cmp.n = icmp eq i64 %18, %n.vec
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %._crit_edge
  %indvars.iv34 = phi i64 [ %14, %.lr.ph.preheader ], [ %indvars.iv.next35, %._crit_edge ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ %12, %.lr.ph ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.body:                                      ; preds = %.lr.ph, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph ]
  %offset.idx = add i64 %index, %12
  %19 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv34, i64 %offset.idx
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  %wide.load = load <4 x i32>, ptr %19, align 4, !tbaa !5
  %wide.load47 = load <4 x i32>, ptr %20, align 4, !tbaa !5
  %21 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %22 = add nsw <4 x i32> %wide.load47, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %21, ptr %19, align 4, !tbaa !5
  store <4 x i32> %22, ptr %20, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %indvars.iv.next35 = add nsw i64 %indvars.iv34, 1
  %lftr.wideiv37 = trunc i64 %indvars.iv.next35 to i32
  %exitcond38.not = icmp eq i32 %15, %lftr.wideiv37
  br i1 %exitcond38.not, label %.loopexit, label %.lr.ph, !llvm.loop !14

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %24 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv34, i64 %indvars.iv
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %24, align 4, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %13, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !15

vector.ph50:                                      ; preds = %vector.ph50, %.preheader17
  %indvars.iv43 = phi i64 [ 1, %.preheader17 ], [ %indvars.iv.next44, %vector.ph50 ]
  %.lcssa2930 = phi i32 [ %sum.promoted28, %.preheader17 ], [ %87, %vector.ph50 ]
  %27 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 1
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %wide.load57 = load <4 x i32>, ptr %28, align 4, !tbaa !5
  %29 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 9
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %wide.load57.1 = load <4 x i32>, ptr %30, align 4, !tbaa !5
  %31 = add <4 x i32> %wide.load57, %wide.load57.1
  %32 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 17
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load57.2 = load <4 x i32>, ptr %33, align 4, !tbaa !5
  %34 = add <4 x i32> %31, %wide.load57.2
  %35 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 25
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %wide.load57.3 = load <4 x i32>, ptr %36, align 4, !tbaa !5
  %37 = add <4 x i32> %34, %wide.load57.3
  %38 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 33
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %wide.load57.4 = load <4 x i32>, ptr %39, align 4, !tbaa !5
  %40 = add <4 x i32> %37, %wide.load57.4
  %41 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 41
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load57.5 = load <4 x i32>, ptr %42, align 4, !tbaa !5
  %43 = add <4 x i32> %40, %wide.load57.5
  %44 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 49
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load57.6 = load <4 x i32>, ptr %45, align 4, !tbaa !5
  %46 = add <4 x i32> %43, %wide.load57.6
  %47 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 57
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %wide.load57.7 = load <4 x i32>, ptr %48, align 4, !tbaa !5
  %49 = add <4 x i32> %46, %wide.load57.7
  %50 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 65
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  %wide.load57.8 = load <4 x i32>, ptr %51, align 4, !tbaa !5
  %52 = add <4 x i32> %49, %wide.load57.8
  %53 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 73
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %wide.load57.9 = load <4 x i32>, ptr %54, align 4, !tbaa !5
  %55 = add <4 x i32> %52, %wide.load57.9
  %56 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 81
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %wide.load57.10 = load <4 x i32>, ptr %57, align 4, !tbaa !5
  %58 = add <4 x i32> %55, %wide.load57.10
  %59 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 89
  %60 = getelementptr inbounds i8, ptr %59, i64 16
  %wide.load57.11 = load <4 x i32>, ptr %60, align 4, !tbaa !5
  %61 = add <4 x i32> %58, %wide.load57.11
  %62 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.lcssa2930, i64 0
  %wide.load56 = load <4 x i32>, ptr %27, align 4, !tbaa !5
  %63 = add <4 x i32> %62, %wide.load56
  %wide.load56.1 = load <4 x i32>, ptr %29, align 4, !tbaa !5
  %64 = add <4 x i32> %63, %wide.load56.1
  %wide.load56.2 = load <4 x i32>, ptr %32, align 4, !tbaa !5
  %65 = add <4 x i32> %64, %wide.load56.2
  %wide.load56.3 = load <4 x i32>, ptr %35, align 4, !tbaa !5
  %66 = add <4 x i32> %65, %wide.load56.3
  %wide.load56.4 = load <4 x i32>, ptr %38, align 4, !tbaa !5
  %67 = add <4 x i32> %66, %wide.load56.4
  %wide.load56.5 = load <4 x i32>, ptr %41, align 4, !tbaa !5
  %68 = add <4 x i32> %67, %wide.load56.5
  %wide.load56.6 = load <4 x i32>, ptr %44, align 4, !tbaa !5
  %69 = add <4 x i32> %68, %wide.load56.6
  %wide.load56.7 = load <4 x i32>, ptr %47, align 4, !tbaa !5
  %70 = add <4 x i32> %69, %wide.load56.7
  %wide.load56.8 = load <4 x i32>, ptr %50, align 4, !tbaa !5
  %71 = add <4 x i32> %70, %wide.load56.8
  %wide.load56.9 = load <4 x i32>, ptr %53, align 4, !tbaa !5
  %72 = add <4 x i32> %71, %wide.load56.9
  %wide.load56.10 = load <4 x i32>, ptr %56, align 4, !tbaa !5
  %73 = add <4 x i32> %72, %wide.load56.10
  %wide.load56.11 = load <4 x i32>, ptr %59, align 4, !tbaa !5
  %74 = add <4 x i32> %73, %wide.load56.11
  %bin.rdx = add <4 x i32> %61, %74
  %75 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %76 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 97
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %75, %77
  %79 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 98
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %78, %80
  %82 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 99
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = add nsw i32 %81, %83
  %85 = getelementptr inbounds [101 x [101 x i32]], ptr @grid, i64 0, i64 %indvars.iv43, i64 100
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = add nsw i32 %84, %86
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next44, 101
  br i1 %exitcond46.not, label %88, label %vector.ph50, !llvm.loop !16

88:                                               ; preds = %vector.ph50
  store i32 %87, ptr @sum, align 4, !tbaa !5
  %89 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %87)
  %90 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %89, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #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 = { 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 #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 = { 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 #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) }

!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, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !13, !12}
!16 = distinct !{!16, !10}


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