; LLVM IR from Tunghohin/Competitive_Coding :: Daimayuan (369)

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

@a = external dso_local global [4194314 x i64], align 16
@f = external dso_local global [4194314 x i64], 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 i32, align 4
  %6 = alloca i64, align 8
  %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
  %12 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %13 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -24
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %15
  %17 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef null)
  %18 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %19 = getelementptr i8, ptr %18, i64 -24
  %20 = load i64, ptr %19, align 8
  %21 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %20
  %22 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %21, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %24

24:                                               ; preds = %35, %0
  %25 = load i32, ptr %3, align 4, !tbaa !8
  %26 = icmp slt i32 %25, 4194304
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %38

28:                                               ; preds = %24
  %29 = load i32, ptr %2, align 4, !tbaa !8
  %30 = add nsw i32 %29, 1
  %31 = sext i32 %30 to i64
  %32 = load i32, ptr %3, align 4, !tbaa !8
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %33
  store i64 %31, ptr %34, align 8, !tbaa !11
  br label %35

35:                                               ; preds = %28
  %36 = load i32, ptr %3, align 4, !tbaa !8
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %3, align 4, !tbaa !8
  br label %24, !llvm.loop !13

38:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 1, ptr %4, align 4, !tbaa !8
  br label %39

39:                                               ; preds = %61, %38
  %40 = load i32, ptr %4, align 4, !tbaa !8
  %41 = load i32, ptr %2, align 4, !tbaa !8
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %64

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %46 = load i32, ptr %5, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = load i32, ptr %4, align 4, !tbaa !8
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [4194314 x i64], ptr @a, i64 0, i64 %49
  store i64 %47, ptr %50, align 8, !tbaa !11
  %51 = load i32, ptr %5, align 4, !tbaa !8
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %54 = load i32, ptr %4, align 4, !tbaa !8
  %55 = sext i32 %54 to i64
  store i64 %55, ptr %6, align 8, !tbaa !11
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %57 = load i64, ptr %56, align 8, !tbaa !11
  %58 = load i32, ptr %5, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %59
  store i64 %57, ptr %60, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %61

61:                                               ; preds = %44
  %62 = load i32, ptr %4, align 4, !tbaa !8
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %4, align 4, !tbaa !8
  br label %39, !llvm.loop !15

64:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %65

65:                                               ; preds = %100, %64
  %66 = load i32, ptr %7, align 4, !tbaa !8
  %67 = icmp slt i32 %66, 22
  br i1 %67, label %69, label %68

68:                                               ; preds = %65
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %103

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !8
  br label %70

70:                                               ; preds = %96, %69
  %71 = load i32, ptr %9, align 4, !tbaa !8
  %72 = icmp slt i32 %71, 4194304
  br i1 %72, label %74, label %73

73:                                               ; preds = %70
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %99

74:                                               ; preds = %70
  %75 = load i32, ptr %9, align 4, !tbaa !8
  %76 = load i32, ptr %7, align 4, !tbaa !8
  %77 = shl i32 1, %76
  %78 = and i32 %75, %77
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %95

80:                                               ; preds = %74
  %81 = load i32, ptr %9, align 4, !tbaa !8
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %82
  %84 = load i32, ptr %9, align 4, !tbaa !8
  %85 = load i32, ptr %7, align 4, !tbaa !8
  %86 = shl i32 1, %85
  %87 = sub nsw i32 %84, %86
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %88
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull align 8 dereferenceable(8) %89)
  %91 = load i64, ptr %90, align 8, !tbaa !11
  %92 = load i32, ptr %9, align 4, !tbaa !8
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %93
  store i64 %91, ptr %94, align 8, !tbaa !11
  br label %95

95:                                               ; preds = %80, %74
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %9, align 4, !tbaa !8
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %9, align 4, !tbaa !8
  br label %70, !llvm.loop !16

99:                                               ; preds = %73
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %7, align 4, !tbaa !8
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %7, align 4, !tbaa !8
  br label %65, !llvm.loop !17

103:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !8
  br label %104

104:                                              ; preds = %135, %103
  %105 = load i32, ptr %10, align 4, !tbaa !8
  %106 = load i32, ptr %2, align 4, !tbaa !8
  %107 = icmp sle i32 %105, %106
  br i1 %107, label %109, label %108

108:                                              ; preds = %104
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %138

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %110 = load i32, ptr %10, align 4, !tbaa !8
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [4194314 x i64], ptr @a, i64 0, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !11
  %114 = sub nsw i64 4194303, %113
  %115 = trunc i64 %114 to i32
  store i32 %115, ptr %11, align 4, !tbaa !8
  %116 = load i32, ptr %11, align 4, !tbaa !8
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !11
  %120 = load i32, ptr %2, align 4, !tbaa !8
  %121 = sext i32 %120 to i64
  %122 = icmp sgt i64 %119, %121
  br i1 %122, label %123, label %126

123:                                              ; preds = %109
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %124, i8 noundef signext 32)
  br label %133

126:                                              ; preds = %109
  %127 = load i32, ptr %11, align 4, !tbaa !8
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %128
  %130 = load i64, ptr %129, align 8, !tbaa !11
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %130)
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %131, i8 noundef signext 32)
  br label %133

133:                                              ; preds = %126, %123
  %134 = phi ptr [ %125, %123 ], [ %132, %126 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %135

135:                                              ; preds = %133
  %136 = load i32, ptr %10, align 4, !tbaa !8
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %10, align 4, !tbaa !8
  br label %104, !llvm.loop !18

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

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

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

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

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 = { "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 #2 = { mustprogress nounwind 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 memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind 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 = { 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 }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


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

@a = external dso_local local_unnamed_addr global [4194314 x i64], align 16
@f = external dso_local global [4194314 x i64], 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 {
vector.ph:
  %0 = alloca i32, align 4
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #7
  %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) %0)
  %15 = load i32, ptr %0, align 4, !tbaa !8
  %16 = add nsw i32 %15, 1
  %17 = sext i32 %16 to i64
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %17, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next.3, %vector.body ]
  %18 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %index
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <2 x i64> %broadcast.splat, ptr %18, align 16, !tbaa !11
  store <2 x i64> %broadcast.splat, ptr %19, align 16, !tbaa !11
  %index.next = or disjoint i64 %index, 4
  %20 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %index.next
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  store <2 x i64> %broadcast.splat, ptr %20, align 16, !tbaa !11
  store <2 x i64> %broadcast.splat, ptr %21, align 16, !tbaa !11
  %index.next.1 = or disjoint i64 %index, 8
  %22 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %index.next.1
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  store <2 x i64> %broadcast.splat, ptr %22, align 16, !tbaa !11
  store <2 x i64> %broadcast.splat, ptr %23, align 16, !tbaa !11
  %index.next.2 = or disjoint i64 %index, 12
  %24 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %index.next.2
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  store <2 x i64> %broadcast.splat, ptr %24, align 16, !tbaa !11
  store <2 x i64> %broadcast.splat, ptr %25, align 16, !tbaa !11
  %index.next.3 = add nuw nsw i64 %index, 16
  %26 = icmp eq i64 %index.next.3, 4194304
  br i1 %26, label %.preheader33, label %vector.body, !llvm.loop !13

.preheader33:                                     ; preds = %vector.body
  %.not35 = icmp slt i32 %15, 1
  br i1 %.not35, label %.preheader31.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader33, %.lr.ph
  %indvars.iv43 = phi i64 [ %indvars.iv.next44, %.lr.ph ], [ 1, %.preheader33 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %27 = 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)
  %28 = load i32, ptr %1, align 4, !tbaa !8
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [4194314 x i64], ptr @a, i64 0, i64 %indvars.iv43
  store i64 %29, ptr %30, align 8, !tbaa !11
  %31 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store i64 %indvars.iv43, ptr %2, align 8, !tbaa !11
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %33 = load i64, ptr %32, align 8, !tbaa !11
  %34 = load i32, ptr %1, align 4, !tbaa !8
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %35
  store i64 %33, ptr %36, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
  %37 = load i32, ptr %0, align 4, !tbaa !8
  %38 = sext i32 %37 to i64
  %.not.not = icmp slt i64 %indvars.iv43, %38
  br i1 %.not.not, label %.lr.ph, label %.preheader31.preheader, !llvm.loop !17

.preheader31.preheader:                           ; preds = %.lr.ph, %.preheader33
  br label %.preheader31

.preheader31:                                     ; preds = %.preheader31.preheader, %42
  %.02538 = phi i32 [ %43, %42 ], [ 0, %.preheader31.preheader ]
  %39 = shl nuw nsw i32 1, %.02538
  %40 = zext nneg i32 %39 to i64
  br label %44

.preheader:                                       ; preds = %42
  %41 = load i32, ptr %0, align 4, !tbaa !8
  %.not2939 = icmp slt i32 %41, 1
  br i1 %.not2939, label %._crit_edge, label %.lr.ph41

42:                                               ; preds = %53
  %43 = add nuw nsw i32 %.02538, 1
  %exitcond50.not = icmp eq i32 %43, 22
  br i1 %exitcond50.not, label %.preheader, label %.preheader31, !llvm.loop !18

44:                                               ; preds = %.preheader31, %53
  %indvars.iv46 = phi i64 [ 0, %.preheader31 ], [ %indvars.iv.next47, %53 ]
  %45 = trunc nuw nsw i64 %indvars.iv46 to i32
  %46 = and i32 %39, %45
  %.not30 = icmp eq i32 %46, 0
  br i1 %.not30, label %53, label %47

47:                                               ; preds = %44
  %48 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %indvars.iv46
  %49 = sub nsw i64 %indvars.iv46, %40
  %50 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %49
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull align 8 dereferenceable(8) %50)
  %52 = load i64, ptr %51, align 8, !tbaa !11
  store i64 %52, ptr %48, align 8, !tbaa !11
  br label %53

53:                                               ; preds = %44, %47
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond49.not = icmp eq i64 %indvars.iv.next47, 4194304
  br i1 %exitcond49.not, label %42, label %44, !llvm.loop !19

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

.lr.ph41:                                         ; preds = %.preheader, %67
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %67 ], [ 1, %.preheader ]
  %54 = phi i32 [ %69, %67 ], [ %41, %.preheader ]
  %55 = getelementptr inbounds [4194314 x i64], ptr @a, i64 0, i64 %indvars.iv51
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %57 = shl i64 %56, 32
  %sext = sub i64 18014394214514688, %57
  %58 = ashr exact i64 %sext, 32
  %59 = getelementptr inbounds [4194314 x i64], ptr @f, i64 0, i64 %58
  %60 = load i64, ptr %59, align 8, !tbaa !11
  %61 = sext i32 %54 to i64
  %62 = icmp sgt i64 %60, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %.lr.ph41
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef -1)
  br label %67

65:                                               ; preds = %.lr.ph41
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %60)
  br label %67

67:                                               ; preds = %65, %63
  %.sink = phi ptr [ %66, %65 ], [ %64, %63 ]
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %.sink, i8 noundef signext 32)
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %69 = load i32, ptr %0, align 4, !tbaa !8
  %70 = sext i32 %69 to i64
  %.not29.not = icmp slt i64 %indvars.iv51, %70
  br i1 %.not29.not, label %.lr.ph41, label %._crit_edge, !llvm.loop !20
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #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 #6 align 2

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 = { "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 #2 = { mustprogress nounwind 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 memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind 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 = { 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 }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass