; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/URI/2419 (main)

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

@vet = external dso_local global <{ <{ i8, [999 x i8] }>, [999 x <{ i8, [999 x i8] }>] }>, align 16
@_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 i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  %11 = 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)
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %37, %0
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

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

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

19:                                               ; preds = %33, %18
  %20 = load i32, ptr %8, align 4, !tbaa !5
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

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

24:                                               ; preds = %19
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %26 = load i8, ptr %5, align 1, !tbaa !9
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %28
  %30 = load i32, ptr %8, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [1000 x i8], ptr %29, i64 0, i64 %31
  store i8 %26, ptr %32, align 1, !tbaa !9
  br label %33

33:                                               ; preds = %24
  %34 = load i32, ptr %8, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %8, align 4, !tbaa !5
  br label %19, !llvm.loop !10

36:                                               ; preds = %23
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %6, align 4, !tbaa !5
  br label %13, !llvm.loop !12

40:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %41

41:                                               ; preds = %149, %40
  %42 = load i32, ptr %9, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %152

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

47:                                               ; preds = %145, %46
  %48 = load i32, ptr %10, align 4, !tbaa !5
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 11, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %148

52:                                               ; preds = %47
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %54
  %56 = load i32, ptr %10, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1000 x i8], ptr %55, i64 0, i64 %57
  %59 = load i8, ptr %58, align 1, !tbaa !9
  %60 = sext i8 %59 to i32
  %61 = icmp eq i32 %60, 35
  br i1 %61, label %62, label %144

62:                                               ; preds = %52
  %63 = load i32, ptr %9, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %140, label %65

65:                                               ; preds = %62
  %66 = load i32, ptr %10, align 4, !tbaa !5
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %140, label %68

68:                                               ; preds = %65
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = load i32, ptr %2, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  %72 = icmp eq i32 %69, %71
  br i1 %72, label %140, label %73

73:                                               ; preds = %68
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sub nsw i32 %75, 1
  %77 = icmp eq i32 %74, %76
  br i1 %77, label %140, label %78

78:                                               ; preds = %73
  %79 = load i32, ptr %9, align 4, !tbaa !5
  %80 = sub nsw i32 %79, 1
  %81 = icmp sge i32 %80, 0
  br i1 %81, label %82, label %93

82:                                               ; preds = %78
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %85
  %87 = load i32, ptr %10, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1000 x i8], ptr %86, i64 0, i64 %88
  %90 = load i8, ptr %89, align 1, !tbaa !9
  %91 = sext i8 %90 to i32
  %92 = icmp eq i32 %91, 46
  br i1 %92, label %140, label %93

93:                                               ; preds = %82, %78
  %94 = load i32, ptr %9, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  %96 = load i32, ptr %2, align 4, !tbaa !5
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %98, label %109

98:                                               ; preds = %93
  %99 = load i32, ptr %9, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %101
  %103 = load i32, ptr %10, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [1000 x i8], ptr %102, i64 0, i64 %104
  %106 = load i8, ptr %105, align 1, !tbaa !9
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 46
  br i1 %108, label %140, label %109

109:                                              ; preds = %98, %93
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = sub nsw i32 %110, 1
  %112 = icmp sge i32 %111, 0
  br i1 %112, label %113, label %124

113:                                              ; preds = %109
  %114 = load i32, ptr %9, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %115
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = sub nsw i32 %117, 1
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [1000 x i8], ptr %116, i64 0, i64 %119
  %121 = load i8, ptr %120, align 1, !tbaa !9
  %122 = sext i8 %121 to i32
  %123 = icmp eq i32 %122, 46
  br i1 %123, label %140, label %124

124:                                              ; preds = %113, %109
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  %127 = load i32, ptr %3, align 4, !tbaa !5
  %128 = icmp slt i32 %126, %127
  br i1 %128, label %129, label %143

129:                                              ; preds = %124
  %130 = load i32, ptr %9, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %131
  %133 = load i32, ptr %10, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [1000 x i8], ptr %132, i64 0, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !9
  %138 = sext i8 %137 to i32
  %139 = icmp eq i32 %138, 46
  br i1 %139, label %140, label %143

140:                                              ; preds = %129, %113, %98, %82, %73, %68, %65, %62
  %141 = load i32, ptr %4, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %4, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %140, %129, %124
  br label %144

144:                                              ; preds = %143, %52
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %10, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %10, align 4, !tbaa !5
  br label %47, !llvm.loop !13

148:                                              ; preds = %51
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %9, align 4, !tbaa !5
  br label %41, !llvm.loop !14

152:                                              ; preds = %45
  %153 = load i32, ptr %4, align 4, !tbaa !5
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %153)
  %155 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %154, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %156 = load i32, ptr %1, align 4
  ret i32 %156
}

