; LLVM IR from pranjalwalia/Competitive-programming :: CodeChef/contests/LunchTime/FEB20 (POPGATES)

; 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 i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i8, align 1
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %13

13:                                               ; preds = %111, %0
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = add nsw i64 %14, -1
  store i64 %15, ptr %2, align 8, !tbaa !5
  %16 = icmp ne i64 %14, 0
  br i1 %16, label %17, label %115

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %20, i64 8)
  %22 = extractvalue { i64, i1 } %21, 1
  %23 = extractvalue { i64, i1 } %21, 0
  %24 = select i1 %22, i64 -1, i64 %23
  %25 = call noalias noundef nonnull ptr @_Znam(i64 noundef %24) #8
  store ptr %25, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %45, %17
  %27 = load i64, ptr %6, align 8, !tbaa !5
  %28 = load i64, ptr %3, align 8, !tbaa !5
  %29 = icmp slt i64 %27, %28
  br i1 %29, label %31, label %30

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

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #7
  %32 = 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) %7)
  %33 = load i8, ptr %7, align 1, !tbaa !11
  %34 = sext i8 %33 to i32
  %35 = icmp eq i32 %34, 72
  br i1 %35, label %36, label %40

36:                                               ; preds = %31
  %37 = load ptr, ptr %5, align 8, !tbaa !9
  %38 = load i64, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds i64, ptr %37, i64 %38
  store i64 1, ptr %39, align 8, !tbaa !5
  br label %44

40:                                               ; preds = %31
  %41 = load ptr, ptr %5, align 8, !tbaa !9
  %42 = load i64, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds i64, ptr %41, i64 %42
  store i64 0, ptr %43, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %40, %36
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #7
  br label %45

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

48:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %49 = load i64, ptr %3, align 8, !tbaa !5
  %50 = sub nsw i64 %49, 1
  store i64 %50, ptr %8, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %91, %48
  %52 = load i64, ptr %4, align 8, !tbaa !5
  %53 = add nsw i64 %52, -1
  store i64 %53, ptr %4, align 8, !tbaa !5
  %54 = icmp ne i64 %52, 0
  br i1 %54, label %55, label %92

55:                                               ; preds = %51
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = load i64, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds i64, ptr %56, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !5
  %60 = icmp ne i64 %59, 0
  br i1 %60, label %61, label %88

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

62:                                               ; preds = %82, %61
  %63 = load i64, ptr %9, align 8, !tbaa !5
  %64 = load i64, ptr %8, align 8, !tbaa !5
  %65 = icmp sle i64 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %85

67:                                               ; preds = %62
  %68 = load ptr, ptr %5, align 8, !tbaa !9
  %69 = load i64, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds i64, ptr %68, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = icmp eq i64 %71, 1
  br i1 %72, label %73, label %77

73:                                               ; preds = %67
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = load i64, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds i64, ptr %74, i64 %75
  store i64 0, ptr %76, align 8, !tbaa !5
  br label %81

77:                                               ; preds = %67
  %78 = load ptr, ptr %5, align 8, !tbaa !9
  %79 = load i64, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds i64, ptr %78, i64 %79
  store i64 1, ptr %80, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %77, %73
  br label %82

82:                                               ; preds = %81
  %83 = load i64, ptr %9, align 8, !tbaa !5
  %84 = add nsw i64 %83, 1
  store i64 %84, ptr %9, align 8, !tbaa !5
  br label %62, !llvm.loop !14

85:                                               ; preds = %66
  %86 = load i64, ptr %8, align 8, !tbaa !5
  %87 = add nsw i64 %86, -1
  store i64 %87, ptr %8, align 8, !tbaa !5
  br label %91

88:                                               ; preds = %55
  %89 = load i64, ptr %8, align 8, !tbaa !5
  %90 = add nsw i64 %89, -1
  store i64 %90, ptr %8, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %88, %85
  br label %51, !llvm.loop !15

92:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %108, %92
  %94 = load i64, ptr %11, align 8, !tbaa !5
  %95 = load i64, ptr %8, align 8, !tbaa !5
  %96 = icmp sle i64 %94, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %111

98:                                               ; preds = %93
  %99 = load ptr, ptr %5, align 8, !tbaa !9
  %100 = load i64, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds i64, ptr %99, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !5
  %103 = icmp ne i64 %102, 0
  br i1 %103, label %104, label %107

104:                                              ; preds = %98
  %105 = load i64, ptr %10, align 8, !tbaa !5
  %106 = add nsw i64 %105, 1
  store i64 %106, ptr %10, align 8, !tbaa !5
  br label %107

107:                                              ; preds = %104, %98
  br label %108

108:                                              ; preds = %107
  %109 = load i64, ptr %11, align 8, !tbaa !5
  %110 = add nsw i64 %109, 1
  store i64 %110, ptr %11, align 8, !tbaa !5
  br label %93, !llvm.loop !16

111:                                              ; preds = %97
  %112 = load i64, ptr %10, align 8, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %112)
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %13, !llvm.loop !17

115:                                              ; preds = %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  %116 = load i32, ptr %1, align 4
  ret i32 %116
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


; 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 i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %6 = load i64, ptr %1, align 8, !tbaa !5
  %7 = add nsw i64 %6, -1
  store i64 %7, ptr %1, align 8, !tbaa !5
  %.not56 = icmp eq i64 %6, 0
  br i1 %.not56, label %._crit_edge59, label %.lr.ph58

.lr.ph58:                                         ; preds = %0, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %10 = load i64, ptr %2, align 8, !tbaa !5
  %11 = icmp ugt i64 %10, 2305843009213693951
  %12 = shl i64 %10, 3
  %13 = select i1 %11, i64 -1, i64 %12
  %14 = call noalias noundef nonnull ptr @_Znam(i64 noundef %13) #8
  %15 = icmp sgt i64 %10, 0
  br i1 %15, label %.lr.ph, label %.preheader38

.preheader38:                                     ; preds = %.lr.ph, %.lr.ph58
  %.lcssa = phi i64 [ %10, %.lr.ph58 ], [ %21, %.lr.ph ]
  %.promoted = load i64, ptr %3, align 8, !tbaa !5
  %.not3245 = icmp eq i64 %.promoted, 0
  br i1 %.not3245, label %.preheader37, label %.lr.ph48

.lr.ph:                                           ; preds = %.lr.ph58, %.lr.ph
  %.03039 = phi i64 [ %20, %.lr.ph ], [ 0, %.lr.ph58 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #7
  %16 = 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) %4)
  %17 = load i8, ptr %4, align 1, !tbaa !9
  %18 = icmp eq i8 %17, 72
  %spec.select63 = zext i1 %18 to i64
  %19 = getelementptr inbounds i64, ptr %14, i64 %.03039
  store i64 %spec.select63, ptr %19, align 8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #7
  %20 = add nuw nsw i64 %.03039, 1
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %.lr.ph, label %.preheader38, !llvm.loop !10

.preheader37.loopexit:                            ; preds = %.loopexit
  %23 = sub i64 %.lcssa, %.promoted
  br label %.preheader37

.preheader37:                                     ; preds = %.preheader37.loopexit, %.preheader38
  %.028.in.lcssa = phi i64 [ %.lcssa, %.preheader38 ], [ %23, %.preheader37.loopexit ]
  store i64 -1, ptr %3, align 8, !tbaa !5
  %.not33.not51 = icmp sgt i64 %.028.in.lcssa, 0
  br i1 %.not33.not51, label %.lr.ph54.preheader, label %._crit_edge

.lr.ph54.preheader:                               ; preds = %.preheader37
  %min.iters.check = icmp ult i64 %.028.in.lcssa, 4
  br i1 %min.iters.check, label %.lr.ph54.preheader81, label %vector.ph

.lr.ph54.preheader81:                             ; preds = %middle.block, %.lr.ph54.preheader
  %.053.ph = phi i64 [ 0, %.lr.ph54.preheader ], [ %n.vec, %middle.block ]
  %.02652.ph = phi i64 [ 0, %.lr.ph54.preheader ], [ %33, %middle.block ]
  br label %.lr.ph54

vector.ph:                                        ; preds = %.lr.ph54.preheader
  %n.vec = and i64 %.028.in.lcssa, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %30, %vector.body ]
  %vec.phi65 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %31, %vector.body ]
  %24 = getelementptr inbounds i64, ptr %14, i64 %index
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %wide.load = load <2 x i64>, ptr %24, align 8, !tbaa !5
  %wide.load66 = load <2 x i64>, ptr %25, align 8, !tbaa !5
  %26 = icmp ne <2 x i64> %wide.load, zeroinitializer
  %27 = icmp ne <2 x i64> %wide.load66, zeroinitializer
  %28 = zext <2 x i1> %26 to <2 x i64>
  %29 = zext <2 x i1> %27 to <2 x i64>
  %30 = add <2 x i64> %vec.phi, %28
  %31 = add <2 x i64> %vec.phi65, %29
  %index.next = add nuw i64 %index, 4
  %32 = icmp eq i64 %index.next, %n.vec
  br i1 %32, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %31, %30
  %33 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %.028.in.lcssa, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph54.preheader81

.lr.ph48:                                         ; preds = %.preheader38, %.loopexit
  %.in = phi i64 [ %34, %.loopexit ], [ %.promoted, %.preheader38 ]
  %.028.in46 = phi i64 [ %.02847, %.loopexit ], [ %.lcssa, %.preheader38 ]
  %34 = add nsw i64 %.in, -1
  %.02847 = add nsw i64 %.028.in46, -1
  %35 = getelementptr inbounds i64, ptr %14, i64 %.02847
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %.not35 = icmp ne i64 %36, 0
  %.not36.not40 = icmp sgt i64 %.028.in46, 0
  %or.cond = and i1 %.not35, %.not36.not40
  br i1 %or.cond, label %.lr.ph42.preheader, label %.loopexit

.lr.ph42.preheader:                               ; preds = %.lr.ph48
  %min.iters.check69 = icmp ult i64 %.028.in46, 4
  br i1 %min.iters.check69, label %.lr.ph42.preheader80, label %vector.ph70

vector.ph70:                                      ; preds = %.lr.ph42.preheader
  %n.vec72 = and i64 %.028.in46, 9223372036854775804
  br label %vector.body74

vector.body74:                                    ; preds = %vector.body74, %vector.ph70
  %index75 = phi i64 [ 0, %vector.ph70 ], [ %index.next78, %vector.body74 ]
  %37 = getelementptr inbounds i64, ptr %14, i64 %index75
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load76 = load <2 x i64>, ptr %37, align 8, !tbaa !5
  %wide.load77 = load <2 x i64>, ptr %38, align 8, !tbaa !5
  %39 = icmp ne <2 x i64> %wide.load76, <i64 1, i64 1>
  %40 = icmp ne <2 x i64> %wide.load77, <i64 1, i64 1>
  %41 = zext <2 x i1> %39 to <2 x i64>
  %42 = zext <2 x i1> %40 to <2 x i64>
  store <2 x i64> %41, ptr %37, align 8, !tbaa !5
  store <2 x i64> %42, ptr %38, align 8, !tbaa !5
  %index.next78 = add nuw i64 %index75, 4
  %43 = icmp eq i64 %index.next78, %n.vec72
  br i1 %43, label %middle.block67, label %vector.body74, !llvm.loop !15

middle.block67:                                   ; preds = %vector.body74
  %cmp.n79 = icmp eq i64 %.028.in46, %n.vec72
  br i1 %cmp.n79, label %.loopexit, label %.lr.ph42.preheader80

.lr.ph42.preheader80:                             ; preds = %middle.block67, %.lr.ph42.preheader
  %.02741.ph = phi i64 [ 0, %.lr.ph42.preheader ], [ %n.vec72, %middle.block67 ]
  br label %.lr.ph42

.lr.ph42:                                         ; preds = %.lr.ph42.preheader80, %.lr.ph42
  %.02741 = phi i64 [ %47, %.lr.ph42 ], [ %.02741.ph, %.lr.ph42.preheader80 ]
  %44 = getelementptr inbounds i64, ptr %14, i64 %.02741
  %45 = load i64, ptr %44, align 8, !tbaa !5
  %46 = icmp ne i64 %45, 1
  %. = zext i1 %46 to i64
  store i64 %., ptr %44, align 8, !tbaa !5
  %47 = add nuw nsw i64 %.02741, 1
  %.not36.not = icmp slt i64 %47, %.028.in46
  br i1 %.not36.not, label %.lr.ph42, label %.loopexit, !llvm.loop !16

.loopexit:                                        ; preds = %.lr.ph42, %middle.block67, %.lr.ph48
  %.not32 = icmp eq i64 %34, 0
  br i1 %.not32, label %.preheader37.loopexit, label %.lr.ph48, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph54, %middle.block, %.preheader37
  %.026.lcssa = phi i64 [ 0, %.preheader37 ], [ %33, %middle.block ], [ %spec.select, %.lr.ph54 ]
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.026.lcssa)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %50 = load i64, ptr %1, align 8, !tbaa !5
  %51 = add nsw i64 %50, -1
  store i64 %51, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %50, 0
  br i1 %.not, label %._crit_edge59, label %.lr.ph58, !llvm.loop !18

.lr.ph54:                                         ; preds = %.lr.ph54.preheader81, %.lr.ph54
  %.053 = phi i64 [ %55, %.lr.ph54 ], [ %.053.ph, %.lr.ph54.preheader81 ]
  %.02652 = phi i64 [ %spec.select, %.lr.ph54 ], [ %.02652.ph, %.lr.ph54.preheader81 ]
  %52 = getelementptr inbounds i64, ptr %14, i64 %.053
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %.not34 = icmp ne i64 %53, 0
  %54 = zext i1 %.not34 to i64
  %spec.select = add nuw nsw i64 %.02652, %54
  %55 = add nuw nsw i64 %.053, 1
  %exitcond.not = icmp eq i64 %55, %.028.in.lcssa
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph54, !llvm.loop !19

._crit_edge59:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.end.p0(i64 8, 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

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

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

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 #4

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 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 #2 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 speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #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 = { 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 #3 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 }
attributes #8 = { builtin allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !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, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !11, !13, !14}
!16 = distinct !{!16, !11, !14, !13}
!17 = distinct !{!17, !11}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11, !14, !13}


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