; LLVM IR from eyangch/competitive-programming :: Codeforces/433 (b)

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

21:                                               ; preds = %30, %0
  %22 = load i64, ptr %6, align 8, !tbaa !5
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %33

26:                                               ; preds = %21
  %27 = load i64, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds i64, ptr %18, i64 %27
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %28)
  br label %30

30:                                               ; preds = %26
  %31 = load i64, ptr %6, align 8, !tbaa !5
  %32 = add nsw i64 %31, 1
  store i64 %32, ptr %6, align 8, !tbaa !5
  br label %21, !llvm.loop !9

33:                                               ; preds = %25
  %34 = load i64, ptr %2, align 8, !tbaa !5
  %35 = getelementptr inbounds i64, ptr %18, i64 %34
  %36 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef %18, ptr noundef %35, ptr noundef %20)
  %37 = load i64, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds i64, ptr %20, i64 %37
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef %20, ptr noundef %38)
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %40 = alloca i64, i64 %39, align 16
  store i64 %39, ptr %7, align 8
  %41 = load i64, ptr %2, align 8, !tbaa !5
  %42 = alloca i64, i64 %41, align 16
  store i64 %41, ptr %8, align 8
  %43 = getelementptr inbounds i64, ptr %18, i64 0
  %44 = load i64, ptr %43, align 16, !tbaa !5
  %45 = getelementptr inbounds i64, ptr %40, i64 0
  store i64 %44, ptr %45, align 16, !tbaa !5
  %46 = getelementptr inbounds i64, ptr %20, i64 0
  %47 = load i64, ptr %46, align 16, !tbaa !5
  %48 = getelementptr inbounds i64, ptr %42, i64 0
  store i64 %47, ptr %48, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 1, ptr %9, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %75, %33
  %50 = load i64, ptr %9, align 8, !tbaa !5
  %51 = load i64, ptr %2, align 8, !tbaa !5
  %52 = icmp slt i64 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %78

54:                                               ; preds = %49
  %55 = load i64, ptr %9, align 8, !tbaa !5
  %56 = sub nsw i64 %55, 1
  %57 = getelementptr inbounds i64, ptr %40, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = load i64, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds i64, ptr %18, i64 %59
  %61 = load i64, ptr %60, align 8, !tbaa !5
  %62 = add nsw i64 %58, %61
  %63 = load i64, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds i64, ptr %40, i64 %63
  store i64 %62, ptr %64, align 8, !tbaa !5
  %65 = load i64, ptr %9, align 8, !tbaa !5
  %66 = sub nsw i64 %65, 1
  %67 = getelementptr inbounds i64, ptr %42, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !5
  %69 = load i64, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds i64, ptr %20, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = add nsw i64 %68, %71
  %73 = load i64, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds i64, ptr %42, i64 %73
  store i64 %72, ptr %74, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %54
  %76 = load i64, ptr %9, align 8, !tbaa !5
  %77 = add nsw i64 %76, 1
  store i64 %77, ptr %9, align 8, !tbaa !5
  br label %49, !llvm.loop !11

78:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %138, %78
  %81 = load i64, ptr %11, align 8, !tbaa !5
  %82 = load i64, ptr %10, align 8, !tbaa !5
  %83 = icmp slt i64 %81, %82
  br i1 %83, label %85, label %84

84:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %141

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %87 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %86, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %88 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %87, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %89 = load i64, ptr %12, align 8, !tbaa !5
  %90 = icmp eq i64 %89, 1
  br i1 %90, label %91, label %114

91:                                               ; preds = %85
  %92 = load i64, ptr %13, align 8, !tbaa !5
  %93 = icmp eq i64 %92, 1
  br i1 %93, label %94, label %101

94:                                               ; preds = %91
  %95 = load i64, ptr %14, align 8, !tbaa !5
  %96 = sub nsw i64 %95, 1
  %97 = getelementptr inbounds i64, ptr %40, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %98)
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %99, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %113

101:                                              ; preds = %91
  %102 = load i64, ptr %14, align 8, !tbaa !5
  %103 = sub nsw i64 %102, 1
  %104 = getelementptr inbounds i64, ptr %40, i64 %103
  %105 = load i64, ptr %104, align 8, !tbaa !5
  %106 = load i64, ptr %13, align 8, !tbaa !5
  %107 = sub nsw i64 %106, 2
  %108 = getelementptr inbounds i64, ptr %40, i64 %107
  %109 = load i64, ptr %108, align 8, !tbaa !5
  %110 = sub nsw i64 %105, %109
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 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_)
  br label %113

113:                                              ; preds = %101, %94
  br label %137

114:                                              ; preds = %85
  %115 = load i64, ptr %13, align 8, !tbaa !5
  %116 = icmp eq i64 %115, 1
  br i1 %116, label %117, label %124

117:                                              ; preds = %114
  %118 = load i64, ptr %14, align 8, !tbaa !5
  %119 = sub nsw i64 %118, 1
  %120 = getelementptr inbounds i64, ptr %42, i64 %119
  %121 = load i64, ptr %120, align 8, !tbaa !5
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %121)
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %122, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %136

124:                                              ; preds = %114
  %125 = load i64, ptr %14, align 8, !tbaa !5
  %126 = sub nsw i64 %125, 1
  %127 = getelementptr inbounds i64, ptr %42, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !5
  %129 = load i64, ptr %13, align 8, !tbaa !5
  %130 = sub nsw i64 %129, 2
  %131 = getelementptr inbounds i64, ptr %42, i64 %130
  %132 = load i64, ptr %131, align 8, !tbaa !5
  %133 = sub nsw i64 %128, %132
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %133)
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %136

136:                                              ; preds = %124, %117
  br label %137

137:                                              ; preds = %136, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %11, align 8, !tbaa !5
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %11, align 8, !tbaa !5
  br label %80, !llvm.loop !12

141:                                              ; preds = %84
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %142 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %142)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %143 = load i32, ptr %1, align 4
  ret i32 %143
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) #4

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

; 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 = { 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 willreturn }
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 = !{!"long long", !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}


; 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 i64, align 8
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %6 = 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)
  %7 = load i64, ptr %1, align 8, !tbaa !5
  %8 = call ptr @llvm.stacksave.p0()
  %9 = alloca i64, i64 %7, align 16
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = alloca i64, i64 %10, align 16
  %12 = icmp sgt i64 %10, 0
  br i1 %12, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa = phi i64 [ %10, %0 ], [ %28, %.lr.ph ]
  %13 = getelementptr inbounds i64, ptr %9, i64 %.lcssa
  %14 = call noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef nonnull %9, ptr noundef nonnull %13, ptr noundef nonnull %11)
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = getelementptr inbounds i64, ptr %11, i64 %15
  call void @_ZSt4sortIPxEvT_S1_(ptr noundef nonnull %11, ptr noundef nonnull %16)
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = alloca i64, i64 %17, align 16
  %19 = alloca i64, i64 %17, align 16
  %20 = load i64, ptr %9, align 16, !tbaa !5
  store i64 %20, ptr %18, align 16, !tbaa !5
  %21 = load i64, ptr %11, align 16, !tbaa !5
  store i64 %21, ptr %19, align 16, !tbaa !5
  %22 = icmp sgt i64 %17, 1
  br i1 %22, label %.lr.ph22.preheader, label %._crit_edge23

.lr.ph22.preheader:                               ; preds = %._crit_edge
  %23 = add nsw i64 %17, -1
  %xtraiter = and i64 %23, 1
  %24 = icmp eq i64 %17, 2
  br i1 %24, label %._crit_edge23.loopexit.unr-lcssa, label %.lr.ph22.preheader.new

.lr.ph22.preheader.new:                           ; preds = %.lr.ph22.preheader
  %unroll_iter = and i64 %23, -2
  br label %.lr.ph22

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.01519 = phi i64 [ %27, %.lr.ph ], [ 0, %0 ]
  %25 = getelementptr inbounds i64, ptr %9, i64 %.01519
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %27 = add nuw nsw i64 %.01519, 1
  %28 = load i64, ptr %1, align 8, !tbaa !5
  %29 = icmp slt i64 %27, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge23.loopexit.unr-lcssa:                 ; preds = %.lr.ph22, %.lr.ph22.preheader
  %.unr = phi i64 [ %21, %.lr.ph22.preheader ], [ %58, %.lr.ph22 ]
  %.unr44 = phi i64 [ %20, %.lr.ph22.preheader ], [ %54, %.lr.ph22 ]
  %.01420.unr = phi i64 [ 1, %.lr.ph22.preheader ], [ %60, %.lr.ph22 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge23, label %.lr.ph22.epil

.lr.ph22.epil:                                    ; preds = %._crit_edge23.loopexit.unr-lcssa
  %30 = getelementptr inbounds i64, ptr %9, i64 %.01420.unr
  %31 = load i64, ptr %30, align 8, !tbaa !5
  %32 = add nsw i64 %31, %.unr44
  %33 = getelementptr inbounds i64, ptr %18, i64 %.01420.unr
  store i64 %32, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds i64, ptr %11, i64 %.01420.unr
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = add nsw i64 %35, %.unr
  %37 = getelementptr inbounds i64, ptr %19, i64 %.01420.unr
  store i64 %36, ptr %37, align 8, !tbaa !5
  br label %._crit_edge23

._crit_edge23:                                    ; preds = %.lr.ph22.epil, %._crit_edge23.loopexit.unr-lcssa, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %38 = 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)
  %invariant.gep = getelementptr i8, ptr %19, i64 -8
  %invariant.gep28 = getelementptr i8, ptr %18, i64 -8
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %40 = icmp sgt i64 %39, 0
  br i1 %40, label %.lr.ph36, label %._crit_edge37

.lr.ph22:                                         ; preds = %.lr.ph22, %.lr.ph22.preheader.new
  %41 = phi i64 [ %21, %.lr.ph22.preheader.new ], [ %58, %.lr.ph22 ]
  %42 = phi i64 [ %20, %.lr.ph22.preheader.new ], [ %54, %.lr.ph22 ]
  %.01420 = phi i64 [ 1, %.lr.ph22.preheader.new ], [ %60, %.lr.ph22 ]
  %niter = phi i64 [ 0, %.lr.ph22.preheader.new ], [ %niter.next.1, %.lr.ph22 ]
  %43 = getelementptr inbounds i64, ptr %9, i64 %.01420
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = add nsw i64 %44, %42
  %46 = getelementptr inbounds i64, ptr %18, i64 %.01420
  store i64 %45, ptr %46, align 8, !tbaa !5
  %47 = getelementptr inbounds i64, ptr %11, i64 %.01420
  %48 = load i64, ptr %47, align 8, !tbaa !5
  %49 = add nsw i64 %48, %41
  %50 = getelementptr inbounds i64, ptr %19, i64 %.01420
  store i64 %49, ptr %50, align 8, !tbaa !5
  %51 = add nuw nsw i64 %.01420, 1
  %52 = getelementptr inbounds i64, ptr %9, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = add nsw i64 %53, %45
  %55 = getelementptr inbounds i64, ptr %18, i64 %51
  store i64 %54, ptr %55, align 8, !tbaa !5
  %56 = getelementptr inbounds i64, ptr %11, i64 %51
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = add nsw i64 %57, %49
  %59 = getelementptr inbounds i64, ptr %19, i64 %51
  store i64 %58, ptr %59, align 8, !tbaa !5
  %60 = add nuw nsw i64 %.01420, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge23.loopexit.unr-lcssa, label %.lr.ph22, !llvm.loop !11

._crit_edge37:                                    ; preds = %77, %._crit_edge23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.stackrestore.p0(ptr %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0

.lr.ph36:                                         ; preds = %._crit_edge23, %77
  %.034 = phi i64 [ %80, %77 ], [ 0, %._crit_edge23 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %61 = 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)
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %62, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %64 = load i64, ptr %3, align 8, !tbaa !5
  %65 = icmp eq i64 %64, 1
  %66 = load i64, ptr %4, align 8, !tbaa !5
  %67 = icmp eq i64 %66, 1
  %68 = load i64, ptr %5, align 8, !tbaa !5
  br i1 %65, label %69, label %71

69:                                               ; preds = %.lr.ph36
  %gep33 = getelementptr i64, ptr %invariant.gep28, i64 %68
  %70 = load i64, ptr %gep33, align 8, !tbaa !5
  br i1 %67, label %77, label %.sink.split

71:                                               ; preds = %.lr.ph36
  %gep27 = getelementptr i64, ptr %invariant.gep, i64 %68
  %72 = load i64, ptr %gep27, align 8, !tbaa !5
  br i1 %67, label %77, label %.sink.split

.sink.split:                                      ; preds = %71, %69
  %73 = phi ptr [ %18, %69 ], [ %19, %71 ]
  %.sink = phi i64 [ %70, %69 ], [ %72, %71 ]
  %74 = getelementptr i8, ptr %73, i64 -16
  %gep25 = getelementptr i64, ptr %74, i64 %66
  %75 = load i64, ptr %gep25, align 8, !tbaa !5
  %76 = sub nsw i64 %.sink, %75
  br label %77

77:                                               ; preds = %.sink.split, %71, %69
  %.sink40 = phi i64 [ %70, %69 ], [ %72, %71 ], [ %76, %.sink.split ]
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.sink40)
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  %80 = add nuw nsw i64 %.034, 1
  %81 = load i64, ptr %2, align 8, !tbaa !5
  %82 = icmp slt i64 %80, %81
  br i1 %82, label %.lr.ph36, label %._crit_edge37, !llvm.loop !12
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPxS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPxEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress 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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn }
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 = !{!"long long", !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}


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