; 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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #2

; 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) #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 = { 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 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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}


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

@vet = external dso_local local_unnamed_addr global <{ <{ i8, [999 x i8] }>, [999 x <{ i8, [999 x i8] }>] }>, align 16
@_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
  %3 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  %4 = 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)
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  %8 = load i32, ptr %2, align 4
  %9 = icmp sgt i32 %8, 0
  %or.cond = select i1 %7, i1 %9, i1 false
  br i1 %or.cond, label %.preheader45, label %._crit_edge63

.preheader45:                                     ; preds = %0, %._crit_edge
  %10 = phi i32 [ %88, %._crit_edge ], [ %6, %0 ]
  %11 = phi i32 [ %89, %._crit_edge ], [ %8, %0 ]
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %._crit_edge ], [ 0, %0 ]
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

.preheader44:                                     ; preds = %._crit_edge
  %13 = icmp sgt i32 %88, 0
  br i1 %13, label %.preheader.lr.ph, label %._crit_edge63

.preheader.lr.ph:                                 ; preds = %.preheader44
  %.pr = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp sgt i32 %.pr, 0
  br i1 %14, label %.preheader.us.preheader, label %._crit_edge63

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %15 = add nsw i32 %.pr, -1
  %16 = add nsw i32 %88, -1
  %17 = zext nneg i32 %.pr to i64
  %18 = zext nneg i32 %15 to i64
  %19 = zext nneg i32 %16 to i64
  %20 = zext nneg i32 %88 to i64
  %wide.trip.count101 = zext nneg i32 %88 to i64
  %wide.trip.count = zext nneg i32 %.pr to i64
  %exitcond.peel.not = icmp eq i32 %.pr, 1
  %wide.trip.count91 = zext nneg i32 %.pr to i64
  %wide.trip.count96 = zext nneg i32 %.pr to i64
  %min.iters.check127 = icmp ult i32 %.pr, 8
  %n.vec130 = and i64 %wide.trip.count, 2147483640
  %cmp.n140 = icmp eq i64 %n.vec130, %wide.trip.count
  %min.iters.check = icmp ult i32 %.pr, 8
  %n.vec = and i64 %wide.trip.count, 2147483640
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge52.us
  %indvars.iv98 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next99, %._crit_edge52.us ]
  %.03561.us = phi i32 [ 0, %.preheader.us.preheader ], [ %.us-phi54.us, %._crit_edge52.us ]
  %21 = icmp eq i64 %indvars.iv98, 0
  %22 = add nsw i64 %indvars.iv98, -1
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %23 = icmp ult i64 %indvars.iv.next99, %20
  br i1 %21, label %.lr.ph51.split.us.us.preheader, label %.lr.ph51.split.us70

.lr.ph51.split.us.us.preheader:                   ; preds = %.preheader.us
  br i1 %min.iters.check, label %.lr.ph51.split.us.us.preheader142, label %vector.ph

.lr.ph51.split.us.us.preheader142:                ; preds = %middle.block, %.lr.ph51.split.us.us.preheader
  %indvars.iv93.ph = phi i64 [ 0, %.lr.ph51.split.us.us.preheader ], [ %n.vec, %middle.block ]
  %.148.us.us.ph = phi i32 [ %.03561.us, %.lr.ph51.split.us.us.preheader ], [ %34, %middle.block ]
  br label %.lr.ph51.split.us.us

vector.ph:                                        ; preds = %.lr.ph51.split.us.us.preheader
  %24 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.03561.us, 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 <4 x i32> [ %24, %vector.ph ], [ %31, %vector.body ]
  %vec.phi123 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %32, %vector.body ]
  %25 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 0, i64 %index
  %26 = getelementptr inbounds i8, ptr %25, i64 4
  %wide.load = load <4 x i8>, ptr %25, align 8, !tbaa !9
  %wide.load124 = load <4 x i8>, ptr %26, align 4, !tbaa !9
  %27 = icmp eq <4 x i8> %wide.load, <i8 35, i8 35, i8 35, i8 35>
  %28 = icmp eq <4 x i8> %wide.load124, <i8 35, i8 35, i8 35, i8 35>
  %29 = zext <4 x i1> %27 to <4 x i32>
  %30 = zext <4 x i1> %28 to <4 x i32>
  %31 = add <4 x i32> %vec.phi, %29
  %32 = add <4 x i32> %vec.phi123, %30
  %index.next = add nuw i64 %index, 8
  %33 = icmp eq i64 %index.next, %n.vec
  br i1 %33, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %32, %31
  %34 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge52.us, label %.lr.ph51.split.us.us.preheader142

