; LLVM IR from TLE-MEC/Hack-CP-DSA :: Codechef/Kitchen TimeTable (solution)

; 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_istream" = type { ptr, i64, %"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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %114, %0
  %17 = load i32, ptr %3, align 4, !tbaa !5
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %23 = load i32, ptr %5, align 4, !tbaa !5
  %24 = zext i32 %23 to i64
  %25 = call ptr @llvm.stacksave.p0()
  store ptr %25, ptr %6, align 8
  %26 = alloca i32, i64 %24, align 16
  store i64 %24, ptr %7, align 8
  %27 = load i32, ptr %5, align 4, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = alloca i32, i64 %28, align 16
  store i64 %28, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %40, %21
  %31 = load i32, ptr %9, align 4, !tbaa !5
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %43

35:                                               ; preds = %30
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %26, i64 %37
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %38)
  br label %40

40:                                               ; preds = %35
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %9, align 4, !tbaa !5
  br label %30, !llvm.loop !9

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

44:                                               ; preds = %54, %43
  %45 = load i32, ptr %10, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

48:                                               ; preds = %44
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %57

49:                                               ; preds = %44
  %50 = load i32, ptr %10, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds i32, ptr %29, i64 %51
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %52)
  br label %54

54:                                               ; preds = %49
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %10, align 4, !tbaa !5
  br label %44, !llvm.loop !11

57:                                               ; preds = %48
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = zext i32 %58 to i64
  %60 = alloca i32, i64 %59, align 16
  store i64 %59, ptr %11, align 8
  %61 = getelementptr inbounds i32, ptr %26, i64 0
  %62 = load i32, ptr %61, align 16, !tbaa !5
  %63 = getelementptr inbounds i32, ptr %60, i64 0
  store i32 %62, ptr %63, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %83, %57
  %65 = load i32, ptr %12, align 4, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %64
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %86

69:                                               ; preds = %64
  %70 = load i32, ptr %12, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %26, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = load i32, ptr %12, align 4, !tbaa !5
  %75 = sub nsw i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds i32, ptr %26, i64 %76
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = sub nsw i32 %73, %78
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr %60, i64 %81
  store i32 %79, ptr %82, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %69
  %84 = load i32, ptr %12, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %12, align 4, !tbaa !5
  br label %64, !llvm.loop !12

86:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %106, %86
  %88 = load i32, ptr %14, align 4, !tbaa !5
  %89 = load i32, ptr %5, align 4, !tbaa !5
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %109

92:                                               ; preds = %87
  %93 = load i32, ptr %14, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %29, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = load i32, ptr %14, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %60, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp sle i32 %96, %100
  br i1 %101, label %102, label %105

102:                                              ; preds = %92
  %103 = load i32, ptr %13, align 4, !tbaa !5
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %13, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %102, %92
  br label %106

106:                                              ; preds = %105
  %107 = load i32, ptr %14, align 4, !tbaa !5
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %14, align 4, !tbaa !5
  br label %87, !llvm.loop !13

109:                                              ; preds = %91
  %110 = load i32, ptr %13, align 4, !tbaa !5
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %110)
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  %113 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %113)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %114

114:                                              ; preds = %109
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %3, align 4, !tbaa !5
  br label %16, !llvm.loop !14

117:                                              ; preds = %20
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %118 = load i32, ptr %1, align 4
  ret i32 %118
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 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)) #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 willreturn }
attributes #4 = { 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 = { 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 }

!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_istream" = type { ptr, i64, %"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 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_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 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %3 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph40, label %._crit_edge41

._crit_edge41:                                    ; preds = %._crit_edge36, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

.lr.ph40:                                         ; preds = %0, %._crit_edge36
  %.02438 = phi i32 [ %61, %._crit_edge36 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = zext i32 %7 to i64
  %9 = call ptr @llvm.stacksave.p0()
  %10 = alloca i32, i64 %8, align 16
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = zext i32 %11 to i64
  %13 = alloca i32, i64 %12, align 16
  %14 = icmp sgt i32 %11, 0
  br i1 %14, label %.lr.ph, label %._crit_edge36

.preheader26:                                     ; preds = %.lr.ph
  %15 = icmp sgt i32 %18, 0
  br i1 %15, label %.lr.ph29, label %._crit_edge36

.lr.ph:                                           ; preds = %.lr.ph40, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph40 ]
  %16 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %.preheader26, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph29
  %21 = zext i32 %37 to i64
  %22 = alloca i32, i64 %21, align 16
  %23 = load i32, ptr %10, align 16, !tbaa !5
  store i32 %23, ptr %22, align 16, !tbaa !5
  %24 = icmp sgt i32 %37, 1
  br i1 %24, label %.lr.ph32.preheader, label %.preheader

.lr.ph32.preheader:                               ; preds = %._crit_edge
  %25 = add nsw i64 %21, -1
  %min.iters.check66 = icmp ult i32 %37, 9
  br i1 %min.iters.check66, label %.lr.ph32.preheader80, label %vector.ph67

.lr.ph32.preheader80:                             ; preds = %middle.block64, %.lr.ph32.preheader
  %indvars.iv47.ph = phi i64 [ 1, %.lr.ph32.preheader ], [ %ind.end, %middle.block64 ]
  br label %.lr.ph32

vector.ph67:                                      ; preds = %.lr.ph32.preheader
  %n.vec69 = and i64 %25, -8
  %ind.end = or disjoint i64 %n.vec69, 1
  br label %vector.body71

vector.body71:                                    ; preds = %vector.body71, %vector.ph67
  %index72 = phi i64 [ 0, %vector.ph67 ], [ %index.next77, %vector.body71 ]
  %offset.idx = or disjoint i64 %index72, 1
  %26 = getelementptr inbounds i32, ptr %10, i64 %offset.idx
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %wide.load73 = load <4 x i32>, ptr %26, align 4, !tbaa !5
  %wide.load74 = load <4 x i32>, ptr %27, align 4, !tbaa !5
  %28 = getelementptr i8, ptr %26, i64 -4
  %29 = getelementptr i8, ptr %26, i64 12
  %wide.load75 = load <4 x i32>, ptr %28, align 16, !tbaa !5
  %wide.load76 = load <4 x i32>, ptr %29, align 16, !tbaa !5
  %30 = sub nsw <4 x i32> %wide.load73, %wide.load75
  %31 = sub nsw <4 x i32> %wide.load74, %wide.load76
  %32 = getelementptr inbounds i32, ptr %22, i64 %offset.idx
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  store <4 x i32> %30, ptr %32, align 4, !tbaa !5
  store <4 x i32> %31, ptr %33, align 4, !tbaa !5
  %index.next77 = add nuw i64 %index72, 8
  %34 = icmp eq i64 %index.next77, %n.vec69
  br i1 %34, label %middle.block64, label %vector.body71, !llvm.loop !11

middle.block64:                                   ; preds = %vector.body71
  %cmp.n78 = icmp eq i64 %25, %n.vec69
  br i1 %cmp.n78, label %.preheader, label %.lr.ph32.preheader80

.lr.ph29:                                         ; preds = %.preheader26, %.lr.ph29
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %.lr.ph29 ], [ 0, %.preheader26 ]
  %35 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv44
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %35)
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %37 = load i32, ptr %2, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = icmp slt i64 %indvars.iv.next45, %38
  br i1 %39, label %.lr.ph29, label %._crit_edge, !llvm.loop !14

.preheader:                                       ; preds = %.lr.ph32, %middle.block64, %._crit_edge
  %40 = icmp sgt i32 %37, 0
  br i1 %40, label %.lr.ph35.preheader, label %._crit_edge36

.lr.ph35.preheader:                               ; preds = %.preheader
  %min.iters.check = icmp ult i32 %37, 8
  br i1 %min.iters.check, label %.lr.ph35.preheader79, label %vector.ph

.lr.ph35.preheader79:                             ; preds = %middle.block, %.lr.ph35.preheader
  %indvars.iv50.ph = phi i64 [ 0, %.lr.ph35.preheader ], [ %n.vec, %middle.block ]
  %.02033.ph = phi i32 [ 0, %.lr.ph35.preheader ], [ %52, %middle.block ]
  br label %.lr.ph35

vector.ph:                                        ; preds = %.lr.ph35.preheader
  %n.vec = and i64 %21, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %49, %vector.body ]
  %vec.phi60 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %50, %vector.body ]
  %41 = getelementptr inbounds i32, ptr %13, i64 %index
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %wide.load = load <4 x i32>, ptr %41, align 16, !tbaa !5
  %wide.load61 = load <4 x i32>, ptr %42, align 16, !tbaa !5
  %43 = getelementptr inbounds i32, ptr %22, i64 %index
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %wide.load62 = load <4 x i32>, ptr %43, align 16, !tbaa !5
  %wide.load63 = load <4 x i32>, ptr %44, align 16, !tbaa !5
  %45 = icmp sle <4 x i32> %wide.load, %wide.load62
  %46 = icmp sle <4 x i32> %wide.load61, %wide.load63
  %47 = zext <4 x i1> %45 to <4 x i32>
  %48 = zext <4 x i1> %46 to <4 x i32>
  %49 = add <4 x i32> %vec.phi, %47
  %50 = add <4 x i32> %vec.phi60, %48
  %index.next = add nuw i64 %index, 8
  %51 = icmp eq i64 %index.next, %n.vec
  br i1 %51, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %50, %49
  %52 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %21
  br i1 %cmp.n, label %._crit_edge36, label %.lr.ph35.preheader79

.lr.ph32:                                         ; preds = %.lr.ph32.preheader80, %.lr.ph32
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %.lr.ph32 ], [ %indvars.iv47.ph, %.lr.ph32.preheader80 ]
  %53 = getelementptr inbounds i32, ptr %10, i64 %indvars.iv47
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = getelementptr i8, ptr %53, i64 -4
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = sub nsw i32 %54, %56
  %58 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv47
  store i32 %57, ptr %58, align 4, !tbaa !5
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next48, %21
  br i1 %exitcond.not, label %.preheader, label %.lr.ph32, !llvm.loop !16

._crit_edge36:                                    ; preds = %.lr.ph35, %middle.block, %.preheader26, %.lr.ph40, %.preheader
  %.020.lcssa = phi i32 [ 0, %.preheader ], [ 0, %.lr.ph40 ], [ 0, %.preheader26 ], [ %52, %middle.block ], [ %spec.select, %.lr.ph35 ]
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.020.lcssa)
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.stackrestore.p0(ptr %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %61 = add nuw nsw i32 %.02438, 1
  %62 = load i32, ptr %1, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %.lr.ph40, label %._crit_edge41, !llvm.loop !17

.lr.ph35:                                         ; preds = %.lr.ph35.preheader79, %.lr.ph35
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %.lr.ph35 ], [ %indvars.iv50.ph, %.lr.ph35.preheader79 ]
  %.02033 = phi i32 [ %spec.select, %.lr.ph35 ], [ %.02033.ph, %.lr.ph35.preheader79 ]
  %64 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv50
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv50
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %.not = icmp sle i32 %65, %67
  %68 = zext i1 %.not to i32
  %spec.select = add nuw nsw i32 %.02033, %68
  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next51, %21
  br i1 %exitcond54.not, label %._crit_edge36, label %.lr.ph35, !llvm.loop !18
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 #4 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)) #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6

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 = { "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 nosync nounwind willreturn }
attributes #4 = { 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !12, !13}
!16 = distinct !{!16, !10, !13, !12}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !13, !12}


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