; LLVM IR from DionysiosB/CodeForces :: 1914A-ProblemsolvingLog (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [26 x i32], align 16
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %12 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 26, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  br label %14

14:                                               ; preds = %72, %0
  %15 = load i64, ptr %3, align 8, !tbaa !9
  %16 = add nsw i64 %15, -1
  store i64 %16, ptr %3, align 8, !tbaa !9
  %17 = icmp ne i64 %15, 0
  br i1 %17, label %18, label %79

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %20 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %21 unwind label %27

21:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 104, ptr %8) #7
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 104, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %22

22:                                               ; preds = %42, %21
  %23 = load i64, ptr %9, align 8, !tbaa !9
  %24 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %31, label %26

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

27:                                               ; preds = %18
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %6, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %7, align 4
  br label %78

31:                                               ; preds = %22
  %32 = load i64, ptr %9, align 8, !tbaa !9
  %33 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %32)
          to label %34 unwind label %45

34:                                               ; preds = %31
  %35 = load i8, ptr %33, align 1, !tbaa !11
  %36 = sext i8 %35 to i32
  %37 = sub nsw i32 %36, 65
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [26 x i32], ptr %8, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %39, align 4, !tbaa !5
  br label %42

42:                                               ; preds = %34
  %43 = load i64, ptr %9, align 8, !tbaa !9
  %44 = add nsw i64 %43, 1
  store i64 %44, ptr %9, align 8, !tbaa !9
  br label %22, !llvm.loop !12

45:                                               ; preds = %31
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %6, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %77

49:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %50

50:                                               ; preds = %64, %49
  %51 = load i64, ptr %11, align 8, !tbaa !9
  %52 = icmp slt i64 %51, 26
  br i1 %52, label %54, label %53

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

54:                                               ; preds = %50
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = getelementptr inbounds [26 x i32], ptr %8, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = load i64, ptr %11, align 8, !tbaa !9
  %60 = icmp sgt i64 %58, %59
  %61 = zext i1 %60 to i64
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = add nsw i64 %62, %61
  store i64 %63, ptr %10, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %54
  %65 = load i64, ptr %11, align 8, !tbaa !9
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %11, align 8, !tbaa !9
  br label %50, !llvm.loop !14

67:                                               ; preds = %53
  %68 = load i64, ptr %10, align 8, !tbaa !9
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %68)
          to label %70 unwind label %73

70:                                               ; preds = %67
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %72 unwind label %73

72:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %14, !llvm.loop !15

73:                                               ; preds = %70, %67
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %6, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %77

77:                                               ; preds = %73, %45
  call void @llvm.lifetime.end.p0(i64 104, ptr %8) #7
  br label %78

78:                                               ; preds = %77, %27
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %81

79:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %80 = load i32, ptr %1, align 4
  ret i32 %80

81:                                               ; preds = %78
  %82 = load ptr, ptr %6, align 8
  %83 = load i32, ptr %7, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 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) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 }

!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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !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" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_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 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca [26 x i32], align 16
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(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 = add nsw i64 %7, -1
  store i64 %8, ptr %1, align 8, !tbaa !5
  %.not19 = icmp eq i64 %7, 0
  br i1 %.not19, label %._crit_edge, label %.lr.ph20.preheader

.lr.ph20.preheader:                               ; preds = %0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %4, i64 4
  %.phi.trans.insert23 = getelementptr inbounds i8, ptr %4, i64 8
  %.phi.trans.insert25 = getelementptr inbounds i8, ptr %4, i64 12
  %.phi.trans.insert27 = getelementptr inbounds i8, ptr %4, i64 16
  %.phi.trans.insert29 = getelementptr inbounds i8, ptr %4, i64 20
  %.phi.trans.insert31 = getelementptr inbounds i8, ptr %4, i64 24
  %.phi.trans.insert33 = getelementptr inbounds i8, ptr %4, i64 28
  %.phi.trans.insert35 = getelementptr inbounds i8, ptr %4, i64 32
  %.phi.trans.insert37 = getelementptr inbounds i8, ptr %4, i64 36
  %.phi.trans.insert39 = getelementptr inbounds i8, ptr %4, i64 40
  %.phi.trans.insert41 = getelementptr inbounds i8, ptr %4, i64 44
  %.phi.trans.insert43 = getelementptr inbounds i8, ptr %4, i64 48
  %.phi.trans.insert45 = getelementptr inbounds i8, ptr %4, i64 52
  %.phi.trans.insert47 = getelementptr inbounds i8, ptr %4, i64 56
  %.phi.trans.insert49 = getelementptr inbounds i8, ptr %4, i64 60
  %.phi.trans.insert51 = getelementptr inbounds i8, ptr %4, i64 64
  %9 = getelementptr inbounds i8, ptr %4, i64 68
  %10 = getelementptr inbounds i8, ptr %4, i64 72
  %11 = getelementptr inbounds i8, ptr %4, i64 76
  %12 = getelementptr inbounds i8, ptr %4, i64 80
  %13 = getelementptr inbounds i8, ptr %4, i64 84
  %14 = getelementptr inbounds i8, ptr %4, i64 88
  %15 = getelementptr inbounds i8, ptr %4, i64 92
  %16 = getelementptr inbounds i8, ptr %4, i64 96
  %17 = getelementptr inbounds i8, ptr %4, i64 100
  br label %.lr.ph20

.lr.ph20:                                         ; preds = %.lr.ph20.preheader, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %20 unwind label %126

20:                                               ; preds = %.lr.ph20
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %4) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) %4, i8 0, i64 104, i1 false)
  %21 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %.not21 = icmp eq i64 %21, 0
  br i1 %.not21, label %.preheader, label %.lr.ph

.preheader.loopexit:                              ; preds = %.lr.ph
  %.pre = load i32, ptr %4, align 16, !tbaa !9
  %.pre22 = load i32, ptr %.phi.trans.insert, align 4, !tbaa !9
  %.pre24 = load i32, ptr %.phi.trans.insert23, align 8, !tbaa !9
  %.pre26 = load i32, ptr %.phi.trans.insert25, align 4, !tbaa !9
  %.pre28 = load i32, ptr %.phi.trans.insert27, align 16, !tbaa !9
  %.pre30 = load i32, ptr %.phi.trans.insert29, align 4, !tbaa !9
  %.pre32 = load i32, ptr %.phi.trans.insert31, align 8, !tbaa !9
  %.pre34 = load i32, ptr %.phi.trans.insert33, align 4, !tbaa !9
  %.pre36 = load i32, ptr %.phi.trans.insert35, align 16, !tbaa !9
  %.pre38 = load i32, ptr %.phi.trans.insert37, align 4, !tbaa !9
  %.pre40 = load i32, ptr %.phi.trans.insert39, align 8, !tbaa !9
  %.pre42 = load i32, ptr %.phi.trans.insert41, align 4, !tbaa !9
  %.pre44 = load i32, ptr %.phi.trans.insert43, align 16, !tbaa !9
  %.pre46 = load i32, ptr %.phi.trans.insert45, align 4, !tbaa !9
  %.pre48 = load i32, ptr %.phi.trans.insert47, align 8, !tbaa !9
  %.pre50 = load i32, ptr %.phi.trans.insert49, align 4, !tbaa !9
  %.pre52 = load i32, ptr %.phi.trans.insert51, align 16, !tbaa !9
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %20
  %22 = phi i32 [ %.pre52, %.preheader.loopexit ], [ 0, %20 ]
  %23 = phi i32 [ %.pre50, %.preheader.loopexit ], [ 0, %20 ]
  %24 = phi i32 [ %.pre48, %.preheader.loopexit ], [ 0, %20 ]
  %25 = phi i32 [ %.pre46, %.preheader.loopexit ], [ 0, %20 ]
  %26 = phi i32 [ %.pre44, %.preheader.loopexit ], [ 0, %20 ]
  %27 = phi i32 [ %.pre42, %.preheader.loopexit ], [ 0, %20 ]
  %28 = phi i32 [ %.pre40, %.preheader.loopexit ], [ 0, %20 ]
  %29 = phi i32 [ %.pre38, %.preheader.loopexit ], [ 0, %20 ]
  %30 = phi i32 [ %.pre36, %.preheader.loopexit ], [ 0, %20 ]
  %31 = phi i32 [ %.pre34, %.preheader.loopexit ], [ 0, %20 ]
  %32 = phi i32 [ %.pre32, %.preheader.loopexit ], [ 0, %20 ]
  %33 = phi i32 [ %.pre30, %.preheader.loopexit ], [ 0, %20 ]
  %34 = phi i32 [ %.pre28, %.preheader.loopexit ], [ 0, %20 ]
  %35 = phi i32 [ %.pre26, %.preheader.loopexit ], [ 0, %20 ]
  %36 = phi i32 [ %.pre24, %.preheader.loopexit ], [ 0, %20 ]
  %37 = phi i32 [ %.pre22, %.preheader.loopexit ], [ 0, %20 ]
  %38 = phi i32 [ %.pre, %.preheader.loopexit ], [ 0, %20 ]
  %39 = icmp sgt i32 %38, 0
  %40 = zext i1 %39 to i64
  %41 = icmp sgt i32 %37, 1
  %42 = zext i1 %41 to i64
  %43 = add nuw nsw i64 %40, %42
  %44 = icmp sgt i32 %36, 2
  %45 = zext i1 %44 to i64
  %46 = add nuw nsw i64 %43, %45
  %47 = icmp sgt i32 %35, 3
  %48 = zext i1 %47 to i64
  %49 = add nuw nsw i64 %46, %48
  %50 = icmp sgt i32 %34, 4
  %51 = zext i1 %50 to i64
  %52 = add nuw nsw i64 %49, %51
  %53 = icmp sgt i32 %33, 5
  %54 = zext i1 %53 to i64
  %55 = add nuw nsw i64 %52, %54
  %56 = icmp sgt i32 %32, 6
  %57 = zext i1 %56 to i64
  %58 = add nuw nsw i64 %55, %57
  %59 = icmp sgt i32 %31, 7
  %60 = zext i1 %59 to i64
  %61 = add nuw nsw i64 %58, %60
  %62 = icmp sgt i32 %30, 8
  %63 = zext i1 %62 to i64
  %64 = add nuw nsw i64 %61, %63
  %65 = icmp sgt i32 %29, 9
  %66 = zext i1 %65 to i64
  %67 = add nuw nsw i64 %64, %66
  %68 = icmp sgt i32 %28, 10
  %69 = zext i1 %68 to i64
  %70 = add nuw nsw i64 %67, %69
  %71 = icmp sgt i32 %27, 11
  %72 = zext i1 %71 to i64
  %73 = add nuw nsw i64 %70, %72
  %74 = icmp sgt i32 %26, 12
  %75 = zext i1 %74 to i64
  %76 = add nuw nsw i64 %73, %75
  %77 = icmp sgt i32 %25, 13
  %78 = zext i1 %77 to i64
  %79 = add nuw nsw i64 %76, %78
  %80 = icmp sgt i32 %24, 14
  %81 = zext i1 %80 to i64
  %82 = add nuw nsw i64 %79, %81
  %83 = icmp sgt i32 %23, 15
  %84 = zext i1 %83 to i64
  %85 = add nuw nsw i64 %82, %84
  %86 = icmp sgt i32 %22, 16
  %87 = zext i1 %86 to i64
  %88 = add nuw nsw i64 %85, %87
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = icmp sgt i32 %89, 17
  %91 = zext i1 %90 to i64
  %92 = add nuw nsw i64 %88, %91
  %93 = load i32, ptr %10, align 8, !tbaa !9
  %94 = icmp sgt i32 %93, 18
  %95 = zext i1 %94 to i64
  %96 = add nuw nsw i64 %92, %95
  %97 = load i32, ptr %11, align 4, !tbaa !9
  %98 = icmp sgt i32 %97, 19
  %99 = zext i1 %98 to i64
  %100 = add nuw nsw i64 %96, %99
  %101 = load i32, ptr %12, align 16, !tbaa !9
  %102 = icmp sgt i32 %101, 20
  %103 = zext i1 %102 to i64
  %104 = add nuw nsw i64 %100, %103
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = icmp sgt i32 %105, 21
  %107 = zext i1 %106 to i64
  %108 = add nuw nsw i64 %104, %107
  %109 = load i32, ptr %14, align 8, !tbaa !9
  %110 = icmp sgt i32 %109, 22
  %111 = zext i1 %110 to i64
  %112 = add nuw nsw i64 %108, %111
  %113 = load i32, ptr %15, align 4, !tbaa !9
  %114 = icmp sgt i32 %113, 23
  %115 = zext i1 %114 to i64
  %116 = add nuw nsw i64 %112, %115
  %117 = load i32, ptr %16, align 16, !tbaa !9
  %118 = icmp sgt i32 %117, 24
  %119 = zext i1 %118 to i64
  %120 = add nuw nsw i64 %116, %119
  %121 = load i32, ptr %17, align 4, !tbaa !9
  %122 = icmp sgt i32 %121, 25
  %123 = zext i1 %122 to i64
  %124 = add nuw nsw i64 %120, %123
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %124)
          to label %138 unwind label %143

126:                                              ; preds = %.lr.ph20
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %145

.lr.ph:                                           ; preds = %20, %.lr.ph
  %.01216 = phi i64 [ %135, %.lr.ph ], [ 0, %20 ]
  %128 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %3, i64 noundef %.01216)
  %129 = load i8, ptr %128, align 1, !tbaa !11
  %130 = sext i8 %129 to i64
  %131 = add nsw i64 %130, -65
  %132 = getelementptr inbounds [26 x i32], ptr %4, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %132, align 4, !tbaa !9
  %135 = add nuw nsw i64 %.01216, 1
  %136 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %137 = icmp ult i64 %135, %136
  br i1 %137, label %.lr.ph, label %.preheader.loopexit, !llvm.loop !12

138:                                              ; preds = %.preheader
  %139 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %140 unwind label %143

140:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %141 = load i64, ptr %1, align 8, !tbaa !5
  %142 = add nsw i64 %141, -1
  store i64 %142, ptr %1, align 8, !tbaa !5
  %.not = icmp eq i64 %141, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph20, !llvm.loop !14

143:                                              ; preds = %138, %.preheader
  %144 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %4) #7
  br label %145

145:                                              ; preds = %143, %126
  %.pn = phi { ptr, i32 } [ %144, %143 ], [ %127, %126 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn

._crit_edge:                                      ; preds = %140, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 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 #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 }

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


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