.lr.ph51.split.split.us71:                        ; preds = %.lr.ph51.split.split.us71.preheader, %63
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %63 ], [ 1, %.lr.ph51.split.split.us71.preheader ]
  %.148.us66 = phi i32 [ %.2.us67, %63 ], [ %spec.select117, %.lr.ph51.split.split.us71.preheader ]
  %35 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv98, i64 %indvars.iv84
  %36 = load i8, ptr %35, align 1, !tbaa !9
  %37 = icmp eq i8 %36, 35
  br i1 %37, label %38, label %63

38:                                               ; preds = %.lr.ph51.split.split.us71
  %39 = icmp eq i64 %indvars.iv84, %18
  br i1 %39, label %61, label %40

40:                                               ; preds = %38
  %41 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %22, i64 %indvars.iv84
  %42 = load i8, ptr %41, align 1, !tbaa !9
  %43 = icmp eq i8 %42, 46
  br i1 %43, label %61, label %44

44:                                               ; preds = %40
  br i1 %23, label %45, label %49

45:                                               ; preds = %44
  %46 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv.next99, i64 %indvars.iv84
  %47 = load i8, ptr %46, align 1, !tbaa !9
  %48 = icmp eq i8 %47, 46
  br i1 %48, label %61, label %49

49:                                               ; preds = %45, %44
  %50 = add nsw i64 %indvars.iv84, -1
  %51 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv98, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !9
  %53 = icmp eq i8 %52, 46
  br i1 %53, label %61, label %54

54:                                               ; preds = %49
  %55 = add nuw nsw i64 %indvars.iv84, 1
  %56 = icmp ult i64 %55, %17
  br i1 %56, label %57, label %63

57:                                               ; preds = %54
  %58 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv98, i64 %55
  %59 = load i8, ptr %58, align 1, !tbaa !9
  %60 = icmp eq i8 %59, 46
  br i1 %60, label %61, label %63

61:                                               ; preds = %57, %49, %45, %40, %38
  %62 = add nsw i32 %.148.us66, 1
  br label %63

63:                                               ; preds = %61, %57, %54, %.lr.ph51.split.split.us71
  %.2.us67 = phi i32 [ %62, %61 ], [ %.148.us66, %57 ], [ %.148.us66, %54 ], [ %.148.us66, %.lr.ph51.split.split.us71 ]
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge52.us, label %.lr.ph51.split.split.us71, !llvm.loop !14

.lr.ph51.split.us70:                              ; preds = %.preheader.us
  %64 = icmp eq i64 %indvars.iv98, %19
  %.fr60.us = freeze i1 %64
  br i1 %.fr60.us, label %.lr.ph51.split.split.us.us.preheader, label %.lr.ph51.split.split.us71.preheader

.lr.ph51.split.split.us.us.preheader:             ; preds = %.lr.ph51.split.us70
  br i1 %min.iters.check127, label %.lr.ph51.split.split.us.us.preheader143, label %vector.ph128

.lr.ph51.split.split.us.us.preheader143:          ; preds = %middle.block125, %.lr.ph51.split.split.us.us.preheader
  %indvars.iv88.ph = phi i64 [ 0, %.lr.ph51.split.split.us.us.preheader ], [ %n.vec130, %middle.block125 ]
  %.148.us56.us.ph = phi i32 [ %.03561.us, %.lr.ph51.split.split.us.us.preheader ], [ %75, %middle.block125 ]
  br label %.lr.ph51.split.split.us.us

vector.ph128:                                     ; preds = %.lr.ph51.split.split.us.us.preheader
  %65 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %.03561.us, i64 0
  br label %vector.body132

vector.body132:                                   ; preds = %vector.body132, %vector.ph128
  %index133 = phi i64 [ 0, %vector.ph128 ], [ %index.next138, %vector.body132 ]
  %vec.phi134 = phi <4 x i32> [ %65, %vector.ph128 ], [ %72, %vector.body132 ]
  %vec.phi135 = phi <4 x i32> [ zeroinitializer, %vector.ph128 ], [ %73, %vector.body132 ]
  %66 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv98, i64 %index133
  %67 = getelementptr inbounds i8, ptr %66, i64 4
  %wide.load136 = load <4 x i8>, ptr %66, align 8, !tbaa !9
  %wide.load137 = load <4 x i8>, ptr %67, align 4, !tbaa !9
  %68 = icmp eq <4 x i8> %wide.load136, <i8 35, i8 35, i8 35, i8 35>
  %69 = icmp eq <4 x i8> %wide.load137, <i8 35, i8 35, i8 35, i8 35>
  %70 = zext <4 x i1> %68 to <4 x i32>
  %71 = zext <4 x i1> %69 to <4 x i32>
  %72 = add <4 x i32> %vec.phi134, %70
  %73 = add <4 x i32> %vec.phi135, %71
  %index.next138 = add nuw i64 %index133, 8
  %74 = icmp eq i64 %index.next138, %n.vec130
  br i1 %74, label %middle.block125, label %vector.body132, !llvm.loop !16

middle.block125:                                  ; preds = %vector.body132
  %bin.rdx139 = add <4 x i32> %73, %72
  %75 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx139)
  br i1 %cmp.n140, label %._crit_edge52.us, label %.lr.ph51.split.split.us.us.preheader143

.lr.ph51.split.split.us71.preheader:              ; preds = %.lr.ph51.split.us70
  %76 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv98, i64 0
  %77 = load i8, ptr %76, align 8, !tbaa !9
  %78 = icmp eq i8 %77, 35
  %79 = zext i1 %78 to i32
  %spec.select117 = add nsw i32 %.03561.us, %79
  br i1 %exitcond.peel.not, label %._crit_edge52.us, label %.lr.ph51.split.split.us71

._crit_edge52.us:                                 ; preds = %63, %.lr.ph51.split.split.us.us, %.lr.ph51.split.us.us, %middle.block125, %middle.block, %.lr.ph51.split.split.us71.preheader
  %.us-phi54.us = phi i32 [ %spec.select117, %.lr.ph51.split.split.us71.preheader ], [ %34, %middle.block ], [ %75, %middle.block125 ], [ %spec.select, %.lr.ph51.split.us.us ], [ %spec.select74, %.lr.ph51.split.split.us.us ], [ %.2.us67, %63 ]
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count101
  br i1 %exitcond102.not, label %._crit_edge63, label %.preheader.us, !llvm.loop !17

.lr.ph51.split.us.us:                             ; preds = %.lr.ph51.split.us.us.preheader142, %.lr.ph51.split.us.us
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %.lr.ph51.split.us.us ], [ %indvars.iv93.ph, %.lr.ph51.split.us.us.preheader142 ]
  %.148.us.us = phi i32 [ %spec.select, %.lr.ph51.split.us.us ], [ %.148.us.us.ph, %.lr.ph51.split.us.us.preheader142 ]
  %80 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 0, i64 %indvars.iv93
  %81 = load i8, ptr %80, align 1, !tbaa !9
  %82 = icmp eq i8 %81, 35
  %83 = zext i1 %82 to i32
  %spec.select = add nsw i32 %.148.us.us, %83
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %._crit_edge52.us, label %.lr.ph51.split.us.us, !llvm.loop !18

.lr.ph51.split.split.us.us:                       ; preds = %.lr.ph51.split.split.us.us.preheader143, %.lr.ph51.split.split.us.us
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph51.split.split.us.us ], [ %indvars.iv88.ph, %.lr.ph51.split.split.us.us.preheader143 ]
  %.148.us56.us = phi i32 [ %spec.select74, %.lr.ph51.split.split.us.us ], [ %.148.us56.us.ph, %.lr.ph51.split.split.us.us.preheader143 ]
  %84 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv98, i64 %indvars.iv88
  %85 = load i8, ptr %84, align 1, !tbaa !9
  %86 = icmp eq i8 %85, 35
  %87 = zext i1 %86 to i32
  %spec.select74 = add nsw i32 %.148.us56.us, %87
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge52.us, label %.lr.ph51.split.split.us.us, !llvm.loop !19

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader45
  %88 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %10, %.preheader45 ]
  %89 = phi i32 [ %95, %._crit_edge.loopexit ], [ %11, %.preheader45 ]
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %90 = sext i32 %88 to i64
  %91 = icmp slt i64 %indvars.iv.next82, %90
  br i1 %91, label %.preheader45, label %.preheader44, !llvm.loop !20

.lr.ph:                                           ; preds = %.preheader45, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader45 ]
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %93 = load i8, ptr %3, align 1, !tbaa !9
  %94 = getelementptr inbounds [1000 x [1000 x i8]], ptr @vet, i64 0, i64 %indvars.iv81, i64 %indvars.iv
  store i8 %93, ptr %94, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = icmp slt i64 %indvars.iv.next, %96
  br i1 %97, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !22

._crit_edge63:                                    ; preds = %._crit_edge52.us, %0, %.preheader.lr.ph, %.preheader44
  %.035.lcssa = phi i32 [ 0, %.preheader44 ], [ 0, %.preheader.lr.ph ], [ 0, %0 ], [ %.us-phi54.us, %._crit_edge52.us ]
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.035.lcssa)
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

; 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 #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 = { 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 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) }
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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !15}
!15 = !{!"llvm.loop.peeled.count", i32 1}
!16 = distinct !{!16, !11, !12, !13}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11, !13, !12}
!19 = distinct !{!19, !11, !13, !12}
!20 = distinct !{!20, !11, !21}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = distinct !{!22, !11}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass