; LLVM IR from pranjalwalia/Competitive-programming :: codeforces (231A_team)

; 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 ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %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
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %12 = 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)
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = zext i32 %13 to i64
  %15 = call ptr @llvm.stacksave.p0()
  store ptr %15, ptr %3, align 8
  %16 = alloca [3 x i32], i64 %14, align 16
  store i64 %14, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %17

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

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

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

23:                                               ; preds = %35, %22
  %24 = load i32, ptr %7, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 3
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %23
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [3 x i32], ptr %16, i64 %29
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [3 x i32], ptr %30, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %33)
  br label %35

35:                                               ; preds = %27
  %36 = load i32, ptr %7, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %7, align 4, !tbaa !5
  br label %23, !llvm.loop !9

38:                                               ; preds = %26
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %5, align 4, !tbaa !5
  br label %17, !llvm.loop !11

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

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

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

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

49:                                               ; preds = %66, %48
  %50 = load i32, ptr %11, align 4, !tbaa !5
  %51 = icmp slt i32 %50, 3
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %69

53:                                               ; preds = %49
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [3 x i32], ptr %16, i64 %55
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [3 x i32], ptr %56, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = icmp eq i32 %60, 1
  br i1 %61, label %62, label %65

62:                                               ; preds = %53
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %10, align 4, !tbaa !5
  br label %65

65:                                               ; preds = %62, %53
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %11, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %11, align 4, !tbaa !5
  br label %49, !llvm.loop !12

69:                                               ; preds = %52
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = icmp sge i32 %70, 2
  br i1 %71, label %72, label %75

72:                                               ; preds = %69
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %8, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %72, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %9, align 4, !tbaa !5
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %9, align 4, !tbaa !5
  br label %43, !llvm.loop !13

79:                                               ; preds = %47
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %80)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %83 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %83)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %84 = load i32, ptr %1, align 4
  ret i32 %84
}

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


; 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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %2 = 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)
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %4 = zext i32 %3 to i64
  %5 = call ptr @llvm.stacksave.p0()
  %6 = alloca [3 x i32], i64 %4, align 16
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.preheader25, label %._crit_edge

.preheader25:                                     ; preds = %0, %.preheader25
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader25 ], [ 0, %0 ]
  %9 = getelementptr inbounds [3 x i32], ptr %6, i64 %indvars.iv, i64 0
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %11 = getelementptr inbounds [3 x i32], ptr %6, i64 %indvars.iv, i64 1
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %13 = getelementptr inbounds [3 x i32], ptr %6, i64 %indvars.iv, i64 2
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.preheader25, label %.preheader24, !llvm.loop !9

.preheader24:                                     ; preds = %.preheader25
  %18 = icmp sgt i32 %15, 0
  br i1 %18, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %.preheader24
  %wide.trip.count = zext nneg i32 %15 to i64
  %min.iters.check = icmp ult i32 %15, 8
  br i1 %min.iters.check, label %.preheader.preheader44, label %vector.ph

vector.ph:                                        ; preds = %.preheader.preheader
  %n.vec = and i64 %wide.trip.count, 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 ], [ %118, %vector.body ]
  %vec.phi43 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %119, %vector.body ]
  %19 = or disjoint i64 %index, 1
  %20 = or disjoint i64 %index, 2
  %21 = or disjoint i64 %index, 3
  %22 = or disjoint i64 %index, 4
  %23 = or disjoint i64 %index, 5
  %24 = or disjoint i64 %index, 6
  %25 = or disjoint i64 %index, 7
  %26 = getelementptr inbounds [3 x i32], ptr %6, i64 %index, i64 0
  %27 = getelementptr inbounds [3 x i32], ptr %6, i64 %19, i64 0
  %28 = getelementptr inbounds [3 x i32], ptr %6, i64 %20, i64 0
  %29 = getelementptr inbounds [3 x i32], ptr %6, i64 %21, i64 0
  %30 = getelementptr inbounds [3 x i32], ptr %6, i64 %22, i64 0
  %31 = getelementptr inbounds [3 x i32], ptr %6, i64 %23, i64 0
  %32 = getelementptr inbounds [3 x i32], ptr %6, i64 %24, i64 0
  %33 = getelementptr inbounds [3 x i32], ptr %6, i64 %25, i64 0
  %34 = load i32, ptr %26, align 16, !tbaa !5
  %35 = load i32, ptr %27, align 4, !tbaa !5
  %36 = load i32, ptr %28, align 8, !tbaa !5
  %37 = load i32, ptr %29, align 4, !tbaa !5
  %38 = insertelement <4 x i32> poison, i32 %34, i64 0
  %39 = insertelement <4 x i32> %38, i32 %35, i64 1
  %40 = insertelement <4 x i32> %39, i32 %36, i64 2
  %41 = insertelement <4 x i32> %40, i32 %37, i64 3
  %42 = load i32, ptr %30, align 16, !tbaa !5
  %43 = load i32, ptr %31, align 4, !tbaa !5
  %44 = load i32, ptr %32, align 8, !tbaa !5
  %45 = load i32, ptr %33, align 4, !tbaa !5
  %46 = insertelement <4 x i32> poison, i32 %42, i64 0
  %47 = insertelement <4 x i32> %46, i32 %43, i64 1
  %48 = insertelement <4 x i32> %47, i32 %44, i64 2
  %49 = insertelement <4 x i32> %48, i32 %45, i64 3
  %50 = icmp eq <4 x i32> %41, <i32 1, i32 1, i32 1, i32 1>
  %51 = icmp eq <4 x i32> %49, <i32 1, i32 1, i32 1, i32 1>
  %52 = zext <4 x i1> %50 to <4 x i32>
  %53 = zext <4 x i1> %51 to <4 x i32>
  %54 = getelementptr inbounds [3 x i32], ptr %6, i64 %index, i64 1
  %55 = getelementptr inbounds [3 x i32], ptr %6, i64 %19, i64 1
  %56 = getelementptr inbounds [3 x i32], ptr %6, i64 %20, i64 1
  %57 = getelementptr inbounds [3 x i32], ptr %6, i64 %21, i64 1
  %58 = getelementptr inbounds [3 x i32], ptr %6, i64 %22, i64 1
  %59 = getelementptr inbounds [3 x i32], ptr %6, i64 %23, i64 1
  %60 = getelementptr inbounds [3 x i32], ptr %6, i64 %24, i64 1
  %61 = getelementptr inbounds [3 x i32], ptr %6, i64 %25, i64 1
  %62 = load i32, ptr %54, align 4, !tbaa !5
  %63 = load i32, ptr %55, align 16, !tbaa !5
  %64 = load i32, ptr %56, align 4, !tbaa !5
  %65 = load i32, ptr %57, align 8, !tbaa !5
  %66 = insertelement <4 x i32> poison, i32 %62, i64 0
  %67 = insertelement <4 x i32> %66, i32 %63, i64 1
  %68 = insertelement <4 x i32> %67, i32 %64, i64 2
  %69 = insertelement <4 x i32> %68, i32 %65, i64 3
  %70 = load i32, ptr %58, align 4, !tbaa !5
  %71 = load i32, ptr %59, align 16, !tbaa !5
  %72 = load i32, ptr %60, align 4, !tbaa !5
  %73 = load i32, ptr %61, align 8, !tbaa !5
  %74 = insertelement <4 x i32> poison, i32 %70, i64 0
  %75 = insertelement <4 x i32> %74, i32 %71, i64 1
  %76 = insertelement <4 x i32> %75, i32 %72, i64 2
  %77 = insertelement <4 x i32> %76, i32 %73, i64 3
  %78 = icmp eq <4 x i32> %69, <i32 1, i32 1, i32 1, i32 1>
  %79 = icmp eq <4 x i32> %77, <i32 1, i32 1, i32 1, i32 1>
  %80 = zext <4 x i1> %78 to <4 x i32>
  %81 = zext <4 x i1> %79 to <4 x i32>
  %82 = add nuw nsw <4 x i32> %52, %80
  %83 = add nuw nsw <4 x i32> %53, %81
  %84 = getelementptr inbounds [3 x i32], ptr %6, i64 %index, i64 2
  %85 = getelementptr inbounds [3 x i32], ptr %6, i64 %19, i64 2
  %86 = getelementptr inbounds [3 x i32], ptr %6, i64 %20, i64 2
  %87 = getelementptr inbounds [3 x i32], ptr %6, i64 %21, i64 2
  %88 = getelementptr inbounds [3 x i32], ptr %6, i64 %22, i64 2
  %89 = getelementptr inbounds [3 x i32], ptr %6, i64 %23, i64 2
  %90 = getelementptr inbounds [3 x i32], ptr %6, i64 %24, i64 2
  %91 = getelementptr inbounds [3 x i32], ptr %6, i64 %25, i64 2
  %92 = load i32, ptr %84, align 8, !tbaa !5
  %93 = load i32, ptr %85, align 4, !tbaa !5
  %94 = load i32, ptr %86, align 16, !tbaa !5
  %95 = load i32, ptr %87, align 4, !tbaa !5
  %96 = insertelement <4 x i32> poison, i32 %92, i64 0
  %97 = insertelement <4 x i32> %96, i32 %93, i64 1
  %98 = insertelement <4 x i32> %97, i32 %94, i64 2
  %99 = insertelement <4 x i32> %98, i32 %95, i64 3
  %100 = load i32, ptr %88, align 8, !tbaa !5
  %101 = load i32, ptr %89, align 4, !tbaa !5
  %102 = load i32, ptr %90, align 16, !tbaa !5
  %103 = load i32, ptr %91, align 4, !tbaa !5
  %104 = insertelement <4 x i32> poison, i32 %100, i64 0
  %105 = insertelement <4 x i32> %104, i32 %101, i64 1
  %106 = insertelement <4 x i32> %105, i32 %102, i64 2
  %107 = insertelement <4 x i32> %106, i32 %103, i64 3
  %108 = icmp eq <4 x i32> %99, <i32 1, i32 1, i32 1, i32 1>
  %109 = icmp eq <4 x i32> %107, <i32 1, i32 1, i32 1, i32 1>
  %110 = zext <4 x i1> %108 to <4 x i32>
  %111 = zext <4 x i1> %109 to <4 x i32>
  %112 = add nuw nsw <4 x i32> %82, %110
  %113 = add nuw nsw <4 x i32> %83, %111
  %114 = icmp ugt <4 x i32> %112, <i32 1, i32 1, i32 1, i32 1>
  %115 = icmp ugt <4 x i32> %113, <i32 1, i32 1, i32 1, i32 1>
  %116 = zext <4 x i1> %114 to <4 x i32>
  %117 = zext <4 x i1> %115 to <4 x i32>
  %118 = add <4 x i32> %vec.phi, %116
  %119 = add <4 x i32> %vec.phi43, %117
  %index.next = add nuw i64 %index, 8
  %120 = icmp eq i64 %index.next, %n.vec
  br i1 %120, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %119, %118
  %121 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.preheader.preheader44

.preheader.preheader44:                           ; preds = %middle.block, %.preheader.preheader
  %indvars.iv39.ph = phi i64 [ 0, %.preheader.preheader ], [ %n.vec, %middle.block ]
  %.01930.ph = phi i32 [ 0, %.preheader.preheader ], [ %121, %middle.block ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader44, %.preheader
  %indvars.iv39 = phi i64 [ %indvars.iv.next40, %.preheader ], [ %indvars.iv39.ph, %.preheader.preheader44 ]
  %.01930 = phi i32 [ %spec.select, %.preheader ], [ %.01930.ph, %.preheader.preheader44 ]
  %122 = getelementptr inbounds [3 x i32], ptr %6, i64 %indvars.iv39, i64 0
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = icmp eq i32 %123, 1
  %125 = zext i1 %124 to i32
  %126 = getelementptr inbounds [3 x i32], ptr %6, i64 %indvars.iv39, i64 1
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = icmp eq i32 %127, 1
  %129 = zext i1 %128 to i32
  %spec.select23.1 = add nuw nsw i32 %125, %129
  %130 = getelementptr inbounds [3 x i32], ptr %6, i64 %indvars.iv39, i64 2
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = icmp eq i32 %131, 1
  %133 = zext i1 %132 to i32
  %spec.select23.2 = add nuw nsw i32 %spec.select23.1, %133
  %134 = icmp ugt i32 %spec.select23.2, 1
  %135 = zext i1 %134 to i32
  %spec.select = add nuw nsw i32 %.01930, %135
  %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next40, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %.preheader, %middle.block, %0, %.preheader24
  %.019.lcssa = phi i32 [ 0, %.preheader24 ], [ 0, %0 ], [ %121, %middle.block ], [ %spec.select, %.preheader ]
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.019.lcssa)
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %136, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.stackrestore.p0(ptr %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  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

; 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, !13, !12}


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